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