b74e159a78b3e7784d4f50583e86fc18faffc535
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-11-07  Adam Barth  <abarth@webkit.org>
2
3         Move static "policy" state from SecurityOrigin.cpp to SecurityPolicy.cpp
4         https://bugs.webkit.org/show_bug.cgi?id=71755
5
6         Reviewed by Eric Seidel.
7
8         * WebProcess/InjectedBundle/InjectedBundle.cpp:
9         (WebKit::InjectedBundle::addOriginAccessWhitelistEntry):
10         (WebKit::InjectedBundle::removeOriginAccessWhitelistEntry):
11         (WebKit::InjectedBundle::resetOriginAccessWhitelists):
12         * WebProcess/Plugins/PluginView.cpp:
13         (WebKit::PluginView::loadURL):
14
15 2011-11-08  Brent Fulgham  <bfulgham@webkit.org>
16
17         [WinCairo] Unreviewed build fix after r99613.
18
19         * win/WebKit2CFLite.def: Add missing export.
20
21 2011-11-08  Brent Fulgham  <bfulgham@webkit.org>
22
23         [WinCairo] Unreviewed build fix after r98624 and r99613.
24
25         * win/WebKit2CFLite.def: Add missing exports.
26
27 2011-11-08  Beth Dakin  <bdakin@apple.com>
28
29         https://bugs.webkit.org/show_bug.cgi?id=71856
30         WebKit should use new NSWindowDidChangeBackingPropertiesNotification instead of 
31         old NSWindowDidChangeResolutionNotification
32         -and corresponding-
33         <rdar://problem/10317253>
34
35         Reviewed by Tim Hatcher.
36
37         * UIProcess/API/mac/WKView.mm:
38         (-[WKView addWindowObserversForWindow:]):
39         (-[WKView removeWindowObservers]):
40
41         We have to check that the backing scale factor actually changed since this 
42         notification can also be used to signify other changes. 
43         (-[WKView _windowDidChangeBackingProperties:]):
44
45 2011-11-08  Anders Carlsson  <andersca@apple.com>
46
47         Add a basic layer hierarchy to the Core Animation drawing area
48         https://bugs.webkit.org/show_bug.cgi?id=71838
49
50         Reviewed by Sam Weinig.
51
52         * UIProcess/API/mac/WKView.mm:
53         (-[WKView drawRect:]):
54         Return early if we're using a tiled drawing area.
55
56         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
57         If we're using a tiled drawing area, make the WKView layer backed and set its layer
58         to a simple CALayer with a white background and set the view's content redraw policy
59         to never to avoid ever calling drawRect.
60
61         * UIProcess/DrawingAreaProxy.h:
62         (WebKit::DrawingAreaProxy::didUpdateGeometry):
63         * UIProcess/DrawingAreaProxy.messages.in:
64         Add a new didUpdateGeometry message.
65
66         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
67         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
68         (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
69         Initialize m_isWaitingForDidUpdateGeometry.
70
71         (WebKit::TiledCoreAnimationDrawingAreaProxy::sizeDidChange):
72         Send an UpdateGeometry message to the web process and wait for a reply.
73
74         (WebKit::TiledCoreAnimationDrawingAreaProxy::enterAcceleratedCompositingMode):
75         Tell the web page proxy to enter accelerated compositing mode.
76
77         (WebKit::TiledCoreAnimationDrawingAreaProxy::exitAcceleratedCompositingMode):
78         Assert that this function is never called.
79
80         (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
81         Send another UpdateGeometry message if needed.
82
83         (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
84         Add helper function to actually send the UpdateGeometry message.
85
86         * WebProcess/WebPage/DrawingArea.h:
87         (WebKit::DrawingArea::updateGeometry):
88         * WebProcess/WebPage/DrawingArea.messages.in:
89         Add UpdateGeometry message.
90
91         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
92         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
93         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
94         Create a red root layer and a remote layer client that hosts it.
95
96         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
97         Resize the root layer and tell the UI process that we've updated the geometry.
98
99 2011-11-08  Dan Bernstein  <mitz@apple.com>
100
101         <rdar://problem/10262225> Allow RenderView to have columns
102         https://bugs.webkit.org/show_bug.cgi?id=71840
103
104         * win/WebKit2.def: Export Page::setPagination() for WebCoreTestSupport.
105
106 2011-11-08  Jon Lee  <jonlee@apple.com>
107
108         [WK2] Expose acceptMIMETypes for file inputs
109         https://bugs.webkit.org/show_bug.cgi?id=71836
110         <rdar://problem/10407367>
111
112         Reviewed by Anders Carlsson.
113
114         * Shared/WebOpenPanelParameters.cpp:
115         (WebKit::WebOpenPanelParameters::acceptMIMETypes):
116         * Shared/WebOpenPanelParameters.h:
117         * UIProcess/API/C/WKOpenPanelParameters.cpp:
118         (WKOpenPanelParametersCopyAcceptedMIMETypes):
119         * UIProcess/API/C/WKOpenPanelParameters.h:
120
121 2011-11-08  Zan Dobersek  <zandobersek@gmail.com>
122
123         [WK2][GTK] The default database & local storage directory names should note they exist for Gtk port's needs
124         https://bugs.webkit.org/show_bug.cgi?id=71837
125
126         Reviewed by Martin Robinson.
127
128         Ensure that directories for databases and local storage are in a 'webkitgtk'
129         directory in current user's data directory, noting they originate from the Gtk port.
130
131         * UIProcess/gtk/WebContextGtk.cpp:
132         (WebKit::WebContext::platformDefaultDatabaseDirectory):
133         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
134
135 2011-11-08  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
136
137         [Qt] Workaround some problems in QML API tests
138         https://bugs.webkit.org/show_bug.cgi?id=71818
139
140         Reviewed by Tor Arne Vestbø.
141
142         This commit workaround the issue of QML's QtTest crashing when we run tests after
143         "windowShown". We delay to the next run of the mainloop. This workaround is not
144         pretty but shouldn't affect the semantics of the tests. And we benefit more from
145         having working tests right now.
146
147         This patch also improves Download to: wait for the load before emitting click, and
148         properly identifying the "succeeded" signal of the downloadItem object.
149
150         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_download.qml:
151         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_linkHovered.qml:
152         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_navigationPolicyForUrl.qml:
153
154 2011-11-08  Kenneth Rohde Christiansen  <kenneth@webkit.org>
155
156         Clean up QtViewportInteractionEngine
157
158         Reviewed by Simon Hausmann.
159
160         * UIProcess/qt/QtViewportInteractionEngine.cpp:
161         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
162         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
163
164             Rename the method to make it more obvious what it does. Avoid implicit
165             conversion to/from QVariant.
166
167         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
168         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
169         (WebKit::QtViewportInteractionEngine::itemSizeChanged):
170
171             Only call this method on item size changes, and not for every interaction
172             with the viewport item. Before this change it was even being called during
173             animations.
174
175         * UIProcess/qt/QtViewportInteractionEngine.h:
176         (WebKit::QtViewportInteractionEngine::scaleAnimationValueChanged):
177
178             Rename to make it clean that this is called from the animator.
179
180 2011-11-08  Kenneth Rohde Christiansen  <kenneth@webkit.org>
181
182         [Qt] Improve the animation time constant
183         https://bugs.webkit.org/show_bug.cgi?id=71790
184
185         Reviewed by Simon Hausmann.
186
187         Use 250 milliseconds instead of 400, which feels a lot more natural
188         and makes the mini browser feel more responsive.
189
190         * UIProcess/qt/QtViewportInteractionEngine.cpp:
191
192 2011-11-08  Alexis Menard  <alexis.menard@openbossa.org>
193
194         [Qt] Merge QtDesktopWebPageProxy and QtTouchWebPageProxy into QtWebPageProxy.
195         https://bugs.webkit.org/show_bug.cgi?id=71355
196
197         Reviewed by Simon Hausmann.
198
199         As we try to unify our public API offer we need to merge our double
200         WebPageProxy implementations first into a common class. That will help
201         to merge our TouchWebView and DesktopWebView views into one class later.
202         This commit just merge stuff around and doesn't contain any functional changes.
203
204         * Target.pri:
205         * UIProcess/API/qt/qdesktopwebview.cpp:
206         (QDesktopWebViewPrivate::init):
207         * UIProcess/API/qt/qtouchwebpage.cpp:
208         (QTouchWebPagePrivate::paintToCurrentGLContext):
209         * UIProcess/API/qt/qtouchwebpage.h:
210         * UIProcess/API/qt/qtouchwebpage_p.h:
211         * UIProcess/API/qt/qtouchwebview.cpp:
212         (QTouchWebViewPrivate::init):
213         (QTouchWebViewPrivate::_q_viewportUpdated):
214         (QTouchWebViewPrivate::_q_viewportTrajectoryVectorChanged):
215         * UIProcess/API/qt/qtouchwebview_p.h:
216         * UIProcess/qt/QtDesktopWebPageProxy.cpp: Removed.
217         * UIProcess/qt/QtDesktopWebPageProxy.h: Removed.
218         * UIProcess/qt/QtTouchWebPageProxy.cpp: Removed.
219         * UIProcess/qt/QtTouchWebPageProxy.h: Removed.
220         * UIProcess/qt/QtWebPageProxy.cpp:
221         (dragOperationToDropAction):
222         (QtWebPageProxy::QtWebPageProxy):
223         (QtWebPageProxy::handleEvent):
224         (QtWebPageProxy::handleMouseMoveEvent):
225         (QtWebPageProxy::handleMousePressEvent):
226         (QtWebPageProxy::handleMouseReleaseEvent):
227         (QtWebPageProxy::handleMouseDoubleClickEvent):
228         (QtWebPageProxy::handleWheelEvent):
229         (QtWebPageProxy::handleHoverLeaveEvent):
230         (QtWebPageProxy::handleHoverMoveEvent):
231         (QtWebPageProxy::handleDragEnterEvent):
232         (QtWebPageProxy::handleDragLeaveEvent):
233         (QtWebPageProxy::handleDragMoveEvent):
234         (QtWebPageProxy::handleDropEvent):
235         (QtWebPageProxy::timerEvent):
236         (QtWebPageProxy::processDidCrash):
237         (QtWebPageProxy::didReceiveDownloadResponse):
238         (QtWebPageProxy::paintContent):
239         (QtWebPageProxy::createDrawingAreaProxy):
240         (QtWebPageProxy::renderToCurrentGLContext):
241         (QtWebPageProxy::doneWithTouchEvent):
242         (QtWebPageProxy::setVisibleContentRectAndScale):
243         (QtWebPageProxy::setVisibleContentRectTrajectoryVector):
244         (QtWebPageProxy::touchEvent):
245         (QtWebPageProxy::findZoomableAreaForPoint):
246         * UIProcess/qt/QtWebPageProxy.h:
247
248 2011-11-08  Zan Dobersek  <zandobersek@gmail.com>
249
250         [WK2][GTK] Application cache directory is incorrectly set
251         https://bugs.webkit.org/show_bug.cgi?id=70680
252
253         Reviewed by Philippe Normand.
254
255         Correctly set application cache directory to be in current
256         user's default cache directory.
257
258         * UIProcess/gtk/WebContextGtk.cpp:
259         (WebKit::WebContext::applicationCacheDirectory):
260
261 2011-11-07  Emil A Eklund  <eae@chromium.org>
262
263         Revert platform and scrolling to ints
264         https://bugs.webkit.org/show_bug.cgi?id=71585
265
266         Reviewed by Eric Seidel.
267
268         Replace all uses of LayoutUnit and related types with ints in platform
269         and scrolling code.
270
271         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
272         (WebKit::BuiltInPDFView::invalidateScrollbarRect):
273         (WebKit::BuiltInPDFView::visibleHeight):
274         (WebKit::BuiltInPDFView::visibleWidth):
275         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
276
277 2011-11-07  Adam Barth  <abarth@webkit.org>
278
279         Move DomainRelaxationForbidden scheme registry to SchemeRegistry
280         https://bugs.webkit.org/show_bug.cgi?id=71750
281
282         Reviewed by Eric Seidel.
283
284         * WebProcess/WebProcess.cpp:
285         (WebKit::WebProcess::setDomainRelaxationForbiddenForURLScheme):
286
287 2011-11-07  Beth Dakin  <bdakin@apple.com>
288
289         https://bugs.webkit.org/show_bug.cgi?id=71490
290         Support uiStateTransitionProgress for scrollbars
291         -and corresponding-
292         <rdar://problem/9849612>
293
294         Reviewed by Sam Weinig.
295
296         Scrollbar::mouseUp() now takes a PlatformMouseEvent as a parameter.
297         * UIProcess/win/WebPopupMenuProxyWin.cpp:
298         (WebKit::WebPopupMenuProxyWin::onLButtonUp):
299         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
300         (WebKit::BuiltInPDFView::handleMouseEvent):
301
302 2011-11-07  Alexey Proskuryakov  <ap@apple.com>
303
304         The Full Keyboard Access preference should be read in the UI process
305         https://bugs.webkit.org/show_bug.cgi?id=71734
306         <rdar://problem/9237619>
307
308         Reviewed by Darin Adler.
309
310         This is consistent with how other global preferences (like language) are handled, and lets
311         us tighten up the sandbox a little.
312
313         * Shared/WebProcessCreationParameters.cpp:
314         (WebKit::WebProcessCreationParameters::encode):
315         (WebKit::WebProcessCreationParameters::decode):
316         * Shared/WebProcessCreationParameters.h:
317         Added fullKeyboardAccessEnabled, so that newly started processes have the right preference value.
318
319         * UIProcess/WebContext.h:
320         * UIProcess/WebContext.cpp:
321         (WebKit::WebContext::fullKeyboardAccessModeChanged): If preference changes while a web process
322         is already running, tell it.
323         (WebKit::WebContext::ensureWebProcess): Set parameters.fullKeyboardAccessEnabled from current
324         preference.
325
326         * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::fullKeyboardAccessEnabled):
327         * UIProcess/mac/WebProcessProxyMac.mm: (WebKit::WebProcessProxy::fullKeyboardAccessEnabled):
328         * UIProcess/WebProcessProxy.h:
329         Proxy it to Objective-C code. WebProcessProxy is as good place to have the static function
330         as any. One day, we will make code more consistent with language and other global preferences.
331
332         * UIProcess/mac/WKFullKeyboardAccessWatcher.h: Copied from Source/WebKit2/WebProcess/mac/WKFullKeyboardAccessWatcher.h.
333         * UIProcess/mac/WKFullKeyboardAccessWatcher.mm: Copied from Source/WebKit2/WebProcess/mac/WKFullKeyboardAccessWatcher.mm.
334         * WebProcess/mac/WKFullKeyboardAccessWatcher.h: Removed.
335         * WebProcess/mac/WKFullKeyboardAccessWatcher.mm: Removed.
336         (-[WKFullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]): Once retrieved,
337         push the preference value.
338
339         * WebKit2.xcodeproj/project.pbxproj: WKFullKeyboardAccessWatcher is now in UI process.
340
341         * WebProcess/WebProcess.h:
342         * WebProcess/WebProcess.cpp:
343         (WebKit::WebProcess::WebProcess):
344         (WebKit::WebProcess::fullKeyboardAccessModeChanged):
345         (WebKit::WebProcess::fullKeyboardAccessEnabled):
346         * WebProcess/mac/WebProcessMac.mm:
347         WebCprocess now holds the preference value in a mamber value, which UI process pushes
348         updates to.
349
350         * WebProcess/WebProcess.messages.in: Added a message for changes preference value.
351
352         * WebProcess/com.apple.WebProcess.sb: We no longer need read access to com.apple.universalaccess.plist.
353
354 2011-11-07  Anders Carlsson  <andersca@apple.com>
355
356         Add TiledCoreAnimationDrawingArea stub classes
357         https://bugs.webkit.org/show_bug.cgi?id=71729
358
359         Reviewed by Sam Weinig.
360
361         * Shared/DrawingAreaInfo.h:
362         * UIProcess/API/mac/WKView.mm:
363         (-[WKView _shouldUseTiledDrawingArea]):
364         (-[WKView WebKit::]):
365         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: Copied from Source/WebKit2/Shared/DrawingAreaInfo.h.
366         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: Copied from Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp.
367         (WebKit::TiledCoreAnimationDrawingAreaProxy::create):
368         (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
369         (WebKit::TiledCoreAnimationDrawingAreaProxy::~TiledCoreAnimationDrawingAreaProxy):
370         (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
371         (WebKit::TiledCoreAnimationDrawingAreaProxy::sizeDidChange):
372         * WebKit2.xcodeproj/project.pbxproj:
373         * WebProcess/WebPage/DrawingArea.cpp:
374         (WebKit::DrawingArea::create):
375         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Copied from Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp.
376         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: Copied from Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp.
377         (WebKit::TiledCoreAnimationDrawingArea::create):
378         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
379         (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
380         (WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplay):
381         (WebKit::TiledCoreAnimationDrawingArea::scroll):
382         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
383         (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync):
384
385 2011-11-07  Anders Carlsson  <andersca@apple.com>
386
387         Follow-up build fix.
388
389         * WebProcess/WebPage/DrawingAreaImpl.h:
390
391 2011-11-07  Anders Carlsson  <andersca@apple.com>
392
393         Remove unused DrawingArea::syncCompositingLayers
394         https://bugs.webkit.org/show_bug.cgi?id=71717
395
396         Reviewed by John Sullivan.
397
398         * WebProcess/WebPage/DrawingArea.h:
399         * WebProcess/WebPage/DrawingAreaImpl.cpp:
400         * WebProcess/WebPage/TiledDrawingArea.h:
401
402 2011-11-07  Anders Carlsson  <andersca@apple.com>
403
404         Rename NetscapePlugin::wantsWindowRelativeNPWindowCoordinates to NetscapePlugin::wantsPluginRelativeNPWindowCoordinates
405         https://bugs.webkit.org/show_bug.cgi?id=71708
406
407         Reviewed by Sam Weinig.
408
409         The name wantsPluginRelativeNPWindowCoordinates is more clear than wantsWindowRelativeNPWindowCoordinates. Rename the functions
410         everywhere and, since the meaning is now inverted, invert the checks and return values.
411
412         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
413         (WebKit::NetscapePlugin::callSetWindow):
414         (WebKit::NetscapePlugin::geometryDidChange):
415         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
416         * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
417         (WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
418         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
419         (WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
420         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
421         (WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
422         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
423         (WebKit::NetscapePlugin::wantsPluginRelativeNPWindowCoordinates):
424
425 2011-11-07  Anders Carlsson  <andersca@apple.com>
426
427         NetscapePlugin::wantsWindowRelativeNPWindowCoordinates should return false on Mac
428         https://bugs.webkit.org/show_bug.cgi?id=71707
429
430         Reviewed by Sam Weinig.
431
432         This changes the way the fake Carbon plug-in window is positioned, so that it's always the same size
433         and location as the plug-in (relative to the screen).
434
435         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
436         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
437         (WebKit::NetscapePlugin::platformGeometryDidChange):
438         Call updateFakeWindowBounds.
439
440         (WebKit::NetscapePlugin::updateFakeWindowBounds):
441         Convert the plug-in position to screen coordinates and set the window bounds to be the location and
442         size of the plug-in, where the location is relative to the screen.
443
444         (WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates):
445         Return false.
446
447         (WebKit::NetscapePlugin::windowAndViewFramesChanged):
448         Call updateFakeWindowBounds.
449
450 2011-11-07  Sam Weinig  <sam@webkit.org>
451
452         WKPage.h should be in PrivateHeaders.
453
454         Rubber-stamped by Anders Carlsson.
455
456         * WebKit2.xcodeproj/project.pbxproj:
457         Mark WKPage.h private.
458
459 2011-11-07  Anders Carlsson  <andersca@apple.com>
460
461         Simplify NetscapePlugin::convertPoint and make it work (in theory) with transformed plug-ins
462         https://bugs.webkit.org/show_bug.cgi?id=71699
463
464         Reviewed by Sam Weinig.
465
466         Add a getScreenTransform function which given a coordinate space returns a transform that converts a
467         point from that coordinate space to the screen coordinate space. We then get the source -> screen transform
468         and the destination -> screen transform. We invert the destination -> screen transform, multiply it with the
469         source -> screen transform and use mapPoint to get a complete affine transform from the source to the destination space
470         and use mapPoint to map the source point and return the destination point.
471
472         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
473         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
474         (WebKit::NetscapePlugin::getScreenTransform):
475         (WebKit::NetscapePlugin::convertPoint):
476
477         * WebProcess/Plugins/PluginView.cpp:
478         (WebKit::PluginView::initializePlugin):
479         Call windowAndViewFramesChanged before viewGeometryDidChange so that the window and view frames will be up to date by
480         the time NPP_SetWindow is called in the plug-in.
481
482 2011-11-07  Kenneth Rohde Christiansen  <kenneth@webkit.org>
483
484         [Qt] Put handling of gestures and their interaction in one place
485         https://bugs.webkit.org/show_bug.cgi?id=71682
486
487         Reviewed by Simon Hausmann.
488
489         Before this patch, the interaction (ie. cancelling animations, events)
490         was handled in the respective recognizers which then knew about each
491         others.
492
493         * UIProcess/qt/QtGestureRecognizer.h:
494         (WebKit::QtGestureRecognizer::isRecognized):
495         * UIProcess/qt/QtPanGestureRecognizer.cpp:
496         (WebKit::QtPanGestureRecognizer::recognize):
497         * UIProcess/qt/QtPanGestureRecognizer.h:
498         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
499         (WebKit::QtPinchGestureRecognizer::recognize):
500         * UIProcess/qt/QtPinchGestureRecognizer.h:
501         * UIProcess/qt/QtTouchWebPageProxy.cpp:
502         (QtTouchWebPageProxy::QtTouchWebPageProxy):
503         (QtTouchWebPageProxy::doneWithTouchEvent):
504         * UIProcess/qt/QtTouchWebPageProxy.h:
505         * UIProcess/qt/QtViewportInteractionEngine.cpp:
506         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
507         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
508         (WebKit::QtViewportInteractionEngine::scrollAnimationActive):
509         (WebKit::QtViewportInteractionEngine::interruptScrollAnimation):
510         (WebKit::QtViewportInteractionEngine::panGestureActive):
511         (WebKit::QtViewportInteractionEngine::scaleAnimationActive):
512         (WebKit::QtViewportInteractionEngine::interruptScaleAnimation):
513         (WebKit::QtViewportInteractionEngine::pinchGestureActive):
514         * UIProcess/qt/QtViewportInteractionEngine.h:
515
516 2011-11-07  Simon Hausmann  <simon.hausmann@nokia.com>
517
518         [Qt] Make it possible to include qdesktopwebview.h from apps
519
520         Reviewed by Tor Arne Vestbø.
521
522         * UIProcess/API/qt/qdesktopwebview.h: Don't include C API headers, forward
523         declare the structs manually.
524
525 2011-11-07  Simon Hausmann  <simon.hausmann@nokia.com>
526
527         [Qt] Fix failing inspector tests after build system changes
528         https://bugs.webkit.org/show_bug.cgi?id=71677
529
530         Reviewed by Tor Arne Vestbø.
531
532         Ensure symbols from the qt resource system are referenced
533         from outside the static webcore library. One way of doing that is
534         to initialize the resources right away, as explained in the documentation
535         of th Qt resource system.
536
537         * WebProcess/WebPage/qt/WebPageQt.cpp:
538         (initResources):
539         (WebKit::WebPage::platformInitialize):
540
541 2011-11-03  Anders Carlsson  <andersca@apple.com>
542
543         Add NetscapePlugin::convertFromRootView
544         https://bugs.webkit.org/show_bug.cgi?id=71526
545
546         Reviewed by Sam Weinig.
547
548         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
549         (WebKit::NetscapePlugin::convertFromRootView):
550         New function that converts a point from root view coordinates to plug-in coordinates.
551         Returns false if the conversion can't be done.
552
553         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
554         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
555         (WebKit::fillInCocoaEventFromMouseEvent):
556         (WebKit::initializeMouseEvent):
557         (WebKit::NetscapePlugin::platformHandleMouseEvent):
558         (WebKit::NetscapePlugin::platformHandleWheelEvent):
559         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
560         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
561         Use convertFromRootView instead of subtracting m_frameRectInWindowCoordinates.location() from the
562         event position (which is in root view coordinates).
563
564 2011-11-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
565
566         [Qt] Refactor and clean up the qmake build system
567
568         The qmake build system has accumulated a bit of cruft and redundancy
569         over time. There's also a fairly tight coupling between how to build
570         the various targets, and _what_ to build, making it harder to add new
571         rules or sources. This patch aims to elevate these issues somewhat.
572
573         This is a short-list of the changes:
574
575           * The rules for how to build targets are now mostly contained as
576             prf-files in Tools/qmake/mkspecs/features. Using mkspecs also
577             allows us to do pre- and post-processing of each project file,
578             which helps to clean up the actual project files.
579
580           * Derived sources are no longer generated as a separate make-step
581             but is part of each target's project file as a subdir. Makefile
582             rules are used to ensure that we run make on the derived sources
583             before running qmake on the actual target makefile. This makes
584             it easier to keep a proper dependency between derived sources
585             and the target.
586
587           * We use GNU make and the compiler to generate dependencies on
588             UNIX-based systems running Qt 5. This allows us to lessen the
589             need to run qmake, which should reduce compile time.
590
591           * WebKit2 is now build by default if building with Qt 5. It can
592             be disabled by passing --no-webkit2 to build-webkit.
593
594         The result of these changes are hopefully a cleaner and easier
595         build system to modify, and faster build times due to no longer
596         running qmake on every single build. It's also a first step
597         towards possibly generating the list of sources using another
598         build system.
599
600         https://bugs.webkit.org/show_bug.cgi?id=71222
601
602         Reviewed by Simon Hausmann.
603
604         * DerivedSources.pri: Renamed from Source/WebKit2/DerivedSources.pro.
605         * Target.pri: Copied from Source/WebKit2/WebKit2.pro.
606         * UIProcess/API/qt/tests/tests.pri:
607         * UIProcess/API/qt/tests/tests.pro: Removed.
608         * WebKit2.pri:
609         * WebKit2.pro:
610         * WebKit2API.pri: Removed.
611         * WebProcess.pro:
612
613 2011-11-04  Kenneth Rohde Christiansen  <kenneth@webkit.org>
614
615         [Qt] Support programmatic scrolling with the QTouchWebView
616
617         Reviewed by Simon Hausmann.
618
619         As more code can be shared between the programmatic scrolling and the
620         method for ensuring that the contents are within valid bounds, this
621         patch includes a bit of refactoring as well.
622
623         * UIProcess/API/qt/qdesktopwebview_p.h:
624         (QDesktopWebViewPrivate::scrollPositionRequested):
625         * UIProcess/API/qt/qtouchwebview.cpp:
626         (QTouchWebViewPrivate::scrollPositionRequested):
627         * UIProcess/API/qt/qtouchwebview_p.h:
628         * UIProcess/qt/QtTouchViewInterface.cpp:
629         (WebKit::QtTouchViewInterface::scrollPositionRequested):
630         * UIProcess/qt/QtTouchViewInterface.h:
631         * UIProcess/qt/QtViewInterface.h:
632         * UIProcess/qt/QtViewportInteractionEngine.cpp:
633         (WebKit::QtViewportInteractionEngine::event):
634         (WebKit::boundPosition):
635         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
636         (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
637         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
638         (WebKit::QtViewportInteractionEngine::setConstraints):
639         (WebKit::QtViewportInteractionEngine::pinchGestureEnded):
640         (WebKit::QtViewportInteractionEngine::contentViewportChanged):
641         * UIProcess/qt/QtViewportInteractionEngine.h:
642         * UIProcess/qt/QtWebPageProxy.cpp:
643         (QtWebPageProxy::pageDidRequestScroll):
644         * UIProcess/qt/QtWebPageProxy.h:
645
646 2011-11-03  Mark Hahnenberg  <mhahnenberg@apple.com>
647
648         De-virtualize JSObject::getPropertyNames
649         https://bugs.webkit.org/show_bug.cgi?id=71306
650
651         Reviewed by Darin Adler.
652
653         Added getPropertyNames to the MethodTable, changed all the virtual 
654         implementations of getPropertyNames to static ones, and replaced 
655         all call sites with corresponding lookups in the MethodTable.
656
657         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
658         (WebKit::NPJSObject::enumerate):
659
660 2011-11-03  Anders Carlsson  <andersca@apple.com>
661
662         Get rid of NetscapePlugin::m_clipRectInWindowCoordinates
663         https://bugs.webkit.org/show_bug.cgi?id=71521
664
665         Reviewed by Dan Bernstein.
666
667         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
668         (WebKit::NetscapePlugin::geometryDidChange):
669         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
670
671 2011-11-03  Anders Carlsson  <andersca@apple.com>
672
673         Use convertToRootView(IntPoint()) instead of m_frameRectInWindowCoordinates.location() where possible
674         https://bugs.webkit.org/show_bug.cgi?id=71520
675
676         Reviewed by Dan Bernstein.
677
678         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
679         (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate):
680         (WebKit::NetscapePlugin::platformPaint):
681         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
682         (WebKit::NetscapePlugin::platformHandleMouseEvent):
683         (WebKit::NetscapePlugin::platformHandleWheelEvent):
684         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
685         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
686
687 2011-11-03  Anders Carlsson  <andersca@apple.com>
688
689         Add NetscapePlugin::convertToRootView
690         https://bugs.webkit.org/show_bug.cgi?id=71519
691
692         Reviewed by Darin Adler.
693
694         Yet another step towards eliminating uses of m_frameRectInWindowCoordinates.
695
696         Also, use the "root view" terminology, since that's really what we mean here.
697
698         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
699         (WebKit::NetscapePlugin::callSetWindow):
700         Use convertToRootView to get the plug-in location and clip rect in root view coordinates.
701
702         (WebKit::NetscapePlugin::convertToRootView):
703         Apply the m_pluginToRootViewTransform.mapPoint transform.
704
705         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
706         Add convertToRootView.
707
708 2011-11-03  Anders Carlsson  <andersca@apple.com>
709
710         Move plug-in size and backing store checks to PluginProxy::updateBackingStore
711         https://bugs.webkit.org/show_bug.cgi?id=71508
712
713         Reviewed by Darin Adler.
714
715         * WebProcess/Plugins/PluginProxy.cpp:
716         (WebKit::PluginProxy::geometryDidChange):
717         Remove code to send back an empty backing store if the plug-in size is empty
718         or doesn't need a backing store. This check is now done...
719
720         (WebKit::PluginProxy::updateBackingStore):
721         ...here.
722
723 2011-11-03  Anders Carlsson  <andersca@apple.com>
724
725         Get rid of PluginControllerProxy::m_frameRectInWindowCoordinates
726         https://bugs.webkit.org/show_bug.cgi?id=71506
727
728         Reviewed by Darin Adler.
729
730         * PluginProcess/PluginControllerProxy.cpp:
731         (WebKit::PluginControllerProxy::geometryDidChange):
732         This no longer needs to take the frame rect in window coordinates.
733
734         * PluginProcess/PluginControllerProxy.h:
735         * PluginProcess/PluginControllerProxy.messages.in:
736         Remove frameRectInWindowCoordinates from the GeometryDidChange message.
737
738         * WebProcess/Plugins/PluginProxy.cpp:
739         (WebKit::PluginProxy::geometryDidChange):
740         Don't pass frameRectInWindowCoordinates when sending GeometryDidChange.
741
742 2011-11-03  Anders Carlsson  <andersca@apple.com>
743
744         Get rid of Plugin::wantsWindowRelativeCoordinates()
745         https://bugs.webkit.org/show_bug.cgi?id=71504
746
747         Reviewed by Darin Adler.
748
749         Since all Plugin subclasses now return false for wantsWindowRelativeCoordinates,
750         we can go ahead and remove it.
751
752         * PluginProcess/PluginControllerProxy.cpp:
753         (WebKit::PluginControllerProxy::paint):
754         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
755         (WebKit::NetscapePlugin::snapshot):
756         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
757         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
758         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
759         * WebProcess/Plugins/Plugin.h:
760         * WebProcess/Plugins/PluginProxy.cpp:
761         * WebProcess/Plugins/PluginProxy.h:
762         * WebProcess/Plugins/PluginView.cpp:
763         (WebKit::PluginView::paint):
764
765 2011-11-03  Anders Carlsson  <andersca@apple.com>
766
767         NetscapePlugin::wantsWindowRelativeCoordinates should return false for all ports
768         https://bugs.webkit.org/show_bug.cgi?id=71501
769
770         Reviewed by Darin Adler.
771
772         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
773         (WebKit::NetscapePlugin::wantsWindowRelativeCoordinates):
774         Return false.
775
776         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
777         (WebKit::NetscapePlugin::platformGeometryDidChange):
778         Use m_pluginSize instead of m_frameRectInWindowCoordinates.size().
779
780         (WebKit::NetscapePlugin::platformPaint):
781         No need to translate back and forth between window and plug-in relative coordinates anymore.
782
783 2011-11-03  Darin Adler  <darin@apple.com>
784
785         Change remaining callers of releaseRef to call leakRef
786         https://bugs.webkit.org/show_bug.cgi?id=71422
787
788         Reviewed by Darin Fisher.
789
790         * Platform/mac/ModuleMac.mm:
791         (WebKit::Module::load):
792         * Shared/API/c/WKArray.cpp:
793         (WKArrayCreate):
794         * Shared/API/c/WKData.cpp:
795         (WKDataCreate):
796         * Shared/API/c/WKDictionary.cpp:
797         (WKDictionaryCopyKeys):
798         * Shared/API/c/WKGeometry.cpp:
799         (WKPointCreate):
800         (WKSizeCreate):
801         (WKRectCreate):
802         * Shared/API/c/WKMutableArray.cpp:
803         (WKMutableArrayCreate):
804         * Shared/API/c/WKMutableDictionary.cpp:
805         (WKMutableDictionaryCreate):
806         * Shared/API/c/WKNumber.cpp:
807         (WKBooleanCreate):
808         (WKDoubleCreate):
809         (WKUInt64Create):
810         * Shared/API/c/WKSharedAPICast.h:
811         (WebKit::toCopiedAPI):
812         (WebKit::toCopiedURLAPI):
813         * Shared/API/c/cf/WKErrorCF.cpp:
814         (WKErrorCreateWithCFError):
815         * Shared/API/c/cf/WKURLRequestCF.cpp:
816         (WKURLRequestCreateWithCFURLRequest):
817         * Shared/API/c/cf/WKURLResponseCF.cpp:
818         (WKURLResponseCreateWithCFURLResponse):
819         * Shared/API/c/mac/WKURLRequestNS.mm:
820         (WKURLRequestCreateWithNSURLRequest):
821         * Shared/API/c/mac/WKURLResponseNS.mm:
822         (WKURLResponseCreateWithNSURLResponse):
823         * Shared/cf/ArgumentCodersCF.cpp:
824         (CoreIPC::decode):
825         * UIProcess/API/C/WKBackForwardList.cpp:
826         (WKBackForwardListCopyBackListWithLimit):
827         (WKBackForwardListCopyForwardListWithLimit):
828         * UIProcess/API/C/WKContext.cpp:
829         (WKContextCreate):
830         (WKContextCreateWithInjectedBundlePath):
831         * UIProcess/API/C/WKCredential.cpp:
832         (WKCredentialCreate):
833         (WKCredentialCreateWithCertificateInfo):
834         * UIProcess/API/C/WKDatabaseManager.cpp:
835         (WKDatabaseManagerGetOriginKey):
836         (WKDatabaseManagerGetOriginQuotaKey):
837         (WKDatabaseManagerGetOriginUsageKey):
838         (WKDatabaseManagerGetDatabaseDetailsKey):
839         (WKDatabaseManagerGetDatabaseDetailsNameKey):
840         (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
841         (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
842         (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
843         * UIProcess/API/C/WKFrame.cpp:
844         (WKFrameCopyChildFrames):
845         * UIProcess/API/C/WKGeolocationPosition.cpp:
846         (WKGeolocationPositionCreate):
847         * UIProcess/API/C/WKGrammarDetail.cpp:
848         (WKGrammarDetailCreate):
849         * UIProcess/API/C/WKPage.cpp:
850         (WKPageGetSessionHistoryURLValueType):
851         (WKPageCopySessionState):
852         * UIProcess/API/C/WKPreferences.cpp:
853         (WKPreferencesCreateWithIdentifier):
854         * UIProcess/API/C/win/WKView.cpp:
855         (WKViewCreate):
856         * UIProcess/win/WebUndoClient.cpp:
857         (WebKit::WebUndoClient::registerEditCommand):
858         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
859         (WKBundleFrameCopyChildFrames):
860         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
861         (WKBundleNodeHandleCreate):
862         (WKBundleNodeHandleCopyDocument):
863         (WKBundleNodeHandleCopyHTMLTableCellElementCellAbove):
864         (WKBundleNodeHandleCopyDocumentFrame):
865         (WKBundleNodeHandleCopyHTMLFrameElementContentFrame):
866         (WKBundleNodeHandleCopyHTMLIFrameElementContentFrame):
867         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
868         (WKBundlePageCopyTrackedRepaintRects):
869         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
870         (WKBundleScriptWorldCreateWorld):
871         Use leakRef.
872
873 2011-11-02  Darin Adler  <darin@apple.com>
874
875         Change remaining callers of releaseRef to call leakRef
876         https://bugs.webkit.org/show_bug.cgi?id=71422
877
878         Reviewed by Darin Fisher.
879
880         * Platform/mac/ModuleMac.mm:
881         (WebKit::Module::load): Use leakRef.
882         (WebKit::Module::unload): Use leakRef, and cast to void
883         to avoid unused return value warning.
884
885         * Shared/API/c/WKArray.cpp:
886         (WKArrayCreate):
887         * Shared/API/c/WKData.cpp:
888         (WKDataCreate):
889         * Shared/API/c/WKDictionary.cpp:
890         (WKDictionaryCopyKeys):
891         * Shared/API/c/WKGeometry.cpp:
892         (WKPointCreate):
893         (WKSizeCreate):
894         (WKRectCreate):
895         * Shared/API/c/WKMutableArray.cpp:
896         (WKMutableArrayCreate):
897         * Shared/API/c/WKMutableDictionary.cpp:
898         (WKMutableDictionaryCreate):
899         * Shared/API/c/WKNumber.cpp:
900         (WKBooleanCreate):
901         (WKDoubleCreate):
902         (WKUInt64Create):
903         * Shared/API/c/WKSharedAPICast.h:
904         (WebKit::toCopiedAPI):
905         (WebKit::toCopiedURLAPI):
906         * Shared/API/c/cf/WKErrorCF.cpp:
907         (WKErrorCreateWithCFError):
908         * Shared/API/c/cf/WKURLRequestCF.cpp:
909         (WKURLRequestCreateWithCFURLRequest):
910         * Shared/API/c/cf/WKURLResponseCF.cpp:
911         (WKURLResponseCreateWithCFURLResponse):
912         * Shared/API/c/mac/WKURLRequestNS.mm:
913         (WKURLRequestCreateWithNSURLRequest):
914         * Shared/API/c/mac/WKURLResponseNS.mm:
915         (WKURLResponseCreateWithNSURLResponse):
916         * Shared/cf/ArgumentCodersCF.cpp:
917         (CoreIPC::decode):
918         * UIProcess/API/C/WKBackForwardList.cpp:
919         (WKBackForwardListCopyBackListWithLimit):
920         (WKBackForwardListCopyForwardListWithLimit):
921         * UIProcess/API/C/WKContext.cpp:
922         (WKContextCreate):
923         (WKContextCreateWithInjectedBundlePath):
924         * UIProcess/API/C/WKCredential.cpp:
925         (WKCredentialCreate):
926         (WKCredentialCreateWithCertificateInfo):
927         * UIProcess/API/C/WKDatabaseManager.cpp:
928         (WKDatabaseManagerGetOriginKey):
929         (WKDatabaseManagerGetOriginQuotaKey):
930         (WKDatabaseManagerGetOriginUsageKey):
931         (WKDatabaseManagerGetDatabaseDetailsKey):
932         (WKDatabaseManagerGetDatabaseDetailsNameKey):
933         (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
934         (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
935         (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
936         * UIProcess/API/C/WKFrame.cpp:
937         (WKFrameCopyChildFrames):
938         * UIProcess/API/C/WKGeolocationPosition.cpp:
939         (WKGeolocationPositionCreate):
940         * UIProcess/API/C/WKGrammarDetail.cpp:
941         (WKGrammarDetailCreate):
942         * UIProcess/API/C/WKPage.cpp:
943         (WKPageGetSessionHistoryURLValueType):
944         (WKPageCopySessionState):
945         * UIProcess/API/C/WKPreferences.cpp:
946         (WKPreferencesCreateWithIdentifier):
947         * UIProcess/API/C/win/WKView.cpp:
948         (WKViewCreate):
949         * UIProcess/win/WebUndoClient.cpp:
950         (WebKit::WebUndoClient::registerEditCommand):
951         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
952         (WKBundleFrameCopyChildFrames):
953         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
954         (WKBundleNodeHandleCreate):
955         (WKBundleNodeHandleCopyDocument):
956         (WKBundleNodeHandleCopyHTMLTableCellElementCellAbove):
957         (WKBundleNodeHandleCopyDocumentFrame):
958         (WKBundleNodeHandleCopyHTMLFrameElementContentFrame):
959         (WKBundleNodeHandleCopyHTMLIFrameElementContentFrame):
960         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
961         (WKBundlePageCopyTrackedRepaintRects):
962         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
963         (WKBundleScriptWorldCreateWorld):
964         Use leakRef.
965
966 2011-11-03  Anders Carlsson  <andersca@apple.com>
967
968         NetscapePlugin should use plug-in relative coordinates on Mac
969         https://bugs.webkit.org/show_bug.cgi?id=71486
970
971         Reviewed by Adam Roben.
972
973         * PluginProcess/PluginControllerProxy.cpp:
974         (WebKit::PluginControllerProxy::paint):
975         Don't translate the graphics context when the plug-in doesn't want window relative coordinates.
976         This also fixed a bug I introduced in my previous commit where we'd always pass the dirty rect in
977         plug-in coordinates even if the plug-in wants window relative coordinates.
978
979         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
980         (WebKit::NetscapePlugin::snapshot):
981         Don't do the whole translate dance if the plug-in doesn't want window relative coordinates.
982
983         (WebKit::NetscapePlugin::wantsWindowRelativeCoordinates):
984         Return false for PLATFORM_ARCHITECTURE(MAC).
985
986         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
987         (WebKit::NetscapePlugin::platformPaint):
988         Simplify code now that we know that the we're always given plug-in relative coordinates.
989
990 2011-11-03  Anders Carlsson  <andersca@apple.com>
991
992         PluginControllerProxy's dirty rect should be in plug-in coordinates
993         https://bugs.webkit.org/show_bug.cgi?id=71481
994
995         Reviewed by Sam Weinig.
996
997         * PluginProcess/PluginControllerProxy.cpp:
998         (WebKit::PluginControllerProxy::paint):
999         Convert the dirty rect to window coordinates before passing it to the plug-in.
1000
1001         (WebKit::PluginControllerProxy::invalidate):
1002         No need to convert the dirty rect to window coordinates.
1003
1004         (WebKit::PluginControllerProxy::paintEntirePlugin):
1005         Use m_pluginSize instead of m_frameRectInWindowCoordinates.isEmpty.
1006
1007 2011-11-03  Anders Carlsson  <andersca@apple.com>
1008
1009         Use the right function to determine whether NPWindow coordinates should be window relative
1010         https://bugs.webkit.org/show_bug.cgi?id=71480
1011
1012         Reviewed by Adam Roben.
1013
1014         We want to use wantsWindowRelativeNPWindowCoordinates here, and not wantsWindowRelativeCoordinates
1015         which is a temporary function that will be removed (and that returns the wrong value!)
1016
1017         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1018         (WebKit::NetscapePlugin::geometryDidChange):
1019
1020 2011-11-03  Simon Hausmann  <simon.hausmann@nokia.com>
1021
1022         Unreviewed build fix after r99195.
1023
1024         The right name is restrictMinimumScaleFactorToViewportSize.
1025
1026         * UIProcess/API/qt/qtouchwebview.cpp:
1027         (QTouchWebViewPrivate::updateViewportConstraints):
1028
1029 2011-11-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1030
1031         [GTK] Use WEBKIT_API instead of WK_EXPORT in WebKitEnumTypes.h
1032         https://bugs.webkit.org/show_bug.cgi?id=71457
1033
1034         Reviewed by Martin Robinson.
1035
1036         * GNUmakefile.am:
1037
1038 2011-11-03  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1039
1040         [Qt] Bounce back limits are wrong in some situations
1041         https://bugs.webkit.org/show_bug.cgi?id=71471
1042
1043         Reviewed by Simon Hausmann.
1044
1045         The valid position points were in viewport coordinates, but we were
1046         requiring valid position points in content coordinates.
1047
1048         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1049         (WebKit::QtViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
1050
1051 2011-11-03  Fady Samuel  <fsamuel@chromium.org>
1052
1053         Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
1054         https://bugs.webkit.org/show_bug.cgi?id=70609
1055
1056         Reviewed by Kenneth Rohde Christiansen.
1057
1058         * UIProcess/API/qt/qtouchwebview.cpp:
1059         (QTouchWebViewPrivate::updateViewportConstraints):
1060         * WebProcess/WebPage/WebPage.cpp:
1061         (WebKit::WebPage::viewportConfigurationAsText):
1062
1063 2011-11-03  Andras Becsi  <andras.becsi@nokia.com>
1064
1065         [Qt][WK2] Fix the signal signature of the loadFailed API test.
1066
1067         Rubber-stamped by Simon Hausmann.
1068
1069         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
1070         (WebViewAbstraction::touchViewLoadFailed):
1071         (WebViewAbstraction::desktopViewLoadFailed):
1072
1073 2011-11-03  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1074
1075         [Qt] Fix an assertion under WebPage::setViewportSize.
1076         https://bugs.webkit.org/show_bug.cgi?id=71473
1077
1078         Reviewed by Simon Hausmann.
1079
1080         The web view can have an empty size and it causes the assert in computeViewportAttributes.
1081         Don't notify the web page of such a size change in this case.
1082
1083         * UIProcess/API/qt/qtouchwebview.cpp:
1084         (QTouchWebViewPrivate::updateViewportSize):
1085
1086 2011-11-03  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
1087
1088         [WK2] State variable name refactor in WebPageProxy.cpp
1089         https://bugs.webkit.org/show_bug.cgi?id=71467
1090
1091         Reviewed by Andreas Kling.
1092
1093         Renaming m_inDecidePolicyForMIMEType to m_inDecidePolicyForResponse after
1094         https://bugs.webkit.org/show_bug.cgi?id=55827 .
1095
1096         * UIProcess/WebPageProxy.cpp:
1097         (WebKit::WebPageProxy::WebPageProxy):
1098         (WebKit::WebPageProxy::receivedPolicyDecision):
1099         (WebKit::WebPageProxy::decidePolicyForResponse):
1100         * UIProcess/WebPageProxy.h:
1101
1102 2011-11-03  Nayan Kumar K  <nayankk@motorola.com>
1103
1104         [GTK][WEBKIT2] Add support for title property in WebKitWebView.
1105         https://bugs.webkit.org/show_bug.cgi?id=68074
1106
1107         Reviewed by Philippe Normand.
1108
1109         Support for 'title' property is added in WebKitWebView.
1110         Functions to get the value of this property is provided.
1111
1112         * UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
1113         (didReceiveTitleForFrame): LoaderClient titleRecieve callback.
1114         (webkitWebLoaderClientAttachLoaderClientToPage): Register didReceiveTitleForFrame callback.
1115         * UIProcess/API/gtk/WebKitWebView.cpp:
1116         (webkitWebViewGetProperty): 'title' property get function.
1117         (webkit_web_view_class_init): Register new property.
1118         (webkitWebViewSetTitle): Notify WebKitWebView about title receive.
1119         (webkit_web_view_get_title): API to get main frame title.
1120         * UIProcess/API/gtk/WebKitWebView.h: webkit_web_view_get_title API expose.
1121         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Added private API.
1122         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
1123         (testWebViewTitle): Test webkit_web_view_get_title API.
1124         (beforeAll): Add testWebViewTitle test.
1125
1126 2011-11-03  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
1127
1128         [Qt][WK2] Download support and API in UIProcess
1129         https://bugs.webkit.org/show_bug.cgi?id=68962
1130
1131         Reviewed by Simon Hausmann.
1132
1133         We implement our WkContextDownloadClient and the needed callbacks.
1134         We also add APIs by exposing QWebDownloadItem. Objects from this type
1135         have their ownership handled by QDesktopWebView and will be created or
1136         destroyed as needed. Classes implementing ViewInterface (QDesktopWebViewPrivate
1137         and TouchViewInterface) will receive a signal (downloadRequested) with a pointer
1138         to the recently created QWebDownloadItem. With that they can connect the proper
1139         signals and slots, set the download destination path and then call start().
1140         Objects of this type will provide the progress of a download, a slot to cancel it,
1141         and signals for getting finished or failure status.
1142         QWebDownloadItem was also exposed in QML.
1143         Qt needed an asynchronous way for UIProcess to return a destination path to WebProcess,
1144         therefore the startTransfer API was added to WebKit2's Download handlers.
1145
1146         * Shared/qt/WebCoreArgumentCodersQt.cpp:
1147         (CoreIPC::::encode):
1148         (CoreIPC::::decode):
1149         Add encoding and decoding of suggestedFilename for ResourceResponse.
1150
1151         * UIProcess/API/qt/WKView.h:
1152         * UIProcess/API/qt/qbasewebview.h: Add signal downloadRequested.
1153         * UIProcess/API/qt/qdesktopwebview.cpp:
1154         (QDesktopWebViewPrivate::downloadRequested):
1155         * UIProcess/API/qt/qdesktopwebview_p.h:
1156
1157         * UIProcess/API/qt/qwebdownloaditem.cpp: Added.
1158         (QWebDownloadItemPrivate::QWebDownloadItemPrivate):
1159         (QWebDownloadItem::QWebDownloadItem):
1160         (QWebDownloadItem::~QWebDownloadItem):
1161         (QWebDownloadItem::url):
1162         (QWebDownloadItem::destinationPath):
1163         (QWebDownloadItem::setDestinationPath):
1164         (QWebDownloadItem::suggestedFilename):
1165         (QWebDownloadItem::mimeType):
1166         (QWebDownloadItem::expectedContentLength):
1167         (QWebDownloadItem::totalBytesReceived):
1168         (QWebDownloadItem::cancel):
1169         (QWebDownloadItem::start):
1170         * UIProcess/API/qt/qwebdownloaditem.h: Added.
1171         * UIProcess/API/qt/qwebdownloaditem_p.h: Added.
1172         (QWebDownloadItemPrivate::didReceiveResponse):
1173
1174         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_download.qml: Added.
1175         * UIProcess/API/qt/tests/qmltests/common/download.html: Added.
1176         * UIProcess/API/qt/tests/qmltests/common/download.zip: Added.
1177         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
1178
1179         * UIProcess/Downloads/DownloadProxy.cpp:
1180         (WebKit::DownloadProxy::startTransfer): Qt only function added.
1181         * UIProcess/Downloads/DownloadProxy.h:
1182
1183         * UIProcess/PageClient.h: Added Qt specific function to call handleDownloadRequest from QtWebPageProxy.
1184
1185         * UIProcess/WebContext.cpp:
1186         (WebKit::WebContext::download):
1187         Using WebPageProxy::handleDownloadRequest to bootstrap a download through PageClient.
1188
1189         * UIProcess/WebPageProxy.cpp:
1190         (WebKit::WebPageProxy::receivedPolicyDecision):
1191         Using handleDownloadRequest() to bootstrap a download through PageClient.
1192         (WebKit::WebPageProxy::handleDownloadRequest): Calls PageClient::handleDownloadRequest().
1193         * UIProcess/WebPageProxy.h:
1194
1195         * UIProcess/qt/QtDownloadManager.cpp: Added.
1196         (WebKit::toQtDownloadManager):
1197         (WebKit::qt_wk_didReceiveResponse):
1198         (WebKit::qt_wk_didCreateDestination):
1199         (WebKit::qt_wk_didFinishDownload):
1200         (WebKit::qt_wk_didFailDownload):
1201         (WebKit::qt_wk_didReceiveDataForDownload):
1202         (QtDownloadManager::downloadReceivedResponse): Will reach QtWebPageProxy::didReceiveDownloadResponse.
1203         (QtDownloadManager::downloadCreatedDestination):
1204         (QtDownloadManager::downloadFinished):
1205         (QtDownloadManager::downloadFailed):
1206         (QtDownloadManager::downloadDataReceived):
1207         * UIProcess/qt/QtDownloadManager.h: Added.
1208         Bootstrap our WKContextDownloadClient and set its callbacks.
1209         This entity will also handle all downloads and keep a map of them.
1210         It will be kept alive together with the WebContext as a static member
1211         of QtWebPageProxy, so we can keep it across several WebPages and, therefore,
1212         WebViews.
1213
1214         * UIProcess/qt/QtWebPageProxy.cpp:
1215         (QtWebPageProxy::defaultWKContext):
1216         (QtWebPageProxy::~QtWebPageProxy):
1217         (QtWebPageProxy::handleDownloadRequest):
1218         (QtWebPageProxy::didReceiveDownloadResponse):
1219         * UIProcess/qt/QtWebPageProxy.h:
1220         From now on it will keep a static QtDownloadManager to live together
1221         with the default WebContext. It implements PageClient::handleDownloadRequest.
1222         QtWebPageProxy::didReceiveDownloadResponse will emit the view's signal downloadRequested.
1223
1224        * UIProcess/qt/QtTouchViewInterface.h:
1225         (WebKit::QtTouchViewInterface::downloadRequested):
1226         * UIProcess/qt/QtViewInterface.h:
1227
1228         * UIProcess/qt/qweberror.cpp:
1229         (QWebError::description):
1230         * UIProcess/qt/qweberror.h:
1231         (QWebError::errorCodeAsDownloadError):
1232         Add Download error handling to QWebError and a new API
1233         to retrieve the error description from the original ResourceError.
1234         Also, it now has QWebDownloadItem::DownloadError errorCodeAsDownloadError()
1235         that returns the error code as a DownloadError.
1236
1237         * WebKit2.pro:
1238         * WebKit2API.pri:
1239
1240         * WebProcess/Downloads/Download.h:
1241         * WebProcess/Downloads/DownloadManager.cpp:
1242         (WebKit::DownloadManager::startTransfer):
1243         * WebProcess/Downloads/DownloadManager.h:
1244         Adding Qt specific startTransfer function.
1245
1246         * WebProcess/Downloads/qt/DownloadQt.cpp:
1247         (WebKit::Download::start):
1248         (WebKit::Download::startWithHandle):
1249         (WebKit::Download::didDecideDestination):
1250         (WebKit::Download::startTransfer):
1251         * WebProcess/Downloads/qt/QtFileDownloader.cpp:
1252         (WebKit::QtFileDownloader::init): start() was renamed to init().
1253         (WebKit::QtFileDownloader::determineFilename):
1254         Calling onReadyRead() here was unnecessary and it was triggering the overall
1255         download process even before DownloadManager finished startDownload(). This
1256         was leading to a DownloadManager with an empty list of downloads.
1257         (WebKit::QtFileDownloader::startTransfer): decidedDestination() became startTransfer().
1258         (WebKit::QtFileDownloader::abortDownloadWritingAndEmitError):
1259         (WebKit::QtFileDownloader::handleDownloadResponse):
1260         (WebKit::QtFileDownloader::onReadyRead):
1261         (WebKit::QtFileDownloader::onFinished):
1262         (WebKit::QtFileDownloader::cancel):
1263         * WebProcess/Downloads/qt/QtFileDownloader.h:
1264
1265         * WebProcess/WebProcess.cpp:
1266         (WebKit::WebProcess::startTransfer):
1267         * WebProcess/WebProcess.h:
1268         * WebProcess/WebProcess.messages.in:
1269         Adding Qt specific message StartTransfer and handling function.
1270
1271 2011-11-03  Nayan Kumar K  <nayankk@motorola.com>
1272
1273         Add webkit_web_view_load_html and webkit_web_view_load_plain_text APIs.
1274         https://bugs.webkit.org/show_bug.cgi?id=69249
1275
1276         Reviewed by Philippe Normand.
1277
1278         This patch adds support for 2 more load APIs, namely
1279         webkit_web_view_load_html and webkit_web_view_load_plain_text.
1280
1281         * UIProcess/API/gtk/WebKitWebView.cpp:
1282         (webkit_web_view_load_html): New API to load html string.
1283         (webkit_web_view_load_plain_text): New API to load plain text.
1284         * UIProcess/API/gtk/WebKitWebView.h: Public API addition.
1285         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
1286         (testLoadHtml): Test webkit_web_view_load_html API.
1287         (testLoadPlainText): Test webkit_web_view_load_plain_text API.
1288         (beforeAll): Add new tests.
1289         * UIProcess/API/gtk/tests/WebViewTest.cpp:
1290         (WebViewTest::loadHtml): Test webkit_web_view_load_html API.
1291         (WebViewTest::loadPlainText): Test webkit_web_view_load_plain_text API.
1292         * UIProcess/API/gtk/tests/WebViewTest.h:
1293
1294 2011-11-03  Simon Hausmann  <simon.hausmann@nokia.com>
1295
1296         [Qt][WK2] Failing assertion with desktop webview when touch mocking in MinBrowser
1297         https://bugs.webkit.org/show_bug.cgi?id=71452
1298
1299         Reviewed by Andreas Kling.
1300
1301         Don't re-implement touchEvent(), we don't intend to support touch events as we
1302         receive them from the QQuickCanvas at this point.
1303
1304         * UIProcess/API/qt/qdesktopwebview.cpp:
1305         * UIProcess/API/qt/qdesktopwebview.h:
1306
1307 2011-11-03  Simon Hausmann  <simon.hausmann@nokia.com>
1308
1309         [Qt] [WK2] MiniBrowser assert in QtWebProccess on startup in debug build.
1310         https://bugs.webkit.org/show_bug.cgi?id=71196
1311
1312         Reviewed by Kenneth Rohde Christiansen.
1313
1314         Ensure AC is turned off for the desktop view before we launch the process.
1315         This avoids "accidential" enterAc/exitAc calls that cause failing assertions
1316         because we don't really support AC in this setup.
1317
1318         The touch side works the same way, i.e. enable the preference before calling
1319         init().
1320
1321         * UIProcess/qt/QtDesktopWebPageProxy.cpp:
1322         (QtDesktopWebPageProxy::QtDesktopWebPageProxy):
1323
1324 2011-11-03  Balazs Kelemen  <kbalazs@webkit.org>
1325
1326         [Qt] X11 plugins need to be reworked for Qt5
1327         https://bugs.webkit.org/show_bug.cgi?id=70023
1328
1329         Reviewed by Simon Hausmann.
1330
1331         Disable X11 plugins.
1332         * config.h:
1333
1334 2011-11-03  Simon Hausmann  <simon.hausmann@nokia.com>
1335
1336         Unreviewed Qt build fix(es).
1337
1338         * UIProcess/qt/QtDesktopWebPageProxy.cpp:
1339         (QtDesktopWebPageProxy::handleDragMoveEvent): Adapt to dragSession API change.
1340         (QtDesktopWebPageProxy::handleDropEvent): Ditto.
1341         * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
1342         (WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates): Implement here
1343         also, for plugin-disabled builds.
1344
1345 2011-11-03  ChangSeok Oh  <shivamidow@gmail.com>
1346
1347         [GTK] Fix build-break on r99143
1348         https://bugs.webkit.org/show_bug.cgi?id=71440
1349
1350         Reviewed by Philippe Normand.
1351
1352         dragOperation() should be replaced with dragSession().operation since it was removed.
1353         And didDetectXSSForFrame of WKPageLoaderClient should be relocated.
1354
1355         * UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
1356         (webkitWebLoaderClientAttachLoaderClientToPage):
1357         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1358         (webkitWebViewBaseDragDataReceived):
1359         (webkitWebViewBaseDragMotion):
1360
1361 2011-11-03  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
1362
1363         [Qt] Flagging usage of X11 headers under PLAT_ARCH(X11)
1364         https://bugs.webkit.org/show_bug.cgi?id=71409
1365
1366         Reviewed by Simon Hausmann.
1367
1368         Build fix for building qtwebkit with latest qt5 which has removed Qt X11 headers.
1369
1370         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1371
1372 2011-11-03  Philippe Normand  <pnormand@igalia.com>
1373
1374         Unreviewed, GTK build fix after r99093...
1375
1376         * PluginProcess/PluginControllerProxy.h:
1377
1378 2011-11-02  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
1379
1380         [Qt] [WK] Debug build broken
1381         https://bugs.webkit.org/show_bug.cgi?id=71417
1382
1383         Add WKNumber.h for WKBooleanGetTypeID
1384         Replace WKGetTypeId with WKGetTypeID
1385         Add initialization for didDetectXSSForFrame member in WKBundlePageLoaderClient
1386         instance.
1387
1388         Reviewed by Noam Rosenthal.
1389
1390         * WebProcess/qt/QtBuiltinBundle.cpp:
1391         (WebKit::QtBuiltinBundle::handleSetNavigatorQtObjectEnabled):
1392         * WebProcess/qt/QtBuiltinBundlePage.cpp:
1393         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
1394
1395 2011-11-02  Mark Hahnenberg  <mhahnenberg@apple.com>
1396
1397         De-virtualize JSObject::getOwnPropertyNames
1398         https://bugs.webkit.org/show_bug.cgi?id=71307
1399
1400         Reviewed by Darin Adler.
1401
1402         Added getOwnPropertyNames to the MethodTable, changed all the virtual 
1403         implementations of getOwnPropertyNames to static ones, and replaced 
1404         all call sites with corresponding lookups in the MethodTable.
1405
1406         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1407         (WebKit::JSNPObject::getOwnPropertyNames):
1408         * WebProcess/Plugins/Netscape/JSNPObject.h:
1409
1410 2011-11-02  Anders Carlsson  <andersca@apple.com>
1411
1412         Don't call NPP_SetWindow if the plug-in size or clip rect hasn't changed if the plug-in isn't using window relative coordinates
1413         https://bugs.webkit.org/show_bug.cgi?id=71418
1414
1415         Reviewed by Adam Roben.
1416
1417         This avoids calling into the plug-in when only the plug-in position relative to the window changes.
1418     
1419         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1420         (WebKit::NetscapePlugin::geometryDidChange):
1421
1422 2011-11-02  Jon Lee  <jonlee@apple.com>
1423
1424         Fix syntax error.
1425
1426         * WebProcess/WebPage/WebPage.cpp:
1427         (WebKit::WebPage::performDragControllerAction):
1428
1429 2011-11-02  Jon Lee  <jonlee@apple.com>
1430
1431         Fix build error from r99108.
1432
1433         * WebProcess/WebPage/WebPage.cpp:
1434         (WebKit::WebPage::performDragControllerAction):
1435
1436 2011-11-02  Dean Jackson  <dino@apple.com>
1437
1438         Add ENABLE_CSS_SHADERS flag
1439         https://bugs.webkit.org/show_bug.cgi?id=71394
1440
1441         Reviewed by Sam Weinig.
1442
1443         * Configurations/FeatureDefines.xcconfig:
1444
1445 2011-11-02  Anders Carlsson  <andersca@apple.com>
1446
1447         Allow the various plug-in ports to decide whether NPWindow coordinates should be window-relative
1448         https://bugs.webkit.org/show_bug.cgi?id=71415
1449
1450         Reviewed by Darin Adler.
1451
1452         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1453         (WebKit::NetscapePlugin::callSetWindow):
1454         Remove the PLUGIN_ARCHITECTURE(X11) ifdef and set the NPWindow members
1455         based on the return value of wantsWindowRelativeNPWindowCoordinates.
1456
1457         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1458         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1459         (WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates):
1460         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
1461         (WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates):
1462         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1463         (WebKit::NetscapePlugin::wantsWindowRelativeNPWindowCoordinates):
1464         Add platform specific implementations.
1465
1466 2011-11-02  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
1467
1468         [Qt] [WK] Debug build broken after r99065
1469         https://bugs.webkit.org/show_bug.cgi?id=71397
1470
1471         Remove reference to panGestureActive becuase it is not defined anywhere.
1472
1473         Reviewed by Simon Hausmann.
1474
1475         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1476         (WebKit::QtViewportInteractionEngine::panGestureStarted):
1477
1478 2011-11-02  Jon Lee  <jonlee@apple.com>
1479
1480         Update dragging info on mac when user is dragging files into view
1481         https://bugs.webkit.org/show_bug.cgi?id=71325
1482         <rdar://problem/10379193>
1483
1484         Reviewed by Darin Adler.
1485
1486         * UIProcess/API/mac/WKView.mm:
1487         (-[WKView draggingUpdated:]): Based on the DragSession, we update NSDraggingInfo
1488         to update the badge and dragging formation.
1489
1490 2011-11-02  Jon Lee  <jonlee@apple.com>
1491
1492         Expand DragController to provide more information about the dragging session
1493         https://bugs.webkit.org/show_bug.cgi?id=71324
1494         <rdar://problem/10379175>
1495
1496         Reviewed by Darin Adler.
1497
1498         We now pass the DragSession struct from the Web to the UI process, instead of the
1499         DragOperation enum.
1500
1501         * Scripts/webkit2/messages.py:
1502         * Shared/WebCoreArgumentCoders.cpp:
1503         (CoreIPC::::encode):
1504         (CoreIPC::::decode):
1505         * Shared/WebCoreArgumentCoders.h:
1506         * UIProcess/API/mac/WKView.mm:
1507         (-[WKView draggingUpdated:]):
1508         * UIProcess/WebPageProxy.cpp:
1509         (WebKit::WebPageProxy::WebPageProxy): We now cache the last known DragSession state
1510         (WebKit::WebPageProxy::didPerformDragControllerAction):
1511         * UIProcess/WebPageProxy.h:
1512         (WebKit::WebPageProxy::dragSession):
1513         (WebKit::WebPageProxy::resetDragOperation):
1514         * UIProcess/WebPageProxy.messages.in:
1515         * UIProcess/win/WebView.cpp:
1516         (WebKit::WebView::keyStateToDragOperation):
1517         (WebKit::WebView::DragEnter):
1518         (WebKit::WebView::DragOver):
1519         * WebProcess/WebPage/WebPage.cpp:
1520         (WebKit::WebPage::performDragControllerAction):
1521
1522 2011-11-02  Anders Carlsson  <andersca@apple.com>
1523
1524         Get rid of Plugin::deprecatedGeometryDidChange
1525         https://bugs.webkit.org/show_bug.cgi?id=71411
1526
1527         Reviewed by Sam Weinig.
1528
1529         Now that all Plugin subclasses implement geometryDidChange and do all the work there
1530         we can get rid of deprecatedGeometryDidChange.
1531
1532         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1533         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1534         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
1535         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
1536         * WebProcess/Plugins/Plugin.h:
1537         * WebProcess/Plugins/PluginProxy.cpp:
1538         * WebProcess/Plugins/PluginProxy.h:
1539         * WebProcess/Plugins/PluginView.cpp:
1540         (WebKit::PluginView::viewGeometryDidChange):
1541
1542 2011-11-02  Anders Carlsson  <andersca@apple.com>
1543
1544         Move back functions that were not added.
1545
1546         * UIProcess/API/C/WKPage.h:
1547
1548 2011-11-02  Anders Carlsson  <andersca@apple.com>
1549
1550         Fix build and WebKit2 ABI.
1551
1552         * Shared/APIClientTraits.cpp:
1553         * Shared/APIClientTraits.h:
1554         Add page loader client sizes.
1555
1556         * UIProcess/API/C/WKPage.h:
1557         Move the newly added callback functions in the loader client last and bump the
1558         WKPageLoaderClient version.
1559         
1560 2011-11-02  Anders Carlsson  <andersca@apple.com>
1561
1562         Fix build.
1563
1564         * WebProcess/Plugins/PluginView.h:
1565
1566 2011-11-02  Tom Sepez  <tsepez@chromium.org>
1567
1568         XSSAuditor is silent
1569         https://bugs.webkit.org/show_bug.cgi?id=70973
1570
1571         Reviewed by Adam Barth.
1572
1573         * UIProcess/API/C/WKPage.h:
1574         * UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
1575         (webkitWebLoaderClientAttachLoaderClientToPage):
1576         * UIProcess/WebLoaderClient.cpp:
1577         (WebKit::WebLoaderClient::didDetectXSSForFrame):
1578         * UIProcess/WebLoaderClient.h:
1579         * UIProcess/WebPageProxy.cpp:
1580         (WebKit::WebPageProxy::didDetectXSSForFrame):
1581         * UIProcess/WebPageProxy.h:
1582         * UIProcess/WebPageProxy.messages.in:
1583         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1584         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1585         (WebKit::InjectedBundlePageLoaderClient::didDetectXSSForFrame):
1586         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1587         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1588         (WebKit::WebFrameLoaderClient::didDetectXSS):
1589         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1590
1591 2011-11-02  Anders Carlsson  <andersca@apple.com>
1592
1593         More window relative coordinate usage removal
1594         https://bugs.webkit.org/show_bug.cgi?id=71393
1595
1596         Reviewed by Adam Roben.
1597
1598         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
1599         (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate):
1600         Just use m_clipRect instead of converting m_clipRectInWindowCoordinates to plug-in coordinates.
1601
1602         (WebKit::NetscapePlugin::platformPaint):
1603         Use m_pluginSize instead of m_frameRectInWindowCoordinates.size().
1604
1605         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1606         (WebKit::NetscapePlugin::platformPaint):
1607         Ditto.
1608
1609 2011-11-02  Anders Carlsson  <andersca@apple.com>
1610
1611         Fix non-Mac builds and remove #if PLATFORM(MAC) around all contents scale factor functions.
1612
1613         * PluginProcess/PluginControllerProxy.cpp:
1614         (WebKit::PluginControllerProxy::PluginControllerProxy):
1615         (WebKit::PluginControllerProxy::contentsScaleFactor):
1616         (WebKit::PluginControllerProxy::geometryDidChange):
1617         * PluginProcess/PluginControllerProxy.h:
1618         * PluginProcess/PluginCreationParameters.cpp:
1619         (WebKit::PluginCreationParameters::PluginCreationParameters):
1620         (WebKit::PluginCreationParameters::encode):
1621         (WebKit::PluginCreationParameters::decode):
1622         * PluginProcess/PluginCreationParameters.h:
1623         * PluginProcess/mac/PluginControllerProxyMac.mm:
1624         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1625         (WebKit::NetscapePlugin::contentsScaleFactor):
1626         (WebKit::NetscapePlugin::getAuthenticationInfo):
1627         (WebKit::NetscapePlugin::snapshot):
1628         (WebKit::NetscapePlugin::contentsScaleFactorChanged):
1629         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1630         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1631         * WebProcess/Plugins/Plugin.h:
1632         * WebProcess/Plugins/PluginController.h:
1633         * WebProcess/Plugins/PluginProxy.cpp:
1634         (WebKit::PluginProxy::initialize):
1635         (WebKit::PluginProxy::contentsScaleFactorChanged):
1636         (WebKit::PluginProxy::contentsScaleFactor):
1637         * WebProcess/Plugins/PluginProxy.h:
1638         * WebProcess/Plugins/PluginView.cpp:
1639         (WebKit::PluginView::contentsScaleFactor):
1640
1641 2011-11-02  Anders Carlsson  <andersca@apple.com>
1642
1643         Use m_pluginSize instead of m_frameRectInWindowCoordinates.size() in NetscapePlugin.
1644         https://bugs.webkit.org/show_bug.cgi?id=71390
1645
1646         Reviewed by Adam Roben.
1647
1648         m_pluginSize is always equal to m_frameRectInWindowCoordinates.size() and this moves us one
1649         sall step further towards eliminating m_frameRectInWindowCoordinates.
1650
1651         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1652         (WebKit::NetscapePlugin::invalidate):
1653         (WebKit::NetscapePlugin::snapshot):
1654
1655 2011-11-02  Anders Carlsson  <andersca@apple.com>
1656
1657         Fix non-Mac builds.
1658
1659         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1660         (WebKit::NetscapePlugin::snapshot):
1661
1662 2011-11-02  Anders Carlsson  <andersca@apple.com>
1663
1664         Plug-in snapshots are blurry in HiDPI
1665         https://bugs.webkit.org/show_bug.cgi?id=71387
1666         <rdar://problem/10385393>
1667
1668         Reviewed by Adam Roben.
1669
1670         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1671         (WebKit::NetscapePlugin::snapshot):
1672         Create the backing store in the right size and apply the contents scale factor
1673         to the newly created graphics context.
1674
1675         * WebProcess/Plugins/PluginView.cpp:
1676         (WebKit::PluginView::paint):
1677         Pass the scale factor to ShareableBitmap::paint.
1678
1679 2011-11-02  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1680
1681         [Qt] Implement message exchange between WebView and the web page
1682         https://bugs.webkit.org/show_bug.cgi?id=70545
1683
1684         Reviewed by Noam Rosenthal.
1685
1686         Adds a mechanism for the WebView to send messages to the JavaScript environment
1687         of the web page. In the WebView we have a method postMessage() and a signal
1688         messageReceived(), while in the web page we expose a navigator.qt object with a
1689         postMessage() method and a onmessage property. The messages are objects that
1690         follow the same structure as MessageEvents.
1691
1692         The feature is disabled by default, and can be enabled by setting
1693         QWebPreferences::navigatorQtObjectEnabled property to true. Changes take effect
1694         after the next load(). QML tests are included.
1695
1696         * UIProcess/qt/ClientImpl.h:
1697         * UIProcess/qt/ClientImpl.cpp:
1698         (setupContextInjectedBundleClient): Helper to register the injected bundle client.
1699         (qt_wk_didReceiveMessageFromInjectedBundle): Decode and dispatch a message received
1700         from the WebProcess to the WebPageProxy.
1701
1702         * UIProcess/PageClient.h:
1703         (WebKit::PageClient::didReceiveMessageFromNavigatorQtObject):
1704         * UIProcess/WebPageProxy.cpp:
1705         (WebKit::WebPageProxy::didReceiveMessageFromNavigatorQtObject):
1706         * UIProcess/WebPageProxy.h:
1707         Handle messages received from the navigator.qt object via the injected bundle. Called
1708         from the ClientImpl.
1709
1710         * UIProcess/API/qt/qbasewebview.cpp:
1711         (QBaseWebView::postMessage):
1712         (QBaseWebViewPrivate::setPageProxy):
1713         * UIProcess/API/qt/qbasewebview.h:
1714         * UIProcess/API/qt/qwebpreferences.cpp:
1715         (QWebPreferences::navigatorQtObjectEnabled):
1716         (QWebPreferences::setNavigatorQtObjectEnabled):
1717         * UIProcess/API/qt/qwebpreferences.h:
1718         The signal, slot and the setting to enable the feature.
1719
1720         * UIProcess/qt/QtWebPageProxy.cpp:
1721         (QtWebPageProxy::defaultWKContext): setup the injected bundle client for this the
1722         default context so we can listen to messages from it.
1723
1724         (QtWebPageProxy::QtWebPageProxy):
1725         (QtWebPageProxy::didReceiveMessageFromNavigatorQtObject):
1726         (QtWebPageProxy::setNavigatorQtObjectEnabled):
1727         (QtWebPageProxy::postMessageToNavigatorQtObject):
1728         * UIProcess/qt/QtWebPageProxy.h:
1729         (QtWebPageProxy::navigatorQtObjectEnabled):
1730         Enabling and sending messages to the navigator.qt object are done by sending messages to
1731         the injected bundle, identifying the page that we want to act on.
1732
1733         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_messaging.qml: Added.
1734         * UIProcess/API/qt/tests/qmltests/common/messaging.html: Added.
1735         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
1736         * WebProcess/qt/QtBuiltinBundle.cpp:
1737         (WebKit::QtBuiltinBundle::initialize):
1738         (WebKit::QtBuiltinBundle::didReceiveMessage):
1739         (WebKit::QtBuiltinBundle::handleMessageToNavigatorQtObject):
1740         (WebKit::QtBuiltinBundle::handleSetNavigatorQtObjectEnabled):
1741         * WebProcess/qt/QtBuiltinBundle.h:
1742         * WebProcess/qt/QtBuiltinBundlePage.cpp:
1743         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
1744         (WebKit::QtBuiltinBundlePage::~QtBuiltinBundlePage):
1745         (WebKit::QtBuiltinBundlePage::didClearWindowForFrame):
1746         (WebKit::qt_postMessageCallback):
1747         (WebKit::QtBuiltinBundlePage::postMessageFromNavigatorQtObject):
1748         (WebKit::createWrappedMessage):
1749         (WebKit::QtBuiltinBundlePage::didReceiveMessageToNavigatorQtObject):
1750         (WebKit::QtBuiltinBundlePage::setNavigatorQtObjectEnabled):
1751         (WebKit::QtBuiltinBundlePage::registerNavigatorQtObject):
1752         (WebKit::QtBuiltinBundlePage::navigatorQtObjectClass):
1753         * WebProcess/qt/QtBuiltinBundlePage.h:
1754         (WebKit::QtBuiltinBundlePage::navigatorQtObjectEnabled):
1755
1756 2011-11-02  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1757
1758         [Qt] Fix qmltest API test failures related to r98973.
1759         https://bugs.webkit.org/show_bug.cgi?id=71280
1760
1761         Reviewed by Noam Rosenthal.
1762
1763         Most of the API was moved from TouchWebView.page to TouchWebView directly.
1764         Fixed the qml tests to reflect this change.
1765
1766         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml:
1767         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml:
1768         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml:
1769         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml:
1770         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgressSignal.qml:
1771         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadZeroSizeView.qml:
1772         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml:
1773
1774 2011-11-02  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1775
1776         [Qt] Handle interruption of page interaction better
1777         https://bugs.webkit.org/show_bug.cgi?id=71366
1778
1779         Reviewed by Simon Hausmann.
1780
1781         Touching the screen when a kinetic scrolling animation is running or
1782         it is bouncing back because it was out of bounds, the animation is
1783         immediately stopped and the content is immediately put into valid
1784         bounds.
1785
1786         Touching the screen when the contents is bouncing back from a pinch
1787         zoom which was out of bounds, we do not stop the animation, but
1788         instead ignored the touch events while the animation lasts.
1789
1790         In the future we want to queue the events instead.
1791
1792         This also fixes some issues which was present before: As the bounce
1793         back animation from pinch zoom centers the content using the contents
1794         point which was in the center of the viewport, this animation could
1795         not be used when stopping a pan animation, as it wouldn't position the
1796         content at the place it was when the pan animation was interrupted.
1797
1798         * UIProcess/qt/QtPanGestureRecognizer.cpp:
1799         (WebKit::QtPanGestureRecognizer::recognize):
1800         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
1801         (WebKit::QtPinchGestureRecognizer::recognize):
1802         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1803         (WebKit::QtViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
1804         (WebKit::QtViewportInteractionEngine::reset):
1805         (WebKit::QtViewportInteractionEngine::setConstraints):
1806         (WebKit::QtViewportInteractionEngine::panAnimationActive):
1807         (WebKit::QtViewportInteractionEngine::panGestureStarted):
1808         (WebKit::QtViewportInteractionEngine::panGestureCancelled):
1809         (WebKit::QtViewportInteractionEngine::pinchAnimationActive):
1810         * UIProcess/qt/QtViewportInteractionEngine.h:
1811
1812 2011-11-02  Zalan Bujtas  <zbujtas@gmail.com>
1813
1814         [Qt][WK2] Move content to resize (setResizesToContentsUsingLayoutSize) from UI process to Web process
1815         https://bugs.webkit.org/show_bug.cgi?id=71107
1816
1817         Reviewed by Kenneth Rohde Christiansen.
1818
1819         Reduce the number of IPC calls to WebProcess by moving the content to resize
1820         calls from UI process to Web process.
1821
1822         * UIProcess/API/qt/qtouchwebview.cpp:
1823         (QTouchWebViewPrivate::updateViewportSize):
1824         (QTouchWebViewPrivate::updateViewportConstraints):
1825         (QTouchWebView::geometryChanged):
1826         * UIProcess/API/qt/qtouchwebview_p.h:
1827         * UIProcess/WebPageProxy.cpp:
1828         (WebKit::WebPageProxy::setViewportSize):
1829         (WebKit::WebPageProxy::preferencesDidChange):
1830         * UIProcess/WebPageProxy.h:
1831         * UIProcess/qt/QtTouchWebPageProxy.cpp:
1832         * UIProcess/qt/QtTouchWebPageProxy.h:
1833         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1834         (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
1835         * WebProcess/WebPage/WebPage.messages.in:
1836
1837 2011-10-18  Dinu Jacob  <dinu.jacob@nokia.com>
1838
1839         [Qt][WK2]: Shouldn't send unhandled TouchCancel event to gesture recognizers
1840         https://bugs.webkit.org/show_bug.cgi?id=70333
1841
1842         Reviewed by Simon Hausmann.
1843
1844         Gesture recognizers should be reset for unhandled TouchCancel event.
1845
1846         * UIProcess/qt/qtouchwebpageproxy.cpp:
1847         (QTouchWebPageProxy::doneWithTouchEvent):
1848
1849 2011-11-02  Simon Hausmann  <simon.hausmann@nokia.com>
1850
1851         [Qt][WK2] Add support for touch event testing to WebKitTestRunner
1852         https://bugs.webkit.org/show_bug.cgi?id=71310
1853
1854         Reviewed by Kenneth Rohde Christiansen.
1855
1856         * UIProcess/WebPageProxy.cpp:
1857         (WebKit::WebPageProxy::handleTouchEvent): Add support for m_shouldSendEventsSynchronously.
1858         * UIProcess/qt/QtDesktopWebPageProxy.cpp:
1859         (QtDesktopWebPageProxy::handleEvent): Handle plain touch events in the desktop page proxy by
1860         forwarding them appropriately. We will receive them from WTR through ::event, but we won't
1861         receive them from QQuickCanvas (i.e. the user) because that doesn't uses ::event but only
1862         dedicated fooEvent() handlers, of which we don't re-implement the touch version.
1863         (QtDesktopWebPageProxy::handleTouchEvent): Forward touch events to WebPageProxy.
1864         * UIProcess/qt/QtDesktopWebPageProxy.h:
1865         * WebProcess/WebPage/WebPage.cpp:
1866         (WebKit::WebPage::touchEventSyncForTesting): Add support for synchronous touch event testing,
1867         similar to the way it's done for mouse events.
1868         * WebProcess/WebPage/WebPage.h: Ditto.
1869         * WebProcess/WebPage/WebPage.messages.in: Ditto.
1870
1871 2011-11-02  Simon Hausmann  <simon.hausmann@nokia.com>
1872
1873         [WK2] Remove unused/duplicated modifiers member from WebTouchEvent
1874         https://bugs.webkit.org/show_bug.cgi?id=71353
1875
1876         Reviewed by Kenneth Rohde Christiansen.
1877
1878         WebTouchEvent::m_[ctrl,alt,meta,shift]Key are redundant compared to
1879         WebEvent::m_modifiers. The latter is fully populated and used, the former
1880         can be safely removed.
1881
1882         * Shared/WebEvent.h:
1883         * Shared/WebTouchEvent.cpp:
1884         (WebKit::WebTouchEvent::WebTouchEvent):
1885         * Shared/qt/WebEventFactoryQt.cpp:
1886         (WebKit::WebEventFactory::createWebTouchEvent):
1887
1888 2011-11-02  Philippe Normand  <pnormand@igalia.com>
1889
1890         Unreviewed, skip testWebKitSettingsNewWithSettings affected by bug
1891         70127.
1892
1893         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
1894         (testWebKitSettingsNewWithSettings):
1895
1896 2011-11-01  Andras Becsi  <andras.becsi@nokia.com>
1897
1898         [Qt][WK2] Make API tests less noisy
1899         https://bugs.webkit.org/show_bug.cgi?id=71295
1900
1901         Reviewed by Simon Hausmann.
1902
1903         Suppress superfluous debug messages of Qt5.
1904
1905         * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp:
1906         * UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp:
1907         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
1908         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
1909         (main):
1910         * UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp:
1911         * UIProcess/API/qt/tests/util.cpp:
1912         (messageHandler):
1913         * UIProcess/API/qt/tests/util.h:
1914
1915 2011-11-01  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1916
1917         [Qt] Merge common desktop and touch view APIs under a base class.
1918         https://bugs.webkit.org/show_bug.cgi?id=71280
1919
1920         Reviewed by Andreas Kling.
1921
1922         - Make QDesktopWebView and QTouchWebView inherit from QBaseWebView.
1923         - Move methods from QTouchWebPage to QTouchWebView (through the base class).
1924
1925         We use the same convenience macros as Qt internally by hiding QObject::d_ptr
1926         with QBaseWebView::d_ptr instead of inheriting QBaseWebViewPrivate from
1927         QQuickItemPrivate.
1928         Also, QBaseWebView currently inherits from QQuickPaintedItem since QDesktopWebView
1929         needs it, but should be changed as soon as this is not required anymore.
1930
1931         * UIProcess/API/qt/qbasewebview.cpp: Added.
1932         (QBaseWebViewPrivate::QBaseWebViewPrivate):
1933         (QBaseWebViewPrivate::setPageProxy):
1934         (QBaseWebView::QBaseWebView):
1935         (QBaseWebView::~QBaseWebView):
1936         (QBaseWebView::load):
1937         (QBaseWebView::url):
1938         (QBaseWebView::loadProgress):
1939         (QBaseWebView::title):
1940         (QBaseWebView::navigationController):
1941         (QBaseWebView::preferences):
1942         * UIProcess/API/qt/qbasewebview.h: Copied from Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h.
1943         * UIProcess/API/qt/qbasewebview_p.h: Copied from Source/WebKit2/UIProcess/API/qt/qtouchwebpage_p.h.
1944         (QBaseWebViewPrivate::~QBaseWebViewPrivate):
1945         * UIProcess/API/qt/qdesktopwebview.cpp:
1946         (QDesktopWebViewPrivate::QDesktopWebViewPrivate):
1947         (QDesktopWebViewPrivate::enableMouseEvents):
1948         (QDesktopWebViewPrivate::disableMouseEvents):
1949         (QDesktopWebViewPrivate::webView):
1950         (QDesktopWebViewPrivate::setViewNeedsDisplay):
1951         (QDesktopWebViewPrivate::drawingAreaSize):
1952         (QDesktopWebViewPrivate::hasFocus):
1953         (QDesktopWebViewPrivate::isVisible):
1954         (QDesktopWebViewPrivate::startDrag):
1955         (QDesktopWebViewPrivate::didChangeUrl):
1956         (QDesktopWebViewPrivate::didChangeTitle):
1957         (QDesktopWebViewPrivate::didChangeStatusText):
1958         (QDesktopWebViewPrivate::loadDidBegin):
1959         (QDesktopWebViewPrivate::loadDidSucceed):
1960         (QDesktopWebViewPrivate::loadDidFail):
1961         (QDesktopWebViewPrivate::didChangeLoadProgress):
1962         (QDesktopWebViewPrivate::showContextMenu):
1963         (QDesktopWebViewPrivate::runJavaScriptAlert):
1964         (QDesktopWebViewPrivate::runJavaScriptConfirm):
1965         (QDesktopWebViewPrivate::runJavaScriptPrompt):
1966         (QDesktopWebView::QDesktopWebView):
1967         (QDesktopWebViewPrivate::init):
1968         (QDesktopWebView::~QDesktopWebView):
1969         (QDesktopWebView::geometryChanged):
1970         (QDesktopWebView::paint):
1971         (QDesktopWebView::event):
1972         (QDesktopWebView::pageRef):
1973         (QDesktopWebViewPrivate::processDidCrash):
1974         (QDesktopWebViewPrivate::didRelaunchProcess):
1975         (QDesktopWebViewPrivate::engine):
1976         (QDesktopWebViewPrivate::chooseFiles):
1977         (QDesktopWebViewPrivate::_q_onOpenPanelFilesSelected):
1978         (QDesktopWebViewPrivate::_q_onOpenPanelFinished):
1979         (QDesktopWebViewPrivate::didMouseMoveOverElement):
1980         (QDesktopWebViewPrivate::navigationPolicyForURL):
1981         * UIProcess/API/qt/qdesktopwebview.h:
1982         * UIProcess/API/qt/qdesktopwebview_p.h:
1983         * UIProcess/API/qt/qtouchwebpage.cpp:
1984         (QTouchWebPage::event):
1985         (QTouchWebPage::geometryChanged):
1986         (QTouchWebPagePrivate::QTouchWebPagePrivate):
1987         (QTouchWebPagePrivate::setPageProxy):
1988         (QTouchWebPagePrivate::paintToCurrentGLContext):
1989         * UIProcess/API/qt/qtouchwebpage.h:
1990         * UIProcess/API/qt/qtouchwebpage_p.h:
1991         (QTouchWebPagePrivate::touchPageProxy):
1992         * UIProcess/API/qt/qtouchwebview.cpp:
1993         (QTouchWebViewPrivate::init):
1994         (QTouchWebViewPrivate::loadDidCommit):
1995         (QTouchWebViewPrivate::_q_viewportUpdated):
1996         (QTouchWebViewPrivate::_q_viewportTrajectoryVectorChanged):
1997         (QTouchWebViewPrivate::updateViewportConstraints):
1998         (QTouchWebView::QTouchWebView):
1999         (QTouchWebView::~QTouchWebView):
2000         (QTouchWebView::page):
2001         (QTouchWebView::geometryChanged):
2002         (QTouchWebView::onVisibleChanged):
2003         * UIProcess/API/qt/qtouchwebview.h:
2004         * UIProcess/API/qt/qtouchwebview_p.h:
2005         (QTouchWebViewPrivate::touchPageProxy):
2006         * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp:
2007         (tst_CommonViewTests::loadNonexistentFileUrl):
2008         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
2009         (WebViewAbstraction::WebViewAbstraction):
2010         (WebViewAbstraction::load):
2011         (WebViewAbstraction::url):
2012         (WebViewAbstraction::loadProgress):
2013         (WebViewAbstraction::goBack):
2014         (WebViewAbstraction::goForward):
2015         (WebViewAbstraction::stop):
2016         (WebViewAbstraction::reload):
2017         (WebViewAbstraction::touchViewLoadFailed):
2018         (WebViewAbstraction::desktopViewLoadFailed):
2019         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h:
2020         * UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp:
2021         (tst_QTouchWebView::navigationStatusAtStartup):
2022         * UIProcess/qt/QtDesktopWebPageProxy.cpp:
2023         (QtDesktopWebPageProxy::createPopupMenuProxy):
2024         * UIProcess/qt/QtTouchViewInterface.cpp:
2025         (WebKit::QtTouchViewInterface::didChangeViewportProperties):
2026         (WebKit::QtTouchViewInterface::didChangeUrl):
2027         (WebKit::QtTouchViewInterface::didChangeTitle):
2028         (WebKit::QtTouchViewInterface::loadDidBegin):
2029         (WebKit::QtTouchViewInterface::loadDidCommit):
2030         (WebKit::QtTouchViewInterface::loadDidSucceed):
2031         (WebKit::QtTouchViewInterface::loadDidFail):
2032         (WebKit::QtTouchViewInterface::didChangeLoadProgress):
2033         * WebKit2API.pri:
2034
2035 2011-10-31  Anders Carlsson  <andersca@apple.com>
2036
2037         PluginProxy shouldn't use window-relative coordinates
2038         https://bugs.webkit.org/show_bug.cgi?id=71261
2039
2040         Reviewed by Adam Roben.
2041
2042         Change PluginProxy::wantsWindowRelativeCoordinates to return false and remove
2043         m_frameRectInWindowCoordinates and m_clipRectInWindowCoordinates. This is yet another step
2044         towards eliminating window-relative coordinates wherever possible.
2045
2046         * WebProcess/Plugins/PluginProxy.cpp:
2047         (WebKit::PluginProxy::paint):
2048         Since the dirty rect passed to paint is now in plug-in coordinates, there's no need to convert it
2049         from window coordinates to plug-in coordinates before passing it to BackingStore::paint.
2050
2051         (WebKit::PluginProxy::deprecatedGeometryDidChange):
2052         Assert that we're not calling this anymore.
2053
2054         (WebKit::PluginProxy::wantsWindowRelativeCoordinates):
2055         Return false.
2056
2057 2011-11-01  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2058
2059         The QtViewportInteractionEngine should consider DPI adjustment
2060         https://bugs.webkit.org/show_bug.cgi?id=71283
2061
2062         Reviewed by Simon Hausmann.
2063
2064         * UIProcess/API/qt/qtouchwebview.cpp:
2065
2066             Add some default values for now to make sure we are testing the
2067             DPI adjustment / CSS-item space conversion.
2068
2069         (QTouchWebViewPrivate::updateViewportConstraints):
2070         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2071         (WebKit::ViewportUpdateGuard::ViewportUpdateGuard):
2072         (WebKit::ViewportUpdateGuard::~ViewportUpdateGuard):
2073
2074             Clean up the guard to be more understandable.
2075
2076         (WebKit::QtViewportInteractionEngine::cssScaleFromItem):
2077         (WebKit::QtViewportInteractionEngine::itemScaleFromCSS):
2078
2079             Add methods for converting between CSS and item space.
2080
2081         (WebKit::QtViewportInteractionEngine::innerBoundedCSSScale):
2082         (WebKit::QtViewportInteractionEngine::outerBoundedCSSScale):
2083
2084             Make it clean which methods uses which coord space.
2085
2086         (WebKit::QtViewportInteractionEngine::updateVisibleRect):
2087         (WebKit::QtViewportInteractionEngine::event):
2088         (WebKit::QtViewportInteractionEngine::computePosRangeForItemScale):
2089
2090             Rename calculateBoundariesForScale and change its implementation to
2091             be correct. The new name reflects the space in which the computation
2092             takes place and reflects similar Qt API.
2093
2094         (WebKit::QtViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
2095         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
2096         (WebKit::QtViewportInteractionEngine::scaleContent):
2097
2098             Make sure to consider the right coord space.
2099
2100         * UIProcess/qt/QtViewportInteractionEngine.h:
2101         (WebKit::QtViewportInteractionEngine::Constraints::Constraints):
2102
2103             Add the devicePixelRatio.
2104
2105 2011-11-01  Simon Hausmann  <simon.hausmann@nokia.com>
2106
2107         Prospective clang build fix.
2108
2109         Reviewed by Andreas Kling.
2110
2111         * UIProcess/WebPageProxy.cpp:
2112         (WebKit::WebPageProxy::didReceiveEvent): Handle GestureSingleTap in the event type switch.
2113
2114 2011-11-01  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2115
2116         [Qt] Create infrastructure for Qt's builtin bundle in web process.
2117         https://bugs.webkit.org/show_bug.cgi?id=71279
2118
2119         Reviewed by Simon Hausmann.
2120
2121         Create a builtin bundle for Qt port: an InjectedBundle which the code is together
2122         with the Qt's web process instead of being in a different library. This gives us
2123         access to many hooks at web process (using WKBundle* functions of C API) without
2124         adding any maintenance burden to cross-port code.
2125
2126         Since we also use a InjectedBundle in the WebKitTestRunner, we only install our
2127         builtin bundle if there's no other installed. This is fine because WTR won't use
2128         the extra runtime features that we plan to provide with the builtin bundle.
2129
2130         * WebKit2.pro:
2131         * WebProcess/qt/QtBuiltinBundle.cpp: Added.
2132         (WebKit::QtBuiltinBundle::~QtBuiltinBundle):
2133         (WebKit::QtBuiltinBundle::shared):
2134         (WebKit::QtBuiltinBundle::initialize):
2135         (WebKit::QtBuiltinBundle::didCreatePage):
2136         (WebKit::QtBuiltinBundle::willDestroyPage):
2137         (WebKit::QtBuiltinBundle::bundlePageForPageRef):
2138         * WebProcess/qt/QtBuiltinBundle.h: Added.
2139         (WebKit::QtBuiltinBundle::toRef):
2140         Object that holds a WKBundleRef and keeps track of the pages in the current context.
2141
2142         * WebProcess/qt/QtBuiltinBundlePage.cpp: Added.
2143         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
2144         (WebKit::QtBuiltinBundlePage::~QtBuiltinBundlePage):
2145         * WebProcess/qt/QtBuiltinBundlePage.h: Added.
2146         (WebKit::QtBuiltinBundlePage::page):
2147         Our representation for pages from the bundle perspective. This will be the right
2148         place to registering page related clients.
2149
2150         * WebProcess/qt/WebProcessQt.cpp:
2151         (WebKit::WebProcess::platformInitializeWebProcess):
2152         If there's no bundle to be loaded, initialize Qt builtin bundle, which will register the
2153         bundle client for this context.
2154
2155 2011-11-01  Simon Hausmann  <simon.hausmann@nokia.com>
2156
2157         [WK2] Add WebGestureEvents to the Qt build and enable PlatformGestureEvent::TapType
2158         https://bugs.webkit.org/show_bug.cgi?id=71274
2159
2160         Reviewed by Kenneth Christiansen.
2161
2162         * Shared/WebEvent.h: Add GestureSingleTap as gesture type.
2163         * Shared/WebEventConversion.cpp:
2164         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent): Support converting
2165         WebEven::GestureSingleTap to PlatformGestureEvent::TapType.
2166         * Shared/WebGestureEvent.cpp:
2167         (WebKit::WebGestureEvent::isGestureEventType): GestureSingleTap is a valid gesture event type.
2168         * WebKit2.pro: Add WebGestureEvent.cpp to the build.
2169
2170 2011-10-31  Anders Carlsson  <andersca@apple.com>
2171
2172         PluginProxy::Update should pass the painted rect in plug-in coordinates
2173         https://bugs.webkit.org/show_bug.cgi?id=71257
2174
2175         Reviewed by Adam Roben.
2176
2177         This is one step in the process of migrating away from window relative coordinates
2178         and use plug-in relative coordinates instead, since window relative coordinates won't work
2179         with transforms.
2180
2181         * PluginProcess/PluginControllerProxy.cpp:
2182         (WebKit::PluginControllerProxy::paint):
2183         Convert the dirty rect back to plug-in coordinates.
2184
2185         * WebProcess/Plugins/PluginProxy.cpp:
2186         (WebKit::PluginProxy::update):
2187         No need to convert the painted rect back to plug-in coordinates anymore.
2188
2189         * WebProcess/Plugins/PluginProxy.messages.in:
2190         Document that the painted rect is in plug-in coordinates.
2191
2192 2011-10-31  Anders Carlsson  <andersca@apple.com>
2193
2194         PluginControllerProxy should call Plugin::geometryDidChange
2195         https://bugs.webkit.org/show_bug.cgi?id=71255
2196
2197         Reviewed by Sam Weinig.
2198
2199         Pass enough information over in the GeometryDidChange message sent from
2200         PluginProxy to PluginControllerProxy so that PluginControllerProxy can call
2201         Plugin::geometryDidChange.
2202
2203         * PluginProcess/PluginControllerProxy.cpp:
2204         (WebKit::PluginControllerProxy::paint):
2205         (WebKit::PluginControllerProxy::invalidate):
2206         (WebKit::PluginControllerProxy::paintEntirePlugin):
2207         Update for rename from m_frameRect to m_frameRectInWindowCoordinates.
2208
2209         (WebKit::PluginControllerProxy::geometryDidChange):
2210         This now takes the plug-in size and the plug-in to root view transform as well.
2211
2212         * PluginProcess/PluginControllerProxy.h:
2213         Store the plug-in size and rename m_frameRect to m_frameRectInWindowCoordinates.
2214
2215         * PluginProcess/PluginControllerProxy.messages.in:
2216         Update message signature.
2217
2218         * PluginProcess/mac/PluginControllerProxyMac.mm:
2219         (WebKit::PluginControllerProxy::platformGeometryDidChange):
2220         Use the plug-in size instead of the frame rect size.
2221
2222         * Shared/WebCoreArgumentCoders.cpp:
2223         (CoreIPC::::encode):
2224         (CoreIPC::::decode):
2225         * Shared/WebCoreArgumentCoders.h:
2226         Add encoder/decoder for WebCore::AffineTransform.
2227
2228         * WebProcess/Plugins/PluginProxy.cpp:
2229         (WebKit::PluginProxy::geometryDidChange):
2230         Compute the frame rect in window coordinates and send it over.
2231
2232         (WebKit::PluginProxy::deprecatedGeometryDidChange):
2233         Move call to geometryDidChange() from here to the new PluginProxy::geometryDidChange.
2234
2235 2011-10-31  Anders Carlsson  <andersca@apple.com>
2236
2237         Remove some uses of m_frameRectInWindowCoordinates from PluginProxy
2238         https://bugs.webkit.org/show_bug.cgi?id=71252
2239
2240         Reviewed by Darin Adler.
2241
2242         * WebProcess/Plugins/PluginProxy.cpp:
2243         (WebKit::PluginProxy::paint):
2244         (WebKit::PluginProxy::geometryDidChange):
2245         (WebKit::PluginProxy::updateBackingStore):
2246         (WebKit::PluginProxy::pluginBounds):
2247         * WebProcess/Plugins/PluginProxy.h:
2248
2249 2011-10-31  Anders Carlsson  <andersca@apple.com>
2250
2251         Implement PluginProxy::geometryDidChange
2252         https://bugs.webkit.org/show_bug.cgi?id=71251
2253
2254         Reviewed by Sam Weinig.
2255
2256         Keep track of the plug-in size, the clip rect in plug-in coordinates and the
2257         transformation matrix from the root view to the plug-in.
2258
2259         * WebProcess/Plugins/PluginProxy.cpp:
2260         (WebKit::PluginProxy::geometryDidChange):
2261         * WebProcess/Plugins/PluginProxy.h:
2262
2263 2011-10-31  Anders Carlsson  <andersca@apple.com>
2264
2265         Fix the X11 build.
2266
2267         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2268         (WebKit::NetscapePlugin::platformGeometryDidChange):
2269         (WebKit::NetscapePlugin::platformPaint):
2270         (WebKit::NetscapePlugin::platformHandleMouseEvent):
2271         (WebKit::NetscapePlugin::platformHandleWheelEvent):
2272         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
2273         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
2274
2275 2011-10-31  Anders Carlsson  <andersca@apple.com>
2276
2277         Factor code to resize the plug-in backing store out into a separate function
2278         https://bugs.webkit.org/show_bug.cgi?id=71250
2279
2280         Reviewed by Adam Roben.
2281
2282         Add a PluginProxy::contentsScaleFactor helper function to get rid of a bunch of PLATFORM(MAC) #ifdefs,
2283         and move the code to update the backing store out into a separate function.
2284
2285         * WebProcess/Plugins/PluginProxy.cpp:
2286         (WebKit::PluginProxy::initialize):
2287         (WebKit::PluginProxy::paint):
2288         (WebKit::PluginProxy::geometryDidChange):
2289         (WebKit::PluginProxy::contentsScaleFactor):
2290         (WebKit::PluginProxy::updateBackingStore):
2291         (WebKit::PluginProxy::update):
2292         * WebProcess/Plugins/PluginProxy.h:
2293
2294 2011-10-31  Jeff Miller  <jeffm@apple.com>
2295
2296         Add more APIs to WKUserContentURLPattern.h
2297         https://bugs.webkit.org/show_bug.cgi?id=71245
2298         
2299         Add additional WKUserContentURLPattern APIs to match what was provided by
2300         the equivalent WebKit1 API.
2301
2302         Reviewed by Darin Adler.
2303
2304         * Shared/API/c/WKUserContentURLPattern.cpp:
2305         (WKUserContentURLPatternCopyHost): Added.
2306         (WKUserContentURLPatternCopyScheme): Added.
2307         (WKUserContentURLPatternIsValid): Added.
2308         (WKUserContentURLPatternMatchesSubdomains): Added.
2309         
2310         * Shared/API/c/WKUserContentURLPattern.h: Added new APIs.
2311         
2312         * Shared/WebUserContentURLPattern.h:
2313         (WebKit::WebUserContentURLPattern::host): Added.
2314         (WebKit::WebUserContentURLPattern::scheme): Added.
2315         (WebKit::WebUserContentURLPattern::isValid): Added.
2316         (WebKit::WebUserContentURLPattern::matchesSubdomains): Added.
2317
2318 2011-10-31  Anders Carlsson  <andersca@apple.com>
2319
2320         More work on making plug-ins work better with transforms
2321         https://bugs.webkit.org/show_bug.cgi?id=71241
2322
2323         Reviewed by Darin Adler.
2324
2325         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2326         (WebKit::NetscapePlugin::geometryDidChange):
2327         Implement NetscapePlugin::geometryDidChange and store the plug-in size,
2328         the clip rect and the root view transform. Use the transform to compute the window
2329         relative frame and clip rects.
2330
2331         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2332         Add new member variables.
2333
2334         * WebProcess/Plugins/PluginView.cpp:
2335         (WebKit::PluginView::viewGeometryDidChange):
2336         Always call the new Plugin::geometryDidChange.
2337
2338 2011-10-27  Anders Carlsson  <andersca@apple.com>
2339
2340         Rename a couple of NetscapePlugin and PluginProxy member variables
2341         https://bugs.webkit.org/show_bug.cgi?id=71086
2342
2343         Reviewed by Sam Weinig.
2344
2345         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2346         (WebKit::NetscapePlugin::invalidate):
2347         (WebKit::NetscapePlugin::callSetWindow):
2348         (WebKit::NetscapePlugin::snapshot):
2349         (WebKit::NetscapePlugin::deprecatedGeometryDidChange):
2350         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2351         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2352         (WebKit::NetscapePlugin::platformPaint):
2353         (WebKit::NetscapePlugin::platformHandleMouseEvent):
2354         (WebKit::NetscapePlugin::platformHandleWheelEvent):
2355         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
2356         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
2357         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2358         (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate):
2359         (WebKit::NetscapePlugin::platformPaint):
2360         * WebProcess/Plugins/PluginProxy.cpp:
2361         (WebKit::PluginProxy::paint):
2362         (WebKit::PluginProxy::geometryDidChange):
2363         (WebKit::PluginProxy::deprecatedGeometryDidChange):
2364         (WebKit::PluginProxy::update):
2365         * WebProcess/Plugins/PluginProxy.h:
2366         * WebProcess/Plugins/PluginView.cpp:
2367         (WebKit::PluginView::viewGeometryDidChange):
2368
2369 2011-10-31  Andras Becsi  <andras.becsi@nokia.com>
2370
2371         [Qt][WK2] Fix qmltests after r98460 added widgets dependency.
2372
2373         Reviewed by Simon Hausmann.
2374
2375         Use QApplication and QtWidgets until we get rid of the widgets dependency of QScroller.
2376
2377         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
2378         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
2379         (main):
2380
2381 2011-10-31  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2382
2383         [Qt] Make QWebPreferences hold a QtWebPageProxy
2384         https://bugs.webkit.org/show_bug.cgi?id=71219
2385
2386         Reviewed by Andreas Kling.
2387
2388         Change QWebPreferences to keep a pointer to QtWebPageProxy.  The reason is that
2389         some features we want to control (like the messaging exchange between WebView and
2390         the web process) are not available via WKPreferencesRef.
2391
2392         QtWebPageProxy now uses an OwnPtr to keep the QWebPreferences to clarify the
2393         ownership relationship. Before this change the QWebPreferences created was leaking.
2394
2395         * UIProcess/API/qt/qwebpreferences.cpp:
2396         (QWebPreferencesPrivate::createPreferences):
2397         (QWebPreferencesPrivate::testAttribute):
2398         (QWebPreferencesPrivate::setAttribute):
2399         (QWebPreferencesPrivate::setFontFamily):
2400         (QWebPreferencesPrivate::fontFamily):
2401         (QWebPreferencesPrivate::setFontSize):
2402         (QWebPreferencesPrivate::fontSize):
2403         (QWebPreferencesPrivate::preferencesRef):
2404         * UIProcess/API/qt/qwebpreferences.h:
2405         * UIProcess/API/qt/qwebpreferences_p.h:
2406         * UIProcess/qt/QtWebPageProxy.cpp:
2407         (QtWebPageProxy::QtWebPageProxy):
2408         (QtWebPageProxy::preferences):
2409         * UIProcess/qt/QtWebPageProxy.h:
2410
2411 2011-10-31  Carlos Garcia Campos  <cgarcia@igalia.com>
2412
2413         [GTK] Add webkit_settings_new_with_settings() to WebKit2 GTK+ API
2414         https://bugs.webkit.org/show_bug.cgi?id=71111
2415
2416         Reviewed by Martin Robinson.
2417
2418         Convenient method to create a WebKitSettings object with initial
2419         settings.
2420
2421         * UIProcess/API/gtk/WebKitSettings.cpp:
2422         (webkit_settings_new_with_settings):
2423         * UIProcess/API/gtk/WebKitSettings.h:
2424         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
2425         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
2426         (testWebKitSettingsNewWithSettings):
2427         (beforeAll):
2428
2429 2011-10-31  Carlos Garcia Campos  <cgarcia@igalia.com>
2430
2431         [GTK] Add methods to get/set the settings of a web view to WebKit2 GTK+ API
2432         https://bugs.webkit.org/show_bug.cgi?id=71109
2433
2434         Reviewed by Martin Robinson.
2435
2436         * GNUmakefile.am: Add WebKitSettingsPrivate.h.
2437         * UIProcess/API/gtk/WebKitSettings.cpp:
2438         (webkitSettingsAttachSettingsToPage): Set the preferences of the
2439         given WebKitSettings object to the page group of the given WKPage.
2440         * UIProcess/API/gtk/WebKitSettingsPrivate.h: Added.
2441         * UIProcess/API/gtk/WebKitWebView.cpp:
2442         (webkitWebViewConstructed): Create the default WebKitSettings for
2443         the view.
2444         (webkit_web_view_set_settings):
2445         (webkit_web_view_get_settings):
2446         * UIProcess/API/gtk/WebKitWebView.h:
2447         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
2448         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2449         (testWebViewSettings):
2450         (beforeAll):
2451
2452 2011-10-31  Carlos Garcia Campos  <cgarcia@igalia.com>
2453
2454         Unreviewed. Fix make distcheck build.
2455
2456         * GNUmakefile.am: Remove docs/GNUmakefile.in from EXTRA_DIST,
2457         since its generation was removed from configure.ac in r98498.
2458
2459 2011-10-28  Jeff Miller  <jeffm@apple.com>
2460
2461         More work on WebKit2 should respect WebKitOmitPDFSupport preference on the Mac
2462         https://bugs.webkit.org/show_bug.cgi?id=71156
2463         
2464         Don't include PDF and PostScript types in the set of MIME types with custom representations
2465         when initializing the web process if WebKitOmitPDFSupport is set.
2466         
2467         I believe the previous patch r98513 was actually sufficient to prevent PDFs from being
2468         shown inline when this preference was set, but to be complete we should exclude the MIME
2469         types here as well.
2470
2471         Reviewed by Alexey Proskuryakov.
2472
2473         * UIProcess/mac/WebContextMac.mm:
2474         (WebKit::WebContext::platformInitializeWebProcess):
2475
2476 2011-10-28  John Sullivan  <sullivan@apple.com>
2477
2478         WebKit2 part of:
2479         https://bugs.webkit.org/show_bug.cgi?id=71142
2480         Whether backspace goes Back should be configurable
2481
2482         Reviewed by Sam Weinig.
2483
2484         * Shared/WebPreferencesStore.h:
2485         Declared backspaceKeyNavigationEnabled property using macro. This initializes
2486         it to true, to match current behavior.
2487         
2488         * UIProcess/API/C/WKPreferences.cpp:
2489         (WKPreferencesSetBackspaceKeyNavigationEnabled):
2490         New function, pass value to impl.
2491         (WKPreferencesGetBackspaceKeyNavigationEnabled):
2492         New function, returns result from impl.
2493         
2494         * UIProcess/API/C/WKPreferences.h:
2495         Declared API functions for new preference.
2496         
2497         * WebProcess/WebPage/WebPage.cpp:
2498         (WebKit::WebPage::updatePreferences):
2499         Updates WebCore settings from WebKit2 prefs.
2500
2501 2011-10-28  Timothy Hatcher  <timothy@apple.com>
2502
2503         Support using a different front-end for the Web Inspector in WebKit2.
2504
2505         rdar://problem/10318665
2506         https://webkit.org/b/71089
2507
2508         Reviewed by Sam Weinig.
2509
2510         * Shared/WebProcessCreationParameters.cpp:
2511         (WebKit::WebProcessCreationParameters::encode): Added webInspectorBasePath and webInspectorLocalizedStringsPath.
2512         (WebKit::WebProcessCreationParameters::decode): Ditto.
2513         * Shared/WebProcessCreationParameters.h:
2514         * UIProcess/API/C/WKContext.cpp:
2515         (WKContextSetOverrideWebInspectorBaseDirectory): Added. Calls through to WebContext.
2516         (WKContextSetOverrideWebInspectorPagePath): Ditto.
2517         (WKContextSetOverrideWebInspectorLocalizedStringsPath): Ditto.
2518         * UIProcess/API/C/WKContextPrivate.h:
2519         * UIProcess/WebContext.cpp:
2520         (WebKit::WebContext::ensureWebProcess): Set webInspectorBasePath and webInspectorLocalizedStringsPath.
2521         * UIProcess/WebContext.h:
2522         (WebKit::WebContext::overrideWebInspectorBaseDirectory): Added.
2523         (WebKit::WebContext::setOverrideWebInspectorBaseDirectory): Added.
2524         (WebKit::WebContext::overrideWebInspectorPagePath): Added.
2525         (WebKit::WebContext::setOverrideWebInspectorPagePath): Added.
2526         (WebKit::WebContext::setOverrideWebInspectorLocalizedStringsPath): Added.
2527         * UIProcess/mac/WebInspectorProxyMac.mm:
2528         (WebKit::WebInspectorProxy::inspectorPageURL): Use WebContext::overrideWebInspectorPagePath if set.
2529         (WebKit::WebInspectorProxy::inspectorBaseURL): Use WebContext::overrideWebInspectorBaseDirectory if set.
2530         * WebProcess/WebPage/WebInspector.h:
2531         * WebProcess/WebPage/mac/WebInspectorMac.mm:
2532         (WebKit::globalInspectorLocalizedStringsURL): Added. Static storage for the setting.
2533         (WebKit::WebInspector::setLocalizedStringsPath): Added. Set globalInspectorLocalizedStringsURL.
2534         (WebKit::WebInspector::localizedStringsURL): Return globalInspectorLocalizedStringsURL.
2535         * WebProcess/com.apple.WebProcess.sb: Added read-only subpath for WEBKIT_WEB_INSPECTOR_DIR.
2536         * WebProcess/mac/WebProcessMac.mm:
2537         (WebKit::appendReadonlySandboxDirectory): Check path for empty to prevent an exception when
2538         calling through to fileSystemRepresentation.
2539         (WebKit::initializeSandbox): Added WEBKIT_WEB_INSPECTOR_DIR parameter.
2540         (WebKit::WebProcess::platformInitializeWebProcess): Call WebInspector::setLocalizedStringsPath.
2541
2542 2011-10-28  Alexey Proskuryakov  <ap@apple.com>
2543
2544         Clean up BuiltInPDFView a little
2545         https://bugs.webkit.org/show_bug.cgi?id=71133
2546
2547         Reviewed by Daniel Bates.
2548
2549         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp: (WebKit::BuiltInPDFView::createScrollbar):
2550         Removed an incorrect FIXME. Custom scrollbars specified in a document don't apply
2551         to subframes, and thus shouldn't apply to PDFs.
2552
2553         * WebProcess/Plugins/PDF/BuiltInPDFView.h: (WebKit::BuiltInPDFView::zoomAnimatorTransformChanged):
2554         Moved to a correct location. This is not a Plugin method, but a ScrollView one.
2555
2556 2011-10-28  Jochen Eisinger  <jochen@chromium.org>
2557
2558         Rename a number of methods mentioning JavaScript to just Script instead
2559         https://bugs.webkit.org/show_bug.cgi?id=71105
2560
2561         Reviewed by Adam Barth.
2562
2563         * WebProcess/WebPage/WebPage.cpp:
2564         (WebKit::WebPage::updatePreferences):
2565
2566 2011-10-28  Csaba Osztrogonác  <ossy@webkit.org>
2567
2568         [Qt] Adapt to QSG* to QQuick* API change in qtdeclarative
2569         https://bugs.webkit.org/show_bug.cgi?id=70494
2570
2571         One more buildfix. (unreviewed)
2572
2573         * UIProcess/API/qt/qtouchwebpage.cpp:
2574         (computeEffectiveOpacity):
2575         (QTouchWebPage::itemChange):
2576
2577 2011-10-28  Simon Hausmann  <simon.hausmann@nokia.com>
2578
2579         [Qt] Adapt to QSG* to QQuick* API change in qtdeclarative
2580         https://bugs.webkit.org/show_bug.cgi?id=70494
2581
2582         Reviewed by Kenneth Christiansen.
2583
2584         Use QQuick* instead of QSG* as well as QStandardPaths
2585         instead of QDesktopLocation.
2586
2587         * UIProcess/API/qt/qdesktopwebview.cpp:
2588         (QDesktopWebView::QDesktopWebView):
2589         (QDesktopWebView::geometryChanged):
2590         (QDesktopWebView::event):
2591         (QDesktopWebViewPrivate::engine):
2592         * UIProcess/API/qt/qdesktopwebview.h:
2593         * UIProcess/API/qt/qtouchwebpage.cpp:
2594         (QTouchWebPage::QTouchWebPage):
2595         (QTouchWebPage::event):
2596         (QTouchWebPage::geometryChanged):
2597         * UIProcess/API/qt/qtouchwebpage.h:
2598         * UIProcess/API/qt/qtouchwebview.cpp:
2599         (QTouchWebView::QTouchWebView):
2600         (QTouchWebView::geometryChanged):
2601         (QTouchWebView::touchEvent):
2602         * UIProcess/API/qt/qtouchwebview.h:
2603         * UIProcess/API/qt/tests/testwindow.h:
2604         (TestWindow::TestWindow):
2605         (TestWindow::resizeEvent):
2606         * UIProcess/qt/QtDesktopWebPageProxy.cpp:
2607         (QtDesktopWebPageProxy::createPopupMenuProxy):
2608         * UIProcess/qt/QtSGUpdateQueue.cpp:
2609         (WebKit::QtSGUpdateQueue::QtSGUpdateQueue):
2610         * UIProcess/qt/QtSGUpdateQueue.h:
2611         * UIProcess/qt/QtTouchViewInterface.cpp:
2612         (WebKit::QtTouchViewInterface::engine):
2613         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2614         (WebKit::contentRectInViewportCoordinates):
2615         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
2616         * UIProcess/qt/QtViewportInteractionEngine.h:
2617         * UIProcess/qt/WebContextQt.cpp:
2618         (WebKit::defaultDataLocation):
2619         * UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
2620         (WebKit::WebPopupMenuProxyQtDesktop::WebPopupMenuProxyQtDesktop):
2621         * UIProcess/qt/WebPopupMenuProxyQtDesktop.h:
2622         (WebKit::WebPopupMenuProxyQtDesktop::create):
2623
2624 2011-10-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2625
2626         [Qt] Make the kinetic engine use the same curve and constants as on the N9
2627         https://bugs.webkit.org/show_bug.cgi?id=71102
2628
2629         Reviewed by Simon Hausmann.
2630
2631         Now that we are using the QScroller for kinetic scrolling and page
2632         interaction, we need to make sure it uses the same curve (exponential)
2633         and the same values as the MeeGo Touch physics engine used on the N9.
2634
2635         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2636         (WebKit::QtViewportInteractionEngine::reset):
2637
2638 2011-10-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2639
2640         [GTK] Add webkit_web_view_get_uri() to WebKit2 GTK+ API
2641         https://bugs.webkit.org/show_bug.cgi?id=70814
2642
2643         Reviewed by Gustavo Noronha Silva.
2644
2645         * UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
2646         (didStartProvisionalLoadForFrame): Update WebView URI to make sure
2647         it's updated to provisional URL.
2648         (didReceiveServerRedirectForProvisionalLoadForFrame): Update
2649         WebView URI if there's a server redirection.
2650         (didCommitLoadForFrame): Update WebView URI to make sure it
2651         contains the final one.
2652         (didSameDocumentNavigationForFrame): Update WebView URI when a
2653         navigation action within the same document is performed.
2654         (webkitWebLoaderClientAttachLoaderClientToPage): Add
2655         implementation for didSameDocumentNavigationForFrame callback.
2656         * UIProcess/API/gtk/WebKitWebView.cpp:
2657         (webkit_web_view_class_init): Add URI property.
2658         (webkitWebViewUpdateURI): Check whether current active URI has
2659         changed to updated it and emit ::notify signal if it changes.
2660         (webkit_web_view_load_uri): Call webkitWebViewUpdateURI() to make
2661         sure the active URI is updated when load operation is started.
2662         (webkit_web_view_load_alternate_html): Ditto.
2663         (webkit_web_view_reload): Ditto.
2664         (webkit_web_view_reload_bypass_cache): Ditto.
2665         (webkit_web_view_go_back): Ditto.
2666         (webkit_web_view_go_forward): Ditto.
2667         (webkit_web_view_get_uri): Ditto.
2668         (webkit_web_view_go_to_back_forward_list_item): Ditto.
2669         * UIProcess/API/gtk/WebKitWebView.h:
2670         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Add
2671         webkitWebViewUpdateURI().
2672         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
2673         (provisionalLoadStartedCallback): Check provisional URL is the
2674         requested URI.
2675         (provisionalLoadReceivedServerRedirectCallback): Check provisional
2676         URL after server redirection is the expected redirected URI.
2677         (provisionalLoadFailedCallback): Check active URI.
2678         (loadCommittedCallback): Ditto.
2679         (loadFinishedCallback): Ditto.
2680         (loadFailedCallback): Ditto
2681         (LoadTrackingTest::LoadTrackingTest): Check active URI is NULL
2682         before any loading operation has started.
2683         * UIProcess/API/gtk/tests/LoadTrackingTest.h:
2684         (LoadTrackingTest::setRedirectURI): Set the redirect URI to check
2685         it after a server redirection.
2686         * UIProcess/API/gtk/tests/TestBackForwardList.cpp:
2687         (testBackForwardListNavigation): Use WebViewTest methods for
2688         navigation actions instead of using WebKitWebView API directly.
2689         (testBackForwardListLimitAndCache): Ditto.
2690         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
2691         (testLoadingStatus): Ditto.
2692         (testLoadingError): Ditto.
2693         (testLoadAlternateContent): Ditto.
2694         (testLoadCancelled): Ditto.
2695         (testWebViewReload): Ditto.
2696         (testLoadProgress): Ditto.
2697         (testWebViewActiveURI): Add a test to check that notify signal is
2698         emitted when active URI changes and it's correctly updated when
2699         loader client signals are emitted.
2700         (beforeAll): Add active-uri test.
2701         * UIProcess/API/gtk/tests/WebViewTest.cpp: Add custom load methods
2702         wrapping the WebKitWebView ones, to initialize the active URI to
2703         the requested one, so that it can be checked by the loader client
2704         test.
2705         (WebViewTest::loadURI):
2706         (WebViewTest::loadAlternateHTML):
2707         (WebViewTest::goBack):
2708         (WebViewTest::goForward):
2709         (WebViewTest::goToBackForwardListItem):
2710         * UIProcess/API/gtk/tests/WebViewTest.h:
2711
2712 2011-10-21  No'am Rosenthal  <noam.rosenthal@nokia.com>
2713
2714         [Qt][WK2] Synchronize tiling with accelerated compositing
2715         https://bugs.webkit.org/show_bug.cgi?id=69151
2716
2717         Reviewed by Simon Hausmann.
2718
2719         Make QTouchWebView always render with accelerated compositing.
2720         At first, the web content would only render after the rest of the scene has rendered. In a
2721         future patch we'll enable rendering the web content via an FBO, which would cover all other
2722         cases as well.
2723
2724         Right now this only works for QTouchWebView, and thus accelerated compositing is disabled
2725         for desktop web-views. This required adding some settings enablers in Q
2726         WebPreferencesPrivate. Those are not exposed to the public API, as they are an implementation
2727         detail.
2728
2729         * UIProcess/API/qt/qtouchwebpage.cpp:
2730         (QTouchWebPage::QTouchWebPage):
2731         (QTouchWebPage::initSceneGraphConnections):
2732         (QTouchWebPagePrivate::QTouchWebPagePrivate):
2733         (QTouchWebPagePrivate::setPage):
2734         (computeEffectiveOpacity):
2735         (QTouchWebPagePrivate::paintToCurrentGLContext):
2736         (QTouchWebPagePrivate::_q_onAfterSceneRender):
2737         (QTouchWebPagePrivate::_q_onSceneGraphInitialized):
2738         (QTouchWebPage::itemChange):
2739         * UIProcess/API/qt/qtouchwebpage.h:
2740         * UIProcess/API/qt/qtouchwebpage_p.h:
2741         * UIProcess/API/qt/qwebpreferences.cpp:
2742         (QWebPreferencesPrivate::testAttribute):
2743         (QWebPreferencesPrivate::setAttribute):
2744         (QWebPreferencesPrivate::get):
2745         * UIProcess/API/qt/qwebpreferences_p.h:
2746         * UIProcess/TiledDrawingAreaProxy.cpp:
2747         (WebKit::TiledDrawingAreaProxy::renderNextFrame):
2748         * UIProcess/qt/QtDesktopWebPageProxy.cpp:
2749         (QtDesktopWebPageProxy::QtDesktopWebPageProxy):
2750         * UIProcess/qt/QtTouchViewInterface.cpp:
2751         (WebKit::QtTouchViewInterface::setViewNeedsDisplay):
2752         * UIProcess/qt/QtTouchWebPageProxy.cpp:
2753         (QtTouchWebPageProxy::QtTouchWebPageProxy):
2754         (QtTouchWebPageProxy::createDrawingAreaProxy):
2755         (QtTouchWebPageProxy::renderToCurrentGLContext):
2756         (QtTouchWebPageProxy::setVisibleContentRectAndScale):
2757         (QtTouchWebPageProxy::setVisibleContentRectTrajectoryVector):
2758         (QtTouchWebPageProxy::renderNextFrame):
2759         * UIProcess/qt/QtTouchWebPageProxy.h:
2760         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
2761         (WebKit::LayerTreeHost::supportsAcceleratedCompositing):
2762         * WebProcess/WebPage/qt/WebPageQt.cpp:
2763         (WebKit::WebPage::platformInitialize):
2764         * WebProcess/qt/WebProcessMainQt.cpp:
2765         (WebKit::WebProcessMainQt):
2766
2767 2011-10-27  Martin Robinson  <mrobinson@igalia.com>
2768
2769         Fix the GTK+ build after r98664.
2770
2771         * WebProcess/Plugins/Plugin.h: Add an IntSize forward declaration.
2772
2773 2011-10-27  Anders Carlsson  <andersca@apple.com>
2774
2775         Add a Plugin::geometryDidChange that will work with transforms
2776         https://bugs.webkit.org/show_bug.cgi?id=71072
2777
2778         Reviewed by Simon Fraser.
2779
2780         Add a new Plugin::geometryDidChange pure virtual member function, that takes
2781         the size of the plug-in, the clip rect (in plug-in coordinates), and a matrix that makes
2782         it possible to convert between root view coordinates and plug-in coordinates.
2783
2784         PluginView only calls this new geometryDidChange member function if 
2785         Plugin::wantsWindowRelativeCoordinates returns false, which is only true for BuiltInPDFView right now.
2786
2787         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2788         (WebKit::NetscapePlugin::geometryDidChange):
2789         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2790         Add stub.
2791
2792         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
2793         (WebKit::BuiltInPDFView::updateScrollbars):
2794         (WebKit::BuiltInPDFView::pdfDocumentDidLoad):
2795         (WebKit::BuiltInPDFView::paintContent):
2796         (WebKit::BuiltInPDFView::deprecatedGeometryDidChange):
2797         (WebKit::BuiltInPDFView::geometryDidChange):
2798         (WebKit::BuiltInPDFView::setScrollOffset):
2799         (WebKit::BuiltInPDFView::maximumScrollPosition):
2800         (WebKit::BuiltInPDFView::visibleHeight):
2801         (WebKit::BuiltInPDFView::visibleWidth):
2802         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
2803         There's no need to keep track of the plug-in rect anymore.
2804
2805         * WebProcess/Plugins/Plugin.h:
2806         Add and document geometryDidChange.
2807
2808         * WebProcess/Plugins/PluginProxy.cpp:
2809         (WebKit::PluginProxy::geometryDidChange):
2810         * WebProcess/Plugins/PluginProxy.h:
2811         Add stub.
2812
2813         * WebProcess/Plugins/PluginView.cpp:
2814         (WebKit::PluginView::viewGeometryDidChange):
2815         Call geometryDidChange.
2816
2817 2011-10-27  Joseph Pecoraro  <pecoraro@apple.com>
2818
2819         Reviewed by David Kilzer.
2820
2821         Make FeatureDefines Identical Across OS X Projects
2822         https://bugs.webkit.org/show_bug.cgi?id=71051
2823
2824         * Configurations/FeatureDefines.xcconfig:
2825
2826 2011-10-27  Anders Carlsson  <andersca@apple.com>
2827
2828         Rename Plugin::geometryDidChange to Plugin::deprecatedGeometryDidChange
2829         https://bugs.webkit.org/show_bug.cgi?id=71065
2830
2831         Reviewed by Simon Fraser.
2832
2833         In preparation for adding a version of geometryDidChange that doesn't take window coordinates.
2834
2835         * PluginProcess/PluginControllerProxy.cpp:
2836         (WebKit::PluginControllerProxy::geometryDidChange):
2837         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2838         (WebKit::NetscapePlugin::deprecatedGeometryDidChange):
2839         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2840         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
2841         (WebKit::BuiltInPDFView::deprecatedGeometryDidChange):
2842         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
2843         * WebProcess/Plugins/Plugin.h:
2844         * WebProcess/Plugins/PluginProxy.cpp:
2845         (WebKit::PluginProxy::deprecatedGeometryDidChange):
2846         * WebProcess/Plugins/PluginProxy.h:
2847         * WebProcess/Plugins/PluginView.cpp:
2848         (WebKit::PluginView::viewGeometryDidChange):
2849
2850 2011-10-27  Michael Saboff  <msaboff@apple.com>
2851
2852         Investigate storing strings in 8-bit buffers when possible
2853         https://bugs.webkit.org/show_bug.cgi?id=66161
2854
2855         Added export of StringImpl::getData16SlowCase for linking tests.
2856
2857         Reviewed by Geoffrey Garen.
2858
2859         * win/WebKit2.def:
2860
2861 2011-10-27  Sam Weinig  <sam@webkit.org>
2862
2863         Add allowsPlugIns property to WKBrowsingContextGroup
2864         https://bugs.webkit.org/show_bug.cgi?id=70987
2865
2866         Reviewed by Anders Carlsson.
2867
2868         Test: WKBrowsingContextGroupTest.GetSetPluginsEnabled
2869
2870         * UIProcess/API/mac/WKBrowsingContextGroup.h:
2871         * UIProcess/API/mac/WKBrowsingContextGroup.mm:
2872         (-[WKBrowsingContextGroup allowsJavaScript]):
2873         (-[WKBrowsingContextGroup setAllowsJavaScript:]):
2874         Rename to allowsJavaScript/setAllowsJavaScript.
2875
2876         (-[WKBrowsingContextGroup allowsPlugIns]):
2877         (-[WKBrowsingContextGroup setAllowsPlugIns:]):
2878         Add allowsPlugIns/setAllowsPlugIns.
2879
2880 2011-10-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2881
2882         [Cairo] Implement ShareableBitmap::paint() when scaleFactor=1
2883         https://bugs.webkit.org/show_bug.cgi?id=71027
2884
2885         Reviewed by Martin Robinson.
2886
2887         Fixes windowless plugins in GTK+ port.
2888
2889         * Shared/cairo/ShareableBitmapCairo.cpp:
2890         (WebKit::ShareableBitmap::paint): When scaleFactor is 1, simply
2891         call the paint method that doesn't receive a scaleFactor.
2892
2893 2011-10-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2894
2895         Unreviewed, rolling out r98556.
2896         http://trac.webkit.org/changeset/98556
2897         https://bugs.webkit.org/show_bug.cgi?id=71031
2898
2899         The test added by the patch doesn't pass on Snow Leopard
2900         (Requested by rniwa on #webkit).
2901
2902         * win/WebKit2.def:
2903         * win/WebKit2CFLite.def:
2904
2905 2011-10-27  Mark Hahnenberg  <mhahnenberg@apple.com>
2906
2907         De-virtualize JSCell::toThisObject
2908         https://bugs.webkit.org/show_bug.cgi?id=70958
2909
2910         Reviewed by Geoffrey Garen.
2911
2912         Converted all instances of toThisObject to static functions, 
2913         added toThisObject to the MethodTable, and replaced all call sites
2914         with a corresponding lookup in the MethodTable.
2915
2916         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2917         (WebKit::NPJSObject::invoke):
2918
2919 2011-10-27  Adam Roben  <aroben@apple.com>
2920
2921         Add WKBundlePageGetBackingScaleFactor
2922
2923         Fixes <http://webkit.org/b/71025> <rdar://problem/10355037> REGRESSION (r97191): Clients
2924         can't reliably determine the scale factor of snapshots returned via
2925         WKBundlePageCreateSnapshot* API
2926
2927         Reviewed by Sam Weinig.
2928
2929         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2930         (WKBundlePageGetBackingScaleFactor):
2931         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2932         Added. Calls through to WebPage::deviceScaleFactor.
2933
2934         * WebProcess/WebPage/WebPage.cpp:
2935         (WebKit::WebPage::deviceScaleFactor):
2936         * WebProcess/WebPage/WebPage.h:
2937         Added. Calls through to Page::deviceScaleFactor.
2938
2939 2011-10-27  Zalan Bujtas  <zbujtas@gmail.com>
2940
2941         [Qt][WK2]Add setViewportSize API to WebKit2.
2942         https://bugs.webkit.org/show_bug.cgi?id=71006
2943
2944         Reviewed by Kenneth Rohde Christiansen.
2945
2946         Fixed layout rendering needs the viewport size information on the WebProcess
2947         side to be able to do viewport attribute calculations.
2948
2949         * WebProcess/WebPage/WebPage.cpp:
2950         (WebKit::WebPage::setViewportSize):
2951         * WebProcess/WebPage/WebPage.h:
2952         (WebKit::WebPage::viewportSize):
2953         * WebProcess/WebPage/WebPage.messages.in:
2954
2955 2011-10-27  Alexis Menard  <alexis.menard@openbossa.org>
2956
2957         [Qt][WK2] Move the C API callback setup out of QtWebPageProxy
2958         https://bugs.webkit.org/show_bug.cgi?id=70965
2959
2960         Reviewed by Andreas Kling.
2961
2962         Move out the setup of C API callback into ClientImpl file
2963         so that QtWebPageProxy will be less polluted.
2964
2965         * UIProcess/qt/ClientImpl.cpp:
2966         (qt_wk_didStartProvisionalLoadForFrame):
2967         (qt_wk_didFailProvisionalLoadWithErrorForFrame):
2968         (qt_wk_didCommitLoadForFrame):
2969         (qt_wk_didFinishLoadForFrame):
2970         (qt_wk_didFailLoadWithErrorForFrame):
2971         (qt_wk_didSameDocumentNavigationForFrame):
2972         (qt_wk_didReceiveTitleForFrame):
2973         (qt_wk_didStartProgress):
2974         (qt_wk_didChangeProgress):
2975         (qt_wk_didFinishProgress):
2976         (qt_wk_runJavaScriptAlert):
2977         (qt_wk_runJavaScriptConfirm):
2978         (qt_wk_runJavaScriptPrompt):
2979         (qt_wk_setStatusText):
2980         (qt_wk_runOpenPanel):
2981         (qt_wk_mouseDidMoveOverElement):
2982         (qt_wk_decidePolicyForNavigationAction):
2983         (qt_wk_decidePolicyForResponse):
2984         (setupPageLoaderClient):
2985         (setupPageUiClient):
2986         (setupPagePolicyClient):
2987         * UIProcess/qt/ClientImpl.h:
2988         * UIProcess/qt/QtWebPageProxy.cpp:
2989         (QtWebPageProxy::init):
2990         * UIProcess/qt/QtWebPageProxy.h:
2991         (QtWebPageProxy::viewInterface):
2992
2993 2011-10-27  Zeno Albisser  <zeno.albisser@nokia.com>
2994
2995         [Qt][WK2] Remove QAction from MiniBrowser
2996         https://bugs.webkit.org/show_bug.cgi?id=70525
2997
2998         This fixes the commonview tests that were failing
2999         after r98447.
3000         WebViewAbstraction must forward actions to both
3001         the TouchWebView and the DesktopWebView.
3002
3003         Reviewed by Kenneth Rohde Christiansen.
3004
3005         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
3006         (WebViewAbstraction::goBack):
3007         (WebViewAbstraction::goForward):
3008         (WebViewAbstraction::stop):
3009         (WebViewAbstraction::reload):
3010
3011 2011-10-27  Zalan Bujtas  <zbujtas@gmail.com>
3012
3013         [Qt][WK2]Content size changed event does not require viewport attribute calculation.
3014         https://bugs.webkit.org/show_bug.cgi?id=70920
3015
3016         Reviewed by Kenneth Rohde Christiansen.
3017         
3018         Remove unnecessary recalculation of viewport attributes.
3019
3020         * UIProcess/qt/QtTouchViewInterface.cpp:
3021         (WebKit::QtTouchViewInterface::contentSizeChanged):
3022
3023 2011-10-27  Shinya Kawanaka  <shinyak@google.com>
3024
3025         Implement legacy text check emulation in unified text check interface.
3026         https://bugs.webkit.org/show_bug.cgi?id=70299
3027
3028         Reviewed by Hajime Morita.
3029
3030         * win/WebKit2.def:
3031         * win/WebKit2CFLite.def:
3032
3033 2011-10-27  Philippe Normand  <pnormand@igalia.com>
3034
3035         [GStreamer] WebAudio AudioFileReader implementation
3036         https://bugs.webkit.org/show_bug.cgi?id=69834
3037
3038         Reviewed by Martin Robinson.
3039
3040         * GNUmakefile.am: Link against libfftw.
3041
3042 2011-10-26  Alexey Proskuryakov  <ap@apple.com>
3043
3044         REGRESSION (r98153): Safari crashes if WebProcess crashed during printing
3045         https://bugs.webkit.org/show_bug.cgi?id=70982
3046
3047         Reviewed by Dan Bernstein.
3048
3049         * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
3050         Null check page, it may be invalid already.
3051
3052 2011-10-26  Jeff Miller  <jeffm@apple.com>
3053
3054         WebKit2 should respect secret WebKitOmitPDFSupport preference on the Mac
3055         https://bugs.webkit.org/show_bug.cgi?id=70943
3056         
3057         If WebKitOmitPDFSupport pref is set, disable both the new "plug-in" for subframes and the PDFKit-based support for the main frame only.
3058
3059         Reviewed by Alexey Proskuryakov.
3060
3061         * UIProcess/WebContext.cpp:
3062         (WebKit::WebContext::getPlugins): Don't register built-in PDF plugin if WebKitOmitPDFSupport pref is set.
3063         
3064         * UIProcess/WebContext.h: Added omitPDFSupport().
3065         
3066         * UIProcess/WebFrameProxy.cpp:
3067         (WebKit::WebFrameProxy::canShowMIMEType): Don't show PDFs if WebKitOmitPDFSupport is set.
3068         
3069         * UIProcess/mac/WebContextMac.mm:
3070         (WebKit::WebContext::omitPDFSupport): Added.
3071
3072 2011-10-26  Sam Weinig  <sam@webkit.org>
3073
3074         Add initial setting to WKBrowsingContextGroup
3075         https://bugs.webkit.org/show_bug.cgi?id=70942
3076
3077         Reviewed by Anders Carlsson.
3078
3079         Test: WKBrowsingContextGroupTest.
3080
3081         * UIProcess/API/mac/WKBrowsingContextGroup.h:
3082         * UIProcess/API/mac/WKBrowsingContextGroup.mm:
3083         (-[WKBrowsingContextGroup isJavaScriptEnabled]):
3084         (-[WKBrowsingContextGroup setJavaScriptEnabled:]):
3085         Add setting to enabled/disable javascript. By default it is enabled. 
3086
3087 2011-10-25  Alexey Proskuryakov  <ap@apple.com>
3088
3089         Embedded PDFs should be known to DocumentLoader
3090         https://bugs.webkit.org/show_bug.cgi?id=70864
3091
3092         Reviewed by Darin Adler.
3093
3094         * WebProcess/Plugins/Plugin.h: Plugin stream load notifications now contain a suggested
3095         file name, in case the plug-in wants to save the file properly.
3096
3097         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
3098         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
3099         (WebKit::BuiltInPDFView::addArchiveResource): Add the PDF as resource in DocumentLoader.
3100         (WebKit::BuiltInPDFView::pdfDocumentDidLoad): Call addArchiveResource.
3101         (WebKit::BuiltInPDFView::initialize): We need to remember source URL to create a resource
3102         for that. The URL needs to match one in HitTestResult, so we can't use response URL.
3103         (WebKit::BuiltInPDFView::streamDidReceiveResponse): Remember suggested file name, so
3104         that we could put it in archive resource later.
3105         (WebKit::BuiltInPDFView::manualStreamDidReceiveResponse): Ditto.
3106
3107         * PluginProcess/PluginControllerProxy.cpp:
3108         (WebKit::PluginControllerProxy::streamDidReceiveResponse):
3109         (WebKit::PluginControllerProxy::manualStreamDidReceiveResponse):
3110         Pass an empty string for suggested file name. No plug-in that runs in a separate process
3111         cares about it, so it's not sent to the plugin process.
3112
3113         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3114         (WebKit::NetscapePlugin::streamDidReceiveResponse):
3115         (WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
3116         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3117         Updated for new signatures.
3118
3119         * WebProcess/Plugins/PluginProxy.cpp:
3120         (WebKit::PluginProxy::streamDidReceiveResponse):
3121         (WebKit::PluginProxy::manualStreamDidReceiveResponse):
3122         * WebProcess/Plugins/PluginProxy.h:
3123         Updated for new signatures.
3124
3125         * WebProcess/Plugins/PluginView.cpp:
3126         (WebKit::PluginView::Stream::didReceiveResponse):
3127         (WebKit::PluginView::manualLoadDidReceiveResponse):
3128         Pass suggested file name to plug-in, in case the plug-in wants to save the file properly.
3129
3130 2011-10-26  Mark Hahnenberg  <mhahnenberg@apple.com>
3131
3132         Remove getOwnPropertySlotVirtual
3133         https://bugs.webkit.org/show_bug.cgi?id=70741
3134
3135         Reviewed by Geoffrey Garen.
3136
3137         Removed all declarations and definitions of getOwnPropertySlotVirtual.
3138         Also replaced all call sites to getOwnPropertyVirtualVirtual with a 
3139         corresponding lookup in the MethodTable.
3140
3141         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3142         * WebProcess/Plugins/Netscape/JSNPObject.h:
3143
3144 2011-10-26  Alejandro G. Castro  <alex@igalia.com>
3145
3146         [GTK] [WK2] Add WebKit2 distcheck support
3147         https://bugs.webkit.org/show_bug.cgi?id=70933
3148
3149         Reviewed by Martin Robinson.
3150
3151         * GNUmakefile.am: Add a bunch of missing files from API and
3152         sources, also include more files in the EXTRA_DIST.
3153         * UIProcess/API/gtk/docs/GNUmakefile.am: Add the version.xml to
3154         the cleaning section.
3155
3156 2011-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3157
3158         [GTK] Fix gtk-doc warnings and style issues in WebKit2 GTK+ API
3159         https://bugs.webkit.org/show_bug.cgi?id=70930
3160
3161         Reviewed by Martin Robinson.
3162
3163         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
3164         * UIProcess/API/gtk/WebKitSettings.cpp:
3165         (webkit_settings_class_init):
3166         * UIProcess/API/gtk/WebKitWebView.h:
3167         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
3168
3169 2011-10-26  Anders Carlsson  <andersca@apple.com>
3170
3171         Use the right contents scale factor for non-Mac plug-ins
3172         https://bugs.webkit.org/show_bug.cgi?id=70939
3173
3174         Reviewed by Adam Roben.
3175
3176         * WebProcess/Plugins/PluginProxy.cpp:
3177         (WebKit::PluginProxy::paint):
3178         (WebKit::PluginProxy::geometryDidChange):
3179         (WebKit::PluginProxy::update):
3180
3181 2011-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3182
3183         [GTK] Add missing symbols to WebKit2 gtk-doc files
3184         https://bugs.webkit.org/show_bug.cgi?id=70927
3185
3186         Reviewed by Martin Robinson.
3187
3188         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add sections for
3189         WebKitBackForwardList, WebKitBackForwardListItem and WebKitSettings.
3190         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add missing symbols.
3191         * UIProcess/API/gtk/docs/webkit2gtk.types: Add missing types.
3192
3193 2011-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3194
3195         [GTK] Inconsistent name of WebKitSettings macros
3196         https://bugs.webkit.org/show_bug.cgi?id=70924
3197
3198         Reviewed by Martin Robinson.
3199
3200         Rename WEBKIT_TYPE_WEB_SETTINGS as WEBKIT_TYPE_SETTINGS and
3201         WEBKIT_IS_WEB_SETTINGS as WEBKIT_IS_SETTINGS.
3202
3203         * UIProcess/API/gtk/WebKitSettings.cpp:
3204         (webkit_settings_init):
3205         (webkit_settings_new):
3206         (webkit_settings_get_enable_javascript):
3207         (webkit_settings_set_enable_javascript):
3208         (webkit_settings_get_auto_load_images):
3209         (webkit_settings_set_auto_load_images):
3210         (webkit_settings_get_load_icons_ignoring_image_load_setting):
3211         (webkit_settings_set_load_icons_ignoring_image_load_setting):
3212         (webkit_settings_get_enable_offline_web_application_cache):
3213         (webkit_settings_set_enable_offline_web_application_cache):
3214         (webkit_settings_get_enable_html5_local_storage):
3215         (webkit_settings_set_enable_html5_local_storage):
3216         (webkit_settings_get_enable_html5_database):
3217         (webkit_settings_set_enable_html5_database):
3218         (webkit_settings_get_enable_xss_auditor):
3219         (webkit_settings_set_enable_xss_auditor):
3220         (webkit_settings_get_enable_frame_flattening):
3221         (webkit_settings_set_enable_frame_flattening):
3222         (webkit_settings_get_enable_plugins):
3223         (webkit_settings_set_enable_plugins):
3224         (webkit_settings_get_enable_java):
3225         (webkit_settings_set_enable_java):
3226         (webkit_settings_get_javascript_can_open_windows_automatically):
3227         (webkit_settings_set_javascript_can_open_windows_automatically):
3228         (webkit_settings_get_enable_hyperlink_auditing):
3229         (webkit_settings_set_enable_hyperlink_auditing):
3230         * UIProcess/API/gtk/WebKitSettings.h:
3231
3232 2011-10-26  Andras Becsi  <andras.becsi@nokia.com>
3233
3234         [Qt][WK2] Rename clean-up of QtPinchGestureRecognizer and QtViewportInteractionEngine
3235         https://bugs.webkit.org/show_bug.cgi?id=70903
3236
3237         Reviewed by Kenneth Rohde Christiansen.
3238
3239         Rename computeTouchCenter to computePinchCenter,
3240         and use the plural form of coordinate where appropriate.
3241
3242         * UIProcess/API/qt/qtouchwebview.cpp:
3243         (QTouchWebViewPrivate::_q_viewportUpdated):
3244         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
3245         (WebKit::computePinchCenter):
3246         (WebKit::QtPinchGestureRecognizer::recognize):
3247         * UIProcess/qt/QtViewportInteractionEngine.cpp:
3248         (WebKit::contentRectInViewportCoordinates):
3249         (WebKit::QtViewportInteractionEngine::event):
3250         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
3251         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
3252         (WebKit::QtViewportInteractionEngine::scaleContent):
3253         * UIProcess/qt/QtViewportInteractionEngine.h:
3254
3255 2011-10-26  Zalan Bujtas  <zbujtas@gmail.com>
3256
3257         Name viewport change event consistently.
3258         https://bugs.webkit.org/show_bug.cgi?id=70901
3259
3260         Reviewed by Kenneth Rohde Christiansen.
3261
3262         Use ViewportPropertiesDidChange term consistently throughout WebKit.
3263
3264         * UIProcess/API/efl/PageClientImpl.cpp:
3265         (WebKit::PageClientImpl::didChangeViewportProperties):
3266         * UIProcess/API/efl/PageClientImpl.h:
3267         * UIProcess/API/gtk/PageClientImpl.cpp:
3268         (WebKit::PageClientImpl::didChangeViewportProperties):
3269         * UIProcess/API/gtk/PageClientImpl.h:
3270         * UIProcess/API/mac/PageClientImpl.h:
3271         * UIProcess/API/mac/PageClientImpl.mm:
3272         (WebKit::PageClientImpl::didChangeViewportProperties):
3273         * UIProcess/API/qt/qdesktopwebview.cpp:
3274         (QDesktopWebViewPrivate::didChangeViewportProperties):
3275         * UIProcess/API/qt/qdesktopwebview_p.h:
3276         * UIProcess/API/qt/qtouchwebview.cpp:
3277         (QTouchWebViewPrivate::didChangeViewportProperties):
3278         * UIProcess/API/qt/qtouchwebview_p.h:
3279         * UIProcess/PageClient.h:
3280         * UIProcess/WebPageProxy.cpp:
3281         (WebKit::WebPageProxy::didChangeViewportProperties):
3282         * UIProcess/WebPageProxy.h:
3283         * UIProcess/WebPageProxy.messages.in:
3284         * UIProcess/qt/QtDesktopWebPageProxy.cpp:
3285         (QtDesktopWebPageProxy::didChangeViewportProperties):
3286         * UIProcess/qt/QtDesktopWebPageProxy.h:
3287         * UIProcess/qt/QtTouchViewInterface.cpp:
3288         (WebKit::QtTouchViewInterface::didChangeViewportProperties):
3289         * UIProcess/qt/QtTouchViewInterface.h:
3290         * UIProcess/qt/QtViewInterface.h:
3291         * UIProcess/qt/QtWebPageProxy.cpp:
3292         (QtWebPageProxy::didChangeViewportProperties):
3293         * UIProcess/qt/QtWebPageProxy.h:
3294         * UIProcess/win/WebView.cpp:
3295         (WebKit::WebView::didChangeViewportProperties):
3296         * UIProcess/win/WebView.h:
3297         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3298         (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
3299         * WebProcess/WebCoreSupport/WebChromeClient.h:
3300
3301 2011-10-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3302
3303         [GTK] Remove g_thread_init() calls from gtk-doc scanner too
3304         https://bugs.webkit.org/show_bug.cgi?id=70908
3305
3306         Reviewed by Gustavo Noronha Silva.
3307
3308         * UIProcess/API/gtk/docs/GNUmakefile.am:
3309
3310 2011-10-25  Andras Becsi  <andras.becsi@nokia.com>
3311
3312         [Qt][WK2] Add the animations on the ViewportInteractionEngine
3313         https://bugs.webkit.org/show_bug.cgi?id=66664
3314
3315         Reviewed by Kenneth Rohde Christiansen.
3316
3317         Introduce a QScroller based panning and a QVariantAnimation based scale animation.
3318         QScroller also handles flick gestures and animates overshoot.
3319         If a pinch gesture ends, the scale animation will scale and reposition the content
3320         such that it is within valid boundaries. The content is by default animated such
3321         that the content position as seen in the center of the visible viewport stays
3322         in the center, unless the content would be out of valid bounds.
3323         The patch also simplifies the ViewportUpdateGuard by using reference counting
3324         instead of a boolean for defering update requests.
3325
3326         * UIProcess/qt/QtPanGestureRecognizer.cpp:
3327         (WebKit::QtPanGestureRecognizer::recognize):
3328         * UIProcess/qt/QtPanGestureRecognizer.h:
3329         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
3330         (WebKit::QtPinchGestureRecognizer::recognize):
3331         * UIProcess/qt/QtTouchWebPageProxy.cpp:
3332         (QtTouchWebPageProxy::doneWithTouchEvent):
3333         * UIProcess/qt/QtViewportInteractionEngine.cpp:
3334         (WebKit::bindToScaleLimits):
3335         (WebKit::ViewportUpdateGuard::ViewportUpdateGuard):
3336         (WebKit::ViewportUpdateGuard::~ViewportUpdateGuard):
3337         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
3338         (WebKit::QtViewportInteractionEngine::innerBoundedScale):
3339         (WebKit::QtViewportInteractionEngine::outerBoundedScale):
3340         (WebKit::QtViewportInteractionEngine::updateVisibleRect):
3341         (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
3342         (WebKit::QtViewportInteractionEngine::event):
3343         (WebKit::QtViewportInteractionEngine::stopAnimations):
3344         (WebKit::QtViewportInteractionEngine::calculateBoundariesForScale):
3345         (WebKit::QtViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
3346         (WebKit::QtViewportInteractionEngine::reset):
3347         (WebKit::QtViewportInteractionEngine::setConstraints):
3348         (WebKit::QtViewportInteractionEngine::panGestureStarted):
3349         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
3350         (WebKit::QtViewportInteractionEngine::panGestureCancelled):
3351         (WebKit::QtViewportInteractionEngine::panGestureEnded):
3352         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
3353         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
3354         (WebKit::QtViewportInteractionEngine::pinchGestureEnded):
3355         (WebKit::QtViewportInteractionEngine::contentViewportChanged):
3356         * UIProcess/qt/QtViewportInteractionEngine.h:
3357         (WebKit::QtViewportInteractionEngine::scroller):
3358         (WebKit::QtViewportInteractionEngine::ScaleAnimation::ScaleAnimation):
3359         (WebKit::QtViewportInteractionEngine::ScaleAnimation::updateCurrentValue):
3360
3361 2011-10-26  Zeno Albisser  <zeno.albisser@nokia.com>
3362
3363         [Qt][WK2] Rewrite MiniBrowser in QML
3364         https://bugs.webkit.org/show_bug.cgi?id=70315
3365
3366         Add the first QML based implementation of MiniBrowser.
3367
3368         Patch by Jocelyn Turcotte <jocelyn.turcotte@nokia.com>,
3369                  Zeno Albisser <zeno.albisser@nokia.com>
3370
3371         Reviewed by Tor Arne Vestbø.
3372
3373         * UIProcess/API/qt/qdesktopwebview.cpp:
3374         (QDesktopWebView::mousePressEvent):
3375
3376  2011-10-20  Zeno Albisser  <zeno.albisser@nokia.com>
3377
3378         [Qt][WK2] Disable Context Menus until we have a proper QML implementation
3379         https://bugs.webkit.org/show_bug.cgi?id=70537
3380
3381         This is just a temporary fix to avoid crashes in QtGui based
3382         MiniBrowser that does not link to QtWidgets.
3383
3384         Patch by Jocelyn Turcotte <jocelyn.turcotte@nokia.com>,
3385                  Zeno Albisser <zeno.albisser@nokia.com>
3386
3387         Reviewed by Simon Hausmann.
3388
3389         * UIProcess/qt/WebContextMenuProxyQt.cpp:
3390         (WebKit::WebContextMenuProxyQt::showContextMenu):
3391         (WebKit::WebContextMenuProxyQt::createContextMenu):
3392
3393 2011-10-25  Zeno Albisser  <zeno.albisser@nokia.com>
3394
3395         [Qt][WK2] Remove QAction from MiniBrowser
3396         https://bugs.webkit.org/show_bug.cgi?id=70525
3397
3398         In order to rewrite MiniBrowser in QML we need a suitable
3399         mechanism for triggering navigation actions.
3400         Due to the QtWidgets dependency of QAction the current
3401         solution is not suitable anymore. Therefore we introduce
3402         invokable methods and export properties in QWebNavigationController.
3403
3404         Patch by Jocelyn Turcotte <jocelyn.turcotte@nokia.com>,
3405                  Zeno Albisser <zeno.albisser@nokia.com>
3406
3407         Reviewed by Simon Hausmann.
3408
3409         * UIProcess/API/qt/WKView.h:
3410         * UIProcess/API/qt/qdesktopwebview.h:
3411         * UIProcess/API/qt/qtouchwebpage.h:
3412         * UIProcess/API/qt/qwebkittypes.h: Removed.
3413         * UIProcess/API/qt/qwebnavigationcontroller.cpp:
3414         (QWebNavigationController::QWebNavigationController):
3415         (QWebNavigationController::canGoBack):
3416         (QWebNavigationController::canGoForward):
3417         (QWebNavigationController::canStop):
3418         (QWebNavigationController::canReload):
3419         (QWebNavigationController::goBack):
3420         (QWebNavigationController::goForward):
3421         (QWebNavigationController::stop):
3422         (QWebNavigationController::reload):
3423         * UIProcess/API/qt/qwebnavigationcontroller.h:
3424         * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp:
3425         (tst_CommonViewTests::backAndForward):
3426         (tst_CommonViewTests::reload):
3427         (tst_CommonViewTests::stop):
3428         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
3429         (WebViewAbstraction::goBack):
3430         (WebViewAbstraction::goForward):
3431         (WebViewAbstraction::stop):
3432         (WebViewAbstraction::reload):
3433         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h:
3434         * UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp:
3435         (tst_QDesktopWebView::navigationStatusAtStartup):
3436         (LoadStartedCatcher::onLoadStarted):
3437         (tst_QDesktopWebView::stopEnabledAfterLoadStarted):
3438         * UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp:
3439         (tst_QTouchWebView::navigationStatusAtStartup):
3440         * UIProcess/qt/ClientImpl.cpp:
3441         (dispatchLoadSucceeded):
3442         (dispatchLoadFailed):
3443         (qt_wk_didStartProvisionalLoadForFrame):
3444         (qt_wk_didCommitLoadForFrame):
3445         (qt_wk_didSameDocumentNavigationForFrame):
3446         * UIProcess/qt/QtWebPageProxy.cpp:
3447         (QtWebPageProxy::QtWebPageProxy):
3448         (QtWebPageProxy::canGoBack):
3449         (QtWebPageProxy::goBack):
3450         (QtWebPageProxy::canGoForward):
3451         (QtWebPageProxy::goForward):
3452         (QtWebPageProxy::canStop):
3453         (QtWebPageProxy::stop):
3454         (QtWebPageProxy::canReload):
3455         (QtWebPageProxy::reload):
3456         (QtWebPageProxy::navigationStateChanged):
3457         (QtWebPageProxy::didRelaunchProcess):
3458         (QtWebPageProxy::processDidCrash):
3459         * UIProcess/qt/QtWebPageProxy.h:
3460         * WebKit2API.pri:
3461
3462 2011-10-26  Ryosuke Niwa  <rniwa@webkit.org>
3463
3464         Another GTK build fix attempt after r98413 and r98416.
3465
3466         * WebProcess/Plugins/PluginProxy.cpp:
3467         (WebKit::PluginProxy::paint):
3468         (WebKit::PluginProxy::geometryDidChange):
3469         (WebKit::PluginProxy::update):
3470
3471 2011-10-25  Ryosuke Niwa  <rniwa@webkit.org>
3472
3473         C/C++ needs ; after each statement.
3474
3475         * PluginProcess/PluginControllerProxy.cpp:
3476         (WebKit::PluginControllerProxy::geometryDidChange):
3477
3478 2011-10-25  Ryosuke Niwa  <rniwa@webkit.org>
3479
3480         GTK build fix attempt after r98413 and r98416.
3481
3482         * PluginProcess/PluginControllerProxy.cpp:
3483         (WebKit::PluginControllerProxy::paint):
3484         (WebKit::PluginControllerProxy::geometryDidChange):
3485
3486 2011-10-25  Mark Hahnenberg  <mhahnenberg@apple.com>
3487
3488         Remove deletePropertyVirtual
3489         https://bugs.webkit.org/show_bug.cgi?id=70738
3490
3491         Reviewed by Geoffrey Garen.
3492
3493         Removed all declarations and definitions of deletePropertyVirtual.
3494         Also replaced all call sites to deletePropertyVirtual with a 
3495         corresponding lookup in the MethodTable.
3496
3497         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3498         * WebProcess/Plugins/Netscape/JSNPObject.h:
3499         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
3500         (WebKit::NPJSObject::removeProperty):
3501
3502 2011-10-25  Brent Fulgham  <bfulgham@webkit.org>
3503
3504         [WinCairo] Unreviewed build fix after r97587.
3505
3506         * win/WebKit2CFLite.def:
3507
3508 2011-10-25  Anders Carlsson  <andersca@apple.com>
3509
3510         CG plug-ins are always given a context with a scale factor of 1, even when the device scale factor is something else
3511         https://bugs.webkit.org/show_bug.cgi?id=67227
3512         <rdar://problem/10048319>
3513
3514         Reviewed by Sam Weinig.
3515
3516         * PluginProcess/PluginControllerProxy.cpp:
3517         (WebKit::PluginControllerProxy::paint):
3518         Apply the scale factor when painting.
3519
3520         * WebProcess/Plugins/PluginProxy.cpp:
3521         (WebKit::PluginProxy::paint):
3522         Apply the scale factor when painting.
3523
3524         (WebKit::PluginProxy::geometryDidChange):
3525         Make sure to apply the contents scale factor to the backing store size.
3526
3527         (WebKit::PluginProxy::update):
3528         Apply the scale factor (when painting).
3529
3530 2011-10-25  Mark Hahnenberg  <mhahnenberg@apple.com>
3531
3532         Remove putVirtual
3533         https://bugs.webkit.org/show_bug.cgi?id=70740
3534
3535         Reviewed by Geoffrey Garen.
3536
3537         Removed all declarations and definitions of putVirtual.
3538         Also replaced all call sites to putVirtual with a 
3539         corresponding lookup in the MethodTable.
3540
3541         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3542         * WebProcess/Plugins/Netscape/JSNPObject.h:
3543         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
3544         (WebKit::NPJSObject::setProperty):
3545
3546 2011-10-25  Anders Carlsson  <andersca@apple.com>
3547
3548         Plug-ins have no way to find out when the device scale factor changes
3549         https://bugs.webkit.org/show_bug.cgi?id=67226
3550         <rdar://problem/10048276>
3551
3552         Reviewed by Sam Weinig.
3553
3554         * PluginProcess/PluginControllerProxy.cpp:
3555         (WebKit::PluginControllerProxy::geometryDidChange):
3556         * PluginProcess/PluginControllerProxy.h:
3557         This now takes the contentsScaleFactor and calls contentsScaleFactorChanged on its plug-in
3558         if the scale factor changes.
3559
3560         * PluginProcess/PluginControllerProxy.messages.in:
3561         GeometryDidChange now takes a contents scale factor parameter.
3562
3563         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3564         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3565         (WebKit::NetscapePlugin::contentsScaleFactorChanged):
3566         Implement contentsScaleFactorChanged and call NPP_SetValue with the new scale factor.
3567
3568         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
3569         (WebKit::BuiltInPDFView::contentsScaleFactorChanged):
3570         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
3571         Add stub.
3572
3573         * WebProcess/Plugins/Plugin.h:
3574         Add pure virtual contentsScaleFactorChanged member function.
3575
3576         * WebProcess/Plugins/PluginProxy.cpp:
3577         (WebKit::PluginProxy::geometryDidChange):
3578         Add geometryDidChange overload that doesn't take any parameters. Make it send over the
3579         new scale factor to the plug-in process.
3580
3581         (WebKit::PluginProxy::contentsScaleFactorChanged):
3582         Call geometryDidChange.
3583
3584         * WebProcess/Plugins/PluginView.cpp:
3585         (WebKit::PluginView::setDeviceScaleFactor):
3586         Call Plugin::contentsScaleFactorChanged.
3587
3588         * WebProcess/WebPage/WebPage.cpp:
3589         (WebKit::WebPage::setDeviceScaleFactor):
3590         Call setDeviceScaleFactor on all registered plug-ins.
3591
3592 2011-10-25  Beth Dakin  <bdakin@apple.com>
3593
3594         https://bugs.webkit.org/show_bug.cgi?id=70852
3595         Setting up a HiDPI base-level GraphicsContext should be more straightforward for 
3596         WebKit2
3597
3598         Reviewed by Dan Bernstein.
3599
3600         When we need a base-level HiDPI GraphicsContext, call into new GraphicsContext api 
3601         GraphicsContext::applyDeviceScaleFactor() rather than manually scaling and 
3602         adjusting the base CTM.
3603         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3604         (WebKit::DrawingAreaImpl::display):
3605         * WebProcess/WebPage/WebPage.cpp:
3606         (WebKit::WebPage::snapshotInViewCoordinates):
3607         (WebKit::WebPage::scaledSnapshotInDocumentCoordinates):
3608
3609 2011-10-25  Anders Carlsson  <andersca@apple.com>
3610
3611         Plug-ins have to use JavaScript to find out the current device scale factor
3612         https://bugs.webkit.org/show_bug.cgi?id=67225
3613         <rdar://problem/10048258>
3614
3615         Reviewed by Darin Adler.
3616
3617         * PluginProcess/PluginControllerProxy.cpp:
3618         (WebKit::PluginControllerProxy::PluginControllerProxy):
3619         Initialize m_contentsScaleFactor.
3620
3621         * PluginProcess/PluginControllerProxy.h:
3622         Add contentsScaleFactor member function and m_contentsScaleFactor member variable.
3623
3624         * PluginProcess/PluginCreationParameters.cpp:
3625         (WebKit::PluginCreationParameters::PluginCreationParameters):
3626         (WebKit::PluginCreationParameters::encode):
3627         (WebKit::PluginCreationParameters::decode):
3628         * PluginProcess/PluginCreationParameters.h:
3629         Add contentsScaleFactor to the creation parameters.
3630
3631         * PluginProcess/mac/PluginControllerProxyMac.mm:
3632         (WebKit::PluginControllerProxy::contentsScaleFactor):
3633         Return the cached m_contentsScaleFactor.
3634
3635         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3636         (WebKit::NPN_GetValue):
3637         Handle getting the scale factor by calling NetscapePlugin::contentsScaleFactor.
3638
3639         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3640         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3641         (WebKit::NetscapePlugin::contentsScaleFactor):
3642         Ask the plug-in controller for the contents scale factor.
3643
3644         * WebProcess/Plugins/PluginController.h:
3645         Add contentsScaleFactor pure virtual member function.
3646
3647         * WebProcess/Plugins/PluginProxy.cpp:
3648         (WebKit::PluginProxy::initialize):
3649         Set contentsScaleFactor in the creation parameters.
3650
3651         * WebProcess/Plugins/PluginView.cpp:
3652         (WebKit::PluginView::contentsScaleFactor):
3653         Get the device scale factor from the page.
3654
3655         * WebProcess/Plugins/PluginView.h:
3656         Add contentsScaleFactor().
3657
3658         * WebProcess/WebPage/WebPage.cpp:
3659         (WebKit::WebPage::setDeviceScaleFactor):
3660         Bail if the scale factor didn't change.
3661
3662 2011-10-25  Sam Weinig  <sam@webkit.org>
3663
3664         Flesh out WKBrowsingContextLoadDelegate a bit
3665         https://bugs.webkit.org/show_bug.cgi?id=70846
3666
3667         Add didReceiveServerRedirectForProvisionalLoad, didFailProvisionalLoad
3668         and didFailLoad.
3669
3670         Reviewed by Anders Carlsson.
3671
3672         Test: WKBrowsingContextLoadDelegateTest
3673
3674         * UIProcess/API/mac/WKBrowsingContextController.mm:
3675         (didReceiveServerRedirectForProvisionalLoadForFrame):
3676         (didFailProvisionalLoadWithErrorForFrame):
3677         (didFailLoadWithErrorForFrame):
3678         (setUpPageLoaderClient):
3679         * UIProcess/API/mac/WKBrowsingContextLoadDelegate.h:
3680
3681 2011-10-25  Anders Carlsson  <andersca@apple.com>
3682
3683         Assertion failure when zooming a PDF in an iframe
3684         https://bugs.webkit.org/show_bug.cgi?id=70849
3685
3686         Reviewed by Alexey Proskuryakov.
3687
3688         If the plug-in doesn't want window relative coordinates, we shouldn't give the plug-in window relative coordinates.
3689
3690         * WebProcess/Plugins/PluginView.cpp:
3691         (WebKit::PluginView::viewGeometryDidChange):
3692
3693 2011-10-25  Sam Weinig  <sam@webkit.org>
3694
3695         Make loadFileURL:restrictToFilesWithin: work, albeit, without the correct
3696         restrictions for now.
3697
3698         Reviewed by Anders Carlsson.
3699
3700         * UIProcess/API/mac/WKBrowsingContextController.mm:
3701         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
3702
3703 2011-10-25  Anders Carlsson  <andersca@apple.com>
3704
3705         PDF SUBFRAMES: Incomplete repaint after pinch to zoom
3706         https://bugs.webkit.org/show_bug.cgi?id=70821
3707         <rdar://problem/10312733>
3708
3709         Reviewed by Simon Fraser.
3710
3711         Add a new pure virtual member function, Plugin::wantsWindowRelativeCoordinates.
3712         If a plug-in subclass returns true, we'll keep giving the plug-in coordinates that
3713         are relative to the containing window. If a plug-in subclass returns false, we'll give it
3714         coordinates in a much more sane coordinate system, with the origin at the top left corner of the plug-in.
3715
3716         Change BuiltinPDFView to return false so that it'll work correctly with pinch to zoom.
3717         
3718         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3719         (WebKit::NetscapePlugin::wantsWindowRelativeCoordinates):
3720         Make wantsWindowRelativeCoordinates return true.
3721
3722         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
3723         (WebKit::BuiltInPDFView::paint):
3724         Remove translation since the graphics context is already set up in the right way.
3725
3726         (WebKit::BuiltInPDFView::paintContent):
3727         No need to offset by the plug-in view location anymore.
3728
3729         (WebKit::BuiltInPDFView::paintControls):
3730         Account for the scrollbars being children of the parent scroll view here.
3731
3732         (WebKit::BuiltInPDFView::wantsWindowRelativeCoordinates):
3733         Return false.
3734
3735         (WebKit::BuiltInPDFView::convertFromContainingViewToScrollbar):
3736         Implement this so that scrollbar hit testing works correctly.
3737
3738         * WebProcess/Plugins/Plugin.h:
3739         Add wantsWindowRelativeCoordinates.
3740
3741         * WebProcess/Plugins/PluginProxy.cpp:
3742         (WebKit::PluginProxy::wantsWindowRelativeCoordinates):
3743         Return true for now.
3744
3745         * WebProcess/Plugins/PluginView.cpp:
3746         (WebKit::PluginView::renderer):
3747         Add simple getter.
3748
3749         (WebKit::PluginView::paint):
3750         Handle the case when the plug-in doesn't want window relative coordinates.
3751
3752         (WebKit::PluginView::transformsAffectFrameRect):
3753         Return true here.
3754
3755         (WebKit::PluginView::viewGeometryDidChange):
3756         No need to adjust the bounds to account for the scale factor now, since the frame rect will always be the
3757         same regardless of the transform.
3758
3759         (WebKit::PluginView::clipRectInWindowCoordinates):
3760         Ditto.
3761
3762 2011-10-25  John Sullivan  <sullivan@apple.com>
3763
3764         "Open with" item missing from PDF context menu in some cases
3765         https://bugs.webkit.org/show_bug.cgi?id=70828
3766         <rdar://problem/10034302>
3767
3768         Reviewed by Anders Carlsson.
3769
3770         * UIProcess/API/mac/PDFViewController.mm:
3771         (insertOpenWithDefaultPDFMenuItem):
3772         New helper function, extracted from -menuForEvent:. Identical to original code except
3773         that it inserts the item at a specified index, rather than always at the end.
3774         (-[WKPDFView menuForEvent:]):
3775         Now keeps track of whether the Open With item has been inserted while iterating through
3776         the PDFKit-supplied menu items looking for a "Copy" item. If a "Copy" item is not found,
3777         inserts the Open With item at the top of the context menu.
3778
3779 2011-10-25  Zeno Albisser  <zeno.albisser@nokia.com>
3780
3781         [Qt][WK2] QDesktopWebView and QTouchWebView should be declared in the meta type system.
3782         https://bugs.webkit.org/show_bug.cgi?id=70693
3783
3784         This change allows us to use the template based features of the meta type system
3785         such as using the WebView classes as types for QVariant.
3786
3787         Reviewed by Simon Hausmann.
3788
3789         * UIProcess/API/qt/qdesktopwebview.h:
3790         * UIProcess/API/qt/qtouchwebview.h:
3791
3792 2011-10-25  Zalan Bujtas  <zbujtas@gmail.com>
3793
3794         [Qt][WK2] Remove redundant setPageIsVisible() API
3795         https://bugs.webkit.org/show_bug.cgi?id=70520
3796
3797         Use DrawingAreaProxy::visibilityDidChange() instead of DrawingAreaProxy::setPageIsVisible()
3798         Remove DrawingAreaProxy::setPageIsVisible(), not used anymore.
3799         This change disables the ability of suspending and resuming painting for TiledDrawingAreaProxy.
3800         However, TiledDrawingAreaProxy is about to be deprecated by using DrawingAreaProxyImpl
3801         as the UI process drawing area proxy for tiled based rendering.
3802
3803         Reviewed by Simon Hausmann.
3804
3805         * UIProcess/API/qt/qtouchwebpage.cpp:
3806         (QTouchWebPage::QTouchWebPage):
3807         (QTouchWebPagePrivate::setPage):
3808         * UIProcess/API/qt/qtouchwebpage.h:
3809         * UIProcess/API/qt/qtouchwebview.cpp:
3810         (QTouchWebView::QTouchWebView):
3811         (QTouchWebView::touchEvent):
3812         (QTouchWebView::onVisibleChanged):
3813         * UIProcess/API/qt/qtouchwebview.h:
3814         * UIProcess/DrawingAreaProxy.h:
3815         * UIProcess/DrawingAreaProxyImpl.cpp:
3816         * UIProcess/DrawingAreaProxyImpl.h:
3817         * UIProcess/TiledDrawingAreaProxy.cpp:
3818         (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
3819         (WebKit::TiledDrawingAreaProxy::deviceScaleFactorDidChange):
3820         * UIProcess/TiledDrawingAreaProxy.h:
3821         * UIProcess/WebPageProxy.cpp:
3822         (WebKit::WebPageProxy::viewStateDidChange):
3823         * UIProcess/qt/QtWebPageProxy.cpp:
3824         * UIProcess/qt/QtWebPageProxy.h:
3825
3826 2011-10-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3827
3828         [GTK] Add go_to_back_forward_list_item() to WebKit2 GTK+ API
3829         https://bugs.webkit.org/show_bug.cgi?id=69825
3830
3831         Reviewed by Martin Robinson.
3832
3833         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
3834         (webkitBackForwardListItemGetWKItem):
3835         * UIProcess/API/gtk/WebKitBackForwardListPrivate.h:
3836         * UIProcess/API/gtk/WebKitWebView.cpp:
3837         (webkit_web_view_go_to_back_forward_list_item):
3838         * UIProcess/API/gtk/WebKitWebView.h:
3839         * UIProcess/API/gtk/tests/TestBackForwardList.cpp:
3840         (testBackForwardListNavigation):
3841
3842 2011-10-25  Vamshikrishna Yellenki  <vamshi@motorola.com>
3843
3844         [WK2]Critical warning while building WebKit2 GTK+
3845         https://bugs.webkit.org/show_bug.cgi?id=70591
3846
3847         Reviewed by Martin Robinson.
3848
3849         * WebProcess/WebPage/WebPage.cpp: Included DataObjectGtk.h to avoid warnings for GTK
3850
3851 2011-10-24  Sam Weinig  <sam@webkit.org>
3852
3853         Simplify url accessors on WKBrowsingContextController
3854         https://bugs.webkit.org/show_bug.cgi?id=70797
3855
3856         Reviewed by Anders Carlsson.
3857
3858         * UIProcess/API/C/WKPage.cpp:
3859         (WKPageCopyActiveURL):
3860         (WKPageCopyProvisionalURL):
3861         (WKPageCopyCommittedURL):
3862         * UIProcess/API/C/WKPage.h:
3863         Add accessors to C SPI.
3864
3865         * UIProcess/API/mac/WKBrowsingContextController.h:
3866         Remove unreachableURL accessor for now. It may make a glorious return when we have
3867         error page support.
3868
3869         * UIProcess/API/mac/WKBrowsingContextController.mm:
3870         (-[WKBrowsingContextController activeURL]):
3871         (-[WKBrowsingContextController provisionalURL]):
3872         (-[WKBrowsingContextController committedURL]):
3873         Implement these in terms of the new C SPI.
3874
3875         * UIProcess/WebPageProxy.cpp:
3876         (WebKit::WebPageProxy::activeURL):
3877         Add computation of the "active" URL, which is the URL one would show
3878         in an address field. It is the pending URL when there is one, the provisional
3879         URL when there is one, and otherwise the committed/final URL.
3880
3881         (WebKit::WebPageProxy::provisionalURL):
3882         (WebKit::WebPageProxy::committedURL):
3883         Add access to the main frame URL.
3884         * UIProcess/WebPageProxy.h:
3885
3886 2011-10-24  Sam Weinig  <sam@webkit.org>
3887
3888         Hook up minimalist load delegate to WKBrowsingContextController
3889         https://bugs.webkit.org/show_bug.cgi?id=70764
3890
3891         Reviewed by Simon Fraser.
3892
3893         * UIProcess/API/mac/WKBrowsingContextController.h:
3894         * UIProcess/API/mac/WKBrowsingContextController.mm:
3895         (-[WKBrowsingContextController loadDelegate]):
3896         (-[WKBrowsingContextController setLoadDelegate:]):
3897         Add loadDelegate getter/setter. As per convention, the delegate is not
3898         retained.
3899
3900         (didStartProvisionalLoadForFrame):
3901         (didCommitLoadForFrame):
3902         (didFinishLoadForFrame):
3903         (setUpPageLoaderClient):
3904         (-[WKBrowsingContextController initWithPageRef:]):
3905         Hookup the delegate to a WKPageLoaderClient.
3906
3907         * UIProcess/API/mac/WKBrowsingContextLoadDelegate.h: Added.
3908         Add load delegate as a proper protocol.
3909
3910         * WebKit2.xcodeproj/project.pbxproj:
3911         Add new file.
3912
3913 2011-10-24  Michael Saboff  <msaboff@apple.com>
3914
3915         WebKit doesn't build with recent changes to libdispatch
3916         https://bugs.webkit.org/show_bug.cgi?id=70737
3917
3918         Added initialization for new WebKitSystemInterface function 
3919         CreateVMPressureDispatchOnMainQueue.
3920
3921         Reviewed by Geoffrey Garen.
3922
3923         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3924         (InitWebCoreSystemInterface):
3925
3926 2011-10-24  Sam Weinig  <sam@webkit.org>
3927
3928         Add URL getters for the WKBrowsingContextController
3929         https://bugs.webkit.org/show_bug.cgi?id=70752
3930
3931         Reviewed by Anders Carlsson.
3932
3933         * UIProcess/API/mac/WKBrowsingContextController.h:
3934         * UIProcess/API/mac/WKBrowsingContextController.mm:
3935         (autoreleased):
3936         Added helpers for autoreleasing.
3937
3938         (-[WKBrowsingContextController activeURL]):
3939         Added buy not implemented yet.
3940
3941         (-[WKBrowsingContextController pendingURL]):
3942         (-[WKBrowsingContextController provisionalURL]):
3943         (-[WKBrowsingContextController commitedURL]):
3944         (-[WKBrowsingContextController unreachableURL]):
3945         Added getters.
3946
3947         (-[WKBrowsingContextController title]):
3948         Convert to new autoreleased helper.
3949
3950 2011-10-24  Sam Weinig  <sam@webkit.org>
3951
3952         Add zoom and title support to Objective-C WebKit2 API
3953         https://bugs.webkit.org/show_bug.cgi?id=70744
3954
3955         Reviewed by Darin Adler.
3956
3957         * UIProcess/API/mac/WKBrowsingContextController.h:
3958         * UIProcess/API/mac/WKBrowsingContextController.mm:
3959         (-[WKBrowsingContextController title]):
3960         (-[WKBrowsingContextController textZoom]):
3961         (-[WKBrowsingContextController setTextZoom:]):
3962         (-[WKBrowsingContextController pageZoom]):
3963         (-[WKBrowsingContextController setPageZoom:]):
3964
3965 2011-10-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3966
3967         [GTK] Fix make distcheck build
3968         https://bugs.webkit.org/show_bug.cgi?id=69745
3969
3970         Reviewed by Martin Robinson.
3971
3972         * GNUmakefile.am:
3973
3974 2011-10-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3975
3976         [GTK] Initial implementation of back forward list for WebKit2 GTK+ API
3977         https://bugs.webkit.org/show_bug.cgi?id=69343
3978
3979         Reviewed by Martin Robinson.
3980
3981         * GNUmakefile.am: Add new files to compilation.
3982         * UIProcess/API/gtk/WebKitBackForwardList.cpp: Added.
3983         (webkitBackForwardListFinalize):
3984         (webkit_back_forward_list_init):
3985         (webkit_back_forward_list_class_init):
3986         (webkitBackForwardListGetOrCreateItem): Helper function that
3987         creates a new WebKitBackForwardListItem for the given
3988         WebBackForwardListItem or returns it from the cache if it's
3989         already cached.
3990         (webkitBackForwardListCreateList): Helper function to convert a
3991         WKArray of WebBackForwardListItems into a GList of
3992         WebKitBackForwardListItems.
3993         (webkitBackForwardListCreate): Create a new WebKitBackForwardList.
3994         (webkitBackForwardListChanged): Emits changed signal when the back
3995         forward list changes.
3996         (webkit_back_forward_list_get_current_item):
3997         (webkit_back_forward_list_get_back_item):
3998         (webkit_back_forward_list_get_forward_item):
3999         (webkit_back_forward_list_get_nth_item):
4000         (webkit_back_forward_list_get_length):
4001         (webkit_back_forward_list_get_back_list):
4002         (webkit_back_forward_list_get_back_list_with_limit):
4003         (webkit_back_forward_list_get_forward_list):
4004         (webkit_back_forward_list_get_forward_list_with_limit):
4005         * UIProcess/API/gtk/WebKitBackForwardList.h: Added.
4006         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Added.
4007         (webkitBackForwardListItemFinalize):
4008         (webkit_back_forward_list_item_init):
4009         (webkit_back_forward_list_item_class_init):
4010         (historyItemsMap): Global cache for WebKitBackForwardListItems.
4011         (webkitBackForwardListItemFinalized):
4012         (webkitBackForwardListItemGetOrCreate): Helper function that
4013         creates a new WebKitBackForwardListItem for the given
4014         WebBackForwardListItem or returns it from the global cache if it's
4015         already cached.
4016         (webkit_back_forward_list_item_get_uri):
4017         (webkit_back_forward_list_item_get_title):
4018         (webkit_back_forward_list_item_get_original_uri):
4019         * UIProcess/API/gtk/WebKitBackForwardListItem.h: Added.
4020         * UIProcess/API/gtk/WebKitBackForwardListPrivate.h: Added.
4021         * UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
4022         (didChangeBackForwardList): Call webkitBackForwardListChanged() to
4023         notify that the list has changed.
4024         (webkitWebLoaderClientAttachLoaderClientToPage): Add
4025         implementation for didChangeBackForwardList.
4026         * UIProcess/API/gtk/WebKitWebView.cpp:
4027         (webkitWebViewConstructed):
4028         (webkit_web_view_get_back_forward_list): Return the back forward
4029         list of the view.
4030         * UIProcess/API/gtk/WebKitWebView.h:
4031         * UIProcess/API/gtk/tests/GNUmakefile.am: Add new test.
4032         * UIProcess/API/gtk/tests/TestBackForwardList.cpp: Added.
4033         (serverCallback):
4034         (testBackForwardListNavigation):
4035         (testBackForwardListLimitAndCache):
4036         (beforeAll):
4037         (afterAll):
4038         * UIProcess/API/gtk/tests/TestMain.h:
4039         (Test::~Test): Check there are no objects leaked.
4040         (Test::objectFinalized): Callback called when a GObject is
4041         deleted, used to remove the watched object the list.
4042         (Test::assertObjectIsDeletedWhenTestFinishes): Add an object to
4043         the list of watched objects and add a weak pointer to remove it
4044         from the list when the object is finalized. If there aren't
4045         objects leaked, the list should be empty when the test finishes.
4046         * UIProcess/API/gtk/tests/WebViewTest.cpp:
4047         (WebViewTest::WebViewTest): Watch the web view to make sure it's
4048         not leaked.
4049         * UIProcess/API/gtk/tests/WebViewTest.h: Make WebViewTest inherit
4050         from Test class.
4051         * UIProcess/API/gtk/webkit2.h: Include WebKitBackForwardList.h and
4052         WebKitBackForwardListItem.h.
4053         * UIProcess/API/gtk/webkit2marshal.list:
4054
4055 2011-10-24  Carlos Garcia Campos  <cgarcia@igalia.com>
4056
4057         [GTK] Add helper function to set the loader client in WebKitWebView
4058         https://bugs.webkit.org/show_bug.cgi?id=70594
4059
4060         Reviewed by Martin Robinson.
4061
4062         * UIProcess/API/gtk/WebKitWebView.cpp:
4063         (webkitWebViewSetLoaderClient): Helper function to set the loader
4064         client.
4065         (webkitWebViewConstructed): Use webkitWebViewSetLoaderClient() to
4066         avoid unnecessary checks.
4067         (webkit_web_view_set_loader_client): Use
4068         webkitWebViewSetLoaderClient().
4069
4070 2011-10-24  Carlos Garcia Campos  <cgarcia@igalia.com>
4071
4072         [GTK] Remove g_thread_init() calls
4073         https://bugs.webkit.org/show_bug.cgi?id=70717
4074
4075         Reviewed by Xan Lopez.
4076
4077         With newer glib it's not needed anymore and with previous versions
4078         it was already called by g_type_init().
4079
4080         * UIProcess/API/gtk/tests/TestMain.cpp:
4081         (main):
4082
4083 2011-10-24  Zeno Albisser  <zeno.albisser@nokia.com>
4084
4085         [Qt][WK2] WebView does not get focus when being clicked / touched in MiniBrowser.
4086         https://bugs.webkit.org/show_bug.cgi?id=70613
4087
4088         Make TouchWebView and DesktopWebView take the focus whenever it receives
4089         a MouseClick or a TouchEvent.
4090
4091         Reviewed by Simon Hausmann.
4092
4093         * UIProcess/API/qt/qdesktopwebview.cpp:
4094         (QDesktopWebView::mousePressEvent):
4095         * UIProcess/API/qt/qtouchwebview.cpp:
4096         (QTouchWebView::touchEvent):
4097         * UIProcess/API/qt/qtouchwebview.h:
4098
4099 2011-10-24  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
4100
4101         [GTK] [WK2] Memory leaks in WebContextGtk.cpp
4102         https://bugs.webkit.org/show_bug.cgi?id=70505
4103
4104         Free the output of g_build_filename()
4105
4106         Reviewed by Martin Robinson.
4107
4108         * UIProcess/gtk/WebContextGtk.cpp:
4109         (WebKit::WebContext::platformDefaultDatabaseDirectory):
4110         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
4111
4112 2011-10-23  Mark Hahnenberg  <mhahnenberg@apple.com>
4113
4114         Remove getConstructDataVirtual
4115         https://bugs.webkit.org/show_bug.cgi?id=70638
4116
4117         Reviewed by Darin Adler.
4118
4119         Removed all declarations and definitions of getConstructDataVirtual.
4120         Also replaced all call sites to getConstructDataVirtual with a 
4121         corresponding lookup in the MethodTable.
4122
4123         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
4124         * WebProcess/Plugins/Netscape/JSNPObject.h: