1 2011-12-19 Kenneth Rohde Christiansen <kenneth@webkit.org>
3 First stab at upstreaming our virtual keyboard code
5 Reviewed by Simon Hausmann.
7 Add basic implementation of inputMethodEvent
9 * UIProcess/qt/QtWebPageEventHandler.cpp:
10 (QtWebPageEventHandler::handleEvent):
11 (QtWebPageEventHandler::inputMethodEvent):
12 * UIProcess/qt/QtWebPageEventHandler.h:
14 2011-12-19 Simon Hausmann <simon.hausmann@nokia.com>
16 [Qt][WK2] Add support for modal event loop processing for WTR
17 https://bugs.webkit.org/show_bug.cgi?id=74852
19 Reviewed by Kenneth Rohde Christiansen.
21 Add support for nested event loops, used by WebPage::runModal().
23 * Platform/qt/RunLoopQt.cpp:
27 2011-12-18 Sam Weinig <sam@webkit.org>
29 Another attempt to fix the windows build.
31 * Platform/win/WorkQueueWin.cpp:
32 (WorkQueue::performWorkOnRegisteredWorkThread):
33 (WorkQueue::dispatch):
35 2011-12-18 Sam Weinig <sam@webkit.org>
37 Try to fix the windows build.
39 * Platform/win/WorkQueueWin.cpp:
40 (WorkQueue::performWorkOnRegisteredWorkThread):
42 2011-12-18 Sam Weinig <sam@webkit.org>
44 Remove now unused WorkItem.h
45 https://bugs.webkit.org/show_bug.cgi?id=74818
47 Reviewed by Andreas Kling.
50 * Platform/CoreIPC/Connection.cpp:
51 * Platform/RunLoop.cpp:
53 * Platform/WorkItem.h: Removed.
54 * Platform/gtk/RunLoopGtk.cpp:
55 * Platform/mac/RunLoopMac.mm:
56 * Platform/mac/WorkQueueMac.cpp:
57 (WorkQueue::platformInvalidate):
58 * Platform/qt/RunLoopQt.cpp:
59 * Platform/win/RunLoopWin.cpp:
61 * UIProcess/ResponsivenessTimer.cpp:
62 * WebKit2.xcodeproj/project.pbxproj:
63 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
66 2011-12-18 Anders Carlsson <andersca@apple.com>
68 Set the main frame view scroll position asynchronously
69 https://bugs.webkit.org/show_bug.cgi?id=74823
71 Reviewed by Sam Weinig.
73 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
74 (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
75 Don't make the background red.
77 2011-12-18 Sam Weinig <sam@webkit.org>
79 Move timestamp down from PlatformEvent subclasses to the base class
80 https://bugs.webkit.org/show_bug.cgi?id=74805
82 Reviewed by Anders Carlsson.
84 * Shared/WebEventConversion.cpp:
85 (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
86 (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
87 (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
88 (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
89 (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
91 2011-12-18 Anders Carlsson <andersca@apple.com>
93 Add a scrolling thread to the scrolling coordinator
94 https://bugs.webkit.org/show_bug.cgi?id=74814
96 Reviewed by Andreas Kling.
98 Check if the scrolling coordinator can handle the wheel event before dispatching it
101 * WebProcess/WebPage/EventDispatcher.cpp:
102 (WebKit::EventDispatcher::wheelEvent):
104 2011-12-18 Anders Carlsson <andersca@apple.com>
106 EventDispatcher should keep track of all scrolling coordinators
107 https://bugs.webkit.org/show_bug.cgi?id=74810
109 Reviewed by Andreas Kling.
111 * WebProcess/WebPage/EventDispatcher.cpp:
112 (WebKit::EventDispatcher::addScrollingCoordinatorForPage):
113 Get the scrolling coordinator from the WebCore page and add it to the map.
115 (WebKit::EventDispatcher::removeScrollingCoordinatorForPage):
116 Remove the scrolling coordinator from the map.
118 (WebKit::EventDispatcher::sendDidHandleEvent):
119 Add a new helper function, currently unused.
121 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
122 (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
123 Add the scrolling coordinator.
125 (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
126 Remove the scrolling coordinator.
128 * WebProcess/WebProcess.h:
129 (WebKit::WebProcess::eventDispatcher):
132 2011-12-16 Anders Carlsson <andersca@apple.com>
134 Move everyone off of WorkItem
135 https://bugs.webkit.org/show_bug.cgi?id=74773
137 Reviewed by Darin Adler.
139 * Platform/CoreIPC/unix/ConnectionUnix.cpp:
140 (CoreIPC::Connection::open):
141 (CoreIPC::Connection::setShouldCloseConnectionOnProcessTermination):
142 * Platform/CoreIPC/win/ConnectionWin.cpp:
143 (CoreIPC::Connection::open):
144 * Platform/RunLoop.cpp:
145 (RunLoop::performWork):
147 * Platform/RunLoop.h:
148 * Platform/WorkQueue.cpp:
149 * Platform/WorkQueue.h:
150 (WorkQueue::WorkItemWin::function):
151 * Platform/gtk/WorkQueueGtk.cpp:
152 (WorkQueue::EventSource::EventSource):
153 (WorkQueue::EventSource::executeEventSource):
154 (WorkQueue::registerEventSourceHandler):
155 (WorkQueue::dispatchOnSource):
156 (WorkQueue::dispatch):
157 (WorkQueue::dispatchAfterDelay):
158 (WorkQueue::dispatchOnTermination):
159 * Platform/mac/WorkQueueMac.cpp:
160 (WorkQueue::executeFunction):
161 (WorkQueue::dispatch):
162 (WorkQueue::dispatchAfterDelay):
163 * Platform/qt/WorkQueueQt.cpp:
164 (WorkQueue::WorkItemQt::WorkItemQt):
165 (WorkQueue::WorkItemQt::~WorkItemQt):
166 (WorkQueue::WorkItemQt::execute):
167 (WorkQueue::registerSocketEventHandler):
168 (WorkQueue::dispatch):
169 (WorkQueue::dispatchAfterDelay):
170 (WorkQueue::dispatchOnTermination):
171 * Platform/win/RunLoopWin.cpp:
173 * Platform/win/WorkQueueWin.cpp:
174 (WorkQueue::WorkItemWin::WorkItemWin):
175 (WorkQueue::WorkItemWin::create):
176 (WorkQueue::HandleWorkItem::HandleWorkItem):
177 (WorkQueue::HandleWorkItem::createByAdoptingHandle):
178 (WorkQueue::registerHandle):
179 (WorkQueue::dispatch):
180 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
181 (WebKit::ProcessLauncher::launchProcess):
182 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
183 (WebKit::ProcessLauncher::launchProcess):
184 * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
185 (WebKit::ProcessLauncher::launchProcess):
186 * WebProcess/mac/CoreIPCClientRunLoop.mm:
187 (WebKit::callOnCoreIPCClientRunLoopAndWait):
189 2011-12-17 Sam Weinig <sam@webkit.org>
191 Make PlatformTouchEvent inherit from PlatformEvent
192 https://bugs.webkit.org/show_bug.cgi?id=74777
194 Reviewed by Andreas Kling.
196 * Shared/WebEventConversion.cpp:
197 (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
198 Add PlatformEvent prefix to enum types.
200 2011-12-16 Anders Carlsson <andersca@apple.com>
202 Convert more WorkItems over to WTF::Functions
203 https://bugs.webkit.org/show_bug.cgi?id=74770
205 Reviewed by Andreas Kling.
207 * Platform/WorkQueue.cpp:
208 (WorkQueue::dispatchAfterDelay):
209 * Platform/WorkQueue.h:
210 * Shared/ChildProcess.cpp:
211 (WebKit::ChildProcess::didCloseOnConnectionWorkQueue):
212 * UIProcess/Launcher/ThreadLauncher.cpp:
213 (WebKit::ThreadLauncher::launchThread):
214 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
215 (WebKit::ProcessLauncher::launchProcess):
216 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
217 (WebKit::NetscapePlugin::pluginThreadAsyncCall):
218 * WebProcess/Plugins/PluginView.cpp:
219 (WebKit::derefPluginView):
220 (WebKit::PluginView::unprotectPluginFromDestruction):
222 2011-12-16 Mark Hahnenberg <mhahnenberg@apple.com>
226 Unreviewed test fix. All Windows tests were crashing when objects who were pointing to
227 static data members across DLL boundaries were getting garbage in their pointers.
231 2011-12-16 Ryosuke Niwa <rniwa@webkit.org>
233 Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step
234 https://bugs.webkit.org/show_bug.cgi?id=74748
236 Reviewed by Eric Seidel.
238 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
239 (WebKit::WebEditorClient::registerUndoStep):
240 (WebKit::WebEditorClient::registerRedoStep):
241 * WebProcess/WebCoreSupport/WebEditorClient.h:
243 2011-12-16 Anders Carlsson <andersca@apple.com>
245 Add a pretty dumb tile cache to WebTileCacheLayer
246 https://bugs.webkit.org/show_bug.cgi?id=74753
248 Reviewed by Simon Fraser.
250 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
251 (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
252 Always do a layout here, to prevent an ASSERT(!needsLayout()) when painting.
254 2011-12-16 Anders Carlsson <andersca@apple.com>
256 TiledCoreAnimationDrawingArea should enable the scrolling coordinator
257 https://bugs.webkit.org/show_bug.cgi?id=74724
259 Reviewed by Adam Roben.
261 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
262 (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
264 2011-12-16 Sam Weinig <sam@webkit.org>
266 Give PlatformEvents a base class
267 https://bugs.webkit.org/show_bug.cgi?id=74685
269 Reviewed by Anders Carlsson.
271 Add a base class for PlatformMouseEvent, PlatformKeyboardEvent, PlatformWheelEvent
272 and PlatformGestureEvent and move Type enumeration and modifiers down to it.
274 * Shared/WebEventConversion.cpp:
275 (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
276 (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
277 (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
278 (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
279 * WebKit2.xcodeproj/project.pbxproj:
280 * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
281 (WebKit::WebEditorClient::handleKeyboardEvent):
282 * WebProcess/WebPage/WebPage.cpp:
283 (WebKit::handleMouseEvent):
284 (WebKit::WebPage::setInitialFocus):
285 (WebKit::WebPage::handleEditingKeyboardEvent):
286 (WebKit::WebPage::dragEnded):
287 * WebProcess/WebPage/mac/WebPageMac.mm:
288 (WebKit::WebPage::executeKeypressCommandsInternal):
289 (WebKit::WebPage::handleEditingKeyboardEvent):
291 2011-12-16 Ryosuke Niwa <rniwa@webkit.org>
293 Only EditCommandComposition should implement unapply and reapply
294 https://bugs.webkit.org/show_bug.cgi?id=74490
296 Reviewed by Eric Seidel.
298 Renamed WebEditCommand to WebUndoStep and made necessary changes.
299 Everything on WebProcess side should have the correct name now.
301 Names in the proxy and UIProcess are to be updated in a follow up.
306 * WebKit2.xcodeproj/project.pbxproj:
307 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
308 (WebKit::WebEditorClient::registerCommandForUndo):
309 (WebKit::WebEditorClient::registerCommandForRedo):
310 * WebProcess/WebCoreSupport/WebEditorClient.h:
311 * WebProcess/WebPage/WebEditCommand.cpp: Removed.
312 * WebProcess/WebPage/WebEditCommand.h: Removed.
313 * WebProcess/WebPage/WebPage.cpp:
314 (WebKit::WebPage::webUndoStep):
315 (WebKit::WebPage::addWebUndoStep):
316 (WebKit::WebPage::removeWebEditCommand):
317 (WebKit::WebPage::unapplyEditCommand):
318 (WebKit::WebPage::reapplyEditCommand):
319 * WebProcess/WebPage/WebPage.h:
320 * WebProcess/WebPage/WebUndoStep.cpp: Copied from Source/WebKit2/WebProcess/WebPage/WebEditCommand.cpp.
321 (WebKit::generateUndoStep):
322 (WebKit::WebUndoStep::create):
323 * WebProcess/WebPage/WebUndoStep.h: Copied from Source/WebKit2/WebProcess/WebPage/WebEditCommand.h.
324 (WebKit::WebUndoStep::entry):
325 (WebKit::WebUndoStep::entryID):
326 (WebKit::WebUndoStep::WebUndoStep):
327 * win/WebKit2.vcproj:
329 2011-12-16 Simon Hausmann <simon.hausmann@nokia.com>
331 [Qt] Eliminate dependency to QUndoStack
332 https://bugs.webkit.org/show_bug.cgi?id=74691
334 Reviewed by Kenneth Rohde Christiansen.
336 Replaced the QUndoStack with two vectors. When calling unapply()
337 on the edit command proxy, it will automatically re-register itself
340 * UIProcess/qt/QtWebUndoController.cpp:
341 (QtWebUndoController::registerEditCommand):
342 (QtWebUndoController::clearAllEditCommands):
343 (QtWebUndoController::canUndoRedo):
344 (QtWebUndoController::executeUndoRedo):
345 * UIProcess/qt/QtWebUndoController.h:
347 2011-12-16 Rafael Brandao <rafael.lobo@openbossa.org>
349 [Qt][WK2] Move webView.page into experimental
350 https://bugs.webkit.org/show_bug.cgi?id=74406
352 Reviewed by Simon Hausmann.
354 * UIProcess/API/qt/qquickwebview.cpp:
355 (QQuickWebViewExperimental::page):
356 * UIProcess/API/qt/qquickwebview_p.h:
357 * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
358 (tst_QQuickWebView::accessPage):
360 2011-12-16 Mark Hahnenberg <mhahnenberg@apple.com>
362 De-virtualize destructors
363 https://bugs.webkit.org/show_bug.cgi?id=74331
365 Reviewed by Geoffrey Garen.
367 * WebProcess/Plugins/Netscape/JSNPMethod.cpp: Add trivial destructor assert.
368 * WebProcess/Plugins/Netscape/JSNPObject.cpp: Add static destroy.
369 (WebKit::JSNPObject::destroy):
370 * WebProcess/Plugins/Netscape/JSNPObject.h:
371 * win/WebKit2.def: Add/remove necessary symbols.
372 * win/WebKit2CFLite.def: Ditto.
374 2011-12-16 Carlos Garcia Campos <cgarcia@igalia.com>
376 [GTK] Use bit field for bool members of WebKitWindowPropertiesPrivate
377 https://bugs.webkit.org/show_bug.cgi?id=74713
379 Reviewed by Gustavo Noronha Silva.
381 Most of the members are bools, so it reduces the memory footprint.
383 * UIProcess/API/gtk/WebKitWindowProperties.cpp:
385 2011-12-16 Carlos Garcia Campos <cgarcia@igalia.com>
387 [GTK] Window frame should be 0x0 when the toplevel window is not visible
388 https://bugs.webkit.org/show_bug.cgi?id=74709
390 Reviewed by Gustavo Noronha Silva.
392 * UIProcess/API/gtk/WebKitUIClient.cpp:
393 (getWindowFrame): Check also whether the toplevel is visible
394 before getting its size and position.
396 2011-12-16 Michael Bruning <michael.bruning@nokia.com>
398 [qt][wk2] Viewport info panel shows wrong current scale
399 https://bugs.webkit.org/show_bug.cgi?id=74613
401 Reviewed by Kenneth Rohde Christiansen.
403 * UIProcess/API/qt/qwebviewportinfo.cpp:
404 (QWebViewportInfo::currentScale): Added division by devicePixelRatio. Also
405 added emission of currenScaleUpdated signal when the viewport constraints
407 (QWebViewportInfo::didUpdateViewportConstraints):
408 * UIProcess/API/qt/qwebviewportinfo_p.h: Changed return type of
409 currentScale to QVariant as it depends on the viewport interaction engine
411 * UIProcess/qt/QtViewportInteractionEngine.cpp:
412 (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary): Changed
413 to use currentCSSScale for getting the current css scale.
414 (WebKit::QtViewportInteractionEngine::currentCSSScale): Added.
415 * UIProcess/qt/QtViewportInteractionEngine.h: Added method currentCSSScale.
417 2011-12-15 Martin Robinson <mrobinson@igalia.com>
419 Fix 'make dist' in preparation for the GTK+ release.
421 * GNUmakefile.am: Add missing header.
423 2011-12-15 Anders Carlsson <andersca@apple.com>
425 Add support for accelerated compositing to the tiled Core Animation drawing area
426 https://bugs.webkit.org/show_bug.cgi?id=74675
428 Reviewed by Andreas Kling.
430 Add a layer flush scheduler and get rid of the content layer since WebCore will manage that for us.
432 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
433 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
434 (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
435 (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
436 (WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplay):
437 (WebKit::TiledCoreAnimationDrawingArea::scroll):
438 (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
439 (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync):
440 (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
441 (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
443 2011-12-15 Sheriff Bot <webkit.review.bot@gmail.com>
445 Unreviewed, rolling out r102652 and r102717.
446 http://trac.webkit.org/changeset/102652
447 http://trac.webkit.org/changeset/102717
448 https://bugs.webkit.org/show_bug.cgi?id=74674
450 Broke too many webs. (Requested by kling on #webkit).
452 * UIProcess/API/mac/WKView.mm:
453 (-[WKView _updateWindowAndViewFrames]):
454 * UIProcess/WebPageProxy.h:
455 * UIProcess/mac/WebPageProxyMac.mm:
456 (WebKit::WebPageProxy::windowAndViewFramesChanged):
457 * WebProcess/Plugins/PluginView.cpp:
458 (WebKit::PluginView::windowAndViewFramesChanged):
459 * WebProcess/Plugins/PluginView.h:
460 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
461 (WebKit::WebChromeClient::windowRect):
462 * WebProcess/WebPage/WebPage.cpp:
463 (WebKit::WebPage::windowAndViewFramesChanged):
464 * WebProcess/WebPage/WebPage.h:
465 (WebKit::WebPage::windowFrameInScreenCoordinates):
466 (WebKit::WebPage::viewFrameInWindowCoordinates):
467 (WebKit::WebPage::accessibilityPosition):
468 * WebProcess/WebPage/WebPage.messages.in:
469 * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
470 (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
472 2011-12-15 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
474 [GTK] New API test for WindowProperties fails
475 https://bugs.webkit.org/show_bug.cgi?id=74630
477 Reviewed by Martin Robinson.
479 * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
480 (WindowProperties::viewReadyToShow): assert each member to make
481 assertion error messages more useful, and avoid asserting x and y,
482 since we are getting bad values from WebCore, for some reason.
483 (testWebViewWindowProperties): use smaller values that fit inside the
484 800x600 screen used by the bots.
486 2011-12-15 Anders Carlsson <andersca@apple.com>
488 EventDispatcher should handle wheel events on the connection queue
489 https://bugs.webkit.org/show_bug.cgi?id=74627
491 Reviewed by Andreas Kling.
493 Send wheel events to the EventDispatcher, which handles them on the connection work queue, and
494 immediately bounces them to the main thread (for now).
496 * UIProcess/WebPageProxy.cpp:
497 (WebKit::WebPageProxy::handleWheelEvent):
498 (WebKit::WebPageProxy::didReceiveEvent):
499 * WebProcess/WebPage/EventDispatcher.cpp:
500 (WebKit::EventDispatcher::wheelEvent):
501 (WebKit::EventDispatcher::dispatchWheelEvent):
502 * WebProcess/WebPage/EventDispatcher.h:
503 * WebProcess/WebPage/EventDispatcher.messages.in:
504 * WebProcess/WebPage/WebPage.h:
506 2011-12-15 Jon Lee <jonlee@apple.com>
508 [WK2] Extend WebNotification to include its origin
509 https://bugs.webkit.org/show_bug.cgi?id=74615
510 <rdar://problem/10587164>
512 Reviewed by Sam Weinig.
514 * Shared/API/c/WKSecurityOrigin.h: Expose API that converts the security origin to database
516 * Shared/API/c/WKSecurityOrigin.cpp:
517 (WKSecurityOriginCopyDatabaseIdentifier):
519 * UIProcess/Notifications/WebNotification.h: Extend WebNotification to include the origin.
520 (WebKit::WebNotification::create):
521 (WebKit::WebNotification::origin):
522 * UIProcess/Notifications/WebNotification.cpp: Remove unneeded encode() and decode() functions.
523 (WebKit::WebNotification::WebNotification):
525 * UIProcess/API/C/WKNotification.h: Expose WebNotification's origin().
526 * UIProcess/API/C/WKNotification.cpp:
527 (WKNotificationGetSecurityOrigin):
529 * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Update show() to include the
530 origin of the notification.
531 * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
532 (WebKit::WebNotificationManagerProxy::show):
533 * UIProcess/Notifications/WebNotificationManagerProxy.h:
534 * WebProcess/Notifications/WebNotificationManager.cpp:
535 (WebKit::WebNotificationManager::show): Pass the notification's exec context's origin as
538 2011-12-15 Rafael Brandao <rafael.lobo@openbossa.org>
540 [Qt][WK2] Add test for download policy on navigation request
541 https://bugs.webkit.org/show_bug.cgi?id=74541
543 Reviewed by Tor Arne Vestbø.
545 * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
546 * UIProcess/API/qt/tests/qmltests/WebView/tst_download.qml: Make it wait for a
547 downloadFinished signal to finish the test.
549 2011-12-15 Anders Carlsson <andersca@apple.com>
551 Move WorkQueue Mach handlers over to WTF::Function
552 https://bugs.webkit.org/show_bug.cgi?id=74620
554 Reviewed by Sam Weinig.
556 * Platform/CoreIPC/mac/ConnectionMac.cpp:
557 (CoreIPC::Connection::open):
558 (CoreIPC::Connection::initializeDeadNameSource):
559 * Platform/WorkQueue.h:
560 * Platform/mac/WorkQueueMac.cpp:
561 (WorkQueue::EventSource::EventSource):
562 (WorkQueue::EventSource::eventHandler):
563 (WorkQueue::registerMachPortEventHandler):
565 2011-12-14 Anders Carlsson <andersca@apple.com>
567 Add WTF::Function to wtf/Forward.h
568 https://bugs.webkit.org/show_bug.cgi?id=74576
570 Reviewed by Adam Roben.
572 * Platform/RunLoop.h:
573 * Platform/WorkQueue.h:
574 Remove forward declarations and just include wtf/Forward.h.
576 2011-12-15 Rafael Brandao <rafael.lobo@openbossa.org>
578 [Qt][WK2] Move WebPreferences into experimental
579 https://bugs.webkit.org/show_bug.cgi?id=74404
581 Reviewed by Tor Arne Vestbø.
583 * UIProcess/API/qt/qquickwebview.cpp:
584 (QQuickWebViewExperimental::preferences):
585 * UIProcess/API/qt/qquickwebview_p.h:
586 * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
587 * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
589 2011-12-15 Carlos Garcia Campos <cgarcia@igalia.com>
591 [GTK] Add WebKitWindowProperties to WebKit2 GTK+ API
592 https://bugs.webkit.org/show_bug.cgi?id=74595
594 Reviewed by Gustavo Noronha Silva.
596 * GNUmakefile.am: Add new files to compilation.
597 * UIProcess/API/gtk/WebKitUIClient.cpp:
598 (createNewPage): Pass the dictionary containing the window
599 features to webkitWebViewCreateNewPage().
600 (toolbarsAreVisible): Return
601 WebKitWindowProperties:toolbar-visible.
602 (setToolbarsAreVisible): Set
603 WebKitWindowProperties:toolbar-visible.
604 (menuBarIsVisible): Return WebKitWindowProperties:menu-visible.
605 (setMenuBarIsVisible): Set WebKitWindowProperties:menu-visible.
606 (statusBarIsVisible): Return
607 WebKitWindowProperties:status-visible.
608 (setStatusBarIsVisible): Set
609 WebKitWindowProperties:status-visible.
610 (isResizable): Return WebKitWindowProperties:resizable.
611 (setIsResizable): Set WebKitWindowProperties:resizable.
612 (getWindowFrame): Return WebKitWindowProperties:geometry.
613 (setWindowFrame): Set WebKitWindowProperties:geometry.
614 (webkitUIClientAttachUIClientToPage): Initialize the UI client for
616 * UIProcess/API/gtk/WebKitWebView.cpp:
617 (webkit_web_view_init): Create a WebKitWindowProperties object for
619 (webkit_web_view_class_init):
620 (webkitWebViewCreateNewPage): Update the WebKitWindowProperties
621 object using the window features dictionary.
622 (webkit_web_view_get_window_properties): Return the
623 WebKitWindowProperties object of the view.
624 * UIProcess/API/gtk/WebKitWebView.h:
625 * UIProcess/API/gtk/WebKitWebViewPrivate.h:
626 * UIProcess/API/gtk/WebKitWindowProperties.cpp: Added.
627 (webkitWindowPropertiesFinalize):
628 (webkitWindowPropertiesGetProperty):
629 (webkitWindowPropertiesSetProperty):
630 (webkit_window_properties_class_init):
631 (webkit_window_properties_init):
632 (webkitWindowPropertiesCreate): Create a new
633 WebKitWindowProperties object.
634 (webkitWindowPropertiesSetGeometry):
635 (webkitWindowPropertiesSetToolbarVisible):
636 (webkitWindowPropertiesSetMenubarVisible):
637 (webkitWindowPropertiesSetStatusbarVisible):
638 (webkitWindowPropertiesSetLocationbarVisible):
639 (webkitWindowPropertiesSetScrollbarsVisible):
640 (webkitWindowPropertiesSetResizable):
641 (webkitWindowPropertiesSetFullscreen):
642 (webkitWindowPropertiesUpdateFromWKWindowFeatures): Parse the
643 window features dictionary and update the WebKitWindowProperties
645 (webkit_window_properties_get_geometry):
646 (webkit_window_properties_get_toolbar_visible):
647 (webkit_window_properties_get_statusbar_visible):
648 (webkit_window_properties_get_scrollbars_visible):
649 (webkit_window_properties_get_menubar_visible):
650 (webkit_window_properties_get_locationbar_visible):
651 (webkit_window_properties_get_resizable):
652 (webkit_window_properties_get_fullscreen):
653 * UIProcess/API/gtk/WebKitWindowProperties.h: Added.
654 * UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h: Copied from Source/WebKit2/UIProcess/API/gtk/WebKitWebViewPrivate.h.
655 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
656 WebKitWindowProperties.
657 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
658 * UIProcess/API/gtk/docs/webkit2gtk.types: Add
659 webkit_window_properties_get_type.
660 * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
661 (WindowProperties::windowPropertiesNotifyCallback):
662 (WindowProperties::viewReadyToShow):
663 (WindowProperties::viewCreate):
664 (WindowProperties::setExpectedWindowProperties):
665 (testWebViewWindowProperties):
667 * UIProcess/API/gtk/webkit2.h: Include WebKitWindowProperties.h.
668 * UIProcess/WebUIClient.cpp:
669 (WebKit::WebUIClient::createNewPage): Add also "locationBarVisible"
670 to the window features dictionary.
672 2011-12-15 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
674 [Qt] [WK2] Remove QtWebPageProxy
675 https://bugs.webkit.org/show_bug.cgi?id=74540
677 Reviewed by Kenneth Rohde Christiansen.
679 Move WebPageProxy* to QQuickWebViewPrivate. The remaining functions in
680 QtWebPageProxy were simple wrappers to WebKit functionality (text zoom, page zoom
681 and user agent setting). Since those wrappers are unused, they were removed. The
682 signal in the class was also unused.
684 This patch also remove the code from WebContextMenuProxyQt, it was remains of a
685 previous QMenu-based implementation. We want to rewrite this code for QML anyway,
686 so I reverted to an empty state.
688 Farewell, QtWebPageProxy!
691 * UIProcess/API/qt/qquickwebpage.cpp:
692 * UIProcess/API/qt/qquickwebpage_p.h:
693 * UIProcess/API/qt/qquickwebview.cpp:
694 (QQuickWebViewPrivate::~QQuickWebViewPrivate):
695 (QQuickWebViewPrivate::initialize):
696 (QQuickWebViewPrivate::processDidCrash):
697 (QQuickWebViewPrivate::createDrawingAreaProxy):
698 (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
699 (QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged):
700 (QQuickWebViewPrivate::_q_onVisibleChanged):
701 (QQuickWebViewPrivate::updateViewportSize):
702 (QQuickWebViewPrivate::computeViewportConstraints):
703 (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
704 (QQuickWebViewPrivate::setNavigatorQtObjectEnabled):
705 (QQuickWebViewExperimental::postMessage):
706 (QQuickWebView::load):
707 (QQuickWebView::goBack):
708 (QQuickWebView::goForward):
709 (QQuickWebView::stop):
710 (QQuickWebView::reload):
711 (QQuickWebView::url):
712 (QQuickWebView::canGoBack):
713 (QQuickWebView::canGoForward):
714 (QQuickWebView::loading):
715 (QQuickWebView::canReload):
716 (QQuickWebView::title):
717 (QQuickWebView::pageRef):
718 (QQuickWebView::loadHtml):
719 * UIProcess/API/qt/qquickwebview_p.h:
720 * UIProcess/API/qt/qquickwebview_p_p.h:
721 * UIProcess/API/qt/qwebnavigationhistory_p_p.h:
722 * UIProcess/API/qt/qwebpreferences.cpp:
723 (QWebPreferencesPrivate::preferencesRef):
724 * UIProcess/PageClient.h:
725 * UIProcess/qt/QtPageClient.cpp:
726 (QtPageClient::QtPageClient):
727 (QtPageClient::initialize):
728 (QtPageClient::createPopupMenuProxy):
729 (QtPageClient::createContextMenuProxy):
730 * UIProcess/qt/QtPageClient.h:
731 * UIProcess/qt/QtWebPageProxy.cpp: Removed.
732 * UIProcess/qt/QtWebPageProxy.h: Removed.
733 * UIProcess/qt/WebContextMenuProxyQt.cpp:
734 (WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt):
735 (WebKit::WebContextMenuProxyQt::create):
736 (WebKit::WebContextMenuProxyQt::showContextMenu):
737 (WebKit::WebContextMenuProxyQt::hideContextMenu):
738 * UIProcess/qt/WebContextMenuProxyQt.h:
740 2011-12-15 Simon Hausmann <simon.hausmann@nokia.com>
742 [WK2] Eliminate unnecessary GTK/QT ifdefs for shared memory implementation
743 https://bugs.webkit.org/show_bug.cgi?id=74602
745 Reviewed by Kenneth Rohde Christiansen.
747 For shared memory Qt was using shm_open, Gtk was using files in /tmp. There
748 is no reason to obfuscate the code with #ifdefs or let Gtk use an inferior
749 method of opening shared memory. So this patch makes SharedMemoryUnix.cpp
750 truly Qt and Gtk independent.
752 * Platform/unix/SharedMemoryUnix.cpp:
753 (WebKit::SharedMemory::create):
755 2011-12-15 Simon Hausmann <simon.hausmann@nokia.com>
757 [Qt] Cleanup: Remove unnecessary const_cast
759 Reviewed by Kenneth Christiansen.
761 * UIProcess/API/qt/qquickwebview.cpp:
762 (QQuickWebView::preferences):
764 2011-12-15 Michael Brüning <michael.bruning@nokia.com>
766 [QT][WK2]Add (experimental) viewport info view to Minibrowser/qt.
767 https://bugs.webkit.org/show_bug.cgi?id=72893
769 Reviewed by Kenneth Rohde Christiansen.
771 This patch extends QQuickWebViewExperimental by a property named
772 viewportInfo, which contains the viewport scalability and
773 layout and contents size information. This property is exposed to
774 QML through the experimental extension for QQuickWebView.
777 * UIProcess/API/qt/qquickwebview.cpp:
778 (QQuickWebViewPrivate::didChangeContentsSize):
779 (QQuickWebViewPrivate::computeViewportConstraints):
780 (QQuickWebViewPrivate::PostTransitionState::apply): Added applying
781 contentsSize to viewportInfo.
782 (QQuickWebViewExperimental::QQuickWebViewExperimental):
783 (QQuickWebViewExperimental::viewportInfo):
784 * UIProcess/API/qt/qquickwebview_p.h:
785 * UIProcess/API/qt/qquickwebview_p_p.h: Moved PostTransitionState::apply
786 to qquickwebview.cpp. Added friend QWebViewportInfo.
787 * UIProcess/API/qt/qwebviewportinfo.cpp: Added.
788 (QWebViewportInfo::QWebViewportInfo):
789 (QWebViewportInfo::~QWebViewportInfo):
790 (QWebViewportInfo::contentsSize):
791 (QWebViewportInfo::currentScale):
792 (QWebViewportInfo::devicePixelRatio):
793 (QWebViewportInfo::initialScale):
794 (QWebViewportInfo::minimumScale):
795 (QWebViewportInfo::maximumScale):
796 (QWebViewportInfo::isScalable):
797 (QWebViewportInfo::layoutSize):
798 (QWebViewportInfo::didUpdateContentsSize):
799 (QWebViewportInfo::didUpdateCurrentScale):
800 (QWebViewportInfo::didUpdateViewportConstraints):
801 * UIProcess/API/qt/qwebviewportinfo_p.h: Added.
802 * UIProcess/qt/QtViewportInteractionEngine.h:
803 (WebKit::QtViewportInteractionEngine::Constraints::Constraints): Added layoutSize.
804 (WebKit::QtViewportInteractionEngine::constraints): Added property to access m_contraints.
806 2011-12-15 Simon Hausmann <simon.hausmann@nokia.com>
808 [WK2] WebPage::m_useFixedLayout variable unininitialized
809 https://bugs.webkit.org/show_bug.cgi?id=74596
811 Reviewed by Kenneth Rohde Christiansen.
813 * WebProcess/WebPage/WebPage.cpp:
814 (WebKit::WebPage::WebPage): Avoid uninitialized use through
815 initialization in the constructor.
817 2011-12-15 Alexander Færøy <ahf@0x90.dk>
819 [Qt] r102849 broke the Qt build on Mac OS X.
820 https://bugs.webkit.org/show_bug.cgi?id=74594
822 Reviewed by Simon Hausmann.
824 The __APPLE__ macro is defined on all standard OS X compilers, which
825 leads to various CoreGraphics headers to be included in the Qt build.
829 2011-12-14 Jing Zhao <jingzhao@chromium.org>
831 Opening two popup menus by dispatchEvent() makes problems.
832 https://bugs.webkit.org/show_bug.cgi?id=73304
834 Reviewed by Kent Tamura.
836 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
837 (WebKit::WebChromeClient::hasOpenedPopup): Not implemented.
838 * WebProcess/WebCoreSupport/WebChromeClient.h: Overrides hasOpenedPopup().
840 2011-12-14 Sam Weinig <weinig@apple.com>
842 Remove whitespace from InheritedPropertySheets attributes in
843 vsprops files to appease the Visual Studio project migrator.
845 Reviewed by Adam Roben.
847 * win/WebKit2Debug.vsprops:
848 * win/WebKit2DebugAll.vsprops:
849 * win/WebKit2DebugCairoCFLite.vsprops:
850 * win/WebKit2Production.vsprops:
851 * win/WebKit2Release.vsprops:
852 * win/WebKit2ReleaseCairoCFLite.vsprops:
853 * win/WebKit2WebProcessDebug.vsprops:
854 * win/WebKit2WebProcessDebugAll.vsprops:
855 * win/WebKit2WebProcessDebugCairoCFLite.vsprops:
856 * win/WebKit2WebProcessProduction.vsprops:
857 * win/WebKit2WebProcessRelease.vsprops:
858 * win/WebKit2WebProcessReleaseCairoCFLite.vsprops:
860 2011-12-14 Anders Carlsson <andersca@apple.com>
862 Add WorkQueue::dispatch and RunLoop::dispatch which both take WTF::Function objects
863 https://bugs.webkit.org/show_bug.cgi?id=74574
865 Reviewed by Sam Weinig.
867 * Platform/CoreIPC/Connection.cpp:
868 (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
869 (CoreIPC::Connection::addQueueClient):
870 (CoreIPC::Connection::removeQueueClient):
871 (CoreIPC::Connection::invalidate):
872 (CoreIPC::Connection::sendMessage):
873 (CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
874 (CoreIPC::Connection::connectionDidClose):
875 (CoreIPC::Connection::enqueueIncomingMessage):
876 Switch over to dispatch.
878 * Platform/RunLoop.cpp:
880 Create a FunctionWorkItem and call scheduleWork.
882 * Platform/RunLoop.h:
885 * Platform/WorkItem.h:
886 (FunctionWorkItem::FunctionWorkItem):
887 (FunctionWorkItem::execute):
889 Add a helper work item that wraps a WTF::Function.
891 * Platform/WorkQueue.cpp:
892 (WorkQueue::dispatch):
893 Create a FunctionWorkItem and call scheduleWork.
895 * Platform/WorkQueue.h:
898 * UIProcess/Launcher/ProcessLauncher.cpp:
899 (WebKit::ProcessLauncher::ProcessLauncher):
900 Switch over to dispatch.
902 2011-12-14 Hajime Morrita <morrita@chromium.org>
904 JS_INLINE and WTF_INLINE should be visible from WebCore
905 https://bugs.webkit.org/show_bug.cgi?id=73191
907 Reviewed by Kevin Ollivier.
909 Removed macro definitions which is now provided by Platform.h
913 2011-12-14 Alexey Proskuryakov <ap@apple.com>
915 [Mac] Sandbox violation opening AppleSNBFBUserClient
916 https://bugs.webkit.org/show_bug.cgi?id=74560
917 <rdar://problem/10410896>
919 Reviewed by Darin Adler.
921 * WebProcess/com.apple.WebProcess.sb: Just allow it.
923 2011-12-13 Jon Lee <jonlee@apple.com>
925 Enable notifications on Mac.
927 Reviewed by Sam Weinig.
929 * Configurations/FeatureDefines.xcconfig:
931 2011-12-14 Mark Rowe <mrowe@apple.com>
933 <rdar://problem/10573872> NPN_GetValueForURL returns wrong value for NPNURLVProxy
935 Reviewed by Anders Carlsson.
937 * PluginProcess/PluginControllerProxy.cpp:
938 (WebKit::PluginControllerProxy::proxiesForURL): Fix a copy-paste error.
940 2011-12-14 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
942 [Qt] [WK2] Move QWebPreferences out of QtWebPageProxy
943 https://bugs.webkit.org/show_bug.cgi?id=74525
945 Reviewed by Luiz Agostini.
947 This patch also uses internal WebKit API to set the Accelerate Compositing
948 directly instead of going thru QWebPreferencesPrivate. The previous approach was
949 always causing the QWebPreferences to be created making the "lazy initialization"
952 * UIProcess/API/qt/qquickwebview.cpp:
953 (QQuickWebViewPrivate::QQuickWebViewPrivate):
954 (QQuickWebViewPrivate::initialize):
955 (QQuickWebViewPrivate::navigatorQtObjectEnabled):
956 (QQuickWebViewPrivate::setNavigatorQtObjectEnabled):
957 (QQuickWebViewExperimental::postMessage):
958 (QQuickWebView::preferences):
959 * UIProcess/API/qt/qquickwebview_p_p.h:
960 * UIProcess/API/qt/qwebpreferences.cpp:
961 (QWebPreferencesPrivate::createPreferences):
962 (QWebPreferencesPrivate::testAttribute):
963 (QWebPreferencesPrivate::setAttribute):
964 (QWebPreferences::navigatorQtObjectEnabled):
965 (QWebPreferences::setNavigatorQtObjectEnabled):
966 (QWebPreferencesPrivate::preferencesRef):
967 * UIProcess/API/qt/qwebpreferences_p_p.h:
968 * UIProcess/qt/QtWebPageProxy.cpp:
969 (QtWebPageProxy::QtWebPageProxy):
970 * UIProcess/qt/QtWebPageProxy.h:
972 2011-12-14 Carlos Garcia Campos <cgarcia@igalia.com>
974 [GTK] Page size should be 0,0 when view widget is not realized
975 https://bugs.webkit.org/show_bug.cgi?id=74523
977 Reviewed by Martin Robinson.
979 We currently return 1,1 because GTK+ initializes widget allocation
982 * UIProcess/API/gtk/PageClientImpl.cpp:
983 (WebKit::PageClientImpl::viewSize): Check whether widget is
984 realized and return IntSize() in that case.
986 2011-12-14 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
988 [Qt] [WK2] Move download handling out of QtWebPageProxy
989 https://bugs.webkit.org/show_bug.cgi?id=74506
991 Reviewed by Kenneth Rohde Christiansen.
993 Also moves the creation of QtWebContext out of QtWebPageProxy.
995 * UIProcess/API/qt/qquickwebview.cpp:
996 (QQuickWebViewPrivate::initialize):
997 (QQuickWebViewPrivate::handleDownloadRequest):
998 (QQuickWebViewPrivate::_q_onReceivedResponseFromDownload):
999 * UIProcess/API/qt/qquickwebview_p.h:
1000 * UIProcess/API/qt/qquickwebview_p_p.h:
1001 * UIProcess/API/qt/qwebdownloaditem_p.h:
1002 * UIProcess/qt/QtPageClient.cpp:
1003 (QtPageClient::handleDownloadRequest):
1004 * UIProcess/qt/QtPageClient.h:
1005 * UIProcess/qt/QtWebPageProxy.cpp:
1006 (QtWebPageProxy::QtWebPageProxy):
1007 * UIProcess/qt/QtWebPageProxy.h:
1009 2011-12-14 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
1011 [Qt] [WK2] Move QWebNavigationHistory to QQuickWebView
1012 https://bugs.webkit.org/show_bug.cgi?id=74442
1014 Reviewed by Simon Hausmann.
1016 QWebNavigationHistory used QtWebPageProxy to be QObject parent of the inner models,
1017 this patch change that to use OwnPtr instead. When creating the history object we pass
1018 only the WKPageRef and let it get the backForwardList.
1020 * UIProcess/API/qt/qquickwebview.cpp:
1021 (QQuickWebViewPrivate::initialize):
1022 (QQuickWebViewPrivate::didChangeBackForwardList):
1023 (QQuickWebViewExperimental::navigationHistory):
1024 (QQuickWebViewExperimental::goForwardTo):
1025 (QQuickWebViewExperimental::goBackTo):
1026 * UIProcess/API/qt/qquickwebview_p_p.h:
1027 * UIProcess/API/qt/qwebnavigationhistory.cpp:
1028 (QWebNavigationListModelPrivate::createWebNavigationModel):
1029 (QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate):
1030 (QWebNavigationHistoryPrivate::createHistory):
1031 (QWebNavigationHistoryPrivate::goBackTo):
1032 (QWebNavigationHistoryPrivate::goForwardTo):
1033 (QWebNavigationListModel::QWebNavigationListModel):
1034 (QWebNavigationHistory::backItems):
1035 (QWebNavigationHistory::forwardItems):
1036 * UIProcess/API/qt/qwebnavigationhistory_p.h:
1037 * UIProcess/API/qt/qwebnavigationhistory_p_p.h:
1038 * UIProcess/qt/QtWebPageProxy.cpp:
1039 (QtWebPageProxy::QtWebPageProxy):
1040 * UIProcess/qt/QtWebPageProxy.h:
1042 2011-12-14 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
1044 [Qt][WK2] Remove DrawingArea and QtWebPageEventHandler code from QtWebPageProxy
1045 https://bugs.webkit.org/show_bug.cgi?id=74414
1047 Reviewed by Simon Hausmann.
1049 This also moves QtWebPageEventHandler to inside QQuickWebPagePrivate, to avoid
1050 the WebPage having a backpointer to the QQuickWebView.
1053 * UIProcess/API/qt/qquickwebpage.cpp:
1054 (QQuickWebPage::geometryChanged):
1055 (QQuickWebPage::event):
1056 (QQuickWebPagePrivate::QQuickWebPagePrivate):
1057 (QQuickWebPagePrivate::initialize):
1058 (QQuickWebPagePrivate::setDrawingAreaSize):
1059 (QQuickWebPagePrivate::paintToCurrentGLContext):
1060 (QQuickWebPagePrivate::resetPaintNode):
1061 * UIProcess/API/qt/qquickwebpage_p.h:
1062 * UIProcess/API/qt/qquickwebpage_p_p.h:
1063 * UIProcess/API/qt/qquickwebview.cpp:
1064 (QQuickWebViewPrivate::initialize):
1065 (QQuickWebViewPrivate::initializeDesktop):
1066 (QQuickWebViewPrivate::initializeTouch):
1067 (QQuickWebViewPrivate::_q_resume):
1068 (QQuickWebViewPrivate::processDidCrash):
1069 (QQuickWebViewPrivate::didRelaunchProcess):
1070 (QQuickWebViewPrivate::createDrawingAreaProxy):
1071 (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
1072 (QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged):
1073 (QQuickWebViewPrivate::updateViewportSize):
1074 * UIProcess/API/qt/qquickwebview_p_p.h:
1075 * UIProcess/qt/QtPageClient.cpp:
1076 (QtPageClient::createDrawingAreaProxy):
1077 * UIProcess/qt/QtPageClient.h:
1078 (QtPageClient::findStringInCustomRepresentation):
1079 (QtPageClient::countStringMatchesInCustomRepresentation):
1080 * UIProcess/qt/QtWebPageEventHandler.cpp:
1081 (QtWebPageEventHandler::QtWebPageEventHandler):
1082 (QtWebPageEventHandler::startDrag):
1083 * UIProcess/qt/QtWebPageEventHandler.h:
1084 * UIProcess/qt/QtWebPageProxy.cpp:
1085 (QtWebPageProxy::init):
1086 * UIProcess/qt/QtWebPageProxy.h:
1088 2011-12-13 Gustavo Noronha Silva <gns@gnome.org>
1090 Unreviewed build fix.
1092 * GNUmakefile.am: make sure we do not derreference the target link
1093 if it already exists, and replace it with the new one instead,
1094 otherwise we end up with a gtk link inside
1095 Source/WebKit2/UIProcess/API/gtk, which causes the documentation
1096 build to produce warnings, and make the build fail.
1098 2011-12-13 Andreas Kling <kling@webkit.org>
1100 REGRESSION (r102652): New window opens with zero size at produbanco.com
1101 <http://webkit.org/b/74418> and <rdar://problem/10565998>
1103 Reviewed by Anders Carlsson.
1105 Don't use the cached window frame if it's empty (meaning we haven't received
1106 a WindowAndViewFramesChanged message yet.) Instead use the synchronous
1107 GetWindowFrame (WP->UIP) message.
1109 This situation occurs when opening a new window via window.open(), in which
1110 WebCore::createWindow() will query the windowRect() on the new window.
1112 I spent a long time trying to write a layout test for this but couldn't come
1113 up with something reliable. The windowRect() is non-empty before we get a
1114 chance to run JS in/on the new window, and we can't check against the
1115 requested geometry since it varies depending on whether the window manager
1116 has shown the new window yet.
1118 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1119 (WebKit::WebChromeClient::windowRect):
1121 2011-12-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
1123 [Qt][WK2] Make QtPageClient dispatch directly to WebView when possible
1124 https://bugs.webkit.org/show_bug.cgi?id=74407
1126 Reviewed by Simon Hausmann.
1128 * UIProcess/API/qt/qquickwebview.cpp:
1129 (QQuickWebViewPrivate::QQuickWebViewPrivate):
1130 (QQuickWebViewPrivate::~QQuickWebViewPrivate):
1131 (QQuickWebViewPrivate::initialize):
1132 (QQuickWebViewPrivate::pageDidRequestScroll):
1133 (QQuickWebViewPrivate::processDidCrash):
1134 (QQuickWebViewPrivate::didRelaunchProcess):
1135 (QQuickWebViewPrivate::viewSize):
1136 (QQuickWebViewPrivate::didReceiveMessageFromNavigatorQtObject):
1137 (QQuickWebViewExperimental::QQuickWebViewExperimental):
1138 (QQuickWebView::QQuickWebView):
1139 * UIProcess/API/qt/qquickwebview_p_p.h:
1140 * UIProcess/qt/QtPageClient.cpp:
1141 (QtPageClient::QtPageClient):
1142 (QtPageClient::setViewNeedsDisplay):
1143 (QtPageClient::pageDidRequestScroll):
1144 (QtPageClient::processDidCrash):
1145 (QtPageClient::didRelaunchProcess):
1146 (QtPageClient::didChangeContentsSize):
1147 (QtPageClient::didChangeViewportProperties):
1148 (QtPageClient::createPopupMenuProxy):
1149 (QtPageClient::didReceiveMessageFromNavigatorQtObject):
1150 (QtPageClient::viewSize):
1151 (QtPageClient::isViewFocused):
1152 (QtPageClient::isViewVisible):
1153 * UIProcess/qt/QtPageClient.h:
1154 (QtPageClient::initialize):
1155 * UIProcess/qt/QtWebPageProxy.cpp:
1156 (QtWebPageProxy::QtWebPageProxy):
1157 * UIProcess/qt/QtWebPageProxy.h:
1159 2011-12-13 Carlos Garcia Campos <cgarcia@igalia.com>
1161 [GTK] Add support for javascript dialogs in WebKit2 GTK+ API
1162 https://bugs.webkit.org/show_bug.cgi?id=71362
1164 Reviewed by Martin Robinson.
1166 * UIProcess/API/gtk/WebKitUIClient.cpp:
1167 (runJavaScriptAlert): Call webkitWebViewRunJavaScriptAlert().
1168 (runJavaScriptConfirm): Call webkitWebViewRunJavaScriptConfirm().
1169 (runJavaScriptPrompt): Call webkitWebViewRunJavaScriptPrompt().
1170 (webkitUIClientAttachUIClientToPage): Add implementation for
1171 runJavaScriptAlert, runJavaScriptConfirm and runJavaScriptPrompt
1173 * UIProcess/API/gtk/WebKitWebView.cpp:
1174 (webkitWebViewCreateJavaScriptDialog): Helper function to create
1176 (webkitWebViewScriptAlert): Default implementation of signal
1177 WebKitWebView::script-alert that shows a message dialog.
1178 (webkitWebViewScriptConfirm): Default implementation of signal
1179 WebKitWebView::script-confirm that shows a question dialog.
1180 (webkitWebViewScriptPrompt): Default implementation of signal
1181 WebKitWebView::script-prompt that shows a question dialog with a
1183 (webkit_web_view_class_init):
1184 (webkitWebViewRunJavaScriptAlert): Emit WebKitWebView::script-alert.
1185 (webkitWebViewRunJavaScriptConfirm): Emit WebKitWebView::script-confirm.
1186 (webkitWebViewRunJavaScriptPrompt): Emit WebKitWebView::script-prompt.
1187 * UIProcess/API/gtk/WebKitWebView.h:
1188 * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1189 * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
1190 (testWebViewJavaScriptDialogs):
1192 * UIProcess/API/gtk/webkit2marshal.list:
1194 2011-12-13 Kenneth Rohde Christiansen <kenneth@webkit.org>
1196 [Qt] Make sure that touch events result in the page view gaining focus
1198 Reviewed by Simon Hausmann.
1200 * UIProcess/API/qt/qquickwebpage.cpp:
1201 (QQuickWebPage::touchEvent): Force active focus.
1202 * UIProcess/API/qt/qquickwebview.cpp:
1203 * UIProcess/API/qt/qquickwebview_p.h: Remove ::touchEvent override.
1205 2011-12-13 Carlos Garcia Campos <cgarcia@igalia.com>
1207 [GTK] Initial UI client implementation for WebKit2 GTK +API
1208 https://bugs.webkit.org/show_bug.cgi?id=69753
1210 Reviewed by Martin Robinson.
1212 * GNUmakefile.am: Add new files to compilation.
1213 * UIProcess/API/gtk/WebKitUIClient.cpp: Added.
1214 (createNewPage): Call webkitWebViewCreateNewPage.
1215 (showPage): Call webkitWebViewReadyToShowPage.
1216 (closePage): Call webkitWebViewClosePage.
1217 (webkitUIClientAttachUIClientToPage): Initialize UI client and
1218 attach it to the given page.
1219 (webkit_ui_client_init):
1220 (webkit_ui_client_class_init):
1221 * UIProcess/API/gtk/WebKitUIClient.h: Added.
1222 * UIProcess/API/gtk/WebKitWebView.cpp:
1223 (webkitWebViewCreate): Default implementation of signal
1224 WebKitWebView::create that simply returns NULL.
1225 (webkitWebViewConstructed): Create the default UI client.
1226 (webkitWebViewAccumulatorObjectHandled):
1227 (webkit_web_view_class_init):
1228 (webkitWebViewCreateNewPage): Emit create signal.
1229 (webkitWebViewReadyToShowPage): Emit ready-to-show signal.
1230 (webkitWebViewClosePage): Emit close signal.
1231 * UIProcess/API/gtk/WebKitWebView.h:
1232 * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1233 * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
1234 (testWebViewCreateReadyClose):
1236 * UIProcess/API/gtk/webkit2marshal.list:
1238 2011-12-13 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
1240 [Qt][WK2] Move load & navigation related functions out of QtWebPageProxy
1241 https://bugs.webkit.org/show_bug.cgi?id=74395
1243 Reviewed by Simon Hausmann.
1246 * UIProcess/API/qt/qquickwebview.cpp:
1247 (QQuickWebViewPrivate::_q_onVisibleChanged):
1248 (QQuickWebViewPrivate::updateViewportSize):
1249 (QQuickWebViewPrivate::computeViewportConstraints):
1250 (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
1251 (QQuickWebViewPrivate::webPageProxy):
1252 (QQuickWebView::load):
1253 (QQuickWebView::goBack):
1254 (QQuickWebView::goForward):
1255 (QQuickWebView::stop):
1256 (QQuickWebView::reload):
1257 (QQuickWebView::url):
1258 (QQuickWebView::canGoBack):
1259 (QQuickWebView::canGoForward):
1260 (QQuickWebView::loading):
1261 (QQuickWebView::canReload):
1262 (QQuickWebView::title):
1263 (QQuickWebView::loadHtml):
1264 * UIProcess/API/qt/qquickwebview_p_p.h:
1265 * UIProcess/qt/QtWebPageProxy.cpp:
1266 (QtWebPageProxy::didReceiveMessageFromNavigatorQtObject):
1267 * UIProcess/qt/QtWebPageProxy.h:
1269 2011-12-13 Carlos Garcia Campos <cgarcia@igalia.com>
1271 Unreviewed. Fix GTK+ build after r102640.
1273 * GNUmakefile.am: Add DownloadProxy sources again.
1275 2011-12-12 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
1277 [Qt][WK2] Move undo & edit command PageClient callbacks into QtWebUndoController
1278 https://bugs.webkit.org/show_bug.cgi?id=74364
1280 Reviewed by Simon Hausmann.
1282 The four callbacks in PageClient related to Undo depend only on the QUndoStack. So we
1283 move their handling to a QtWebUndoController (owned by QQuickWebViewPrivate). This also
1284 make QtWebUndoCommand an implementation detail.
1287 * UIProcess/API/qt/qquickwebview.cpp:
1288 (QQuickWebViewPrivate::QQuickWebViewPrivate):
1289 * UIProcess/API/qt/qquickwebview_p_p.h:
1290 * UIProcess/qt/QtPageClient.cpp:
1291 (QtPageClient::registerEditCommand):
1292 (QtPageClient::clearAllEditCommands):
1293 (QtPageClient::canUndoRedo):
1294 (QtPageClient::executeUndoRedo):
1295 * UIProcess/qt/QtPageClient.h:
1296 (QtPageClient::initialize):
1297 * UIProcess/qt/QtWebPageProxy.cpp:
1298 * UIProcess/qt/QtWebPageProxy.h:
1299 * UIProcess/qt/QtWebUndoController.cpp: Renamed from Source/WebKit2/UIProcess/qt/QtWebUndoCommand.cpp.
1300 (QtWebUndoCommand::inUndoRedo):
1301 (QtWebUndoCommand::QtWebUndoCommand):
1302 (QtWebUndoCommand::~QtWebUndoCommand):
1303 (QtWebUndoCommand::redo):
1304 (QtWebUndoCommand::undo):
1305 (QtWebUndoController::QtWebUndoController):
1306 (QtWebUndoController::registerEditCommand):
1307 (QtWebUndoController::clearAllEditCommands):
1308 (QtWebUndoController::canUndoRedo):
1309 (QtWebUndoController::executeUndoRedo):
1310 * UIProcess/qt/QtWebUndoController.h: Renamed from Source/WebKit2/UIProcess/qt/QtWebUndoCommand.h.
1312 2011-12-12 Andreas Kling <kling@webkit.org>
1314 Resizing Cappuccino is very laggy on WebKit since Safari 5.1
1315 <http://webkit.org/b/71354> and <rdar://problem/10565998>
1317 Reviewed by Anders Carlsson.
1319 On Mac, we already cache the window rect through the WindowAndViewFramesChanged
1320 message, so simply return that in WebChromeClient::windowRect() instead of
1321 sending a synchronous query to the UIProcess.
1323 Changed WindowAndViewFramesChanged to pass FloatRect/FloatPoint rather than
1324 IntRect/IntPoint to match the ChromeClient::windowRect() return type.
1326 * UIProcess/API/mac/WKView.mm:
1327 (-[WKView _updateWindowAndViewFrames]):
1328 * UIProcess/WebPageProxy.cpp:
1329 (WebKit::WebPageProxy::setWindowFrame):
1330 * UIProcess/WebPageProxy.h:
1331 * UIProcess/mac/WebPageProxyMac.mm:
1332 (WebKit::WebPageProxy::windowAndViewFramesChanged):
1333 * WebProcess/Plugins/PluginView.cpp:
1334 (WebKit::PluginView::windowAndViewFramesChanged):
1335 * WebProcess/Plugins/PluginView.h:
1336 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1337 (WebKit::WebChromeClient::windowRect):
1338 * WebProcess/WebPage/WebPage.cpp:
1339 (WebKit::WebPage::windowAndViewFramesChanged):
1340 * WebProcess/WebPage/WebPage.h:
1341 (WebKit::WebPage::windowFrameInScreenCoordinates):
1342 (WebKit::WebPage::viewFrameInWindowCoordinates):
1343 (WebKit::WebPage::accessibilityPosition):
1344 * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
1345 (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
1347 2011-12-12 Anders Carlsson <andersca@apple.com>
1349 Add EventDispatcher class to WebKit2
1350 https://bugs.webkit.org/show_bug.cgi?id=74344
1352 Reviewed by Sam Weinig.
1354 The EventDispatcher is a singleton which will be in charge of dispatching events to WebPage objects.
1356 * DerivedSources.make:
1357 * DerivedSources.pri:
1360 * WebKit2.xcodeproj/project.pbxproj:
1361 * win/WebKit2.vcproj:
1364 * Platform/CoreIPC/MessageID.h:
1365 Add EventDispatcher.
1367 * WebProcess/WebConnectionToUIProcess.cpp:
1368 (WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess):
1369 (WebKit::WebConnectionToUIProcess::invalidate):
1370 * WebProcess/WebConnectionToUIProcess.h:
1371 WebConnectionToUIProcess doesn't need to be a QueueClient. Also, move the call to open into WebProcess since
1372 we don't want to add queue clients after the connection has been opened.
1374 * WebProcess/WebPage/EventDispatcher.cpp: Added.
1375 (WebKit::EventDispatcher::EventDispatcher):
1376 (WebKit::EventDispatcher::~EventDispatcher):
1377 (WebKit::EventDispatcher::didReceiveMessageOnConnectionWorkQueue):
1378 (WebKit::EventDispatcher::wheelEvent):
1379 * WebProcess/WebPage/EventDispatcher.h:
1380 * WebProcess/WebPage/EventDispatcher.messages.in: Added.
1383 * WebProcess/WebProcess.cpp:
1384 (WebKit::WebProcess::initialize):
1385 Add the event dispatcher as a queue client.
1387 * WebProcess/WebProcess.h:
1388 Add an EventDispatcher member variable to the web process.
1390 2011-12-12 Sam Weinig <sam@webkit.org>
1392 Prefix internal methods in Objective-C API files with an underscore
1393 https://bugs.webkit.org/show_bug.cgi?id=74363
1395 Reviewed by Dan Bernstein.
1397 * UIProcess/API/mac/WKBrowsingContextController.mm:
1398 (-[WKBrowsingContextController _pageRef]):
1399 (-[WKBrowsingContextController loadRequest:]):
1400 (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
1401 (-[WKBrowsingContextController stopLoading]):
1402 (-[WKBrowsingContextController reload]):
1403 (-[WKBrowsingContextController reloadFromOrigin]):
1404 (-[WKBrowsingContextController goForward]):
1405 (-[WKBrowsingContextController canGoForward]):
1406 (-[WKBrowsingContextController goBack]):
1407 (-[WKBrowsingContextController canGoBack]):
1408 (-[WKBrowsingContextController activeURL]):
1409 (-[WKBrowsingContextController provisionalURL]):
1410 (-[WKBrowsingContextController committedURL]):
1411 (-[WKBrowsingContextController title]):
1412 (-[WKBrowsingContextController textZoom]):
1413 (-[WKBrowsingContextController setTextZoom:]):
1414 (-[WKBrowsingContextController pageZoom]):
1415 (-[WKBrowsingContextController setPageZoom:]):
1416 (-[WKBrowsingContextController setPaginationMode:]):
1417 (-[WKBrowsingContextController paginationMode]):
1418 (-[WKBrowsingContextController setPageLength:]):
1419 (-[WKBrowsingContextController pageLength]):
1420 (-[WKBrowsingContextController setGapBetweenPages:]):
1421 (-[WKBrowsingContextController gapBetweenPages]):
1422 (-[WKBrowsingContextController pageCount]):
1423 (-[WKBrowsingContextController _initWithPageRef:]):
1424 * UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
1425 * UIProcess/API/mac/WKBrowsingContextGroup.mm:
1426 (-[WKBrowsingContextGroup allowsJavaScript]):
1427 (-[WKBrowsingContextGroup setAllowsJavaScript:]):
1428 (-[WKBrowsingContextGroup allowsPlugIns]):
1429 (-[WKBrowsingContextGroup setAllowsPlugIns:]):
1430 (-[WKBrowsingContextGroup _pageGroupRef]):
1431 * UIProcess/API/mac/WKBrowsingContextGroupInternal.h:
1432 * UIProcess/API/mac/WKConnection.mm:
1433 (-[WKConnection _initWithConnectionRef:]):
1434 * UIProcess/API/mac/WKConnectionInternal.h:
1435 * UIProcess/API/mac/WKProcessGroup.mm:
1436 (didCreateConnection):
1437 (-[WKProcessGroup _contextRef]):
1438 * UIProcess/API/mac/WKProcessGroupInternal.h:
1439 * UIProcess/API/mac/WKView.mm:
1440 (-[WKView initWithFrame:processGroup:browsingContextGroup:]):
1441 (-[WKView browsingContextController]):
1443 2011-12-12 Ryosuke Niwa <rniwa@webkit.org>
1445 WebKit code shouldn't be calling applyCommand directly
1446 https://bugs.webkit.org/show_bug.cgi?id=74337
1448 Reviewed by Darin Adler.
1450 * WebProcess/WebPage/WebPage.cpp:
1451 (WebKit::WebPage::replaceSelectionWithText):
1453 2011-12-12 Sam Weinig <sam@webkit.org>
1455 Remove unused getter on WKConnection.
1457 Reviewed by Dan Bernstein.
1459 * UIProcess/API/mac/WKConnection.mm:
1461 2011-12-12 Brady Eidson <beidson@apple.com>
1463 Page cache should support pages with plugins.
1464 <rdar://problem/5190122> and https://bugs.webkit.org/show_bug.cgi?id=13634
1466 Expose a WebKit2 preference for the page cache supporting plugins (on by default).
1468 Reviewed by Anders Carlsson.
1470 * Shared/WebPreferencesStore.h:
1472 * UIProcess/API/C/WKPreferences.cpp:
1473 (WKPreferencesSetPageCacheSupportsPlugins):
1474 (WKPreferencesGetPageCacheSupportsPlugins):
1475 * UIProcess/API/C/WKPreferencesPrivate.h:
1477 * WebProcess/WebPage/WebPage.cpp:
1478 (WebKit::WebPage::updatePreferences):
1480 2011-12-12 Sam Weinig <sam@webkit.org>
1482 Add WKConnection objective-c wrapper around WKConnectionRef
1483 <rdar://problem/10446092>
1484 https://bugs.webkit.org/show_bug.cgi?id=74324
1486 Reviewed by Anders Carlsson.
1488 * UIProcess/API/mac/WKConnection.h: Added.
1489 * UIProcess/API/mac/WKConnection.mm: Added.
1490 (-[WKConnection dealloc]):
1491 (-[WKConnection connectionRef]):
1492 (-[WKConnection delegate]):
1493 (-[WKConnection setDelegate:]):
1494 (didReceiveMessage):
1497 (-[WKConnection initWithConnectionRef:]):
1498 * UIProcess/API/mac/WKConnectionInternal.h: Added.
1501 * UIProcess/API/mac/WKProcessGroup.h:
1502 * UIProcess/API/mac/WKProcessGroup.mm:
1503 (didCreateConnection):
1504 (setUpConnectionClient):
1505 (-[WKProcessGroup initWithInjectedBundleURL:]):
1506 (-[WKProcessGroup delegate]):
1507 (-[WKProcessGroup setDelegate:]):
1508 Add WKProcessGroupDelegate to inform the user of when connections are established.
1510 * WebKit2.xcodeproj/project.pbxproj:
1513 2011-12-12 Anders Carlsson <andersca@apple.com>
1515 Rename QueueClient::willProcessMessageOnClientRunLoop
1516 https://bugs.webkit.org/show_bug.cgi?id=74325
1518 Reviewed by Sam Weinig.
1520 Rename the QueueClient willProcessMessageOnClientRunLoop function to didReceiveMessageOnConnectionWorkQueue
1521 and give it an out parameter to indicate whether the message was handled or not. This makes it more clear that
1522 the function is expected to handle the message.
1524 * Platform/CoreIPC/Connection.cpp:
1525 (CoreIPC::Connection::processIncomingMessage):
1526 * Platform/CoreIPC/Connection.h:
1527 * Scripts/webkit2/messages.py:
1528 (async_case_statement):
1529 * Scripts/webkit2/messages_unittest.py:
1530 * WebProcess/WebConnectionToUIProcess.cpp:
1531 (WebKit::WebConnectionToUIProcess::didReceiveMessageOnConnectionWorkQueue):
1532 * WebProcess/WebConnectionToUIProcess.h:
1533 * WebProcess/WebProcess.cpp:
1534 (WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue):
1535 * WebProcess/WebProcess.h:
1537 2011-12-12 Alexis Menard <alexis.menard@openbossa.org>
1539 Unreviewed cleanup fix.
1541 Add missing files from https://bugs.webkit.org/show_bug.cgi?id=73016
1543 Also remove the files that should be removed.
1545 * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml: Added.
1546 * UIProcess/qt/qwkhistory.cpp: Removed.
1547 * UIProcess/qt/qwkhistory.h: Removed.
1548 * UIProcess/qt/qwkhistory_p.h: Removed.
1550 2011-12-12 Michael Bruning <michael.bruning@nokia.com>
1552 [qt][wk2] Postpone scroll effects when page transition is ongoing.
1553 https://bugs.webkit.org/show_bug.cgi?id=74177
1555 Reviewed by Kenneth Rohde Christiansen.
1557 * UIProcess/API/qt/qquickwebview.cpp:
1558 (QQuickWebViewPrivate::scrollPositionRequested):
1559 * UIProcess/API/qt/qquickwebview_p_p.h:
1560 (QQuickWebViewPrivate::PostTransitionState::apply):
1562 2011-12-12 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
1564 [Qt][WK2] Remove dead code from QtWebPageProxy
1565 https://bugs.webkit.org/show_bug.cgi?id=74296
1567 Reviewed by Andreas Kling.
1569 * UIProcess/qt/QtWebPageProxy.cpp:
1570 * UIProcess/qt/QtWebPageProxy.h:
1572 2011-12-12 Simon Hausmann <simon.hausmann@nokia.com>
1574 Unreviewed build fix.
1576 Add missing files from https://bugs.webkit.org/show_bug.cgi?id=73016
1578 * UIProcess/API/qt/qwebnavigationhistory.cpp: Added.
1579 (QWebNavigationListModelPrivate::QWebNavigationListModelPrivate):
1580 (QWebNavigationListModelPrivate::createWebNavigationModel):
1581 (QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate):
1582 (QWebNavigationHistoryPrivate::createHistory):
1583 (QWebNavigationHistoryPrivate::reset):
1584 (QWebNavigationHistoryPrivate::goBackTo):
1585 (QWebNavigationHistoryPrivate::goForwardTo):
1586 (QWebNavigationListModel::QWebNavigationListModel):
1587 (QWebNavigationListModel::~QWebNavigationListModel):
1588 (QWebNavigationListModel::rowCount):
1589 (QWebNavigationListModel::data):
1590 (QWebNavigationHistory::QWebNavigationHistory):
1591 (QWebNavigationHistory::~QWebNavigationHistory):
1592 (QWebNavigationHistory::backItems):
1593 (QWebNavigationHistory::forwardItems):
1594 * UIProcess/API/qt/qwebnavigationhistory_p.h: Added.
1595 * UIProcess/API/qt/qwebnavigationhistory_p_p.h: Added.
1597 2011-12-12 Simon Hausmann <simon.hausmann@nokia.com>
1599 [Qt] Move postMessage/messageReceived APIS to experimental
1601 Reviewed by Tor Arne Vestbø.
1603 * UIProcess/API/qt/qquickwebview.cpp:
1604 (QQuickWebViewPrivate::setPageProxy):
1605 (QQuickWebViewExperimental::QQuickWebViewExperimental):
1606 (QQuickWebViewExperimental::postMessage):
1607 * UIProcess/API/qt/qquickwebview_p.h:
1608 * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
1610 2011-12-12 Alexis Menard <alexis.menard@openbossa.org>
1612 [Qt][WK2] History is not accessible in QML.
1613 https://bugs.webkit.org/show_bug.cgi?id=73016
1615 Reviewed by Simon Hausmann.
1617 Remove the old qwkhistory and create QWebNavigationHistory which is QML
1618 friendly with data models you can plug to a view in QML
1621 * UIProcess/API/qt/qquickwebview.cpp:
1622 (QQuickWebViewPrivate::didChangeBackForwardList):
1623 (QQuickWebViewExperimental::navigationHistory):
1624 (QQuickWebViewExperimental::goForwardTo):
1625 (QQuickWebViewExperimental::goBackTo):
1626 * UIProcess/API/qt/qquickwebview_p.h:
1627 * UIProcess/API/qt/qquickwebview_p_p.h:
1628 * UIProcess/API/qt/qwebnavigationhistory.cpp: Added.
1629 (QWebNavigationListModelPrivate::QWebNavigationListModelPrivate):
1630 (QWebNavigationListModelPrivate::createWebNavigationModel):
1631 (QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate):
1632 (QWebNavigationHistoryPrivate::createHistory):
1633 (QWebNavigationHistoryPrivate::reset):
1634 (QWebNavigationHistoryPrivate::goBackTo):
1635 (QWebNavigationHistoryPrivate::goForwardTo):
1636 (QWebNavigationListModel::QWebNavigationListModel):
1637 (QWebNavigationListModel::~QWebNavigationListModel):
1638 (QWebNavigationListModel::rowCount):
1639 (QWebNavigationListModel::data):
1640 (QWebNavigationHistory::QWebNavigationHistory):
1641 (QWebNavigationHistory::~QWebNavigationHistory):
1642 (QWebNavigationHistory::backItems):
1643 (QWebNavigationHistory::forwardItems):
1644 * UIProcess/API/qt/qwebnavigationhistory_p.h: Added.
1645 * UIProcess/API/qt/qwebnavigationhistory_p_p.h: Renamed from Source/WebKit2/UIProcess/qt/qwkhistory_p.h.
1646 * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml: Added.
1647 * UIProcess/qt/QtWebPageLoadClient.cpp:
1648 (QtWebPageLoadClient::QtWebPageLoadClient):
1649 (QtWebPageLoadClient::didChangeBackForwardList):
1650 * UIProcess/qt/QtWebPageLoadClient.h:
1651 * UIProcess/qt/QtWebPageProxy.cpp:
1652 (QtWebPageProxy::QtWebPageProxy):
1653 (QtWebPageProxy::~QtWebPageProxy):
1654 (QtWebPageProxy::goBackTo):
1655 (QtWebPageProxy::goForwardTo):
1656 (QtWebPageProxy::navigationHistory):
1657 * UIProcess/qt/QtWebPageProxy.h:
1658 * UIProcess/qt/qwkhistory.cpp: Removed.
1659 * UIProcess/qt/qwkhistory.h: Removed.
1661 2011-12-09 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
1663 [Qt][WK2] Move startDrag implementation to QtWebPageEventHandler
1664 https://bugs.webkit.org/show_bug.cgi?id=73145
1666 Reviewed by Simon Hausmann.
1668 Move QtWebPageProxy::startDrag to QtWebPageEventHandler::startDrag
1669 and call it straight from QtPageClient.
1671 * UIProcess/API/qt/qquickwebview.cpp:
1672 (QQuickWebViewPrivate::QQuickWebViewPrivate):
1673 * UIProcess/qt/QtWebPageEventHandler.cpp:
1674 (dragOperationToDropAction):
1675 (dragOperationToDropActions):
1676 (dropActionToDragOperation):
1677 Now these functions are static inline and not part of QtWebPageEventHandler
1680 (QtWebPageEventHandler::QtWebPageEventHandler):
1681 (QtWebPageEventHandler::startDrag):
1682 * UIProcess/qt/QtWebPageEventHandler.h:
1683 * UIProcess/qt/QtWebPageProxy.cpp:
1684 (QtWebPageProxy::startDrag): removed.
1686 2011-12-12 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
1688 [Qt] [WK2] Support customizing popup menus with QML
1689 https://bugs.webkit.org/show_bug.cgi?id=73560
1691 Reviewed by Tor Arne Vestbø.
1693 Add a new property 'itemSelector' to WebView (experimental for now) that contains
1694 the QML component used when it needs to spawn a popup menu. For example, <select>
1695 HTML tag may trigger a popup menu.
1697 When loaded the component will have the 'model' available in its context with two
1698 properties: 'elementRect', describing the position of the element which spawned
1699 the item selector, and 'items', which is a model ready to be used by ListView. The
1700 'model' also have methods to accept/reject the selection.
1702 Option groups are available as a property for each row in the 'items' model. This
1703 can be used together with ListView to create sections, as demonstrated in the
1704 MiniBrowser. QML tests were added as well.
1706 The existing Desktop version is removed since after the Qt5 refactoring isn't
1707 working correctly. Once Qt have its own QML components for popup, we hope to use
1708 it as a default if no other popupMenu is specified.
1711 * UIProcess/API/qt/qquickwebview.cpp:
1712 (QQuickWebViewPrivate::QQuickWebViewPrivate):
1713 (QQuickWebViewExperimental::itemSelector):
1714 (QQuickWebViewExperimental::setItemSelector):
1715 * UIProcess/API/qt/qquickwebview_p.h:
1716 * UIProcess/API/qt/qquickwebview_p_p.h:
1717 (QQuickWebViewPrivate::get):
1718 * UIProcess/API/qt/tests/qmltests/WebView/tst_itemSelector.qml: Added.
1719 * UIProcess/API/qt/tests/qmltests/common/select.html: Added.
1720 * UIProcess/API/qt/tests/qmltests/qmltests.pro:
1721 * UIProcess/qt/QtPageClient.cpp:
1722 * UIProcess/qt/QtWebPageProxy.cpp:
1723 (QtWebPageProxy::createPopupMenuProxy):
1724 * UIProcess/qt/WebPopupMenuProxyQt.cpp:
1725 (WebKit::PopupMenuItemModel::rowCount):
1726 (WebKit::PopupMenuItemModel::Item::Item):
1727 (WebKit::ItemSelectorContextObject::elementRect):
1728 (WebKit::ItemSelectorContextObject::items):
1729 (WebKit::ItemSelectorContextObject::reject):
1730 (WebKit::ItemSelectorContextObject::ItemSelectorContextObject):
1731 (WebKit::ItemSelectorContextObject::accept):
1732 (WebKit::createRoleNamesHash):
1733 (WebKit::PopupMenuItemModel::PopupMenuItemModel):
1734 (WebKit::PopupMenuItemModel::data):
1735 (WebKit::PopupMenuItemModel::select):
1736 (WebKit::PopupMenuItemModel::selectedOriginalIndex):
1737 (WebKit::PopupMenuItemModel::buildItems):
1738 (WebKit::WebPopupMenuProxyQt::WebPopupMenuProxyQt):
1739 (WebKit::WebPopupMenuProxyQt::showPopupMenu):
1740 (WebKit::WebPopupMenuProxyQt::hidePopupMenu):
1741 (WebKit::WebPopupMenuProxyQt::selectIndex):
1742 (WebKit::WebPopupMenuProxyQt::createItem):
1743 (WebKit::WebPopupMenuProxyQt::createContext):
1744 (WebKit::WebPopupMenuProxyQt::notifyValueChanged):
1745 * UIProcess/qt/WebPopupMenuProxyQt.h:
1746 (WebKit::WebPopupMenuProxyQt::create):
1747 * UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp: Removed.
1748 * UIProcess/qt/WebPopupMenuProxyQtDesktop.h: Removed.
1750 2011-12-11 Gopal Raghavan <gopal.1.raghavan@nokia.com>
1752 [Qt] QQuickWebView missing titleChanged signal tests
1753 https://bugs.webkit.org/show_bug.cgi?id=73923
1755 Reviewed by Simon Hausmann.
1757 Added tests for QQuickWebView tilteChanged signal.
1759 * UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml: Added.
1760 * UIProcess/API/qt/tests/qmltests/common/test3.html: Added.
1761 * UIProcess/API/qt/tests/qmltests/qmltests.pro:
1763 2011-12-11 Anders Carlsson <andersca@apple.com>
1765 Crash when trying to garbage collect JavaScript objects
1766 https://bugs.webkit.org/show_bug.cgi?id=74259
1767 <rdar://problem/10556188>
1769 Reviewed by Sam Weinig.
1771 * UIProcess/WebContext.cpp:
1772 (WebKit::WebContext::garbageCollectJavaScriptObjects):
1773 Use sendToAllProcesses which is more correct and also handles m_process being null.
1775 2011-12-11 Andreas Kling <kling@webkit.org>
1777 WK2/NetscapePlugin: Incorrect mouse event coordinates when frameScaleFactor != 1.
1778 <http://webkit.org/b/74209> and <rdar://problem/10438197>
1780 Reviewed by Anders Carlsson.
1782 * Shared/WebEvent.h:
1783 * Shared/WebMouseEvent.cpp:
1785 Remove the WebMouseEvent "copy" constructor that applied a scale factor
1786 to the coordinates of an existing event.
1788 * WebProcess/Plugins/PluginView.cpp:
1789 (WebKit::PluginView::handleEvent):
1791 Pass the WebMouseEvent through to the plugin unmodified.
1793 (WebKit::PluginView::viewGeometryDidChange):
1795 Plumb a complex translate+scale transform through to the plugin, so coordinate
1796 space transformations in will behave correctly with scale factors other than 1.
1798 2011-12-10 Sam Weinig <sam@webkit.org>
1800 Try to fix the windows build.
1802 * win/WebKit2.vcproj:
1804 2011-12-10 Alexis Menard <alexis.menard@openbossa.org>
1806 Unreviewed build fix for Qt.
1808 Build error introduced by r102484.
1812 2011-12-09 Mark Rowe <mrowe@apple.com>
1814 Fix the Snow Leopard build some more.
1816 Move the #if to a location where it will do some good.
1818 * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
1820 2011-12-09 Mark Rowe <mrowe@apple.com>
1822 Fix the Snow Leopard build.
1824 Wrap some code that is only applicable to Lion and newer in the appropriate #if's.
1826 * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
1827 * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
1828 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1829 (WebKit::ProcessLauncher::launchProcess):
1831 2011-12-09 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
1833 [Qt] request parameter of QQuickWebView::navigationRequested is not a registered type
1834 https://bugs.webkit.org/show_bug.cgi?id=73826
1836 Reviewed by Tor Arne Vestbø.
1838 Adding QWebNavigationRequest by moving NavigationRequest out of QtWebPagePolicyClient.
1841 * UIProcess/API/qt/qquickwebview_p.h:
1842 * UIProcess/API/qt/qwebnavigationrequest.cpp: Added.
1843 (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
1844 (QWebNavigationRequestPrivate::~QWebNavigationRequestPrivate):
1845 (QWebNavigationRequest::QWebNavigationRequest):
1846 (QWebNavigationRequest::~QWebNavigationRequest):
1847 (QWebNavigationRequest::setAction):
1848 (QWebNavigationRequest::url):
1849 (QWebNavigationRequest::button):
1850 (QWebNavigationRequest::modifiers):
1851 (QWebNavigationRequest::action):
1852 * UIProcess/API/qt/qwebnavigationrequest_p.h: Added.
1853 * UIProcess/qt/QtWebPagePolicyClient.cpp:
1854 (QtWebPagePolicyClient::decidePolicyForNavigationAction):
1855 (QtWebPagePolicyClient::decidePolicyForResponse):
1857 2011-12-09 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
1859 [Qt][WK2] Unskip API tests
1860 https://bugs.webkit.org/show_bug.cgi?id=74180
1862 Reviewed by Tor Arne Vestbø.
1864 Unskip API tests for geolocation and javascript dialogs.
1866 * UIProcess/API/qt/tests/qmltests/WebView/tst_geopermission.qml:
1867 * UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:
1869 2011-12-07 Mark Rowe <mrowe@apple.com>
1871 <http://webkit.org/b/74061> WebProcess and PluginProcess should inherit environment
1872 variables provided in LC_DYLD_ENVIRONMENT of main executable binary.
1874 Reviewed by Darin Adler.
1876 * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h: Added.
1877 * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm: Added.
1878 (WebKit::DynamicLinkerEnvironmentExtractor::DynamicLinkerEnvironmentExtractor):
1879 (WebKit::DynamicLinkerEnvironmentExtractor::processEnvironmentVariable): Parse out the name
1880 and value from the environment string and add an entry to our variable map if the variable
1881 is one that dyld would respect in LC_DYLD_ENVIRONMENT.
1882 (WebKit::DynamicLinkerEnvironmentExtractor::processLoadCommand): Look for a LC_DYLD_ENVIRONMENT
1883 load command and extract any environment string that we find within.
1884 (WebKit::DynamicLinkerEnvironmentExtractor::processLoadCommands): Iterate over each
1885 load command in the Mach-O file.
1886 (WebKit::DynamicLinkerEnvironmentExtractor::processSingleArchitecture): Determine whether
1887 the Mach-O file is of the correct architecture, and if so then process the load commands
1889 (WebKit::DynamicLinkerEnvironmentExtractor::processFatFile): Process each architecture of the
1890 Mach-O file in turn.
1891 (WebKit::DynamicLinkerEnvironmentExtractor::getExtractedEnvironmentVariables): Add our
1892 extracted variables to the passed-in EnvironmentVariables object. We skip adding any
1893 variables that already exist so as to allow variables passed in the environment to override
1894 those that we extract from the executable file.
1895 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1896 (WebKit::ProcessLauncher::launchProcess): Extract the environment variables from the
1897 main binary and add them to the launch environment of our subprocess.
1898 * WebKit2.xcodeproj/project.pbxproj:
1900 2011-12-09 Sam Weinig <sam@webkit.org>
1902 Add WKView implementation for quickLookPreviewItemsAtWindowLocation.
1903 <rdar://problem/10472505>
1905 Reviewed by Dan Bernstein.
1907 * UIProcess/API/mac/WKView.mm:
1908 (-[WKView quickLookPreviewItemsAtWindowLocation:]):
1910 2011-12-09 Allan Sandfeld Jensen <allan.jensen@nokia.com>
1912 [Qt] Open shared memory files with shm_open.
1913 https://bugs.webkit.org/show_bug.cgi?id=74078
1915 Original patch by Kimmo Kinnunen
1917 Reviewed by Kenneth Rohde Christiansen.
1919 Open shared memory files with shm_open. This uses mount point that is
1920 intended to host shared memory files. Typically this is /dev/shm.
1922 This fixes crashes when filesystem that hosts QDir::temp() is full.
1924 This is also more well-defined with respect to question whether SHM
1925 writes to temp dir would cause unintended wear if hosted on flash drives.
1927 This also fixes performance problems regarding QDir::temp() and
1928 mkostemp(), both of which appear to be long operations.
1930 * Platform/unix/SharedMemoryUnix.cpp:
1931 (WebKit::SharedMemory::create):
1933 2011-12-09 Hugo Parente Lima <hugo.lima@openbossa.org>
1935 [Qt] Click's count is limited to three continuous clicks.
1936 https://bugs.webkit.org/show_bug.cgi?id=45666
1938 Reviewed by Kenneth Rohde Christiansen.
1940 Make Qt recognize "infinite" continuous mouse clicks.
1941 handleMouseDoubleClickEvent merged into handleMousePressEvent.
1943 * UIProcess/qt/QtWebPageEventHandler.cpp:
1944 (QtWebPageEventHandler::QtWebPageEventHandler):
1945 (QtWebPageEventHandler::handleEvent):
1946 (QtWebPageEventHandler::handleMousePressEvent):
1947 (QtWebPageEventHandler::timerEvent):
1948 * UIProcess/qt/QtWebPageEventHandler.h:
1950 2011-12-09 Sam Weinig <sam@webkit.org>
1952 Expose a WKConnectionRef which represents the connection to/from the WebProcess/UIProcess
1953 https://bugs.webkit.org/show_bug.cgi?id=74218
1955 Reviewed by Anders Carlsson.
1957 Test: WebKit2.WKConnectionTest in TestWebKitAPI
1959 * Shared/WebConnection.cpp:
1960 (WebKit::WebConnection::forwardDidReceiveMessageToClient):
1961 * Shared/WebConnection.h:
1962 Add helper for connection subclasses to dispatch to the client.
1964 * UIProcess/WebConnectionToWebProcess.cpp:
1965 (WebKit::WebConnectionToWebProcess::didReceiveMessage):
1966 Handle postMessage messages from the WebProcess.
1968 * UIProcess/WebContext.cpp:
1969 (WebKit::WebContext::processDidFinishLaunching):
1970 Dispatch the notification that a connection to the WebProcess has
1973 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1974 (WKBundleGetApplicationConnection):
1975 * WebProcess/InjectedBundle/API/c/WKBundle.h:
1976 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1977 (WebKit::InjectedBundle::webConnectionToUIProcess):
1978 * WebProcess/InjectedBundle/InjectedBundle.h:
1979 (WebKit::WebProcess::webConnectionToUIProcess):
1980 Add accessor to get the connection to the UIProcess from
1983 * WebProcess/WebConnectionToUIProcess.cpp:
1984 (WebKit::WebConnectionToUIProcess::didReceiveMessage):
1985 Handle postMessage messages from the UIProcess.
1986 * WebProcess/WebProcess.h:
1988 2011-12-08 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
1990 [Qt] Update WebGraphicLayer's child content scale in all child binding method.
1991 https://bugs.webkit.org/show_bug.cgi?id=74101
1993 Reviewed by Noam Rosenthal.
1995 setChildren is currently the only method propagating the parent layer's content
1996 scale to its children. This need to be done for addChild* as well.
1998 This fixes the overlay layer not being rendered with the right scale when created
1999 until the contents scale is modified again.
2001 * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
2002 (WebCore::WebGraphicsLayer::setChildren):
2003 (WebCore::WebGraphicsLayer::addChild):
2004 (WebCore::WebGraphicsLayer::addChildAtIndex):
2005 (WebCore::WebGraphicsLayer::addChildAbove):
2006 (WebCore::WebGraphicsLayer::addChildBelow):
2007 (WebCore::WebGraphicsLayer::replaceChild):
2009 2011-12-09 Michael Brüning <michael.bruning@nokia.com>
2011 [Qt][WK2] Fix tst_QQuickWebView::scrollRequest() API test
2012 https://bugs.webkit.org/show_bug.cgi?id=73994
2014 Reviewed by Kenneth Rohde Christiansen.
2016 * UIProcess/API/qt/tests/html/scroll.html: Corrected html and
2017 added some coloring.
2018 * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2019 (tst_QQuickWebView::scrollRequest): Corrected calculation
2022 2011-12-09 Simon Hausmann <simon.hausmann@nokia.com>
2024 [Qt] Fix compilation with newly separated Qt 5 QtQuick module
2025 https://bugs.webkit.org/show_bug.cgi?id=73990
2027 Reviewed by Kenneth Rohde Christiansen, tweaked by Csaba Osztrogonác.
2029 Fix QtQuick includes after move from QtDeclarative to QtQuick.
2031 * UIProcess/API/qt/qquickwebpage.cpp:
2032 * UIProcess/API/qt/qquickwebpage_p.h:
2033 * UIProcess/API/qt/qquickwebview.cpp:
2034 * UIProcess/API/qt/qquickwebview_p.h:
2035 * UIProcess/API/qt/tests/tests.pri: Tests need symbols from QtQuick, so link library.
2036 * UIProcess/API/qt/tests/testwindow.h:
2037 * UIProcess/qt/QtDialogRunner.cpp:
2038 * UIProcess/qt/QtSGTileNode.cpp:
2039 * UIProcess/qt/QtSGTileNode.h:
2040 * UIProcess/qt/QtSGUpdateQueue.cpp:
2041 * UIProcess/qt/QtViewportInteractionEngine.cpp:
2042 * UIProcess/qt/QtWebPageProxy.cpp:
2043 * UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
2045 2011-12-09 Nayan Kumar K <nayankk@motorola.com>
2047 [WebKit2][gtk] Re-enable running TestWebKitSettings
2048 https://bugs.webkit.org/show_bug.cgi?id=70135
2050 Reviewed by Martin Robinson.
2052 Re-enable running TestWebKitSettings which was skipped as part
2053 of https://bugs.webkit.org/show_bug.cgi?id=70129 due to the
2054 bug https://bugs.webkit.org/show_bug.cgi?id=70127.
2056 * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
2057 (testWebKitSettings): Run testWebKitSettings.
2058 (testWebKitSettingsNewWithSettings): Run testWebKitSettingsNewWithSettings.
2060 2011-12-08 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
2062 [Qt] [WK2] Webkit should release TextureMapper GL objects if page paint node is deallocated.
2063 https://bugs.webkit.org/show_bug.cgi?id=73591
2065 Reviewed by Noam Rosenthal.
2067 Implement deallocation of TextureMapper GL objects when QQuickWebPage paint node deallocated.
2068 Also adds purging GraphicsLayer backing stores on WebProcess side in order to force repainting
2069 when page becomes visible and painting resumes and fixes incorrect initialization of view
2072 * UIProcess/API/qt/qquickwebpage.cpp:
2073 (QQuickWebPagePrivate::resetPaintNode):
2074 * UIProcess/API/qt/qquickwebview.cpp:
2075 (QQuickWebViewPrivate::QQuickWebViewPrivate):
2076 * UIProcess/API/qt/tests/html/direct-image-compositing.html: Added.
2077 * UIProcess/API/qt/tests/html/resources/simple_image.png: Added.
2078 * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2079 (tst_QQuickWebView::showWebView):
2080 (tst_QQuickWebView::removeFromCanvas):
2081 * UIProcess/DrawingAreaProxy.h:
2082 (WebKit::DrawingAreaProxy::layerTreeHostProxy):
2083 * UIProcess/LayerTreeHostProxy.h:
2084 * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2085 (WebKit::LayerTreeHostProxy::purgeGLResources):
2086 * UIProcess/qt/QtWebPageProxy.cpp:
2087 (QtWebPageProxy::purgeGLResources):
2088 * UIProcess/qt/QtWebPageProxy.h:
2089 * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
2090 (WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
2091 (WebCore::WebGraphicsLayer::purgeBackingStores):
2092 (WebCore::WebGraphicsLayer::recreateBackingStoreIfNeeded):
2093 * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
2094 * WebProcess/WebPage/LayerTreeHost.h:
2095 (WebKit::LayerTreeHost::purgeBackingStores):
2096 * WebProcess/WebPage/LayerTreeHost.messages.in:
2097 * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
2098 (WebKit::LayerTreeHostQt::LayerTreeHostQt):
2099 (WebKit::LayerTreeHostQt::flushPendingLayerChanges):
2100 (WebKit::LayerTreeHostQt::purgeBackingStores):
2101 (WebKit::LayerTreeHostQt::recreateBackingStoreIfNeeded):
2102 * WebProcess/WebPage/qt/LayerTreeHostQt.h:
2104 2011-12-08 Simon Fraser <simon.fraser@apple.com>
2106 Forced compositing mode breaks display of full-page PDFs in WK2
2107 https://bugs.webkit.org/show_bug.cgi?id=74122
2108 <rdar://problem/9550059>
2110 Reviewed by Dan Bernstein.
2112 Full page PDFs are displayed in WK2 in a subview of the WKView. However,
2113 when the WKView is forced to use accelerated compositing, the layer obscures
2116 To fix this we have to drop out of compositing mode when the WKView is showing
2117 a custom representation.
2119 * UIProcess/API/mac/WKView.mm:
2120 (-[WKView _setPageHasCustomRepresentation:]): Tell the drawing area that the view
2121 gained or lost a custom representation.
2122 * UIProcess/DrawingAreaProxy.h:
2123 (WebKit::DrawingAreaProxy::pageCustomRepresentationChanged):
2124 * UIProcess/DrawingAreaProxyImpl.h:
2125 * UIProcess/DrawingAreaProxyImpl.cpp:
2126 (WebKit::DrawingAreaProxyImpl::pageCustomRepresentationChanged): Send a messgae to the web process
2127 to indicate that the custom representation changed.
2128 * WebProcess/WebPage/DrawingArea.h:
2129 (WebKit::DrawingArea::pageCustomRepresentationChanged):
2130 * WebProcess/WebPage/DrawingArea.messages.in:
2131 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2132 (WebKit::DrawingAreaImpl::pageCustomRepresentationChanged): Enter or exit compositing mode
2133 as appropriate when we gain or lost a custom represenetation.
2134 (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
2135 * WebProcess/WebPage/DrawingAreaImpl.h:
2137 2011-12-08 Jer Noble <jer.noble@apple.com>
2139 HiDPI: Switching a video element to full screen in HiDPI mode doesn't fit the screen correctly
2140 https://bugs.webkit.org/show_bug.cgi?id=74119
2141 rdar://problem/10356869
2143 Reviewed by Darin Adler.
2145 Use the Lion-only -[NSWindow convertRectToScreen:] function to convert between window
2146 coordinates and screen coordinates.
2148 * UIProcess/mac/WKFullScreenWindowController.mm:
2149 (-[WKFullScreenWindowController enterFullScreen:]):
2151 2011-12-08 Csaba Osztrogonác <ossy@webkit.org>
2153 [Qt][WK2] Unreviewed buildfix after r102352.
2155 * DerivedSources.pri:
2157 2011-12-06 Jon Lee <jonlee@apple.com>
2159 [WK2] Add permissions support (73960)
2160 https://bugs.webkit.org/show_bug.cgi?id=73960
2161 <rdar://problem/10357008>
2163 Reviewed by Darin Adler.
2165 * DerivedSources.make: Moved notification files to its own directory. Need to add that path.
2166 * WebKit2.xcodeproj/project.pbxproj: New header and impl files.
2167 * Target.pri: Ditto.
2168 * GNUmakefile.am: Ditto.
2169 * win/WebKit2.vcproj: Ditto.
2170 * win/WebKit2Common.vsprops: Add path to Notifications directory.
2172 Implement permission functions, which go through permission request manager.
2174 * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
2175 (WebKit::WebNotificationClient::requestPermission):
2176 (WebKit::WebNotificationClient::cancelRequestsForPermission):
2177 (WebKit::WebNotificationClient::checkPermission):
2179 New NotificationPermissionRequestManager to make and cancel permission requests, and to retrieve current
2182 * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: Added.
2183 (WebKit::generateRequestID):
2184 (WebKit::NotificationPermissionRequestManager::create):
2185 (WebKit::NotificationPermissionRequestManager::NotificationPermissionRequestManager):
2186 (WebKit::NotificationPermissionRequestManager::startRequest): Keep track of the provided callback once
2187 policy decision is made.
2188 (WebKit::NotificationPermissionRequestManager::cancelRequest):
2189 (WebKit::NotificationPermissionRequestManager::permissionLevel): Retrieve level through a synchronous
2190 message to the proxy.
2191 (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision): Invoke the callback.
2192 * WebProcess/Notifications/NotificationPermissionRequestManager.h: Added.
2193 (WebKit::isRequestIDValid): Make sure any provided request IDs are valid.
2195 Added new NotificationPermissionRequest class.
2197 * UIProcess/Notifications/NotificationPermissionRequest.cpp: Added.
2198 (WebKit::NotificationPermissionRequest::create):
2199 (WebKit::NotificationPermissionRequest::NotificationPermissionRequest):
2200 (WebKit::NotificationPermissionRequest::allow): Notify manager of decision.
2201 (WebKit::NotificationPermissionRequest::deny): Ditto.
2202 (WebKit::NotificationPermissionRequest::invalidate): Disassociate with manager.
2203 (WebKit::NotificationPermissionRequest::type):
2204 * UIProcess/Notifications/NotificationPermissionRequest.h: Added.
2206 WKAPI support for NotificationPermissionRequest:
2208 * Shared/API/c/WKBase.h:
2209 * Shared/APIObject.h:
2210 * UIProcess/API/C/WKAPICast.h:
2211 * UIProcess/API/C/WKNotificationPermissionRequest.cpp: Added.
2212 (WKNotificationPermissionRequestGetTypeID):
2213 (WKNotificationPermissionRequestAllow):
2214 (WKNotificationPermissionRequestDeny):
2215 * UIProcess/API/C/WKNotificationPermissionRequest.h: Added.
2217 Other additions to WK API:
2219 * UIProcess/API/C/WKNotificationProvider.h: Added new callback for WKNotificationProviders, to return policy
2220 for a given security origin.
2221 * UIProcess/API/C/WKPage.h: Added new callback to WKPageUIClient to ask user to decide on policy.
2223 New NotificationPermissionRequestManagerProxy to create requests.
2225 * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.cpp: Added.
2226 (WebKit::NotificationPermissionRequestManagerProxy::NotificationPermissionRequestManagerProxy):
2227 (WebKit::NotificationPermissionRequestManagerProxy::invalidateRequests):
2228 (WebKit::NotificationPermissionRequestManagerProxy::createRequest):
2229 (WebKit::NotificationPermissionRequestManagerProxy::didReceiveNotificationPermissionDecision):
2230 * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h: Added.
2232 Added new message to notification manager: NotificationPermissionLevel, to retrieve policy. The current
2233 JS API retrieves the permission synchronously, so the message needs to be sent synchronously also.
2235 * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Moved from Source/WebKit2/UIProcess/WebNotificationManagerProxy.messages.in.
2236 * UIProcess/Notifications/WebNotificationProvider.cpp: Moved from Source/WebKit2/UIProcess/WebNotificationProvider.cpp.
2237 (WebKit::WebNotificationProvider::policyForNotificationPermissionAtOrigin): Added.
2238 * UIProcess/Notifications/WebNotificationProvider.h: Moved from Source/WebKit2/UIProcess/WebNotificationProvider.h.
2239 * UIProcess/WebProcessProxy.cpp:
2240 (WebKit::WebProcessProxy::didReceiveSyncMessage): Boilerplate to forward messages to notification manager.
2242 * UIProcess/Notifications/WebNotificationManagerProxy.cpp: Moved from Source/WebKit2/UIProcess/WebNotificationManagerProxy.cpp.
2243 (WebKit::WebNotificationManagerProxy::create):
2244 (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy):
2245 (WebKit::WebNotificationManagerProxy::invalidate):
2246 (WebKit::WebNotificationManagerProxy::initializeProvider):
2247 (WebKit::WebNotificationManagerProxy::didReceiveMessage):
2248 (WebKit::WebNotificationManagerProxy::didReceiveSyncMessage):
2249 (WebKit::WebNotificationManagerProxy::show):
2250 (WebKit::WebNotificationManagerProxy::cancel):
2251 (WebKit::WebNotificationManagerProxy::didDestroyNotification):
2252 (WebKit::WebNotificationManagerProxy::notificationPermissionLevel): Retrieve the policy from the provider.
2253 (WebKit::WebNotificationManagerProxy::providerDidShowNotification):
2254 (WebKit::WebNotificationManagerProxy::providerDidClickNotification):
2255 (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):
2256 * UIProcess/Notifications/WebNotificationManagerProxy.h: Moved from Source/WebKit2/UIProcess/WebNotificationManagerProxy.h.
2257 (WebKit::WebNotificationManagerProxy::clearContext):
2258 (WebKit::WebNotificationManagerProxy::type):
2260 Added NotificationPermissionRequestManagerProxy to WebPageProxy, to allow a request for permission to
2261 go through to the UI client. Added new message to WebPageProxy, RequestNotificationPermission.
2263 * UIProcess/WebPageProxy.cpp:
2264 (WebKit::WebPageProxy::WebPageProxy):
2265 (WebKit::WebPageProxy::close): Invalidate pending requests.
2266 (WebKit::WebPageProxy::processDidCrash): Ditto.
2267 (WebKit::WebPageProxy::requestNotificationPermission): Forward request to UI client.
2268 * UIProcess/WebPageProxy.h:
2269 * UIProcess/WebPageProxy.messages.in:
2271 * UIProcess/WebUIClient.cpp:
2272 (WebKit::WebUIClient::decidePolicyForNotificationPermissionRequest):
2273 * UIProcess/WebUIClient.h:
2275 Added new message DidReceiveNotificationPermissionDecision. The WebPage forwards the message to the
2276 permission request manager.
2278 * WebProcess/WebPage/WebPage.messages.in: Added new message DidReceiveNotificationPermissionDecision
2279 * WebProcess/WebPage/WebPage.cpp:
2280 (WebKit::WebPage::notificationPermissionRequestManager): Create manager on request.
2281 (WebKit::WebPage::didReceiveNotificationPermissionDecision):
2282 * WebProcess/WebPage/WebPage.h:
2284 Moving files to Notifications/ subdirectory.
2286 * UIProcess/Notifications/WebNotification.cpp: Moved from Source/WebKit2/UIProcess/WebNotification.cpp.
2287 * UIProcess/Notifications/WebNotification.h: Moved from Source/WebKit2/UIProcess/WebNotification.h.
2289 2011-12-08 Nayan Kumar K <nayankk@motorola.com>
2291 [WebKit2] Initialize threading in UI process.
2292 https://bugs.webkit.org/show_bug.cgi?id=70127
2294 Reviewed by Anders Carlsson.
2298 * Shared/APIObject.cpp: Added.
2299 (WebKit::APIObject::APIObject):
2300 * Shared/APIObject.h:
2302 * WebKit2.xcodeproj/project.pbxproj:
2303 * win/WebKit2.vcproj:
2305 2011-12-08 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
2307 [Qt] [WK2] Directly composited images doesn't render
2308 https://bugs.webkit.org/show_bug.cgi?id=74058
2310 Reviewed by Noam Rosenthal.
2312 Attach image to WebGraphicsLayer even if layerTreeTileClient is not set
2313 and create/assign remote image tiles later during sync.
2315 * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
2316 (WebCore::WebGraphicsLayer::setContentsNeedsDisplay):
2317 (WebCore::WebGraphicsLayer::setContentsToImage):
2318 (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
2320 2011-12-08 Simon Hausmann <simon.hausmann@nokia.com>
2322 REGRESSION(r102334): Various Qt WK2 layout tests crash
2324 Reviewed by Tor Arne Vestbø.
2326 * WebProcess/WebPage/WebPage.cpp:
2327 (WebKit::WebPage::editorState): Add missing null pointer check for the editable
2328 element (scope) before calling innerText.
2330 2011-12-08 Simon Hausmann <simon.hausmann@nokia.com>
2332 [Qt] WebKitTestRunner crashes with debug builds
2333 https://bugs.webkit.org/show_bug.cgi?id=74090
2335 Reviewed by Tor Arne Vestbø.
2337 Export private C++ API style platformInitialize function needed
2340 * UIProcess/API/qt/qquickwebview.cpp:
2341 (QQuickWebView::platformInitialize):
2342 * UIProcess/API/qt/qquickwebview_p.h:
2344 2011-12-07 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
2346 [Qt] Fix non-animated pinch-zoom scale commit.
2347 https://bugs.webkit.org/show_bug.cgi?id=74007
2349 Reviewed by Kenneth Rohde Christiansen.
2351 The update deferrer object was only destroyed at the end of the animation
2352 and wouldn't be if the pinch-zoom was ended within legal bounds.
2353 This patch also makes sure that the deferrer isn't destroyed and re-created
2354 once the animation is started if it was already there.
2356 * UIProcess/qt/QtViewportInteractionEngine.cpp:
2357 (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
2358 (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
2359 (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
2360 (WebKit::QtViewportInteractionEngine::pinchGestureEnded):
2361 * UIProcess/qt/QtViewportInteractionEngine.h:
2363 2011-12-08 Simon Hausmann <simon.hausmann@nokia.com>
2365 REGRESSION(r101683): QQuickWebView doesn't work with OpenGL/ES 2.0
2366 https://bugs.webkit.org/show_bug.cgi?id=74077
2368 Reviewed by Kenneth Rohde Christiansen.
2370 Replace Desktop OpenGL idiom of using gl_Vertex with a simple vertex attribute
2371 that's tied to the same register 0 (by being the first in the array).
2373 * UIProcess/API/qt/qquickwebpage.cpp:
2374 (PageProxyMaterialShader::attributeNames): Define "vertex" attribute, which is
2375 bound to register 0, which is the current vertex.
2376 (PageProxyMaterialShader::vertexShader): Use the vertex attribute instead of the
2377 built-in gl_Vertex, which is only present in Desktop GL.
2379 2011-12-07 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
2381 [Qt] Fix the memory leak of AC layer update message contents on the UI process.
2382 https://bugs.webkit.org/show_bug.cgi?id=74012
2384 Reviewed by Noam Rosenthal.
2386 Since the messages didn't have a virtual destructor, the destructor
2387 of child class members wouldn't be called and would cause the all tile
2388 update buffers, contained in a QImage, to be leaked as well.
2390 * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2391 (WebKit::LayerTreeMessageToRenderer::~LayerTreeMessageToRenderer):
2393 2011-12-08 Kenneth Rohde Christiansen <kenneth@webkit.org>
2395 Upsteam the Qt changes to the EditorState
2396 https://bugs.webkit.org/show_bug.cgi?id=74080
2398 Reviewed by Simon Hausmann.
2400 We are not doing the serialization manually due to it not being a POD
2401 structure anymore in the case of Qt.
2404 * Shared/EditorState.h:
2405 (WebKit::EditorState::EditorState):
2407 * WebKit2.xcodeproj/project.pbxproj:
2408 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2409 (WebKit::WebEditorClient::respondToChangedSelection):
2410 * WebProcess/WebPage/WebPage.cpp:
2411 (WebKit::WebPage::editorState):
2412 * win/WebKit2.vcproj:
2414 2011-12-08 Gopal Raghavan <gopal.1.raghavan@nokia.com>
2416 [Qt] cleanup qmlplugin
2417 https://bugs.webkit.org/show_bug.cgi?id=73834
2419 Reviewed by Tor Arne Vestbø.
2421 Removed empty folder qmlplugin.
2423 * UIProcess/API/qt/qmlplugin: Removed.
2425 2011-12-08 Sheriff Bot <webkit.review.bot@gmail.com>
2427 Unreviewed, rolling out r102323.
2428 http://trac.webkit.org/changeset/102323
2429 https://bugs.webkit.org/show_bug.cgi?id=74069
2431 Caused Chromium and GTK build failure (Requested by bashi on
2435 * win/WebKit2CFLite.def:
2437 2011-12-08 Fady Samuel <fsamuel@chromium.org>
2439 Move scalePageBy from eventSender to window.internals
2440 https://bugs.webkit.org/show_bug.cgi?id=64512
2442 Reviewed by Simon Fraser.
2445 * win/WebKit2CFLite.def:
2447 2011-12-07 Mark Rowe <mrowe@apple.com>
2449 Fix the 32-bit build.
2451 Ignore some warnings that only occur in 32-bit.
2453 * PluginProcess/mac/PluginProcessShim.mm:
2454 * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
2455 (WebKit::NetscapePluginModule::tryLoad):
2457 2011-12-07 Balazs Kelemen <kbalazs@webkit.org>
2459 ShareableBitmapGtk.cpp has no reason to exist
2460 https://bugs.webkit.org/show_bug.cgi?id=74011
2462 Reviewed by Martin Robinson.
2464 Remove this file since the real implementation is
2465 exists in ShareableBitmapCairo.cpp.
2467 * Shared/gtk/ShareableBitmapGtk.cpp: Removed.
2469 2011-12-07 Mary Wu <mary.wu@torchmobile.com.cn>
2471 Change function name InitializeLoggingChannelsIfNecessary to follow coding style guideline
2472 https://bugs.webkit.org/show_bug.cgi?id=73986
2474 Reviewed by Kenneth Rohde Christiansen.
2476 * UIProcess/WebContext.cpp:
2477 (WebKit::WebContext::WebContext):
2478 * WebProcess/WebProcess.cpp:
2479 (WebKit::WebProcess::WebProcess):
2481 2011-12-07 Zalan Bujtas <zbujtas@gmail.com>
2483 [Qt][WK2] Enable page cache.
2484 https://bugs.webkit.org/show_bug.cgi?id=73938
2486 Enable WebCore's page cache for Qt port by setting its capacity to 20. This is temporary
2487 and will be replaced by a computed value based on CacheMode. See bug#73918.
2489 Reviewed by Simon Hausmann.
2491 * WebProcess/qt/WebProcessQt.cpp:
2492 (WebKit::WebProcess::platformSetCacheModel):
2494 2011-12-06 Andy Estes <aestes@apple.com>
2496 REGRESSION (r101838): Crash in LayerTreeHostCA::initialize() when accelerated drawing is enabled
2497 https://bugs.webkit.org/show_bug.cgi?id=73955
2499 Reviewed by Anders Carlsson.
2501 * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
2502 (WebKit::LayerTreeHostCA::initialize): m_webPage->drawingArea() will be
2503 null here if we are initializing the layer tree host in DrawingArea's
2504 ctor (as is the case when accelerated drawing is enabled), before
2505 WebPage has set its m_drawingArea pointer. Since the layer tree cannot
2506 have been frozen at this point, it's safe to enable layer flush
2507 scheduling if drawingArea() is null.
2509 2011-12-06 Alexander Færøy <alexander.faeroy@nokia.com>
2511 [Qt] Fix assertion in QtViewportInteractionEngine.cpp:468
2512 https://bugs.webkit.org/show_bug.cgi?id=73914
2514 Reviewed by Kenneth Rohde Christiansen.
2516 m_suspendCount should always be zero when a pinch gesture is started.
2518 * UIProcess/qt/QtViewportInteractionEngine.cpp:
2519 (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
2521 2011-12-06 Simon Fraser <simon.fraser@apple.com>
2523 UI process crashes if the Web Process crashes on launch
2524 https://bugs.webkit.org/show_bug.cgi?id=73943
2526 Reviewed by Sam Weinig.
2528 When the Web Process crashes on launch, the WebConnectionToWebProcess
2529 object was getting deleted inside of didClose. Add a protector to
2532 * UIProcess/WebConnectionToWebProcess.cpp:
2533 (WebKit::WebConnectionToWebProcess::didClose):
2535 2011-12-06 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
2537 [Qt] Fix page overlay rendering with AC.
2538 https://bugs.webkit.org/show_bug.cgi?id=73935
2540 Reviewed by Noam Rosenthal.
2542 The inspector node highlight would display old highlights as well
2543 since the overlay is normally rendered right after the page on top
2544 of the same graphics context.
2546 * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
2547 (WebKit::LayerTreeHostQt::paintContents):
2549 2011-12-06 Michael Brüning <michael.bruning@nokia.com>
2551 [qt][wk2] Tests of QQuickWebView assert in debug builds when destroying QQuickWebViewPrivate
2552 https://bugs.webkit.org/show_bug.cgi?id=73907
2554 Reviewed by Kenneth Rohde Christiansen.
2556 * UIProcess/API/qt/qquickwebview.cpp: Disconnect signals from
2557 QtViewportInteractionEngine in ~QQuickWebViewPrivate.
2558 (QQuickWebViewPrivate::~QQuickWebViewPrivate):
2559 * UIProcess/API/qt/qquickwebview_p_p.h: Remove empty inline implementation of ~QQuickWebViewPrivate.
2561 2011-12-06 Kenneth Rohde Christiansen <kenneth@webkit.org>
2563 [Qt] Add initial support for focusing when entering edit mode.
2565 Reviewed by Simon Hausmann.
2567 Next step would be to properly upstream our EditorState code.
2569 * UIProcess/PageClient.h:
2570 * UIProcess/WebPageProxy.cpp:
2571 (WebKit::WebPageProxy::focusEditableArea):
2572 * UIProcess/WebPageProxy.h:
2573 * UIProcess/WebPageProxy.messages.in:
2574 * UIProcess/qt/QtPageClient.cpp:
2575 (QtPageClient::focusEditableArea):
2576 * UIProcess/qt/QtPageClient.h:
2577 * UIProcess/qt/QtViewportInteractionEngine.cpp:
2578 (WebKit::QtViewportInteractionEngine::itemCoordFromCSS):
2579 (WebKit::QtViewportInteractionEngine::itemRectFromCSS):
2580 (WebKit::QtViewportInteractionEngine::focusEditableArea):
2581 (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded):
2582 * UIProcess/qt/QtViewportInteractionEngine.h:
2583 * UIProcess/qt/QtWebPageEventHandler.cpp:
2584 (QtWebPageEventHandler::focusEditableArea):
2585 * UIProcess/qt/QtWebPageEventHandler.h:
2586 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2587 (WebKit::WebEditorClient::respondToChangedSelection):
2588 (WebKit::WebEditorClient::setInputMethodState):
2590 2011-12-06 Alexander Færøy <alexander.faeroy@nokia.com>
2592 [Qt] Fix assertion in QtWebPageEventHandler.cpp
2593 https://bugs.webkit.org/show_bug.cgi?id=73908
2595 Reviewed by Kenneth Rohde Christiansen.
2597 * UIProcess/qt/QtViewportInteractionEngine.cpp:
2598 (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
2600 2011-12-05 Igor Oliveira <igor.oliveira@openbossa.org>
2602 [Qt][WK2] Frame is not being showed in the screen when frameLoadCompleted is called
2603 https://bugs.webkit.org/show_bug.cgi?id=73850
2605 WebKit2 has a mechanism to prevent the composited layer tree of the outgoing page
2606 from being torn down or updated until the incoming page has layout. However, for simple
2607 pages, when the frame is loaded the page is not rendered in the screen.
2609 This patch fixes this bug calling LayerTreeHostQt::scheduleLayerFlush when m_layerFlushSchedulingEnabled
2612 Reviewed by Noam Rosenthal.
2614 * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
2615 (WebKit::LayerTreeHostQt::setLayerFlushSchedulingEnabled):
2617 2011-12-05 Chris Fleizach <cfleizach@apple.com>
2619 AX: WK2: AX hierarchy is not restored after web process crash
2620 https://bugs.webkit.org/show_bug.cgi?id=73870
2622 The accessibility tokens that need to be sent between UI and Web process
2623 were not being sent by the UI process -> the web process when the web
2626 Reviewed by Darin Adler.
2628 * UIProcess/API/mac/WKView.mm:
2629 (-[WKView viewDidMoveToWindow]):
2630 (-[WKView _accessibilityRegisterUIProcessTokens]):
2631 (-[WKView _didRelaunchProcess]):
2633 2011-12-05 Alexey Proskuryakov <ap@apple.com>
2635 REGRESSION: Full keyboard access doesn't work if enabled before Safari started
2636 https://bugs.webkit.org/show_bug.cgi?id=73864
2638 Reviewed by Darin Adler.
2640 * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Actually use the
2641 parameter passed at process creation.
2643 2011-12-05 Anders Carlsson <andersca@apple.com>
2645 Make LayerFlushSchedulerClient::flushLayers indicate whether the flush was successful or not
2646 https://bugs.webkit.org/show_bug.cgi?id=73862
2648 Reviewed by Andy Estes.
2650 Change LayerTreeHostCAMac::flushLayers to always return true and remove the call to LayerFlushScheduler::invalidate.
2652 * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
2653 * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
2654 (WebKit::LayerTreeHostCAMac::flushLayers):
2655 (WebKit::LayerTreeHostCAMac::didPerformScheduledLayerFlush):
2657 2011-12-05 Michael Brüning <michael.bruning@nokia.com>
2659 [Qt] Rename QQuickWebView::canStop property to just loading
2660 https://bugs.webkit.org/show_bug.cgi?id=73813
2662 Reviewed by Kenneth Rohde Christiansen.
2664 Renamed canStop property of QQuickWebView and QtWebPageProxy
2665 to loading and updated tests.
2667 * UIProcess/API/qt/qquickwebview.cpp:
2668 (QQuickWebView::loading):
2669 * UIProcess/API/qt/qquickwebview_p.h:
2670 * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2671 (tst_QQuickWebView::navigationStatusAtStartup):
2672 (LoadStartedCatcher::onLoadStarted):
2673 (tst_QQuickWebView::stopEnabledAfterLoadStarted):
2674 * UIProcess/qt/QtWebPageProxy.cpp:
2675 (QtWebPageProxy::loading):
2676 * UIProcess/qt/QtWebPageProxy.h:
2678 2011-12-03 Jer Noble <jer.noble@apple.com>
2680 <video> elements should disable the system and display sleep when playing on OS X.
2681 https://bugs.webkit.org/show_bug.cgi?id=73730
2682 <rdar://problem/9502155>
2684 Reviewed by Alexey Proskuryakov.
2686 Allow the WebProcess to make connections to the PowerManagement control mach server.
2688 * WebProcess/com.apple.WebProcess.sb:
2690 2011-12-04 Sam Weinig <sam@webkit.org>
2692 Move code for connections to/from the UIProcess/WebProcess into WebConnection subclasses
2693 https://bugs.webkit.org/show_bug.cgi?id=73779
2695 Reviewed by Anders Carlsson.
2697 To allow for API objects representing the connection going to/from the UIProcess/WebProcess,
2698 this patch separates out the connections into WebConnection subclasses. It does not yet
2699 expose a way to access these connections, and is therefore not yet testable.
2703 * WebKit2.xcodeproj/project.pbxproj:
2704 * win/WebKit2.vcproj:
2707 * Platform/CoreIPC/MessageID.h:
2708 * Shared/CoreIPCSupport/WebConnectionMessageKinds.h: Added.
2709 Add a new message type for communicating between WebConnections.
2711 * Shared/ChildProcess.h:
2712 Make helper public so that WebConnectionToWebProcess can use it.
2714 * UIProcess/WebConnectionToWebProcess.cpp: Added.
2715 (WebKit::WebConnectionToWebProcess::create):
2716 (WebKit::WebConnectionToWebProcess::WebConnectionToWebProcess):
2717 (WebKit::WebConnectionToWebProcess::invalidate):
2718 (WebKit::WebConnectionToWebProcess::postMessage):
2719 (WebKit::WebConnectionToWebProcess::didReceiveMessage):
2720 (WebKit::WebConnectionToWebProcess::didReceiveSyncMessage):
2721 (WebKit::WebConnectionToWebProcess::didClose):
2722 (WebKit::WebConnectionToWebProcess::didReceiveInvalidMessage):
2723 (WebKit::WebConnectionToWebProcess::syncMessageSendTimedOut):
2724 (WebKit::WebConnectionToWebProcess::windowsToReceiveSentMessagesWhileWaitingForSyncReply):
2725 * UIProcess/WebConnectionToWebProcess.h: Added.
2726 (WebKit::WebConnectionToWebProcess::connection):
2727 * UIProcess/WebProcessProxy.cpp:
2728 (WebKit::WebProcessProxy::sendMessage):
2729 (WebKit::WebProcessProxy::didReceiveInvalidMessage):
2730 (WebKit::WebProcessProxy::didFinishLaunching):
2731 * UIProcess/WebProcessProxy.h:
2732 (WebKit::WebProcessProxy::connection):
2733 (WebKit::WebProcessProxy::webConnection):
2734 (WebKit::WebProcessProxy::sendSync):
2735 Thread connection code through WebConnectionToWebProcess.
2737 * WebProcess/WebConnectionToUIProcess.cpp: Added.
2738 (WebKit::WebConnectionToUIProcess::create):
2739 (WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess):
2740 (WebKit::WebConnectionToUIProcess::invalidate):
2741 (WebKit::WebConnectionToUIProcess::postMessage):
2742 (WebKit::WebConnectionToUIProcess::didReceiveMessage):
2743 (WebKit::WebConnectionToUIProcess::didReceiveSyncMessage):
2744 (WebKit::WebConnectionToUIProcess::didClose):
2745 (WebKit::WebConnectionToUIProcess::didReceiveInvalidMessage):
2746 (WebKit::WebConnectionToUIProcess::syncMessageSendTimedOut):
2747 (WebKit::WebConnectionToUIProcess::windowsToReceiveSentMessagesWhileWaitingForSyncReply):
2748 (WebKit::WebConnectionToUIProcess::willProcessMessageOnClientRunLoop):
2749 * WebProcess/WebConnectionToUIProcess.h: Added.
2750 (WebKit::WebConnectionToUIProcess::connection):
2751 * WebProcess/WebProcess.cpp:
2752 (WebKit::WebProcess::initialize):
2753 (WebKit::WebProcess::addVisitedLink):
2754 (WebKit::WebProcess::shouldTerminate):
2755 (WebKit::WebProcess::terminate):
2756 (WebKit::WebProcess::removeWebFrame):
2757 (WebKit::WebProcess::getSitesWithPluginData):
2758 (WebKit::WebProcess::clearPluginSiteData):
2759 (WebKit::WebProcess::getWebCoreStatistics):
2760 * WebProcess/WebProcess.h:
2761 (WebKit::WebProcess::connection):
2762 Thread connection code through WebConnectionToUIProcess.
2764 2011-12-05 Laszlo Gombos <laszlo.1.gombos@nokia.com>
2766 [Qt] Remove viewModeChanged() from QQuickWebView
2767 https://bugs.webkit.org/show_bug.cgi?id=73828
2769 Reviewed by Kenneth Rohde Christiansen.
2771 * UIProcess/API/qt/qquickwebview_p.h: viewModeChanged is not used
2772 and we should not expose it.
2774 2011-12-05 Eric Carlson <eric.carlson@apple.com>
2776 WebKit2 part of: Add WebKit preferences for text track settings
2777 https://bugs.webkit.org/show_bug.cgi?id=73721
2779 Reviewed by John Sullivan.
2781 * Shared/WebPreferencesStore.h: Declared shouldDisplaySubtitles, shouldDisplayCaptions, and
2782 shouldDisplayTextDescriptions properties with macros. All default to false.
2784 * UIProcess/API/C/WKPreferences.cpp:
2785 (WKPreferencesSetShouldDisplaySubtitles): Added.
2786 (WKPreferencesGetShouldDisplaySubtitles): Ditto.
2787 (WKPreferencesSetShouldDisplayCaptions): Ditto.
2788 (WKPreferencesGetShouldDisplayCaptions): Ditto.
2789 (WKPreferencesSetShouldDisplayTextDescriptions): Ditto.
2790 (WKPreferencesGetShouldDisplayTextDescriptions): Ditto.
2791 * UIProcess/API/C/WKPreferences.h:
2793 * WebProcess/WebPage/WebPage.cpp:
2794 (WebKit::WebPage::updatePreferences): Updates WebCore settings from WebKit2 prefs.
2796 2011-12-04 Gopal Raghavan <gopal.1.raghavan@nokia.com>
2798 [Qt] cleanup qmltests.pro
2799 https://bugs.webkit.org/show_bug.cgi?id=73718
2801 Reviewed by Simon Hausmann.
2803 Removed unused file WebView/tst_loadZeroSizeView.qml and reordered file list.
2805 * UIProcess/API/qt/tests/qmltests/qmltests.pro:
2807 2011-12-04 Philippe Normand <pnormand@igalia.com>
2809 [WK2][GTK] enable-fullscreen WebSettings
2810 https://bugs.webkit.org/show_bug.cgi?id=73774
2812 Reviewed by Martin Robinson.
2814 * UIProcess/API/gtk/WebKitSettings.cpp:
2815 (webKitSettingsSetProperty):
2816 (webKitSettingsGetProperty):
2817 (webkit_settings_class_init):
2818 (webkit_settings_set_enable_fullscreen):
2819 (webkit_settings_get_enable_fullscreen):
2820 * UIProcess/API/gtk/WebKitSettings.h:
2821 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
2822 * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
2823 (testWebKitSettings):
2825 2011-12-02 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
2827 [Qt] [WK2] MiniBrowser --touch asserts in debug build
2828 https://bugs.webkit.org/show_bug.cgi?id=73697
2830 Reviewed by Eric Seidel.
2832 Add missing guard to QtViewportInteractionEngine::itemSizeChanged().
2834 * UIProcess/qt/QtViewportInteractionEngine.cpp:
2835 (WebKit::QtViewportInteractionEngine::itemSizeChanged):
2837 2011-12-02 Fady Samuel <fsamuel@chromium.org>
2839 When page scaling is in use position:fixed has incorrect results
2840 https://bugs.webkit.org/show_bug.cgi?id=68617
2842 Reviewed by Simon Fraser.
2845 * win/WebKit2CFLite.def:
2847 2011-12-02 Alexey Proskuryakov <ap@apple.com>
2849 Update sandbox rules
2850 https://bugs.webkit.org/show_bug.cgi?id=73675
2851 <rdar://problem/9276430>
2853 Reviewed by Sam Weinig.
2855 * WebProcess/com.apple.WebProcess.sb:
2857 2011-12-02 Andy Estes <aestes@apple.com>
2859 WebKit2: Freeze the state of the layer tree until frame load completion if incremental rendering is suppressed
2860 https://bugs.webkit.org/show_bug.cgi?id=73641
2862 Reviewed by Darin Adler.
2864 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2865 (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout): Do not
2866 un-freeze the layer tree state if incremental rendering is suppressed.
2867 * WebProcess/WebPage/DrawingArea.h:
2868 (WebKit::DrawingArea::layerTreeStateIsFrozen): Add a getter for
2869 m_layerTreeStateIsFrozen.
2870 * WebProcess/WebPage/DrawingAreaImpl.h:
2871 (WebKit::DrawingAreaImpl::layerTreeStateIsFrozen): Ditto.
2872 * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
2873 (WebKit::LayerTreeHostCA::initialize): WebFrameLoaderClient might have
2874 tried to freeze the state of the layer tree before the layer tree host
2875 was created. When creating the layer tree host, only schedule a layer
2876 flush if the layer tree state isn't frozen.
2878 2011-12-02 Nayan Kumar K <nayankk@motorola.com>
2880 [WebKit2][gtk] Add 'enable-dns-prefetching' property to WebKitSettings
2881 https://bugs.webkit.org/show_bug.cgi?id=73414
2883 Reviewed by Martin Robinson.
2885 * UIProcess/API/gtk/WebKitSettings.cpp:
2886 (webKitSettingsSetProperty): Add new set function.
2887 (webKitSettingsGetProperty): Add new get function.
2888 (webkit_settings_class_init): Register new property.
2889 (webkit_settings_get_enable_dns_prefetching): API to get 'enable-dns-prefetching' property.
2890 (webkit_settings_set_enable_dns_prefetching): API to set 'enable-dns-prefetching' property.
2891 * UIProcess/API/gtk/WebKitSettings.h: Expose new public API's.
2892 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new APIs to gtk-doc sections file.
2893 * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
2894 (testWebKitSettings): Add new tests.
2896 2011-12-02 Andras Becsi <andras.becsi@nokia.com>
2898 [Qt][WK2] Set event timestamps on custom input events
2900 Reviewed by Simon Hausmann.
2902 Since r101791 WebEventFactoryQt uses input event timestamps for WebEvents,
2903 thus set the timestamp on the custom events as well.
2905 * UIProcess/qt/QtWebPageEventHandler.cpp:
2906 (QtWebPageEventHandler::handleHoverLeaveEvent):
2907 (QtWebPageEventHandler::handleHoverMoveEvent):
2908 * UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp:
2909 (WebKit::WebPopupMenuProxyQtDesktop::showPopupMenu):
2911 2011-12-02 Andras Becsi <andras.becsi@nokia.com>
2913 [Qt] [WK2] Use input event timestamps in WebEvents if available
2914 https://bugs.webkit.org/show_bug.cgi?id=73647
2916 Reviewed by Simon Hausmann.
2918 Qt5 input events already have a native timestamp, use this timestamp
2919 in WebEventFactory instead of WTF::currentTime if it is available.
2921 * Shared/qt/WebEventFactoryQt.cpp:
2922 (WebKit::currentTimeForEvent):
2923 (WebKit::WebEventFactory::createWebMouseEvent):
2924 (WebKit::WebEventFactory::createWebWheelEvent):
2925 (WebKit::WebEventFactory::createWebKeyboardEvent):
2926 (WebKit::WebEventFactory::createWebTouchEvent):
2927 * Shared/qt/WebEventFactoryQt.h:
2929 2011-12-02 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
2931 [Qt][WK2] Split the QtWebPageProxy into PageClient and QtPageProxy
2932 https://bugs.webkit.org/show_bug.cgi?id=66668
2934 Reviewed by Simon Hausmann.
2936 Split QtPageClient out of QtWebPageProxy.
2937 This client will live in QQuickWebViewPrivate and communicate directly
2938 with QtWebPageProxy and QtWebPageEventHandler. The functions that need
2939 anything else than these entities will need to call the proper implementation
2940 through QtWebPageProxy itself.
2941 With this we have a clear separation between PageClient and PageProxy, having
2942 two well defined and separated entities for hooking our clients with our API layer (QtWebPageProxy)
2943 and for hooking the WebPageProxy with our client implementations (QtPageClient).
2944 As a positive side-effect we have a cleaner QtWebPageProxy.
2947 * UIProcess/API/qt/qquickwebview.cpp:
2948 (QQuickWebViewPrivate::QQuickWebViewPrivate):
2949 * UIProcess/API/qt/qquickwebview_p_p.h:
2950 * UIProcess/qt/QtPageClient.cpp: Added.
2951 (QtPageClient::QtPageClient):
2952 (QtPageClient::~QtPageClient):
2953 (QtPageClient::createDrawingAreaProxy):
2954 (QtPageClient::setViewNeedsDisplay):
2955 (QtPageClient::pageDidRequestScroll):
2956 (QtPageClient::processDidCrash):
2957 (QtPageClient::didRelaunchProcess):
2958 (QtPageClient::didChangeContentsSize):
2959 (QtPageClient::didChangeViewportProperties):
2960 (QtPageClient::startDrag):
2961 (QtPageClient::handleDownloadRequest):
2962 (QtPageClient::setCursor):
2963 (QtPageClient::setCursorHiddenUntilMouseMoves):
2964 (QtPageClient::toolTipChanged):
2965 (QtPageClient::registerEditCommand):
2966 (QtPageClient::clearAllEditCommands):
2967 (QtPageClient::canUndoRedo):
2968 (QtPageClient::executeUndoRedo):
2969 (QtPageClient::convertToDeviceSpace):
2970 (QtPageClient::convertToUserSpace):
2971 (QtPageClient::screenToWindow):
2972 (QtPageClient::windowToScreen):
2973 (QtPageClient::createPopupMenuProxy):
2974 (QtPageClient::createContextMenuProxy):
2975 (QtPageClient::flashBackingStoreUpdates):
2976 (QtPageClient::didFindZoomableArea):
2977 (QtPageClient::didReceiveMessageFromNavigatorQtObject):
2978 (QtPageClient::doneWithTouchEvent):
2979 (QtPageClient::displayView):
2980 (QtPageClient::scrollView):
2981 (QtPageClient::viewSize):
2982 (QtPageClient::isViewWindowActive):
2983 (QtPageClient::isViewFocused):
2984 (QtPageClient::isViewVisible):
2985 (QtPageClient::isViewInWindow):
2986 (QtPageClient::enterAcceleratedCompositingMode):
2987 (QtPageClient::exitAcceleratedCompositingMode):
2988 * UIProcess/qt/QtPageClient.h: Added.
2989 (QtPageClient::pageClosed):
2990 (QtPageClient::doneWithKeyEvent):
2991 (QtPageClient::setFindIndicator):
2992 (QtPageClient::didCommitLoadForMainFrame):
2993 (QtPageClient::didFinishLoadingDataForCustomRepresentation):
2994 (QtPageClient::customRepresentationZoomFactor):
2995 (QtPageClient::setCustomRepresentationZoomFactor):
2996 (QtPageClient::didChangeScrollbarsForMainFrame):
2997 (QtPageClient::findStringInCustomRepresentation):
2998 (QtPageClient::countStringMatchesInCustomRepresentation):
2999 (QtPageClient::setEventHandler):
3000 (QtPageClient::setPageProxy):
3001 * UIProcess/qt/QtWebPageProxy.cpp:
3002 (QtWebPageProxy::QtWebPageProxy):
3003 * UIProcess/qt/QtWebPageProxy.h:
3005 2011-12-02 Kenneth Rohde Christiansen <kenneth@webkit.org>
3007 [Qt] Do not apply the transition state before we are unsuspended
3009 Reviewed by Simon Hausmann.
3011 Also remove an accessor in the private, which is unneeded as
3012 everything in the private class is supposed to be public or
3013 only used by the private itself.
3015 * UIProcess/API/qt/qquickwebview.cpp:
3016 (QQuickWebViewPrivate::QQuickWebViewPrivate):
3017 (QQuickWebViewPrivate::loadDidCommit):
3018 (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
3019 (QQuickWebViewPrivate::_q_suspend):
3020 (QQuickWebViewPrivate::_q_resume):
3021 (QQuickWebViewPrivate::didChangeContentsSize):
3022 (QQuickWebViewPrivate::didChangeViewportProperties):
3023 * UIProcess/API/qt/qquickwebview_p_p.h:
3025 2011-12-02 Kenneth Rohde Christiansen <kenneth@webkit.org>
3027 Unreviewed buildfix, add missing include.
3029 * WebProcess/Notifications/WebNotificationManager.cpp:
3031 2011-12-02 Hajime Morrita <morrita@chromium.org>
3033 Unreviewed, rolling out r101751 and r101775.
3034 http://trac.webkit.org/changeset/101751
3035 http://trac.webkit.org/changeset/101775
3036 https://bugs.webkit.org/show_bug.cgi?id=73191
3038 breaks Windows build
3042 2011-12-02 Carlos Garcia Campos <cgarcia@igalia.com>
3044 Unreviewed. Fix GTK+ build after r101750.
3046 * GNUmakefile.am: Add missing files.
3048 2011-12-02 Gustavo Noronha Silva <gns@gnome.org>
3050 Unreviewed. GTK+ build fix.
3054 2011-12-02 Zalan Bujtas <zbujtas@gmail.com>
3056 [Qt][WK2] ASSERT at QQuickWebViewPrivate::computeViewportConstraints() when API test is exercising zero sized views.
3057 https://bugs.webkit.org/show_bug.cgi?id=73441
3059 Do not assert on empty available size, but return default constrain values instead.
3061 Reviewed by Kenneth Rohde Christiansen.
3063 * UIProcess/API/qt/qquickwebview.cpp:
3064 (QQuickWebViewPrivate::computeViewportConstraints):
3065 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3066 (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
3068 2011-12-01 Hajime Morrita <morrita@chromium.org>
3070 JS_INLINE and WTF_INLINE should be visible from WebCore
3071 https://bugs.webkit.org/show_bug.cgi?id=73191
3073 Reviewed by Kevin Ollivier.
3075 Removed macro definitions which is now provided by Platform.h
3079 2011-12-01 Jon Lee <jonlee@apple.com>
3081 [WK2] Add further support for notifications
3082 https://bugs.webkit.org/show_bug.cgi?id=73572
3083 <rdar://problem/10472195>
3085 Reviewed by Darin Adler.
3087 * WebProcess/Notifications/WebNotificationManager.messages.in: Added. Contains messages for callbacks
3088 from the notification platform.
3090 * DerivedSources.make: Add WebNotificationManager.
3091 * DerivedSources.pri: Ditto.
3092 * Platform/CoreIPC/MessageID.h: Add message class.
3093 * WebProcess/WebProcess.cpp:
3094 (WebKit::WebProcess::didReceiveMessage): Forward calls to WebNotificationManager when needed.
3095 * WebKit2.xcodeproj/project.pbxproj: Add new message files.
3096 * win/WebKit2.vcproj: Adding new files to project.
3097 * win/WebKit2Common.vsprops: Add Notifications to include paths
3099 * UIProcess/WebNotification.h: Add and expose internal ID of each notification sent to the platform.
3100 (WebKit::WebNotification::create):
3101 (WebKit::WebNotification::notificationID):
3102 (WebKit::isNotificationIDValid): Checks that the ID is not a value that might trip up the HashMaps used
3103 for mapping IDs to notifications.
3104 * UIProcess/WebNotification.cpp:
3105 (WebKit::WebNotification::WebNotification):
3106 (WebKit::WebNotification::encode):
3107 (WebKit::WebNotification::decode):
3108 * UIProcess/API/C/WKNotification.h: Expose notification ID to WKAPI.
3109 * UIProcess/API/C/WKNotification.cpp:
3110 (WKNotificationGetNotificationID):
3112 * UIProcess/WebNotificationManagerProxy.h: Add callbacks for dispatching events back to the notification.
3113 * UIProcess/WebNotificationManagerProxy.cpp:
3114 (WebKit::WebNotificationManagerProxy::invalidate): Remove manager.
3115 (WebKit::WebNotificationManagerProxy::show): Add manager prior to showing.
3116 (WebKit::WebNotificationManagerProxy::cancel): Add manager prior to canceling.
3117 (WebKit::WebNotificationManagerProxy::didDestroyNotification):
3118 (WebKit::WebNotificationManagerProxy::providerDidShowNotification):
3119 (WebKit::WebNotificationManagerProxy::providerDidClickNotification):
3120 (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):
3121 * UIProcess/API/C/WKNotificationManager.h:
3122 * UIProcess/API/C/WKNotificationManager.cpp:
3123 (WKNotificationManagerProviderDidShowNotification):
3124 (WKNotificationManagerProviderDidClickNotification):
3125 (WKNotificationManagerProviderDidCloseNotifications):
3127 * UIProcess/WebNotificationProvider.h:
3128 * UIProcess/WebNotificationProvider.cpp:
3129 (WebKit::WebNotificationProvider::show):
3130 (WebKit::WebNotificationProvider::cancel):
3131 (WebKit::WebNotificationProvider::didDestroyNotification):
3132 (WebKit::WebNotificationProvider::addNotificationManager):
3133 (WebKit::WebNotificationProvider::removeNotificationManager):
3134 * UIProcess/API/C/WKNotificationProvider.h: Expose add/removeNotificationManager calls
3136 * WebProcess/Notifications/WebNotificationManager.h: Add bookkeeping to keep track of notification IDs with
3137 Notification instances.
3138 * WebProcess/Notifications/WebNotificationManager.cpp:
3139 (WebKit::generateNotificationID):
3140 (WebKit::WebNotificationManager::didReceiveMessage):
3141 (WebKit::WebNotificationManager::show):
3142 (WebKit::WebNotificationManager::cancel):
3143 (WebKit::WebNotificationManager::didDestroyNotification):
3144 (WebKit::WebNotificationManager::didShowNotification):
3145 (WebKit::WebNotificationManager::didClickNotification):
3146 (WebKit::WebNotificationManager::didCloseNotifications):
3148 * UIProcess/WebNotificationManagerProxy.messages.in: Add DidDestroyNotification message.
3149 * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
3150 (WebKit::WebNotificationClient::notificationObjectDestroyed): Implemented.
3152 2011-12-01 Goutham J <gouthamj@motorola.com>
3154 [WEBKIT2] Fix for compilation warnings in WebContext.cpp
3155 https://bugs.webkit.org/show_bug.cgi?id=69080
3157 Fix compilation warning in WebKit2 builds.
3159 Reviewed by Hajime Morita.
3161 * UIProcess/WebContext.cpp:
3162 (WebKit::WebContext::processDidFinishLaunching):
3163 (WebKit::WebContext::startMemorySampler):
3165 2011-12-01 Beth Dakin <bdakin@apple.com>
3167 https://bugs.webkit.org/show_bug.cgi?id=73592
3168 REGRESSION (r100483): Can't drag out of background window
3170 <rdar://problem/10508870>
3172 Reviewed by Darin Adler.
3174 If the mouse is pressed we need to do a full, normal hit test even if the window
3176 * WebProcess/WebPage/WebPage.cpp:
3177 (WebKit::WebPage::mouseEvent):
3178 (WebKit::WebPage::mouseEventSyncForTesting):
3180 2011-12-01 Martin Robinson <mrobinson@igalia.com>
3182 [GTK] Add a helper function to find the current executable's path
3183 https://bugs.webkit.org/show_bug.cgi?id=73473
3185 Reviewed by Gustavo Noronha Silva.
3187 Do a series of tests when looking for processes. First search the directory
3188 specified by the environment variable, then the directory of the binary and
3189 then the LIBEXECDIR.
3191 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
3192 (WebKit::findWebKitProcess): Added.
3193 (WebKit::ProcessLauncher::launchProcess): Call the new helper to get the
3196 2011-12-01 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
3198 [Qt] [WK2] QQuickWebView covers QML elements that should be rendered on top.
3199 https://bugs.webkit.org/show_bug.cgi?id=73338
3201 Reviewed by Noam Rosenthal.
3203 Move painting of QQuickWebPage content from canvas afterrendering() to
3204 QSGGeometryNode/QSGMaterial based paint node. Implementation uses QSGMaterialShader
3205 updateState() method to draw TextureMapper graphics layers.
3206 This is considered to be temporary until QSGNode::UserNodeType will be available.
3208 * UIProcess/API/qt/qquickwebpage.cpp:
3209 (QQuickWebPage::QQuickWebPage):
3210 (QQuickWebPagePrivate::QQuickWebPagePrivate):
3211 (PageProxyMaterialShader::attributeNames):
3212 (PageProxyMaterialShader::vertexShader):
3213 (PageProxyMaterialShader::fragmentShader):
3214 (PageProxyMaterial::PageProxyMaterial):
3215 (PageProxyMaterial::type):
3216 (PageProxyMaterial::createShader):
3217 (PageProxyNode::PageProxyNode):
3218 (PageProxyNode::~PageProxyNode):
3219 (PageProxyMaterialShader::updateState):
3220 (QQuickWebPage::updatePaintNode):
3221 (QQuickWebPagePrivate::resetPaintNode):
3222 (QQuickWebPagePrivate::~QQuickWebPagePrivate):
3223 * UIProcess/API/qt/qquickwebpage_p.h:
3224 * UIProcess/API/qt/qquickwebpage_p_p.h:
3225 * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3226 (tst_QQuickWebView::showWebView):
3227 * UIProcess/qt/LayerTreeHostProxyQt.cpp:
3228 (WebKit::LayerTreeHostProxy::didRenderFrame):
3230 2011-12-01 Nayan Kumar K <nayankk@motorola.com>
3232 [WK2][GTK] Change default-font-size and default-monospace-font-size
3233 https://bugs.webkit.org/show_bug.cgi?id=73468
3235 Reviewed by Martin Robinson.
3237 Set 'default-font-size' property value to 16px and 'default-monospace-font-size'
3240 * UIProcess/API/gtk/WebKitSettings.cpp:
3241 (webkit_settings_class_init): Change the default font size settings.
3242 * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
3243 (testWebKitSettings): Correct the test.
3245 2011-12-01 Wajahat Siddiqui <mdwajahatali.siddiqui@motorola.com>
3247 Popup menu can get stuck in closed state when GtkMenu can't grab mouse.
3248 https://bugs.webkit.org/show_bug.cgi?id=56466
3250 Add a check if popup menu is not visible due to no mouse grab,
3251 Ensure WebCore is in sync with proper state.
3253 Reviewed by Martin Robinson.
3255 * UIProcess/WebPageProxy.cpp:
3256 (WebKit::WebPageProxy::failedToShowPopupMenu): Added Method to send message
3258 * UIProcess/WebPageProxy.h:
3259 * UIProcess/WebPopupMenuProxy.h:
3260 * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
3261 (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
3262 * WebProcess/WebCoreSupport/WebPopupMenu.h:
3263 (WebKit::WebPopupMenu::client): Added Method to get WebCore::PopupMenuClient.
3264 * WebProcess/WebPage/WebPage.cpp:
3265 (WebKit::WebPage::failedToShowPopupMenu):
3266 * WebProcess/WebPage/WebPage.h:
3267 * WebProcess/WebPage/WebPage.messages.in: Added Message to inform WebProcess ShowPopupMenu failed.
3269 2011-12-01 Pavel Feldman <pfeldman@chromium.org>
3271 Web Inspector: restore WebKit2 Safari menu items after capabilities refactoring regression.
3272 https://bugs.webkit.org/show_bug.cgi?id=73554
3274 Reviewed by Yury Semikhatsky.
3276 * UIProcess/WebInspectorProxy.cpp:
3277 (WebKit::WebInspectorProxy::didClose):
3279 2011-11-30 Alexey Proskuryakov <ap@apple.com>
3281 Remove an unneeded argument from FrameLoaderClient::download
3282 https://bugs.webkit.org/show_bug.cgi?id=73486
3284 Reviewed by Andreas Kling.
3286 * WebProcess/Downloads/Download.h:
3287 * WebProcess/Downloads/DownloadManager.cpp:
3288 (WebKit::DownloadManager::convertHandleToDownload):
3289 * WebProcess/Downloads/DownloadManager.h:
3290 * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
3291 (WebKit::Download::startWithHandle):
3292 * WebProcess/Downloads/curl/DownloadCurl.cpp:
3293 (WebKit::Download::startWithHandle):
3294 * WebProcess/Downloads/mac/DownloadMac.mm:
3295 (WebKit::Download::startWithHandle):
3296 * WebProcess/Downloads/qt/DownloadQt.cpp:
3297 (WebKit::Download::startWithHandle):
3298 * WebProcess/Downloads/soup/DownloadSoup.cpp:
3299 (WebKit::Download::startWithHandle):
3300 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3301 (WebKit::WebFrameLoaderClient::download):
3302 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3303 * WebProcess/WebPage/WebFrame.cpp:
3304 (WebKit::WebFrame::convertHandleToDownload):
3305 * WebProcess/WebPage/WebFrame.h:
3306 Updated for the change. CF version is the only one worth seeing, as it was using the argument.
3308 2011-11-30 Alexey Proskuryakov <ap@apple.com>
3310 Original page URL is not set in quarantine information when downloading using context menu Save Linked File
3311 https://bugs.webkit.org/show_bug.cgi?id=73475
3312 <rdar://problem/10500337>
3314 Reviewed by Dan Bernstein.
3316 * WebProcess/WebProcess.cpp: (WebKit::WebProcess::downloadRequest): Set main document URL
3317 for the request, so that CFNetwork would know where te file was downloaded. Note that this
3318 is an easier case than downloading due to clicks, since we don't really need to build a host
3319 only URL, and could use full page URL. However, the same function is used for consistency.
3321 2011-11-30 Igor Oliveira <igor.oliveira@openbossa.org>
3323 [WK2][Qt] AC animation startTime is wrong
3325 [WK2][Qt] AC animation startTime is wrong
3326 https://bugs.webkit.org/show_bug.cgi?id=73467
3328 When WebProcess sends animation information to UIProcess, It uses the
3329 current time(WTF::currentTime) minus the timeOffset to set the start time
3332 But there is a latency between the WebProcess and UIProcess communication
3333 and sometimes the animation transition starts late.
3335 This patch fixes the bug moving the startTime calculation to UIProcess.
3337 Reviewed by Noam Rosenthal.
3339 * UIProcess/qt/LayerTreeHostProxyQt.cpp:
3340 (WebKit::LayerTreeHostProxy::syncLayerParameters):
3341 * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3342 (WebCore::WebGraphicsLayer::addAnimation):
3344 2011-11-30 Csaba Osztrogonác <ossy@webkit.org>
3346 [Qt] Buildfix for generating forwarding headers
3347 https://bugs.webkit.org/show_bug.cgi?id=73446
3349 Reviewed by Noam Rosenthal.
3351 * DerivedSources.pri: Always create the parent directory before generating a forwarding header.
3353 2011-11-30 Dan Bernstein <mitz@apple.com>
3355 WebKit2 part of: Allow the length of a page along the pagination axis to differ from the length of the view
3356 https://bugs.webkit.org/show_bug.cgi?id=73476
3358 Reviewed by Anders Carlsson.
3360 * Shared/WebPageCreationParameters.cpp:
3361 (WebKit::WebPageCreationParameters::encode): Encode pageLength.
3362 (WebKit::WebPageCreationParameters::decode): Decode pageLength.
3363 * Shared/WebPageCreationParameters.h: Added pageLength.
3364 * UIProcess/API/C/WKPage.cpp:
3365 (WKPageSetPageLength): Added this accessor.
3366 (WKPageGetPageLength): Ditto.
3367 * UIProcess/API/C/WKPagePrivate.h:
3368 * UIProcess/API/mac/WKBrowsingContextController.mm:
3369 (-[WKBrowsingContextController setPageLength:]): Ditto.
3370 (-[WKBrowsingContextController pageLength]): Ditto.
3371 * UIProcess/API/mac/WKBrowsingContextControllerPrivate.h:
3372 * UIProcess/WebPageProxy.cpp:
3373 (WebKit::WebPageProxy::WebPageProxy): Added initializer for m_pageLength.
3374 (WebKit::WebPageProxy::setPageLength): Added.
3375 (WebKit::WebPageProxy::creationParameters): Initialize pageLength.
3376 * UIProcess/WebPageProxy.h:
3377 (WebKit::WebPageProxy::pageLength): Added.
3378 * WebProcess/WebPage/WebPage.cpp:
3379 (WebKit::WebPage::WebPage): Set the page length based on the creation parameters.
3380 (WebKit::WebPage::setPageLength): Added.
3381 * WebProcess/WebPage/WebPage.h:
3382 * WebProcess/WebPage/WebPage.messages.in: Added SetPageLength.
3384 2011-11-30 Alejandro G. Castro <alex@igalia.com>
3386 [GTK] Add accelerated compositing compilation option
3387 https://bugs.webkit.org/show_bug.cgi?id=73298
3389 Compile whatever we have inside the USE(ACCELERATED_COMPOSITING)
3390 define. Fix accelerated compositing compilation in WK2, update the
3391 enter/exit functions.
3393 Reviewed by Martin Robinson.
3395 * UIProcess/API/gtk/PageClientImpl.cpp:
3396 (WebKit::PageClientImpl::enterAcceleratedCompositingMode):
3397 (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
3398 * UIProcess/API/gtk/PageClientImpl.h:
3400 2011-11-29 Beth Dakin <bdakin@apple.com>
3402 https://bugs.webkit.org/show_bug.cgi?id=72751
3403 WebKit2.MouseMoveAfterCrash API test is failing
3405 Reviewed by Sam Weinig.
3407 windowIsFocused() is too restrictive. All we need to know is that the page is
3409 * WebProcess/WebPage/WebPage.cpp:
3410 (WebKit::WebPage::mouseEvent):
3411 (WebKit::WebPage::mouseEventSyncForTesting):
3413 2011-11-29 Sam Weinig <sam@webkit.org>
3415 Add move semantics to WKRetainPtr
3416 https://bugs.webkit.org/show_bug.cgi?id=73400
3418 Reviewed by Anders Carlsson.
3420 * UIProcess/API/cpp/WKRetainPtr.h:
3421 (WebKit::WKRetainPtr::WKRetainPtr):
3422 Add a move constructor and move enabled assignment operators
3423 to WKRetainPtr if the compiler being used supports rvalue
3424 references. If the compiler does not support it, we fallback
3425 to the copy semantics we have always had.
3427 2011-11-30 Mario Sanchez Prada <msanchez@igalia.com>
3429 [Gtk] Links should be Tab-focusable by default
3430 https://bugs.webkit.org/show_bug.cgi?id=73427
3432 Reviewed by Martin Robinson.
3434 * UIProcess/API/gtk/WebKitSettings.cpp:
3435 (webkit_settings_class_init): Switch the default value for
3436 'enable-tabs-to-links' property from FALSE to TRUE.
3437 * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
3438 (testWebKitSettings): Updated unit test.
3440 2011-11-30 Alexey Proskuryakov <ap@apple.com>
3442 Download page URL should be set by WebCore
3443 https://bugs.webkit.org/show_bug.cgi?id=73358
3445 Reviewed by Darin Adler.
3447 * WebProcess/Downloads/mac/DownloadMac.mm:
3448 (WebKit::Download::start): There is no need to set original URL post factum any more.
3449 (WebKit::Download::startWithHandle): Ditto.
3451 2011-11-30 Kenneth Rohde Christiansen <kenneth@webkit.org>
3453 Rename WebKit::ViewportUpdateGuard to *Deferrer and add some better
3454 comments to explain its purpose.
3456 Reviewed by Simon Hausmann.
3458 * UIProcess/qt/QtViewportInteractionEngine.cpp:
3459 (WebKit::ViewportUpdateDeferrer::ViewportUpdateDeferrer):
3460 (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
3461 (WebKit::QtViewportInteractionEngine::setItemRectVisible):
3462 (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
3463 (WebKit::QtViewportInteractionEngine::scrollStateChanged):
3464 (WebKit::QtViewportInteractionEngine::applyConstraints):
3465 (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
3466 * UIProcess/qt/QtViewportInteractionEngine.h:
3468 2011-11-30 Simon Hausmann <simon.hausmann@nokia.com>
3470 Build fix. The removal of the Qt threading back-end also removed
3471 an implicit QString inclusion/forward-declaration.
3473 * UIProcess/qt/QtWebContext.h:
3475 2011-11-30 Kenneth Rohde Christiansen <kenneth@webkit.org>
3477 [Qt] Clean up the Qt viewport interaction engine
3479 Reviewed by Simon Hausmann.
3481 * UIProcess/qt/QtViewportInteractionEngine.cpp:
3482 (WebKit::QtViewportInteractionEngine::reset):
3484 Make sure reset is not called while suspended.
3486 (WebKit::QtViewportInteractionEngine::applyConstraints):
3488 We always need to apply the constrains due to initial-scale.
3490 Now that we only apply the constrains when we are ready to
3491 paint, it is impossible for the user to have interacted with
3492 the content in the case the viewport meta tag was declared
3493 in the <head> tag, and it is thus always applied.
3495 (WebKit::QtViewportInteractionEngine::panGestureStarted):
3496 (WebKit::QtViewportInteractionEngine::pinchGestureActive):
3498 Fix this method to actually do what it advertises, before
3499 it would be true even if just animation a bounce back effect.
3501 (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
3502 (WebKit::QtViewportInteractionEngine::pinchGestureEnded):
3503 * UIProcess/qt/QtViewportInteractionEngine.h:
3505 General, get rid of the interaction flags as we only need to
3506 know whether the user interacted (panned, pinched, double-tapped).
3507 Before we would still apply initial-scale if the user had panned
3508 the content which can be pretty confusing.
3510 2011-11-30 Simon Hausmann <simon.hausmann@nokia.com>
3512 Unreviewed prospective mac build fix after r101450.
3514 * Platform/mac/ModuleMac.mm:
3515 (WebKit::Module::unload): leakRef is declared with attribute warn_unused_result.
3517 2011-11-30 Adenilson Cavalcanti <adenilson.silva@openbossa.org>
3519 [Qt][WK2] Implement permission API for Qt port
3520 https://bugs.webkit.org/show_bug.cgi?id=59200
3522 Permission API hookup for Geolocation, it allows to receive in WebView
3523 a signal when a permission request is done (e.g. to grant permission
3524 for accessing geolocation information) and set it accordingly.