3999cd6b4e063f2155f757de193b76f25a914161
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-09-02  Balazs Kelemen  <kbalazs@webkit.org>
2
3         [Qt][WK2] Cannot gathering glyph page statistics
4         https://bugs.webkit.org/show_bug.cgi?id=67475
5
6         Rubber stamped by Csaba Osztrogonác.
7
8         Fix Qt WK2 build without having QRAWFONT.
9
10         * WebProcess/WebProcess.cpp:
11         (WebKit::WebProcess::getWebCoreStatistics):
12
13 2011-09-02  Mark Rowe  <mrowe@apple.com>
14
15         <http://webkit.org/b/67467> WebProcessProxy::secItemCopyMatching / WebProcessProxy::secItemAdd
16         leak the results of the APIs they wrap.
17
18         Reviewed by Dan Bernstein.
19
20         * UIProcess/mac/WebProcessProxyMac.mm:
21         (WebKit::WebProcessProxy::secItemCopyMatching): Adopt the result of SecItemCopyMatching in to a
22         RetainPtr to ensure it gets released at the appropriate time.
23         (WebKit::WebProcessProxy::secItemAdd): Ditto for SecItemAdd.
24
25 2011-09-01  Ada Chan  <adachan@apple.com>
26
27         Cut down the ifdefs in WebKit::getWebCoreMemoryCacheStatistics() now that 
28         MemoryCache::Statistics always has the xslStyleSheets field.
29
30         Reviewed by Darin Adler.
31
32         * WebProcess/WebProcess.cpp:
33         (WebKit::getWebCoreMemoryCacheStatistics):
34
35 2011-09-01  Mark Hahnenberg  <mhahnenberg@apple.com>
36
37         Unzip initialization lists and constructors in JSCell hierarchy (4/7)
38         https://bugs.webkit.org/show_bug.cgi?id=67174
39
40         Reviewed by Oliver Hunt.
41
42         Completed the fourth level of the refactoring to add finishCreation() 
43         methods to all classes within the JSCell hierarchy with non-trivial 
44         constructor bodies.
45
46         This primarily consists of pushing the calls to finishCreation() down 
47         into the constructors of the subclasses of the second level of the hierarchy 
48         as well as pulling the finishCreation() calls out into the class's corresponding
49         create() method if it has one.  Doing both simultaneously allows us to 
50         maintain the invariant that the finishCreation() method chain is called exactly 
51         once during the creation of an object, since calling it any other number of 
52         times (0, 2, or more) will cause an assertion failure.
53
54         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
55         (WebKit::JSNPObject::JSNPObject):
56         (WebKit::JSNPObject::finishCreation):
57         * WebProcess/Plugins/Netscape/JSNPObject.h:
58
59 2011-09-01  Ada Chan  <adachan@apple.com>
60
61         Gather memory cache statistics in WebProcess::getWebCoreStatistics().
62         https://bugs.webkit.org/show_bug.cgi?id=67160
63
64         Reviewed by Darin Adler.
65
66         Encode and decode webCoreCacheStatistics data member in StatisticsData.
67         * Shared/StatisticsData.cpp:
68         (WebKit::StatisticsData::encode):
69         (WebKit::StatisticsData::decode):
70         * Shared/StatisticsData.h:
71
72         Convert the cache statistics data into an ImmutableArray and return it in WebContext::didGetWebCoreStatistics().
73         * UIProcess/WebContext.cpp:
74         (WebKit::WebContext::didGetWebCoreStatistics):
75
76         Store memory cache statistics into the StatisticsData object.
77         * WebProcess/WebProcess.cpp:
78         (WebKit::getWebCoreMemoryCacheStatistics):
79         (WebKit::WebProcess::getWebCoreStatistics):
80
81 2011-09-01  Tim Horton  <timothy_horton@apple.com>
82
83         REGRESSION: Rendering artifacts on a rotated, pattern filled shape
84         https://bugs.webkit.org/show_bug.cgi?id=53055
85         <rdar://problem/8910917>
86
87         Reviewed by Simon Fraser.
88
89         Introduce wkCGPatternCreateWithImageAndTransform.
90
91         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
92         (InitWebCoreSystemInterface):
93
94 2011-09-01  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
95
96         [Qt] TouchWebView crashes with segmentation fault
97         https://bugs.webkit.org/show_bug.cgi?id=67308
98
99         Reviewed by Benjamin Poulain.
100
101         If you instantiate TouchWebView element with height and width in a qml file and
102         load a url it crashes.
103         The functions setWidth() and setHeight() are called sequentially therefore it can happen
104         that computeViewportAttributes was called with a size like (width, 0) breaking the
105         assumption of the function that the size is valid. The patch makes sure we compute the
106         viewport when both height and width are valid.
107
108         * UIProcess/API/qt/qtouchwebview.cpp:
109         (QTouchWebViewPrivate::updateViewportConstraints):
110         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml: Added.
111         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml: Added.
112         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadZeroSizeView.qml: Added.
113         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
114
115 2011-09-01  Ada Chan  <adachan@apple.com>
116
117         Gather JavaScript, FastMalloc, icon, font, and glyph page statistics in WebProcess::getWebCoreStatistics().
118         https://bugs.webkit.org/show_bug.cgi?id=67160
119
120         Reviewed by Darin Adler.
121
122         Encode and decode the data members in StatisticsData.
123         * Shared/StatisticsData.cpp:
124         (WebKit::StatisticsData::encode):
125         (WebKit::StatisticsData::decode):
126         (WebKit::StatisticsData::StatisticsData):
127
128         Add three data members to StatisticsData:
129         - statisticsNumbers: Map containing statistics values that are numbers, mapped by their names, such as 
130         JavaScriptObjectsCount, CachedFontDataCount, etc.
131         - javaScriptProtectedObjectTypeCounts
132         - javaScriptObjectTypeCounts
133         * Shared/StatisticsData.h:
134
135         Create a WK::Dictionary containing statistics values mapped by their names and return that dictionary
136         in WebContext::didGetWebCoreStatistics().
137         * UIProcess/WebContext.cpp:
138         (WebKit::createDictionaryFromHashMap):
139         (WebKit::WebContext::didGetWebCoreStatistics):
140
141         Package JavaScript, FastMalloc, icon, font, and glyph page statistics into a StatisticsData object
142         and send it to the UIProcess.
143         * WebProcess/WebProcess.cpp:
144         (WebKit::fromCountedSetToHashMap):
145         (WebKit::WebProcess::getWebCoreStatistics):
146
147 2011-09-01  Xan Lopez  <xlopez@igalia.com>
148
149         [GTK] Add XRender lib dependencies explicitly
150
151         Reviewed by Philippe Normand.
152
153         This is needed when using the GNU/Gold linker, since we use
154         XRender directly.
155
156         * GNUmakefile.am:
157
158 2011-08-31  Anders Carlsson  <andersca@apple.com>
159
160         Jagged text shown in find-in-page highlight
161         https://bugs.webkit.org/show_bug.cgi?id=67347
162         <rdar://problem/9870444>
163
164         Reviewed by Dan Bernstein.
165
166         When painting each text line in the find indicator, make sure to clip it against
167         the text rect and not paint the entire rect over and over.
168
169         * UIProcess/FindIndicator.cpp:
170         (WebKit::FindIndicator::draw):
171
172 2011-08-31  Beth Dakin  <bdakin@apple.com>
173
174         https://bugs.webkit.org/show_bug.cgi?id=67322
175         Re-name overrideBackingScaleFactor
176
177         Reviewed by John Sullivan.
178
179         API is now WKPageSetCustomBackingScaleFactor() and WKPageGetBackingScaleFactor() 
180         which returns the custom scale factor if one was set, and the intrinsic scale 
181         factor otherwise. 
182         * UIProcess/API/C/WKPage.cpp:
183         (WKPageGetBackingScaleFactor):
184         (WKPageSetCustomBackingScaleFactor):
185         * UIProcess/API/C/WKPage.h:
186
187         Re-named _deviceScaleFactor to _intrinsicDeviceScaleFactor since it only ever 
188         refers to the intrinsic value.
189         * UIProcess/API/mac/WKView.mm:
190         (-[WKView viewDidMoveToWindow]):
191         (-[WKView _windowDidChangeResolution:]):
192         (-[WKView _intrinsicDeviceScaleFactor]):
193
194         WebPageProxy stores both the customDeviceScaleFactor and the 
195         intrinsicDeviceScaleFactor. deviceScaleFactor() returns the appropriate value that 
196         should be the one used. 
197         * UIProcess/WebPageProxy.cpp:
198         (WebKit::WebPageProxy::WebPageProxy):
199         (WebKit::WebPageProxy::setIntrinsicDeviceScaleFactor):
200         (WebKit::WebPageProxy::deviceScaleFactor):
201         (WebKit::WebPageProxy::setCustomDeviceScaleFactor):
202         (WebKit::WebPageProxy::creationParameters):
203         * UIProcess/WebPageProxy.h:
204
205 2011-08-31  Anders Carlsson  <andersca@apple.com>
206
207         REGRESSION(r93902): Can't open external links on gmail
208         https://bugs.webkit.org/show_bug.cgi?id=67234
209         <rdar://problem/10053636>
210
211         Reviewed by Alexey Proskuryakov.
212
213         * Shared/cf/ArgumentCodersCF.cpp:
214         (CoreIPC::decode):
215         If we encounter an empty URL string, create an empty url by using NSURL, just
216         like we do in WebCore when converting an empty KURL to an NSURL.
217
218         * WebKit2.xcodeproj/project.pbxproj:
219         Compile ArgumentCodersCF.cpp as Objective-C++ for now.
220
221 2011-08-30  Beth Dakin  <bdakin@apple.com>
222
223         https://bugs.webkit.org/show_bug.cgi?id=67150
224         Would like API to use a custom device scale factor for a particular WebView/WKView
225         -and corresponding-
226         <rdar://problem/10041016>
227
228         Reviewed by Darin Adler.
229
230         New API is setOverrideBackingScaleFactor() on WKPage
231         * UIProcess/API/C/WKPage.cpp:
232         (WKPageGetOverrideBackingScaleFactor):
233         (WKPageSetOverrideBackingScaleFactor):
234         * UIProcess/API/C/WKPage.h:
235         * UIProcess/WebPageProxy.cpp:
236         (WebKit::WebPageProxy::WebPageProxy):
237         (WebKit::WebPageProxy::deviceScaleFactor):
238         (WebKit::WebPageProxy::setOverrideBackingScaleFactor):
239         * UIProcess/WebPageProxy.h:
240         (WebKit::WebPageProxy::overrideBackingScaleFactor):
241
242 2011-08-30  Aaron Colwell  <acolwell@chromium.org>
243
244         Add MediaSource API to HTMLMediaElement
245         https://bugs.webkit.org/show_bug.cgi?id=64731
246
247         Reviewed by Eric Carlson.
248
249         * Configurations/FeatureDefines.xcconfig:
250
251 2011-08-30  Ada Chan  <adachan@apple.com>
252
253         Laying some groundwork to fetch performance statistics from WebProcess.
254         https://bugs.webkit.org/show_bug.cgi?id=67160
255
256         Reviewed by Darin Adler.
257
258         Add WKContextGetStatistics() which sends a message to WebProcess to fetch the performance statistics.
259         * UIProcess/API/C/WKContext.cpp:
260         (WKContextGetStatistics):
261         * UIProcess/API/C/WKContext.h:
262         * UIProcess/WebContext.cpp:
263         (WebKit::WebContext::~WebContext):
264         (WebKit::WebContext::getWebCoreStatistics):
265         (WebKit::WebContext::didGetWebCoreStatistics):
266         * UIProcess/WebContext.h:
267         * UIProcess/WebContext.messages.in: Add the DidGetWebCoreStatistics message that WebProcess can send when it has
268         the performance statistics ready.
269
270         Add WebProcess::getWebCoreStatistics().  Currently it just sends back an empty StatisticsData object.
271         It will gather the performance statistics to store in the StatisticsData object in a future patch.
272         * WebProcess/WebProcess.cpp:
273         (WebKit::WebProcess::getWebCoreStatistics):
274         * WebProcess/WebProcess.h:
275         * WebProcess/WebProcess.messages.in:
276
277         Add the skeleton for StatisticsData.
278         * Scripts/webkit2/messages.py:
279         * Shared/StatisticsData.cpp: Added.
280         (WebKit::StatisticsData::encode):
281         (WebKit::StatisticsData::decode):
282         (WebKit::StatisticsData::StatisticsData):
283         * Shared/StatisticsData.h: Added.
284
285         Add StatisticsData.h/cpp to project.
286         * CMakeLists.txt:
287         * GNUmakefile.am:
288         * WebKit2.pro:
289         * WebKit2.xcodeproj/project.pbxproj:
290         * win/WebKit2.vcproj:
291
292 2011-08-29  Alexey Proskuryakov  <ap@apple.com>
293
294         DumpRenderTree should begin each test with an empty cookie store
295         https://bugs.webkit.org/show_bug.cgi?id=63545
296         <rdar://problem/5666907>
297
298         Reviewed by Darin Adler.
299
300         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
301         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
302         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
303         Updated to use currentCFHTTPCookieStorage() instead of privateBrowsingCookieStorage().
304
305         * WebProcess/Cookies/mac/WebCookieManagerMac.mm:
306         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
307         There is no no need to access cookie storage through session manually - we already have code
308         for that in WebCore.
309
310         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
311         (WKBundleSwitchNetworkLoaderToNewTestingSession):
312         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
313         * WebProcess/InjectedBundle/InjectedBundle.cpp:
314         (WebKit::InjectedBundle::switchNetworkLoaderToNewTestingSession):
315         * WebProcess/InjectedBundle/InjectedBundle.h:
316         Exposed bundle SPI to use a private default session. It's separate from private browsing,
317         because some tests enable the latter, and we don't want to mix them up.
318
319         * WebProcess/WebPage/mac/WebPageMac.mm:
320         (WebKit::WebPage::platformHasLocalDataForURL):
321         (WebKit::cachedResponseForURL):
322         Updated to use currentStorageSession() instead of privateBrowsingStorageSession().
323
324         * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformInitializeWebProcess):
325         ResourceHandle::setDefaultStorageSession() no longer steals a reference, so retain it properly.
326
327 2011-08-30  Alexis Menard  <alexis.menard@openbossa.org>
328
329         [Qt][WK2] Make mouse over work again for QDesktopWebView.
330         https://bugs.webkit.org/show_bug.cgi?id=67200
331
332         Reviewed by Noam Rosenthal.
333
334         The API has changed after QGraphicsView, SceneGraph sends
335         QHoverEvents now.
336
337         * UIProcess/qt/qdesktopwebpageproxy.cpp:
338         (QDesktopWebPageProxy::handleEvent):
339         (QDesktopWebPageProxy::handleHoverMoveEvent):
340         * UIProcess/qt/qdesktopwebpageproxy.h:
341
342 2011-08-30  Kaustubh Atrawalkar  <kaustubh@motorola.com>
343
344         The unused ScrollView* argument can and should be removed from
345         scrollRectIntoView.
346         https://bugs.webkit.org/show_bug.cgi?id=67117
347
348         Reviewed by Darin Adler.
349
350         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
351         (WebKit::WebChromeClient::scrollRectIntoView):
352         * WebProcess/WebCoreSupport/WebChromeClient.h:
353
354 2011-08-29  Ryosuke Niwa  <rniwa@webkit.org>
355
356         Another Windows build fix after r94047.
357
358         * win/WebKit2.def:
359         * win/WebKit2CFLite.def:
360
361 2011-08-29  Ryosuke Niwa  <rniwa@webkit.org>
362
363         Export more symbols for r94038.
364
365         * win/WebKit2.def:
366         * win/WebKit2CFLite.def:
367
368 2011-08-29  Ryosuke Niwa  <rniwa@webkit.org>
369
370         Windows build fix for r94038.
371
372         * win/WebKit2.def:
373         * win/WebKit2CFLite.def:
374
375 2011-08-29  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
376
377
378         [Qt] QTouchWebView url property test missing
379         https://bugs.webkit.org/show_bug.cgi?id=67159
380
381         Reviewed by Noam Rosenthal.
382
383         Added qml test case to check url property of QTouchWebView. Since url is a readonly property, we make sure that it's set after load() is called.
384
385         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml:
386
387 2011-08-29  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
388
389         [Qt] QDesktopWebView url property test missing
390         https://bugs.webkit.org/show_bug.cgi?id=67155
391
392         Reviewed by Noam Rosenthal.
393
394         Added qml test case to check url property. Since url is a readonly property, we make sure that it's set after load() is called.
395
396         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml:
397
398 2011-08-29  Sheriff Bot  <webkit.review.bot@gmail.com>
399
400         Unreviewed, rolling out r93987, r93992, r93995, r93998, and
401         r93999.
402         http://trac.webkit.org/changeset/93987
403         http://trac.webkit.org/changeset/93992
404         http://trac.webkit.org/changeset/93995
405         http://trac.webkit.org/changeset/93998
406         http://trac.webkit.org/changeset/93999
407         https://bugs.webkit.org/show_bug.cgi?id=67147
408
409         Many failing tests (Requested by ap on #webkit).
410
411         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
412         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
413         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
414         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
415         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
416         * WebProcess/InjectedBundle/InjectedBundle.cpp:
417         * WebProcess/InjectedBundle/InjectedBundle.h:
418         * WebProcess/win/WebProcessWin.cpp:
419         (WebKit::WebProcess::platformInitializeWebProcess):
420
421 2011-08-26  Martin Robinson  <mrobinson@igalia.com>
422
423         Reviewed by Xan Lopez.
424
425         [GTK] Build WebKit2 unconditionally
426         https://bugs.webkit.org/show_bug.cgi?id=62749
427
428         Build WebKit2 by default. This will make the bots build it and catch
429         build errors when they occur.
430
431         * GNUmakefile.am: Enable WebKit2 by default, but remove references to the WebKit2
432         PC file, which should not be shipped until WebKit2 is actually shipped officially.
433
434 2011-08-29  Alexey Proskuryakov  <ap@apple.com>
435
436         Windows build fix.
437
438         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
439         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
440         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
441         Updated for new function name and signature: currentCFHTTPCookieStorage().
442
443 2011-08-26  Alexey Proskuryakov  <ap@apple.com>
444
445         DumpRenderTree should begin each test with an empty cookie store
446         https://bugs.webkit.org/show_bug.cgi?id=63545
447         <rdar://problem/5666907>
448
449         Reviewed by Darin Adler.
450
451         * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformInitializeWebProcess):
452         ResourceHandle::setDefaultStorageSession() no longer steals a reference, so retain it properly.
453
454         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
455         (WKBundleUsePrivateSessionForNetworkLoading):
456         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
457         * WebProcess/InjectedBundle/InjectedBundle.cpp:
458         (WebKit::InjectedBundle::usePrivateSessionForNetworkLoading):
459         * WebProcess/InjectedBundle/InjectedBundle.h:
460         Exposed bundle SPI to use a private default session. It's separate from private browsing,
461         because some tests enable the latter, and we don't want to mix them up.
462
463 2011-08-29  Chris Marrin  <cmarrin@apple.com>
464
465         Fixed a build problem caused by http://trac.webkit.org/changeset/93980
466
467         Unreviewed.
468
469         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
470
471 2011-08-23  Chris Marrin  <cmarrin@apple.com>
472
473         [mac] requestAnimationFrame support for mac port
474         https://bugs.webkit.org/show_bug.cgi?id=59146
475
476         Reviewed by Simon Fraser.
477
478         Implement requestAnimationFrame for WebKit2. Add a
479         CFRunLoopObserver to WebPage, which runs just before
480         the syncCompositingState RLO and calls into the 
481         ScriptedAnimationController if scheduleAnimation() has
482         been called.
483
484         * Configurations/FeatureDefines.xcconfig:
485         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
486         (WebKit::WebChromeClient::scheduleAnimation):
487         * WebProcess/WebCoreSupport/WebChromeClient.h:
488         * WebProcess/WebPage/WebPage.cpp:
489         (WebKit::WebPage::WebPage):
490         (WebKit::WebPage::~WebPage):
491         * WebProcess/WebPage/WebPage.h:
492         * WebProcess/WebPage/mac/WebPageMac.mm:
493         (WebKit::WebPage::requestAnimationFrameRunLoopObserverCallback):
494         (WebKit::WebPage::scheduleAnimation):
495         (WebKit::WebPage::unscheduleAnimation):
496         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.cpp:
497         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
498
499 2011-08-29  Pierre Rossi  <pierre.rossi@gmail.com>
500
501         [Qt] NPAPI support doesn't honor the ENABLE_NETSCAPE_PLUGIN_API define in WebKit2
502         https://bugs.webkit.org/show_bug.cgi?id=67123
503
504         We could simply use the defines already in place for this.
505
506         Reviewed by Andreas Kling.
507
508         * WebKit2.pro:
509
510 2011-08-29  Vamshikrishna Yellenki  <vamshi@motorola.com>
511
512         [GTK][WK2] Compilation error in WebKit2 GTK - Revision 93953
513         https://bugs.webkit.org/show_bug.cgi?id=67111
514
515         Reviewed by Martin Robinson.
516
517         WebKit2 GTK build error.
518
519         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
520         Include <WebCore/ResourceError.h> explicitly to remove WebCore::ResourceError
521         inclusion error.
522
523 2011-08-28  Balazs Kelemen  <kbalazs@webkit.org>
524
525         [Qt][WK2] Unreviewed build fix.
526
527         * UIProcess/qt/QtWebPageProxy.cpp:
528         (QtWebPageProxy::init): Initialize the WKPageUIClient with memset
529         to avoid missing initializer warning. The missing initializer is the
530         result of using a version 0 WKPageUIClient while it has newer version (1).
531         We have nothing to do with the callbacks in the new version so I voted
532         for memset.
533         * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp: Include ResourceError.h.
534
535 2011-08-26  Sam Weinig  <sam@webkit.org>
536
537         Stop using custom NSErrors for WebKit2 WebErrors
538         https://bugs.webkit.org/show_bug.cgi?id=67075
539
540         Reviewed by Anders Carlsson.
541
542         * WebProcess/WebCoreSupport/WebErrors.h:
543         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
544         (WebKit::createNSError):
545         (WebKit::cancelledError):
546         (WebKit::fileDoesNotExistError):
547         (WebKit::blockedError):
548         (WebKit::cannotShowURLError):
549         (WebKit::interruptedForPolicyChangeError):
550         (WebKit::cannotShowMIMETypeError):
551         (WebKit::pluginWillHandleLoadError):
552         There is no reason to use custom registered NSErrors anymore, so don't.
553
554 2011-08-26  Anders Carlsson  <andersca@apple.com>
555
556         Fix build.
557
558         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
559
560 2011-08-26  Sam Weinig  <sam@webkit.org>
561
562         Fold _webkit_initWithDomain into _webkit_errorWithDomain in WebKit2
563         https://bugs.webkit.org/show_bug.cgi?id=67063
564
565         Reviewed by Anders Carlsson.
566
567         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
568         (+[NSError _webkit_errorWithDomain:code:URL:]):
569
570 2011-08-26  Anders Carlsson  <andersca@apple.com>
571
572         Implement NPN_ScheduleTimer/NPN_UnscheduleTimer
573         https://bugs.webkit.org/show_bug.cgi?id=67062
574
575         Reviewed by Sam Weinig.
576
577         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
578         (WebKit::NPN_ScheduleTimer):
579         Call NetscapePlugin::scheduleTimer.
580
581         (WebKit::NPN_UnscheduleTimer):
582         Call NetscapePlugin::unscheduleTimer.
583
584         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
585         (WebKit::NetscapePlugin::NetscapePlugin):
586         Initialize m_nextTimerID.
587
588         (WebKit::NetscapePlugin::Timer::start):
589         Start the timer.
590
591         (WebKit::NetscapePlugin::Timer::stop):
592         Stop the timer.
593
594         (WebKit::NetscapePlugin::Timer::timerFired):
595         Call the right callback and unschedule the timer object if it's not a repeating timer.
596
597         (WebKit::NetscapePlugin::scheduleTimer):
598         Create a new timer and start it.
599
600         (WebKit::NetscapePlugin::unscheduleTimer):
601         Get the timer from the map and destroy it.
602         
603         (WebKit::NetscapePlugin::destroy):
604         Destroy all timers.
605
606         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
607         Add Timer class.
608
609 2011-08-26  Sam Weinig  <sam@webkit.org>
610
611         Fix typo in Connection.cpp
612         https://bugs.webkit.org/show_bug.cgi?id=67060
613
614         Reviewed by Anders Carlsson.
615
616         * Platform/CoreIPC/Connection.cpp:
617         (CoreIPC::Connection::waitForSyncReply):
618         We want timedOut, not timeout.  There is not a current way to cause this
619         to be an issue. This issue was caught by the Clang Static Analyzer.
620
621 2011-08-26  Alice Liu  <alice.liu@apple.com>
622
623         https://bugs.webkit.org/show_bug.cgi?id=66823
624         Add the request info to the WebPageProxy::CreateNewPage message
625
626         Reviewed by Anders Carlsson.
627
628         Update function declarations with additional ResourceRequest parameter:
629         * UIProcess/API/C/WKPage.h:
630         * UIProcess/WebPageProxy.cpp:
631         (WebKit::WebPageProxy::createNewPage):
632         * UIProcess/WebPageProxy.h:
633         * UIProcess/WebPageProxy.messages.in:
634         * UIProcess/WebUIClient.cpp:
635         (WebKit::WebUIClient::createNewPage):
636         * UIProcess/WebUIClient.h:
637
638         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
639         (WebKit::WebChromeClient::createWindow): 
640         Pass the ResourceRequest within the FrameLoadRequest.
641
642 2011-08-26  Alexis Menard  <alexis.menard@openbossa.org>
643
644         [Qt][WK2]REGRESSION(r93784): It made many tests crash
645         https://bugs.webkit.org/show_bug.cgi?id=66958
646
647         Reviewed by Anders Carlsson.
648
649         Don't try to make sure the WebContext is deleted, for now the leak
650         is intended and when multiple processes per context will be supported
651         this leak should be fixed. This was the cause of DRT crashing on the bot,
652         the context was deleted after the first test, letting other tests with nothing
653         but a bad context.
654
655         * UIProcess/qt/QtWebPageProxy.cpp:
656         (QtWebPageProxy::~QtWebPageProxy):
657
658 2011-08-26  Anders Carlsson  <andersca@apple.com>
659
660         Fix handling of keyup events in the new Cocoa text input model
661         https://bugs.webkit.org/show_bug.cgi?id=67045
662
663         Reviewed by Sam Weinig.
664
665         Use a counter instead of a boolean for deciding when to ignore keyup events, because
666         if multiple keys are pressed simultaneously then we need to ignore more than one keyup event in a row.
667
668         Also if a keyboard event is an autorepeating event we won't get a keyup event so don't increment the counter
669         in that case.
670
671         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
672         (WebKit::NetscapePlugin::NetscapePlugin):
673         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
674         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
675         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
676
677 2011-08-26  Jessie Berlin  <jberlin@apple.com>
678
679         Gut WKPageCreateSnapshotOfVisibleContent so that it can be removed later.
680         https://bugs.webkit.org/show_bug.cgi?id=66979.
681
682         Removing the function altogether would break the nightlies.
683         This patch removes the code behind it so that it is clear that
684         WKPageCreateSnapshotOfVisibleContent should not be used, and so that the code isn't just
685         left rotting in the tree.
686
687         Reviewed by Brian Weinstein.
688
689         * UIProcess/API/C/WKPage.cpp:
690         (WKPageCreateSnapshotOfVisibleContent):
691         Return 0.
692         * UIProcess/API/C/WKPagePrivate.h:
693         Update the comment and add a link to the bug.
694
695         * UIProcess/WebPageProxy.cpp:
696         * UIProcess/WebPageProxy.h:
697
698         * WebProcess/WebPage/WebPage.cpp:
699         * WebProcess/WebPage/WebPage.h:
700         * WebProcess/WebPage/WebPage.messages.in:
701
702 2011-08-25  Anders Carlsson  <andersca@apple.com>
703
704         kNPEventStartIME doesn't work correctly for NPAPI
705         https://bugs.webkit.org/show_bug.cgi?id=65264
706         <rdar://problem/9996476>
707
708         Reviewed by Sam Weinig.
709
710         In order to remain compatible with older plug-ins, the updated input model won't
711         be turned on unless a plug-in explicitly asks whether we support it. The plug-in must do
712         this before any keyboard events have been processed.
713
714         * PluginProcess/mac/PluginControllerProxyMac.mm:
715         (WebKit::PluginControllerProxy::setComplexTextInputState):
716         Add the CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply flag to this message since we want
717         the web process to handle it while it's waiting for a reply to the PluginControllerProxy::HandleMouseEvent
718         synchronous message.
719
720         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
721         (WebKit::NPN_GetValue):
722         Implement the logic for when to turn off the legacy Cocoa text input model support.
723
724         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
725         (WebKit::NetscapePlugin::NetscapePlugin):
726         Initialize m_ignoreNextKeyUpEvent to false.
727
728         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
729         Add m_ignoreNextKeyUpEvent member variable.
730
731         (WebKit::NetscapePlugin::hasHandledAKeyDownEvent):
732         Add a getter.
733
734         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
735         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
736         Don't send keydown and keyup events when complex text input is enabled in the updated model.
737
738 2011-08-25  Anders Carlsson  <andersca@apple.com>
739
740         Correctly handle events in the updated Cocoa text input model
741         https://bugs.webkit.org/show_bug.cgi?id=67005
742
743         Reviewed by Sam Weinig.
744
745         * UIProcess/API/mac/WKTextInputWindowController.mm:
746         (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
747         When using the updated model, always return a string even for 'simple' characters.
748
749         * UIProcess/API/mac/WKView.mm:
750         (-[WKView _tryHandlePluginComplexTextInputKeyDown:]):
751         Only let the input method have a crack at the event in the legacy model.
752
753 2011-08-25  Jeff Miller  <jeffm@apple.com>
754
755         Move Windows-specific WebPageProxy code to WebPageProxyWin.cpp
756         https://bugs.webkit.org/show_bug.cgi?id=67002
757
758         Reviewed by Brian Weinstein.
759
760         * UIProcess/WebPageProxy.cpp: Moved Windows-only functions to WebPageProxyWin.cpp.
761         
762         * UIProcess/win/WebPageProxyWin.cpp:
763         (WebKit::WebPageProxy::firstRectForCharacterInSelectedRange): Moved from WebPageProxy.cpp.
764         (WebKit::WebPageProxy::getSelectedText): Moved from WebPageProxy.cpp.
765         (WebKit::WebPageProxy::gestureWillBegin): Moved from WebPageProxy.cpp.
766         (WebKit::WebPageProxy::gestureDidScroll): Moved from WebPageProxy.cpp.
767         (WebKit::WebPageProxy::gestureDidEnd): Moved from WebPageProxy.cpp.
768         (WebKit::WebPageProxy::setGestureReachedScrollingLimit): Moved from WebPageProxy.cpp.
769         (WebKit::WebPageProxy::startDragDrop): Moved from WebPageProxy.cpp.
770         (WebKit::WebPageProxy::didChangeCompositionSelection): Moved from WebPageProxy.cpp.
771         (WebKit::WebPageProxy::confirmComposition): Moved from WebPageProxy.cpp.
772         (WebKit::WebPageProxy::setComposition): Moved from WebPageProxy.cpp.
773
774 2011-08-25  Anders Carlsson  <andersca@apple.com>
775
776         Handle key-down events in the updated Cocoa text input model
777         https://bugs.webkit.org/show_bug.cgi?id=67001
778
779         Reviewed by Sam Weinig.
780
781         * UIProcess/API/mac/WKView.mm:
782         (-[WKView performKeyEquivalent:]):
783         Call _disableComplexTextInputIfNecessary so that we'll inform the plug-in that complex text
784         input has been disabled.
785
786         (-[WKView _disableComplexTextInputIfNecessary]):
787         If the plug-in is using the updated Cocoa text input model specification, disable text input
788         if the text input window has been dismissed for whatever reason.
789
790         (-[WKView _tryHandlePluginComplexTextInputKeyDown:]):
791         Call _disableComplexTextInputIfNecessary so that we'll inform the plug-in that complex text
792         input has been disabled.
793         
794         (-[WKView _tryPostProcessPluginComplexTextInputKeyDown:]):
795         If the plug-in is using the updated Cocoa text input model specification, let the input methods
796         have a go at the keyboard event.
797
798         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
799         (WebKit::NetscapePlugin::setComplexTextInputEnabled):
800         Actually set m_isComplexTextInputEnabled to the right value.
801
802 2011-08-25  Anders Carlsson  <andersca@apple.com>
803
804         Factor code to send a key-down event to the plug-in out into a new function
805         https://bugs.webkit.org/show_bug.cgi?id=66999
806
807         Reviewed by Darin Adler.
808
809         * UIProcess/API/mac/WKView.mm:
810         (-[WKView _handlePluginComplexTextInputKeyDown:]):
811         (-[WKView _tryHandlePluginComplexTextInputKeyDown:]):
812
813 2011-08-25  Anders Carlsson  <andersca@apple.com>
814
815         WKView should keep track of the plug-in complex text input state
816         https://bugs.webkit.org/show_bug.cgi?id=66990
817
818         Reviewed by Sam Weinig.
819
820         * UIProcess/API/mac/WKView.mm:
821         Add a _pluginComplexTextInputState ivar to WKViewData.
822
823         (-[WKView _setPluginComplexTextInputState:]):
824         Set the _pluginComplexTextInputState variable. If text input is being disabled, send back an empty string to the plug-in.
825
826         (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]):
827         Call -[WKView _setPluginComplexTextInputState:].
828
829 2011-08-25  Anders Carlsson  <andersca@apple.com>
830
831         Move file internal methods to a class continuation in WKView
832         https://bugs.webkit.org/show_bug.cgi?id=66983
833
834         Reviewed by Dan Bernstein.
835
836         * UIProcess/API/mac/WKView.mm:
837         (-[WKView _deviceScaleFactor]):
838         (-[WKView _setDrawingAreaSize:]):
839
840 2011-08-25  Anders Carlsson  <andersca@apple.com>
841
842         More work on the updated Cocoa text input specification
843         https://bugs.webkit.org/show_bug.cgi?id=66977
844
845         Reviewed by Sam Weinig.
846
847         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
848         (WebKit::NetscapePlugin::NetscapePlugin):
849         Initialize m_pluginWantsLegacyCocoaTextInput and m_hasHandledAKeyDownEvent.
850
851         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
852         Add m_pluginWantsLegacyCocoaTextInput and m_hasHandledAKeyDownEvent.
853         
854         (WebKit::NetscapePlugin::setPluginWantsLegacyCocoaTextInput):
855         Add setter. Not called yet.
856
857         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
858         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
859         Set m_hasHandledAKeyDownEvent to true if we get a KeyDown event.
860
861         (WebKit::NetscapePlugin::sendComplexTextInput):
862         If the plug-in is using the updated Cocoa text input spec, we can disable text input here.
863
864         (WebKit::NetscapePlugin::pluginFocusOrWindowFocusChanged):
865         If the plug-in is using the updated Cocoa text input spec, text input is not enabled when
866         the plug-in is focused.
867
868         (WebKit::NetscapePlugin::setComplexTextInputEnabled):
869         Set the right text input state based on whether the plug-in is using the updated spec or not.
870
871 2011-08-25  Anders Carlsson  <andersca@apple.com>
872
873         Return the correct value for NPNVsupportsCarbonBool
874         https://bugs.webkit.org/show_bug.cgi?id=66964
875
876         Reviewed by Adam Roben.
877
878         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
879         (WebKit::NPN_GetValue):
880         Remove a FIXME and set the value to true.
881
882 2011-08-25  Alexis Menard  <alexis.menard@openbossa.org>
883
884         [Qt][WK2] Remove QWKContext class and make sure the WebProcessProxy life is correctly managed.
885         https://bugs.webkit.org/show_bug.cgi?id=66886
886
887         Reviewed by Benjamin Poulain.
888
889         Remove QWKContext class from Qt APIs as it is too low level for the vision
890         of the Qt5 API. QtWebPageProxy now holds directly a WebContext which can be a custom one
891         or default created one. This patch also ensure that the WebProcessProxy is correctly
892         destroyed at application exit by removing the circular references between the WebContext,
893         WebProcessProxy, and WebPageProxy.
894
895         * UIProcess/API/qt/qdesktopwebview.cpp:
896         (QDesktopWebViewPrivate::QDesktopWebViewPrivate):
897         * UIProcess/API/qt/qtouchwebview.cpp:
898         (QTouchWebViewPrivate::QTouchWebViewPrivate):
899         * UIProcess/qt/ClientImpl.cpp:
900         (qt_wk_setStatusText):
901         * UIProcess/qt/ClientImpl.h:
902         * UIProcess/qt/QtWebPageProxy.cpp:
903         (QtWebPageProxy::defaultWKContext):
904         (QtWebPageProxy::QtWebPageProxy):
905         (QtWebPageProxy::~QtWebPageProxy):
906         * UIProcess/qt/QtWebPageProxy.h:
907         * UIProcess/qt/qdesktopwebpageproxy.cpp:
908         (QDesktopWebPageProxy::QDesktopWebPageProxy):
909         * UIProcess/qt/qdesktopwebpageproxy.h:
910         * UIProcess/qt/qtouchwebpageproxy.cpp:
911         (QTouchWebPageProxy::QTouchWebPageProxy):
912         * UIProcess/qt/qtouchwebpageproxy.h:
913         * UIProcess/qt/qwkcontext.cpp: Removed.
914         * UIProcess/qt/qwkcontext.h: Removed.
915         * UIProcess/qt/qwkcontext_p.h: Removed.
916         * WebKit2.pro:
917
918 2011-08-23  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
919
920         [Qt][WK2] Drive tiling from the WebProcess and reuse TiledBackingStore.
921         https://bugs.webkit.org/show_bug.cgi?id=66771
922
923         Reviewed by Tor Arne Vestbø.
924
925         We need the tiling logic to be moved to the web process to allow invalidated tile rects to be
926         rendered with the same layout. This also allows the web process to render tiles into
927         buffers readable directly by the GPU (on supported platforms). We also take the opportunity
928         to use the TiledBackingStore in WebCore to have only one tiling implementation.
929
930         Before this patch:
931         - TiledDrawingAreaProxy manages tiles from the UI process.
932         - TiledDrawingArea received rendering requests for a rect and returns the result
933           to the proxy through shared memory.
934
935         After this patch:
936         - TiledDrawingArea uses a TiledBackingStore to manage tiles from the web process.
937         - TiledBackingStoreRemoteTile forwards tile creations, update and removals to the proxy.
938         - TiledDrawingAreaProxy updates the scene graph directly from requests.
939
940         It also implements tile buffer swapping correctly in SGTileNode, triggered by the DidRenderFrame message.
941         Render throttling is implemented by waiting in TiledDrawingArea for the UI process to
942         notify us when the last rendered frame is ready to make it to the screen.
943         TiledDrawingAreaTileSets have been replaced by using two instances of TiledBackingStore instead.
944
945         * UIProcess/API/qt/qtouchwebpage.cpp:
946         (QTouchWebPage::updatePaintNode):
947         * UIProcess/API/qt/qtouchwebview.cpp:
948         (QTouchWebViewPrivate::updateViewportState):
949         * UIProcess/DrawingAreaProxy.h:
950         (WebKit::DrawingAreaProxy::createTile):
951         (WebKit::DrawingAreaProxy::updateTile):
952         (WebKit::DrawingAreaProxy::didRenderFrame):
953         (WebKit::DrawingAreaProxy::removeTile):
954         * UIProcess/DrawingAreaProxy.messages.in:
955         * UIProcess/TiledDrawingAreaProxy.cpp:
956         (WebKit::TiledDrawingAreaProxy::create):
957         (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
958         (WebKit::TiledDrawingAreaProxy::~TiledDrawingAreaProxy):
959         (WebKit::TiledDrawingAreaProxy::setVisibleContentRect):
960         (WebKit::TiledDrawingAreaProxy::setContentsScale):
961         (WebKit::TiledDrawingAreaProxy::renderNextFrame):
962         (WebKit::TiledDrawingAreaProxy::sizeDidChange):
963         (WebKit::TiledDrawingAreaProxy::paint):
964         * UIProcess/TiledDrawingAreaProxy.h:
965         * UIProcess/TiledDrawingAreaTile.h: Removed.
966         * UIProcess/qt/SGAgent.cpp:
967         (WebKit::NodeUpdateCreateTile::NodeUpdateCreateTile):
968         (WebKit::NodeUpdateRemoveTile::NodeUpdateRemoveTile):
969         (WebKit::NodeUpdateSetBackBuffer::NodeUpdateSetBackBuffer):
970         (WebKit::NodeUpdateSwapTileBuffers::NodeUpdateSwapTileBuffers):
971         (WebKit::SGAgent::SGAgent):
972         (WebKit::SGAgent::createTileNode):
973         (WebKit::SGAgent::removeTileNode):
974         (WebKit::SGAgent::setNodeBackBuffer):
975         (WebKit::SGAgent::swapTileBuffers):
976         (WebKit::SGAgent::updatePaintNode):
977         (WebKit::SGAgent::getScaleNode):
978         Make the parenting logic more strict to allow SGAgent to handle the scale nodes itself (remove NodeUpdateCreateScale and use the scale in CreateTile).
979         Delete the scale node when the last of its child tiles has been removed.
980
981         * UIProcess/qt/SGAgent.h:
982         (WebKit::SGAgent::isSwapPending):
983
984         * UIProcess/qt/SGTileNode.cpp:
985         (WebKit::SGTileNode::SGTileNode):
986         (WebKit::SGTileNode::setBackBuffer):
987         (WebKit::SGTileNode::swapIfNeeded):
988         Replace setTargetRect, setSourceRect and setTexture by a single setBackBuffer method.
989         This allows all those values to be used only when swapIfNeeded is called later.
990
991         * UIProcess/qt/SGTileNode.h:
992         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
993         (WebKit::TiledDrawingAreaProxy::createTile):
994         (WebKit::TiledDrawingAreaProxy::updateTile):
995         (WebKit::TiledDrawingAreaProxy::didRenderFrame):
996         (WebKit::TiledDrawingAreaProxy::removeTile):
997         * UIProcess/qt/TiledDrawingAreaTileQt.cpp: Removed.
998         * UIProcess/qt/qtouchwebpageproxy.cpp:
999         (QTouchWebPageProxy::renderNextFrame):
1000         * UIProcess/qt/qtouchwebpageproxy.h:
1001         * WebKit2.pro:
1002         * WebProcess/WebPage/DrawingArea.h:
1003         (WebKit::DrawingArea::setVisibleContentRect):
1004         (WebKit::DrawingArea::setContentsScale):
1005         (WebKit::DrawingArea::renderNextFrame):
1006         * WebProcess/WebPage/DrawingArea.messages.in:
1007         * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp: Added.
1008         (WebKit::TiledBackingStoreRemoteTile::TiledBackingStoreRemoteTile):
1009         (WebKit::TiledBackingStoreRemoteTile::~TiledBackingStoreRemoteTile):
1010         (WebKit::TiledBackingStoreRemoteTile::isDirty):
1011         (WebKit::TiledBackingStoreRemoteTile::invalidate):
1012         (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
1013         (WebKit::TiledBackingStoreRemoteTile::swapBackBufferToFront):
1014         (WebKit::TiledBackingStoreRemoteTile::isReadyToPaint):
1015         (WebKit::TiledBackingStoreRemoteTile::paint):
1016         (WebKit::TiledBackingStoreRemoteTileBackend::TiledBackingStoreRemoteTileBackend):
1017         (WebKit::TiledBackingStoreRemoteTileBackend::createTile):
1018         (WebKit::TiledBackingStoreRemoteTileBackend::paintCheckerPattern):
1019         * WebProcess/WebPage/TiledBackingStoreRemoteTile.h: Added.
1020         (WebKit::TiledBackingStoreRemoteTile::create):
1021         (WebKit::TiledBackingStoreRemoteTile::coordinate):
1022         (WebKit::TiledBackingStoreRemoteTile::rect):
1023         (WebKit::TiledBackingStoreRemoteTileClient::~TiledBackingStoreRemoteTileClient):
1024         (WebKit::TiledBackingStoreRemoteTileBackend::create):
1025         * WebProcess/WebPage/TiledDrawingArea.cpp:
1026         (WebKit::TiledDrawingArea::TiledDrawingArea):
1027         (WebKit::TiledDrawingArea::setNeedsDisplay):
1028         (WebKit::TiledDrawingArea::setSize):
1029         (WebKit::TiledDrawingArea::setVisibleContentRect):
1030         (WebKit::TiledDrawingArea::setContentsScale):
1031         (WebKit::TiledDrawingArea::renderNextFrame):
1032         (WebKit::TiledDrawingArea::suspendPainting):
1033         (WebKit::TiledDrawingArea::resumePainting):
1034         (WebKit::TiledDrawingArea::tiledBackingStorePaintBegin):
1035         (WebKit::TiledDrawingArea::tiledBackingStorePaint):
1036         (WebKit::TiledDrawingArea::tiledBackingStorePaintEnd):
1037         (WebKit::TiledDrawingArea::tiledBackingStoreIsUpdatingAllowed):
1038         (WebKit::TiledDrawingArea::tiledBackingStoreContentsRect):
1039         (WebKit::TiledDrawingArea::tiledBackingStoreVisibleRect):
1040         (WebKit::TiledDrawingArea::tiledBackingStoreBackgroundColor):
1041         (WebKit::TiledDrawingArea::createTile):
1042         (WebKit::TiledDrawingArea::updateTile):
1043         (WebKit::TiledDrawingArea::removeTile):
1044         * WebProcess/WebPage/TiledDrawingArea.h:
1045         * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp: Removed.
1046
1047 2011-08-24  Michael Saboff  <msaboff@apple.com>
1048
1049         Improper comment in CoreIPC/ArgumentEncoder.cpp from 66464
1050         https://bugs.webkit.org/show_bug.cgi?id=66912
1051
1052         Updated the comment in ArgumentEncoder::grow to reflect that system malloc
1053         currently checks to see if a MADV_FREE_REUSABLE will fail before calling it.
1054
1055         Reviewed by Mark Rowe.
1056
1057         * Platform/CoreIPC/ArgumentEncoder.cpp:
1058         (CoreIPC::ArgumentEncoder::grow):
1059
1060 2011-08-24  Anders Carlsson  <andersca@apple.com>
1061
1062         Rename -[WKTextInputWindowController keyboardInputSourceChanged] to unmarkText to indicate what the method does
1063         https://bugs.webkit.org/show_bug.cgi?id=66883
1064
1065         Reviewed by Beth Dakin.
1066
1067         * UIProcess/API/mac/WKTextInputWindowController.h:
1068         * UIProcess/API/mac/WKTextInputWindowController.mm:
1069         (-[WKTextInputPanel _unmarkText]):
1070         (-[WKTextInputWindowController unmarkText]):
1071         * UIProcess/API/mac/WKView.mm:
1072         (-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]):
1073
1074 2011-08-24  Oliver Hunt  <oliver@apple.com>
1075
1076         JSNPObject and JSNPMethod create their structure in their constructors
1077         https://bugs.webkit.org/show_bug.cgi?id=66879
1078
1079         Reviewed by Anders Carlsson.
1080
1081         It's not safe to create the Structure for an object inside its constructor
1082         so we hoist construction out into their ::create methods and move the methods
1083         into the cpp file.
1084
1085         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1086         (WebKit::JSNPMethod::JSNPMethod):
1087         (WebKit::JSNPMethod::create):
1088         * WebProcess/Plugins/Netscape/JSNPMethod.h:
1089         (WebKit::JSNPMethod::create):
1090         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1091         (WebKit::JSNPObject::JSNPObject):
1092         (WebKit::JSNPObject::create):
1093         * WebProcess/Plugins/Netscape/JSNPObject.h:
1094         (WebKit::JSNPObject::create):
1095
1096 2011-08-24  Anders Carlsson  <andersca@apple.com>
1097
1098         More plug-in complex text input scaffolding
1099         https://bugs.webkit.org/show_bug.cgi?id=66865
1100
1101         Reviewed by Sam Weinig.
1102
1103         Make -[WKView _doneWithKeyEvent:eventWasHandled:] take an NSEvent * directly. Also
1104         add methods for handling plug-in text input key-down events.
1105
1106         * UIProcess/API/mac/PageClientImpl.mm:
1107         (WebKit::PageClientImpl::doneWithKeyEvent):
1108         * UIProcess/API/mac/WKView.mm:
1109         (-[WKView _tryHandlePluginComplexTextInputKeyDown:]):
1110         (-[WKView keyDown:]):
1111         (-[WKView _tryPostProcessPluginComplexTextInputKeyDown:]):
1112         (-[WKView _doneWithKeyEvent:eventWasHandled:]):
1113         * UIProcess/API/mac/WKViewInternal.h:
1114
1115 2011-08-24  Amruth Raj  <amruthraj@motorola.com>
1116
1117         [GTK] WebProcess crash on hitting assertion m_isWaitingForDidUpdate in DrawingAreaImpl
1118         https://bugs.webkit.org/show_bug.cgi?id=66640
1119
1120         Reviewed by Martin Robinson.
1121
1122         The crash happens when a new timer is created in an existing timer callback. Since 
1123         TimerBase has a single GSource* it gets overridden and the old timer can never get
1124         stopped. To handle this, keep a copy of the old timer and use it for destruction.
1125
1126         * Platform/RunLoop.h:
1127         * Platform/gtk/RunLoopGtk.cpp:
1128         (RunLoop::TimerBase::timerFiredCallback):
1129         Store the timerSource so that even if it is modified by the timer callback,
1130         it can be restored for freeing it.
1131         (RunLoop::TimerBase::start):
1132         Remove destroyNotifyCallback. Destruction is now handled in timerFiredCallback itself.
1133
1134 2011-08-23  Anders Carlsson  <andersca@apple.com>
1135
1136         Prepare WKTextInputWindowController for the new text input model
1137         https://bugs.webkit.org/show_bug.cgi?id=66826
1138
1139         Reviewed by Sam Weinig.
1140
1141         Add -[WKTextInputWindowController hasMarkedText] and make interpretKeyEvent take an
1142         additional usingLegacyCocoaTextInput flag. No functionality change.
1143
1144         * UIProcess/API/mac/WKTextInputWindowController.h:
1145         * UIProcess/API/mac/WKTextInputWindowController.mm:
1146         (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
1147         (-[WKTextInputPanel _hasMarkedText]):
1148         (-[WKTextInputWindowController hasMarkedText]):
1149         (-[WKTextInputWindowController interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
1150         * UIProcess/API/mac/WKView.mm:
1151         (-[WKView keyDown:]):
1152
1153 2011-08-23  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
1154
1155         [Qt] Unnecessary folders in WebKit2.
1156         https://bugs.webkit.org/show_bug.cgi?id=66583
1157
1158         Reviewed by Benjamin Poulain.
1159
1160         Remove empty autotest folders that were left over from QGraphicsWKView times.
1161
1162         * UIProcess/API/qt/tests/qgraphicswkview: Removed.
1163         * UIProcess/API/qt/tests/qwkhistory: Removed.
1164         * UIProcess/API/qt/tests/qwkpage: Removed.
1165
1166 2011-08-23  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1167
1168         [Qt][WK2] Fix an awful memory leak introduced in r92376.
1169         https://bugs.webkit.org/show_bug.cgi?id=65528
1170
1171         Reviewed by Benjamin Poulain.
1172
1173         The non-virtual destructor would create a leak of the tile update buffer because
1174         the NodeUpdateSetTexture's QImage member destructor wouldn't be called.
1175
1176         * UIProcess/qt/SGAgent.h:
1177         (WebKit::NodeUpdate::~NodeUpdate):
1178
1179 2011-08-23  Steve Block  <steveblock@google.com>
1180
1181         Remove all mention of removed Android files from build scripts
1182         https://bugs.webkit.org/show_bug.cgi?id=66755
1183
1184         Reviewed by Tony Gentilcore.
1185
1186         * Scripts/generate-forwarding-headers.pl:
1187
1188 2011-08-23  Benjamin Poulain  <benjamin@webkit.org>
1189
1190         [Qt][WK2] ViewportInteractionEngine: the position of the content is not corrected when scaling the page manually
1191         https://bugs.webkit.org/show_bug.cgi?id=66672
1192
1193         Reviewed by Kenneth Rohde Christiansen.
1194
1195         Add the method animateContentIntoBoundariesIfNeeded() to move the content back into both scale and position boundaries.
1196         This method is now used as the entry point for animations in order to avoid bugs regarding scale or position.
1197
1198         The existing animation methods were renamed accordingly for clarity and consistency with the updateContent methods.
1199
1200         * UIProcess/qt/ViewportInteractionEngine.cpp:
1201         (WebKit::ViewportInteractionEngine::panGestureEnded):
1202         (WebKit::ViewportInteractionEngine::pinchGestureEnded):
1203         (WebKit::ViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
1204         (WebKit::ViewportInteractionEngine::animateContentPositionIntoBoundariesIfNeeded):
1205         (WebKit::ViewportInteractionEngine::animateContentScaleIntoBoundariesIfNeeded):
1206         * UIProcess/qt/ViewportInteractionEngine.h:
1207
1208 2011-08-22  Oliver Hunt  <oliver@apple.com>
1209
1210         Delay GC triggered NP object destruction to the next runloop cycle
1211         https://bugs.webkit.org/show_bug.cgi?id=66717
1212
1213         Reviewed by Anders Carlsson.
1214
1215         Delay destruction of plugin objects caused by GC until the next
1216         runloop cycle so that they can execute JS in their finalizers.
1217         We do this using a zero delay timer coupled with a queue of
1218         objects to be finalised.
1219
1220         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1221         (WebKit::JSNPObject::releaseObject):
1222         * WebProcess/Plugins/Netscape/JSNPObject.h:
1223         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1224         (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
1225         (WebKit::NPRuntimeObjectMap::invalidate):
1226         (WebKit::NPRuntimeObjectMap::invalidateQueuedObjects):
1227         (WebKit::NPRuntimeObjectMap::addToInvalidationQueue):
1228         (WebKit::NPRuntimeObjectMap::finalize):
1229         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
1230         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp:
1231         (WebKit::trySafeReleaseNPObject):
1232         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h:
1233
1234 2011-08-22  Anders Carlsson  <andersca@apple.com>
1235
1236         Move code from PageClientImpl::doneWithKeyEvent to WKView
1237         https://bugs.webkit.org/show_bug.cgi?id=66722
1238
1239         Reviewed by Darin Adler.
1240
1241         * UIProcess/API/mac/PageClientImpl.mm:
1242         (WebKit::PageClientImpl::doneWithKeyEvent):
1243         * UIProcess/API/mac/WKView.mm:
1244         (-[WKView _doneWithKeyEvent:WebKit::eventWasHandled:]):
1245         * UIProcess/API/mac/WKViewInternal.h:
1246
1247 2011-08-22  Anders Carlsson  <andersca@apple.com>
1248
1249         Update the text input context when the plug-in focus changes and not when the complex text input state changes
1250         https://bugs.webkit.org/show_bug.cgi?id=66716
1251
1252         Reviewed by Darin Adler.
1253
1254         * UIProcess/API/mac/WKView.mm:
1255         (-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]):
1256         (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]):
1257
1258 2011-08-22  Michael Saboff  <msaboff@apple.com>
1259
1260         REGRESSION (r92231): Apple campus proposal PDF doesn't display in Safari
1261         https://bugs.webkit.org/show_bug.cgi?id=66464
1262
1263         Changed ArgumentEncoder to use system malloc instead of fastMalloc.
1264         FastMalloc uses madvise(MADV_FREE_REUSABLE) which is incompatible with
1265         mach message Out Of Line (OOL) messages that use MACH_MSG_VIRTUAL_COPY.
1266         The system malloc has no such limitation.
1267         Changed sendOutgoingMessage to use MACH_MSG_VIRTUAL_COPY again as it 
1268         doesn't have size limitations that MACH_MSG_PHYSICAL_COPY.
1269         
1270         Reviewed by Anders Carlsson.
1271
1272         * Platform/CoreIPC/ArgumentEncoder.cpp:
1273         (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
1274         (CoreIPC::ArgumentEncoder::grow):
1275         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1276         (CoreIPC::Connection::sendOutgoingMessage):
1277
1278 2011-08-22  Anders Carlsson  <andersca@apple.com>
1279
1280         Use -[NSApplication updateWindows] to update the current input context
1281         https://bugs.webkit.org/show_bug.cgi?id=66715
1282
1283         Reviewed by Alexey Proskuryakov.
1284
1285         * UIProcess/API/mac/WKView.mm:
1286         (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]):
1287
1288 2011-08-22  Anders Carlsson  <andersca@apple.com>
1289
1290         The UI process should keep track of whether a plug-in has focus or not
1291         https://bugs.webkit.org/show_bug.cgi?id=66712
1292
1293         Reviewed by Darin Adler.
1294
1295         This is in preparation for implementing the updated Cocoa text input model.
1296
1297         Pipe through whether a plug-in and its containing window has focus or not, from the
1298         plug-in process and all the way to the UI process.
1299
1300         * PluginProcess/PluginControllerProxy.h:
1301         * PluginProcess/mac/PluginControllerProxyMac.mm:
1302         (WebKit::PluginControllerProxy::pluginFocusOrWindowFocusChanged):
1303         * UIProcess/API/mac/PageClientImpl.h:
1304         * UIProcess/API/mac/PageClientImpl.mm:
1305         (WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged):
1306         * UIProcess/API/mac/WKView.mm:
1307         (-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]):
1308         * UIProcess/API/mac/WKViewInternal.h:
1309         * UIProcess/PageClient.h:
1310         * UIProcess/WebPageProxy.h:
1311         * UIProcess/WebPageProxy.messages.in:
1312         * UIProcess/mac/WebPageProxyMac.mm:
1313         (WebKit::WebPageProxy::pluginFocusOrWindowFocusChanged):
1314         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1315         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1316         (WebKit::NetscapePlugin::platformSetFocus):
1317         (WebKit::NetscapePlugin::windowFocusChanged):
1318         (WebKit::NetscapePlugin::pluginFocusOrWindowFocusChanged):
1319         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
1320         (WebKit::PluginProxy::pluginFocusOrWindowFocusChanged):
1321         * WebProcess/Plugins/PluginController.h:
1322         * WebProcess/Plugins/PluginProxy.h:
1323         * WebProcess/Plugins/PluginProxy.messages.in:
1324         * WebProcess/Plugins/PluginView.cpp:
1325         (WebKit::PluginView::pluginFocusOrWindowFocusChanged):
1326         * WebProcess/Plugins/PluginView.h:
1327
1328 2011-08-22  Anders Carlsson  <andersca@apple.com>
1329
1330         Update the current NSTextInputContext whenever the plug-in complex text input state changes
1331         https://bugs.webkit.org/show_bug.cgi?id=66709
1332
1333         Reviewed by Sam Weinig.
1334
1335         Call [NSTextInputContext currentInputContext] which will force AppKit to update the current input
1336         context. Fixes a rare case when the out-of-line editing window wouldn't appear.
1337
1338         * UIProcess/API/mac/WKView.mm:
1339         (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]):
1340
1341 2011-08-19  Anders Carlsson  <andersca@apple.com>
1342
1343         Another attempt at fixing the Windows build.
1344
1345         * UIProcess/PageClient.h:
1346
1347 2011-08-19  Anders Carlsson  <andersca@apple.com>
1348
1349         Fix Windows build.
1350
1351         * WebProcess/Plugins/PluginController.h:
1352
1353 2011-08-19  Anders Carlsson  <andersca@apple.com>
1354
1355         Make the complex text input state a tri-state enum instead of a boolean
1356         https://bugs.webkit.org/show_bug.cgi?id=62245
1357
1358         Reviewed by Sam Weinig.
1359
1360         This is to prepare the infrastructure for supporting the updated Cocoa text input model for plug-ins.
1361
1362         * PluginProcess/PluginControllerProxy.cpp:
1363         * PluginProcess/PluginControllerProxy.h:
1364         * PluginProcess/mac/PluginControllerProxyMac.mm:
1365         (WebKit::PluginControllerProxy::setComplexTextInputState):
1366         (WebKit::PluginControllerProxy::compositingRenderServerPort):
1367         * Shared/Plugins/mac: Added.
1368         * Shared/Plugins/mac/PluginComplexTextInputState.h: Added.
1369         (WebKit::isValidPluginComplexTextInputState):
1370         * UIProcess/API/mac/PageClientImpl.h:
1371         * UIProcess/API/mac/PageClientImpl.mm:
1372         (WebKit::PageClientImpl::setPluginComplexTextInputState):
1373         * UIProcess/API/mac/WKView.mm:
1374         (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]):
1375         * UIProcess/API/mac/WKViewInternal.h:
1376         * UIProcess/PageClient.h:
1377         * UIProcess/WebPageProxy.h:
1378         * UIProcess/WebPageProxy.messages.in:
1379         * UIProcess/mac/WebPageProxyMac.mm:
1380         (WebKit::WebPageProxy::setPluginComplexTextInputState):
1381         * WebKit2.xcodeproj/project.pbxproj:
1382         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1383         (WebKit::NetscapePlugin::NetscapePlugin):
1384         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1385         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1386         (WebKit::NetscapePlugin::platformSetFocus):
1387         (WebKit::NetscapePlugin::windowFocusChanged):
1388         (WebKit::NetscapePlugin::setComplexTextInputEnabled):
1389         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
1390         (WebKit::PluginProxy::setComplexTextInputState):
1391         * WebProcess/Plugins/PluginController.h:
1392         * WebProcess/Plugins/PluginProxy.cpp:
1393         * WebProcess/Plugins/PluginProxy.h:
1394         * WebProcess/Plugins/PluginProxy.messages.in:
1395         * WebProcess/Plugins/PluginView.cpp:
1396         (WebKit::PluginView::~PluginView):
1397         (WebKit::PluginView::setComplexTextInputState):
1398         (WebKit::PluginView::compositingRenderServerPort):
1399         * WebProcess/Plugins/PluginView.h:
1400
1401 2011-08-19  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1402
1403         [Qt] [WK2] Provide API for intercept (and possible ignore) links clicked in QDesktopWebView
1404         https://bugs.webkit.org/show_bug.cgi?id=65920
1405
1406         Reviewed by Benjamin Poulain.
1407
1408         This patch makes QDesktopWebView delegate the decision of whether a navigation
1409         should proceed to a slot in QML. The user of the DesktopWebView must implement a
1410         'navigationPolicyForUrl()' if it wants to use the feature.
1411
1412         Such feature is useful for implementing opening links in "new tab" by using a
1413         specific mouse button or mouse button plus keyboard modifiers.
1414
1415         The patch introduces a internal Qt-level interface called PolicyInterface, that
1416         is used by QtWebPageProxy to delegate policy calls. A concrete implementation is
1417         provided for QDesktopWebView.
1418
1419         * Shared/qt/WebCoreArgumentCodersQt.cpp:
1420         (CoreIPC::::encode):
1421         (CoreIPC::::decode):
1422         Implement the serialization of the Request URL, which is the only data
1423         we exposing from the Request.
1424
1425         * WebKit2.pro:
1426         * UIProcess/qt/PolicyInterface.h: Added.
1427         * UIProcess/qt/QtWebPageProxy.cpp:
1428         (QtWebPageProxy::QtWebPageProxy):
1429         (QtWebPageProxy::init):
1430         * UIProcess/qt/QtWebPageProxy.h:
1431         Register a Policy Client in the WK2 C API only if there's a PolicyInterface available.
1432
1433         * UIProcess/qt/ClientImpl.h:
1434         * UIProcess/qt/ClientImpl.cpp:
1435         (toPolicyInterface):
1436         (toQtMouseButton):
1437         (toQtKeyboardModifiers):
1438         (qt_wk_decidePolicyForNavigationAction):
1439         Implement the callback for the Page Policy Client. It will translate the
1440         arguments to Qt jargon and call PolicyInterface.
1441
1442         * UIProcess/qt/qdesktopwebpageproxy.cpp:
1443         (QDesktopWebPageProxy::QDesktopWebPageProxy):
1444         * UIProcess/API/qt/qdesktopwebview.h:
1445         * UIProcess/API/qt/qdesktopwebview_p.h:
1446         * UIProcess/API/qt/qdesktopwebview.cpp:
1447         (toPolicyAction):
1448         (hasMetaMethod):
1449         (QDesktopWebViewPrivate::navigationPolicyForURL):
1450         The concrete implementation for QDesktopWebView. Its private object implements
1451         the PolicyInterface and try to call a possible function defined in QML (so return
1452         value and arguments all QVariants). If there's no such a function, returns the
1453         default UsePolicy, like if we haven't registered a PolicyClient in WK2 C API.
1454
1455         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_navigationPolicyForUrl.qml: Added.
1456         * UIProcess/API/qt/tests/qmltests/common/test2.html: Added.
1457         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
1458         Add a test for DesktopWebView QML element making use of a button and a modifier to
1459         ignore a navigation.
1460
1461         * UIProcess/qt/qtouchwebpageproxy.cpp:
1462         (QTouchWebPageProxy::QTouchWebPageProxy):
1463         For now, we don't have a PolicyInterface for QTouchWebView.
1464
1465 2011-08-18  Anders Carlsson  <andersca@apple.com>
1466
1467         WebProcess crashes during startup if libdispatch is initialized by WebProcessShim.dylib
1468         https://bugs.webkit.org/show_bug.cgi?id=66508
1469         <rdar://problem/9828476>
1470
1471         Reviewed by Mark Rowe.
1472
1473         * mac/MainMac.cpp:
1474         (closeUnusedFileDescriptors):
1475         Check if a file descriptor is a kqueue and don't close it if that is the case. While this
1476         isn't a complete fix, (it won't work if other initializers end up creating non-kqueue file descriptors)
1477         it's good enough for Snow Leopard. For Lion, we should use the new posix_spawn API that lets you whitelist
1478         file descriptors from the parent process.
1479
1480 2011-08-19  Benjamin Poulain  <benjamin@webkit.org>
1481
1482         [Qt][WK2] Add a basic engine to control the content of the viewport
1483         https://bugs.webkit.org/show_bug.cgi?id=66383
1484
1485         Reviewed by Andreas Kling.
1486
1487         Add ViewportInteractionEngine to handle the content of the viewport. The class make
1488         sure the QTouchWebPage stays in the viewport and in the boundaries.
1489
1490         * UIProcess/API/qt/qdesktopwebview.cpp:
1491         (QDesktopWebViewPrivate::loadDidCommit):
1492         * UIProcess/API/qt/qdesktopwebview_p.h:
1493         * UIProcess/API/qt/qtouchwebpage.cpp:
1494         (QTouchWebPage::QTouchWebPage): Set the transform origin to the top left so
1495         we can asume the position 0, 0 is always the top left of the page.
1496         (QTouchWebPagePrivate::_q_commitScaleChange): Make commitScaleChange a slot
1497         in order to completely decouple the ViewportInteractionEngine and the WebKit classes.
1498         * UIProcess/API/qt/qtouchwebpage.h:
1499         * UIProcess/API/qt/qtouchwebpage_p.h:
1500         * UIProcess/API/qt/qtouchwebview.cpp:
1501         (QTouchWebViewPrivate::QTouchWebViewPrivate):
1502         (QTouchWebViewPrivate::loadDidCommit):
1503         (QTouchWebViewPrivate::_q_viewportRectUpdated): Make _q_viewportRectUpdated() a slot
1504         for reducing coupling.
1505         (QTouchWebViewPrivate::updateViewportConstraints):
1506         (QTouchWebViewPrivate::setViewportArguments):
1507         (QTouchWebView::geometryChanged):
1508         * UIProcess/API/qt/qtouchwebview.h:
1509         * UIProcess/API/qt/qtouchwebview_p.h:
1510         * UIProcess/qt/ClientImpl.cpp:
1511         (qt_wk_didCommitLoadForFrame):
1512         * UIProcess/qt/QtGestureRecognizer.cpp:
1513         (WebKit::QtGestureRecognizer::QtGestureRecognizer):
1514         * UIProcess/qt/QtGestureRecognizer.h: Change the gesture recognizer to talk directly
1515         to the ViewportInteractionEngine instead of interacting through TouchViewInterface.
1516         * UIProcess/qt/QtPanGestureRecognizer.cpp:
1517         (WebKit::QtPanGestureRecognizer::QtPanGestureRecognizer):
1518         (WebKit::QtPanGestureRecognizer::recognize):
1519         * UIProcess/qt/QtPanGestureRecognizer.h:
1520         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
1521         (WebKit::QtPinchGestureRecognizer::QtPinchGestureRecognizer):
1522         (WebKit::QtPinchGestureRecognizer::recognize):
1523         * UIProcess/qt/QtPinchGestureRecognizer.h:
1524         * UIProcess/qt/QtWebPageProxy.cpp:
1525         (QtWebPageProxy::loadDidCommit): Add the loadCommited callback in order
1526         to reset the viewport state when the page change.
1527         * UIProcess/qt/QtWebPageProxy.h:
1528         * UIProcess/qt/TouchViewInterface.cpp:
1529         (WebKit::TouchViewInterface::TouchViewInterface):
1530         (WebKit::TouchViewInterface::contentSizeChanged):
1531         (WebKit::TouchViewInterface::loadDidCommit):
1532         * UIProcess/qt/TouchViewInterface.h:
1533         * UIProcess/qt/ViewInterface.h:
1534         * UIProcess/qt/ViewportInteractionEngine.cpp: Added.
1535         (WebKit::visibleRectInContentCoordinate):
1536         (WebKit::contentRectInViewportCoordinate):
1537         (WebKit::ViewportUpdateGuard::ViewportUpdateGuard):
1538         (WebKit::ViewportUpdateGuard::~ViewportUpdateGuard):
1539         (WebKit::ViewportInteractionEngine::ViewportInteractionEngine):
1540         (WebKit::ViewportInteractionEngine::reset):
1541         (WebKit::ViewportInteractionEngine::setConstraints):
1542         (WebKit::ViewportInteractionEngine::panGestureStarted):
1543         (WebKit::ViewportInteractionEngine::panGestureRequestScroll):
1544         (WebKit::ViewportInteractionEngine::panGestureCancelled):
1545         (WebKit::ViewportInteractionEngine::panGestureEnded):
1546         (WebKit::ViewportInteractionEngine::pinchGestureStarted):
1547         (WebKit::ViewportInteractionEngine::pinchGestureRequestUpdate):
1548         (WebKit::ViewportInteractionEngine::pinchGestureEnded):
1549         (WebKit::ViewportInteractionEngine::contentGeometryChanged):
1550         (WebKit::ViewportInteractionEngine::contentScaleChanged):
1551         (WebKit::ViewportInteractionEngine::updateContentIfNeeded):
1552         (WebKit::ViewportInteractionEngine::updateContentScaleIfNeeded):
1553         (WebKit::ViewportInteractionEngine::updateContentPositionIfNeeded):
1554         (WebKit::ViewportInteractionEngine::animateContentPositionToBoundaries):
1555         (WebKit::ViewportInteractionEngine::animateContentScaleToBoundaries):
1556         (WebKit::ViewportInteractionEngine::scaleContent):
1557         * UIProcess/qt/ViewportInteractionEngine.h: Added.
1558         (WebKit::ViewportInteractionEngine::Constraints::Constraints):
1559         (WebKit::operator==):
1560         * UIProcess/qt/qtouchwebpageproxy.cpp:
1561         (QTouchWebPageProxy::QTouchWebPageProxy):
1562         * UIProcess/qt/qtouchwebpageproxy.h:
1563         * WebKit2.pro:
1564
1565 2011-08-19  Lars Knudsen  <lars.knudsen@nokia.com>
1566
1567         [Qt][WK2] Change the rect argument of QtWebPageProxy::paint() to const ref
1568         https://bugs.webkit.org/show_bug.cgi?id=66549
1569
1570         Reviewed by Benjamin Poulain.
1571
1572         * UIProcess/qt/QtWebPageProxy.cpp:
1573         (QtWebPageProxy::paint):
1574         * UIProcess/qt/QtWebPageProxy.h:
1575
1576 2011-08-19  MORITA Hajime  <morrita@google.com>
1577
1578         Spell-checking against execCommand() inserted HTML doesn't care word boundary.
1579         https://bugs.webkit.org/show_bug.cgi?id=65902
1580
1581         Reviewed by Ryosuke Niwa.
1582         
1583         Add exports for window.internals object.
1584
1585         * win/WebKit2.def:
1586         * win/WebKit2CFLite.def:
1587
1588 2011-08-18  Beth Dakin  <bdakin@apple.com>
1589
1590         Reviewed by Sam Weinig.
1591
1592         https://bugs.webkit.org/show_bug.cgi?id=66495
1593         Lion-specific scroller SPIs can use forward declaration instead of 
1594         WebKitSystemInterface
1595
1596         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1597         (InitWebCoreSystemInterface):
1598
1599 2011-08-18  Darin Adler  <darin@apple.com>
1600
1601         Made some code even more private to a particular file and class
1602         https://bugs.webkit.org/show_bug.cgi?id=66428
1603
1604         Reviewed by Anders Carlsson.
1605
1606         * UIProcess/API/mac/WKView.mm:
1607         (-[WKView _setDrawingAreaSize:]): Made this file internal.
1608         * UIProcess/API/mac/WKViewInternal.h: Removed _setDrawingAreaSize.
1609         * UIProcess/DrawingAreaProxy.h: Made sizeDidChange private.
1610
1611 2011-08-18  Amruth Raj  <amruthraj@motorola.com>
1612
1613         [GTK] [WK2] Activating sub menus cause the WebProcess to crash
1614         https://bugs.webkit.org/show_bug.cgi?id=66471
1615
1616         Reviewed by Anders Carlsson.
1617
1618         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1619         (WebKit::WebContextMenuProxyGtk::createGtkMenu):
1620
1621 2011-08-18  Adam Roben  <aroben@apple.com>
1622
1623         Update the device scale factor when the WKView's window changes
1624
1625         Fixes <http://webkit.org/b/66412> <rdar://problem/9971958> WebKit doesn't react when a
1626         WebView is moved between windows with different backing scale factors
1627
1628         Reviewed by Anders Carlsson.
1629
1630         * UIProcess/API/mac/WKView.mm:
1631         (-[WKView viewDidMoveToWindow]): Call setDeviceScaleFactor because our new window (or no
1632         window at all) might have a different backing scale factor than the previous one.
1633         (-[WKView _deviceScaleFactor]): Moved to the new FileInternal category.
1634
1635 2011-08-18  Adam Roben  <aroben@apple.com>
1636
1637         Make WebPageProxy keep track of the current device scale factor
1638
1639         The device scale factor is no longer considered part of WebPageProxy's "view state". It now
1640         has its own setter/getter. This made the code a little simpler and more similar to the page
1641         scale factor. Each port-specific WebKit2 view is now responsible for calling
1642         WebPageProxy::setDeviceScaleFactor whenever it thinks the device scale factor might have
1643         changed.
1644
1645         Fixes <http://webkit.org/b/66466> WebKit2 requires every port-specific view to keep track of
1646         the current device scale factor
1647
1648         Reviewed by Anders Carlsson.
1649
1650         * UIProcess/API/efl/PageClientImpl.cpp:
1651         * UIProcess/API/efl/PageClientImpl.h:
1652         * UIProcess/API/gtk/PageClientImpl.h:
1653         * UIProcess/API/mac/PageClientImpl.h:
1654         * UIProcess/API/mac/PageClientImpl.mm:
1655         * UIProcess/PageClient.h:
1656         * UIProcess/qt/QtWebPageProxy.h:
1657         * UIProcess/win/WebView.h:
1658         Removed deviceScaleFactor.
1659
1660         * UIProcess/API/mac/WKView.mm:
1661         (-[WKView _deviceScaleFactor]): Added. Code came from PageClientImpl::deviceScaleFactor.
1662         (-[WKView _windowDidChangeResolution:]): Changed to call WebPageProxy::setDeviceScaleFactor.
1663
1664         * UIProcess/WebPageProxy.cpp:
1665         (WebKit::WebPageProxy::WebPageProxy): Initialize m_deviceScaleFactor.
1666         (WebKit::WebPageProxy::viewStateDidChange): Removed device-scale-factor-related code.
1667         (WebKit::WebPageProxy::setDeviceScaleFactor): Added. Records the new device scale factor and
1668         tells the DrawingAreaProxy about it if it's actually changed.
1669         (WebKit::WebPageProxy::creationParameters): Use m_deviceScaleFactor instead of calling out
1670         to the PageClient.
1671
1672         * UIProcess/WebPageProxy.h: Added m_deviceScaleFactor and setDeviceScaleFactor, which
1673         replaces the DeviceScaleFactor ViewStateFlag.
1674         (WebKit::WebPageProxy::deviceScaleFactor): Inlined this now-simple getter.
1675
1676 2011-08-17  Adam Roben  <aroben@apple.com>
1677
1678         Make WebCore keep track of the current device scale factor
1679
1680         Fixes <http://webkit.org/b/66413> WebCore requires every WebKit port to keep track of the
1681         device scale factor
1682
1683         Reviewed by Darin Adler.
1684
1685         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1686         * WebProcess/WebCoreSupport/WebChromeClient.h:
1687         Removed deviceScaleFactor.
1688
1689         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1690         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
1691         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
1692         (WebKit::DrawingAreaImpl::display):
1693         * WebProcess/WebPage/FindController.cpp:
1694         (WebKit::FindController::updateFindIndicator):
1695         (WebKit::FindController::hideFindIndicator):
1696         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
1697         (WebKit::LayerTreeHostCA::deviceScaleFactor):
1698         Changed to get the device scale factor from WebCore.
1699
1700         * WebProcess/WebPage/WebPage.cpp:
1701         (WebKit::WebPage::WebPage):
1702         (WebKit::WebPage::setDeviceScaleFactor):
1703         * WebProcess/WebPage/WebPage.h:
1704         Removed m_deviceScaleFactor. We always get the scale factor from WebCore now.
1705
1706 2011-08-17  Anders Carlsson  <andersca@apple.com>
1707
1708         Remove unused Core Animation related classes
1709         https://bugs.webkit.org/show_bug.cgi?id=66393
1710
1711         Reviewed by Darin Adler.
1712
1713         * Shared/mac/CoreAnimationRenderer.h: Removed.
1714         * Shared/mac/CoreAnimationRenderer.mm: Removed.
1715         * Shared/mac/ShareableSurface.cpp: Removed.
1716         * Shared/mac/ShareableSurface.h: Removed.
1717         * WebKit2.xcodeproj/project.pbxproj:
1718
1719 2011-08-15  Dmitry Titov  <dimich@chromium.org>
1720
1721         FrameLoaderClient::transferLoadingResourceFromPage does not have enough parameters
1722         https://bugs.webkit.org/show_bug.cgi?id=66165
1723
1724         Reviewed by Darin Fisher.
1725
1726         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1727         (WebKit::WebFrameLoaderClient::transferLoadingResourceFromPage):
1728         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1729
1730 2011-08-15  Balazs Kelemen  <kbalazs@webkit.org>
1731
1732         [Qt][WK2] Unreviewed build fix after r93058.
1733
1734         * UIProcess/TiledDrawingAreaProxy.cpp:
1735         (WebKit::TiledDrawingAreaProxy::deviceScaleFactorDidChange):
1736         * UIProcess/TiledDrawingAreaProxy.h:
1737
1738 2011-08-15  Adam Roben  <aroben@apple.com>
1739
1740         Update pages' style and content scale when the window's backing scale factor changes
1741
1742         Unfortunately, I couldn't think of a way to test this in an automated fashion.
1743
1744         Fixes <http://webkit.org/b/66229> <rdar://problem/9906269> WebKit doesn't react to device
1745         scale factor changes
1746
1747         Reviewed by Simon Fraser.
1748
1749         * UIProcess/API/mac/WKView.mm:
1750         (-[WKView addWindowObserversForWindow:]):
1751         (-[WKView removeWindowObservers]):
1752         Listen for the notification that tells us the window's backing scale has changed.
1753
1754         (-[WKView _windowDidChangeResolution:]): Tell the WebPageProxy about the change.
1755
1756         * UIProcess/DrawingAreaProxy.h:
1757         * UIProcess/DrawingAreaProxyImpl.h:
1758         Added deviceScaleFactorDidChange.
1759
1760         * UIProcess/DrawingAreaProxyImpl.cpp:
1761         (WebKit::DrawingAreaProxyImpl::deviceScaleFactorDidChange): Request a new backing store
1762         since the current one is using an old device scale factor.
1763         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState): Send the device scale factor
1764         along to the web process so it can render accordingly. This is how we tell the web process
1765         about device scale factor changes.
1766
1767         * UIProcess/WebPageProxy.cpp:
1768         (WebKit::WebPageProxy::viewStateDidChange): Tell the DrawingAreaProxy when the device scale
1769         factor changes.
1770         (WebKit::WebPageProxy::deviceScaleFactor): Added this simple getter that calls through to
1771         the PageClient. DrawingAreaProxy uses this function.
1772
1773         * UIProcess/WebPageProxy.h: Added new members.
1774
1775         * WebProcess/WebPage/DrawingArea.h:
1776         (WebKit::DrawingArea::updateBackingStoreState):
1777         * WebProcess/WebPage/DrawingArea.messages.in:
1778         * WebProcess/WebPage/DrawingAreaImpl.h:
1779         Send the device scale factor in the UpdateBackingStoreState message.
1780
1781         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1782         (WebKit::DrawingAreaImpl::updateBackingStoreState): Tell the WebPage and LayerTreeHost about
1783         the new device scale factor.
1784
1785         * WebProcess/WebPage/LayerTreeHost.h:
1786         * WebProcess/WebPage/ca/LayerTreeHostCA.h:
1787         Added deviceScaleFactorDidChange.
1788
1789         * WebProcess/WebPage/WebPage.cpp:
1790         (WebKit::WebPage::setDeviceScaleFactor): Store the new scale factor and tell the page about
1791         it so that, e.g., scale-factor-dependent media queries will be reevaluated.
1792
1793         * WebProcess/WebPage/WebPage.h: Added setDeviceScaleFactor.
1794
1795         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
1796         (WebKit::LayerTreeHostCA::deviceScaleFactorDidChange): Tell the layer for non-composited
1797         content about the new scale factor.
1798
1799 2011-08-15  Benjamin Poulain  <benjamin@webkit.org>
1800
1801         [Qt][WK2] Get rid of QTouchWebPagePrivate::getPageViewPrivate()
1802         https://bugs.webkit.org/show_bug.cgi?id=66222
1803
1804         Reviewed by Kenneth Rohde Christiansen.
1805
1806         The function QTouchWebPagePrivate::getPageViewPrivate() exposed
1807         the private QTouchWebPage to any object in WebKit.
1808
1809         Instead, use the friend keyword to list which objects can access
1810         the internal of QTouchWebPage.
1811
1812         * UIProcess/API/qt/qtouchwebpage.h:
1813         * UIProcess/API/qt/qtouchwebpage_p.h:
1814         * UIProcess/API/qt/qtouchwebview.cpp:
1815         (QTouchWebViewPrivate::QTouchWebViewPrivate):
1816         (QTouchWebViewPrivate::viewportRectUpdated):
1817
1818 2011-08-15  Balazs Kelemen  <kbalazs@webkit.org>
1819
1820         Unreviewed.
1821         Fix Qt-WK2 build after r93040.
1822
1823         * UIProcess/qt/QtWebPageProxy.h:
1824         (QtWebPageProxy::deviceScaleFactor):
1825
1826 2011-08-10  Adam Roben  <aroben@apple.com>
1827
1828         Clear up scale factor terminology
1829
1830         WebKit by and large deals with two scale factors: one intrinsic to the device on which the
1831         software is running, and one that is per-Page and can be controlled via API calls. This
1832         patch names the former "deviceScaleFactor" and the latter "pageScaleFactor", and makes the
1833         code use those names. It should introduce no behavior changes.
1834
1835         Fixes <http://webkit.org/b/55787> WebKit uses multiple conflicting names to refer to the
1836         device scale factor
1837
1838         Reviewed by Simon Fraser.
1839
1840         * Shared/UpdateInfo.cpp:
1841         * Shared/UpdateInfo.h:
1842         * Shared/WebPageCreationParameters.cpp:
1843         * Shared/WebPageCreationParameters.h:
1844         * UIProcess/API/C/WKPage.cpp:
1845         * UIProcess/API/efl/PageClientImpl.cpp:
1846         * UIProcess/API/efl/PageClientImpl.h:
1847         * UIProcess/API/gtk/PageClientImpl.h:
1848         * UIProcess/API/mac/PageClientImpl.h:
1849         * UIProcess/API/mac/PageClientImpl.mm:
1850         * UIProcess/BackingStore.cpp:
1851         * UIProcess/BackingStore.h:
1852         * UIProcess/DrawingAreaProxyImpl.cpp:
1853         * UIProcess/PageClient.h:
1854         * UIProcess/WebPageProxy.cpp:
1855         * UIProcess/WebPageProxy.h:
1856         * UIProcess/WebPageProxy.messages.in:
1857         * UIProcess/WebPopupMenuProxy.h:
1858         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
1859         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
1860         * UIProcess/mac/BackingStoreMac.mm:
1861         * UIProcess/mac/WebPageProxyMac.mm:
1862         * UIProcess/mac/WebPopupMenuProxyMac.h:
1863         * UIProcess/mac/WebPopupMenuProxyMac.mm:
1864         * UIProcess/qt/WebPopupMenuProxyQt.h:
1865         * UIProcess/win/WebPopupMenuProxyWin.h:
1866         * UIProcess/win/WebView.h:
1867         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1868         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1869         * WebProcess/WebCoreSupport/WebChromeClient.h:
1870         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1871         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1872         * WebProcess/WebPage/FindController.cpp:
1873         * WebProcess/WebPage/WebPage.cpp:
1874         * WebProcess/WebPage/WebPage.h:
1875         * WebProcess/WebPage/WebPage.messages.in:
1876         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
1877         * WebProcess/WebPage/ca/LayerTreeHostCA.h:
1878
1879 2011-08-13  Sam Weinig  <sam@webkit.org>
1880
1881         Remove unused variables from WKFullScreenWindowController.h
1882         https://bugs.webkit.org/show_bug.cgi?id=66193
1883
1884         Reviewed by Dan Bernstein.
1885
1886         * UIProcess/mac/WKFullScreenWindowController.h:
1887         Remove _layerViewPlaceholder, _isWindowLoaded and _initialFrame which were not used.
1888
1889 2011-08-12  Dan Bernstein  <mitz@apple.com>
1890
1891         <rdar://problem/7337717> Add an option to automatically show tooltips (with the full text) over truncated text
1892         https://bugs.webkit.org/show_bug.cgi?id=66178
1893
1894         Reviewed by Simon Fraser.
1895
1896         * Shared/WebPreferencesStore.h:
1897         * UIProcess/API/C/WKPreferences.cpp:
1898         (WKPreferencesSetShowsToolTipOverTruncatedText): Added this setter.
1899         (WKPreferencesGetShowsToolTipOverTruncatedText): Added this getter.
1900         * UIProcess/API/C/WKPreferencesPrivate.h:
1901         * WebProcess/WebPage/WebPage.cpp:
1902         (WebKit::WebPage::updatePreferences): Handle the showsToolTipOverTruncatedText preference.
1903
1904 2011-08-12  Mark Rowe  <mrowe@apple.com>
1905
1906         Be more forward-looking in the choice of compiler.
1907
1908         Rubber-stamped by Jon Honeycutt.
1909
1910         * Configurations/CompilerVersion.xcconfig:
1911
1912 2011-08-11  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
1913
1914         VectorArgumentCoder doesn't encode/decode enough data for more than one byte vector elements
1915         https://bugs.webkit.org/show_bug.cgi?id=66109
1916
1917         Reviewed by Anders Carlsson.
1918
1919         Multiply vector size by element size in encode/decode to get correct byte size of vector data.
1920
1921         * Platform/CoreIPC/ArgumentCoders.h:
1922
1923 2011-08-11  Nico Weber  <thakis@chromium.org>
1924
1925         Remove incorrect comment about m_wheelEventHandlerCount
1926         https://bugs.webkit.org/show_bug.cgi?id=66117
1927
1928         Reviewed by Simon Fraser.
1929
1930         From what I can tell, this number is changed only in
1931         Frame::notifyChromeClientWheelEventHandlerCountChanged(),
1932         and there it just reads the number modified in
1933         Document::didAdd/RemoveWheelEventHandler(). So this is just the number
1934         of event handlers (and not related to horizontal scrollbars), and the
1935         variable name expresses that already.
1936
1937         * UIProcess/WebPageProxy.h:
1938
1939 2011-08-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1940
1941         [Qt/WK2] Add initial support for viewport meta tag
1942         https://bugs.webkit.org/show_bug.cgi?id=65975
1943
1944         Reviewed by Benjamin Poulain.
1945
1946         Redirect the viewport arguments through to the view.
1947
1948         * UIProcess/API/qt/qdesktopwebview.cpp:
1949         (QDesktopWebViewPrivate::didReceiveViewportArguments):
1950         * UIProcess/API/qt/qdesktopwebview_p.h:
1951         * UIProcess/API/qt/qtouchwebview.cpp:
1952         (QTouchWebView::geometryChanged):
1953         * UIProcess/qt/QtWebPageProxy.cpp:
1954         (QtWebPageProxy::setViewportArguments):
1955         * UIProcess/qt/QtWebPageProxy.h:
1956         * UIProcess/qt/TouchViewInterface.cpp:
1957         (WebKit::TouchViewInterface::updateViewportState):
1958         (WebKit::TouchViewInterface::didReceiveViewportArguments):
1959         * UIProcess/qt/TouchViewInterface.h:
1960         (WebKit::TouchViewInterface::ViewportState::ViewportState):
1961         * UIProcess/qt/ViewInterface.h:
1962         * UIProcess/qt/qtouchwebpageproxy.cpp:
1963         (QTouchWebPageProxy::QTouchWebPageProxy):
1964         * UIProcess/qt/qtouchwebpageproxy.h:
1965
1966 2011-08-10  David Hyatt  <hyatt@apple.com>
1967
1968         https://bugs.webkit.org/show_bug.cgi?id=66004
1969
1970         Removing the CSS Regions and CSS Exclusions ifdefs.
1971
1972         Reviewed by Adam Roben.
1973
1974         * Configurations/FeatureDefines.xcconfig:
1975
1976 2011-08-10  Alexey Proskuryakov  <ap@apple.com>
1977
1978         Accidentally commented out an assertion in BackingStore::incorporateUpdate
1979         https://bugs.webkit.org/show_bug.cgi?id=65989
1980
1981         Reviewed by Anders Carlsson.
1982
1983         I couldn't get this assertion to fire in quick testing, let's bring it back.
1984
1985         * UIProcess/BackingStore.cpp: (WebKit::BackingStore::incorporateUpdate):
1986
1987 2011-08-10  Lars Knudsen  <lars.knudsen@nokia.com>
1988
1989         Add device specific settings to support viewport computing
1990         https://bugs.webkit.org/show_bug.cgi?id=65984
1991
1992         Reviewed by Kenneth Rohde Christiansen.
1993
1994         Expose new viewport related WebCore settings to WebKit2.
1995
1996         * Shared/WebPreferencesStore.h:
1997         * WebProcess/WebPage/WebPage.cpp:
1998         (WebKit::WebPage::updatePreferences):
1999
2000 2011-08-09  John Sullivan  <sullivan@apple.com>
2001
2002         WKPageCopyPendingAPIRequestURL returns stale result if policy decision set to Ignore
2003         https://bugs.webkit.org/show_bug.cgi?id=65950
2004         <rdar://problem/9925931>
2005
2006         Reviewed by Anders Carlsson.
2007
2008         * UIProcess/WebPageProxy.cpp:
2009         (WebKit::WebPageProxy::receivedPolicyDecision):
2010         Call clearPendingAPIRequestURL() if the policy decision is PolicyIgnore.
2011
2012 2011-08-09  Anders Carlsson  <andersca@apple.com>
2013
2014         Add a WebKit prefix to the user default.
2015
2016         Reviewed by Dan Bernstein.
2017
2018         * UIProcess/mac/WebContextMac.mm:
2019         (WebKit::WebContext::platformInitializeWebProcess):
2020
2021 2011-08-09  Anders Carlsson  <andersca@apple.com>
2022
2023         Add a user default to disable the plug-in process message timeout
2024         https://bugs.webkit.org/show_bug.cgi?id=65945
2025
2026         Reviewed by Adam Roben.
2027
2028         * Shared/WebProcessCreationParameters.cpp:
2029         (WebKit::WebProcessCreationParameters::encode):
2030         (WebKit::WebProcessCreationParameters::decode):
2031         * Shared/WebProcessCreationParameters.h:
2032         Add a disablePluginProcessMessageTimeout member variable.
2033
2034         * UIProcess/mac/WebContextMac.mm:
2035         (WebKit::WebContext::platformInitializeWebProcess):
2036         Initialize the disablePluginProcessMessageTimeout member variable from the 
2037         "DisablePluginProcessMessageTimeout" user default.
2038
2039         * WebProcess/Plugins/PluginProcessConnection.cpp:
2040         (WebKit::defaultSyncMessageTimeout):
2041         Return NoTimeout if WebProcess::disablePluginProcessMessageTimeout returns true.
2042
2043         * WebProcess/WebProcess.cpp:
2044         (WebKit::WebProcess::WebProcess):
2045         (WebKit::WebProcess::initializeWebProcess):
2046         Initialize m_disablePluginProcessMessageTimeout.
2047         
2048         * WebProcess/WebProcess.h:
2049         (WebKit::WebProcess::disablePluginProcessMessageTimeout):
2050         Add getter.
2051
2052 2011-08-09  Mark Hahnenberg  <mhahnenberg@apple.com>
2053
2054         Add ParentClass typedef in all JSC classes
2055         https://bugs.webkit.org/show_bug.cgi?id=65731
2056
2057         Reviewed by Oliver Hunt.
2058
2059         Just added the Base typedefs in all the classes that are a subclass of JSCell 
2060         to point at their parent classes.  This is a change to support future changes to the way
2061         constructors and destructors are implemented in JS objects, among other things.
2062
2063         * WebProcess/Plugins/Netscape/JSNPMethod.h:
2064         * WebProcess/Plugins/Netscape/JSNPObject.h:
2065
2066 2011-08-08  Adrienne Walker  <enne@google.com>
2067
2068         Add testing for --force-compositing-mode to windows.internal
2069         https://bugs.webkit.org/show_bug.cgi?id=65777
2070
2071         Reviewed by Adam Barth.
2072
2073         Add exports for Document::settings().
2074
2075         * win/WebKit2.def:
2076         * win/WebKit2CFLite.def:
2077
2078 2011-08-09  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2079
2080         [Qt] Redirect didFindZoomableArea thru to the view
2081         https://bugs.webkit.org/show_bug.cgi?id=65913
2082
2083         Reviewed by Andreas Kling.
2084
2085         * UIProcess/API/qt/qdesktopwebview.cpp:
2086         (QDesktopWebViewPrivate::didFindZoomableArea):
2087         * UIProcess/API/qt/qdesktopwebview_p.h:
2088         * UIProcess/qt/QtWebPageProxy.cpp:
2089         (QtWebPageProxy::didFindZoomableArea):
2090         * UIProcess/qt/QtWebPageProxy.h:
2091         * UIProcess/qt/TouchViewInterface.cpp:
2092         (WebKit::TouchViewInterface::didFindZoomableArea):
2093         * UIProcess/qt/TouchViewInterface.h:
2094         * UIProcess/qt/ViewInterface.h:
2095         * UIProcess/qt/qdesktopwebpageproxy.cpp:
2096         (QDesktopWebPageProxy::timerEvent):
2097         * UIProcess/qt/qdesktopwebpageproxy.h:
2098         * UIProcess/qt/qtouchwebpageproxy.cpp:
2099         (QTouchWebPageProxy::setContentsScale):
2100         * UIProcess/qt/qtouchwebpageproxy.h:
2101
2102 2011-08-09  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2103
2104         [Qt] Vastly improve the algorithm for finding a zoomable area when doing double-tap
2105         https://bugs.webkit.org/show_bug.cgi?id=65907
2106
2107         Reviewed by Andreas Kling.
2108
2109         This is upstreaming of the algorithm we are currently using on the N9 browser
2110         and this also fixes a bug with not considering the frame positions when finding
2111         a zoomable area.
2112
2113         * UIProcess/PageClient.h:
2114         * UIProcess/WebPageProxy.cpp:
2115         (WebKit::WebPageProxy::didFindZoomableArea):
2116         * UIProcess/WebPageProxy.h:
2117         * UIProcess/WebPageProxy.messages.in:
2118         * UIProcess/qt/qdesktopwebpageproxy.cpp:
2119         (QDesktopWebPageProxy::didFindZoomableArea):
2120         * UIProcess/qt/qdesktopwebpageproxy.h:
2121         * UIProcess/qt/qtouchwebpageproxy.cpp:
2122         (QTouchWebPageProxy::didFindZoomableArea):
2123         * UIProcess/qt/qtouchwebpageproxy.h:
2124         * WebProcess/WebPage/WebPage.cpp:
2125         (WebKit::WebPage::findZoomableAreaForPoint):
2126
2127 2011-08-08  Chris Marrin  <cmarrin@apple.com>
2128
2129         Logic to compute visible display rect in GraphicsLayerCA::syncCompositingState
2130         https://bugs.webkit.org/show_bug.cgi?id=65708
2131
2132         Supply initial display rects for the full-screen case
2133
2134         Reviewed by Simon Fraser.
2135
2136         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
2137         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
2138         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation):
2139         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):
2140
2141 2011-08-08  Dan Bernstein  <mitz@apple.com>
2142
2143         <rdar://problem/9652350> REGRESSION (r87755): WKView doesn't update when I drag files into a background Safari window
2144         https://bugs.webkit.org/show_bug.cgi?id=65860
2145
2146         Reviewed by Simon Fraser.
2147
2148         When layer flush scheduling is re-enabled, schedule a layer flush, just in case one was requested while
2149         scheduling was disabled. It doesn’t seem worthwhile to track whether that in fact happened, so do so
2150         unconditionally.
2151
2152         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
2153         (WebKit::LayerTreeHostCAMac::setLayerFlushSchedulingEnabled):
2154         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
2155         (WebKit::LayerTreeHostCAWin::setLayerFlushSchedulingEnabled):
2156
2157 2011-08-05  Pavel Feldman  <pfeldman@chromium.org>
2158
2159         Web Inspector: implement dock/undock in WebKit2 without getting into WebCore.
2160         https://bugs.webkit.org/show_bug.cgi?id=65763
2161
2162         InspectorFrontendClient.h can't have synchronous canAttachWindow() returning value
2163         since in the multiprocess environment, you can't immediately get back to it from the host.
2164
2165         r92384 introduced an unhealthy WebKit -> WebCore -> WebKit canAttach query where embedder
2166         was asking itself a question. This loop was fixed.
2167
2168         Reviewed by Yury Semikhatsky.
2169
2170         * UIProcess/WebInspectorProxy.cpp:
2171         (WebKit::WebInspectorProxy::attach):
2172         (WebKit::WebInspectorProxy::createInspectorPage):
2173         (WebKit::WebInspectorProxy::didLoadInspectorPage):
2174         (WebKit::WebInspectorProxy::shouldOpenAttached):
2175         * UIProcess/WebInspectorProxy.h:
2176         * UIProcess/WebInspectorProxy.messages.in:
2177         * UIProcess/efl/WebInspectorEfl.cpp:
2178         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
2179         * UIProcess/gtk/WebInspectorGtk.cpp:
2180         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
2181         * UIProcess/mac/WebInspectorProxyMac.mm:
2182         (WebKit::WebInspectorProxy::platformOpen):
2183         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
2184         * UIProcess/qt/WebInspectorProxyQt.cpp:
2185         (WebKit::WebInspectorProxy::platformOpen):
2186         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
2187         * UIProcess/win/WebInspectorProxyWin.cpp:
2188         (WebKit::WebInspectorProxy::platformOpen):
2189         (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
2190         * WebProcess/WebPage/WebInspector.cpp:
2191         (WebKit::WebInspector::didLoadInspectorPage):
2192         * WebProcess/WebPage/WebInspector.h:
2193         * WebProcess/WebPage/WebInspector.messages.in:
2194
2195 2011-08-07  Joseph Pecoraro  <joepeck@webkit.org>
2196
2197         [QT] Possible Leaks WKRetainPtr<> should Adopt allocated Copy
2198         https://bugs.webkit.org/show_bug.cgi?id=65790
2199
2200         Reviewed by Sam Weinig.
2201
2202         Fix a leak by adopting an allocation instead of retaining it.
2203
2204         * UIProcess/qt/qwkhistory.cpp:
2205         (QWKHistoryItem::title):
2206         (QWKHistoryItem::url):
2207
2208 2011-08-06  Mark Rowe  <mrowe@apple.com>
2209
2210         Fix a memory leak found via code inspection.
2211
2212         Rubber-stamped by Dan Bernstein.
2213
2214         * WebProcess/Downloads/mac/DownloadMac.mm:
2215         (WebKit::setOriginalURLForDownload): Adopt the newly-allocated NSURL instance
2216         so that it does not leak.
2217
2218 2011-08-06  Aron Rosenberg  <arosenberg@logitech.com>
2219
2220         Reviewed by Benjamin Poulain.
2221
2222         [Qt] Fix build with Intel compiler on Windows
2223         https://bugs.webkit.org/show_bug.cgi?id=65088
2224
2225         Intel compiler needs .lib suffixes instead of .a
2226
2227         * WebKit2.pri:
2228
2229 2011-08-05  Darin Adler  <darin@apple.com>
2230
2231         Reviewed by Anders Carlsson.
2232
2233         [WebKit2] Fix code paths that can leave frame view paint behavior in the wrong state
2234         https://bugs.webkit.org/show_bug.cgi?id=63779
2235
2236         * WebProcess/Plugins/PluginView.cpp:
2237         (WebKit::PluginView::handleEvent): Unrelated cleanup. Removed unneeded local variable.
2238
2239         * WebProcess/WebPage/WebPage.cpp:
2240         (WebKit::WebPage::snapshotInViewCoordinates): Rearranged code so that the call to
2241         setPaintBehavior is after the early exit. Also got rid of unneeded save/restore since
2242         the function uses a graphics context that it then throws away.
2243         (WebKit::WebPage::scaledSnapshotInDocumentCoordinates): Ditto.
2244
2245 2011-08-04  Mark Rowe  <mrowe@apple.com>
2246
2247         Future-proof Xcode configuration settings.
2248
2249         * Configurations/Base.xcconfig:
2250         * Configurations/CompilerVersion.xcconfig:
2251         * Configurations/DebugRelease.xcconfig:
2252         * Configurations/Version.xcconfig:
2253         * Configurations/WebKit2.xcconfig:
2254
2255 2011-08-01  Brian Weinstein  <bweinstein@apple.com>
2256
2257         WebKit2: Web Inspector always starts in undocked mode
2258         https://bugs.webkit.org/show_bug.cgi?id=65493
2259         <rdar://problem/9353114>
2260         
2261         Reviewed by Adam Roben.
2262         
2263         When opening the inspector, the web process tells the UI process that the inspector page has loaded,
2264         but now will pass another bit of data, whether the inspector can start attached, so the UI process
2265         doesn't need to ask the web process to do another calculation on whether or not it can be attached.
2266         
2267         If the user prefers the inspector to start docked (this defaults to true), and there is room for the
2268         window, we send a message to the web process to try and attach the inspector. This makes sure that the
2269         inspector knows it is docked (in the web process).
2270         
2271         * UIProcess/WebInspectorProxy.cpp:
2272         (WebKit::WebInspectorProxy::attach): Update the user's docked/undocked preference if the inspector is visible
2273             when it was attached.
2274         (WebKit::WebInspectorProxy::detach): Ditto (but when it was detached).
2275         (WebKit::WebInspectorProxy::didLoadInspectorPage): If we can start docked, and the user prefers to start docked,
2276             then request the inspector be attached to the window.
2277         * UIProcess/WebInspectorProxy.h:
2278
2279         * UIProcess/mac/WebInspectorProxyMac.mm:
2280         (WebKit::WebInspectorProxy::platformOpen): Only show the window if we are going to start undocked.
2281         * UIProcess/win/WebInspectorProxyWin.cpp:
2282         (WebKit::WebInspectorProxy::platformOpen): Ditto.
2283
2284         * WebProcess/WebPage/WebInspector.cpp:
2285         (WebKit::WebInspector::didLoadInspectorPage): Pass whether or not we can attach the window.
2286         (WebKit::WebInspector::requestAttachWindow): Call through to the InspectorController to attach the inspector.
2287         (WebKit::WebInspector::canAttachWindow): Ask the InspectorController if we can attach the inspector.
2288         * WebProcess/WebPage/WebInspector.h:
2289
2290         * Shared/WebPreferencesStore.h: Add a new preference for whether or not the inspector should
2291             start attached.
2292
2293         * UIProcess/WebInspectorProxy.messages.in: When the inspector page is loaded, tell the UI Process whether
2294             we can attach the inspector without needing another message.
2295         * WebProcess/WebPage/WebInspector.messages.in: Add a new message for RequestAttachWindow
2296
2297 2011-08-02  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2298
2299         [Qt][WK2] Create scene graph nodes for tiles in QTouchWebView instead of using imperative painting.
2300         https://bugs.webkit.org/show_bug.cgi?id=65528
2301
2302         Reviewed by Benjamin Poulain.
2303
2304         Converts QTouchWebPage from QSGPaintedItem to a straight QSGItem.
2305         - A SGTileNode is created and added to the scene graph for each tile,
2306           positioning them relatively to the page.
2307           It's basically a QSGSimpleTextureNode with support for specifying a
2308           source rect plus for owning the QSGTexture for proper destruction on
2309           shutdown by the rendering thread.
2310         - Scale nodes are used as parent of tile nodes to revert the scaling set on the
2311           QTouchWebPage and allow us to keep using integer coordinates.
2312         - The SGAgent class is introduced to carry scene graph update request up to the
2313           updatePaintNode call of the item, which may be on the scene graph rendering thread.
2314
2315         * UIProcess/API/qt/qtouchwebpage.cpp:
2316         (QTouchWebPage::QTouchWebPage):
2317         (QTouchWebPage::updatePaintNode):
2318         Delegate scene graph updates to the SGAgent which received update requests from the tiled drawing area.
2319         (QTouchWebPage::event):
2320         (QTouchWebPage::geometryChanged):
2321         (QTouchWebPagePrivate::QTouchWebPagePrivate):
2322         * UIProcess/API/qt/qtouchwebpage.h:
2323         * UIProcess/API/qt/qtouchwebpage_p.h:
2324         * UIProcess/TiledDrawingAreaProxy.cpp:
2325         Manage the scale node in the TileSet, it will be the parent node of Tile nodes.
2326         (WebKit::TiledDrawingAreaTileSet::sgNodeID):
2327         (WebKit::TiledDrawingAreaTileSet::TiledDrawingAreaTileSet):
2328         (WebKit::TiledDrawingAreaTileSet::~TiledDrawingAreaTileSet):
2329         (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
2330         (WebKit::TiledDrawingAreaProxy::setContentsScale):
2331         (WebKit::TiledDrawingAreaProxy::createTiles):
2332         (WebKit::TiledDrawingAreaProxy::removeAllTiles):
2333         * UIProcess/TiledDrawingAreaTile.h:
2334         (WebKit::TiledDrawingAreaTile::create):
2335         * UIProcess/qt/SGAgent.cpp: Added.
2336         * UIProcess/qt/SGAgent.h: Added.
2337         * UIProcess/qt/SGTileNode.cpp: Added.
2338         * UIProcess/qt/SGTileNode.h: Added.
2339         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
2340         Disable the paint call and update the scene graph on incorporateUpdate through the SGAgent.
2341         (WebKit::TiledDrawingAreaProxy::updateWebView):
2342         * UIProcess/qt/TiledDrawingAreaTileQt.cpp:
2343         (WebKit::TiledDrawingAreaTile::TiledDrawingAreaTile):
2344         (WebKit::TiledDrawingAreaTile::~TiledDrawingAreaTile):
2345         (WebKit::TiledDrawingAreaTile::isReadyToPaint):
2346         (WebKit::TiledDrawingAreaTile::swapBackBufferToFront):
2347         (WebKit::TiledDrawingAreaTile::paint):
2348         (WebKit::TiledDrawingAreaTile::incorporateUpdate):
2349         (WebKit::TiledDrawingAreaTile::disableUpdates):
2350         (WebKit::TiledDrawingAreaTile::setParentNodeID):
2351         * UIProcess/qt/TouchViewInterface.cpp:
2352         (WebKit::TouchViewInterface::sceneGraphAgent):
2353         (WebKit::TouchViewInterface::setViewNeedsDisplay):
2354         * UIProcess/qt/TouchViewInterface.h:
2355         * WebKit2.pro:
2356
2357 2011-08-04  Alexis Menard  <alexis.menard@openbossa.org>
2358
2359         [Qt] Make navigation actions properly usable in QML.
2360         https://bugs.webkit.org/show_bug.cgi?id=65624
2361
2362         Add a new class that is exposed in QML to control the navigation
2363         like reload/stop/back/forward. Enums are not very QML friendly,
2364         it not possible to use enums that are not declared in the same class
2365         than the object exposed in QML, therefore it makes hard the sharing
2366         between the desktop and the touch views. In addition namespaced enums are
2367         even harder to support in QML. QWebNavigationController is
2368         not really meant to be used in C++ but it is exported for convenience
2369         reason (tests and MiniBrowser) so its API is not meant to be public but
2370         exposed in QML through properties and convenience slots. The QML code to use
2371         the navigation action in QML will look like "desktopView.navigation.reload();"
2372         or "if (desktopView.navigation.reloadAction.enabled) ...".
2373
2374         Reviewed by Benjamin Poulain.
2375
2376         * UIProcess/API/qt/WKView.h: To get the forward header generated
2377         * UIProcess/API/qt/qdesktopwebview.cpp:
2378         (QDesktopWebViewPrivate::QDesktopWebViewPrivate):
2379         (QDesktopWebView::navigationController):
2380         * UIProcess/API/qt/qdesktopwebview.h:
2381         * UIProcess/API/qt/qdesktopwebview_p.h:
2382         * UIProcess/API/qt/qmlplugin/plugin.cpp:
2383         (WebKit2QmlPlugin::registerTypes):
2384         * UIProcess/API/qt/qtouchwebpage.cpp:
2385         (QTouchWebPage::navigationController):
2386         (QTouchWebPagePrivate::QTouchWebPagePrivate):
2387         * UIProcess/API/qt/qtouchwebpage.h:
2388         * UIProcess/API/qt/qtouchwebpage_p.h:
2389         * UIProcess/API/qt/qwebnavigationcontroller.cpp: Added.
2390         (QWebNavigationControllerPrivate::QWebNavigationControllerPrivate):
2391         (QWebNavigationController::QWebNavigationController):
2392         (QWebNavigationController::~QWebNavigationController):
2393         (QWebNavigationController::backAction):
2394         (QWebNavigationController::forwardAction):
2395         (QWebNavigationController::stopAction):
2396         (QWebNavigationController::reloadAction):
2397         (QWebNavigationController::navigationAction):
2398         (QWebNavigationController::back):
2399         (QWebNavigationController::forward):
2400         (QWebNavigationController::stop):
2401         (QWebNavigationController::reload):
2402         * UIProcess/API/qt/qwebnavigationcontroller.h: Added.
2403         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
2404         (WebViewAbstraction::triggerNavigationAction):
2405         * UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp:
2406         (tst_QDesktopWebView::navigationActionsStatusAtStartup):
2407         (LoadStartedCatcher::onLoadStarted):
2408         (tst_QDesktopWebView::stopActionEnabledAfterLoadStarted):
2409         * UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp:
2410         (tst_QTouchWebView::navigationActionsStatusAtStartup):
2411         * WebKit2API.pri:
2412
2413 2011-08-03  Jeff Miller  <jeffm@apple.com>
2414
2415         Use of AVFoundation should default to off on Windows
2416         https://bugs.webkit.org/show_bug.cgi?id=65660
2417
2418         Reviewed by Darin Adler.
2419
2420         * Shared/WebPreferencesStore.h: Change default value for AVFoundationEnabled to false on Windows, it's still true on other platforms.
2421
2422 2011-08-03  Mark Rowe  <mrowe@apple.com>
2423
2424         Bring some order to FeatureDefines.xcconfig to make it easier to follow.
2425
2426         Reviewed by Sam Weinig.
2427
2428         * Configurations/FeatureDefines.xcconfig:
2429
2430 2011-08-03  Mark Rowe  <mrowe@apple.com>
2431
2432         Clean up FeatureDefines.xcconfig to remove some unnecessary conditional settings
2433
2434         Reviewed by Dave Kilzer.
2435
2436         * Configurations/FeatureDefines.xcconfig:
2437
2438 2011-08-03  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2439
2440         [Qt] [WK2] Improve position of context menu for QDesktopWebView
2441         https://bugs.webkit.org/show_bug.cgi?id=65635
2442
2443         Reviewed by Andreas Kling.
2444
2445         Do not assume that the QDesktopWebView takes the entire canvas when
2446         positioning the context menu.
2447
2448         * UIProcess/API/qt/qdesktopwebview.cpp:
2449         (QDesktopWebViewPrivate::showContextMenu):
2450
2451 2011-08-03  Anders Carlsson  <andersca@apple.com>
2452
2453         Fix API tests.
2454
2455         Initialize threading before trying to allocate the WebContext.
2456
2457         * UIProcess/WebContext.cpp:
2458         (WebKit::WebContext::sharedProcessContext):
2459         (WebKit::WebContext::create):
2460
2461 2011-08-03  Pavel Feldman  <pfeldman@google.com>
2462
2463         Web Inspector: [Timeline] Hover on paint events and see rect outline around that area.
2464         https://bugs.webkit.org/show_bug.cgi?id=65510
2465
2466         Reviewed by Yury Semikhatsky.
2467
2468         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2469         (WebKit::WebInspectorClient::drawRect):
2470
2471 2011-08-02  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2472
2473         [Qt] [WK2] Expose web view classes to QML
2474         https://bugs.webkit.org/show_bug.cgi?id=65339
2475
2476         Reviewed by Benjamin Poulain.
2477
2478         This patch also uses QuickTest from QtDeclarative to provide the basic autotest
2479         infrastructure for the exposed elements.
2480
2481         * UIProcess/API/qt/qmlplugin/plugin.cpp: Added.
2482         (WebKit2QmlPlugin::registerTypes):
2483         * UIProcess/API/qt/qmlplugin/qmldir: Added.
2484         * UIProcess/API/qt/qmlplugin/qmlplugin.pro: Added.
2485         * UIProcess/API/qt/qtouchwebpage.h: Expose load() to QML environment.
2486         * UIProcess/API/qt/qtouchwebview.h: Since QTouchWebPage* doesn't change once set
2487         in the constructor, we mark the page property as CONSTANT. This avoid QML
2488         warnings for not having a NOTIFY signal for the property change.
2489
2490         * UIProcess/API/qt/tests/tests.pro:
2491         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml: Added.
2492         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml: Added.
2493         * UIProcess/API/qt/tests/qmltests/common/test1.html: Added.
2494         * UIProcess/API/qt/tests/qmltests/qmltests.pro: Added.
2495         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp: Added.
2496
2497 2011-08-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2498
2499         [GTK] Install web and plugin processes in libexecdir instead of bindir
2500         https://bugs.webkit.org/show_bug.cgi?id=65600
2501
2502         Reviewed by Martin Robinson.
2503
2504         Launch processes from libexecdir or WEBKIT_EXEC_PATH
2505         environment variable when it's set. This variable will be used by
2506         MiniBrowser and unit tests to find processes without having to
2507         install them.
2508
2509         * GNUmakefile.am:
2510         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2511         (WebKit::ProcessLauncher::launchProcess):
2512
2513 2011-08-03  Pavel Feldman  <pfeldman@chromium.org>
2514
2515         Web Inspector: remove Node parameter from the InspectorClient::highlight
2516         https://bugs.webkit.org/show_bug.cgi?id=65549
2517
2518         Reviewed by Yury Semikhatsky.
2519
2520         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2521         (WebKit::WebInspectorClient::highlight):
2522         * WebProcess/WebCoreSupport/WebInspectorClient.h:
2523
2524 2011-08-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2525
2526         [GTK] Reorganize pkg-config files
2527         https://bugs.webkit.org/show_bug.cgi?id=65548
2528
2529         Reviewed by Martin Robinson.
2530
2531         * GNUmakefile.am: Rename pc file as webkit2gtk.pc.in. WebKit2
2532         depends on gtk3 unconditionally so we don't need to use
2533         WEBKITGTK_PC_NAME.
2534         * webkit2gtk.pc.in: Renamed from Source/WebKit2/gtk/webkit2.pc.in.
2535
2536 2011-08-01  Michael Saboff  <msaboff@apple.com>
2537
2538         Virtual copying of FastMalloc allocated memory causes madvise MADV_FREE_REUSABLE errors
2539         https://bugs.webkit.org/show_bug.cgi?id=65502
2540
2541         Reviewed by Anders Carlsson.
2542
2543         Changed OOL message to use MACH_MSG_PHYSICAL_COPY flag instead of virtual flag
2544         so that the original memory region isn't referenced by the message and ultimately
2545         the receiving process.  The additional reference caused madvise(MADV_FREE_REUSABLE)
2546         to fail when it encountered such pages.
2547
2548         * Platform/CoreIPC/mac/ConnectionMac.cpp:
2549         (CoreIPC::Connection::sendOutgoingMessage):
2550
2551 2011-07-29  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2552
2553         [Qt] Add QtWebProcess in PATH at runtime for WebKit2 API auto tests.
2554         https://bugs.webkit.org/show_bug.cgi?id=65378
2555
2556         Reviewed by Benjamin Poulain.
2557
2558         This prevent the runner of the tests from having to add it to PATH himself.
2559
2560         * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp:
2561         (tst_CommonViewTests::tst_CommonViewTests):
2562         * UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp:
2563         (tst_QDesktopWebView::tst_QDesktopWebView):
2564         * UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp:
2565         (tst_QTouchWebView::tst_QTouchWebView):
2566         * UIProcess/API/qt/tests/tests.pri:
2567         * UIProcess/API/qt/tests/util.cpp: Copied from Source/WebKit2/UIProcess/API/qt/tests/util.h.
2568         Move definitions to a cpp file to prevent unused static symbol warnings.
2569         (addQtWebProcessToPath):
2570         (waitForSignal):
2571         * UIProcess/API/qt/tests/util.h:
2572
2573 2011-07-12  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2574
2575         TiledDrawingArea: Handle update requests in the order they were received.
2576         https://bugs.webkit.org/show_bug.cgi?id=64365
2577
2578         Reviewed by Andreas Kling.
2579
2580         TiledDrawingAreaProxy::createTiles() uses the distance of tiles to the
2581         center of the viewport to decide which tile should be rendered first.
2582         This logic is useless if the requests are not handled in the same order
2583         as they were received.
2584         Now use a list instead of a map to hold pending tile update requests.
2585
2586         * WebProcess/WebPage/TiledDrawingArea.cpp:
2587         (WebKit::TiledDrawingArea::tileUpdateTimerFired):
2588         (WebKit::TiledDrawingArea::cancelTileUpdate):
2589         (WebKit::TiledDrawingArea::requestTileUpdate):
2590         * WebProcess/WebPage/TiledDrawingArea.h:
2591
2592 2011-08-02  Amruth Raj  <amruthraj@motorola.com>
2593
2594         Custom cursors cause the WebProcess to crash
2595         https://bugs.webkit.org/show_bug.cgi?id=64802
2596
2597         Reviewed by Martin Robinson.
2598
2599         * Shared/WebCoreArgumentCoders.cpp:
2600         (CoreIPC::::encode): In case of a NULL cursor image, encode a bool indicating that.
2601         (CoreIPC::::decode): Decode the image only if required.
2602
2603 2011-08-01  Scott Graham  <scottmg@chromium.org>
2604
2605         REGRESSION (r39725?): Resources removed from document can not be freed until the document is deleted
2606         https://bugs.webkit.org/show_bug.cgi?id=61006
2607
2608         Reviewed by Antti Koivisto.
2609
2610         Update exports for test harness.
2611
2612         * win/WebKit2.def:
2613         * win/WebKit2CFLite.def:
2614
2615 2011-08-01  Hayato Ito  <hayato@chromium.org>
2616
2617         Add support for getting an element in shadow root by its id into a window.internals object.
2618         https://bugs.webkit.org/show_bug.cgi?id=64587
2619
2620         Reviewed by Hajime Morita.
2621
2622         * win/WebKit2.def:
2623         * win/WebKit2CFLite.def:
2624
2625 2011-08-01  Sheriff Bot  <webkit.review.bot@gmail.com>
2626
2627         Unreviewed, rolling out r92108.
2628         http://trac.webkit.org/changeset/92108
2629         https://bugs.webkit.org/show_bug.cgi?id=65459
2630
2631         breaks SL compile (Requested by tonyg-cr on #webkit).
2632
2633         * Shared/WebCoreArgumentCoders.cpp:
2634         (CoreIPC::::encode):
2635         (CoreIPC::::decode):
2636
2637 2011-08-01  Amruth Raj  <amruthraj@motorola.com>
2638
2639         Custom cursors cause the WebProcess to crash
2640         https://bugs.webkit.org/show_bug.cgi?id=64802
2641
2642         Reviewed by Darin Adler.
2643
2644         * Shared/WebCoreArgumentCoders.cpp:
2645         (CoreIPC::::encode): In case of a NULL cursor image, encode a bool indicating that.
2646         (CoreIPC::::decode): Decode the image only if required.
2647
2648 2011-07-31  Daniel Bates  <dbates@webkit.org>
2649
2650         Try again to fix the WinCairo Debug build after r92059 ( https://bugs.webkit.org/show_bug.cgi?id=65419).
2651
2652         * win/WebKit2CFLite.def: Export symbols needed by Internals.
2653
2654 2011-07-30  Dan Bernstein  <mitz@apple.com>
2655
2656         Try to fix the Windows build after r92059.
2657
2658         * win/WebKit2.def: Export symbols needed by Internals.
2659
2660 2011-07-30  Patrick Gansterer  <paroga@webkit.org>
2661
2662         Remove inclusion of MainThread.h from Threading.h
2663         https://bugs.webkit.org/show_bug.cgi?id=65081
2664
2665         Reviewed by Darin Adler.
2666
2667         Add missing include statements for MainThread.
2668
2669         * PluginProcess/gtk/PluginProcessMainGtk.cpp:
2670         * PluginProcess/mac/PluginProcessMainMac.mm:
2671         * PluginProcess/qt/PluginProcessMainQt.cpp:
2672         * UIProcess/API/mac/WKPrintingView.mm:
2673         * UIProcess/Launcher/mac/ThreadLauncherMac.mm:
2674         * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
2675         * UIProcess/Launcher/win/ThreadLauncherWin.cpp:
2676         * UIProcess/WebContext.cpp:
2677         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
2678         * WebProcess/efl/WebProcessMainEfl.cpp:
2679         * WebProcess/gtk/WebProcessMainGtk.cpp:
2680         * WebProcess/mac/KeychainItemShimMethods.mm:
2681         * WebProcess/mac/WebProcessMainMac.mm:
2682         * WebProcess/qt/WebProcessMainQt.cpp:
2683         * WebProcess/win/WebProcessMainWin.cpp:
2684
2685 2011-07-30  Balazs Kelemen  <kbalazs@webkit.org>
2686
2687         [Qt][WK2] Fix the build afer r92014
2688         https://bugs.webkit.org/show_bug.cgi?id=65410
2689
2690         Reviewed by Noam Rosenthal.
2691
2692         * Shared/ShareableBitmap.h:
2693         * UIProcess/qt/qdesktopwebpageproxy.cpp:
2694         (QDesktopWebPageProxy::paintContent):
2695
2696 2011-07-29  Sam Weinig  <sam@webkit.org>
2697
2698         Move Region code from WebKit2 to WebCore
2699         https://bugs.webkit.org/show_bug.cgi?id=65392
2700
2701         Reviewed by David Hyatt.
2702
2703         * CMakeLists.txt:
2704         * GNUmakefile.am:
2705         * WebKit2.pro:
2706         * WebKit2.xcodeproj/project.pbxproj:
2707         * win/WebKit2.vcproj:
2708         Update project files.
2709
2710         * Platform/Region.cpp: Removed.
2711         * Platform/Region.h: Removed.
2712         Remove Region files.
2713
2714         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2715         (webkitWebViewBaseDraw):
2716         * UIProcess/API/mac/WKView.mm:
2717         * UIProcess/DrawingAreaProxyImpl.cpp:
2718         * UIProcess/DrawingAreaProxyImpl.h:
2719         * UIProcess/qt/qdesktopwebpageproxy.cpp:
2720         * UIProcess/win/WebView.cpp:
2721         * WebProcess/WebPage/DrawingAreaImpl.h:
2722         Update for new namespace and include type.
2723
2724 2011-07-29  Anders Carlsson  <andersca@apple.com>
2725
2726         Pass the HTTP referrer header for URLs loaded by plug-ins
2727         https://bugs.webkit.org/show_bug.cgi?id=65379
2728         <rdar://problem/9822116>
2729
2730         Reviewed by Sam Weinig.
2731
2732         Set the HTTP referrer if necessary.
2733
2734         * WebProcess/Plugins/PluginView.cpp:
2735         (WebKit::PluginView::loadURL):
2736
2737 2011-07-29  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2738
2739         Fix the QTouchWebView in debug segfault on shutdown introduced in 91979.
2740         https://bugs.webkit.org/show_bug.cgi?id=64728
2741
2742         Reviewed by Benjamin Poulain.
2743
2744         unregisterTile is called in the tile's destructor, triggered in the TileSet's
2745         destruction, which happens in the middle of the proxy's destruction
2746         (after the m_tilesByID HashMap destruction).
2747         Detach the tiles in the proxy's destructor to make sure they can cleanup
2748         using a valid proxy.
2749
2750         * UIProcess/TiledDrawingAreaProxy.cpp:
2751         (WebKit::TiledDrawingAreaProxy::~TiledDrawingAreaProxy):
2752
2753 2011-07-29  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2754
2755         Fix the QTouchWebView in debug broke in 91979.
2756         https://bugs.webkit.org/show_bug.cgi?id=64728
2757
2758         Reviewed by Benjamin Poulain.
2759
2760         registerTile is called in the Tile's constructor, before adoptRef.
2761         Change the pointer parameter to use the raw type instead.
2762
2763         * UIProcess/TiledDrawingAreaProxy.cpp:
2764         (WebKit::TiledDrawingAreaProxy::registerTile):
2765         * UIProcess/TiledDrawingAreaProxy.h:
2766
2767 2011-07-29  Alexis Menard  <alexis.menard@openbossa.org>
2768
2769         [Qt] Make QDesktopWebView/QTouchWebView loadProgress property more usable in QML.
2770         https://bugs.webkit.org/show_bug.cgi?id=65315
2771
2772         Reviewed by Benjamin Poulain.
2773
2774         In order to use the loadProgress value in QML we need to make it
2775         a Q_PROPERTY, therefore we need a getter to get it.
2776
2777         * UIProcess/API/qt/qdesktopwebview.cpp:
2778         (QDesktopWebViewPrivate::didChangeLoadProgress):
2779         (QDesktopWebView::url):
2780         (QDesktopWebView::loadProgress):
2781         * UIProcess/API/qt/qdesktopwebview.h:
2782         * UIProcess/API/qt/qtouchwebpage.cpp:
2783         (QTouchWebPage::loadProgress):
2784         * UIProcess/API/qt/qtouchwebpage.h:
2785         * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp:
2786         (tst_CommonViewTests::stop):
2787         (tst_CommonViewTests::loadProgress):
2788         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
2789         (WebViewAbstraction::WebViewAbstraction):
2790         (WebViewAbstraction::loadProgress):
2791         (WebViewAbstraction::desktopViewLoadFailed):
2792         (WebViewAbstraction::touchViewLoadProgressChanged):
2793         (WebViewAbstraction::desktopViewLoadProgressChanged):
2794         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h:
2795         * UIProcess/qt/QtWebPageProxy.cpp:
2796         (QtWebPageProxy::QtWebPageProxy):
2797         (QtWebPageProxy::didChangeLoadProgress):
2798         * UIProcess/qt/QtWebPageProxy.h:
2799         (QtWebPageProxy::loadProgress):
2800         * UIProcess/qt/TouchViewInterface.cpp:
2801         (WebKit::TouchViewInterface::didChangeLoadProgress):
2802
2803 2011-07-27  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2804
2805         TiledDrawingArea: Use tile sets to paint old content while rendering for a new scale.
2806         https://bugs.webkit.org/show_bug.cgi?id=64728
2807
2808         Reviewed by Benjamin Poulain.
2809
2810         We currently delete all the tiles when setContentsScale is called. This shows a blank
2811         background to the user while the web process render tiles for the new scale.
2812
2813         This patch extracts the ownership of individual tiles from TiledDrawingAreaProxy to
2814         TiledDrawingAreaTileSet to allow the proxy to paint tiles with different scales.
2815         We can then paint the tiles we already have on top of the tiles we are rendering for
2816         the new scale until enough content is available.
2817
2818         * UIProcess/TiledDrawingAreaProxy.cpp:
2819         (WebKit::TiledDrawingAreaTileSet::tiles):
2820         (WebKit::TiledDrawingAreaTileSet::contentsScale):
2821         (WebKit::TiledDrawingAreaTileSet::TiledDrawingAreaTileSet):
2822         (WebKit::TiledDrawingAreaTileSet::mapToContents):
2823         (WebKit::TiledDrawingAreaTileSet::mapFromContents):
2824         (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
2825         (WebKit::TiledDrawingAreaProxy::registerTile):
2826         (WebKit::TiledDrawingAreaProxy::unregisterTile):
2827         Added those two methods to allow the tiles to clean
2828         themselves on destruction.
2829         (WebKit::TiledDrawingAreaProxy::requestTileUpdate):
2830         (WebKit::TiledDrawingAreaProxy::cancelTileUpdate):
2831         (WebKit::TiledDrawingAreaProxy::invalidate):
2832         (WebKit::TiledDrawingAreaProxy::updateTileBuffers):
2833         (WebKit::TiledDrawingAreaProxy::tileBufferUpdateComplete):
2834         (WebKit::TiledDrawingAreaProxy::paint):
2835         (WebKit::TiledDrawingAreaProxy::coverageRatio):
2836         (WebKit::TiledDrawingAreaProxy::setContentsScale):
2837         (WebKit::TiledDrawingAreaProxy::createTiles):
2838         (WebKit::TiledDrawingAreaProxy::resizeEdgeTiles):
2839         (WebKit::TiledDrawingAreaProxy::dropTilesOutsideRect):
2840         (WebKit::TiledDrawingAreaProxy::disableTileSetUpdates):
2841         (WebKit::TiledDrawingAreaProxy::removeAllTiles):
2842         (WebKit::TiledDrawingAreaProxy::contentsRect):
2843         (WebKit::TiledDrawingAreaProxy::visibleRect):
2844         (WebKit::TiledDrawingAreaProxy::hasPendingUpdates):
2845         * UIProcess/TiledDrawingAreaProxy.h:
2846         * UIProcess/TiledDrawingAreaTile.h:
2847         * UIProcess/qt/TiledDrawingAreaTileQt.cpp:
2848         (WebKit::TiledDrawingAreaTile::TiledDrawingAreaTile):
2849         (WebKit::TiledDrawingAreaTile::~TiledDrawingAreaTile):
2850         (WebKit::TiledDrawingAreaTile::incorporateUpdate):
2851         (WebKit::TiledDrawingAreaTile::disableUpdates):
2852         (WebKit::TiledDrawingAreaTile::updateBackBuffer):
2853
2854 2011-07-28  Tim Horton  <timothy_horton@apple.com>
2855
2856         REGRESSION (5.1): CJK input broken after clicking on Flash content
2857         <rdar://problem/9854447>
2858         https://bugs.webkit.org/show_bug.cgi?id=65349
2859
2860         Reviewed by Darin Adler.
2861
2862         After giving Flash focus on a page and then navigating away from that page
2863         using the back button, we were not getting notified to switch back to
2864         inline (non-complex) input. Now, notify the page that it can leave complex
2865         text mode when the plugin is destroyed.
2866
2867         * WebProcess/Plugins/PluginView.cpp:
2868         (WebKit::PluginView::~PluginView):
2869
2870 2011-07-28  Anders Carlsson  <andersca@apple.com>
2871
2872         Crash when trying to encode FontInfo with a null font attribute descriptor
2873         https://bugs.webkit.org/show_bug.cgi?id=65350
2874         <rdar://problem/9520670>
2875
2876         Reviewed by Darin Adler.
2877
2878         * Shared/FontInfo.cpp:
2879         (WebKit::FontInfo::encode):
2880         Encode a boolean specifying whether there's a fontAttributeDictionary member variable.
2881
2882         (WebKit::FontInfo::decode):
2883         Don't try to decode the fontAttributeDictionary member variable if none has been encoded.
2884
2885 2011-07-26  Chris Fleizach  <cfleizach@apple.com>
2886
2887         REGRESSION (Safari 5.1): JavaScript dialogs not usable with VoiceOver
2888         https://bugs.webkit.org/show_bug.cgi?id=65214
2889
2890         Reviewed by Anders Carlsson.
2891
2892         Allow the ability to spin the run loop while WebProcess is waiting for a synchronous reply.
2893         This allows it to continue to serve accessibility requests while waiting and basically
2894         restores the behavior WK1 was presenting. This patch only enables this mode when accessibility is on.
2895
2896         * Platform/CoreIPC/Connection.cpp:
2897         (CoreIPC::Connection::sendSyncMessage):
2898         (CoreIPC::Connection::waitForSyncReply):
2899         * Platform/CoreIPC/Connection.h:
2900         (CoreIPC::Connection::sendSync):
2901         * Platform/RunLoop.h:
2902         * Platform/mac/RunLoopMac.mm:
2903         (RunLoop::runForDuration):
2904         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2905         (WebKit::WebChromeClient::runJavaScriptAlert):
2906         (WebKit::WebChromeClient::runJavaScriptConfirm):
2907         (WebKit::WebChromeClient::runJavaScriptPrompt):
2908
2909 2011-07-28  Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com>
2910
2911         Pass the key_press_event or key_release_event to parent widget when it is not handled by Web Process.
2912         (https://bugs.webkit.org/show_bug.cgi?id=64790)
2913
2914         Reviewed by Martin Robinson.
2915
2916         * Shared/NativeWebKeyboardEvent.h:
2917         (WebKit::NativeWebKeyboardEvent::nativeEvent): Return a GdkEvent* instead of const GdkEvent* (non-const).
2918         * UIProcess/API/gtk/PageClientImpl.cpp:
2919         (WebKit::PageClientImpl::doneWithKeyEvent): Implemented for GTK port. Sets flag if the keyboard event 
2920         needs to be passed to the parent widget. Invoke gtk_main_do_event() if event needs to be passed to parent.
2921         * UIProcess/API/gtk/PageClientImpl.h: Deleted obsolete functions didNotHandleKeyEvent & didNotHandleWheelEvent.
2922         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2923         (webkit_web_view_base_init): Initialize shouldForwardNextKeyEvent flag.
2924         (webkitWebViewBaseKeyPressEvent): Pass event to parent widget depending on status from doneWithKeyEvent. 
2925         (webkitWebViewBaseKeyReleaseEvent): Pass event to parent widget depending on status from doneWithKeyEvent.
2926         (webkitWebViewBaseForwardNextKeyEvent): API to set flag shouldForwardNextKeyEvent.
2927         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Added API to set shouldForwardNextKeyEvent flag.
2928
2929 2011-07-28  Dan Bernstein  <mitz@apple.com>
2930
2931         <rdar://problem/9589433> Displaying Japanese dictionary contents in vertical orientation takes a couple of seconds
2932
2933         Reviewed by Darin Adler.
2934
2935         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2936         (InitWebCoreSystemInterface): Initialize wkGetVerticalGlyphsForCharacters.
2937
2938 2011-07-28  Brady Eidson  <beidson@apple.com>
2939
2940         <rdar://problem/9714337> and https://bugs.webkit.org/show_bug.cgi?id=65306
2941         WebKitInitializeStorageIfNecessary() can take awhile performing i/o, isn't necessary for every WebView
2942
2943         Reviewed by Maciej Stachowiak.
2944
2945         * WebProcess/WebProcess.cpp:
2946         (WebKit::WebProcess::initializeWebProcess): Pass a null client pointer in the new form of initializeTracker()
2947
2948 2011-07-27  Mark Hahnenberg  <mhahnenberg@apple.com>
2949
2950         Remove operator new from JSCell
2951         https://bugs.webkit.org/show_bug.cgi?id=64999
2952
2953         Reviewed by Oliver Hunt.
2954
2955         Removed the implementation of operator new in JSCell, so any further uses
2956         will not successfully link.  Also removed any remaining uses of operator new.
2957
2958         * WebProcess/Plugins/Netscape/JSNPMethod.h:
2959         (WebKit::JSNPMethod::create):
2960         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2961         (WebKit::JSNPObject::methodGetter):
2962         * WebProcess/Plugins/Netscape/JSNPObject.h:
2963         (WebKit::JSNPObject::create):
2964         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2965         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
2966
2967 2011-07-27  Benjamin Poulain  <benjamin@webkit.org>
2968
2969         [WK2][Qt] Move from QGraphicsView to Qt Scene Graph
2970         https://bugs.webkit.org/show_bug.cgi?id=62969
2971
2972         Reviewed by Andreas Kling.
2973
2974         Co-authored with Simon Hausmann  <simon.hausmann@nokia.com>
2975
2976         This patch change the base of WebKit2 from QGraphicsWidget
2977         to scenegraph based items.
2978
2979         QTouchWebView becomes a QSGItem with the only role of clipping
2980         child items.
2981         QTouchWebPage becomes a QSGPaintedItem in order to render the content
2982         of the flattened page. This is a temporary work around to get
2983         something running without deep changes on the drawing area proxy.
2984
2985         QDesktopWebView become a QSGPaintedItem and behave as before
2986         regarding rendering. The drawing area proxy is used to render
2987         the full item.
2988
2989         The event delivery had to be adapted because the scenegraph does not
2990         follow regular delivery of QEvents. Instead, each event type is
2991         delivered directly to a specific virtual function.
2992         In this patch, the events are forwarded to the classic QObject::event().
2993
2994         For the features that cannot be implemented on scenegraph (tooltip, menus, etc),
2995         a temporary workaround was added: the parent canvas is used as the widget for
2996         providing the feature. This assumes the web views alone in the canvas and
2997         take its full size. This will have to be fixed in the scenegraph for us to
2998         implement those features.
2999
3000         * UIProcess/API/qt/qdesktopwebview.cpp:
3001         (QDesktopWebViewPrivate::drawingAreaSize):
3002         (QDesktopWebViewPrivate::isActive):
3003         (QDesktopWebViewPrivate::startDrag):
3004         (QDesktopWebViewPrivate::didChangeToolTip):
3005         (QDesktopWebViewPrivate::didChangeCursor):
3006         (QDesktopWebViewPrivate::showContextMenu):
3007         (QDesktopWebView::QDesktopWebView):
3008         (QDesktopWebView::init):
3009         (paintCrashedPage):
3010         (QDesktopWebView::keyPressEvent):
3011         (QDesktopWebView::keyReleaseEvent):
3012         (QDesktopWebView::inputMethodEvent):
3013         (QDesktopWebView::focusInEvent):
3014         (QDesktopWebView::focusOutEvent):
3015         (QDesktopWebView::mousePressEvent):
3016         (QDesktopWebView::mouseMoveEvent):
3017         (QDesktopWebView::mouseReleaseEvent):
3018         (QDesktopWebView::mouseDoubleClickEvent):
3019         (QDesktopWebView::wheelEvent):
3020         (QDesktopWebView::touchEvent):
3021         (QDesktopWebView::hoverEnterEvent):
3022         (QDesktopWebView::hoverMoveEvent):
3023         (QDesktopWebView::hoverLeaveEvent):
3024         (QDesktopWebView::dragMoveEvent):
3025         (QDesktopWebView::dragEnterEvent):
3026         (QDesktopWebView::dragExitEvent):
3027         (QDesktopWebView::dragDropEvent):
3028         (QDesktopWebView::geometryChanged):
3029         (QDesktopWebView::paint):
3030         (QDesktopWebView::event):
3031         * UIProcess/API/qt/qdesktopwebview.h:
3032         * UIProcess/API/qt/qtouchwebpage.cpp:
3033         (QTouchWebPage::QTouchWebPage):
3034         (QTouchWebPage::paint):
3035         (QTouchWebPage::event):
3036         (QTouchWebPage::keyPressEvent):
3037         (QTouchWebPage::keyReleaseEvent):
3038         (QTouchWebPage::inputMethodEvent):
3039         (QTouchWebPage::focusInEvent):
3040         (QTouchWebPage::focusOutEvent):
3041         (QTouchWebPage::touchEvent):
3042         (QTouchWebPage::geometryChanged):
3043         * UIProcess/API/qt/qtouchwebpage.h:
3044         * UIProcess/API/qt/qtouchwebview.cpp:
3045         (QTouchWebViewPrivate::scroll):
3046         (QTouchWebView::QTouchWebView):
3047         (QTouchWebView::geometryChanged):
3048         * UIProcess/API/qt/qtouchwebview.h:
3049         * UIProcess/API/qt/tests/tests.pri:
3050         * UIProcess/API/qt/tests/testwindow.h:
3051         (TestWindow::TestWindow):
3052         (TestWindow::resizeEvent):
3053         * UIProcess/qt/TouchViewInterface.cpp:
3054         (WebKit::TouchViewInterface::panGestureRequestScroll):
3055         (WebKit::TouchViewInterface::pinchGestureRequestUpdate):
3056         (WebKit::TouchViewInterface::drawingAreaSize):
3057         (WebKit::TouchViewInterface::contentSizeChanged):
3058         (WebKit::TouchViewInterface::isActive):
3059         * UIProcess/qt/ViewInterface.cpp: Removed.
3060         * UIProcess/qt/ViewInterface.h:
3061         * WebKit2.pro:
3062
3063 2011-07-27  Benjamin Poulain  <benjamin@webkit.org>
3064
3065         [Qt][WK2] Clean WKPageLoaderClient
3066         https://bugs.webkit.org/show_bug.cgi?id=65246
3067
3068         Reviewed by Andreas Kling.
3069
3070         Remove the empty functions from Qt's WKPageLoaderClient.
3071
3072         * UIProcess/qt/ClientImpl.cpp:
3073         (qt_wk_didSameDocumentNavigationForFrame): Move the function to
3074         have all the implementations in the same order as the definitions.
3075         * UIProcess/qt/ClientImpl.h:
3076         * UIProcess/qt/QtWebPageProxy.cpp:
3077         (QtWebPageProxy::init):
3078
3079 2011-07-27  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3080
3081         Fix Qt (and possibly Gtk) WebKit2 build after addition of -webkit-pictograph
3082         https://bugs.webkit.org/show_bug.cgi?id=65253
3083
3084         Reviewed by Andreas Kling.
3085
3086         The -webkit-pictograph generic family was added by bug 65197.
3087
3088         * Shared/WebPreferencesStore.h:
3089
3090 2011-07-27  Benjamin Poulain  <benjamin@webkit.org>
3091
3092         [Qt][WK2] Simplify the PageUIClient
3093         https://bugs.webkit.org/show_bug.cgi?id=65198
3094
3095         Reviewed by Andreas Kling.
3096
3097         The only function of WKPageLoaderClient with a complete implementation
3098         is qt_wk_setStatusText(). The other functions were what is left from
3099         before the refactoring of QWKPage.
3100
3101         This patch removes the unused functions to simplify the client. Since the dependency
3102         on QtWebPageProxy is removed from that client, it now calls the ViewInterface directly.
3103
3104         * UIProcess/qt/ClientImpl.cpp:
3105         (toViewInterface):
3106         (qt_wk_setStatusText):
3107         * UIProcess/qt/ClientImpl.h:
3108         * UIProcess/qt/QtWebPageProxy.cpp:
3109         (QtWebPageProxy::QtWebPageProxy):
3110         (QtWebPageProxy::init):
3111         * UIProcess/qt/QtWebPageProxy.h:
3112
3113 2011-07-26  Sadrul Habib Chowdhury  <sadrul@chromium.org>
3114
3115         Add support for download='filename' attribute in anchors.
3116         https://bugs.webkit.org/show_bug.cgi?id=64580
3117
3118         Reviewed by Adam Barth.
3119
3120         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3121         (WebKit::WebFrameLoaderClient::startDownload):
3122         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3123
3124 2011-07-26  Tim Horton  <timothy_horton@apple.com>
3125
3126         Apply r40940 to WebKit2 to work around a Silverlight crash.
3127         https://bugs.webkit.org/show_bug.cgi?id=65205
3128         <rdar://problem/9058370>
3129
3130         Reviewed by Anders Carlsson.
3131
3132         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
3133         (WebKit::NetscapePluginModule::determineQuirks):
3134         * Shared/Plugins/PluginQuirks.h:
3135         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3136         (WebKit::NetscapePlugin::userAgent):
3137
3138 2011-07-26  Dan Bernstein  <mitz@apple.com>
3139
3140         <rdar://problem/9842889> Add a generic pictograph font family
3141         https://bugs.webkit.org/show_bug.cgi?id=65197
3142
3143         Reviewed by Anders Carlsson.
3144
3145         * Shared/WebPreferencesStore.h:
3146         * UIProcess/API/C/WKPreferences.cpp:
3147         (WKPreferencesSetPictographFontFamily): Added.
3148         (WKPreferencesCopyPictographFontFamily): Added.
3149         * UIProcess/API/C/WKPreferences.h:
3150
3151 2011-07-26  Andras Becsi  <abecsi@webkit.org>
3152
3153         [Qt] [WK2] Disable the build with Qt versions older than 5.0 
3154         https://bugs.webkit.org/show_bug.cgi?id=65189
3155
3156         Reviewed by Csaba Osztrogonác.
3157
3158         * Platform/qt/ModuleQt.cpp:
3159         (WebKit::Module::platformFunctionPointer): Fix the build for Qt5.
3160
3161 2011-07-26  Benjamin Poulain  <benjamin@webkit.org>
3162
3163         [Qt][WK2] Make the WebContextMenuProxyQt handle the full interactions between the views and the WebPageProxy
3164         https://bugs.webkit.org/show_bug.cgi?id=64739
3165
3166         Reviewed by Andreas Kling.
3167
3168         Change the WebContextMenuProxyQt to be the intermediary between the WebPageProxy and our views regarding
3169         the context menu.
3170
3171         The actions of the context menu are no longer the responsibility of QtWebPageProxy but are instead
3172         created and handled directly by the WebContextMenuProxyQt.
3173
3174         * UIProcess/qt/QtWebPageProxy.cpp:
3175         (QtWebPageProxy::createContextMenuProxy):
3176         (QtWebPageProxy::triggerAction):
3177         (QtWebPageProxy::action):
3178         * UIProcess/qt/QtWebPageProxy.h:
3179         * UIProcess/qt/WebContextMenuProxyQt.cpp:
3180         (WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt):
3181         (WebKit::WebContextMenuProxyQt::create):
3182         (WebKit::WebContextMenuProxyQt::actionTriggered):
3183         (WebKit::WebContextMenuProxyQt::showContextMenu):
3184         (WebKit::WebContextMenuProxyQt::hideContextMenu):
3185         (WebKit::WebContextMenuProxyQt::createContextMenu):
3186         * UIProcess/qt/WebContextMenuProxyQt.h:
3187
3188 2011-07-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3189
3190         [GTK] Remove header webkitwebviewcommon.h
3191         https://bugs.webkit.org/show_bug.cgi?id=65177
3192
3193         Reviewed by Martin Robinson.
3194
3195         * UIProcess/API/gtk/WebKitWebView.h: Add function prototypes
3196         instead of including webkitwebviewcommon.h.
3197
3198 2011-07-22  Jessie Berlin  <jberlin@apple.com>
3199
3200         [WebKit2] Changing the cookie accept policy in Private Browsing doesn’t work.
3201         https://bugs.webkit.org/show_bug.cgi?id=64997
3202
3203         Reviewed by Ada Chan.
3204
3205         * WebProcess/Cookies/mac/WebCookieManagerMac.mm:
3206         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
3207         Set the policy on the Cookie Storage used by the Private Browsing Storage Session as well.
3208         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3209         (InitWebCoreSystemInterface):
3210
3211 2011-07-21  Yael Aharon  <yael.aharon@nokia.com>
3212
3213         [Qt][WK2] Code cleanup for drag-and-drop
3214         https://bugs.webkit.org/show_bug.cgi?id=64916
3215
3216         Reviewed by Andreas Kling.
3217
3218         * UIProcess/WebPageProxy.cpp:
3219         (WebKit::WebPageProxy::startDrag):
3220         Allow receiving a NULL bitmap from the web process.
3221         
3222         * UIProcess/qt/qdesktopwebpageproxy.cpp:
3223         (QDesktopWebPageProxy::handleEvent):
3224         Fix typo introduced in http://trac.webkit.org/changeset/90458.
3225         All DnD related events should be GraphicsScene events.
3226         
3227         * WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp:
3228         (WebKit::convertQPixmapToShareableBitmap):
3229         Remove hack that creates a 1x1 bitmap.
3230         It is no longer needed after http://trac.webkit.org/changeset/91016.
3231         
3232         (WebKit::WebDragClient::startDrag):
3233         Allow sending a NULL bitmap to the UI process.
3234
3235 2011-07-20  Tim Horton  <timothy_horton@apple.com>
3236
3237         Scrollbar color heuristic needs to be hooked up in WebKit1
3238         https://bugs.webkit.org/show_bug.cgi?id=64220
3239         <rdar://problem/9589140>
3240
3241         Reviewed by Darin Adler.
3242
3243         Store the scroller style on ScrollableArea, and recompute it whenever
3244         the document or body element background color changes or the base background
3245         color of the scrollview changes. Also, make sure to repaint the scrollbars
3246         whenever the style changes.
3247
3248         * WebProcess/WebPage/WebFrame.cpp:
3249         (WebKit::WebFrame::getDocumentBackgroundColor):
3250
3251 2011-07-20  James Robinson  <jamesr@chromium.org>
3252
3253         Revert worker and WebKit2 runloops to use currentTime() for scheduling instead of the monotonic clock
3254         https://bugs.webkit.org/show_bug.cgi?id=64841
3255
3256         Reviewed by Mark Rowe.
3257
3258         http://trac.webkit.org/changeset/91206 converted most of WebKit's deferred work scheduling to using the
3259         monotonic clock instead of WTF::currentTime().  This broke many plugin tests on WebKit2 for reasons that are
3260         unclear.  This reverts everything except for WebCore::ThreadTimers back to the previous behavior.
3261
3262         * Platform/CoreIPC/Connection.cpp:
3263         (CoreIPC::Connection::waitForMessage):
3264         (CoreIPC::Connection::waitForSyncReply):
3265         * Platform/RunLoop.h:
3266
3267 2011-07-19  Ryosuke Niwa  <rniwa@webkit.org>
3268
3269         Build fix after r91307.
3270
3271         * Platform/Logging.h:
3272
3273 2011-07-19  Lukasz Slachciak  <lukasz.slachciak@gmail.com>
3274
3275         [GTK] [WK2] Implement missing initializeLogChannel function.
3276         https://bugs.webkit.org/show_bug.cgi?id=63381
3277
3278         Reviewed by Martin Robinson.
3279
3280         Implemented logging for GTK platform in WebKit2 - function initializeLogChannel is called for all ports,
3281         so added missing implementation. Aslo helper function added for getting channels from names.
3282
3283         * GNUmakefile.am: Added reference to new file LoggingGtk.cpp.
3284         * Platform/Logging.cpp: Logging implementation for GTK port enabled.
3285         (WebKit::getChannelFromName): Helper to connect name with WTFLogChannel.
3286         * Platform/Logging.h: New helper method added.
3287         * Platform/gtk/LoggingGtk.cpp: Added. GTK logging implementation.
3288         (WebKit::initializeLogChannel): Channel is initialized if its name is found in WEBKIT_DEBUG.
3289
3290 2011-07-19  Brian Weinstein  <bweinstein@apple.com>
3291
3292         Add back a change that was accidentally removed in r91266.
3293         
3294         Make sure to retain the WKPasteboardFilePromiseOwner before calling draggedImage because draggedImage releases
3295         its responder. Also make the comment more explicit, to keep this mistake from being made in the future.
3296         
3297         Rubber-stamped by Darin Adler.
3298
3299         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3300         (WebKit::WebDragClient::dragEnded):
3301
3302 2011-07-18  Brian Weinstein  <bweinstein@apple.com>
3303
3304         Speculative fix for: Crash under WebPage::platformDragEnded when dragging on Mac
3305         https://bugs.webkit.org/show_bug.cgi?id=64766
3306         <rdar://problem/9548174>
3307
3308         Reviewed by Enrica Casucci.
3309
3310         I was unable to reproduce this bug, but Darin Adler and I discussed the probable issue. When starting the drag, we create 
3311         a WKPasteboardFilePromiseOwner, and a WKPasteboardOwner. When the drag is concluded, we call a method on the WKPasteboardFilePromiseOwner
3312         which uses the WKPasteboardOwner. However, we are not guaranteeing that the WKPasteboardOwner will be around when the 
3313         WKPasteboardFilePromiseOwner method is called.
3314         
3315         The fix is to retain both the WKPasteboardFilePromiseOwner and the WKPasteboardOwner that we need, making sure that we are keeping
3316         both objects alive.
3317         
3318         This patch also uses r91222 to replace WebPage::platformDragEnded, so WebPage doesn't need to know about the drag source.
3319
3320         * WebProcess/WebCoreSupport/WebDragClient.cpp:
3321         (WebKit::WebDragClient::dragEnded): Add a non-Mac stub method, since the Mac is the only platform that does something here.
3322         * WebProcess/WebCoreSupport/WebDragClient.h:
3323         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3324         (WebKit::WebDragClient::declareAndWriteDragImage): Use member variables instead of local variables.
3325         (WebKit::WebDragClient::dragEnded): Move code from WebPageMac::platformDragEnded to here, and clear both member variables.
3326         * WebProcess/WebPage/WebPage.cpp:
3327         (WebKit::WebPage::dragEnded): Don't call platformDragEnded anymore. WebCore::DragController::dragEnded calls WebDragClient::dragEnded,
3328             which does the same thing.
3329         * WebProcess/WebPage/WebPage.h:
3330         * WebProcess/WebPage/mac/WebPageMac.mm: Remove platformDragEnded.
3331
3332 2011-07-18  Alexis Menard  <alexis.menard@openbossa.org>
3333
3334         [Qt][WK2] Make QDesktopWebView::navigationAction method usable in QML.
3335         https://bugs.webkit.org/show_bug.cgi?id=64690
3336
3337         Make the API usable with QML by declaring what's needed
3338         with the macros.
3339
3340         Reviewed by Benjamin Poulain.
3341
3342         * UIProcess/API/qt/qdesktopwebview.h:
3343
3344 2011-07-18  MORITA Hajime  <morrita@google.com>
3345
3346         [ShadowContentElement] forwarded node should be able to access its hosting content element.
3347         https://bugs.webkit.org/show_bug.cgi?id=64251
3348
3349         Reviewed by Dimitri Glazkov.
3350
3351         Exported additional symbols for window.internals object.
3352
3353         * win/WebKit2.def:
3354         * win/WebKit2CFLite.def:
3355
3356 2011-07-18  Dean Jackson  <dino@apple.com>
3357
3358         https://bugs.webkit.org/show_bug.cgi?id=64742
3359         Expose WebPreferences for media playback requiring user gestures and inline playback
3360
3361         Reviewed by Simon Fraser.
3362
3363         Two new WebPreferences: MediaPlaybackRequiresUserGesture and
3364         MediaPlaybackAllowsInline.
3365
3366         * Shared/WebPreferencesStore.h:
3367         * UIProcess/API/C/WKPreferences.cpp:
3368         (WKPreferencesSetMediaPlaybackRequiresUserGesture):
3369         (WKPreferencesGetMediaPlaybackRequiresUserGesture):
3370         (WKPreferencesSetMediaPlaybackAllowsInline):
3371         (WKPreferencesGetMediaPlaybackAllowsInline):
3372         * UIProcess/API/C/WKPreferencesPrivate.h:
3373         * WebProcess/WebPage/WebPage.cpp:
3374         (WebKit::WebPage::updatePreferences):
3375
3376 2011-07-18  James Robinson  <jamesr@chromium.org>
3377
3378         Timer scheduling should be based off the monotonic clock
3379         https://bugs.webkit.org/show_bug.cgi?id=64544
3380
3381         Reviewed by Darin Adler.
3382
3383         Converts the WebKit2 RunLoop and CoreIPC timeouts to use monotonicallyIncreasingTime().
3384
3385         * Platform/CoreIPC/Connection.cpp:
3386         (CoreIPC::Connection::waitForMessage):
3387         (CoreIPC::Connection::waitForSyncReply):
3388         * Platform/RunLoop.h:
3389
3390 2011-07-18  Anders Carlsson  <andersca@apple.com>
3391
3392         Make using lowercase parameter names for AppleConnect be a plug-in quirk
3393         https://bugs.webkit.org/show_bug.cgi?id=64638
3394
3395         Reviewed by Sam Weinig.
3396
3397         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
3398         (WebKit::NetscapePluginModule::determineQuirks):
3399         Set the WantsLowercaseParameterNames quirk for the AppleConnect plug-in.
3400
3401         * Shared/Plugins/PluginQuirks.h:
3402         Add WantsLowercaseParameterNames quirk.
3403
3404         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3405         (WebKit::NetscapePlugin::initialize):
3406         If the plug-in has the WantsLowercaseParameterNames quirk, convert the parameter
3407         names to lowercase.
3408
3409         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3410         (WebKit::WebFrameLoaderClient::createPlugin):
3411         Remove the code that would convert the parameters here. Also remove the FIXME; plug-in quirks
3412         aren't really the same thing as site-specific quirks.
3413
3414 2011-07-15  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3415
3416         [Qt] Consider QTouchWebPage's transform when scrolling the viewport.
3417         https://bugs.webkit.org/show_bug.cgi?id=64541
3418
3419         Reviewed by Benjamin Poulain.
3420
3421         Currently the scroll deltas are given to moveBy in page coordinates
3422         which doesn't match when the page view is scalled.
3423         This patch gives the scroll delta to the viewport in it's own coordinates.
3424
3425         * UIProcess/qt/TouchViewInterface.cpp:
3426         (WebKit::TouchViewInterface::panGestureRequestScroll):
3427
3428 2011-07-15  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3429
3430         [Qt] Push the new viewport rect to the drawing area after committing the scale.
3431         https://bugs.webkit.org/show_bug.cgi?id=64597
3432
3433         Reviewed by Benjamin Poulain.
3434
3435         * UIProcess/qt/TouchViewInterface.cpp:
3436         (WebKit::TouchViewInterface::pinchGestureEnded):
3437
3438 2011-07-15  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3439
3440         [Qt] Remove the scale commit timer from QTouchWebPage.
3441         https://bugs.webkit.org/show_bug.cgi?id=64600
3442
3443         Reviewed by Benjamin Poulain.
3444
3445         Since we don't currently need unprepared page view scale changes,
3446         this timer isn't useful.
3447
3448         * UIProcess/API/qt/qtouchwebpage.cpp:
3449         (QTouchWebPage::QTouchWebPage):
3450         (QTouchWebPagePrivate::QTouchWebPagePrivate):
3451         (QTouchWebPagePrivate::commitScaleChange):
3452         * UIProcess/API/qt/qtouchwebpage.h:
3453         * UIProcess/API/qt/qtouchwebpage_p.h:
3454         * UIProcess/qt/TouchViewInterface.cpp:
3455         (WebKit::TouchViewInterface::pinchGestureStarted):
3456
3457 2011-07-15  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3458
3459         TiledDrawingArea: map the visibleArea rect from page to tiles coordinates.
3460         https://bugs.webkit.org/show_bug.cgi?id=64538
3461
3462         Reviewed by Benjamin Poulain.
3463
3464         TiledDrawingAreaProxy expects its coordinates to be scaled according to
3465         contentsScale. This patch keep the pushed visibleArea as page coordinates
3466         and convert it each time to scaled coordinates in case the contents scale was
3467         changed afterward.
3468         This is a regression introduced in r90750.
3469         Also:
3470         - Rename visibleArea to visibleContentRect
3471         - Remove an unnecessary mapToContents in QTouchWebPageProxy::setVisibleContentRect
3472
3473         * UIProcess/API/qt/qtouchwebpage.cpp:
3474         (QTouchWebPagePrivate::setViewportRect):
3475         * UIProcess/TiledDrawingAreaProxy.cpp:
3476         (WebKit::TiledDrawingAreaProxy::invalidate):
3477         (WebKit::TiledDrawingAreaProxy::setVisibleContentRect):
3478         (WebKit::TiledDrawingAreaProxy::createTiles):
3479         (WebKit::TiledDrawingAreaProxy::visibleRect):
3480         * UIProcess/TiledDrawingAreaProxy.h:
3481         * UIProcess/qt/qtouchwebpageproxy.cpp:
3482         (QTouchWebPageProxy::setVisibleContentRect):
3483         * UIProcess/qt/qtouchwebpageproxy.h:
3484
3485 2011-07-17  Amruth Raj  <amruthraj@motorola.com>
3486
3487         [GTK] Fix selection of elements in a multi select list and remove an unnecessary include in WorkQueue
3488         https://bugs.webkit.org/show_bug.cgi?id=64666
3489
3490         Reviewed by Martin Robinson.
3491
3492         * Platform/gtk/WorkQueueGtk.cpp: Remove an include which is no longer required
3493         * Shared/gtk/WebEventFactory.cpp:
3494         (WebKit::modifiersForEvent): Fix an incorrect ASSERT statement
3495         (WebKit::WebEventFactory::createWebMouseEvent): Call the function to determine the modifier keys
3496
3497 2011-07-17  Lukasz Slachciak  <l.slachciak@samsung.com>
3498
3499         Reviewed by Martin Robinson.
3500
3501          [GTK] [WK2] Fix for getting editor client commands.
3502          https://bugs.webkit.org/show_bug.cgi?id=63081
3503
3504          Editor client commands intepretation was incorrect. It was based on the NativeWebKeyboardEvent only.
3505          In fact EventHandler is generating interpreted events - keypress and keydown. These event types
3506          are now passed from UIProcess to WebProcess so KeyBindingTranslator can correctly find editor commands.
3507          Also build break for Debug build was fixed.
3508
3509         * UIProcess/API/gtk/PageClientImpl.cpp: KeyboardEvent type is used for KeyBindingTranslator.
3510         (WebKit::PageClientImpl::getEditorCommandsForKeyEvent): getEditorCommandsForKeyEvent now has additional
3511         parameter describing KeyboardEvent type.
3512         * UIProcess/API/gtk/PageClientImpl.h:
3513         * UIProcess/PageClient.h:
3514         * UIProcess/WebPageProxy.h:
3515         * UIProcess/WebPageProxy.messages.in:
3516         * UIProcess/gtk/WebPageProxyGtk.cpp:
3517         (WebKit::WebPageProxy::getEditorCommandsForKeyEvent): KeyboardEvent type passed to PageClient.
3518         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
3519         (WebKit::WebEditorClient::getEditorCommandsForKeyEvent): Sync message send with KeyboardEvent type.
3520
3521 2011-07-16  Daniel Bates  <dbates@webkit.org>
3522
3523         Fix Win Cairo Debug build after <http://trac.webkit.org/changeset/91085>.
3524
3525         Add stub implementation of scale factor overloaded ShareableBitmap::paint() for
3526         Cairo WebKit2 port after its usage in changeset <http://trac.webkit.org/changeset/91085>.
3527
3528         Also add stub implementation for GTK.
3529
3530         We'll need to actually implement this. See <https://bugs.webkit.org/show_bug.cgi?id=64664>
3531         and <https://bugs.webkit.org/show_bug.cgi?id=64665> for Cairo and GTK, respectively.
3532
3533         * Shared/cairo/ShareableBitmapCairo.cpp:
3534         (WebKit::ShareableBitmap::paint): Added scale-factor variant.
3535         * Shared/gtk/ShareableBitmapGtk.cpp:
3536         (WebKit::ShareableBitmap::paint): Added scale-factor variant.
3537
3538 2011-07-16  Daniel Bates  <dbates@webkit.org>
3539
3540         Fix Qt Linux Release build after changeset <http://trac.webkit.org/changeset/91085>
3541         (https://bugs.webkit.org/show_bug.cgi?id=64611).
3542
3543         Stub out scale factor-variant implementation of ShareableBitmap::paint().
3544         We'll need to implement this. See <https://bugs.webkit.org/show_bug.cgi?id=64663>
3545         for more details.
3546
3547         * Shared/qt/ShareableBitmapQt.cpp:
3548         (WebKit::ShareableBitmap::paint): Added scale-factor variant.
3549
3550 2011-07-16  Simon Fraser  <simon.fraser@apple.com>
3551
3552         Add code to attempt to align compositing layers to pixel boundaries when page scale changes
3553         https://bugs.webkit.org/show_bug.cgi?id=64658
3554
3555         Reviewed by Dan Bernstein.
3556         
3557         Removed implementation of pageScaleFactor() now that GraphicsLayerClient has
3558         a default implementation.
3559
3560         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
3561         * WebProcess/WebPage/ca/LayerTreeHostCA.h:
3562
3563 2011-07-16  Daniel Bates  <dbates@webkit.org>
3564
3565         Attempt to fix the Qt Linux Release build after changeset <http://trac.webkit.org/changeset/91097>
3566         (https://bugs.webkit.org/show_bug.cgi?id=64615).
3567
3568         * UIProcess/qt/QtWebPageProxy.cpp:
3569         (QtWebPageProxy::setCursorHiddenUntilMouseMoves): Added stub method.
3570         * UIProcess/qt/QtWebPageProxy.h:
3571
3572 2011-07-15  Pratik Solanki  <psolanki@apple.com>
3573
3574         Part of https://bugs.webkit.org/show_bug.cgi?id=63674
3575         Get webkit to compile with USE(CFNETWORK) enabled on Mac
3576
3577         Reviewed by David Kilzer.
3578
3579         New WebKitSystemInterface functions for CFNetwork-based loader.
3580
3581         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3582         (InitWebCoreSystemInterface):
3583
3584 2011-07-15  Tim Horton  <timothy_horton@apple.com>
3585
3586         Overlay scrollbars in overflow areas no longer pulse when revealed
3587         https://bugs.webkit.org/show_bug.cgi?id=64606
3588         <rdar://problem/9390674>
3589
3590         Reviewed by Simon Fraser.
3591
3592         Ensure that the state of the scrollbar implementation is kept in sync
3593         with WebCore's internal representation. Previously, we synchronized them
3594         at paint time, causing pulsing to be skipped due to the scrollbars being
3595         disabled.
3596
3597         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3598         (InitWebCoreSystemInterface):
3599
3600 2011-07-15  Simon Fraser  <simon.fraser@apple.com>
3601
3602         Have GraphicsLayer pull their contentsScale, rather than pushing it onto them
3603         https://bugs.webkit.org/show_bug.cgi?id=64643
3604
3605         Reviewed by Darin Adler.
3606         
3607         Impement new GraphicsLayerClient methods related to contents scale,
3608         and don't push the scale.
3609
3610         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
3611         (WebKit::LayerTreeHostCA::initialize):
3612         (WebKit::LayerTreeHostCA::backingScaleFactor):
3613         (WebKit::LayerTreeHostCA::pageScaleFactor):
3614         (WebKit::LayerTreeHostCA::createPageOverlayLayer):
3615         * WebProcess/WebPage/ca/LayerTreeHostCA.h:
3616         (WebKit::LayerTreeHostCA::didCommitChangesForLayer):
3617
3618 2011-07-15  Ada Chan  <adachan@apple.com>
3619
3620         Implement "Jump to Selection" in WebKit2
3621         https://bugs.webkit.org/show_bug.cgi?id=64569
3622
3623         Reviewed by Anders Carlsson.
3624
3625         * UIProcess/API/mac/WKView.mm:
3626         (-[WKView centerSelectionInVisibleArea:]): Call WebPageProxy::centerSelectionInVisibleArea().
3627         (-[WKView validateUserInterfaceItem:]): Enable the centerSelectionInVisibleArea: selector if there's a selection
3628         range or if there's an insertion point in an editable area.
3629         * WebProcess/WebPage/FindController.cpp:
3630         (WebKit::FindController::showFindIndicatorInSelection): Call updateFindIndicator() to show the find indicator.
3631         * WebProcess/WebPage/FindController.h:
3632         * WebProcess/WebPage/WebPage.cpp:
3633         (WebKit::WebPage::centerSelectionInVisibleArea): Use the selection in the focused or main frame.
3634         After scrolling the selection into view, flash the find indicator.
3635
3636 2011-07-15  Dan Bernstein  <mitz@apple.com>
3637
3638         Windows build fix.
3639
3640         * UIProcess/win/WebView.cpp:
3641
3642 2011-07-15  Dan Bernstein  <mitz@apple.com>
3643
3644         Windows build fix.
3645
3646         * UIProcess/win/WebView.h:
3647
3648 2011-07-15  Dan Bernstein  <mitz@apple.com>
3649
3650         REGRESSION: Mouse cursor doesn’t hide when full screen video HUD hides
3651         https://bugs.webkit.org/show_bug.cgi?id=64615
3652
3653         Reviewed by Anders Carlsson.
3654
3655         * UIProcess/API/efl/PageClientImpl.cpp:
3656         (WebKit::PageClientImpl::setCursorHiddenUntilMouseMoves): Added this stub.
3657         * UIProcess/API/efl/PageClientImpl.h:
3658         * UIProcess/API/gtk/PageClientImpl.cpp:
3659         (WebKit::PageClientImpl::setCursorHiddenUntilMouseMoves): Ditto.
3660         * UIProcess/API/gtk/PageClientImpl.h:
3661         * UIProcess/API/mac/PageClientImpl.h:
3662         * UIProcess/API/mac/PageClientImpl.mm:
3663         (WebKit::PageClientImpl::setCursorHiddenUntilMouseMoves): Added. Calls +[NSCursor setHiddenUntilMouseMoves:].
3664         * UIProcess/PageClient.h:
3665         * UIProcess/WebPageProxy.cpp:
3666         (WebKit::WebPageProxy::setCursorHiddenUntilMouseMoves): Added. Calls through to the PageClient.
3667         * UIProcess/WebPageProxy.h:
3668         * UIProcess/WebPageProxy.messages.in: Added SetCursorHiddenUntilMouseMoves message.
3669         * UIProcess/win/WebView.cpp:
3670         (WebKit::WebView::setCursorHiddenUntilMouseMoves): Added this stub.
3671         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3672         (WebKit::WebChromeClient::setCursorHiddenUntilMouseMoves): Added. Sends SetCursorHiddenUntilMouseMoves message
3673         to the page proxy.
3674         * WebProcess/WebCoreSupport/WebChromeClient.h:
3675
3676 2011-07-14  Gavin Barraclough  <barraclough@apple.com>
3677
3678         https://bugs.webkit.org/show_bug.cgi?id=64250
3679         Global strict mode function leaking global object as "this".
3680
3681         Reviewed by Oliver Hunt.
3682
3683         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
3684         (WebKit::NPJSObject::invoke):
3685             - Change call to pass DOM Window shell, instead of the global varaible object.
3686
3687 2011-07-15  Anders Carlsson  <andersca@apple.com>
3688
3689         Find indicator should take scale factor into account
3690         https://bugs.webkit.org/show_bug.cgi?id=64611
3691         <rdar://problem/9761020>
3692
3693         Reviewed by Sam Weinig.
3694
3695         * UIProcess/FindIndicator.cpp:
3696         (WebKit::FindIndicator::create):
3697         (WebKit::FindIndicator::FindIndicator):
3698         Keep track of the scale factor of the find indicator bitmap.
3699
3700         (WebKit::FindIndicator::draw):
3701         Pass the scale factor to ShareableBitmap::draw.
3702
3703         * UIProcess/FindIndicator.h:
3704         Add scale factor member variable.
3705
3706         * UIProcess/WebPageProxy.cpp:
3707         (WebKit::WebPageProxy::setFindIndicator):
3708         This now takes the content image scale factor.
3709
3710         * UIProcess/WebPageProxy.messages.in:
3711         Add the scale factor.
3712
3713         * WebProcess/WebPage/FindController.cpp:
3714         (WebKit::FindController::updateFindIndicator):
3715         Size the backing store correctly, and apply the scale factor to
3716         the graphics context.
3717
3718         (WebKit::FindController::hideFindIndicator):
3719         Pass the scale factor along.
3720
3721 2011-07-15  Martin Robinson  <mrobinson@igalia.com>
3722
3723         Build fixes for WebKit2. Ensure that all generated sources are
3724         on nodist primaries, that they are on forward declared variables
3725         so that BUILT_SOURCES is calculated properly and that zlib is 
3726         included during linking (for WOFF support).
3727
3728         * GNUmakefile.am:
3729
3730 2011-07-15  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3731
3732         Upstream QtWebKit/N9 changes related to visibleContentRect
3733         https://bugs.webkit.org/show_bug.cgi?id=64589
3734
3735         Reviewed by Simon Hausmann.
3736
3737         Rename setActualVisibleContentRect to setFixedVisibleContentRect
3738         as that makes it more obvious that it is an override. It is also
3739         consistent with the setFixedLayout which is often used in
3740         conjunction with it.
3741
3742         * UIProcess/WebPageProxy.cpp:
3743         (WebKit::WebPageProxy::setFixedVisibleContentRect):
3744         * UIProcess/WebPageProxy.h:
3745         * UIProcess/qt/qtouchwebpageproxy.cpp:
3746         (QTouchWebPageProxy::setVisibleArea):
3747         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3748         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
3749         Only set fixedVisibleContentRect for the mainframe.
3750         * WebProcess/WebPage/WebPage.cpp:
3751         (WebKit::WebPage::setFixedVisibleContentRect):
3752         * WebProcess/WebPage/WebPage.h:
3753         * WebProcess/WebPage/WebPage.messages.in:
3754
3755 2011-07-15  Carlos Garcia Campos  <cgarcia@igalia.com>
3756
3757         Reviewed by Martin Robinson.
3758
3759         [GTK] Install a custom X error handler in plugin process
3760         https://bugs.webkit.org/show_bug.cgi?id=63248
3761
3762         Some plugins, specially flash, can cause X errors that when
3763         handled by the default X error handler (or the GDK one) abort the
3764         process. Since we don't want to crash due to buggy plugins, we
3765         install a custom error handler to show a warning when a X error
3766         happens without aborting.
3767
3768         * PluginProcess/gtk/PluginProcessMainGtk.cpp:
3769         (WebKit::webkitgtkXError):
3770         (WebKit::PluginProcessMainGtk):
3771
3772 2011-07-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3773
3774         Reviewed by Anders Carlsson.
3775
3776         [UNIX] Allow sending null handles in messages
3777         https://bugs.webkit.org/show_bug.cgi?id=60621
3778
3779         Only valid file descriptors are now sent using sendmsg() control
3780         messages, and instead of sending a list of attachment sizes we now
3781         send a list of AttachmentInfo structs. AttachmentInfo contains
3782         information about the attachments including the size for
3783         MappedMemory attachmens and whether the attachment is null or not.
3784
3785         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
3786         (CoreIPC::AttachmentInfo::AttachmentInfo): New class containing
3787         information about the attachments sent.
3788         (CoreIPC::AttachmentInfo::setType): Set the attachment type.
3789         (CoreIPC::AttachmentInfo::getType): Return the attachment type.
3790         (CoreIPC::AttachmentInfo::setSize): Set the size for MappedMemory attachments.
3791         (CoreIPC::AttachmentInfo::getSize): Get the size for MappedMemory attachments.
3792         (CoreIPC::AttachmentInfo::setNull): Set attachment as null, it
3793         contains an invalid file descriptor, so the receiver shouldn't
3794         expect a file desriptor for this attachment.
3795         (CoreIPC::AttachmentInfo::isNull): Return whether attachment is
3796         null, it contains an invalid file descriptor.
3797         (CoreIPC::Connection::processMessage):
3798         (CoreIPC::Connection::sendOutgoingMessage):
3799
3800 2011-07-14  Carlos Garcia Campos  <cgarcia@igalia.com>
3801
3802         Reviewed by Martin Robinson.
3803
3804         [GTK] Implement Plugin Process
3805         https://bugs.webkit.org/show_bug.cgi?id=60546
3806
3807         * GNUmakefile.am: Add new files to compilation.
3808         * PluginProcess/gtk/PluginProcessMainGtk.cpp: Added.
3809         (WebKit::PluginProcessMainGtk):
3810         * PluginProcess/gtk/PluginProcessMainGtk.h: Added.
3811         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
3812         (WebKit::ProcessLauncher::launchProcess):
3813         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
3814         (WebKit::moduleMixesGtkSymbols):
3815         * gtk/PluginMainGtk.cpp: Added.
3816         (main):
3817
3818 2011-07-14  Balazs Kelemen  <kbalazs@webkit.org> and Carlos Garcia Campos  <cgarcia@igalia.com>
3819
3820         Reviewed by Anders Carlsson.
3821
3822         Implement plugin process for UNIX platform
3823         https://bugs.webkit.org/show_bug.cgi?id=60629
3824
3825         * Platform/CoreIPC/Attachment.h:
3826         * Platform/CoreIPC/unix/AttachmentUnix.cpp:
3827         (CoreIPC::Attachment::Attachment): Add the ability to pass a
3828         socket via Attachment.
3829         * Platform/unix/SharedMemoryUnix.cpp:
3830         (WebKit::SharedMemory::Handle::encode): Remove assertions that
3831         check that the Handle is not null. In
3832         PluginProxy::geometryDidChange we pass a null Handle if we do not
3833         need to allocate a new backing store.
3834         (WebKit::SharedMemory::Handle::releaseToAttachment): Ditto.
3835         * PluginProcess/PluginProcess.cpp:
3836         (WebKit::PluginProcess::createWebProcessConnection): Use
3837         Attachment. Set up the connection with socketpair.
3838         * UIProcess/Plugins/PluginProcessProxy.cpp:
3839         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
3840         (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
3841         * UIProcess/Plugins/PluginProcessProxy.h:
3842         * UIProcess/Plugins/PluginProcessProxy.messages.in:
3843         * UIProcess/WebProcessProxy.messages.in:
3844         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
3845         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
3846         Use Attachment to pass the connection.
3847
3848 2011-07-14  Ada Chan  <adachan@apple.com>
3849
3850         Implement support to center selection on a page for WebKit2.
3851         https://bugs.webkit.org/show_bug.cgi?id=64481
3852
3853         Reviewed by Anders Carlsson.
3854
3855         * UIProcess/API/C/WKPage.cpp:
3856         (WKPageCenterSelectionInVisibleArea): Added.  Call WebPageProxy::centerSelectionInVisibleArea().
3857         * UIProcess/API/C/WKPage.h:
3858         * UIProcess/WebPageProxy.cpp:
3859         (WebKit::WebPageProxy::centerSelectionInVisibleArea): Send message to the WebProcess to center selection.
3860         * UIProcess/WebPageProxy.h:
3861         * WebProcess/WebPage/WebPage.cpp:
3862         (WebKit::WebPage::centerSelectionInVisibleArea): Get the FrameSelection from the main frame and call
3863         revealSelection() to center it.
3864         * WebProcess/WebPage/WebPage.h:
3865         * WebProcess/WebPage/WebPage.messages.in: Add the CenterSelectionInVisibleArea message.
3866
3867 2011-07-14  MORITA Hajime  <morrita@google.com>
3868
3869         Unreviewed, rolling out r90976, r90981, and r90985.
3870         http://trac.webkit.org/changeset/90976
3871         http://trac.webkit.org/changeset/90981
3872         http://trac.webkit.org/changeset/90985
3873         https://bugs.webkit.org/show_bug.cgi?id=64251
3874
3875         build break
3876
3877         * win/WebKit2.def:
3878         * win/WebKit2CFLite.def:
3879
3880 2011-07-13  MORITA Hajime <morrita@google.com>
3881
3882         Unreviewed attempt at a build fix.
3883
3884         * win/WebKit2CFLite.def:
3885
3886 2011-07-13  MORITA Hajime  <morrita@google.com>
3887
3888         [ShadowContentElement] forwarded node should be able to access its hosting content element.
3889         https://bugs.webkit.org/show_bug.cgi?id=64251
3890
3891         Reviewed by Dimitri Glazkov.
3892
3893         Exported additional symbols for window.internals object.
3894         
3895         * win/WebKit2.def:
3896
3897 2011-07-13  David Levin  <levin@chromium.org>
3898
3899         Possible race condition in ThreadIdentifierData::initializeKeyOnce and shouldCallRealDebugger.
3900         https://bugs.webkit.org/show_bug.cgi?id=64465
3901
3902         Reviewed by Dmitry Titov.
3903
3904         There isn't a good way to test this as it is very highly unlikely to occur.
3905
3906         * PluginProcess/mac/PluginProcessMac.mm:
3907         (WebKit::shouldCallRealDebugger): :Since scoped static initialization
3908         isn't thread-safe, change the initialization to be global.
3909
3910 2011-07-13  Andreas Kling  <kling@webkit.org>
3911
3912         [Qt][WK2] Remove invalid signal/slot connection in QTouchWebView.
3913         https://bugs.webkit.org/show_bug.cgi?id=64450
3914
3915         Reviewed by Benjamin Poulain.
3916
3917         The focusNextPrevChild() signal was removed, so we shouldn't try to
3918         connect to it.
3919
3920         * UIProcess/API/qt/qtouchwebpage.cpp:
3921         (QTouchWebPagePrivate::setPage):
3922
3923 2011-07-13  Andreas Kling  <kling@webkit.org>
3924
3925         [Qt][WK2] Undelayed WorkItems are leaked after execution.
3926         https://bugs.webkit.org/show_bug.cgi?id=64447
3927
3928         Reviewed by Benjamin Poulain.
3929
3930         * Platform/qt/WorkQueueQt.cpp:
3931         (WorkQueue::WorkItemQt::executeAndDelete):
3932         (WorkQueue::WorkItemQt::timerEvent):
3933         (WorkQueue::scheduleWork):
3934
3935 2011-07-12  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3936
3937         [Qt] Also stop the scale commit timer when commitScaleChange is called explicitly.
3938         https://bugs.webkit.org/show_bug.cgi?id=64357
3939
3940         Reviewed by Benjamin Poulain.
3941
3942         * UIProcess/API/qt/qtouchwebpage.cpp:
3943         (QTouchWebPage::timerEvent):
3944         (QTouchWebPagePrivate::commitScaleChange):
3945
3946 2011-07-12  Joseph Pecoraro  <joepeck@webkit.org>
3947
3948         ApplicationCache update should not immediately fail when reaching per-origin quota
3949         https://bugs.webkit.org/show_bug.cgi?id=64177
3950
3951         Reviewed by Alexey Proskuryakov.
3952
3953         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3954         (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
3955         * WebProcess/WebCoreSupport/WebChromeClient.h:
3956
3957 2011-06-22  Jer Noble  <jer.noble@apple.com>
3958
3959         Full-screen: Don't change the collectionBehavior of the WebView's NSWindow if not necessary
3960         https://bugs.webkit.org/show_bug.cgi?id=63217
3961         <rdar://problem/9660291>
3962
3963         Reviewed by Darin Adler.
3964
3965         Check to see if the NSWindow hosting the WebView is not on the active space before changing the window's
3966         collectionBehavior.
3967
3968         * UIProcess/mac/WKFullScreenWindowController.mm:
3969         (-[WKFullScreenWindowController beganExitFullScreenAnimation]):
3970
3971 2011-07-12  Andreas Kling  <kling@webkit.org>
3972
3973         [Qt][WK2] Navigation actions in incorrect state when loadStarted() is emitted.
3974         https://bugs.webkit.org/show_bug.cgi?id=64383
3975
3976         Reviewed by Kenneth Rohde Christiansen.
3977
3978         Update the navigation actions before emitting loadStarted().
3979
3980         * UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp:
3981         (LoadStartedCatcher::LoadStartedCatcher):
3982         (LoadStartedCatcher::onLoadStarted):
3983         (tst_QDesktopWebView::stopActionEnabledAfterLoadStarted):
3984         * UIProcess/qt/ClientImpl.cpp:
3985         (qt_wk_didStartProvisionalLoadForFrame):
3986
3987 2011-07-12  Benjamin Poulain  <benjamin@webkit.org>
3988
3989         [Qt][WK2] Add a basic Pinch gesture recognizer for WebKit2
3990         https://bugs.webkit.org/show_bug.cgi?id=64373
3991
3992         Reviewed by Andreas Kling.
3993
3994         This patch adds QtPinchGestureRecognizer to recognize pinch gesture out of
3995         the events not handled by the WebProcess.
3996
3997         TouchViewInterface::pinchGestureRequestScale() has a basic default implementation
3998         so the feature can be tested manually.
3999
4000         * UIProcess/qt/QtGestureRecognizer.cpp:
4001         QtGestureRecognizer is the private base class for both gesture recognizer
4002         in order to be able to share some code.
4003         (WebKit::QtGestureRecognizer::QtGestureRecognizer):
4004         (WebKit::QtGestureRecognizer::reset):
4005         * UIProcess/qt/QtGestureRecognizer.h:
4006         * UIProcess/qt/QtPanGestureRecognizer.cpp:
4007         (WebKit::QtPanGestureRecognizer::QtPanGestureRecognizer):
4008         (WebKit::QtPanGestureRecognizer::reset):
4009         * UIProcess/qt/QtPanGestureRecognizer.h:
4010         * UIProcess/qt/QtPinchGestureRecognizer.cpp: Added.
4011         (WebKit::findTouchPointIndex):
4012         (WebKit::computeTouchCenter):
4013         (WebKit::QtPinchGestureRecognizer::QtPinchGestureRecognizer):
4014         (WebKit::QtPinchGestureRecognizer::recognize):
4015         (WebKit::QtPinchGestureRecognizer::reset):
4016         (WebKit::QtPinchGestureRecognizer::initializeGesture):
4017         * UIProcess/qt/QtPinchGestureRecognizer.h: Copied from Source/WebKit2/UIProcess/qt/QtPanGestureRecognizer.h.
4018         (WebKit::QtPinchGestureRecognizer::TouchPointInformation::TouchPointInformation):
4019         (WebKit::QtPinchGestureRecognizer::TouchPointInformation::isValid):
4020         * UIProcess/qt/TouchViewInterface.cpp:
4021         (WebKit::TouchViewInterface::TouchViewInterface):
4022         (WebKit::TouchViewInterface::pinchGestureStarted):
4023         (WebKit::TouchViewInterface::pinchGestureRequestScale):
4024         The scale factor reported by the recognizer to the TouchViewInterface is the total scale since the start
4025         of the gesture in order to avoid numerical instabilities.
4026         (WebKit::TouchViewInterface::pinchGestureEnded):
4027         * UIProcess/qt/TouchViewInterface.h:
4028         * UIProcess/qt/qtouchwebpageproxy.cpp:
4029         (QTouchWebPageProxy::QTouchWebPageProxy):
4030         (QTouchWebPageProxy::processDidCrash):
4031         (QTouchWebPageProxy::doneWithTouchEvent):
4032         * UIProcess/qt/qtouchwebpageproxy.h:
4033         * WebKit2.pro:
4034
4035 2011-07-12  Andreas Kling  <kling@webkit.org>
4036
4037         [Qt][WK2] Navigation actions should react to web process availability.
4038         https://bugs.webkit.org/show_bug.cgi?id=64375
4039
4040         Reviewed by Benjamin Poulain.
4041
4042         When the web process is unavailable, the reload and stop actions should
4043         behave slightly differently. Stop should always be disabled, and reload
4044         should be enabled if there's a reloadable item in the back/forward list.
4045
4046         * UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp:
4047         (tst_QDesktopWebView::navigationActionEnabledStatusAtStartup):
4048         * UIProcess/API/qt/tests/qtouchwebview/tst_qtouchwebview.cpp:
4049         (tst_QTouchWebView::navigationActionEnabledStatusAtStartup):
4050         * UIProcess/qt/QtWebPageProxy.cpp:
4051         (QtWebPageProxy::updateAction):
4052         (QtWebPageProxy::didRelaunchProcess):
4053         (QtWebPageProxy::processDidCrash):
4054
4055 2011-07-12  Andreas Kling  <kling@webkit.org>
4056
4057         [Qt][WK2] QDesktopWebView crashes if resized without web process.
4058         https://bugs.webkit.org/show_bug.cgi?id=64371
4059
4060         Reviewed by Benjamin Poulain.
4061
4062         * UIProcess/qt/QtWebPageProxy.cpp:
4063         (QtWebPageProxy::paint): Remove an invalid assertion. The drawing
4064         area may be null if the web process has crashed.
4065         (QtWebPageProxy::setDrawingAreaSize): Fail silently if there is no
4066         drawing area.
4067
4068 2011-07-12  Andreas Kling  <kling@webkit.org>
4069
4070         [Qt][WK2] Add informative loadFailed() signal to web views.
4071         https://bugs.webkit.org/show_bug.cgi?id=64362
4072
4073         Reviewed by Benjamin Poulain.
4074
4075         The web views will now emit loadFailed(QWebError) when a load failure occurs.
4076
4077         The QWebError object currently contains:
4078         - Type of failure (whether it's an engine, network or protocol error.)
4079         - The failing URL.
4080         - Any error code associated with the failure.
4081
4082         * UIProcess/API/qt/qdesktopwebview.cpp:
4083         (QDesktopWebViewPrivate::loadDidFail):
4084         * UIProcess/API/qt/qdesktopwebview.h:
4085         * UIProcess/API/qt/qdesktopwebview_p.h:
4086         * UIProcess/API/qt/qtouchwebpage.h:
4087         * UIProcess/API/qt/qweberror.cpp: Added.
4088         (QWebError::QWebError):
4089         (QWebErrorPrivate::createQWebError):
4090         (QWebErrorPrivate::QWebErrorPrivate):
4091         (QWebErrorPrivate::~QWebErrorPrivate):
4092         (QWebError::type):
4093         (QWebError::errorCode):
4094         (QWebError::url):
4095         * UIProcess/API/qt/qweberror.h: Added.
4096         * UIProcess/API/qt/qweberror_p.h: Added.
4097         * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp:
4098         (tst_CommonViewTests::loadNonexistentFileUrl):
4099         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
4100         (WebViewAbstraction::WebViewAbstraction):
4101         (WebViewAbstraction::touchViewLoadFailed):
4102         (WebViewAbstraction::desktopViewLoadFailed):
4103         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h:
4104         * UIProcess/qt/ClientImpl.cpp:
4105         (dispatchLoadSucceeded):
4106         (dispatchLoadFailed):
4107         (qt_wk_didFailProvisionalLoadWithErrorForFrame):
4108         (qt_wk_didFinishLoadForFrame):
4109         (qt_wk_didFailLoadWithErrorForFrame):
4110         * UIProcess/qt/QtWebPageProxy.cpp:
4111         (QtWebPageProxy::loadDidFail):
4112         * UIProcess/qt/QtWebPageProxy.h: