Chromium results for test added by r105021
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2012-01-13  Anders Carlsson  <andersca@apple.com>
2
3         Delay updating the root compositing layer if the layer tree state is frozen
4         https://bugs.webkit.org/show_bug.cgi?id=76316
5
6         Reviewed by Dan Bernstein.
7
8         When the layer tree is frozen, stash the root layer in m_pendingRootCompositingLayer and set it in flushLayers.
9
10         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
11         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
12         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
13         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
14
15 2012-01-13  Anders Carlsson  <andersca@apple.com>
16
17         Implement TiledCoreAnimationDrawingArea::setLayerTreeStateIsFrozen
18         https://bugs.webkit.org/show_bug.cgi?id=76308
19
20         Reviewed by Sam Weinig.
21
22         Keep track of whether the layer tree state is frozen and suspend/resume the layer flush scheduler accordingly.
23
24         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
25         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
26         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
27         (WebKit::TiledCoreAnimationDrawingArea::setLayerTreeStateIsFrozen):
28         (WebKit::TiledCoreAnimationDrawingArea::layerTreeStateIsFrozen):
29         (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync):
30         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
31
32 2012-01-13  Anders Carlsson  <andersca@apple.com>
33
34         Disable implicit animations when setting the root compositing layer
35         https://bugs.webkit.org/show_bug.cgi?id=76304
36
37         Reviewed by Sam Weinig.
38
39         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
40         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
41
42 2012-01-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
43
44         TextureMapper: Extract layer transform logic to a LayerTransform class.
45         https://bugs.webkit.org/show_bug.cgi?id=76291
46
47         Reviewed by Noam Rosenthal.
48
49         Move the paint call before the visible rect collection to make sure that
50         transforms are computed. This will increase the delay for the visible rects
51         to get to the WebProcess until we move this calculation out of the UI Process.
52         This fixes an assert triggering in LayerTransform::combineTransforms.
53
54         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
55         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
56
57 2012-01-13  Brent Fulgham  <bfulgham@webkit.org>
58
59         [WinCairo] Build correction.
60
61         * Shared/WebGraphicsContext.h: Use proper include path for RefPtrCairo.h.
62
63 2012-01-12  Martin Robinson  <mrobinson@igalia.com>
64
65         [GTK] [WebKit2] WebKitURIRequest and WebKitURIResponse should wrap the corresponding WebCore classes
66         https://bugs.webkit.org/show_bug.cgi?id=74478
67
68         Reviewed by Gustavo Noronha Silva.
69
70         Have WebKitURIRequest wrap a ResourceRquesst and WebKitURIResponse wrap a ResourceResponse.
71         They are the WebCore types they are meant to represent and we will need to expose more
72         information from them in the future to make them useful. Later we can have ResourceResponse
73         generate a SoupMessage lazily if necessary.
74
75         * GNUmakefile.am:
76         * UIProcess/API/gtk/WebKitURIRequest.cpp:
77         (webkit_uri_request_class_init): Remove the set property vmethod.
78         (webkit_uri_request_new): The URI property is no longer settable.
79         (webkitURIRequestCreateForResourceRequest): Added this private constructor.
80         (webkit_uri_request_get_uri): Now we just get the URI directly from the ResourceRequest.
81         * UIProcess/API/gtk/WebKitURIResponse.cpp:
82         (webkit_uri_response_class_init): Remove the set property vmethod.
83         (webkit_uri_response_get_uri): Get the URI directly from the ResourceReponse.
84         (webkit_uri_response_get_status_code): Get the status code directly from the ResourceResponse.
85         (webkit_uri_response_get_content_length): Get the content length directly from the ResourceResponse.
86         (webkitURIResponseCreateForResourceResponse): Added this private constructor.
87         * UIProcess/API/gtk/WebKitURIResponsePrivate.h: Removed unnecessary methods.
88
89 2012-01-12  No'am Rosenthal  <noam.rosenthal@nokia.com>
90
91         [Qt][WK2] WebProcesses crashes when composited reflections/masks are present
92         https://bugs.webkit.org/show_bug.cgi?id=75883
93
94         Reviewed by Kenneth Rohde Christiansen.
95
96         Make sure masks and replica layers can access layerTreeTileClient. Let masks
97         have the right contents/visible rect so that they can render content tiles.
98         Default the mask's size to be the layer's size.
99
100         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
101         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
102         (WebCore::WebGraphicsLayer::setSize):
103         (WebCore::WebGraphicsLayer::setMaskLayer):
104         (WebCore::WebGraphicsLayer::setReplicatedByLayer):
105         (WebCore::WebGraphicsLayer::syncCompositingState):
106         (WebCore::WebGraphicsLayer::setContentsScale):
107         (WebCore::WebGraphicsLayer::setVisibleContentRect):
108         (WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
109         (WebCore::WebGraphicsLayer::updateTileBuffersRecursively):
110         (WebCore::WebGraphicsLayer::layerTreeTileClient):
111         (WebCore::WebGraphicsLayer::purgeBackingStores):
112         (WebCore::WebGraphicsLayer::recreateBackingStoreIfNeeded):
113         (WebCore::WebGraphicsLayer::setLayerTreeTileClient):
114         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
115         (WebCore::WebGraphicsLayer::maskTarget):
116         (WebCore::WebGraphicsLayer::setMaskTarget):
117
118 2012-01-12  Kenneth Rohde Christiansen  <kenneth@webkit.org>
119
120         [Qt] Set the input method hints on the QtQuick item
121         https://bugs.webkit.org/show_bug.cgi?id=76169
122
123         Reviewed by Simon Hausmann.
124
125         Set the input method hints given the HTMLElement type and state.
126
127         * Shared/EditorState.cpp:
128         (WebKit::EditorState::encode):
129         (WebKit::EditorState::decode):
130         * Shared/EditorState.h:
131         (WebKit::EditorState::EditorState):
132         * UIProcess/qt/QtWebPageEventHandler.cpp:
133         (QtWebPageEventHandler::updateTextInputState):
134         * WebProcess/WebPage/WebPage.cpp:
135         (WebKit::WebPage::editorState):
136
137 2012-01-12  Eunmi Lee  <eunmi15.lee@samsung.com>
138
139         [EFL][WK2] Update and show ewk_view with updated webpage.
140         https://bugs.webkit.org/show_bug.cgi?id=76023
141
142         Reviewed by Andreas Kling.
143
144         Update ewk_view with BackingStore image which is rendered webpage
145         image by WebProcess, and show updated image's area when
146         PageClientImpl::setViewNeedsDisplay() is called.
147         The ewk_view_display() function is used to display updated area of
148         evas_object_image and the ewk_view_image_data_set() function is used
149         to set evas_object_image's data with rendered webpage.
150
151         * UIProcess/API/efl/PageClientImpl.cpp:
152         (WebKit::PageClientImpl::setViewNeedsDisplay):
153         * UIProcess/API/efl/ewk_private.h: Added.
154         * UIProcess/API/efl/ewk_view.cpp:
155         (ewk_view_add):
156         (ewk_view_display):
157         (ewk_view_image_data_set):
158         * UIProcess/cairo/BackingStoreCairo.cpp:
159         (WebKit::BackingStore::incorporateUpdate):
160
161 2012-01-12  Ryuan Choi  <ryuan.choi@samsung.com>
162
163         [EFL][WK2] Network is not available when SOUP is enabled.
164         https://bugs.webkit.org/show_bug.cgi?id=76112
165
166         Reviewed by Andreas Kling.
167
168         ecore_main_loop_glib_integrate should be called to use glib based library
169         such as SOUP.
170
171         * WebProcess/efl/WebProcessMainEfl.cpp:
172         (WebKit::WebProcessMainEfl):
173
174 2012-01-12  Ryuan Choi  <ryuan.choi@samsung.com>
175
176         [EFL][WK2] Add PLATFORM(EFL) in SharedMemory.h, WebProcessStore.h, WebEditorClient.cpp
177         https://bugs.webkit.org/show_bug.cgi?id=76115
178
179         Reviewed by Andreas Kling.
180
181         This patch added PLATFORM(EFL) guard in SharedMemory.h to use UNIX_DOMAIN_SOCKETS
182         and WebProcessStore.h to have font family preference
183         and WebEditorClient.cpp to use platform specific handleKeyboardEvent(),
184         handleInputMethodKeydown()
185
186         * Platform/SharedMemory.h:
187         * Shared/WebPreferencesStore.h:
188         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
189
190 2012-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
191
192         [GTK] Web process should use the same locale than UI process
193         https://bugs.webkit.org/show_bug.cgi?id=76054
194
195         Reviewed by Gustavo Noronha Silva.
196
197         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
198         (WebKit::childSetupFunction): Make child process use the same
199         locale than its parent.
200
201 2012-01-11  Ryuan Choi  <ryuan.choi@samsung.com>
202
203         [WK2] Share cairo specific codes with EFL port.
204         https://bugs.webkit.org/show_bug.cgi?id=75457
205
206         Reviewed by Brent Fulgham.
207
208         Change PLATFORM(GTK) to USE(CAIRO) in WebGraphicsContext{h,cpp} to share
209         with EFL port.
210
211         * Shared/WebGraphicsContext.cpp:
212         (WebKit::WebGraphicsContext::WebGraphicsContext):
213         * Shared/WebGraphicsContext.h:
214
215 2012-01-11  Beth Dakin  <bdakin@apple.com>
216
217         https://bugs.webkit.org/show_bug.cgi?id=75904
218         WebKit 1: Scrollbar uiStateTransitionProgress requires tracking the mouse all 
219         the time
220         -and corresponding-
221         <rdar://problem/10498816>
222
223         Reviewed by Darin Adler.
224
225         This patch gets rid of the optional parameter called onlyUpdateScrollbars for 
226         WebCore::EventHandler::mouseMoved() and instead moves that functionality into 
227         its own function called passMouseMovedEventToScrollbars().
228         * WebProcess/WebPage/WebPage.cpp:
229         (WebKit::handleMouseEvent):
230
231 2012-01-11  Brent Fulgham  <bfulgham@webkit.org>
232
233         WinCairo build correction.
234
235         * UIProcess/WebPageProxy.h: Don't define viewWidget for WinCairo port.
236
237 2012-01-11  Anders Carlsson  <andersca@apple.com>
238
239         Webpages flash white when switching between windows
240         https://bugs.webkit.org/show_bug.cgi?id=76080
241         <rdar://problem/9893565>
242
243         Reviewed by Dan Bernstein.
244
245         Introduce a _windowHasValidBackingStore boolean and only paint the background (white or clear)
246         * UIProcess/API/mac/WKView.mm:
247         (-[WKView setFrameSize:]):
248         Set _windowHasValidBackingStore to false if the new size is different from the old size.
249
250         (-[WKView viewDidMoveToWindow]):
251         Set _windowHasValidBackingStore to false.
252
253         (-[WKView _windowDidMiniaturize:]):
254         Set _windowHasValidBackingStore to false.
255
256         (-[WKView _windowDidChangeBackingProperties:]):
257         Set _windowHasValidBackingStore to false.
258
259         (-[WKView drawRect:]):
260         Only call drawPageBackground if _windowHasValidBackingStore is false. Set it to true after painting.
261
262 2012-01-11  Anders Carlsson  <andersca@apple.com>
263
264         Fix the Mac GCC build.
265
266         Work around the fact that GCC doesn't work very well with Blocks and C++ objets.
267
268         * UIProcess/mac/WebProcessProxyMac.mm:
269         (WebKit::dispatchFunctionOnQueue):
270         (WebKit::WebProcessProxy::secItemRequest):
271         (WebKit::WebProcessProxy::secKeychainItemRequest):
272
273 2012-01-11  No'am Rosenthal  <noam.rosenthal@nokia.com>
274
275         [Qt][WK2] Directly-composited images sometimes appear with a wrong geometry
276         https://bugs.webkit.org/show_bug.cgi?id=75882
277
278         Reviewed by Simon Hausmann.
279
280         When assigning a directly composited image to a TextureMapperNode in WebKit2, we take
281         contentsRect() onto account. However, contentsRect() might be changed after the image
282         is already assigned.
283         We have to reassign the image when contentsRect() changes. This is a pretty cheap
284         operation, since the image is already converted to a texture and we simply change the
285         geometric values.
286
287         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
288         (WebKit::LayerTreeHostProxy::syncLayerParameters):
289         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
290         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
291
292 2012-01-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
293
294         [Qt] Add the editor rect to the EditorState
295         https://bugs.webkit.org/show_bug.cgi?id=76053
296
297         Reviewed by Simon Hausmann.
298
299         Also rename some members to match the new Qt naming scheme.
300
301         * Shared/EditorState.cpp:
302         (WebKit::EditorState::encode):
303         (WebKit::EditorState::decode):
304         * Shared/EditorState.h:
305         * UIProcess/API/qt/qquickwebview.cpp:
306         (QQuickWebView::inputMethodQuery):
307         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
308         (WebKit::WebEditorClient::respondToChangedSelection):
309         * WebProcess/WebPage/WebPage.cpp:
310         (WebKit::WebPage::editorState):
311
312 2012-01-11  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
313
314         [GTK] Linking of big binaries should be serialized to avoid thrashing
315         https://bugs.webkit.org/show_bug.cgi?id=75977
316
317         Reviewed by Martin Robinson.
318
319         Added artificial dependencies so that libwebkitgtk is always
320         linked first, libwebkit2gtk second, and WebKitPluginProcess
321         last. Automake unfortunately replaces the whole rule used to build
322         the libraries if the actual name is used to add the dependency, so
323         we use helper variables to work around that.
324
325         * GNUmakefile.am:
326
327 2012-01-11  Ryuan Choi  <ryuan.choi@samsung.com>
328
329         [EFL][WK2] Rename viewObject to viewWidget
330         https://bugs.webkit.org/show_bug.cgi?id=75947
331
332         Reviewed by Martin Robinson.
333
334         Rename viewObject to viewWidget for the EFL port to use WidgetBackingStore
335         which calls viewWidget().
336
337         * UIProcess/API/efl/PageClientImpl.cpp:
338         (WebKit::PageClientImpl::PageClientImpl):
339         (WebKit::PageClientImpl::setViewNeedsDisplay):
340         (WebKit::PageClientImpl::viewSize):
341         * UIProcess/API/efl/PageClientImpl.h:
342         (WebKit::PageClientImpl::create):
343         (WebKit::PageClientImpl::viewWidget):
344         * UIProcess/WebPageProxy.h:
345         * UIProcess/efl/WebPageProxyEfl.cpp:
346         (WebKit::WebPageProxy::viewWidget):
347
348 2012-01-10  Mark Rowe  <mrowe@apple.com>
349
350         REGRESSION (r104377): All pages print blank on Snow Leopard
351         <http://webkit.org/b/75879> / <rdar://problem/10674335>
352
353         We need to explicitly load PDFKit.framework before using PDFDocument and friends.
354         On SnowLeopard the framework is not necessarily loaded by anything else before we
355         print, which would lead to us failing to allocate the PDFDocument that we use for
356         drawing the content from the web process.
357
358         Reviewed by Dan Bernstein.
359
360         * UIProcess/API/mac/WKPrintingView.mm:
361         (pdfKitFrameworkPath): Construct the path to the PDFKit framework.
362         (classFromPDFKit): Ensure that the PDFKit framework is loaded, and then retrieve the
363         given class from it.
364         (pdfAnnotationLinkClass): ASSERT that we found the class.
365         (pdfDocumentClass): Ditto.
366
367 2012-01-10  Chris Marrin  <cmarrin@apple.com>
368
369         Wrapped allowedCompositingTriggers in ACCELERATED_COMPOSITING ifdef to make non-accelerated builds work
370
371         Unreviewed.
372
373         * WebProcess/WebCoreSupport/WebChromeClient.h:
374
375 2012-01-10  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
376
377         [Qt][WK2]REGRESSION(r102435): It made tst_QQuickWebView::show() crash
378         https://bugs.webkit.org/show_bug.cgi?id=74176
379
380         Reviewed by Noam Rosenthal.
381
382         Check texture mapper exists already in ensureRootLayer to avoid recrecation.
383         Check if root layer was deleted already in purgeGLResources.
384         Added multipleWebViewWindows and multipleWebViews API tests.
385
386         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
387         (tst_QQuickWebView::multipleWebViewWindows):
388         (tst_QQuickWebView::multipleWebViews):
389         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
390         (WebKit::LayerTreeHostProxy::ensureRootLayer):
391         (WebKit::LayerTreeHostProxy::purgeGLResources):
392
393 2012-01-10  Ryosuke Niwa  <rniwa@webkit.org>
394
395         Snow Leopard build fix.
396
397         * UIProcess/API/mac/PageClientImpl.h:
398         * UIProcess/API/mac/PageClientImpl.mm:
399
400 2012-01-10  Anders Carlsson  <andersca@apple.com>
401
402         Hang opening movie that requires authentication
403         https://bugs.webkit.org/show_bug.cgi?id=75989
404
405         Reviewed by Sam Weinig.
406
407         Change the way the keychain calls are processed to avoid deadlocks:
408
409         1. When a keychain call is made, the web process sends an asynchronous request message to the UI process,
410            avoiding the need to bounce calls to the main thread (since CoreIPC only allows sending
411            synchronous messages from the main thread). Incidentally, this fixes <rdar://problem/9428041>.
412         2. The Web Process now waits on the calling thread, (for a condition variable to be signalled) for a reply message.
413         3. The UI process handles the incoming message request message on the connection work queue and uses
414            dispatch_async to a global dispatch queue where the keychain call is made.
415            We use a global queue to prevent the connection work queue from blocking on the call.
416         4. The UI process then sends an asynchronous reply message back to the web process. This message is sent from
417            the global dispatch queue.
418         5. The Web Process handles the reply message on the connection queue, adds the reply to a map and signals
419            the condition variable that the web process is waiting on and the thread that made the keychain call
420            can resume execution.
421
422         * Shared/mac/SecItemRequestData.cpp:
423         (WebKit::SecItemRequestData::SecItemRequestData):
424         (WebKit::SecItemRequestData::encode):
425         (WebKit::SecItemRequestData::decode):
426         * Shared/mac/SecItemRequestData.h:
427         (WebKit::SecItemRequestData::type):
428         Add a type to SecItemRequestData and encode/decode it.
429
430         * Shared/mac/SecItemResponseData.h:
431         (WebKit::SecItemResponseData::resultObject):
432         Make this return a reference so we can call leakRef() on it.
433
434         * Shared/mac/SecKeychainItemRequestData.cpp:
435         (WebKit::SecKeychainItemRequestData::SecKeychainItemRequestData):
436         (WebKit::SecKeychainItemRequestData::~SecKeychainItemRequestData):
437         (WebKit::SecKeychainItemRequestData::attributeList):
438         (WebKit::SecKeychainItemRequestData::encode):
439         (WebKit::SecKeychainItemRequestData::decode):
440         * Shared/mac/SecKeychainItemRequestData.h:
441         (WebKit::SecKeychainItemRequestData::type):
442         Add a type, and put the OwnPtr and OwnArrayPtr in a RefCounted struct so we can
443         correctly copy this object.
444
445         * UIProcess/WebConnectionToWebProcess.cpp:
446         (WebKit::WebConnectionToWebProcess::WebConnectionToWebProcess):
447         Don't open the connection here, the WebProcessProxy object needs to add itself as a queue client before opening.
448     
449         * UIProcess/WebProcessProxy.cpp:
450         (WebKit::WebProcessProxy::disconnect):
451         Remove the WebProcessProxy object from the list of connection queue clients.
452
453         (WebKit::WebProcessProxy::didReceiveMessageOnConnectionWorkQueue):
454         Call didReceiveWebProcessProxyMessageOnConnectionWorkQueue.
455
456         (WebKit::WebProcessProxy::didFinishLaunching):
457         Add the WebProcessProxy as a queue client and open the connection.
458
459         * UIProcess/WebProcessProxy.h:
460         WebProcessProxy should inherit from CoreIPC::Connection::QueueClient. Replace all individual keychain
461         handler functions with two generic functions, secItemRequest and secKeychainItemRequest.
462     
463         * UIProcess/WebProcessProxy.messages.in:
464         Replace individual keychain messages with SecItemRequest and SecKeychainItemRequest messages.
465
466         * UIProcess/mac/WebProcessProxyMac.mm:
467         (WebKit::handleSecItemRequest):
468         Call the right SecItem function depending on the request type and send back the result.
469
470         (WebKit::WebProcessProxy::secItemRequest):
471         Dispatch handleSecItemRequest on a global dispatch queue.
472
473         (WebKit::handleSecKeychainItemRequest):
474         Call the right SecKeychainItem function depending on the request type and send back the result.
475         
476         (WebKit::WebProcessProxy::secKeychainItemRequest):
477         Dispatch handleSecKeychainItemRequest on a global dispatch queue.
478         
479         * WebKit2.xcodeproj/project.pbxproj:
480         Update for added/removed files.
481
482         * WebProcess/WebProcess.h:
483         Add secItemResponse and secKeychainItemResponse message handlers.
484
485         * WebProcess/WebProcess.messages.in:
486         Add SecItemResponse and SecKeychainItemResponse messages.
487
488         * WebProcess/mac/CoreIPCClientRunLoop.h:
489         * WebProcess/mac/CoreIPCClientRunLoop.mm:
490         This is no longer needed.
491
492         * WebProcess/mac/KeychainItemShimMethods.h:
493         * WebProcess/mac/KeychainItemShimMethods.mm:
494         (WebKit::managedAttributeLists):
495         Make this an atomically initialized static.
496
497         (WebKit::managedAttributeListsMutex):
498         Add an atomically initialized mutex.
499
500         (WebKit::allocateAttributeListContents):
501         Use the managedAttributeListsMutex to make this function callable from any thread.
502
503         (WebKit::managedKeychainItemContents):
504         Make this an atomically initialized static.
505         
506         (WebKit::managedKeychainItemContentsMutex):
507         Add an atomically initialized mutex.
508
509         (WebKit::allocateKeychainItemContentData):
510         Use the managedAttributeListsMutex to make this function callable from any thread.
511
512         (WebKit::webFreeAttributeListContent):
513         Use locking so this can be called from any thread.
514
515         (WebKit::webFreeKeychainItemContent):
516         Ditto.
517
518         (WebKit::responseMap):
519         Add responseMap thread-safe singleton for holding incoming responses.
520
521         (WebKit::generateSecKeychainItemRequestID):
522         Return a unique item request id, using OSAtomicIncrement64Barrier for atomicity.
523
524         (WebKit::didReceiveSecKeychainItemResponse):
525         Pass the response over the response map.
526
527         (WebKit::sendSeqKeychainItemRequest):
528         Send a request message and wait for a response using ResponseMap::waitForResponse.
529
530         (WebKit::webSecKeychainItemCopyContent):
531         Send a request using sendSeqKeychainItemRequest.
532
533         (WebKit::webSecKeychainItemCreateFromContent):
534         Ditto.
535
536         (WebKit::webSecKeychainItemModifyContent):
537         Ditto.
538
539         * WebProcess/mac/KeychainShimResponseMap.h:
540         New thread-safe helper class that stores a map of responses and lets client wait for a response
541         with a given ID.
542
543         (KeychainShimResponseMap::waitForResponse):
544         Wait until the response is available in the hash map, then return it.
545
546         (KeychainShimResponseMap::didReceiveResponse):
547         Add the response to the hash map and signal the condition variable.
548
549         * WebProcess/mac/SecItemShimMethods.h:
550         * WebProcess/mac/SecItemShimMethods.mm:
551         (WebKit::responseMap):
552         Add responseMap thread-safe singleton for holding incoming responses.
553
554         (WebKit::generateSecItemRequestID):
555         Return a unique item request id, using OSAtomicIncrement64Barrier for atomicity.
556
557         (WebKit::didReceiveSecItemResponse):
558         Pass the response over the response map.
559
560         (WebKit::sendSeqItemRequest):
561         Send a request message and wait for a response using ResponseMap::waitForResponse.
562
563         (WebKit::webSecItemCopyMatching):
564         Send a request using sendSeqItemRequest.
565
566         (WebKit::webSecItemAdd):
567         Ditto.
568
569         (WebKit::webSecItemUpdate):
570         Ditto.
571
572         (WebKit::webSecItemDelete):
573         Ditto.
574
575         * WebProcess/mac/WebProcessMac.mm:
576         (WebKit::WebProcess::secItemResponse):
577         Call didReceiveSecItemResponse.
578
579         (WebKit::WebProcess::secKeychainItemResponse):
580         Call didReceiveSecKeychainItemResponse.
581
582 2012-01-10  Anders Carlsson  <andersca@apple.com>
583
584         DispatchOnConnectionQueue messages should have a Connection parameter
585         https://bugs.webkit.org/show_bug.cgi?id=75986
586
587         Reviewed by Adam Roben.
588
589         Message handlers for messages with the DispatchOnConnectionQueue should have a CoreIPC::Connection
590         parameter, making it easier to send messages back over that connection.
591
592         * Platform/CoreIPC/HandleMessage.h:
593         (CoreIPC::callMemberFunction):
594         (CoreIPC::handleMessageOnConnectionQueue):
595         * Scripts/webkit2/messages.py:
596         (async_case_statement):
597         (generate_message_handler):
598         * Scripts/webkit2/messages_unittest.py:
599         * WebProcess/WebPage/EventDispatcher.cpp:
600         (WebKit::EventDispatcher::wheelEvent):
601         (WebKit::EventDispatcher::gestureEvent):
602         * WebProcess/WebPage/EventDispatcher.h:
603         * WebProcess/WebProcess.cpp:
604         (WebKit::WebProcess::pluginProcessCrashed):
605         * WebProcess/WebProcess.h:
606
607 2012-01-10  Chris Marrin  <cmarrin@apple.com>
608
609         Turn off the FilterTrigger in WebKit and WebKit2
610         https://bugs.webkit.org/show_bug.cgi?id=75914
611
612         Reviewed by Simon Fraser.
613
614         Implement allowedCompositingTriggers to turn on all compositing triggers except FilterTrigger.
615
616         * WebProcess/WebCoreSupport/WebChromeClient.h:
617         (WebKit::WebChromeClient::allowedCompositingTriggers):
618
619 2012-01-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
620
621         Unreviewed potential Mac WK2 build fix.
622
623         * UIProcess/PageClient.h: forward declare WebGestureEvent.
624
625 2012-01-10  Csaba Osztrogonác  <ossy@webkit.org>
626
627         Unreviewed, rolling out an accidental commit r104569.
628
629         * Shared/EditorState.cpp:
630         (WebKit::EditorState::encode):
631         (WebKit::EditorState::decode):
632         * Shared/EditorState.h:
633         * UIProcess/API/qt/qquickwebview.cpp:
634         (QQuickWebView::inputMethodQuery):
635         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
636         (WebKit::WebEditorClient::respondToChangedSelection):
637         * WebProcess/WebPage/WebPage.cpp:
638         (WebKit::WebPage::editorState):
639
640 2012-01-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
641
642         Unreviewed potential Mac WK2 build fix.
643
644         * UIProcess/API/mac/PageClientImpl.h:
645         * UIProcess/API/mac/PageClientImpl.mm:
646         (WebKit::PageClientImpl::doneWithGestureEvent):
647
648 2012-01-10  Rafael Brandao  <rafael.lobo@openbossa.org>
649
650         [Qt][WK2] Add font-related API tests for QWebPreferences
651         https://bugs.webkit.org/show_bug.cgi?id=75739
652
653         Reviewed by Zoltan Herczeg.
654
655         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
656         * UIProcess/API/qt/tests/qmltests/common/font-preferences.html: Added.
657
658 2012-01-10  Simon Hausmann  <simon.hausmann@nokia.com>
659
660         [Qt] Fix failing WK2 layout tests after r104557
661
662         Reviewed by Kenneth Rohde Christiansen.
663
664         * UIProcess/WebPageProxy.cpp:
665         (WebKit::WebPageProxy::didReceiveEvent): Add missing break to not
666         handle mouseDown as gesture event.
667
668 2012-01-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
669
670         Unreviewed buildfix.
671
672         * UIProcess/WebPageProxy.h:
673
674 2012-01-10  Kenneth Rohde Christiansen  <kenneth@webkit.org>
675
676         Implement the input panel request/close handling
677
678         Reviewed by Simon Hausmann.
679
680         With the current patch we only request the input panel as a
681         response to a user tap. Close requests, on the other hand,
682         is always respected.
683
684         As multiple show/hide requests can happen while processing
685         the tap gesture, input panel visibility changes are postponed
686         until the tap gesture ends.
687
688         The input panel will become visible if the WebCore editor is
689         in canEdit mode and thus work for content-editable, meaning
690         that it won't close the input panel if you click on a link
691         (eg. editCommand) while in content-editable mode.
692
693         * UIProcess/PageClient.h:
694         * UIProcess/WebPageProxy.cpp:
695         (WebKit::WebPageProxy::handleGestureEvent):
696         (WebKit::WebPageProxy::editorStateChanged):
697         (WebKit::WebPageProxy::didReceiveEvent):
698
699             Add a new doneWithGestureEvent method to the PageClient
700             as well as add a updateTextInputState similar to that of mac.
701
702         * UIProcess/WebPageProxy.h:
703         * UIProcess/qt/QtPageClient.cpp:
704         (QtPageClient::updateTextInputState):
705         (QtPageClient::doneWithGestureEvent):
706
707             Propagate the new events to the Qt EventHandler.
708
709         * UIProcess/qt/QtPageClient.h:
710         * UIProcess/qt/QtWebPageEventHandler.cpp:
711         * UIProcess/qt/QtWebPageEventHandler.h:
712         (QtWebPageEventHandler::QtWebPageEventHandler):
713         (QtWebPageEventHandler::handleSingleTapEvent):
714         (setInputPanelVisible):
715         (QtWebPageEventHandler::updateTextInputState):
716         (QtWebPageEventHandler::doneWithGestureEvent):
717
718             Handle postponing of the input method visibility change
719             and the actual showing/hiding.
720
721 2012-01-10  Eunmi Lee  <eunmi15.lee@samsung.com>
722
723         [EFL][WK2] Remove codes to move and resize the clip.
724         https://bugs.webkit.org/show_bug.cgi?id=75428
725
726         Reviewed by Andreas Kling.
727
728         Remove codes to move and resize the clip because clip is not used now.
729         We have to show whole area of evas_object_image so we don't have to
730         clip any area.
731         In the WebKit1 Efl, the clip is used to clip the area to show during
732         weak zoom, so we can use codes to manipulate the clip when we want to
733         implement weak zoom for WebKit2 Efl.
734
735         * UIProcess/API/efl/ewk_view.cpp:
736         (_ewk_view_smart_calculate):
737
738 2012-01-09  Andras Becsi  <andras.becsi@nokia.com>
739
740         [Qt][WK2] Pinch zoom should affect the page size
741         https://bugs.webkit.org/show_bug.cgi?id=74601
742
743         Reviewed by Kenneth Rohde Christiansen.
744
745         The current implementation uses the scale property of the QQuickWebPage
746         to scale the page in response to pinch gestures.
747         However for layout and anchoring to work correctly in QML, pinching needs
748         to change the page size.
749         This patch applies the pinch scale to the page size and to the transformation
750         matrix of the drawing area.
751         Thus the page item's coordinate system is no longer a direct representation
752         of the WebCore::Page coordinate system and it is no longer suitable as
753         an inertial frame of reference for input events. The event propagation had
754         to be moved to the QQuickWebView and the positions translated to content
755         coordinates when NativeWebEvents are created.
756         Re-landing with fixed event delivery for the test infrastructure.
757
758         * Shared/NativeWebMouseEvent.h:
759         * Shared/NativeWebTouchEvent.h:
760         * Shared/NativeWebWheelEvent.h:
761         * Shared/qt/NativeWebMouseEventQt.cpp:
762         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
763         * Shared/qt/NativeWebTouchEventQt.cpp:
764         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
765         * Shared/qt/NativeWebWheelEventQt.cpp:
766         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
767         * Shared/qt/WebEventFactoryQt.cpp:
768         (WebKit::WebEventFactory::createWebMouseEvent):
769         (WebKit::WebEventFactory::createWebWheelEvent):
770         (WebKit::WebEventFactory::createWebTouchEvent):
771         * Shared/qt/WebEventFactoryQt.h:
772         * UIProcess/API/qt/qquickwebpage.cpp:
773         (QQuickWebPage::geometryChanged):
774         (QQuickWebPagePrivate::QQuickWebPagePrivate):
775         (QQuickWebPagePrivate::paintToCurrentGLContext):
776         (QQuickWebPage::usesTraditionalDesktopBehaviour):
777         (QQuickWebPage::setUsesTraditionalDesktopBehaviour):
778         (QQuickWebPage::eventHandler):
779         (QQuickWebPage::setContentSize):
780         (QQuickWebPage::contentSize):
781         (QQuickWebPage::setContentScale):
782         (QQuickWebPage::contentScale):
783         (QQuickWebPage::transformFromItem):
784         (QQuickWebPage::transformToItem):
785         (QQuickWebPagePrivate::updateSize):
786         * UIProcess/API/qt/qquickwebpage_p.h:
787         * UIProcess/API/qt/qquickwebpage_p_p.h:
788         * UIProcess/API/qt/qquickwebview.cpp:
789         (QQuickWebViewPrivate::enableMouseEvents):
790         (QQuickWebViewPrivate::disableMouseEvents):
791         (QQuickWebViewPrivate::loadDidCommit):
792         (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
793         (QQuickWebViewPrivate::didChangeContentsSize):
794         (QQuickWebViewPrivate::didChangeViewportProperties):
795         (QQuickWebViewPrivate::pageDidRequestScroll):
796         (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
797         (QQuickWebViewPrivate::PostTransitionState::apply):
798         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
799         (QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour):
800         (QQuickWebViewExperimental::useTraditionalDesktopBehaviour):
801         (QQuickWebView::mapToWebContent):
802         (QQuickWebView::mapRectToWebContent):
803         (QQuickWebView::mapFromWebContent):
804         (QQuickWebView::mapRectFromWebContent):
805         (QQuickWebView::geometryChanged):
806         (QQuickWebView::keyPressEvent):
807         (QQuickWebView::keyReleaseEvent):
808         (QQuickWebView::inputMethodEvent):
809         (QQuickWebView::focusInEvent):
810         (QQuickWebView::focusOutEvent):
811         (QQuickWebView::touchEvent):
812         (QQuickWebView::mousePressEvent):
813         (QQuickWebView::mouseMoveEvent):
814         (QQuickWebView::mouseReleaseEvent):
815         (QQuickWebView::mouseDoubleClickEvent):
816         (QQuickWebView::wheelEvent):
817         (QQuickWebView::hoverEnterEvent):
818         (QQuickWebView::hoverMoveEvent):
819         (QQuickWebView::hoverLeaveEvent):
820         (QQuickWebView::dragMoveEvent):
821         (QQuickWebView::dragEnterEvent):
822         (QQuickWebView::dragLeaveEvent):
823         (QQuickWebView::dropEvent):
824         (QQuickWebView::event):
825         * UIProcess/API/qt/qquickwebview_p.h:
826         * UIProcess/API/qt/qquickwebview_p_p.h:
827         * UIProcess/API/qt/qwebviewportinfo.cpp:
828         (QWebViewportInfo::contentsSize):
829         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
830         (tst_QQuickWebView::scrollRequest):
831         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
832         (WebKit::QtPinchGestureRecognizer::recognize):
833         * UIProcess/qt/QtViewportInteractionEngine.cpp:
834         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
835         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
836         (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
837         (WebKit::QtViewportInteractionEngine::event):
838         (WebKit::QtViewportInteractionEngine::wheelEvent):
839         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
840         (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
841         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
842         (WebKit::QtViewportInteractionEngine::applyConstraints):
843         (WebKit::QtViewportInteractionEngine::currentCSSScale):
844         (WebKit::QtViewportInteractionEngine::panGestureStarted):
845         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
846         (WebKit::QtViewportInteractionEngine::panGestureEnded):
847         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
848         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
849         (WebKit::QtViewportInteractionEngine::scaleContent):
850         * UIProcess/qt/QtViewportInteractionEngine.h:
851         * UIProcess/qt/QtWebPageEventHandler.cpp:
852         (QtWebPageEventHandler::handleEvent):
853         (QtWebPageEventHandler::handleMouseMoveEvent):
854         (QtWebPageEventHandler::handleMousePressEvent):
855         (QtWebPageEventHandler::handleMouseReleaseEvent):
856         (QtWebPageEventHandler::handleWheelEvent):
857         (QtWebPageEventHandler::handleHoverLeaveEvent):
858         (QtWebPageEventHandler::handleHoverMoveEvent):
859         (QtWebPageEventHandler::handleDragEnterEvent):
860         (QtWebPageEventHandler::handleDragMoveEvent):
861         (QtWebPageEventHandler::handleDropEvent):
862         (QtWebPageEventHandler::handleSingleTapEvent):
863         (QtWebPageEventHandler::handleDoubleTapEvent):
864         (QtWebPageEventHandler::touchEvent):
865         * UIProcess/qt/QtWebPageEventHandler.h:
866
867 2012-01-09  Eunmi Lee  <eunmi15.lee@samsung.com>
868
869         [EFL][WK2] Set color_set function to the clipped smart class.
870         https://bugs.webkit.org/show_bug.cgi?id=75286
871
872         Reviewed by Andreas Kling.
873
874         Set _ewk_view_smart_color_set() function to the clipped smart class's color_set,
875         so application can set webpage's background color using evas_object_color_set() API.
876
877         * UIProcess/API/efl/ewk_view.cpp:
878         (_ewk_view_smart_color_set):
879         (ewk_view_smart_class_init):
880
881 2012-01-08  Dan Bernstein  <mitz@apple.com>
882
883         REGRESSION (r103859): WKViews leak
884         https://bugs.webkit.org/show_bug.cgi?id=75805
885
886         The flags changed event monitor added in r103859 was retaining the WKView (as it references
887         self in the handler block), causing it to leak.
888
889         * UIProcess/API/mac/WKView.mm:
890         (-[WKView dealloc]): Moved call to remove the flags changed event monitor from here...
891         (-[WKView viewDidMoveToWindow]): ...to here. Moved call to add the flags changed event
892         monitor to here from...
893         (-[WKView initWithFrame:contextRef:pageGroupRef:]): ...here.
894
895 2012-01-06  Mark Rowe  <mrowe@apple.com>
896
897         REGRESSION (WebKit2): Save as PDF no longer generates links to URLs
898         <http://webkit.org/b/65076> / <rdar://problem/9606246>
899
900         WebKit2 printing works by having the web process render the page content to a PDF. The PDF
901         data is then shipped to the UI process which will render it in to the printing graphics context.
902         Links were being lost because the API used to do the rendering of the PDF in to the printing
903         graphics context, CGContextDrawPDFPage, did not preserve the links that were present in the
904         PDF content received from the web process.
905
906         To fix this we switch to using PDFKit for drawing the PDF in to the printing graphics context.
907         PDFKit provides the ability for us to iterate over the links in the PDF content ourselves and
908         add links in to the printing graphics context.
909
910         Reviewed by Alexey Proskuryakov.
911
912         * UIProcess/API/mac/WKPrintingView.h:
913         * UIProcess/API/mac/WKPrintingView.mm:
914         (pdfAnnotationLinkClass): Look up the PDFAnnotationLink class from PDFKit as WebKit2 loads PDFKit lazily.
915         (pdfDocumentClass): Ditto.
916         (-[WKPrintingView _drawPDFDocument:page:atPoint:]): Switch to using the PDFKit equivalents of several types.
917         Iterate over the annotations present in the PDFPage, calling CGPDFContextSetURLForRect for each PDFAnnotationLink
918         that we find.
919         (-[WKPrintingView _drawPreview:]): Create an NSData to feed to PDFDocument.
920         (-[WKPrintingView drawRect:]): Ditto.
921         * WebKit2Prefix.h: Add the usual workaround to make Objective-C exceptions compile when C++ exception handling is disabled.
922
923 2012-01-06  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
924
925         [Qt] [WK2] Minibrowser leaks memory ~6-7Mb per reload
926         https://bugs.webkit.org/show_bug.cgi?id=75746
927
928         Reset WebGraphicsLayer::m_layerTreeTileClient of all dependent 
929         layers from ~LayerTreeHostQt(). This replaces r103760 which
930         causes leaks of GraphicsLayerTextureMapper objects on UI side. 
931
932         Reviewed by Noam Rosenthal.
933
934         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
935         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
936         (WebCore::WebGraphicsLayer::setLayerTreeTileClient):
937         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
938         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
939         (WebKit::LayerTreeHostQt::~LayerTreeHostQt):
940
941 2012-01-06  Alexey Proskuryakov  <ap@apple.com>
942
943         [Mac] Thread verifier assertions when printing
944         https://bugs.webkit.org/show_bug.cgi?id=75738
945
946         Reviewed by Sam Weinig.
947
948         * UIProcess/API/mac/WKPrintingView.mm:
949         (-[WKPrintingView dealloc]): Dealloc in main thread, so that WebFrameProxy doesn't get
950         deref'ed from a secondary one.
951         (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): This method calls out to client,
952         which only expects that on main thread.
953         (-[WKPrintingView knowsPageRange:]): Call _adjustPrintingMarginsForHeaderAndFooter on main
954         thread.
955
956 2012-01-06  Alexey Proskuryakov  <ap@apple.com>
957
958         Need to allow SCNetworkReachability service in sandbox profile
959         https://bugs.webkit.org/show_bug.cgi?id=75724
960         <rdar://problem/10652415>
961
962         Reviewed by Mark Rowe.
963
964         * WebProcess/com.apple.WebProcess.sb:
965
966 2012-01-06  Benjamin Poulain  <bpoulain@apple.com>
967
968         [Mac] Sort the resources of WebKit2.xcodeproj
969         https://bugs.webkit.org/show_bug.cgi?id=75636
970
971         Reviewed by Andreas Kling.
972
973         * WebKit2.xcodeproj/project.pbxproj:
974
975 2012-01-06  Rafael Brandao  <rafael.lobo@openbossa.org>
976
977         [Qt][WK2] QQuickWebView breaks when an empty url is loaded
978         https://bugs.webkit.org/show_bug.cgi?id=75445
979
980         Reviewed by Tor Arne Vestbø.
981
982         * UIProcess/API/qt/qquickwebview.cpp:
983         (QQuickWebView::load):
984         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml: Check if a request to load
985         an empty url is ignored. 'about:blank' should be used instead to load an empty page.
986         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
987
988 2012-01-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
989
990         [Qt] Move listing of include paths and libs to pri files in sources
991
992         Includepaths are sometimes modified by non-Qt contributors so keeping
993         them in files inside Sources makes it more likely that they are updated
994         along with project files for the other ports.
995
996         Using pri files instead of prf files for this also has the benefit that
997         the include() from the main target file can be parsed and followed by
998         Qt Creator -- something that does not work with load().
999
1000         Dependency from a target to a library through the WEBKIT variable are
1001         handled through forwarding-files in Tools/qmake/mkspecs/modules, which
1002         set the source root of the module and include the right pri file.
1003
1004         Ideally we'd use the variant of include() that takes an optional
1005         namespace to read the variables into, or the fromfile() function,
1006         but both of these add an overhead of about 40% on the total qmake
1007         runtime, due to making a deep copy of all the variables in the
1008         project or re-reading all the prf files from scratch.
1009
1010         Reviewed by Simon Hausmann.
1011         Reviewed by Ossy.
1012
1013         * Target.pri:
1014         * WebKit2.pri: Renamed from Tools/qmake/mkspecs/features/webkit2.prf.
1015
1016 2012-01-06  Zeno Albisser  <zeno@webkit.org>
1017
1018         [Qt][WK2] Add test for application URL schemes.
1019         https://bugs.webkit.org/show_bug.cgi?id=74933
1020
1021         Reviewed by Kenneth Rohde Christiansen.
1022
1023         * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml: Added.
1024         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
1025
1026 2012-01-05  Dan Bernstein  <mitz@apple.com>
1027
1028         <rdar://problem/10633760> Update copyright strings
1029
1030         Reviewed by Mark Rowe.
1031
1032         * Info.plist:
1033         * PluginProcess/Info.plist:
1034         * WebProcess/Info.plist:
1035
1036 2012-01-05  Anders Carlsson  <andersca@apple.com>
1037
1038         Crash when trying to invalidate the NPRuntimeObjectMap for a plug-in in a subframe
1039         https://bugs.webkit.org/show_bug.cgi?id=75667
1040         <rdar://problem/10389454>
1041
1042         Reviewed by Kevin Decker.
1043
1044         NPRuntimeObjectMap::invalidate is called whenever a plug-in view is destroyed. If invalidate is called for an object map
1045         whose plug-in has a null frame, we'd crash.
1046
1047         The plug-in will have a null frame if the plug-in view is destroyed because its containing frame has been removed from the document,
1048         and if the plug-in view is being destroyed asynchronously due to the plug-in itself calling JavaScript that will remove the frame
1049         (see PluginView::unprotectPluginFromDestruction).
1050
1051         The reason NPRuntimeObjectMap::invalidate will crash when the frame is null is because we were trying to access the frame's global
1052         object, causing a null dereference. The reason we were trying to get at the frame's global object was to create a Strong handle to
1053         a JSNPObject so we could stick the object in a vector so we could later iterate over the vector elements and call invalidate() on
1054         each JSNPObject which will end up releasing the underlying NPObject.
1055
1056         However, it turns out that we don't need to stick the JSNPObject in a vector; we can just get the underlying NPObject directly and
1057         stick that in a vector and then iterate over the NPObjects, releasing them.
1058
1059         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1060         (WebKit::NPRuntimeObjectMap::invalidate):
1061
1062 2012-01-05  Alexey Proskuryakov  <ap@apple.com>
1063
1064         REGRESSION (r98912-r99538): Crash in WebKit::WebFrameLoaderClient::didDetectXSS
1065         https://bugs.webkit.org/show_bug.cgi?id=75578
1066
1067         Reviewed by Daniel Bates.
1068
1069         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1070         (WebKit::InjectedBundlePageLoaderClient::didDetectXSSForFrame):
1071         Check for a correct struct member existence.
1072
1073 2012-01-05  Alexey Proskuryakov  <ap@apple.com>
1074
1075         WK2: Safari fails to open a PostScript file in Preview from context menu
1076         https://bugs.webkit.org/show_bug.cgi?id=75643
1077         <rdar://problem/9823430>
1078
1079         Reviewed by Dan Bernstein.
1080
1081         * UIProcess/API/mac/PDFViewController.mm: (WebKit::PDFViewController::setPDFDocumentData):
1082         Append ".pdf" to file name when converting data, as suggested file name is created for
1083         original MIME type.
1084
1085 2012-01-05  Zeno Albisser  <zeno@webkit.org>
1086
1087         [Qt][WK2] Implement custom URL schemes defined in QML.
1088         https://bugs.webkit.org/show_bug.cgi?id=74931
1089
1090         Allow creation of custom UrlSchemeDelegates from QML.
1091         A UrlSchemeDelegate contains a handler signal that is triggered
1092         when a url matching the defined scheme is requested.
1093         To allow for this a derivation of QNetworkAccessManager
1094         is necessary.
1095         The request is then handled in QML/JS and a reply
1096         is sent back from the UIProcess to the WebProcess.
1097
1098         Reviewed by Kenneth Rohde Christiansen.
1099
1100         * Shared/qt/QtNetworkReplyData.cpp: Added.
1101         (WebKit::QtNetworkReplyData::QtNetworkReplyData):
1102         (WebKit::QtNetworkReplyData::encode):
1103         (WebKit::QtNetworkReplyData::decode):
1104         * Shared/qt/QtNetworkReplyData.h: Added.
1105         * Shared/qt/QtNetworkRequestData.cpp: Added.
1106         (WebKit::QtNetworkRequestData::QtNetworkRequestData):
1107         (WebKit::QtNetworkRequestData::encode):
1108         (WebKit::QtNetworkRequestData::decode):
1109         * Shared/qt/QtNetworkRequestData.h: Added.
1110         * Target.pri:
1111         * UIProcess/API/qt/qquicknetworkreply.cpp: Added.
1112         (QQuickNetworkReply::QQuickNetworkReply):
1113         (QQuickNetworkReply::contentType):
1114         (QQuickNetworkReply::setContentType):
1115         (QQuickNetworkReply::operation):
1116         (QQuickNetworkReply::setOperation):
1117         (QQuickNetworkReply::contentDisposition):
1118         (QQuickNetworkReply::setContentDisposition):
1119         (QQuickNetworkReply::location):
1120         (QQuickNetworkReply::setLocation):
1121         (QQuickNetworkReply::lastModified):
1122         (QQuickNetworkReply::setLastModified):
1123         (QQuickNetworkReply::cookie):
1124         (QQuickNetworkReply::setCookie):
1125         (QQuickNetworkReply::userAgent):
1126         (QQuickNetworkReply::setUserAgent):
1127         (QQuickNetworkReply::server):
1128         (QQuickNetworkReply::setServer):
1129         (QQuickNetworkReply::data):
1130         (QQuickNetworkReply::setData):
1131         (QQuickNetworkReply::send):
1132         (QQuickNetworkReply::networkRequestData):
1133         (QQuickNetworkReply::setNetworkRequestData):
1134         (QQuickNetworkReply::networkReplyData):
1135         * UIProcess/API/qt/qquicknetworkreply_p.h: Added.
1136         * UIProcess/API/qt/qquicknetworkrequest_p.h: Added.
1137         * UIProcess/API/qt/qquickurlschemedelegate.cpp: Added.
1138         (QQuickUrlSchemeDelegate::QQuickUrlSchemeDelegate):
1139         (QQuickUrlSchemeDelegate::scheme):
1140         (QQuickUrlSchemeDelegate::setScheme):
1141         (QQuickUrlSchemeDelegate::request):
1142         (QQuickUrlSchemeDelegate::reply):
1143         * UIProcess/API/qt/qquickurlschemedelegate_p.h: Added.
1144         * UIProcess/API/qt/qquickwebview.cpp:
1145         (QQuickWebViewExperimental::QQuickWebViewExperimental):
1146         (QQuickWebViewExperimental::schemeDelegates_At):
1147         (QQuickWebViewExperimental::schemeDelegates_Append):
1148         (QQuickWebViewExperimental::schemeDelegates_Count):
1149         (QQuickWebViewExperimental::schemeDelegates_Clear):
1150         (QQuickWebViewExperimental::schemeDelegates):
1151         (QQuickWebViewExperimental::invokeApplicationSchemeHandler):
1152         (QQuickWebViewExperimental::sendApplicationSchemeReply):
1153         * UIProcess/API/qt/qquickwebview_p.h:
1154         * UIProcess/WebPageProxy.h:
1155         * UIProcess/WebPageProxy.messages.in:
1156         * UIProcess/qt/QtPageClient.cpp:
1157         (QtPageClient::handleApplicationSchemeRequest):
1158         * UIProcess/qt/QtPageClient.h:
1159         * UIProcess/qt/WebPageProxyQt.cpp:
1160         (WebKit::WebPageProxy::registerApplicationScheme):
1161         (WebKit::WebPageProxy::resolveApplicationSchemeRequest):
1162         (WebKit::WebPageProxy::sendApplicationSchemeReply):
1163         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1164         (WebKit::WebFrameLoaderClient::createNetworkingContext):
1165         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
1166         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
1167         * WebProcess/WebPage/WebPage.h:
1168         * WebProcess/WebPage/WebPage.messages.in:
1169         * WebProcess/WebPage/qt/WebPageQt.cpp:
1170         (WebKit::WebPage::registerApplicationScheme):
1171         (WebKit::WebPage::receivedApplicationSchemeRequest):
1172         (WebKit::WebPage::applicationSchemeReply):
1173         * WebProcess/qt/QtNetworkAccessManager.cpp: Added.
1174         (WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
1175         (WebKit::QtNetworkAccessManager::obtainOriginatingWebPage):
1176         (WebKit::QtNetworkAccessManager::createRequest):
1177         (WebKit::QtNetworkAccessManager::registerApplicationScheme):
1178         * WebProcess/qt/QtNetworkAccessManager.h: Added.
1179         * WebProcess/qt/QtNetworkReply.cpp: Added.
1180         (WebKit::QtNetworkReply::QtNetworkReply):
1181         (WebKit::QtNetworkReply::setData):
1182         (WebKit::QtNetworkReply::setReplyData):
1183         (WebKit::QtNetworkReply::readData):
1184         (WebKit::QtNetworkReply::bytesAvailable):
1185         (WebKit::QtNetworkReply::setHeader):
1186         (WebKit::QtNetworkReply::abort):
1187         (WebKit::QtNetworkReply::close):
1188         (WebKit::QtNetworkReply::setReadBufferSize):
1189         (WebKit::QtNetworkReply::canReadLine):
1190         (WebKit::QtNetworkReply::finalize):
1191         * WebProcess/qt/QtNetworkReply.h: Added.
1192         * WebProcess/qt/WebProcessQt.cpp:
1193         (WebKit::WebProcess::platformInitializeWebProcess):
1194
1195 2012-01-05  Fady Samuel  <fsamuel@chromium.org>
1196
1197         Move scalePageBy from eventSender to window.internals
1198         https://bugs.webkit.org/show_bug.cgi?id=64512
1199
1200         Reviewed by Simon Fraser.
1201
1202         * win/WebKit2.def:
1203         * win/WebKit2CFLite.def:
1204
1205 2012-01-05  Alexander Færøy  <alexander.faeroy@nokia.com>
1206
1207         Pass WebFrame instead of WebCore::Frame to the WebKit2 specific FrameNetworkingContext
1208         https://bugs.webkit.org/show_bug.cgi?id=75550
1209
1210         Make the WebKit2 FrameNetworkingContext implementation store the
1211         WebFrame instead of the WebCore::Frame as this is needed for the Qt
1212         port to implement a.o. HTTP autentication and SSL support.
1213
1214         As the WebFrameNetworkingContext is partly shared across all WebKit2 ports,
1215         all port specific files have been modified.
1216
1217         For the Qt implementation of FrameNetworkingContext, we also set a
1218         property to the originatingObject for the page ID. We also switch to
1219         using an OwnPtr instead of a raw C++ pointer for the
1220         m_originatingObject member.
1221
1222         Based on original patch by Peter Hartmann.
1223
1224         Reviewed by Kenneth Rohde Christiansen.
1225
1226         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1227         (WebKit::WebFrameLoaderClient::createNetworkingContext):
1228         * WebProcess/WebCoreSupport/efl/WebFrameNetworkingContext.h:
1229         (WebFrameNetworkingContext::create):
1230         (WebFrameNetworkingContext::WebFrameNetworkingContext):
1231         * WebProcess/WebCoreSupport/gtk/WebFrameNetworkingContext.h:
1232         (WebFrameNetworkingContext::create):
1233         (WebFrameNetworkingContext::WebFrameNetworkingContext):
1234         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
1235         (WebKit::WebFrameNetworkingContext::create):
1236         (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext):
1237         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
1238         (WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext):
1239         (WebCore::WebFrameNetworkingContext::~WebFrameNetworkingContext):
1240         (WebCore::WebFrameNetworkingContext::create):
1241         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
1242         * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h:
1243         (WebFrameNetworkingContext::create):
1244         (WebFrameNetworkingContext::WebFrameNetworkingContext):
1245
1246 2012-01-05  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1247
1248         [Qt] Implement QQuickWebView::inputMethodQuery
1249
1250         Reviewed by Simon Hausmann.
1251
1252         Implement the current Qt5 queries of inputMethodQuery.
1253
1254         * UIProcess/API/qt/qquickwebview.cpp:
1255         (QQuickWebView::inputMethodQuery):
1256         * UIProcess/API/qt/qquickwebview_p.h:
1257
1258 2012-01-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1259
1260         [GTK] Add methods to get/set the WebView zoom level to WebKit2 GTK+ API
1261         https://bugs.webkit.org/show_bug.cgi?id=75248
1262
1263         Reviewed by Gustavo Noronha Silva.
1264
1265         It uses the page zoom factor unconditionally for now.
1266
1267         * UIProcess/API/gtk/WebKitWebView.cpp:
1268         (webkitWebViewSetProperty):
1269         (webkitWebViewGetProperty):
1270         (webkit_web_view_class_init): Add WebKitWebView:zoom-level
1271         property.
1272         (webkit_web_view_set_zoom_level): Set current zoom level.
1273         (webkit_web_view_get_zoom_level): Get current zoom level.
1274         * UIProcess/API/gtk/WebKitWebView.h:
1275         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
1276         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
1277         (testWebViewZoomLevel):
1278         (beforeAll):
1279
1280 2012-01-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1281
1282         [GTK] Rename webkit_web_view_load_alternate_html as webkit_web_view_replace_content in WebKit2 GTK+
1283         https://bugs.webkit.org/show_bug.cgi?id=75433
1284
1285         Reviewed by Martin Robinson.
1286
1287         * UIProcess/API/gtk/WebKitWebView.cpp:
1288         (webkitWebViewLoadFail): Use webkit_web_view_replace_content().
1289         (webkitWebViewLoadChanged): Do not emit load-changed signal when
1290         replacing content.
1291         (webkitWebViewLoadFailed): Do not emit load-failed signal when
1292         replacing content.
1293         (webkitWebViewSetEstimatedLoadProgress): Do not emit
1294         notify::estimated-load-progress signal when replacing content.
1295         (webkit_web_view_replace_content):
1296         * UIProcess/API/gtk/WebKitWebView.h:
1297         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1298         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
1299         (beforeAll):
1300         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
1301         (replaceContentTitleChangedCallback):
1302         (replaceContentLoadCallback):
1303         (testWebViewReplaceContent):
1304         (beforeAll):
1305         * UIProcess/API/gtk/tests/WebViewTest.cpp:
1306         (WebViewTest::replaceContent):
1307         * UIProcess/API/gtk/tests/WebViewTest.h:
1308
1309 2012-01-05  Keunsoon Lee  <keunsoon.lee@samsung.com>
1310
1311         [WK2][EFL] creating dummy functions for Download class on Efl port.
1312         https://bugs.webkit.org/show_bug.cgi?id=75246
1313
1314         dummy functions for Download class on Efl port
1315
1316         Reviewed by Hajime Morita.
1317
1318         * PlatformEfl.cmake: add new file to compile
1319         * WebProcess/Downloads/efl: Added.
1320         * WebProcess/Downloads/efl/DownloadEfl.cpp: Added.
1321         (WebKit::Download::start):
1322         (WebKit::Download::startWithHandle):
1323         (WebKit::Download::cancel):
1324         (WebKit::Download::platformInvalidate):
1325         (WebKit::Download::didDecideDestination):
1326         (WebKit::Download::platformDidFinish):
1327         (WebKit::Download::receivedCredential):
1328         (WebKit::Download::receivedRequestToContinueWithoutCredential):
1329         (WebKit::Download::receivedCancellation):
1330         (WebKit::Download::useCredential):
1331         (WebKit::Download::continueWithoutCredential):
1332         (WebKit::Download::cancelAuthenticationChallenge):
1333
1334 2012-01-04  Dan Bernstein  <mitz@apple.com>
1335
1336         Allow WebProcess to launch a client process and become its first WebProcess.
1337
1338         This is the WebKit2 part of fixing <http://webkit.org/b/75444> Debugging WebProcess requires running a UI process first and waiting to attach
1339
1340         Reviewed by Anders Carlsson.
1341
1342         * PluginProcess/mac/PluginProcessMainMac.mm:
1343         (WebKit::PluginProcessMain): Added a newline to stderr output.
1344         * UIProcess/Launcher/mac/EnvironmentVariables.cpp:
1345         (WebKit::EnvironmentVariables::preexistingProcessServiceNameKey): Added. Returns the name
1346         of the environment variable that optionally tells a UI processs to look for a preexisting
1347         web process instead of launching a new one.
1348         (WebKit::EnvironmentVariables::preexistingProcessTypeKey): Added. Returns the name of the
1349         environment variable that tells a UI process the type of the preexisting web process
1350         indicated by the other variable.
1351         * UIProcess/Launcher/mac/EnvironmentVariables.h:
1352         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1353         (WebKit::ProcessLauncher::launchProcess): Changed to look for a preexisting web process if
1354         the aforementioned environment variables are set and the preexisting process has not been
1355         used yet.
1356         * WebProcess/mac/WebProcessMainMac.mm:
1357         (WebKit::WebProcessMain): Changed to look for the -client-executable command-line option,
1358         and if present, launch the specified executable, setting variables in its environment that
1359         tell it to use this preexisting web process, then wait for it to send a send right to its
1360         listening port.
1361
1362 2012-01-04  Alexey Proskuryakov  <ap@apple.com>
1363
1364         First sentence is missing or clipped when printing a inline PDF
1365         https://bugs.webkit.org/show_bug.cgi?id=75514
1366         <rdar://problem/10640680>
1367
1368         Reviewed by Dan Bernstein.
1369
1370         * UIProcess/WebPageProxy.cpp:
1371         (WebKit::WebPageProxy::headerHeight):
1372         (WebKit::WebPageProxy::footerHeight):
1373         (WebKit::WebPageProxy::drawHeader):
1374         (WebKit::WebPageProxy::drawFooter):
1375         Do not ask the client about headers and footers when printing a PDF.
1376
1377 2012-01-04  Alexander Færøy  <alexander.faeroy@nokia.com>
1378
1379         [Qt] Fix test regressions after r104025
1380         https://bugs.webkit.org/show_bug.cgi?id=75545
1381
1382         Reviewed by Kenneth Rohde Christiansen.
1383
1384         * WebProcess/WebPage/WebPage.cpp:
1385         (WebKit::WebPage::editorState):
1386
1387 2012-01-04  Andras Becsi  <andras.becsi@nokia.com>
1388
1389         REGRESSION(r104028): Broke editing tests and event coordinates in desktop behaviour
1390         https://bugs.webkit.org/show_bug.cgi?id=75542
1391
1392
1393         [Qt][WK2] Pinch zoom should affect the page size
1394         https://bugs.webkit.org/show_bug.cgi?id=74601
1395
1396         Unreviewed roll-out.
1397
1398         * Shared/NativeWebMouseEvent.h:
1399         * Shared/NativeWebTouchEvent.h:
1400         * Shared/NativeWebWheelEvent.h:
1401         * Shared/qt/NativeWebMouseEventQt.cpp:
1402         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
1403         * Shared/qt/NativeWebTouchEventQt.cpp:
1404         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
1405         * Shared/qt/NativeWebWheelEventQt.cpp:
1406         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
1407         * Shared/qt/WebEventFactoryQt.cpp:
1408         (WebKit::WebEventFactory::createWebMouseEvent):
1409         (WebKit::WebEventFactory::createWebWheelEvent):
1410         (WebKit::WebEventFactory::createWebTouchEvent):
1411         * Shared/qt/WebEventFactoryQt.h:
1412         * UIProcess/API/qt/qquickwebpage.cpp:
1413         (QQuickWebPage::keyPressEvent):
1414         (QQuickWebPage::keyReleaseEvent):
1415         (QQuickWebPage::inputMethodEvent):
1416         (QQuickWebPage::focusInEvent):
1417         (QQuickWebPage::focusOutEvent):
1418         (QQuickWebPage::mousePressEvent):
1419         (QQuickWebPage::mouseMoveEvent):
1420         (QQuickWebPage::mouseReleaseEvent):
1421         (QQuickWebPage::mouseDoubleClickEvent):
1422         (QQuickWebPage::wheelEvent):
1423         (QQuickWebPage::hoverEnterEvent):
1424         (QQuickWebPage::hoverMoveEvent):
1425         (QQuickWebPage::hoverLeaveEvent):
1426         (QQuickWebPage::dragMoveEvent):
1427         (QQuickWebPage::dragEnterEvent):
1428         (QQuickWebPage::dragLeaveEvent):
1429         (QQuickWebPage::dropEvent):
1430         (QQuickWebPage::geometryChanged):
1431         (QQuickWebPage::event):
1432         (QQuickWebPage::touchEvent):
1433         (QQuickWebPagePrivate::QQuickWebPagePrivate):
1434         (QQuickWebPagePrivate::paintToCurrentGLContext):
1435         * UIProcess/API/qt/qquickwebpage_p.h:
1436         * UIProcess/API/qt/qquickwebpage_p_p.h:
1437         * UIProcess/API/qt/qquickwebview.cpp:
1438         (QQuickWebViewPrivate::enableMouseEvents):
1439         (QQuickWebViewPrivate::disableMouseEvents):
1440         (QQuickWebViewPrivate::loadDidCommit):
1441         (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
1442         (QQuickWebViewPrivate::didChangeContentsSize):
1443         (QQuickWebViewPrivate::didChangeViewportProperties):
1444         (QQuickWebViewPrivate::pageDidRequestScroll):
1445         (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
1446         (QQuickWebViewPrivate::PostTransitionState::apply):
1447         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
1448         (QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour):
1449         (QQuickWebViewExperimental::useTraditionalDesktopBehaviour):
1450         (QQuickWebView::geometryChanged):
1451         (QQuickWebView::focusInEvent):
1452         (QQuickWebView::focusOutEvent):
1453         * UIProcess/API/qt/qquickwebview_p.h:
1454         * UIProcess/API/qt/qquickwebview_p_p.h:
1455         * UIProcess/API/qt/qwebviewportinfo.cpp:
1456         (QWebViewportInfo::contentsSize):
1457         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
1458         (tst_QQuickWebView::scrollRequest):
1459         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
1460         (WebKit::QtPinchGestureRecognizer::recognize):
1461         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1462         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
1463         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
1464         (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
1465         (WebKit::QtViewportInteractionEngine::event):
1466         (WebKit::QtViewportInteractionEngine::wheelEvent):
1467         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
1468         (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
1469         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
1470         (WebKit::QtViewportInteractionEngine::applyConstraints):
1471         (WebKit::QtViewportInteractionEngine::currentCSSScale):
1472         (WebKit::QtViewportInteractionEngine::panGestureStarted):
1473         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
1474         (WebKit::QtViewportInteractionEngine::panGestureEnded):
1475         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
1476         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
1477         (WebKit::QtViewportInteractionEngine::scaleContent):
1478         * UIProcess/qt/QtViewportInteractionEngine.h:
1479         * UIProcess/qt/QtWebPageEventHandler.cpp:
1480         (QtWebPageEventHandler::handleEvent):
1481         (QtWebPageEventHandler::handleMouseMoveEvent):
1482         (QtWebPageEventHandler::handleMousePressEvent):
1483         (QtWebPageEventHandler::handleMouseReleaseEvent):
1484         (QtWebPageEventHandler::handleWheelEvent):
1485         (QtWebPageEventHandler::handleHoverLeaveEvent):
1486         (QtWebPageEventHandler::handleHoverMoveEvent):
1487         (QtWebPageEventHandler::handleDragEnterEvent):
1488         (QtWebPageEventHandler::handleDragMoveEvent):
1489         (QtWebPageEventHandler::handleDropEvent):
1490         (QtWebPageEventHandler::handleSingleTapEvent):
1491         (QtWebPageEventHandler::handleDoubleTapEvent):
1492         (QtWebPageEventHandler::touchEvent):
1493         * UIProcess/qt/QtWebPageEventHandler.h:
1494
1495 2012-01-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1496
1497         [Qt] Introduce new qmake variable 'WEBKIT' for signaling dependencies
1498
1499         The custom qmake variable 'WEBKIT' is used for signaling that a
1500         target depends in some way on other subproject of the WebKit
1501         project. For now this is limited to the set of intermediate
1502         libraries: wtf, javascriptcore, webcore, and webkit2.
1503
1504         This replaces the previous convension of using load(foo) for
1505         just include paths, and CONFIG += foo to also link against foo.
1506
1507         Adding a dependency results in additional include paths being
1508         available, and potentially linking to the library. This is
1509         decided by the build system based on conditions such as what
1510         kind of target is being built and the general build config.
1511
1512         An advantage to his approach is that it simplifies the individual
1513         foo.prf files, for example by allowing us to use INCLUDEPATH +=
1514         and LIBS += as normal instead of prepending.
1515
1516         Reviewed by Simon Hausmann.
1517
1518         * Target.pri:
1519         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
1520
1521 2012-01-03  Andras Becsi  <andras.becsi@nokia.com>
1522
1523         [Qt][WK2] Pinch zoom should affect the page size
1524         https://bugs.webkit.org/show_bug.cgi?id=74601
1525
1526         Reviewed by Kenneth Rohde Christiansen and Simon Hausmann.
1527
1528         The current implementation uses the scale property of the QQuickWebPage
1529         to scale the page in response to pinch gestures.
1530         However for layout and anchoring to work correctly in QML, pinching needs
1531         to change the page size.
1532         This patch applies the pinch scale to the page size and to the transformation
1533         matrix of the drawing area.
1534         Thus the page item's coordinate system is no longer a direct representation
1535         of the WebCore::Page coordinate system and it is no longer suitable as
1536         an inertial frame of reference for input events. The event propagation had
1537         to be moved to the QQuickWebView and the positions translated to content
1538         coordinates when NativeWebEvents are created.
1539
1540         * Shared/NativeWebMouseEvent.h:
1541         * Shared/NativeWebTouchEvent.h:
1542         * Shared/NativeWebWheelEvent.h:
1543         * Shared/qt/NativeWebMouseEventQt.cpp:
1544         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
1545         * Shared/qt/NativeWebTouchEventQt.cpp:
1546         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
1547         * Shared/qt/NativeWebWheelEventQt.cpp:
1548         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
1549         * Shared/qt/WebEventFactoryQt.cpp:
1550         (WebKit::WebEventFactory::createWebMouseEvent):
1551         (WebKit::WebEventFactory::createWebWheelEvent):
1552         (WebKit::WebEventFactory::createWebTouchEvent):
1553         * Shared/qt/WebEventFactoryQt.h:
1554         * UIProcess/API/qt/qquickwebpage.cpp:
1555         (QQuickWebPage::geometryChanged):
1556         (QQuickWebPagePrivate::QQuickWebPagePrivate):
1557         (QQuickWebPagePrivate::paintToCurrentGLContext):
1558         (QQuickWebPage::usesTraditionalDesktopBehaviour):
1559         (QQuickWebPage::setUsesTraditionalDesktopBehaviour):
1560         (QQuickWebPage::eventHandler):
1561         (QQuickWebPage::setContentSize):
1562         (QQuickWebPage::contentSize):
1563         (QQuickWebPage::setContentScale):
1564         (QQuickWebPage::contentScale):
1565         (QQuickWebPage::transformFromItem):
1566         (QQuickWebPage::transformToItem):
1567         (QQuickWebPagePrivate::updateSize):
1568         * UIProcess/API/qt/qquickwebpage_p.h:
1569         * UIProcess/API/qt/qquickwebpage_p_p.h:
1570         * UIProcess/API/qt/qquickwebview.cpp:
1571         (QQuickWebViewPrivate::enableMouseEvents):
1572         (QQuickWebViewPrivate::disableMouseEvents):
1573         (QQuickWebViewPrivate::loadDidCommit):
1574         (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
1575         (QQuickWebViewPrivate::didChangeContentsSize):
1576         (QQuickWebViewPrivate::didChangeViewportProperties):
1577         (QQuickWebViewPrivate::pageDidRequestScroll):
1578         (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
1579         (QQuickWebViewPrivate::PostTransitionState::apply):
1580         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
1581         (QQuickWebViewExperimental::setUseTraditionalDesktopBehaviour):
1582         (QQuickWebViewExperimental::useTraditionalDesktopBehaviour):
1583         (QQuickWebView::mapToWebContent):
1584         (QQuickWebView::mapRectToWebContent):
1585         (QQuickWebView::mapFromWebContent):
1586         (QQuickWebView::mapRectFromWebContent):
1587         (QQuickWebView::geometryChanged):
1588         (QQuickWebView::keyPressEvent):
1589         (QQuickWebView::keyReleaseEvent):
1590         (QQuickWebView::inputMethodEvent):
1591         (QQuickWebView::focusInEvent):
1592         (QQuickWebView::focusOutEvent):
1593         (QQuickWebView::touchEvent):
1594         (QQuickWebView::mousePressEvent):
1595         (QQuickWebView::mouseMoveEvent):
1596         (QQuickWebView::mouseReleaseEvent):
1597         (QQuickWebView::mouseDoubleClickEvent):
1598         (QQuickWebView::wheelEvent):
1599         (QQuickWebView::hoverEnterEvent):
1600         (QQuickWebView::hoverMoveEvent):
1601         (QQuickWebView::hoverLeaveEvent):
1602         (QQuickWebView::dragMoveEvent):
1603         (QQuickWebView::dragEnterEvent):
1604         (QQuickWebView::dragLeaveEvent):
1605         (QQuickWebView::dropEvent):
1606         (QQuickWebView::event):
1607         * UIProcess/API/qt/qquickwebview_p.h:
1608         * UIProcess/API/qt/qquickwebview_p_p.h:
1609         * UIProcess/API/qt/qwebviewportinfo.cpp:
1610         (QWebViewportInfo::contentsSize):
1611         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
1612         (tst_QQuickWebView::scrollRequest):
1613         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
1614         (WebKit::QtPinchGestureRecognizer::recognize):
1615         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1616         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
1617         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
1618         (WebKit::QtViewportInteractionEngine::animateItemRectVisible):
1619         (WebKit::QtViewportInteractionEngine::event):
1620         (WebKit::QtViewportInteractionEngine::wheelEvent):
1621         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
1622         (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
1623         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary):
1624         (WebKit::QtViewportInteractionEngine::applyConstraints):
1625         (WebKit::QtViewportInteractionEngine::currentCSSScale):
1626         (WebKit::QtViewportInteractionEngine::panGestureStarted):
1627         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
1628         (WebKit::QtViewportInteractionEngine::panGestureEnded):
1629         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
1630         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
1631         (WebKit::QtViewportInteractionEngine::scaleContent):
1632         * UIProcess/qt/QtViewportInteractionEngine.h:
1633         * UIProcess/qt/QtWebPageEventHandler.cpp:
1634         (QtWebPageEventHandler::handleEvent):
1635         (QtWebPageEventHandler::handleMouseMoveEvent):
1636         (QtWebPageEventHandler::handleMousePressEvent):
1637         (QtWebPageEventHandler::handleMouseReleaseEvent):
1638         (QtWebPageEventHandler::handleWheelEvent):
1639         (QtWebPageEventHandler::handleHoverLeaveEvent):
1640         (QtWebPageEventHandler::handleHoverMoveEvent):
1641         (QtWebPageEventHandler::handleDragEnterEvent):
1642         (QtWebPageEventHandler::handleDragMoveEvent):
1643         (QtWebPageEventHandler::handleDropEvent):
1644         (QtWebPageEventHandler::handleSingleTapEvent):
1645         (QtWebPageEventHandler::handleDoubleTapEvent):
1646         (QtWebPageEventHandler::touchEvent):
1647         * UIProcess/qt/QtWebPageEventHandler.h:
1648
1649 2012-01-03  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1650
1651         [Qt] Clean up Qt specific part of editorState()
1652
1653         Reviewed by Simon Hausmann.
1654
1655         Use unsigned instead of int.
1656         No need to clone the range as we don't modify it.
1657         Support selections which include a composition.
1658         If we are not in editable content make sure to use the document element
1659         as the scope for calculating the positions and lengths.
1660         Remove compositionStart/Length as there cannot be a selection and
1661         composition at the same time.
1662
1663         Only tested manually as we don't have everything in place yet
1664         to properly test this.
1665
1666         * Shared/EditorState.h:
1667         * WebProcess/WebPage/WebPage.cpp:
1668         (WebKit::WebPage::editorState):
1669
1670 2012-01-04  Mihnea Ovidenie  <mihnea@adobe.com>
1671
1672         [Mac]Fix build after changeset 103997
1673         https://bugs.webkit.org/show_bug.cgi?id=75530
1674
1675         Reviewed by Andreas Kling.
1676
1677         * UIProcess/API/mac/WKView.mm:
1678
1679 2012-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1680
1681         [GTK] Scrollbars are drawn behind the window resize grip
1682         https://bugs.webkit.org/show_bug.cgi?id=75384
1683
1684         Reviewed by Martin Robinson.
1685
1686         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1687         (webkitWebViewBaseNotifyResizerSizeForWindow): Get the size of the
1688         main window resize grip and send it to the page proxy if it
1689         overlaps with the view.
1690         (toplevelWindowResizeGripVisibilityChanged): Call
1691         webkitWebViewBaseNotifyResizerSizeForWindow().
1692         (webkitWebViewBaseRealize): Get the toplevel window and connect to
1693         notify::resize-grip-visible signal.
1694         (webkitWebViewBaseSizeAllocate): Call
1695         webkitWebViewBaseNotifyResizerSizeForWindow().
1696
1697 2012-01-03  Jon Lee  <jonlee@apple.com>
1698
1699         Leak of WebNotificationClient when page is destroyed
1700         https://bugs.webkit.org/show_bug.cgi?id=74980
1701         <rdar://problem/10611231>
1702
1703         Reviewed by Mark Rowe.
1704
1705         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
1706         (WebKit::WebNotificationClient::notificationControllerDestroyed): Delete the instance.
1707         * WebProcess/WebCoreSupport/WebNotificationClient.h:
1708
1709 2012-01-03  Sam Weinig  <sam@webkit.org>
1710
1711         Remove unnecessary forward declaration of Function
1712         https://bugs.webkit.org/show_bug.cgi?id=75485
1713
1714         Reviewed by Dan Bernstein.
1715
1716         * Platform/WorkQueue.h:
1717
1718 2012-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1719
1720         [GTK] Simplify loader client WebKit2 GTK+ API
1721         https://bugs.webkit.org/show_bug.cgi?id=74605
1722
1723         Reviewed by Gustavo Noronha Silva.
1724
1725         Remove WebKitWebLoaderClient from public API keeping it as a
1726         private object. Loading API has been reduced to two signals in
1727         WebKitWebView.
1728
1729         * GNUmakefile.am: Remove WebKitWebLoaderClientPrivate.h.
1730         * UIProcess/API/gtk/WebKitDefines.h: Remove forward delcarations
1731         that are no longer needed.
1732         * UIProcess/API/gtk/WebKitWebLoaderClient.cpp:
1733         (didStartProvisionalLoadForFrame): Emit
1734         WebKitWebView::load-changed signal with Started event.
1735         (didReceiveServerRedirectForProvisionalLoadForFrame): Emit
1736         WebKitWebView::load-changed signal with Redirected event.
1737         (didFailProvisionalLoadWithErrorForFrame): Emit
1738         WebKitWebView::load-failed signal with Started event.
1739         (didCommitLoadForFrame): Emit WebKitWebView::load-changed signal
1740         with Committed event.
1741         (didFinishLoadForFrame): Emit WebKitWebView::load-changed signal
1742         with Finished event.
1743         (didFailLoadWithErrorForFrame): Emit WebKitWebView::load-failed
1744         signal with Committed event.
1745         (webkit_web_loader_client_init):
1746         (webkit_web_loader_client_class_init):
1747         * UIProcess/API/gtk/WebKitWebLoaderClient.h: Remove public API and
1748         move private API here.
1749         * UIProcess/API/gtk/WebKitWebLoaderClientPrivate.h: Removed.
1750         * UIProcess/API/gtk/WebKitWebView.cpp:
1751         (webkitWebViewLoadFail): Default implementation of
1752         WebKitWebView::load-failed signal to show a custom error page.
1753         (webkit_web_view_class_init): Add load-changed and load-failed
1754         signals.
1755         (webkitWebViewLoadChanged): Emit WebKitWebView::load-changed with
1756         the given event.
1757         (webkitWebViewLoadFailed): Emit WebKitWebView::load-failed signal
1758         with the given event, failing uri and error.
1759         * UIProcess/API/gtk/WebKitWebView.h:
1760         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1761         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Remove loader
1762         client section.
1763         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Remove loader
1764         client symbols.
1765         * UIProcess/API/gtk/docs/webkit2gtk.types: Remove
1766         webkit_web_loader_client_get_type.
1767         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
1768         (loadChangedCallback):
1769         (loadFailedCallback):
1770         (LoadTrackingTest::LoadTrackingTest):
1771         (LoadTrackingTest::~LoadTrackingTest):
1772         (LoadTrackingTest::provisionalLoadStarted):
1773         (LoadTrackingTest::provisionalLoadReceivedServerRedirect):
1774         (LoadTrackingTest::provisionalLoadFailed):
1775         (LoadTrackingTest::loadCommitted):
1776         (LoadTrackingTest::loadFinished):
1777         (LoadTrackingTest::loadFailed):
1778         * UIProcess/API/gtk/tests/LoadTrackingTest.h:
1779         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
1780         (testLoadingError):
1781         (LoadStopTrackingTest::loadCommitted):
1782         (LoadStopTrackingTest::loadFailed):
1783         (testLoadCancelled):
1784         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
1785         (beforeAll):
1786         * UIProcess/API/gtk/webkit2.h: Remove loader client header.
1787         * UIProcess/API/gtk/webkit2marshal.list:
1788
1789 2012-01-03  Rafael Brandao  <rafael.lobo@openbossa.org>
1790
1791         [Qt][WK2] tst_favIconLoad.qml crashes on debug mode
1792         https://bugs.webkit.org/show_bug.cgi?id=75448
1793
1794         Reviewed by Kenneth Rohde Christiansen.
1795
1796         * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: Loads
1797         "about:blank" instead of an empty url between tests to clean favicon.
1798
1799 2012-01-02  Dan Bernstein  <mitz@apple.com>
1800
1801         Fixed a typo I made in r103871.
1802
1803         Fixes <http://webkit.org/b/75450> Inline PDF doesn't preview correctly when attempting to print its frame
1804
1805         * WebProcess/WebPage/WebPage.cpp:
1806         (WebKit::WebPage::drawRectToPDF): Changed USE(GC) to USE(CG).
1807
1808 2012-01-02  Andy Estes  <aestes@apple.com>
1809
1810         Fix the Windows build (again).
1811
1812         * Platform/CoreIPC/Connection.h:
1813
1814 2012-01-02  Sam Weinig  <sam@webkit.org>
1815
1816         Fix windows build.
1817
1818         * Platform/CoreIPC/Connection.h:
1819         * Platform/CoreIPC/win/ConnectionWin.cpp:
1820         * Platform/RunLoop.h:
1821         Missing declarations/includes of BinarySemaphore.
1822
1823 2012-01-02  Sam Weinig  <sam@webkit.org>
1824
1825         Move dispatchSentMessagesUntil out of the RunLoop class.
1826         https://bugs.webkit.org/show_bug.cgi?id=75320
1827
1828         Reviewed by Dan Bernstein.
1829
1830         * Platform/CoreIPC/Connection.cpp:
1831         (CoreIPC::Connection::SyncMessageState::waitWhileDispatchingSentWin32Messages):
1832         * Platform/CoreIPC/Connection.h:
1833         * Platform/CoreIPC/win/ConnectionWin.cpp:
1834         (CoreIPC::Connection::dispatchSentMessagesUntil):
1835         * Platform/win/RunLoopWin.cpp:
1836
1837 2012-01-02  Dan Bernstein  <mitz@apple.com>
1838
1839         Build fix.
1840
1841         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1842         * Platform/mac/SharedMemoryMac.cpp:
1843
1844 2012-01-02  Nikolas Zimmermann  <nzimmermann@rim.com>
1845
1846         Not reviewed. Fix build on Lion, by including mach_error.h in two places that need it.
1847
1848         * PluginProcess/mac/PluginProcessMainMac.mm:
1849         * WebProcess/mac/WebProcessMainMac.mm:
1850
1851 2012-01-01  Dan Bernstein  <mitz@apple.com>
1852
1853         EnvironmentUtilities::stripValuesEndingWithString enters an infinite loop if the search value
1854         occurs a component other than the first.
1855
1856         Reviewed by Anders Carlsson.
1857
1858         * Platform/unix/EnvironmentUtilities.cpp:
1859         (WebKit::EnvironmentUtilities::stripValuesEndingWithString): Changed to start the search for
1860         the next colon after the current colon.
1861
1862 2012-01-01  Dan Bernstein  <mitz@apple.com>
1863
1864         Improved reproting of kernel return codes.
1865
1866         Reviewed by Anders Carlsson.
1867
1868         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1869         (CoreIPC::Connection::exceptionSourceEventHandler): Added the error string to the log message.
1870         * Platform/mac/SharedMemoryMac.cpp:
1871         (WebKit::SharedMemory::create): Ditto.
1872         * PluginProcess/mac/PluginProcessMainMac.mm:
1873         (WebKit::PluginProcessMain): Ditto. Also changed to log to stderr.
1874         * WebProcess/mac/WebProcessMainMac.mm:
1875         (WebKit::WebProcessMain): Ditto.
1876
1877 2011-12-31  Dan Bernstein  <mitz@apple.com>
1878
1879         Continue trying to fix the ASSERT-enabled Windows build after r103858.
1880
1881         * WebProcess/WebPage/WebPage.cpp:
1882         (WebKit::WebPage::drawRectToPDF):
1883         (WebKit::WebPage::drawPagesToPDF):
1884
1885 2011-12-31  Dan Bernstein  <mitz@apple.com>
1886
1887         Start trying to fix the Windows build after r103858.
1888
1889         * WebProcess/WebPage/WebPage.cpp:
1890         (WebKit::drawPDFPage):
1891
1892 2011-12-31  Dan Bernstein  <mitz@apple.com>
1893
1894         <rdar://problem/10463059> Cannot print USPS shipping labels
1895         http://webkit.org/b/72801
1896
1897         Reviewed by Anders Carlsson and Alexey Proskuryakov.
1898
1899         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
1900         (appendValuesInPDFNameSubtreeToVector): Copied from WebKit/mac/WebView/WebPDFDocumentExtras.mm.
1901         (getAllValuesInPDFNameTree): Ditto.
1902         (getAllScriptsInPDFDocument): Copied allScriptsInPDFDocument() from WebPDFDocumentExtras.mm
1903         and changed it to append to a Vector<RetainPtr<CFStringRef> >.
1904         (WebKit::BuiltInPDFView::create): Changed to take a WebFrame* rather than a Page*.
1905         (WebKit::BuiltInPDFView::BuiltInPDFView): Ditto. Updated initializer accordingly.
1906         (WebKit::BuiltInPDFView::pdfDocumentDidLoad): Copied and adapted code from
1907         -[WebPDFRepresentation finishedLoadingWithDataSource:] to run scripts from the PDF with a
1908         Doc object as the this object.
1909         (WebKit::BuiltInPDFView::initialize): Adapted for the change from having a Page* to having
1910         a WebFrame*.
1911         (WebKit::BuiltInPDFView::destroy): Ditto.
1912         (WebKit::BuiltInPDFView::isActive): Ditto.
1913         (WebKit::jsPDFDocInitialize): Added. Refs the BuiltInPDFView which is the private object for
1914         this Doc.
1915         (WebKit::jsPDFDocFinalize): Added. Derefs the BuiltInPDFView for this Doc.
1916         (WebKit::BuiltInPDFView::jsPDFDocPrint): Added. Calls WebCore::Chrome::print().
1917         (WebKit::BuiltInPDFView::makeJSPDFDoc): Copied from WebKit/mac/WebView/WebJSPDFDoc.mm and
1918         modified to use this BuiltInPDFView as the private object of the Doc being made.
1919         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
1920         (WebKit::BuiltInPDFView::disconnectFromPage): Adapted for the change from having a Page* to
1921         having a WebFrame*.
1922         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1923         (WebKit::WebFrameLoaderClient::createPlugin): Pass the WebFrame to WebPage::createPlugin().
1924         * WebProcess/WebPage/WebPage.cpp:
1925         (WebKit::WebPage::createPlugin): Added a WebFrame* parameter, which is used when creating
1926         a BuiltInPDFView.
1927         * WebProcess/WebPage/WebPage.h:
1928
1929 2011-12-31  Dan Bernstein  <mitz@apple.com>
1930
1931         <rdar://problem/8553040> REGRESSION (WebKit2): Safari status text doesn't change when you change the modifier keys without moving the mouse
1932         https://bugs.webkit.org/show_bug.cgi?id=75404
1933
1934         Reviewed by Jon Honeycutt.
1935
1936         * UIProcess/API/mac/WKView.mm:
1937         (-[WKView dealloc]): Remove the flags changed event monitor.
1938         (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): Added. Similarly to
1939         -[WebHTMLView _postFlagsChangedEvent:], creates a mouse moved event and passes it to
1940         -mouseMoved:.
1941         (-[WKView initWithFrame:contextRef:pageGroupRef:]): Create a local event monitor for flags
1942         changed events.
1943
1944 2011-12-31  Dan Bernstein  <mitz@apple.com>
1945
1946         <rdar://problem/8750356> REGRESSION (WebKit2): Printing a subframe containing a PDF prints the on-screen view instead of the entire PDF document
1947         <http://webkit.org/b/75232>
1948
1949         Reviewed by Alexey Proskuryakov.
1950
1951         * UIProcess/API/C/WKPage.cpp:
1952         (WKPageDrawPagesToPDF): Added WKPrintInfo parameter, which is passed through as a PrintInfo
1953         to the WebPageProxy.
1954         * UIProcess/API/C/WKPagePrivate.h:
1955         * UIProcess/API/mac/WKPrintingView.mm:
1956         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Changed to pass the PrintInfo
1957         down to WebPageProxy::drawPagesToPDF.
1958         (-[WKPrintingView _drawPreview:]): Changed to pass the PrintInfo down to
1959         WebPageProxy::drawRectToPDF.
1960         * UIProcess/API/mac/WKView.mm:
1961         (-[WKView canChangeFrameLayout:]): Changed to use WebFrameProxy::isDisplayingPDFDocument, which
1962         works for subframes as well.
1963         (-[WKView printOperationWithPrintInfo:forFrame:]): Added a FIXME.
1964         * UIProcess/WebFrameProxy.cpp:
1965         (WebKit::WebFrameProxy::isDisplayingPDFDocument): Added.
1966         * UIProcess/WebFrameProxy.h:
1967         * UIProcess/WebPageProxy.cpp:
1968         (WebKit::WebPageProxy::drawRectToPDF): Added a PrintInfo parameter, which is passed through to
1969         the Web process.
1970         (WebKit::WebPageProxy::drawPagesToPDF): Ditto.
1971         * UIProcess/WebPageProxy.h:
1972         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
1973         Added an override of pdfDocumentForPrinting() which returns the PDFDocument.
1974         * WebProcess/Plugins/Plugin.h:
1975         (WebKit::Plugin::pdfDocumentForPrinting): Added. This base class implementation returns 0.
1976         * WebProcess/Plugins/PluginView.h:
1977         (WebKit::PluginView::pdfDocumentForPrinting): Added. Calls through to the Plugin.
1978         * WebProcess/WebPage/WebPage.cpp:
1979         (WebKit::pdfDocumentForPrintingFrame): Added this helper function. If the frame is displaying
1980         a plug-in document, allows the plug-in to provide a PDF document for printing.
1981         (WebKit::WebPage::beginPrinting): Added an early return if the frame provides a PDF document
1982         for printing.
1983         (WebKit::WebPage::computePagesForPrinting): If the frame provides a PDF document for printing,
1984         create for each page in the PDF document a page rect with the size available for printing.
1985         (WebKit::drawPDFPage): Added this helper function, which draws a page from the PDF document
1986         into one of the aforementioned page rects. It rotates the PDF page 90 degrees if necessary to
1987         better match the aspect ratio of the paper, then it centers it on the paper. This matches the
1988         behavior of a PDFView when printed with default settings.
1989         (WebKit::WebPage::drawRectToPDF): If the frame provides a PDF document for printing, draw the
1990         PDF pages falling within the requested rect.
1991         (WebKit::WebPage::drawPagesToPDF): If the frame provides a PDF document for printing, draw
1992         the requested pages.
1993         * WebProcess/WebPage/WebPage.h:
1994         * WebProcess/WebPage/WebPage.messages.in: Added a PrintInfo parameter to DrawRectToPDF and
1995         DrawPagesToPDF.
1996
1997 2011-12-30  Dan Bernstein  <mitz@apple.com>
1998
1999         EnvironmentUtilities::stripValuesEndingWithString fails when the variable ends with the search value
2000         https://bugs.webkit.org/show_bug.cgi?id=75389
2001
2002         Reviewed by Anders Carlsson.
2003
2004         * Platform/unix/EnvironmentUtilities.cpp:
2005         (WebKit::EnvironmentUtilities::stripValuesEndingWithString): Fixed an off-by-1 error when
2006         examining the character after the match.
2007
2008 2011-12-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2009
2010         [Qt] Remove unused m_signalListeners from WorkQueue
2011         https://bugs.webkit.org/show_bug.cgi?id=75354
2012
2013         Reviewed by Andreas Kling.
2014
2015         This is unused since r76507.
2016
2017         * Platform/WorkQueue.h:
2018         * Platform/qt/WorkQueueQt.cpp:
2019         (WorkQueue::platformInvalidate):
2020
2021 2011-12-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2022
2023         [GTK] Context menu is hidden right after showing it when first menu item is not disabled
2024         https://bugs.webkit.org/show_bug.cgi?id=75357
2025
2026         Reviewed by Martin Robinson.
2027
2028         The problem is that we are passing GDK_CURRENT_TIME (which is 0)
2029         to gtk_popup_menu, because the events are async and
2030         gtk_get_current_event is NULL when calling gtk_menu_popup. GtkMenu
2031         has a timeout to decide whether the press-release was fast enough
2032         and ignore the button release event in that case. That way, a
2033         normal right click shows the menu while a long press hides the
2034         menu when the button is released. So, we need to know the real time
2035         when the right button was pressed and pass it to gtk_popup_menu.
2036
2037         * UIProcess/WebPageProxy.h: Make
2038         currentlyProcessedMouseDownEvent() public.
2039         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
2040         (WebKit::WebContextMenuProxyGtk::showContextMenu): Use
2041         WebPageProxy::currentlyProcessedMouseDownEvent() to get the
2042         current mouse event and pass its button number and time to
2043         gtk_popup_menu.
2044
2045 2011-12-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2046
2047         [GTK] Fix several conding style issues in WebKit2 GTK+ code
2048         https://bugs.webkit.org/show_bug.cgi?id=75339
2049
2050         Reviewed by Martin Robinson.
2051
2052         In addition to the WebKit coding style, code in UIProcess/API/gtk
2053         should follow style and conventions described here
2054         http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
2055
2056         * UIProcess/API/gtk/WebKitSettings.cpp: Remove trailing whitespaces.
2057         (webkit_settings_class_init): Remove trailing whitespaces, fix
2058         indentation issues in API doc comments, add missing trailing to
2059         some properties.
2060         (webkit_settings_set_enable_fullscreen): Move the code after
2061         get_enable_fullscreen() for consistency.
2062         * UIProcess/API/gtk/WebKitSettings.h: Remove trailing
2063         whitespaces. Fix * placement and line up parameters.
2064         * UIProcess/API/gtk/WebKitWebView.cpp: Remove several empty lines.
2065         (webkit_web_view_class_init): Mark property nicks and blurbs for translation.
2066         (webkitWebViewSetTitle): Remove trailing whitespaces.
2067         * UIProcess/API/gtk/WebKitWebView.h: Line up parameters.
2068         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Use the angle-bracket
2069         form for including file from WebCore and wtf. Use GRefPtr for
2070         GtkIMContext and bool instead of gboolean. Use the placement new
2071         syntax for private struct instead of new/delete.
2072         (webkitWebViewBaseRealize):
2073         (webkitWebViewBaseFinalize):
2074         (webkit_web_view_base_init):
2075         (webkitWebViewBaseFocusInEvent):
2076         (webkitWebViewBaseFocusOutEvent):
2077         (webkitWebViewBaseKeyPressEvent): Remove trailing whitespaces.
2078         (webkitWebViewBaseKeyReleaseEvent):
2079         (webkit_web_view_base_class_init):
2080         (webkitWebViewBaseGetIMContext):
2081
2082 2011-12-28  Balazs Kelemen  <kbalazs@webkit.org>
2083
2084         [Qt][WK2] Crash in ~WebGraphicsLayer when running fast/multicol/pagination-* tests
2085         https://bugs.webkit.org/show_bug.cgi?id=75000
2086
2087         Reviewed by Noam Rosenthal.
2088
2089         Don't adopt a tile client that belongs to a parent layer.
2090         This is unnecessary and also unsafe because we can live
2091         through that client.
2092
2093         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
2094         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
2095
2096 2011-12-27  Dan Bernstein  <mitz@apple.com>
2097
2098         [mac] Stop using bootstrap_look_up2
2099         https://bugs.webkit.org/show_bug.cgi?id=75280
2100
2101         Reviewed by Mark Rowe.
2102
2103         * PluginProcess/mac/PluginProcessMainMac.mm:
2104         (WebKit::PluginProcessMain): Changed to use bootstrap_look_up() instead of
2105         bootstrap_look_up2().
2106         * WebProcess/mac/WebProcessMainMac.mm:
2107         (WebKit::WebProcessMain): Ditto.
2108
2109 2011-12-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2110
2111         [Qt] Make the inputMethodEvent set or confirm the composition
2112         https://bugs.webkit.org/show_bug.cgi?id=75256
2113
2114         Reviewed by Chang Shu.
2115
2116         * UIProcess/qt/QtWebPageEventHandler.cpp:
2117         (QtWebPageEventHandler::inputMethodEvent):
2118
2119 2011-12-26  Mark Rowe  <mrowe@apple.com>
2120
2121         <http://webkit.org/b/75196> REGRESSION(r103643): Command-clicking a link no longer opens a new tab.
2122
2123         r103643 contained some botched copy-paste code that caused the state of the Command key
2124         to be lost when translating from a WebKit2 event to a WebCore event.
2125
2126         Reviewed by Dan Bernstein.
2127
2128         * Shared/WebEventConversion.cpp:
2129         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): Test for the correct modifier.
2130         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): Ditto.
2131         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent): Ditto.
2132         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent): Ditto.
2133         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent): Ditto.
2134
2135 2011-12-26  Carlos Garcia Campos  <cgarcia@igalia.com>
2136
2137         Fix a crash in WebProcess when starting a download not initiated by a WebPage
2138         https://bugs.webkit.org/show_bug.cgi?id=75225
2139
2140         Reviewed by Darin Adler.
2141
2142         * WebProcess/WebProcess.cpp:
2143         (WebKit::WebProcess::downloadRequest): Check initiatingPage is not
2144         NULL before using it.
2145
2146 2011-12-25  Dan Bernstein  <mitz@apple.com>
2147
2148         Find indicators overlap when a match spans multiple text boxes
2149         https://bugs.webkit.org/show_bug.cgi?id=75220
2150
2151         Reviewed by Darin Adler.
2152
2153         * UIProcess/FindIndicator.cpp:
2154         (WebKit::findIndicatorsForTextRectsOverlap): Added this helper function that checks for
2155         pairwise intersections between all indicator rects.
2156         (WebKit::FindIndicator::FindIndicator): Changed to use a single rect (the union of all text
2157         rects) if any two indicator rects would otherwise overlap. This is similar to what Safari
2158         does, and it eliminates overlapping rects for adjacent text boxes. In rare cases (such as when
2159         a match spans two lines and adjacent text boxes on one of those lines) it results in a find
2160         indicator that is too large and obscures some non-match text.
2161         * UIProcess/FindIndicator.h:
2162
2163 2011-12-21  Sam Weinig  <sam@webkit.org>
2164
2165         Start extracting platform specific bits out of PlatformEvents
2166         https://bugs.webkit.org/show_bug.cgi?id=75063
2167
2168         Reviewed by Anders Carlsson.
2169
2170         * Shared/WebEventConversion.cpp:
2171         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2172         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
2173         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
2174         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
2175         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
2176         * UIProcess/API/mac/WKView.mm:
2177         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2178         (InitWebCoreSystemInterface):
2179
2180 2011-12-22  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2181
2182         [Qt] [WK2] Use HashMap instead of Vector in the builtin bundle
2183         https://bugs.webkit.org/show_bug.cgi?id=75112
2184
2185         Reviewed by Andreas Kling.
2186
2187         Fix my own FIXME now that HashMap have support to hold OwnPtr as value.
2188
2189         * WebProcess/qt/QtBuiltinBundle.cpp:
2190         (WebKit::QtBuiltinBundle::didCreatePage):
2191         (WebKit::QtBuiltinBundle::willDestroyPage):
2192         (WebKit::QtBuiltinBundle::handleMessageToNavigatorQtObject):
2193         (WebKit::QtBuiltinBundle::handleSetNavigatorQtObjectEnabled):
2194         * WebProcess/qt/QtBuiltinBundle.h:
2195
2196 2011-12-22  Anders Carlsson  <andersca@apple.com>
2197
2198         Remove the last of the WebKit2 display throttling
2199         https://bugs.webkit.org/show_bug.cgi?id=75109
2200
2201         Reviewed by Adam Roben.
2202
2203         The code to do display throttling in WebKit2 is complex and doesn't really help us except
2204         on an old benchmark that's no longer representative of real-world behavior; let's rip it out instead.
2205
2206         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2207         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2208         (WebKit::DrawingAreaImpl::displayTimerFired):
2209         (WebKit::DrawingAreaImpl::display):
2210         * WebProcess/WebPage/DrawingAreaImpl.h:
2211         * WebProcess/WebPage/WebPage.cpp:
2212         (WebKit::WebPage::wheelEvent):
2213         (WebKit::WebPage::wheelEventSyncForTesting):
2214
2215 2011-12-22  Anders Carlsson  <andersca@apple.com>
2216
2217         Get rid of didStartAnimatedScroll and didCompleteAnimatedScroll
2218         https://bugs.webkit.org/show_bug.cgi?id=75107
2219
2220         Reviewed by Adam Roben.
2221
2222         This is another step towards removing the display throttling in WebKit2.
2223
2224         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2225         (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
2226         * WebProcess/WebCoreSupport/WebChromeClient.h:
2227
2228 2011-12-22  Anders Carlsson  <andersca@apple.com>
2229
2230         Remove didStartRubberBand and didCompleteRubberBand callbacks
2231         https://bugs.webkit.org/show_bug.cgi?id=75102
2232
2233         Reviewed by Adam Roben.
2234
2235         The code to do display throttling in WebKit2 is complex and doesn't really help us except
2236         on an old benchmark that's no longer representative of real-world behavior; let's rip it out instead.
2237
2238         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2239         * WebProcess/WebCoreSupport/WebChromeClient.h:
2240
2241 2011-12-22  Ryuan Choi <ryuan.choi@samsung.com>, Tomasz Morawski <t.morawski@samsung.com>
2242
2243         [EFL][WK2] Add an option to build WebKit2.
2244         https://bugs.webkit.org/show_bug.cgi?id=61999
2245
2246         Reviewed by Eric Seidel.
2247
2248         Add build script for WebKit2 on EFL port.
2249
2250         * CMakeLists.txt:
2251         * PlatformEfl.cmake: Added.
2252
2253 2011-12-21  Eunmi Lee  <eunmi15.lee@samsung.com>
2254
2255         [EFL][WK2] Add efl port's ewk_view files
2256         https://bugs.webkit.org/show_bug.cgi?id=61915
2257
2258         Reviewed by Eric Seidel.
2259
2260         This is the initial version of WebKit2 EFL port's ewk_view.
2261         The ewk_view is Evas_Object to show the rendered web contents.
2262
2263         * UIProcess/API/efl/ewk_view.cpp: Added.
2264         (_ewk_view_smart_changed):
2265         (_ewk_view_smart_focus_in):
2266         (_ewk_view_smart_focus_out):
2267         (_ewk_view_smart_mouse_wheel):
2268         (_ewk_view_smart_mouse_down):
2269         (_ewk_view_smart_mouse_up):
2270         (_ewk_view_smart_mouse_move):
2271         (_ewk_view_smart_key_down):
2272         (_ewk_view_smart_key_up):
2273         (_ewk_view_on_focus_in):
2274         (_ewk_view_on_focus_out):
2275         (_ewk_view_on_mouse_wheel):
2276         (_ewk_view_on_mouse_down):
2277         (_ewk_view_on_mouse_up):
2278         (_ewk_view_on_mouse_move):
2279         (_ewk_view_on_key_down):
2280         (_ewk_view_on_key_up):
2281         (_ewk_view_priv_new):
2282         (_ewk_view_priv_del):
2283         (_ewk_view_smart_add):
2284         (_ewk_view_smart_del):
2285         (_ewk_view_smart_resize):
2286         (_ewk_view_smart_move):
2287         (_ewk_view_smart_calculate):
2288         (_ewk_view_smart_show):
2289         (_ewk_view_smart_hide):
2290         (ewk_view_smart_class_init):
2291         (_ewk_view_smart_class_new):
2292         (ewk_view_add):
2293         (ewk_view_page_get):
2294         * UIProcess/API/efl/ewk_view.h: Added.
2295
2296 2011-12-21  Timothy Hatcher  <timothy@apple.com>
2297
2298         Web Inspector: suppress incremental rendering and use application chrome mode
2299
2300         https://webkit.org/b/75026
2301
2302         Reviewed by Joseph Pecoraro.
2303
2304         * UIProcess/WebInspectorProxy.cpp:
2305         (WebKit::createInspectorPageGroup): Set suppress incremental rendering and use application chrome mode.
2306
2307 2011-12-21  Sam Weinig  <sam@webkit.org>
2308
2309         Cleanup up clients when deallocating WebKit2 API objects
2310         https://bugs.webkit.org/show_bug.cgi?id=75014
2311
2312         Reviewed by Adam Roben.
2313
2314         * UIProcess/API/mac/WKBrowsingContextController.mm:
2315         (-[WKBrowsingContextController dealloc]):
2316         * UIProcess/API/mac/WKConnection.mm:
2317         (-[WKConnection dealloc]):
2318         Clear clients on dealloc.
2319
2320 2011-12-21  Rafael Brandao  <rafael.lobo@openbossa.org>
2321
2322         [Qt][WK2] Add tests for favicon and fix icon url decoding issue
2323         https://bugs.webkit.org/show_bug.cgi?id=74967
2324
2325         Reviewed by Simon Hausmann.
2326
2327         * UIProcess/API/qt/qwebiconimageprovider.cpp: We already receive the url
2328         without the percent encoding and we should access WebIconDatabase with
2329         an encoded url. Added a test to cover this behavior.
2330         (QWebIconImageProvider::requestImage):
2331         * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: Added.
2332         * UIProcess/API/qt/tests/qmltests/common/favicon.html: Added.
2333         * UIProcess/API/qt/tests/qmltests/common/favicon.png: Added.
2334         * UIProcess/API/qt/tests/qmltests/common/favicon2.html: Added.
2335         * UIProcess/API/qt/tests/qmltests/common/small-favicon.png: Added.
2336         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
2337
2338 2011-12-21  Sam Weinig  <sam@webkit.org>
2339
2340         Exception thrown when running WKBrowsingContextLoadDelegateTest.SimpleLoad test
2341         https://bugs.webkit.org/show_bug.cgi?id=75012
2342
2343         Reviewed by Adam Roben.
2344
2345         * UIProcess/API/mac/WKProcessGroup.mm:
2346         (-[WKProcessGroup dealloc]):
2347         Clear the WKContext's connection client.
2348
2349 2011-12-21  Michael Brüning  <michael.bruning@nokia.com>
2350
2351         [Qt][WK2] Fix tst_QQuickWebView::scrollRequest() API test
2352         https://bugs.webkit.org/show_bug.cgi?id=73994
2353
2354         Reviewed by Kenneth Rohde Christiansen.
2355
2356         Added a viewport meta tag so that the view is actually scrollable and
2357         does not get scaled to not be scrollable. Corrected the style
2358         definition for the <div> tag. Removed unneeded text in div
2359
2360         Rolled back changes some of the changes from the previous patch
2361         (r102453) because they weren't necessary.
2362
2363         * UIProcess/API/qt/tests/html/scroll.html:
2364         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2365         (tst_QQuickWebView::scrollRequest): Partially rolled back changes.
2366
2367 2011-12-21  Jessie Berlin  <jberlin@apple.com>
2368
2369         Windows build fix.
2370
2371         Replace all instances of "WebPropupMenuProxy" with "WebPopupMenuProxy".
2372
2373         * UIProcess/win/WebPopupMenuProxyWin.cpp:
2374         (WebKit::WebPopupMenuProxyWin::showPopupMenu):
2375         (WebKit::WebPopupMenuProxyWin::setFocusedIndex):
2376
2377 2011-12-20  Anders Carlsson  <andersca@apple.com>
2378
2379         Add ScrollableArea::contentsResized and have it call the scroll animator
2380         https://bugs.webkit.org/show_bug.cgi?id=74966
2381
2382         Reviewed by Sam Weinig.
2383
2384         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
2385         (WebKit::BuiltInPDFView::scrollbarStyleChanged):
2386
2387 2011-12-20  Anders Carlsson  <andersca@apple.com>
2388
2389         Try to fix the Windows build.
2390
2391         * UIProcess/win/WebPopupMenuProxyWin.cpp:
2392         (WebKit::WebPopupMenuProxyWin::showPopupMenu):
2393         (WebKit::WebPopupMenuProxyWin::setFocusedIndex):
2394
2395 2011-12-20  Simon Hausmann  <simon.hausmann@nokia.com>
2396
2397         [Qt][WK2] Remove statusBarMessageChanged
2398         https://bugs.webkit.org/show_bug.cgi?id=74405
2399
2400         Reviewed by Tor Arne Vestbø.
2401
2402         Removing support for window.status updates from the public
2403         QML API. See bug for details.
2404
2405         * UIProcess/API/qt/qquickwebview_p.h:
2406         * UIProcess/qt/QtWebPageUIClient.cpp:
2407         (QtWebPageUIClient::QtWebPageUIClient):
2408         * UIProcess/qt/QtWebPageUIClient.h:
2409
2410 2011-12-20  Anders Carlsson  <andersca@apple.com>
2411
2412         Add ScrollableArea wrappers for a bunch of ScrollAnimator member functions
2413         https://bugs.webkit.org/show_bug.cgi?id=74951
2414
2415         Reviewed by Sam Weinig.
2416
2417         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
2418         (WebKit::BuiltInPDFView::paint):
2419         (WebKit::BuiltInPDFView::handleMouseEvent):
2420         (WebKit::BuiltInPDFView::handleMouseEnterEvent):
2421         (WebKit::BuiltInPDFView::handleMouseLeaveEvent):
2422
2423 2011-12-20  Brent Fulgham  <bfulgham@webkit.org>
2424
2425         [WinCairo] Unreviewed build fix.
2426
2427         * win/WebKit2CFLite.def: Add missing export declaration.
2428
2429 2011-12-20  Simon Hausmann  <simon.hausmann@nokia.com>
2430
2431         [Qt] Build fix for gcc used on WK2 build bot.
2432
2433         * UIProcess/qt/QtWebPagePolicyClient.cpp:
2434         (QtWebPagePolicyClient::decidePolicyForNavigationAction): Don't do case:
2435         with values outside the range of the type. Instead switch() on the int instead.
2436
2437 2011-12-20  Rafael Brandao  <rafael.lobo@openbossa.org>
2438
2439         [Qt] Extend QQuickWebview::navigationRequested API
2440         https://bugs.webkit.org/show_bug.cgi?id=73818
2441
2442         Reviewed by Simon Hausmann.
2443
2444         Added url of the originating frame on QWebNavigationRequest,
2445         accessible via 'request.originatingUrl' on QML. Download action
2446         was moved to experimental, so in order to use it you should set
2447         'request.action = WebViewExperimental.DownloadRequest' on QML.
2448
2449         * UIProcess/API/qt/qquickwebview_p.h:
2450         * UIProcess/API/qt/qwebnavigationrequest.cpp:
2451         (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
2452         (QWebNavigationRequest::QWebNavigationRequest):
2453         (QWebNavigationRequest::originatingUrl):
2454         * UIProcess/API/qt/qwebnavigationrequest_p.h:
2455         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
2456         Tests were modified a bit to reuse urls and also added a test case to check
2457         originating url once a request is done.
2458         * UIProcess/qt/QtWebPagePolicyClient.cpp:
2459         (QtWebPagePolicyClient::decidePolicyForNavigationAction):
2460         * UIProcess/qt/QtWebPagePolicyClient.h:
2461
2462 2011-12-20  Balazs Kelemen  <kbalazs@webkit.org>
2463
2464         [Qt] WK2 Debugging quirks need some improvement
2465         https://bugs.webkit.org/show_bug.cgi?id=74859
2466
2467         Reviewed by Simon Hausmann.
2468
2469         Improvements added to make debugging WebKit2 more
2470         confortable and efficient:
2471         1. Unify debugging quirks. From now all of them are controlled
2472         by the QT_WEBKIT2_DEBUG environment variable.
2473         2. Disable crash handlers for WebKitTestRunner if debugging quirks
2474         are used to make it possible to use postmortem debugging via core dumps
2475         which is extremely useful for debugging bugs triggered by layout tests.
2476         3. Disable test timeout for WebKitTestRunner if debugging quirks
2477         are used because that makes debugging impossible.
2478
2479         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2480         (WebKit::QtWebProcess::setupChildProcess):
2481         * WebProcess/qt/WebProcessMainQt.cpp:
2482         (WebKit::WebProcessMainQt):
2483
2484 2011-12-20  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2485
2486         [Qt][WK2]REGRESSION(r103310): It broke tst_QQuickWebView::loadNonexistentFileUrl() API test
2487         https://bugs.webkit.org/show_bug.cgi?id=74923
2488
2489         Rubber-stamped by Csaba Osztrogonác.
2490
2491         Fixing API usage after http://trac.webkit.org/changeset/103310.
2492
2493         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2494         (tst_QQuickWebView::loadNonexistentFileUrl):
2495
2496 2011-12-20  Simon Hausmann  <simon.hausmann@nokia.com>
2497
2498         [Qt] Favicon support should work with multiple web contexts
2499         https://bugs.webkit.org/show_bug.cgi?id=74922
2500
2501         Reviewed by Tor Arne Vestbø.
2502
2503         * UIProcess/API/qt/qquickwebview.cpp:
2504         (QQuickWebViewPrivate::initialize): Remove unnecessary use of QtWebContext::defaultContext(). There is
2505         already a member variable "context" which is the correct one.
2506         (QQuickWebViewPrivate::setIcon): Ditto.
2507         * UIProcess/API/qt/qwebiconimageprovider.cpp:
2508         (QWebIconImageProvider::requestImage): Extract the context id from the image id and use it to
2509         query the correct icon database.
2510         * UIProcess/qt/QtWebContext.cpp: Provide a mapping from id to qtwebcontext.
2511         (WebKit::generateContextID):
2512         (WebKit::QtWebContext::QtWebContext):
2513         (WebKit::QtWebContext::~QtWebContext):
2514         (WebKit::QtWebContext::contextByID):
2515         (WebKit::QtWebContext::initialize):
2516         * UIProcess/qt/QtWebContext.h:
2517         (WebKit::QtWebContext::context):
2518         (WebKit::QtWebContext::contextID):
2519         * UIProcess/qt/QtWebIconDatabaseClient.cpp:
2520         (QtWebIconDatabaseClient::QtWebIconDatabaseClient):
2521         (QtWebIconDatabaseClient::requestIconForPageURL): Store the context id in the icon url.
2522         * UIProcess/qt/QtWebIconDatabaseClient.h:
2523
2524 2011-12-20  Rafael Brandao  <rafael.lobo@openbossa.org>
2525
2526         [Qt][WK2] Implement favicon support
2527         https://bugs.webkit.org/show_bug.cgi?id=71082
2528
2529         Reviewed by Simon Hausmann.
2530
2531         Added attribute to QQuickWebView named "icon" that should be used
2532         as source for QQuickImage in order to display it. All images
2533         pointing to it will refresh when the icon is ready. We also use IDs
2534         to make it possible to handle different icons for the same page URL
2535         at different times (i.e. dynamically changing favicon).
2536
2537         IconDatabase storage lies on UIProcess and the synchronous call for
2538         the icon that happens on WebIconDatabase won't need to send any message
2539         to WebProcess. The part of IconDatabase on WebProcess handles the download
2540         of the resource whenever it is needed. Then the content downloaded is sent
2541         through IPC to the actual database, on UIProcess.
2542
2543         * Target.pri:
2544         * UIProcess/API/qt/qquickwebview.cpp:
2545         (QQuickWebViewPrivate::initialize):
2546         (QQuickWebViewPrivate::_q_onIconChangedForPageURL):
2547         (QQuickWebViewPrivate::setIcon):
2548         (QQuickWebView::icon):
2549         * UIProcess/API/qt/qquickwebview_p.h:
2550         * UIProcess/API/qt/qquickwebview_p_p.h:
2551         * UIProcess/API/qt/qwebiconimageprovider.cpp: Added.
2552         (QWebIconImageProvider::QWebIconImageProvider):
2553         (QWebIconImageProvider::~QWebIconImageProvider):
2554         (QWebIconImageProvider::requestImage):
2555         * UIProcess/API/qt/qwebiconimageprovider_p.h: Added.
2556         * UIProcess/WebContext.h:
2557         * UIProcess/WebIconDatabase.cpp:
2558         (WebKit::WebIconDatabase::synchronousIconURLForPageURL):
2559         (WebKit::WebIconDatabase::imageForPageURL): Added iconSize parameter
2560         and a default value for it to not break the old usage. The support for
2561         multiple sizes of favicons is still missing on WebCore.
2562         * UIProcess/WebIconDatabase.h:
2563         * UIProcess/qt/QtWebContext.cpp:
2564         (WebKit::QtWebContext::initialize):
2565         * UIProcess/qt/QtWebContext.h:
2566         (WebKit::QtWebContext::iconDatabase):
2567         * UIProcess/qt/QtWebIconDatabaseClient.cpp: Added.
2568         (toQtWebIconDatabaseClient):
2569         (QtWebIconDatabaseClient::QtWebIconDatabaseClient):
2570         (QtWebIconDatabaseClient::~QtWebIconDatabaseClient):
2571         (QtWebIconDatabaseClient::didChangeIconForPageURL):
2572         (QtWebIconDatabaseClient::iconImageForPageURL):
2573         (QtWebIconDatabaseClient::iconURLHashForPageURL):
2574         (QtWebIconDatabaseClient::requestIconForPageURL):
2575         (QtWebIconDatabaseClient::retainIconForPageURL):
2576         (QtWebIconDatabaseClient::releaseIconForPageURL):
2577         * UIProcess/qt/QtWebIconDatabaseClient.h: Added.
2578         * UIProcess/qt/QtWebPageLoadClient.cpp:
2579         (QtWebPageLoadClient::didStartProgress):
2580
2581 2011-12-20  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2582
2583         [Qt] Improve QQuickWebView error handling API
2584         https://bugs.webkit.org/show_bug.cgi?id=73815
2585
2586         Reviewed by Simon Hausmann.
2587
2588         Modifying loadFail signal to include the error description
2589         and changing the ErrorType enum to ErrorDomain, to stay aligned
2590         with ResourceError API itself.
2591
2592         * UIProcess/API/qt/qquickwebview_p.h:
2593         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml:
2594         * UIProcess/qt/QtWebPageLoadClient.cpp:
2595         (QtWebPageLoadClient::dispatchLoadFailed):
2596
2597 2011-12-19  Sam Weinig  <sam@webkit.org>
2598
2599         Add support for scrollLineDown: and scrollLineUp: NSResponder selectors
2600         https://bugs.webkit.org/show_bug.cgi?id=74907
2601
2602         Reviewed by Dan Bernstein.
2603
2604         * UIProcess/API/mac/WKView.mm:
2605         Add implementations for scrollLineDown: and scrollLineUp: using our
2606         fun macros.
2607
2608 2011-12-19  Sam Weinig  <sam@webkit.org>
2609
2610         More PlatformEvent cleanup
2611         https://bugs.webkit.org/show_bug.cgi?id=74831
2612
2613         Reviewed by Dan Bernstein.
2614
2615         * WebProcess/WebPage/WebPage.cpp:
2616         (WebKit::handleContextMenuEvent):
2617         Update to use new names, access style.
2618
2619 2011-12-16  Jon Lee  <jonlee@apple.com>
2620
2621         [WK2] Extend show notification API to include the source page
2622         https://bugs.webkit.org/show_bug.cgi?id=74751
2623         <rdar://problem/10514541>
2624
2625         Reviewed by John Sullivan.
2626
2627         We add the source page that dispatched the notification in the API for convenience. In order to include the page,
2628         we move the show() message sent by WebNotificationManager from WebNotificationManagerProxy to WebPageProxy.
2629
2630         * WebProcess/Notifications/WebNotificationManager.cpp:
2631         (WebKit::WebNotificationManager::show): We aim the message at WebPageProxy instead of WebNotificationManagerProxy.
2632
2633         * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Remove the show() message.
2634         * UIProcess/WebPageProxy.messages.in: Add a showNotification() message.
2635
2636         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2637         (WebKit::WebNotificationManagerProxy::show): This function is now called from the WebPageProxy.
2638         * UIProcess/Notifications/WebNotificationManagerProxy.h:
2639
2640         * UIProcess/API/C/WKNotificationProvider.h:
2641         * UIProcess/Notifications/WebNotificationProvider.cpp:
2642         (WebKit::WebNotificationProvider::show):
2643         * UIProcess/Notifications/WebNotificationProvider.h:
2644         * UIProcess/WebPageProxy.cpp:
2645         (WebKit::WebPageProxy::showNotification):
2646         * UIProcess/WebPageProxy.h:
2647
2648 2011-12-19  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2649
2650         [Qt][WK2] QWebDownloadItems are leaking
2651         https://bugs.webkit.org/show_bug.cgi?id=74618
2652
2653         Reviewed by Kenneth Rohde Christiansen.
2654
2655         QWebDownloadItems are leaking when WebProcess raises a
2656         download failure before sending didReceiveResponse back to UIProcess.
2657         This can happen when QtFileDownloader fails in determineFilename(), for instance.
2658         It happens when QtDownloadManager::downloadFailed() is reached
2659         and has an "empty" downloadItem, which means we never got to
2660         QtDownloadManager::downloadReceivedResponse(). At this point
2661         QQuickWebView::downloadRequested() signal hasn't been emitted and
2662         the downloadItem will have null parent. Therefore, it will leak
2663         unless we delete it ourselves.
2664
2665         * UIProcess/qt/QtDownloadManager.cpp:
2666         (WebKit::QtDownloadManager::downloadFailed):
2667
2668 2011-12-19  Anders Carlsson  <andersca@apple.com>
2669
2670         Send gesture events through the event dispatcher and scrolling coordinator
2671         https://bugs.webkit.org/show_bug.cgi?id=74879
2672
2673         Reviewed by Andreas Kling.
2674
2675         * UIProcess/WebPageProxy.cpp:
2676         (WebKit::WebPageProxy::handleGestureEvent):
2677         Use the EventDispatcher message.
2678
2679         * WebProcess/WebPage/EventDispatcher.cpp:
2680         (WebKit::EventDispatcher::gestureEvent):
2681         Try to send the event to the scrolling coordinator first before dispatching it on the main thread.
2682
2683         (WebKit::EventDispatcher::dispatchGestureEvent):
2684         Just call through to the WebPageProxy.
2685
2686         * WebProcess/WebPage/EventDispatcher.h:
2687         * WebProcess/WebPage/EventDispatcher.messages.in:
2688         * WebProcess/WebPage/WebPage.h:
2689         * WebProcess/WebPage/WebPage.messages.in:
2690         Move the GestureEvent message from WebPage to EventDispatcher.
2691
2692 2011-12-19  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2693
2694         [Qt] Setting QWebPreferences affect multiple WebViews
2695         https://bugs.webkit.org/show_bug.cgi?id=71559
2696
2697         Reviewed by Kenneth Rohde Christiansen.
2698
2699         The QWebPreferences are per WebView, but the actual implementation
2700         in WebKit2 make them per page group. Currently we share only one
2701         page group between all the views, so if we set preferences
2702         to one WebView the preferences are shared between them all, generating
2703         unexpected behavior. This patch fixes this by making each WebView have
2704         its own page group.
2705
2706         * UIProcess/API/qt/qquickwebview.cpp:
2707         (QQuickWebViewPrivate::QQuickWebViewPrivate):
2708         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
2709
2710 2011-12-19  Eric Carlson  <eric.carlson@apple.com>
2711
2712         Enable <track> for Mac build
2713         https://bugs.webkit.org/show_bug.cgi?id=74838
2714
2715         Reviewed by Darin Adler.
2716
2717         * Configurations/FeatureDefines.xcconfig:
2718
2719 2011-12-19  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2720
2721         [Qt] [WK2] Fix build error due to unused variables
2722         https://bugs.webkit.org/show_bug.cgi?id=74862
2723
2724         Reviewed by Kenneth Rohde Christiansen.
2725
2726         * UIProcess/qt/QtWebPageEventHandler.cpp:
2727         (QtWebPageEventHandler::inputMethodEvent):
2728
2729 2011-12-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2730
2731         [Qt] Add methods for setting, cancelling and confirming the composition
2732
2733         Reviewed by Simon Hausmann.
2734
2735         * UIProcess/WebPageProxy.h:
2736         * UIProcess/qt/WebPageProxyQt.cpp:
2737         (WebKit::WebPageProxy::setComposition):
2738         (WebKit::WebPageProxy::confirmComposition):
2739         (WebKit::WebPageProxy::cancelComposition):
2740         * WebProcess/WebPage/WebPage.h:
2741         * WebProcess/WebPage/WebPage.messages.in:
2742         * WebProcess/WebPage/qt/WebPageQt.cpp:
2743         (WebKit::targetFrameForEditing):
2744         (WebKit::WebPage::confirmComposition):
2745         (WebKit::WebPage::setComposition):
2746         (WebKit::WebPage::cancelComposition):
2747
2748 2011-12-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2749
2750         First stab at upstreaming our virtual keyboard code
2751
2752         Reviewed by Simon Hausmann.
2753
2754         Add basic implementation of inputMethodEvent
2755
2756         * UIProcess/qt/QtWebPageEventHandler.cpp:
2757         (QtWebPageEventHandler::handleEvent):
2758         (QtWebPageEventHandler::inputMethodEvent):
2759         * UIProcess/qt/QtWebPageEventHandler.h:
2760
2761 2011-12-19  Simon Hausmann  <simon.hausmann@nokia.com>
2762
2763         [Qt][WK2] Add support for modal event loop processing for WTR
2764         https://bugs.webkit.org/show_bug.cgi?id=74852
2765
2766         Reviewed by Kenneth Rohde Christiansen.
2767
2768         Add support for nested event loops, used by WebPage::runModal().
2769
2770         * Platform/qt/RunLoopQt.cpp:
2771         (RunLoop::run):
2772         (RunLoop::stop):
2773
2774 2011-12-18  Sam Weinig  <sam@webkit.org>
2775
2776         Another attempt to fix the windows build.
2777
2778         * Platform/win/WorkQueueWin.cpp:
2779         (WorkQueue::performWorkOnRegisteredWorkThread):
2780         (WorkQueue::dispatch):
2781
2782 2011-12-18  Sam Weinig  <sam@webkit.org>
2783
2784         Try to fix the windows build.
2785
2786         * Platform/win/WorkQueueWin.cpp:
2787         (WorkQueue::performWorkOnRegisteredWorkThread):
2788
2789 2011-12-18  Sam Weinig  <sam@webkit.org>
2790
2791         Remove now unused WorkItem.h
2792         https://bugs.webkit.org/show_bug.cgi?id=74818
2793
2794         Reviewed by Andreas Kling.
2795
2796         * GNUmakefile.am:
2797         * Platform/CoreIPC/Connection.cpp:
2798         * Platform/RunLoop.cpp:
2799         * Platform/RunLoop.h:
2800         * Platform/WorkItem.h: Removed.
2801         * Platform/gtk/RunLoopGtk.cpp:
2802         * Platform/mac/RunLoopMac.mm:
2803         * Platform/mac/WorkQueueMac.cpp:
2804         (WorkQueue::platformInvalidate):
2805         * Platform/qt/RunLoopQt.cpp:
2806         * Platform/win/RunLoopWin.cpp:
2807         * Target.pri:
2808         * UIProcess/ResponsivenessTimer.cpp:
2809         * WebKit2.xcodeproj/project.pbxproj:
2810         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2811         * win/WebKit2.vcproj:
2812
2813 2011-12-18  Anders Carlsson  <andersca@apple.com>
2814
2815         Set the main frame view scroll position asynchronously
2816         https://bugs.webkit.org/show_bug.cgi?id=74823
2817
2818         Reviewed by Sam Weinig.
2819
2820         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2821         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2822         Don't make the background red.
2823
2824 2011-12-18  Sam Weinig  <sam@webkit.org>
2825
2826         Move timestamp down from PlatformEvent subclasses to the base class
2827         https://bugs.webkit.org/show_bug.cgi?id=74805
2828
2829         Reviewed by Anders Carlsson.
2830
2831         * Shared/WebEventConversion.cpp:
2832         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2833         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
2834         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
2835         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
2836         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
2837
2838 2011-12-18  Anders Carlsson  <andersca@apple.com>
2839
2840         Add a scrolling thread to the scrolling coordinator
2841         https://bugs.webkit.org/show_bug.cgi?id=74814
2842
2843         Reviewed by Andreas Kling.
2844
2845         Check if the scrolling coordinator can handle the wheel event before dispatching it
2846         to the main thread.
2847
2848         * WebProcess/WebPage/EventDispatcher.cpp:
2849         (WebKit::EventDispatcher::wheelEvent):
2850
2851 2011-12-18  Anders Carlsson  <andersca@apple.com>
2852
2853         EventDispatcher should keep track of all scrolling coordinators
2854         https://bugs.webkit.org/show_bug.cgi?id=74810
2855
2856         Reviewed by Andreas Kling.
2857
2858         * WebProcess/WebPage/EventDispatcher.cpp:
2859         (WebKit::EventDispatcher::addScrollingCoordinatorForPage):
2860         Get the scrolling coordinator from the WebCore page and add it to the map.
2861
2862         (WebKit::EventDispatcher::removeScrollingCoordinatorForPage):
2863         Remove the scrolling coordinator from the map.
2864
2865         (WebKit::EventDispatcher::sendDidHandleEvent):
2866         Add a new helper function, currently unused.
2867
2868         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2869         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2870         Add the scrolling coordinator.
2871
2872         (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
2873         Remove the scrolling coordinator.
2874
2875         * WebProcess/WebProcess.h:
2876         (WebKit::WebProcess::eventDispatcher):
2877         Add a getter.
2878
2879 2011-12-16  Anders Carlsson  <andersca@apple.com>
2880
2881         Move everyone off of WorkItem
2882         https://bugs.webkit.org/show_bug.cgi?id=74773
2883
2884         Reviewed by Darin Adler.
2885
2886         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
2887         (CoreIPC::Connection::open):
2888         (CoreIPC::Connection::setShouldCloseConnectionOnProcessTermination):
2889         * Platform/CoreIPC/win/ConnectionWin.cpp:
2890         (CoreIPC::Connection::open):
2891         * Platform/RunLoop.cpp:
2892         (RunLoop::performWork):
2893         (RunLoop::dispatch):
2894         * Platform/RunLoop.h:
2895         * Platform/WorkQueue.cpp:
2896         * Platform/WorkQueue.h:
2897         (WorkQueue::WorkItemWin::function):
2898         * Platform/gtk/WorkQueueGtk.cpp:
2899         (WorkQueue::EventSource::EventSource):
2900         (WorkQueue::EventSource::executeEventSource):
2901         (WorkQueue::registerEventSourceHandler):
2902         (WorkQueue::dispatchOnSource):
2903         (WorkQueue::dispatch):
2904         (WorkQueue::dispatchAfterDelay):
2905         (WorkQueue::dispatchOnTermination):
2906         * Platform/mac/WorkQueueMac.cpp:
2907         (WorkQueue::executeFunction):
2908         (WorkQueue::dispatch):
2909         (WorkQueue::dispatchAfterDelay):
2910         * Platform/qt/WorkQueueQt.cpp:
2911         (WorkQueue::WorkItemQt::WorkItemQt):
2912         (WorkQueue::WorkItemQt::~WorkItemQt):
2913         (WorkQueue::WorkItemQt::execute):
2914         (WorkQueue::registerSocketEventHandler):
2915         (WorkQueue::dispatch):
2916         (WorkQueue::dispatchAfterDelay):
2917         (WorkQueue::dispatchOnTermination):
2918         * Platform/win/RunLoopWin.cpp:
2919         (RunLoop::wakeUp):
2920         * Platform/win/WorkQueueWin.cpp:
2921         (WorkQueue::WorkItemWin::WorkItemWin):
2922         (WorkQueue::WorkItemWin::create):
2923         (WorkQueue::HandleWorkItem::HandleWorkItem):
2924         (WorkQueue::HandleWorkItem::createByAdoptingHandle):
2925         (WorkQueue::registerHandle):
2926         (WorkQueue::dispatch):
2927         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2928         (WebKit::ProcessLauncher::launchProcess):
2929         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2930         (WebKit::ProcessLauncher::launchProcess):
2931         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
2932         (WebKit::ProcessLauncher::launchProcess):
2933         * WebProcess/mac/CoreIPCClientRunLoop.mm:
2934         (WebKit::callOnCoreIPCClientRunLoopAndWait):
2935
2936 2011-12-17  Sam Weinig  <sam@webkit.org>
2937
2938         Make PlatformTouchEvent inherit from PlatformEvent
2939         https://bugs.webkit.org/show_bug.cgi?id=74777
2940
2941         Reviewed by Andreas Kling.
2942
2943         * Shared/WebEventConversion.cpp:
2944         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
2945         Add PlatformEvent prefix to enum types.
2946
2947 2011-12-16  Anders Carlsson  <andersca@apple.com>
2948
2949         Convert more WorkItems over to WTF::Functions
2950         https://bugs.webkit.org/show_bug.cgi?id=74770
2951
2952         Reviewed by Andreas Kling.
2953
2954         * Platform/WorkQueue.cpp:
2955         (WorkQueue::dispatchAfterDelay):
2956         * Platform/WorkQueue.h:
2957         * Shared/ChildProcess.cpp:
2958         (WebKit::ChildProcess::didCloseOnConnectionWorkQueue):
2959         * UIProcess/Launcher/ThreadLauncher.cpp:
2960         (WebKit::ThreadLauncher::launchThread):
2961         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2962         (WebKit::ProcessLauncher::launchProcess):
2963         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2964         (WebKit::NetscapePlugin::pluginThreadAsyncCall):
2965         * WebProcess/Plugins/PluginView.cpp:
2966         (WebKit::derefPluginView):
2967         (WebKit::PluginView::unprotectPluginFromDestruction):
2968
2969 2011-12-16  Mark Hahnenberg  <mhahnenberg@apple.com>
2970
2971         Windows test fix
2972
2973         Unreviewed test fix. All Windows tests were crashing when objects who were pointing to 
2974         static data members across DLL boundaries were getting garbage in their pointers.
2975
2976         * win/WebKit2.def:
2977
2978 2011-12-16  Ryosuke Niwa  <rniwa@webkit.org>
2979
2980         Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step
2981         https://bugs.webkit.org/show_bug.cgi?id=74748
2982
2983         Reviewed by Eric Seidel.
2984
2985         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2986         (WebKit::WebEditorClient::registerUndoStep):
2987         (WebKit::WebEditorClient::registerRedoStep):
2988         * WebProcess/WebCoreSupport/WebEditorClient.h:
2989
2990 2011-12-16  Anders Carlsson  <andersca@apple.com>
2991
2992         Add a pretty dumb tile cache to WebTileCacheLayer
2993         https://bugs.webkit.org/show_bug.cgi?id=74753
2994
2995         Reviewed by Simon Fraser.
2996
2997         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2998         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2999         Always do a layout here, to prevent an ASSERT(!needsLayout()) when painting.
3000
3001 2011-12-16  Anders Carlsson  <andersca@apple.com>
3002
3003         TiledCoreAnimationDrawingArea should enable the scrolling coordinator
3004         https://bugs.webkit.org/show_bug.cgi?id=74724
3005
3006         Reviewed by Adam Roben.
3007
3008         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3009         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
3010
3011 2011-12-16  Sam Weinig  <sam@webkit.org>
3012
3013         Give PlatformEvents a base class
3014         https://bugs.webkit.org/show_bug.cgi?id=74685
3015
3016         Reviewed by Anders Carlsson.
3017
3018         Add a base class for PlatformMouseEvent, PlatformKeyboardEvent, PlatformWheelEvent
3019         and PlatformGestureEvent and move Type enumeration and modifiers down to it.
3020
3021         * Shared/WebEventConversion.cpp:
3022         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
3023         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
3024         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
3025         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
3026         * WebKit2.xcodeproj/project.pbxproj:
3027         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
3028         (WebKit::WebEditorClient::handleKeyboardEvent):
3029         * WebProcess/WebPage/WebPage.cpp:
3030         (WebKit::handleMouseEvent):
3031         (WebKit::WebPage::setInitialFocus):
3032         (WebKit::WebPage::handleEditingKeyboardEvent):
3033         (WebKit::WebPage::dragEnded):
3034         * WebProcess/WebPage/mac/WebPageMac.mm:
3035         (WebKit::WebPage::executeKeypressCommandsInternal):
3036         (WebKit::WebPage::handleEditingKeyboardEvent):
3037
3038 2011-12-16  Ryosuke Niwa  <rniwa@webkit.org>
3039
3040         Only EditCommandComposition should implement unapply and reapply
3041         https://bugs.webkit.org/show_bug.cgi?id=74490
3042
3043         Reviewed by Eric Seidel.
3044
3045         Renamed WebEditCommand to WebUndoStep and made necessary changes.
3046         Everything on WebProcess side should have the correct name now.
3047
3048         Names in the proxy and UIProcess are to be updated in a follow up.
3049
3050         * CMakeLists.txt:
3051         * GNUmakefile.am:
3052         * Target.pri:
3053         * WebKit2.xcodeproj/project.pbxproj:
3054         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3055         (WebKit::WebEditorClient::registerCommandForUndo):
3056         (WebKit::WebEditorClient::registerCommandForRedo):
3057         * WebProcess/WebCoreSupport/WebEditorClient.h:
3058         * WebProcess/WebPage/WebEditCommand.cpp: Removed.
3059         * WebProcess/WebPage/WebEditCommand.h: Removed.
3060         * WebProcess/WebPage/WebPage.cpp:
3061         (WebKit::WebPage::webUndoStep):
3062         (WebKit::WebPage::addWebUndoStep):
3063         (WebKit::WebPage::removeWebEditCommand):
3064         (WebKit::WebPage::unapplyEditCommand):
3065         (WebKit::WebPage::reapplyEditCommand):
3066         * WebProcess/WebPage/WebPage.h:
3067         * WebProcess/WebPage/WebUndoStep.cpp: Copied from Source/WebKit2/WebProcess/WebPage/WebEditCommand.cpp.
3068         (WebKit::generateUndoStep):
3069         (WebKit::WebUndoStep::create):
3070         * WebProcess/WebPage/WebUndoStep.h: Copied from Source/WebKit2/WebProcess/WebPage/WebEditCommand.h.
3071         (WebKit::WebUndoStep::entry):
3072         (WebKit::WebUndoStep::entryID):
3073         (WebKit::WebUndoStep::WebUndoStep):
3074         * win/WebKit2.vcproj:
3075
3076 2011-12-16  Simon Hausmann  <simon.hausmann@nokia.com>
3077
3078         [Qt] Eliminate dependency to QUndoStack
3079         https://bugs.webkit.org/show_bug.cgi?id=74691
3080
3081         Reviewed by Kenneth Rohde Christiansen.
3082
3083         Replaced the QUndoStack with two vectors. When calling unapply()
3084         on the edit command proxy, it will automatically re-register itself
3085         in the redo stack.
3086
3087         * UIProcess/qt/QtWebUndoController.cpp:
3088         (QtWebUndoController::registerEditCommand):
3089         (QtWebUndoController::clearAllEditCommands):
3090         (QtWebUndoController::canUndoRedo):
3091         (QtWebUndoController::executeUndoRedo):
3092         * UIProcess/qt/QtWebUndoController.h:
3093
3094 2011-12-16  Rafael Brandao  <rafael.lobo@openbossa.org>
3095
3096         [Qt][WK2] Move webView.page into experimental
3097         https://bugs.webkit.org/show_bug.cgi?id=74406
3098
3099         Reviewed by Simon Hausmann.
3100
3101         * UIProcess/API/qt/qquickwebview.cpp:
3102         (QQuickWebViewExperimental::page):
3103         * UIProcess/API/qt/qquickwebview_p.h:
3104         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3105         (tst_QQuickWebView::accessPage):
3106
3107 2011-12-16  Mark Hahnenberg  <mhahnenberg@apple.com>
3108
3109         De-virtualize destructors
3110         https://bugs.webkit.org/show_bug.cgi?id=74331
3111
3112         Reviewed by Geoffrey Garen.
3113
3114         * WebProcess/Plugins/Netscape/JSNPMethod.cpp: Add trivial destructor assert.
3115         * WebProcess/Plugins/Netscape/JSNPObject.cpp: Add static destroy.
3116         (WebKit::JSNPObject::destroy):
3117         * WebProcess/Plugins/Netscape/JSNPObject.h:
3118         * win/WebKit2.def: Add/remove necessary symbols.
3119         * win/WebKit2CFLite.def: Ditto.
3120
3121 2011-12-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3122
3123         [GTK] Use bit field for bool members of WebKitWindowPropertiesPrivate
3124         https://bugs.webkit.org/show_bug.cgi?id=74713
3125
3126         Reviewed by Gustavo Noronha Silva.
3127
3128         Most of the members are bools, so it reduces the memory footprint.
3129
3130         * UIProcess/API/gtk/WebKitWindowProperties.cpp:
3131
3132 2011-12-16  Carlos Garcia Campos  <cgarcia@igalia.com>
3133
3134         [GTK] Window frame should be 0x0 when the toplevel window is not visible
3135         https://bugs.webkit.org/show_bug.cgi?id=74709
3136
3137         Reviewed by Gustavo Noronha Silva.
3138
3139         * UIProcess/API/gtk/WebKitUIClient.cpp:
3140         (getWindowFrame): Check also whether the toplevel is visible
3141         before getting its size and position.
3142
3143 2011-12-16  Michael Bruning  <michael.bruning@nokia.com>
3144
3145         [qt][wk2] Viewport info panel shows wrong current scale
3146         https://bugs.webkit.org/show_bug.cgi?id=74613
3147
3148         Reviewed by Kenneth Rohde Christiansen.
3149
3150         * UIProcess/API/qt/qwebviewportinfo.cpp:
3151         (QWebViewportInfo::currentScale): Added division by devicePixelRatio. Also
3152         added emission of currenScaleUpdated signal when the viewport constraints
3153         have been updated.
3154         (QWebViewportInfo::didUpdateViewportConstraints):
3155         * UIProcess/API/qt/qwebviewportinfo_p.h: Changed return type of
3156         currentScale to QVariant as it depends on the viewport interaction engine
3157         now.
3158         * UIProcess/qt/QtViewportInteractionEngine.cpp:
3159         (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary): Changed
3160         to use currentCSSScale for getting the current css scale.
3161         (WebKit::QtViewportInteractionEngine::currentCSSScale): Added.
3162         * UIProcess/qt/QtViewportInteractionEngine.h: Added method currentCSSScale.
3163
3164 2011-12-15  Martin Robinson  <mrobinson@igalia.com>
3165
3166         Fix 'make dist' in preparation for the GTK+ release.
3167
3168         * GNUmakefile.am: Add missing header.
3169
3170 2011-12-15  Anders Carlsson  <andersca@apple.com>
3171
3172         Add support for accelerated compositing to the tiled Core Animation drawing area
3173         https://bugs.webkit.org/show_bug.cgi?id=74675
3174
3175         Reviewed by Andreas Kling.
3176
3177         Add a layer flush scheduler and get rid of the content layer since WebCore will manage that for us.
3178
3179         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3180         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3181         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
3182         (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
3183         (WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplay):
3184         (WebKit::TiledCoreAnimationDrawingArea::scroll):
3185         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
3186         (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync):
3187         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3188         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
3189
3190 2011-12-15  Sheriff Bot  <webkit.review.bot@gmail.com>
3191
3192         Unreviewed, rolling out r102652 and r102717.
3193         http://trac.webkit.org/changeset/102652
3194         http://trac.webkit.org/changeset/102717
3195         https://bugs.webkit.org/show_bug.cgi?id=74674
3196
3197         Broke too many webs. (Requested by kling on #webkit).
3198
3199         * UIProcess/API/mac/WKView.mm:
3200         (-[WKView _updateWindowAndViewFrames]):
3201         * UIProcess/WebPageProxy.h:
3202         * UIProcess/mac/WebPageProxyMac.mm:
3203         (WebKit::WebPageProxy::windowAndViewFramesChanged):
3204         * WebProcess/Plugins/PluginView.cpp:
3205         (WebKit::PluginView::windowAndViewFramesChanged):
3206         * WebProcess/Plugins/PluginView.h:
3207         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3208         (WebKit::WebChromeClient::windowRect):
3209         * WebProcess/WebPage/WebPage.cpp:
3210         (WebKit::WebPage::windowAndViewFramesChanged):
3211         * WebProcess/WebPage/WebPage.h:
3212         (WebKit::WebPage::windowFrameInScreenCoordinates):
3213         (WebKit::WebPage::viewFrameInWindowCoordinates):
3214         (WebKit::WebPage::accessibilityPosition):
3215         * WebProcess/WebPage/WebPage.messages.in:
3216         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
3217         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
3218
3219 2011-12-15  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
3220
3221         [GTK] New API test for WindowProperties fails
3222         https://bugs.webkit.org/show_bug.cgi?id=74630
3223
3224         Reviewed by Martin Robinson.
3225
3226         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
3227         (WindowProperties::viewReadyToShow): assert each member to make
3228         assertion error messages more useful, and avoid asserting x and y,
3229         since we are getting bad values from WebCore, for some reason.
3230         (testWebViewWindowProperties): use smaller values that fit inside the
3231         800x600 screen used by the bots.
3232
3233 2011-12-15  Anders Carlsson  <andersca@apple.com>
3234
3235         EventDispatcher should handle wheel events on the connection queue
3236         https://bugs.webkit.org/show_bug.cgi?id=74627
3237
3238         Reviewed by Andreas Kling.
3239
3240         Send wheel events to the EventDispatcher, which handles them on the connection work queue, and
3241         immediately bounces them to the main thread (for now).
3242
3243         * UIProcess/WebPageProxy.cpp:
3244         (WebKit::WebPageProxy::handleWheelEvent):
3245         (WebKit::WebPageProxy::didReceiveEvent):
3246         * WebProcess/WebPage/EventDispatcher.cpp:
3247         (WebKit::EventDispatcher::wheelEvent):
3248         (WebKit::EventDispatcher::dispatchWheelEvent):
3249         * WebProcess/WebPage/EventDispatcher.h:
3250         * WebProcess/WebPage/EventDispatcher.messages.in:
3251         * WebProcess/WebPage/WebPage.h:
3252
3253 2011-12-15  Jon Lee  <jonlee@apple.com>
3254
3255         [WK2] Extend WebNotification to include its origin
3256         https://bugs.webkit.org/show_bug.cgi?id=74615
3257         <rdar://problem/10587164>
3258
3259         Reviewed by Sam Weinig.
3260
3261         * Shared/API/c/WKSecurityOrigin.h: Expose API that converts the security origin to database
3262         identifier.
3263         * Shared/API/c/WKSecurityOrigin.cpp:
3264         (WKSecurityOriginCopyDatabaseIdentifier):
3265
3266         * UIProcess/Notifications/WebNotification.h: Extend WebNotification to include the origin.
3267         (WebKit::WebNotification::create):
3268         (WebKit::WebNotification::origin):
3269         * UIProcess/Notifications/WebNotification.cpp: Remove unneeded encode() and decode() functions.
3270         (WebKit::WebNotification::WebNotification):
3271
3272         * UIProcess/API/C/WKNotification.h: Expose WebNotification's origin().
3273         * UIProcess/API/C/WKNotification.cpp:
3274         (WKNotificationGetSecurityOrigin):
3275
3276         * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Update show() to include the
3277         origin of the notification.
3278         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
3279         (WebKit::WebNotificationManagerProxy::show):
3280         * UIProcess/Notifications/WebNotificationManagerProxy.h:
3281         * WebProcess/Notifications/WebNotificationManager.cpp:
3282         (WebKit::WebNotificationManager::show): Pass the notification's exec context's origin as
3283         identifier.
3284
3285 2011-12-15  Rafael Brandao  <rafael.lobo@openbossa.org>
3286
3287         [Qt][WK2] Add test for download policy on navigation request
3288         https://bugs.webkit.org/show_bug.cgi?id=74541
3289
3290         Reviewed by Tor Arne Vestbø.
3291
3292         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
3293         * UIProcess/API/qt/tests/qmltests/WebView/tst_download.qml: Make it wait for a
3294         downloadFinished signal to finish the test.
3295
3296 2011-12-15  Anders Carlsson  <andersca@apple.com>
3297
3298         Move WorkQueue Mach handlers over to WTF::Function
3299         https://bugs.webkit.org/show_bug.cgi?id=74620
3300
3301         Reviewed by Sam Weinig.
3302
3303         * Platform/CoreIPC/mac/ConnectionMac.cpp:
3304         (CoreIPC::Connection::open):
3305         (CoreIPC::Connection::initializeDeadNameSource):
3306         * Platform/WorkQueue.h:
3307         * Platform/mac/WorkQueueMac.cpp:
3308         (WorkQueue::EventSource::EventSource):
3309         (WorkQueue::EventSource::eventHandler):
3310         (WorkQueue::registerMachPortEventHandler):
3311
3312 2011-12-14  Anders Carlsson  <andersca@apple.com>
3313
3314         Add WTF::Function to wtf/Forward.h
3315         https://bugs.webkit.org/show_bug.cgi?id=74576
3316
3317         Reviewed by Adam Roben.
3318
3319         * Platform/RunLoop.h:
3320         * Platform/WorkQueue.h:
3321         Remove forward declarations and just include wtf/Forward.h.
3322
3323 2011-12-15  Rafael Brandao  <rafael.lobo@openbossa.org>
3324
3325         [Qt][WK2] Move WebPreferences into experimental
3326         https://bugs.webkit.org/show_bug.cgi?id=74404
3327
3328         Reviewed by Tor Arne Vestbø.
3329
3330         * UIProcess/API/qt/qquickwebview.cpp:
3331         (QQuickWebViewExperimental::preferences):
3332         * UIProcess/API/qt/qquickwebview_p.h:
3333         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
3334         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
3335
3336 2011-12-15  Carlos Garcia Campos  <cgarcia@igalia.com>
3337
3338         [GTK] Add WebKitWindowProperties to WebKit2 GTK+ API
3339         https://bugs.webkit.org/show_bug.cgi?id=74595
3340
3341         Reviewed by Gustavo Noronha Silva.
3342
3343         * GNUmakefile.am: Add new files to compilation.
3344         * UIProcess/API/gtk/WebKitUIClient.cpp:
3345         (createNewPage): Pass the dictionary containing the window
3346         features to webkitWebViewCreateNewPage().
3347         (toolbarsAreVisible): Return
3348         WebKitWindowProperties:toolbar-visible.
3349         (setToolbarsAreVisible): Set
3350         WebKitWindowProperties:toolbar-visible.
3351         (menuBarIsVisible): Return WebKitWindowProperties:menu-visible.
3352         (setMenuBarIsVisible): Set WebKitWindowProperties:menu-visible.
3353         (statusBarIsVisible): Return
3354         WebKitWindowProperties:status-visible.
3355         (setStatusBarIsVisible): Set
3356         WebKitWindowProperties:status-visible.
3357         (isResizable): Return WebKitWindowProperties:resizable.
3358         (setIsResizable): Set WebKitWindowProperties:resizable.
3359         (getWindowFrame): Return WebKitWindowProperties:geometry.
3360         (setWindowFrame): Set WebKitWindowProperties:geometry.
3361         (webkitUIClientAttachUIClientToPage): Initialize the UI client for
3362         the given page.
3363         * UIProcess/API/gtk/WebKitWebView.cpp:
3364         (webkit_web_view_init): Create a WebKitWindowProperties object for
3365         the view.
3366         (webkit_web_view_class_init):
3367         (webkitWebViewCreateNewPage): Update the WebKitWindowProperties
3368         object using the window features dictionary.
3369         (webkit_web_view_get_window_properties): Return the
3370         WebKitWindowProperties object of the view.
3371         * UIProcess/API/gtk/WebKitWebView.h:
3372         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
3373         * UIProcess/API/gtk/WebKitWindowProperties.cpp: Added.
3374         (webkitWindowPropertiesFinalize):
3375         (webkitWindowPropertiesGetProperty):
3376         (webkitWindowPropertiesSetProperty):
3377         (webkit_window_properties_class_init):
3378         (webkit_window_properties_init):
3379         (webkitWindowPropertiesCreate): Create a new
3380         WebKitWindowProperties object.
3381         (webkitWindowPropertiesSetGeometry):
3382         (webkitWindowPropertiesSetToolbarVisible):
3383         (webkitWindowPropertiesSetMenubarVisible):
3384         (webkitWindowPropertiesSetStatusbarVisible):
3385         (webkitWindowPropertiesSetLocationbarVisible):
3386         (webkitWindowPropertiesSetScrollbarsVisible):
3387         (webkitWindowPropertiesSetResizable):
3388         (webkitWindowPropertiesSetFullscreen):
3389         (webkitWindowPropertiesUpdateFromWKWindowFeatures): Parse the
3390         window features dictionary and update the WebKitWindowProperties
3391         object accordingly.
3392         (webkit_window_properties_get_geometry):
3393         (webkit_window_properties_get_toolbar_visible):
3394         (webkit_window_properties_get_statusbar_visible):
3395         (webkit_window_properties_get_scrollbars_visible):
3396         (webkit_window_properties_get_menubar_visible):
3397         (webkit_window_properties_get_locationbar_visible):
3398         (webkit_window_properties_get_resizable):
3399         (webkit_window_properties_get_fullscreen):
3400         * UIProcess/API/gtk/WebKitWindowProperties.h: Added.
3401         * UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h: Copied from Source/WebKit2/UIProcess/API/gtk/WebKitWebViewPrivate.h.
3402         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
3403         WebKitWindowProperties.
3404         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
3405         * UIProcess/API/gtk/docs/webkit2gtk.types: Add
3406         webkit_window_properties_get_type.
3407         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
3408         (WindowProperties::windowPropertiesNotifyCallback):
3409         (WindowProperties::viewReadyToShow):
3410         (WindowProperties::viewCreate):
3411         (WindowProperties::setExpectedWindowProperties):
3412         (testWebViewWindowProperties):
3413         (beforeAll):
3414         * UIProcess/API/gtk/webkit2.h: Include WebKitWindowProperties.h.
3415         * UIProcess/WebUIClient.cpp:
3416         (WebKit::WebUIClient::createNewPage): Add also "locationBarVisible"
3417         to the window features dictionary.
3418
3419 2011-12-15  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3420
3421         [Qt] [WK2] Remove QtWebPageProxy
3422         https://bugs.webkit.org/show_bug.cgi?id=74540
3423
3424         Reviewed by Kenneth Rohde Christiansen.
3425
3426         Move WebPageProxy* to QQuickWebViewPrivate. The remaining functions in
3427         QtWebPageProxy were simple wrappers to WebKit functionality (text zoom, page zoom
3428         and user agent setting). Since those wrappers are unused, they were removed. The
3429         signal in the class was also unused.
3430
3431         This patch also remove the code from WebContextMenuProxyQt, it was remains of a
3432         previous QMenu-based implementation. We want to rewrite this code for QML anyway,
3433         so I reverted to an empty state.
3434
3435         Farewell, QtWebPageProxy!
3436
3437         * Target.pri:
3438         * UIProcess/API/qt/qquickwebpage.cpp:
3439         * UIProcess/API/qt/qquickwebpage_p.h:
3440         * UIProcess/API/qt/qquickwebview.cpp:
3441         (QQuickWebViewPrivate::~QQuickWebViewPrivate):
3442         (QQuickWebViewPrivate::initialize):
3443         (QQuickWebViewPrivate::processDidCrash):
3444         (QQuickWebViewPrivate::createDrawingAreaProxy):
3445         (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
3446         (QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged):
3447         (QQuickWebViewPrivate::_q_onVisibleChanged):
3448         (QQuickWebViewPrivate::updateViewportSize):
3449         (QQuickWebViewPrivate::computeViewportConstraints):
3450         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
3451         (QQuickWebViewPrivate::setNavigatorQtObjectEnabled):
3452         (QQuickWebViewExperimental::postMessage):
3453         (QQuickWebView::load):
3454         (QQuickWebView::goBack):
3455         (QQuickWebView::goForward):
3456         (QQuickWebView::stop):
3457         (QQuickWebView::reload):
3458         (QQuickWebView::url):
3459         (QQuickWebView::canGoBack):
3460         (QQuickWebView::canGoForward):
3461         (QQuickWebView::loading):
3462         (QQuickWebView::canReload):
3463         (QQuickWebView::title):
3464         (QQuickWebView::pageRef):
3465         (QQuickWebView::loadHtml):
3466         * UIProcess/API/qt/qquickwebview_p.h:
3467         * UIProcess/API/qt/qquickwebview_p_p.h:
3468         * UIProcess/API/qt/qwebnavigationhistory_p_p.h:
3469         * UIProcess/API/qt/qwebpreferences.cpp:
3470         (QWebPreferencesPrivate::preferencesRef):
3471         * UIProcess/PageClient.h:
3472         * UIProcess/qt/QtPageClient.cpp:
3473         (QtPageClient::QtPageClient):
3474         (QtPageClient::initialize):
3475         (QtPageClient::createPopupMenuProxy):
3476         (QtPageClient::createContextMenuProxy):
3477         * UIProcess/qt/QtPageClient.h:
3478         * UIProcess/qt/QtWebPageProxy.cpp: Removed.
3479         * UIProcess/qt/QtWebPageProxy.h: Removed.
3480         * UIProcess/qt/WebContextMenuProxyQt.cpp:
3481         (WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt):
3482         (WebKit::WebContextMenuProxyQt::create):
3483         (WebKit::WebContextMenuProxyQt::showContextMenu):
3484         (WebKit::WebContextMenuProxyQt::hideContextMenu):
3485         * UIProcess/qt/WebContextMenuProxyQt.h:
3486
3487 2011-12-15  Simon Hausmann  <simon.hausmann@nokia.com>
3488
3489         [WK2] Eliminate unnecessary GTK/QT ifdefs for shared memory implementation
3490         ht