[Qt][WK2] QtFileDownloader ctor shouldn't call QtFileDownloader::onReadyRead()
[WebKit.git] / Source / WebKit2 / ChangeLog
1 2011-09-23  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2
3         [Qt][WK2] QtFileDownloader ctor shouldn't call QtFileDownloader::onReadyRead()
4         https://bugs.webkit.org/show_bug.cgi?id=68696
5
6         Reviewed by Andreas Kling.
7
8         Instead of connecting signals and calling QtFileDownloader::onReadyRead()
9         on its constructor, QtFileDownloader will now handle this in start().
10
11         * WebProcess/Downloads/qt/DownloadQt.cpp:
12         (WebKit::Download::start):
13         * WebProcess/Downloads/qt/QtFileDownloader.cpp:
14         (WebKit::QtFileDownloader::QtFileDownloader):
15         (WebKit::QtFileDownloader::start):
16         * WebProcess/Downloads/qt/QtFileDownloader.h:
17
18 2011-09-22  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
19
20         [Qt] TouchWebView load test not running
21         https://bugs.webkit.org/show_bug.cgi?id=68620
22
23         Reviewed by Chang Shu.
24
25         Load test was not executed since it was missing in pro file. Added tst_load.qml to qmltests.pro
26
27         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
28
29 2011-09-22  Dean Jackson  <dino@apple.com>
30
31         Add ENABLE_CSS_FILTERS
32         https://bugs.webkit.org/show_bug.cgi?id=68652
33
34         Reviewed by Simon Fraser.
35
36         * Configurations/FeatureDefines.xcconfig:
37
38 2011-09-22  Simon Fraser  <simon.fraser@apple.com>
39
40         Add APIObjects for Size, Point, Rect
41         https://bugs.webkit.org/show_bug.cgi?id=68644
42
43         Reviewed by Sam Weinig.
44         
45         Make APIObjects for size, point and rect so that they can be
46         used in WKArrayRefs.
47         
48         Make some inline helper methods to create WKSize, WKPoint and WKRect
49         types.
50
51         * GNUmakefile.am:
52         * Shared/API/c/WKBase.h:
53         * Shared/API/c/WKGeometry.cpp: Copied from Source/WebKit2/Shared/API/c/WKGeometry.h.
54         (WKSizeGetTypeID):
55         (WKPointGetTypeID):
56         (WKRectGetTypeID):
57         (WKPointCreate):
58         (WKSizeCreate):
59         (WKRectCreate):
60         (WKSizeGetValue):
61         (WKPointGetValue):
62         (WKRectGetValue):
63         * Shared/API/c/WKGeometry.h:
64         (WKPoint::WKPointMake):
65         (WKPoint::WKSizeMake):
66         (WKPoint::WKRectMake):
67         * Shared/API/c/WKSharedAPICast.h:
68         * Shared/APIObject.h:
69         * Shared/UserMessageCoders.h:
70         (WebKit::UserMessageEncoder::baseEncode):
71         (WebKit::UserMessageDecoder::baseDecode):
72         * Shared/WebGeometry.h: Added.
73         (WebKit::WebSize::create):
74         (WebKit::WebSize::size):
75         (WebKit::WebSize::WebSize):
76         (WebKit::WebSize::type):
77         (WebKit::WebPoint::create):
78         (WebKit::WebPoint::point):
79         (WebKit::WebPoint::WebPoint):
80         (WebKit::WebPoint::type):
81         (WebKit::WebRect::create):
82         (WebKit::WebRect::rect):
83         (WebKit::WebRect::WebRect):
84         (WebKit::WebRect::type):
85         * WebKit2.pro:
86         * WebKit2.xcodeproj/project.pbxproj:
87         * WebKit2API.pri:
88         * win/WebKit2.vcproj:
89
90 2011-09-22  Alexey Proskuryakov  <ap@apple.com>
91
92         [WK2] UIProcess should check that WebProcess isn't sending unexpected file: URLs to it
93         https://bugs.webkit.org/show_bug.cgi?id=68573
94
95         Reviewed by Anders Carlsson.
96
97         Re-landing with a slightly less aggressive check.
98
99         * UIProcess/API/mac/WKView.mm:
100         (maybeCreateSandboxExtensionFromPasteboard): Return a boolean, telling the caller whether
101         an extension actually needed to be created
102         (-[WKView performDragOperation:]): Tell process proxy when the process is going to get
103         universal file read sandbox extension.
104
105         * UIProcess/WebContext.cpp:
106         (WebKit::WebContext::didPerformClientRedirect): Check the URLs.
107         (WebKit::WebContext::didPerformServerRedirect): Ditto.
108         (WebKit::WebContext::didUpdateHistoryTitle): Ditto.
109         (WebKit::WebContext::getPluginPath): Ditto. Also, properly parse the URL - we can never
110         assume that a string coming from WebProcess is a ParsedURLString.
111
112         * UIProcess/WebPageProxy.cpp:
113         (WebKit::WebPageProxy::reattachToWebProcessWithItem): Tell process proxy when the process
114         is going to get universal file read sandbox extension.
115         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle): Changed to return a boolean,
116         telling the caller whether an extension actually needed to be created.
117         (WebKit::WebPageProxy::loadURL): Tell process proxy about extension.
118         (WebKit::WebPageProxy::loadURLRequest): Ditto.
119         (WebKit::WebPageProxy::loadHTMLString): Tell process proxy if a file URL was used as a base
120         one for a string. In this case, WebKit2 assumes that WebProcess has access to a subdirectory,
121         (typically, one where error page resources live), and can load from it.
122         (WebKit::WebPageProxy::loadAlternateHTMLString): Ditto.
123         (WebKit::WebPageProxy::goForward): Tell process proxy about extension.
124         (WebKit::WebPageProxy::goBack): Tell process proxy about extension.
125         (WebKit::WebPageProxy::goToBackForwardItem): Tell process proxy about extension.
126         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Check the URL.
127         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): Ditto.
128         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Ditto.
129         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Ditto.
130         (WebKit::WebPageProxy::decidePolicyForNewWindowAction): Ditto.
131         (WebKit::WebPageProxy::decidePolicyForResponse): Ditto.
132         (WebKit::WebPageProxy::didInitiateLoadForResource): Ditto.
133         (WebKit::WebPageProxy::didSendRequestForResource): Ditto.
134         (WebKit::WebPageProxy::didReceiveResponseForResource): Ditto.
135         (WebKit::WebPageProxy::missingPluginButtonClicked): Ditto.
136
137         * UIProcess/WebPageProxy.h: Changed initializeSandboxExtensionHandle() to return a bool,
138         and renamed to maybeInitializeSandboxExtensionHandle (matching WKView counterpart).
139
140         * UIProcess/WebProcessProxy.cpp:
141         (WebKit::WebProcessProxy::WebProcessProxy): Initialize m_mayHaveUniversalFileReadSandboxExtension.
142         It's going to be true if we ever granted an extension for "/".
143         (WebKit::WebProcessProxy::willLoadHTMLStringWithBaseURL): Remember the path, we should expect
144         that WebProcess will load subresources from it.
145         (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess): Check that it's reasonable to expect
146         WebProcess send us a URL like this.
147         (WebKit::WebProcessProxy::addBackForwardItem): Check the URLs.
148
149         * UIProcess/WebProcessProxy.h: Added data members remembering what to expect from this process.
150
151         * UIProcess/cf/WebPageProxyCF.cpp: (WebKit::WebPageProxy::restoreFromSessionStateData):
152         Tell process proxy when the process is going to get universal file read sandbox extension.
153
154 2011-09-22  Alpha Lam  <hclam@chromium.org>
155
156         https://bugs.webkit.org/show_bug.cgi?id=68081
157         Fix scroll in page scaling mode.
158
159         Reviewed by Simon Fraser.
160
161         * WebProcess/Plugins/PluginView.cpp: Rename pageScaleFactor to frameScaleFactor.
162         (WebKit::PluginView::handleEvent):
163         (WebKit::PluginView::viewGeometryDidChange):
164         (WebKit::PluginView::clipRectInWindowCoordinates):
165
166 2011-09-22  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
167
168         [Qt] Redirection overflow errors have wrong error domain
169         https://bugs.webkit.org/show_bug.cgi?id=68612
170
171         Reviewed by Andreas Kling.
172
173         Redirection overflow currently puts the URL hostname in the errorDomain field
174         and therefore are treated as a QWebError::EngineError. From now on they
175         will be treated as QWebError::HttpError, since their error domain was modified
176         to "HTTP" in QNetworkReplyHandler::redirect().
177
178         * UIProcess/API/qt/qweberror.cpp:
179         (QWebError::type):
180
181 2011-09-22  Csaba Osztrogonác  <ossy@webkit.org>
182
183         REGRESSION(r95679): It broke everything.
184         https://bugs.webkit.org/show_bug.cgi?id=68611
185
186         Unreviewed rolling out r95679 and r95690, because it broke everything.
187
188         * UIProcess/API/mac/WKView.mm:
189         (maybeCreateSandboxExtensionFromPasteboard):
190         (-[WKView performDragOperation:]):
191         * UIProcess/WebContext.cpp:
192         (WebKit::WebContext::didPerformClientRedirect):
193         (WebKit::WebContext::didPerformServerRedirect):
194         (WebKit::WebContext::didUpdateHistoryTitle):
195         (WebKit::WebContext::getPluginPath):
196         * UIProcess/WebPageProxy.cpp:
197         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
198         (WebKit::WebPageProxy::initializeSandboxExtensionHandle):
199         (WebKit::WebPageProxy::loadURL):
200         (WebKit::WebPageProxy::loadURLRequest):
201         (WebKit::WebPageProxy::loadHTMLString):
202         (WebKit::WebPageProxy::loadAlternateHTMLString):
203         (WebKit::WebPageProxy::goForward):
204         (WebKit::WebPageProxy::goBack):
205         (WebKit::WebPageProxy::goToBackForwardItem):
206         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
207         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
208         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
209         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
210         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
211         (WebKit::WebPageProxy::decidePolicyForResponse):
212         (WebKit::WebPageProxy::didInitiateLoadForResource):
213         (WebKit::WebPageProxy::didSendRequestForResource):
214         (WebKit::WebPageProxy::didReceiveResponseForResource):
215         (WebKit::WebPageProxy::missingPluginButtonClicked):
216         * UIProcess/WebPageProxy.h:
217         * UIProcess/WebProcessProxy.cpp:
218         (WebKit::WebProcessProxy::WebProcessProxy):
219         (WebKit::WebProcessProxy::addBackForwardItem):
220         * UIProcess/WebProcessProxy.h:
221         * UIProcess/cf/WebPageProxyCF.cpp:
222         (WebKit::WebPageProxy::restoreFromSessionStateData):
223
224 2011-09-21  Alexey Proskuryakov  <ap@apple.com>
225
226         [WK2] UIProcess should check that WebProcess isn't sending unexpected file: URLs to it
227         https://bugs.webkit.org/show_bug.cgi?id=68573
228
229         Unreviewed follow-up fix.
230
231         * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):
232         Just like we allow null URLs, also allow empty strings.
233
234 2011-09-21  Julien Chaffraix  <jchaffraix@webkit.org>
235
236         Crash in RenderBox::paintMaskImages when GraphicsContext's painting is disabled
237         https://bugs.webkit.org/show_bug.cgi?id=68133
238
239         Reviewed by Darin Adler.
240
241         * win/WebKit2.def:
242         * win/WebKit2CFLite.def:
243         Exported the new FrameView::paintControlTints function.
244
245 2011-09-21  Alexey Proskuryakov  <ap@apple.com>
246
247         [WK2] UIProcess should check that WebProcess isn't sending unexpected file: URLs to it
248         https://bugs.webkit.org/show_bug.cgi?id=68573
249
250         Reviewed by Anders Carlsson.
251
252         * UIProcess/API/mac/WKView.mm:
253         (maybeCreateSandboxExtensionFromPasteboard): Return a boolean, telling the caller whether
254         an extension actually needed to be created
255         (-[WKView performDragOperation:]): Tell process proxy when the process is going to get
256         universal file read sandbox extension.
257
258         * UIProcess/WebContext.cpp:
259         (WebKit::WebContext::didPerformClientRedirect): Check the URLs.
260         (WebKit::WebContext::didPerformServerRedirect): Ditto.
261         (WebKit::WebContext::didUpdateHistoryTitle): Ditto.
262         (WebKit::WebContext::getPluginPath): Ditto. Also, properly parse the URL - we can never
263         assume that a string coming from WebProcess is a ParsedURLString.
264
265         * UIProcess/WebPageProxy.cpp:
266         (WebKit::WebPageProxy::reattachToWebProcessWithItem): Tell process proxy when the process
267         is going to get universal file read sandbox extension.
268         (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle): Changed to return a boolean,
269         telling the caller whether an extension actually needed to be created.
270         (WebKit::WebPageProxy::loadURL): Tell process proxy about extension.
271         (WebKit::WebPageProxy::loadURLRequest): Ditto.
272         (WebKit::WebPageProxy::loadHTMLString): Tell process proxy if a file URL was used as a base
273         one for a string. In this case, WebKit2 assumes that WebProcess has access to a subdirectory,
274         (typically, one where error page resources live), and can load from it.
275         (WebKit::WebPageProxy::loadAlternateHTMLString): Ditto.
276         (WebKit::WebPageProxy::goForward): Tell process proxy about extension.
277         (WebKit::WebPageProxy::goBack): Tell process proxy about extension.
278         (WebKit::WebPageProxy::goToBackForwardItem): Tell process proxy about extension.
279         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Check the URL.
280         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): Ditto.
281         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Ditto.
282         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Ditto.
283         (WebKit::WebPageProxy::decidePolicyForNewWindowAction): Ditto.
284         (WebKit::WebPageProxy::decidePolicyForResponse): Ditto.
285         (WebKit::WebPageProxy::didInitiateLoadForResource): Ditto.
286         (WebKit::WebPageProxy::didSendRequestForResource): Ditto.
287         (WebKit::WebPageProxy::didReceiveResponseForResource): Ditto.
288         (WebKit::WebPageProxy::missingPluginButtonClicked): Ditto.
289
290         * UIProcess/WebPageProxy.h: Changed initializeSandboxExtensionHandle() to return a bool,
291         and renamed to maybeInitializeSandboxExtensionHandle (matching WKView counterpart).
292
293         * UIProcess/WebProcessProxy.cpp:
294         (WebKit::WebProcessProxy::WebProcessProxy): Initialize m_mayHaveUniversalFileReadSandboxExtension.
295         It's going to be true if we ever granted an extension for "/".
296         (WebKit::WebProcessProxy::willLoadHTMLStringWithBaseURL): Remember the path, we should expect
297         that WebProcess will load subresources from it.
298         (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess): Check that it's reasonable to expect
299         WebProcess send us a URL like this.
300         (WebKit::WebProcessProxy::addBackForwardItem): Check the URLs.
301
302         * UIProcess/WebProcessProxy.h: Added data members remembering what to expect from this process.
303
304         * UIProcess/cf/WebPageProxyCF.cpp: (WebKit::WebPageProxy::restoreFromSessionStateData):
305         Tell process proxy when the process is going to get universal file read sandbox extension.
306
307 2011-09-19  Jer Noble  <jer.noble@apple.com>
308
309         Add settings to control the availability of the Web Audio API to WebKit and WebKit2.
310         https://bugs.webkit.org/show_bug.cgi?id=68382
311
312         Add support for the webAudioEnabled preference in WebKit2.
313
314         Reviewed by Darin Adler.
315
316         * Shared/WebPreferencesStore.h: Add WebAudioEnabled getter and setter macro.
317         * UIProcess/API/C/WKPreferences.cpp:
318         (WKPreferencesSetWebAudioEnabled): Added.
319         (WKPreferencesGetWebAudioEnabled): Added.
320         * UIProcess/API/C/WKPreferences.h:
321         * WebProcess/WebPage/WebPage.cpp:
322         (WebKit::WebPage::updatePreferences): Update the webAudioEnabled preference.
323
324 2011-09-21  Dan Bernstein  <mitz@apple.com>
325
326         Use the prefix "WK" instead of "Web" for Objective-C classes defined in WebKit2.
327
328         Reviewed by Anders Carlsson.
329
330         Renamed WebInspectorProxyObjCAdapter to WKWebInspectorProxyObjCAdapter.
331         Renamed WebInspectorWKView to WKWebInspectorWKView.
332         Renamed WebFindIndicatorWindowAnimation to WKFindIndicatorWindowAnimation.
333         Renamed WebFindIndicatorView to WKFindIndicatorView.
334         Renamed WebUserDataWrapper to WKUserDataWrapper.
335
336         Updated the build phase checking for inappropriate Objective-C class names to disallow the prefix
337         "Web" and only allow "WK".
338
339         * UIProcess/API/mac/FindIndicatorWindow.h:
340         * UIProcess/API/mac/FindIndicatorWindow.mm:
341         (WebKit::FindIndicatorWindow::setFindIndicator):
342         (WebKit::FindIndicatorWindow::startFadeOutTimerFired):
343         * UIProcess/WebInspectorProxy.h:
344         * UIProcess/mac/WebContextMenuProxyMac.mm:
345         (-[WKMenuTarget forwardContextMenuAction:]):
346         (WebKit::nsMenuItemVector):
347         * UIProcess/mac/WebInspectorProxyMac.mm:
348         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
349         (WebKit::WebInspectorProxy::platformOpen):
350         * WebKit2.xcodeproj/project.pbxproj:
351         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
352         (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac):
353
354 2011-09-21  Chang Shu  <cshu@webkit.org>
355
356         [WK2] [Mac] Implement a more-complete MouseDown/MouseUp/MouseMoveTo functions for WebKit2 EventSender
357         https://bugs.webkit.org/show_bug.cgi?id=68108
358
359         This patch implements the event sender mouse events through WebKit2 UIProcess which is
360         closer to the real simulation than a WebProcess-only approach. The patch only supports Mac
361         platform as the first step so the existing code is still kept for other platforms.
362
363         Reviewed by Darin Adler.
364
365         * UIProcess/API/C/WKPage.cpp:
366         (WKPageSetShouldSendEventsSynchronously):
367         * UIProcess/API/C/WKPagePrivate.h:
368         * UIProcess/WebPageProxy.cpp:
369         (WebKit::WebPageProxy::WebPageProxy):
370         (WebKit::WebPageProxy::handleMouseEvent):
371         (WebKit::WebPageProxy::handleKeyboardEvent):
372         * UIProcess/WebPageProxy.h:
373         (WebKit::WebPageProxy::setShouldSendEventsSynchronously):
374         * WebProcess/WebPage/WebPage.cpp:
375         (WebKit::WebPage::mouseEventSyncForTesting):
376         * WebProcess/WebPage/WebPage.h:
377         * WebProcess/WebPage/WebPage.messages.in:
378
379 2011-09-21  Dan Bernstein  <mitz@apple.com>
380
381         WebKit2 part of: Prevent the WebKit frameworks from defining inappropriately-named Objective-C classes
382         https://bugs.webkit.org/show_bug.cgi?id=68451
383
384         Reviewed by Darin Adler.
385
386         * WebKit2.xcodeproj/project.pbxproj: Added a script build phase that invokes
387         check-for-inappropriate-objc-class-names, allowing only class names prefixed with "WK" or "Web".
388
389 2011-09-21  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
390
391         [Qt][WK2] Implement Download support in WebProcess
392         https://bugs.webkit.org/show_bug.cgi?id=68153
393
394         Reviewed by Andreas Kling.
395
396         We implement the necessary functions of Download.h, and our QtFileDownloader
397         to handle all network communication and call the necessary functions of Download.
398
399         We use the download policy for any MIME type not supported by WebKit. This
400         behaves like Qt non-WebKit2 except that we don't force download when
401         we encounter Content-Disposition: attachment. We still use the "filename="
402         field for file name suggestion though.
403
404         Based on original patches by: Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>,
405         Jocelyn Turcotte <jocelyn.turcotte@nokia.com>, Simon Hausmann <simon.hausmann@nokia.com>
406         and Zalan Bujtas <zalan.bujtas@nokia.com>.
407
408         * UIProcess/API/qt/qweberror.cpp: Adding DownloadError
409         (QWebError::type):
410         * UIProcess/API/qt/qweberror.h: Adding DownloadError
411         * WebKit2.pro:
412         * WebProcess/Downloads/Download.cpp: Adding QtFileDownloader, Qt platform specific
413         (WebKit::Download::Download):
414         * WebProcess/Downloads/Download.h: Adding QtFileDownloader, Qt platform specific
415         * WebProcess/Downloads/qt/DownloadQt.cpp:
416         (WebKit::Download::start):
417         (WebKit::Download::startWithHandle):
418         (WebKit::Download::cancel):
419         (WebKit::Download::platformInvalidate):
420         (WebKit::Download::didDecideDestination):
421         * WebProcess/Downloads/qt/QtFileDownloader.cpp: Added.
422         (WebKit::QtFileDownloader::QtFileDownloader):
423         (WebKit::QtFileDownloader::~QtFileDownloader):
424         (WebKit::QtFileDownloader::determineFilename):
425         (WebKit::QtFileDownloader::decidedDestination):
426         (WebKit::QtFileDownloader::abortDownloadWritingAndEmitError):
427         (WebKit::QtFileDownloader::onReadyRead):
428         (WebKit::QtFileDownloader::onFinished):
429         (WebKit::QtFileDownloader::onError):
430         (WebKit::QtFileDownloader::cancel):
431         * WebProcess/Downloads/qt/QtFileDownloader.h: Added.
432
433 2011-09-21  Mark Rowe  <mrowe@apple.com>
434
435         <rdar://problem/9890932> "Open PDF in Preview" on two PDFs of the same name does nothing the second time
436
437         The logic in PDFViewController::pathToPDFOnDisk that deals with constructing a unique
438         file name if a file of the suggested name already exists was incorrect. It was appending
439         the template used by mkstemps to the directory name component of the path rather than
440         using it as a prefix on the filename portion of the path. This resulted in a template path
441         like WebKitPDFs-ABCDEFXXXXXX-/foo.pdf where WebKitPDFs-ABCDEF/XXXXXX-foo.pdf was expected.
442
443         Reviewed by Jon Honeycutt.
444
445         * UIProcess/API/mac/PDFViewController.mm:
446         (WebKit::PDFViewController::pathToPDFOnDisk): Append the template as a new path component,
447         then append the suggested file name to that component.
448
449 2011-09-21  Andras Becsi  <andras.becsi@nokia.com>
450
451         [Qt] Remove Qt specific code from css/SelectorChecker.cpp
452         https://bugs.webkit.org/show_bug.cgi?id=67702
453
454         Reviewed by Csaba Osztrogonác.
455
456         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Modify to match new prototype.
457         (WebKit::WebPlatformStrategies::isLinkVisited):
458         (WebKit::WebPlatformStrategies::addVisitedLink):
459         * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Ditto.
460
461 2011-09-20  Anders Carlsson  <andersca@apple.com>
462
463         Get rid of PluginView::setBoundsSize from WebKit2
464         https://bugs.webkit.org/show_bug.cgi?id=68489
465
466         Reviewed by Dan Bernstein.
467
468         Remove m_boundsSize and the setter since they aren't used anywhere.
469
470         * WebProcess/Plugins/PluginView.cpp:
471         * WebProcess/Plugins/PluginView.h:
472
473 2011-09-20  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
474
475         [Qt] QTouchWebView missing signal tests for loadProgress
476         https://bugs.webkit.org/show_bug.cgi?id=68442
477
478         Reviewed by Chang Shu.
479
480         Added test case to check load progress signal for QTouchWebView
481
482         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgressSignal.qml: Added.
483         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
484
485 2011-09-20  Sheriff Bot  <webkit.review.bot@gmail.com>
486
487         Unreviewed, rolling out r95565.
488         http://trac.webkit.org/changeset/95565
489         https://bugs.webkit.org/show_bug.cgi?id=68470
490
491         Broke builds (Requested by andersca on #webkit).
492
493         * GNUmakefile.am:
494         * Shared/API/c/WKHitTestResult.cpp: Removed.
495         * Shared/API/c/WKHitTestResult.h: Removed.
496         * UIProcess/API/C/WebKit2.h:
497
498 2011-09-20  Alexis Menard  <alexis.menard@openbossa.org>
499
500         [Qt] [WK2] Implement a persistent cookie storage.
501         https://bugs.webkit.org/show_bug.cgi?id=65309
502
503         Reviewed by Chang Shu.
504
505         Add parameter to the WebProcess creation to specify where cookies should be saved.
506         It also use the new cookie storage implementation and set it to our network stack
507         so cookies are used when using it.
508
509         * Shared/WebProcessCreationParameters.cpp:
510         (WebKit::WebProcessCreationParameters::encode):
511         (WebKit::WebProcessCreationParameters::decode):
512         * Shared/WebProcessCreationParameters.h:
513         * UIProcess/qt/WebContextQt.cpp:
514         (WebKit::WebContext::platformInitializeWebProcess):
515         * WebProcess/qt/WebProcessQt.cpp:
516         (WebKit::WebProcess::platformInitializeWebProcess):
517         (WebKit::WebProcess::platformTerminate):
518
519 2011-09-20  Nayan Kumar K  <nayankk@motorola.com>
520
521         Added WKHitTestResult API's.
522
523         WKHitTestResult API's are added. These API's can be used to
524         get the hover'ed link/image/media URL as well as link lable and
525         title.
526         https://bugs.webkit.org/show_bug.cgi?id=68426
527
528         Reviewed by Anders Carlsson.
529
530         * GNUmakefile.am:
531         * Shared/API/c/WKHitTestResult.cpp: Copied from Source/WebKit2/UIProcess/API/C/WebKit2.h.
532         (WKHitTestResultGetTypeID):
533         (WKHitTestResultCopyAbsoluteImageURL):
534         (WKHitTestResultCopyAbsoluteLinkURL):
535         (WKHitTestResultCopyAbsoluteMediaURL):
536         (WKHitTestResultCopyLinkLabel):
537         (WKHitTestResultCopyLinkTitle):
538         * Shared/API/c/WKHitTestResult.h: Copied from Source/WebKit2/UIProcess/API/C/WebKit2.h.
539         * UIProcess/API/C/WebKit2.h:
540
541 2011-09-20  Alexis Menard  <alexis.menard@openbossa.org>
542
543         [Qt][WK2] Add stubs for FULLSCREEN_API on Qt.
544         https://bugs.webkit.org/show_bug.cgi?id=68444
545
546         Reviewed by Andreas Kling.
547
548         Create all the stubs necessary for enabling FULLSCREEN_API on the Qt port.
549
550         * UIProcess/qt/WebFullScreenManagerProxyQt.cpp: Added.
551         (WebKit::WebFullScreenManagerProxy::invalidate):
552         (WebKit::WebFullScreenManagerProxy::enterFullScreen):
553         (WebKit::WebFullScreenManagerProxy::exitFullScreen):
554         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation):
555         (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation):
556         (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation):
557         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation):
558         (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode):
559         (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode):
560         (WebKit::WebFullScreenManagerProxy::getFullScreenRect):
561         * WebKit2.pro:
562         * WebProcess/FullScreen/qt: Added.
563         * WebProcess/FullScreen/qt/WebFullScreenManagerQt.cpp: Added.
564         (WebKit::WebFullScreenManagerQt::WebFullScreenManagerQt):
565         (WebKit::WebFullScreenManager::create):
566         (WebKit::WebFullScreenManagerQt::setRootFullScreenLayer):
567         (WebKit::WebFullScreenManagerQt::beginEnterFullScreenAnimation):
568         (WebKit::WebFullScreenManagerQt::beginExitFullScreenAnimation):
569         * WebProcess/FullScreen/qt/WebFullScreenManagerQt.h: Added.
570
571 2011-09-20  Alexis Menard  <alexis.menard@openbossa.org>
572
573         [Qt][WK2] Export QNetworkReply in the QtWebKit QML module.
574         https://bugs.webkit.org/show_bug.cgi?id=68401
575
576         Reviewed by Simon Hausmann.
577
578         Add QNetworkReply in the QtWebKit module. We use the enum QNetworkReply::NetworkError
579         as the error code when the load fails. It is not used in the QtQuick module therefore
580         the QML team thinks it should belong here. Also added some auto-tests to cover the
581         loading errors.
582
583         * UIProcess/API/qt/qmlplugin/plugin.cpp:
584         (WebKit2QmlPlugin::registerTypes):
585         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadFail.qml: Added.
586         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadFail.qml: Added.
587
588 2011-09-20  Csaba Osztrogonác  <ossy@webkit.org>
589
590         [Qt][Mac] Buildfix after r95513.
591
592         Rubber-stamped by Andras Becsi.
593
594         * Scripts/generate-forwarding-headers.pl: Add mm file supporting.
595
596 2011-09-20  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
597
598         [Qt] QDesktopWebView missing loadProgress tests
599         https://bugs.webkit.org/show_bug.cgi?id=68280
600
601         Reviewed by Andreas Kling.
602
603         Added test case to check load progress property and signal for QDesktopWebView
604
605         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgress.qml: Added.
606         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_loadProgressSignal.qml: Added.
607         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
608
609 2011-09-20  Carlos Garcia Campos  <cgarcia@igalia.com>
610
611         [GTK] WebProcess shouldn't use the GTK+ API
612         https://bugs.webkit.org/show_bug.cgi?id=68062
613
614         Reviewed by Martin Robinson.
615
616         Use WebCore API to create errors in WebProcess.
617
618         * GNUmakefile.am: Don't use webkit/webkierror.h.
619         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
620         (WebKit::cancelledError):
621         (WebKit::blockedError):
622         (WebKit::cannotShowURLError):
623         (WebKit::interruptedForPolicyChangeError):
624         (WebKit::cannotShowMIMETypeError):
625         (WebKit::fileDoesNotExistError):
626         (WebKit::pluginWillHandleLoadError):
627
628 2011-09-19  Mark Rowe  <mrowe@apple.com>
629
630         <http://webkit.org/b/68421> Stop calling UpdateSystemActivity in places where we hold power assertions that achieve the same effect
631
632         On SnowLeopard and newer it's not necessary to call UpdateSystemActivity to prevent the screensaver from kicking
633         in as the NoDisplaySleep assertion now has that effect. It's also not necessary to hold both a NoDisplaySleep and
634         a NoIdleSleep assertion as the latter is implied by the former.
635
636         Adopt the DisplaySleepDisabler class that was added to WebCore and remove all of duplicated logic from WKFullScreenWindowController.
637
638         Reviewed by Dan Bernstein.
639
640         * UIProcess/mac/WKFullScreenWindowController.h:
641         * UIProcess/mac/WKFullScreenWindowController.mm:
642         (-[WKFullScreenWindowController _updatePowerAssertions]): Create a DisplaySleepDisabler instance when transitioning from permitting
643         display sleep to disabling display sleep. Clear out our reference when sleep should be permitted, destroying any
644         disabler that we own. Also adds a FIXME about an error that was noticed while working in this code.
645
646 2011-09-19  Adam Barth  <abarth@webkit.org>
647
648         Always enable ENABLE(EVENTSOURCE)
649         https://bugs.webkit.org/show_bug.cgi?id=68414
650
651         Reviewed by Eric Seidel.
652
653         * Configurations/FeatureDefines.xcconfig:
654
655 2011-09-19  Alexis Menard  <alexis.menard@openbossa.org>
656
657         [Qt] Unreviewed coding style fix.
658
659         * UIProcess/API/qt/qdesktopwebview.h:
660         * UIProcess/API/qt/qtouchwebpage.h:
661         * UIProcess/API/qt/qweberror.h:
662
663 2011-09-19  Alexis Menard  <alexis.menard@openbossa.org>
664
665         [Qt][WK2] Make loading errors API easier to use.
666         https://bugs.webkit.org/show_bug.cgi?id=68357
667
668         Reviewed by Tor Arne Vestbø.
669
670         Make the API to get loading errors easier to use. 95197 introduced
671         a QJSValue API that is a bit opaque for the client code. Rather than
672         using a dedicated object, we can just pass the needed information as
673         parameters of the slot.
674
675         * UIProcess/API/qt/qdesktopwebview.cpp:
676         (QDesktopWebViewPrivate::loadDidFail):
677         * UIProcess/API/qt/qdesktopwebview.h:
678         * UIProcess/API/qt/qdesktopwebview_p.h:
679         * UIProcess/API/qt/qtouchwebpage.h:
680         * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp:
681         (tst_CommonViewTests::loadNonexistentFileUrl):
682         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
683         (WebViewAbstraction::WebViewAbstraction):
684         (WebViewAbstraction::touchViewLoadFailed):
685         (WebViewAbstraction::desktopViewLoadFailed):
686         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h:
687         * UIProcess/qt/QtWebPageProxy.cpp:
688         (QtWebPageProxy::loadDidFail):
689         * UIProcess/qt/TouchViewInterface.cpp:
690         (WebKit::TouchViewInterface::loadDidFail):
691         * UIProcess/qt/TouchViewInterface.h:
692         * UIProcess/qt/ViewInterface.h:
693
694 2011-09-19  Dan Bernstein  <mitz@apple.com>
695
696         WebKit2 part of [mac] WebKit contains Objective-C classes that are not prefixed with its standard prefixes
697         https://bugs.webkit.org/show_bug.cgi?id=68323
698
699         Reviewed by Sam Weinig.
700
701         Renamed FullKeyboardAccessWatcher to WKFullKeyboardAccessWatcher.
702         Renamed AccessibilityWebPageObject to WKAccessibilityWebPageObject.
703
704         * WebKit2.xcodeproj/project.pbxproj:
705         * WebProcess/WebPage/WebPage.h:
706         * WebProcess/WebPage/mac/AccessibilityWebPageObject.h: Removed.
707         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm: Removed.
708         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h: Copied from Source/WebKit2/WebProcess/WebPage/mac/AccessibilityWebPageObject.h.
709         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: Copied from Source/WebKit2/WebProcess/WebPage/mac/AccessibilityWebPageObject.mm.
710         * WebProcess/WebPage/mac/WebPageMac.mm:
711         (WebKit::WebPage::platformInitialize):
712         (WebKit::WebPage::accessibilityRemoteObject):
713         * WebProcess/mac/FullKeyboardAccessWatcher.h: Removed.
714         * WebProcess/mac/FullKeyboardAccessWatcher.mm: Removed.
715         * WebProcess/mac/WKFullKeyboardAccessWatcher.h: Copied from Source/WebKit2/WebProcess/mac/FullKeyboardAccessWatcher.h.
716         * WebProcess/mac/WKFullKeyboardAccessWatcher.mm: Copied from Source/WebKit2/WebProcess/mac/FullKeyboardAccessWatcher.mm.
717         (+[WKFullKeyboardAccessWatcher fullKeyboardAccessEnabled]):
718         * WebProcess/mac/WebProcessMac.mm:
719         (WebKit::WebProcess::fullKeyboardAccessEnabled):
720
721 2011-09-14  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
722
723         [Qt] [WK2] Implement popup menus in QDesktopWebView using QComboBox
724         https://bugs.webkit.org/show_bug.cgi?id=67938
725
726         Reviewed by Andreas Kling.
727
728         Implement a WebPopupMenuProxy that uses QtWebComboBox (a QComboBox subclass we
729         have for WK1). Then use this WebPopupMenuProxy in QDesktopWebView. The implementation
730         explicitly avoids running a nested mainloop.
731
732         * UIProcess/WebPageProxy.cpp:
733         (WebKit::WebPageProxy::showPopupMenu):
734         Since we don't run a nested mainloop, we need to keep the client pointer to call
735         valueChangedForPopupMenu().
736
737         * UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp: Added.
738         (WebKit::WebPopupMenuProxyQtDesktop::WebPopupMenuProxyQtDesktop):
739         (WebKit::WebPopupMenuProxyQtDesktop::~WebPopupMenuProxyQtDesktop):
740         (WebKit::WebPopupMenuProxyQtDesktop::showPopupMenu):
741         (WebKit::WebPopupMenuProxyQtDesktop::hidePopupMenu):
742         (WebKit::WebPopupMenuProxyQtDesktop::setSelectedIndex):
743         (WebKit::WebPopupMenuProxyQtDesktop::onPopupMenuHidden):
744         (WebKit::WebPopupMenuProxyQtDesktop::populate):
745         * UIProcess/qt/WebPopupMenuProxyQtDesktop.h: Added.
746         (WebKit::WebPopupMenuProxyQtDesktop::create):
747         * UIProcess/qt/qdesktopwebpageproxy.cpp:
748         (QDesktopWebPageProxy::createPopupMenuProxy):
749         * UIProcess/qt/qdesktopwebpageproxy.h:
750         * WebKit2.pro:
751
752 2011-09-19  Carlos Garcia Campos  <cgarcia@igalia.com>
753
754         [GTK] Fix distcheck build
755         https://bugs.webkit.org/show_bug.cgi?id=68241
756
757         Reviewed by Martin Robinson.
758
759         * GNUmakefile.am:
760
761 2011-09-17  Mihai Parparita  <mihaip@chromium.org>
762
763         FrameLoaderClient BackForwardList-related methods are unsued
764         https://bugs.webkit.org/show_bug.cgi?id=68293
765
766         Reviewed by Darin Adler.
767
768         Remove FrameLoaderClient methods that were added by r51629, since only        
769         the old (since-deleted) Android port needed them.
770
771         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
772         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
773
774 2011-09-16  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
775         [Qt] QTouchWebView missing loadProgress tests
776         https://bugs.webkit.org/show_bug.cgi?id=68183
777
778         Reviewed by Chang Shu.
779
780         Added test case to check load progress for QTouchWebView
781
782         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadProgress.qml: Added.
783         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
784
785 2011-09-16  Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com>
786
787         Removed unwanted NotImplemented.h inclusion in WebKit2 GTK port & platform independent files
788         https://bugs.webkit.org/show_bug.cgi?id=68249
789
790         Reviewed by Martin Robinson.
791
792         * Shared/Plugins/NPIdentifierData.cpp: Removed NotImplemented.h inclusion.
793         * Shared/Plugins/NPRemoteObjectMap.cpp: Removed NotImplemented.h inclusion.
794         * Shared/Plugins/NPVariantData.cpp: Removed NotImplemented.h inclusion.
795         * UIProcess/gtk/WebContextGtk.cpp: Removed NotImplemented.h inclusion.
796         * WebProcess/Cookies/WebCookieManager.cpp: Removed NotImplemented.h inclusion.
797         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: Removed NotImplemented.h inclusion.
798         * WebProcess/Plugins/Netscape/JSNPMethod.cpp: Removed NotImplemented.h inclusion.
799         * WebProcess/Plugins/Netscape/NPJSObject.cpp: Removed NotImplemented.h inclusion.
800         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: Removed NotImplemented.h inclusion.
801         * WebProcess/WebCoreSupport/WebInspectorClient.cpp: Removed NotImplemented.h inclusion.
802
803 2011-09-16  Simon Fraser  <simon.fraser@apple.com>
804
805         Make custom scrollbar theme for use in DRT, to reduce pixel diffs between platforms
806         https://bugs.webkit.org/show_bug.cgi?id=68134
807
808         Reviewed by Sam Weinig.
809
810         Hook up a private preference that enables the mock scrollbar theme.
811
812         * Shared/WebPreferencesStore.h:
813         * UIProcess/API/C/WKPreferences.cpp:
814         (WKPreferencesSetMockScrollbarsEnabled):
815         (WKPreferencesGetMockScrollbarsEnabled):
816         * UIProcess/API/C/WKPreferencesPrivate.h:
817         * WebProcess/WebPage/WebPage.cpp:
818         (WebKit::WebPage::updatePreferences):
819
820 2011-09-16  Mark Rowe  <mrowe@apple.com>
821
822         Stop installing source and header files in to WebKit2.framework after r95303.
823
824         * WebKit2.xcodeproj/project.pbxproj:
825
826 2011-09-16  Anders Carlsson  <andersca@apple.com>
827
828         Add back the WKHitTestResultRef parameter to mouseDidMoveOverElement in an ABI preserving way
829         https://bugs.webkit.org/show_bug.cgi?id=68269
830
831         Reviewed by Geoffrey Garen.
832
833         Add back WKPageMouseDidMoveOverElementCallback last and deprecate the current callback.
834
835         * UIProcess/API/C/WKPage.h:
836         * UIProcess/WebUIClient.cpp:
837         (WebKit::WebUIClient::mouseDidMoveOverElement):
838
839 2011-09-16  Alexey Proskuryakov  <ap@apple.com>
840
841         Give local builds of WebProcess different icon to distinguish them from built-in Safari’s WebProcess
842         https://bugs.webkit.org/show_bug.cgi?id=68268
843
844         Reviewed by Darin Adler.
845
846         * Configurations/WebProcess.xcconfig: Add an icon in Debug and Release builds.  The empty
847         value for production resulted in WebKit not adding the key to plist at all, which is what
848         we want (but I don't know if it's a supported feature).
849         Also, don't copy the icon file to built framework in production builds.
850
851         * WebKit2.xcodeproj/project.pbxproj: Added WebKit.icns.
852
853         * WebProcess/Info.plist: Added a key for the icon.
854
855         * WebProcess/mac/WebKit.icns: Copied from Websites/webkit.org/images/surfin-safari.icns.
856
857 2011-09-16  Anders Carlsson  <andersca@apple.com>
858
859         Temporarily remove the WKHitTestResultRef parameter to avoid breaking the WK2 ABI/API
860         https://bugs.webkit.org/show_bug.cgi?id=68266
861
862         Reviewed by John Sullivan.
863
864         * UIProcess/API/C/WKPage.h:
865         * UIProcess/WebUIClient.cpp:
866         (WebKit::WebUIClient::mouseDidMoveOverElement):
867
868 2011-09-16  Filip Pizlo  <fpizlo@apple.com>
869
870         DFG JIT should inline Math.abs
871         https://bugs.webkit.org/show_bug.cgi?id=68227
872
873         Reviewed by Oliver Hunt.
874
875         Added JavaScriptCore/dfg to include path path.
876
877         * CMakeLists.txt:
878
879 2011-09-16  Igor Oliveira  <igor.oliveira@openbossa.org>
880
881         [WK2] mouseDidMoveOverElement needs to send more information about hovered element to UiProcess.
882         https://bugs.webkit.org/show_bug.cgi?id=68125
883
884         This patch implements support for the UiProcess to know what is the link url of a hovered element.
885
886         Reviewed by Anders Carlsson.
887
888         * CMakeLists.txt:
889         * GNUmakefile.am:
890         * Shared/API/c/WKBase.h:
891         * Shared/APIObject.h:
892         * Shared/WebHitTestResult.cpp: Added.
893
894         WebHitTestResult has hovered element information.
895
896         (WebKit::WebHitTestResult::create):
897         (WebKit::WebHitTestResult::Data::encode):
898         (WebKit::WebHitTestResult::Data::decode):
899         * Shared/WebHitTestResult.h: Added.
900         (WebKit::WebHitTestResult::absoluteImageURL):
901         (WebKit::WebHitTestResult::absoluteLinkURL):
902         (WebKit::WebHitTestResult::absoluteMediaURL):
903         (WebKit::WebHitTestResult::linkLabel):
904         (WebKit::WebHitTestResult::linkTitle):
905         (WebKit::WebHitTestResult::WebHitTestResult):
906         (WebKit::WebHitTestResult::type):
907         * UIProcess/API/C/WKAPICast.h:
908         * UIProcess/API/C/WKPage.h:
909         * UIProcess/WebPageProxy.cpp:
910         (WebKit::WebPageProxy::mouseDidMoveOverElement):
911         * UIProcess/WebPageProxy.h:
912         * UIProcess/WebPageProxy.messages.in:
913         * UIProcess/WebUIClient.cpp:
914         (WebKit::WebUIClient::mouseDidMoveOverElement):
915         * UIProcess/WebUIClient.h:
916         * WebKit2.pro:
917         * WebKit2.xcodeproj/project.pbxproj:
918         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
919         (WebKit::WebChromeClient::mouseDidMoveOverElement):
920         * win/WebKit2.vcproj:
921
922 2011-09-15  Adam Roben  <aroben@apple.com>
923
924         Add support for attributes on message parameters
925
926         Parameter attributes are specified as a space-separated list inside square brackets before
927         the parameter's type. WebKit2 doesn't use this, but other projects that use these scripts
928         would like to.
929
930         Fixes <http://webkit.org/b/68219> Would like a way to specify attributes on message
931         parameters
932
933         Reviewed by Sam Weinig.
934
935         * Scripts/webkit2/messages_unittest.py: Added tests for parameter attributes.
936
937         * Scripts/webkit2/model.py:
938         (Parameter.__init__): Added a new attributes parameter, which is stored in the self.attributes
939         property.
940         (Parameter.has_attribute): Added. Returns true if this parameter has the given attribute.
941
942         * Scripts/webkit2/parser.py:
943         (parse): Moved attributes-parsing code from here...
944         (parse_attributes_string): ...to here.
945         (parse_parameters_string): Renamed from parse_parameter_string. Now also parses parameter
946         attributes.
947
948 2011-09-15  Adam Roben  <aroben@apple.com>
949
950         Make WebKit2's message-generation model and parser scripts accessible to other projects
951
952         We copy them into the build products directory so other projects can find them.
953
954         Fixes <http://webkit.org/b/68169> Would like to be able to use WebKit2's message-generation
955         scripts in other projects
956
957         Reviewed by Darin Adler.
958
959         * WebKit2.xcodeproj/project.pbxproj: Copy the scripts to PrivateHeaders.
960
961         * win/WebKit2.make: Copy the scripts from obj/WebKit2/scripts to
962         tools/scripts, like WebCore does.
963
964         * win/WebKit2Generated.make: Copy the scripts to obj/WebKit2/scripts, which is similar to what
965         WebCore does for its bindings scripts.
966
967 2011-09-15  Adam Roben  <aroben@apple.com>
968
969         Split some of the message-generation code into separate modules
970
971         This is in preparation for making these modules scripts usable by other projects.
972
973         Fixes <http://webkit.org/b/68217> Model and parsing functionality for WebKit2's
974         message-generation scripts is trapped inside a much larger module
975
976         Reviewed by Darin Adler.
977
978         * DerivedSources.make:
979         * DerivedSources.pro:
980         * GNUmakefile.am:
981         * WebKit2.xcodeproj/project.pbxproj:
982         * win/WebKit2.vcproj:
983         * win/WebKit2Generated.vcproj:
984         Added new files.
985
986         * Scripts/webkit2/messages.py: Moved some code from here...
987
988         * Scripts/webkit2/model.py: Added.
989         * Scripts/webkit2/parser.py: Added.
990         ...to here. MessageReceiver.parse was split out into a function in the new parser module.
991
992         * Scripts/webkit2/messages_unittest.py: Updated for renames.
993
994 2011-09-16  Martin Robinson  <mrobinson@igalia.com>
995
996         [GTK] Disable WebKit2 by default in configure.ac, but enable it with build-webkit
997         https://bugs.webkit.org/show_bug.cgi?id=68178
998
999         Reviewed by Xan Lopez.
1000
1001         * GNUmakefile.am: Do not build WebKit2 by default. Re-add pkgconfig support
1002         for WebKit2.
1003
1004 2011-09-15  Adam Barth  <abarth@webkit.org>
1005
1006         Rename ENABLE(DATABASE) to ENABLE(SQL_DATABASE)
1007         https://bugs.webkit.org/show_bug.cgi?id=68205
1008
1009         Reviewed by Eric Seidel.
1010
1011         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1012         * WebProcess/WebCoreSupport/WebChromeClient.h:
1013         * WebProcess/WebPage/WebPage.cpp:
1014         (WebKit::WebPage::updatePreferences):
1015         * WebProcess/WebProcess.cpp:
1016         (WebKit::WebProcess::initializeWebProcess):
1017
1018 2011-09-15  Eric Seidel  <eric@webkit.org>
1019
1020         Remove ENABLE(SVG_AS_IMAGE) since all major ports have it on by default
1021         https://bugs.webkit.org/show_bug.cgi?id=68182
1022
1023         Reviewed by Adam Barth.
1024
1025         * Configurations/FeatureDefines.xcconfig:
1026
1027 2011-09-15  Eric Seidel  <eric@webkit.org>
1028
1029         Remove ENABLE_SVG_ANIMATION as all major ports have it on by default
1030         https://bugs.webkit.org/show_bug.cgi?id=68022
1031
1032         Reviewed by Ryosuke Niwa.
1033
1034         * Configurations/FeatureDefines.xcconfig:
1035
1036 2011-09-15  Alexis Menard  <alexis.menard@openbossa.org>
1037
1038         [Qt][WK2] Make QWebError more friendly to QML.
1039         https://bugs.webkit.org/show_bug.cgi?id=67785
1040
1041         Reviewed by Simon Hausmann.
1042
1043         Make sure that we can use the loading errors in QML. We send it via a QJSValue which
1044         has the properties needed to get the error code, the url and the type of error.
1045
1046         * UIProcess/API/qt/qdesktopwebview.cpp:
1047         (QDesktopWebViewPrivate::loadDidFail):
1048         (QDesktopWebViewPrivate::engine):
1049         * UIProcess/API/qt/qdesktopwebview.h:
1050         * UIProcess/API/qt/qdesktopwebview_p.h:
1051         * UIProcess/API/qt/qtouchwebpage.h:
1052         * UIProcess/API/qt/tests/commonviewtests/tst_commonviewtests.cpp:
1053         (tst_CommonViewTests::loadNonexistentFileUrl):
1054         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.cpp:
1055         (WebViewAbstraction::WebViewAbstraction):
1056         (WebViewAbstraction::touchViewLoadFailed):
1057         (WebViewAbstraction::desktopViewLoadFailed):
1058         * UIProcess/API/qt/tests/commonviewtests/webviewabstraction.h:
1059         * UIProcess/API/qt/tests/testwindow.h:
1060         * UIProcess/qt/QtWebPageProxy.cpp:
1061         (QtWebPageProxy::loadDidFail):
1062         * UIProcess/qt/QtWebPageProxy.h:
1063         * UIProcess/qt/TouchViewInterface.cpp:
1064         (WebKit::TouchViewInterface::loadDidFail):
1065         (WebKit::TouchViewInterface::engine):
1066         * UIProcess/qt/TouchViewInterface.h:
1067         * UIProcess/qt/ViewInterface.h:
1068
1069 2011-09-15  Adam Roben  <aroben@apple.com>
1070
1071         Remove WebKit2-specific knowledge from the Message class
1072
1073         This is in preparation for making some of our message-generations scripts usable by other
1074         projects.
1075
1076         Fixes <http://webkit.org/b/68170> Model classes in WebKit2's message-generation scripts know
1077         too much about WebKit2 details
1078
1079         Reviewed by Anders Carlsson.
1080
1081         * Scripts/webkit2/messages.py: Added constants for the message attributes we support.
1082         (MessageReceiver.parse): Instead of recognizing individual attributes, just stick the
1083         attributes into a set and pass it to the Message constructor.
1084         (Message.__init__): Changed to take a generic set of attributes instead of individual
1085         attributes.
1086         (Message.has_attribute): Added. Returns true if the message has an attribute.
1087         (message_is_variadic): Renamed from parameter_type_is_variadic. Code came from
1088         Message.__init__, which set the old message.is_variadic property.
1089
1090         (decode_type):
1091         (message_to_struct_declaration):
1092         (forward_declarations_and_headers):
1093         (async_case_statement):
1094         (sync_case_statement):
1095         (generate_message_handler):
1096         Updated to use Message.has_attribute and message_is_variadic.
1097
1098 2011-09-14  Wajahat Siddiqui  <mdwajahatali.siddiqui@motorola.com>
1099
1100         Eliminate WebKit2 compilation warnings.
1101         https://bugs.webkit.org/show_bug.cgi?id=65025
1102
1103         Warnings found with gcc on linux.
1104
1105         Reviewed by Sam Weinig.
1106
1107         * Platform/CoreIPC/ArgumentEncoder.cpp:
1108         (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
1109         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1110         (WebKit::WebFrameLoaderClient::createPlugin):
1111
1112 2011-09-14  Ada Chan  <adachan@apple.com>
1113
1114         Implement WKBundleFrameCopyWebArchive().
1115         http://bugs.webkit.org/show_bug.cgi?id=67857
1116
1117         Reviewed by Anders Carlsson.
1118
1119         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1120         (WKBundleFrameCopyWebArchive): Call WebFrame::webArchiveData() and create a WKDataRef from the returned CFDataRef.
1121         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
1122         * WebProcess/WebPage/WebFrame.cpp:
1123         (WebKit::WebFrame::webArchiveData): Add WebFrame::webArchiveData().
1124         * WebProcess/WebPage/WebFrame.h:
1125         * WebProcess/WebPage/WebPage.cpp:
1126         (WebKit::WebPage::getWebArchiveOfFrame): Move the logic to WebFrame::webArchiveData() and call that method here.
1127
1128 2011-09-14  Alexey Proskuryakov  <ap@apple.com>
1129
1130         Web Process doesn't need a permission to look up WebProcess service any more
1131         https://bugs.webkit.org/show_bug.cgi?id=68101
1132
1133         Reviewed by Anders Carlsson.
1134
1135         * WebProcess/com.apple.WebProcess.sb:
1136
1137 2011-09-14  Mark Hahnenberg  <mhahnenberg@apple.com>
1138
1139         Unzip initialization lists and constructors in JSCell hierarchy (6/7)
1140         https://bugs.webkit.org/show_bug.cgi?id=67692
1141
1142         Reviewed by Geoffrey Garen.
1143
1144         Completed the sixth level of the refactoring to add finishCreation() 
1145         methods to all classes within the JSCell hierarchy with non-trivial 
1146         constructor bodies.
1147
1148         This primarily consists of pushing the calls to finishCreation() down 
1149         into the constructors of the subclasses of the fifth level of the hierarchy 
1150         as well as pulling the finishCreation() calls out into the class's corresponding
1151         create() method if it has one.  Doing both simultaneously allows us to 
1152         maintain the invariant that the finishCreation() method chain is called exactly 
1153         once during the creation of an object, since calling it any other number of 
1154         times (0, 2, or more) will cause an assertion failure.
1155
1156         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1157         (WebKit::JSNPMethod::JSNPMethod):
1158         * WebProcess/Plugins/Netscape/JSNPMethod.h:
1159         (WebKit::JSNPMethod::create):
1160
1161 2011-09-13  Eric Seidel  <eric@webkit.org>
1162
1163         Remove ENABLE_SVG_USE as <use> is required by HTML5
1164         https://bugs.webkit.org/show_bug.cgi?id=68019
1165
1166         Reviewed by Ryosuke Niwa.
1167
1168         * Configurations/FeatureDefines.xcconfig:
1169
1170 2011-09-13  Anders Carlsson  <andersca@apple.com>
1171
1172         Disable C++ exceptions when building with clang
1173         https://bugs.webkit.org/show_bug.cgi?id=68031
1174         <rdar://problem/9556880>
1175
1176         Reviewed by Mark Rowe.
1177
1178         * Configurations/Base.xcconfig:
1179
1180 2011-09-13  Eric Seidel  <eric@webkit.org>
1181
1182         Remove ENABLE_SVG_FOREIGN_OBJECT as it is a required part of HTML5
1183         https://bugs.webkit.org/show_bug.cgi?id=68018
1184
1185         Reviewed by Ryosuke Niwa.
1186
1187         * Configurations/FeatureDefines.xcconfig:
1188
1189 2011-09-13  Chang Shu  <cshu@webkit.org>
1190
1191         [WK2] [Mac] Implement KeyDown function for WebKit2 EventSender.
1192         https://bugs.webkit.org/show_bug.cgi?id=57515
1193
1194         The code change in WebKit2 allows key events being sent to WebProcess from UIProcess synchronously.
1195
1196         Reviewed by Darin Adler.
1197
1198         * UIProcess/API/C/WKPage.cpp:
1199         (WKPageSetShouldSendKeyboardEventSynchronously):
1200         * UIProcess/API/C/WKPagePrivate.h:
1201         * UIProcess/WebPageProxy.cpp:
1202         (WebKit::WebPageProxy::WebPageProxy):
1203         (WebKit::WebPageProxy::handleKeyboardEvent):
1204         * UIProcess/WebPageProxy.h:
1205         (WebKit::WebPageProxy::setShouldSendKeyboardEventSynchronously):
1206         * WebProcess/WebPage/WebPage.cpp:
1207         (WebKit::WebPage::keyEventSyncForTesting):
1208         * WebProcess/WebPage/WebPage.h:
1209         * WebProcess/WebPage/WebPage.messages.in:
1210
1211 2011-09-12  Ryuan Choi  <ryuan.choi@samsung.com>
1212
1213         Reviewed by Eric Seidel.
1214
1215         [CMAKE][WK2] include cmakeconfig.h in WebKit2/config.h
1216         https://bugs.webkit.org/show_bug.cgi?id=62692
1217
1218         * CMakeLists.txt: define WTF_USE_JSC=1.
1219         * config.h: add cmakeconfig.h and define necessary macros for CMake build.
1220
1221 2011-09-12  Igor Oliveira  <igor.oliveira@openbossa.org>
1222
1223         [Qt] [WK2] implement support to upload files in Qt WebKit2
1224         https://bugs.webkit.org/show_bug.cgi?id=67228
1225
1226         This patch implements support to upload files in the Desktop Qt WebKit2 implementation.
1227
1228         Reviewed by Andreas Kling.
1229
1230         * Shared/WebOpenPanelParameters.h:
1231         (WebKit::WebOpenPanelParameters::selectedFileNames):
1232         * UIProcess/API/qt/qdesktopwebview.cpp:
1233         (QDesktopWebViewPrivate::chooseFiles):
1234         (QDesktopWebViewPrivate::onOpenPanelFilesSelected):
1235         (QDesktopWebViewPrivate::onOpenPanelFinished):
1236         * UIProcess/API/qt/qdesktopwebview_p.h:
1237         * UIProcess/qt/ClientImpl.cpp:
1238
1239         qt_wk_runOpenPanel supports single and multiple files selection.
1240
1241         (qt_wk_runOpenPanel):
1242         * UIProcess/qt/ClientImpl.h:
1243         * UIProcess/qt/QtWebPageProxy.cpp:
1244         (QtWebPageProxy::init):
1245         * UIProcess/qt/TouchViewInterface.h:
1246         (WebKit::TouchViewInterface::chooseFiles):
1247         * UIProcess/qt/ViewInterface.h:
1248
1249 2011-09-12  Alexis Menard  <alexis.menard@openbossa.org>
1250
1251         [Qt]Style error fix.
1252
1253         Reviewed by Andreas Kling.
1254
1255         * UIProcess/qt/QtWebPageProxy.cpp:
1256
1257 2011-09-11  Mark Rowe  <mrowe@apple.com>
1258
1259         <rdar://problem/9878268> Pressing caps lock after closing a showModalDialog window results in WebProcess exiting
1260
1261         It's incorrect to try and use -[NSApplication run] to run nested runloops as it is not possible to
1262         interrupt a nested invocation of -run without also causing outer invocations to exit after processing
1263         their next event. We can avoid this issue by using -[NSApplication run] for the outermost invocation
1264         of the main runloop, while using CFRunLoopRun for any nested invocations.
1265
1266         Reviewed by Anders Carlsson.
1267
1268         * Platform/RunLoop.h:
1269         * Platform/mac/RunLoopMac.mm:
1270         (RunLoop::RunLoop): Initialize the nesting level to 0.
1271         (RunLoop::run): Bump the nesting level, and only use -[NSApplication run] for the outermost invocation of the
1272         runloop. We also switch from -[NSRunloop run] to CFRunLoopRun as the former will only exit when it has no sources
1273         left to process, while CFRunLoopRun will return immediately after CFRunLoopStop is called on it.
1274         (RunLoop::stop): Only go down the NSApp path for the outermost invocation of the runloop.
1275
1276 2011-09-11  Balazs Kelemen  <kbalazs@webkit.org>
1277
1278         [Qt][WK2] Qt layer should be hardened against C API versioning in the sense of build failures
1279         https://bugs.webkit.org/show_bug.cgi?id=67094
1280
1281         Reviewed by Andreas Kling.
1282
1283         * UIProcess/qt/QtWebPageProxy.cpp:
1284         (QtWebPageProxy::init):
1285
1286 2011-09-09  Oliver Hunt  <oliver@apple.com>
1287
1288         Remove support for anonymous storage from jsobjects
1289         https://bugs.webkit.org/show_bug.cgi?id=67881
1290
1291         Reviewed by Sam Weinig.
1292
1293         Remove the use of AnonymousSlotCount.
1294
1295         * WebProcess/Plugins/Netscape/JSNPMethod.h:
1296         (WebKit::JSNPMethod::createStructure):
1297         * WebProcess/Plugins/Netscape/JSNPObject.h:
1298         (WebKit::JSNPObject::createStructure):
1299
1300 2011-09-09  Chris Marrin  <cmarrin@apple.com>
1301
1302         requestAnimationFrame doesn't throttle on Mac
1303         https://bugs.webkit.org/show_bug.cgi?id=67171
1304
1305         Reviewed by Simon Fraser.
1306
1307         Removed runLoopObserver for requestAnimationFrame. It's now
1308         done by a Timer in ScriptedAnimationController in WebCore.
1309
1310         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1311         * WebProcess/WebCoreSupport/WebChromeClient.h:
1312         * WebProcess/WebPage/WebPage.cpp:
1313         (WebKit::WebPage::~WebPage):
1314         * WebProcess/WebPage/WebPage.h:
1315         * WebProcess/WebPage/mac/WebPageMac.mm:
1316
1317 2011-09-09  Fady Samuel  <fsamuel@chromium.org>
1318
1319         Move pageScaleFactor code from Frame.{h|cpp} to Page.{h|cpp}
1320         https://bugs.webkit.org/show_bug.cgi?id=67250
1321
1322         Reviewed by Simon Fraser.
1323
1324         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1325         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1326         * WebProcess/WebPage/WebPage.cpp:
1327         (WebKit::WebPage::scalePage):
1328         (WebKit::WebPage::pageScaleFactor):
1329
1330 2011-09-09  Mark Hahnenberg  <mhahnenberg@apple.com>
1331
1332         Unzip initialization lists and constructors in JSCell hierarchy (5/7)
1333         https://bugs.webkit.org/show_bug.cgi?id=67420
1334
1335         Reviewed by Geoffrey Garen.
1336
1337         Completed the fifth level of the refactoring to add finishCreation() 
1338         methods to all classes within the JSCell hierarchy with non-trivial 
1339         constructor bodies.
1340
1341         This primarily consists of pushing the calls to finishCreation() down 
1342         into the constructors of the subclasses of the second level of the hierarchy 
1343         as well as pulling the finishCreation() calls out into the class's corresponding
1344         create() method if it has one.  Doing both simultaneously allows us to 
1345         maintain the invariant that the finishCreation() method chain is called exactly 
1346         once during the creation of an object, since calling it any other number of 
1347         times (0, 2, or more) will cause an assertion failure.
1348
1349         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1350         (WebKit::JSNPMethod::JSNPMethod):
1351         (WebKit::JSNPMethod::finishCreation):
1352         * WebProcess/Plugins/Netscape/JSNPMethod.h:
1353         (WebKit::JSNPMethod::create):
1354         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1355         (WebKit::JSNPObject::JSNPObject):
1356         * WebProcess/Plugins/Netscape/JSNPObject.h:
1357         (WebKit::JSNPObject::create):
1358
1359 2011-09-08  Mark Rowe  <mrowe@apple.com>
1360
1361         <rdar://problem/9742393> Spell checking a text area causes the page to reload
1362
1363         Ensure that m_pendingLearnOrIgnoreWordMessageCount is incremented when we use
1364         executeEditCommand to ignore a word. This will ensure that WebPageProxy::ignoreWord
1365         is expecting to be called, and will not turn around and terminate the web process.
1366
1367         Reviewed by Anders Carlsson.
1368
1369         * UIProcess/WebPageProxy.cpp:
1370         (WebKit::WebPageProxy::executeEditCommand):
1371
1372 2011-09-08  Sam Weinig  <sam@webkit.org>
1373
1374         Remove accidentally committed typo.
1375
1376         * Platform/CoreIPC/Connection.cpp:
1377         (CoreIPC::Connection::waitForSyncReply):
1378
1379 2011-09-08  Brian Weinstein  <bweinstein@apple.com>
1380
1381         WebKit2: Assertion when calling didPerform*Redirect on null source/destination URL string
1382         https://bugs.webkit.org/show_bug.cgi?id=67794
1383         <rdar://problem/9892024>
1384         
1385         Don't call didPerformClientRedirect or didPerformServerRedirect when source or destination URL string
1386         is empty or null.
1387         
1388         If we call didPerformClientRedirect or didPerformServerRedirect when the source or destination is null,
1389         it causes an assert in WKURLCF::WKURLCopyCFURL when we try to convert the WKURLRef into a CFURLRef.
1390
1391         Reviewed by Brady Eidson.
1392
1393         * UIProcess/WebContext.cpp:
1394         (WebKit::WebContext::didPerformClientRedirect): Return early if the source or destination URL string is empty or null.
1395         (WebKit::WebContext::didPerformServerRedirect): Ditto.
1396
1397 2011-09-08  Sam Weinig  <sam@webkit.org>
1398
1399         Remove the Completion object from JSC, I have never liked it
1400         https://bugs.webkit.org/show_bug.cgi?id=67755
1401
1402         Reviewed by Gavin Barraclough.
1403
1404         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1405         (WebKit::NPRuntimeObjectMap::evaluate):
1406
1407 2011-09-08  Anders Carlsson  <andersca@apple.com>
1408
1409         Don't release the modal placeholder window if it's closed
1410         https://bugs.webkit.org/show_bug.cgi?id=67801
1411         <rdar://problem/10088059>
1412
1413         Reviewed by Adam Roben.
1414
1415         This is a speculative fix - nothing should really be able to close the modal placeholder window.
1416
1417         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1418         (WebKit::PluginProcessProxy::beginModal):
1419
1420 2011-09-07  Alexei Svitkine  <asvitkine@chromium.org>
1421
1422         Add test infrastructure to test rubber-banding overhang drawing along with layout tests for existing Chromium Mac overhang drawing in the non-gpu path.
1423         https://bugs.webkit.org/show_bug.cgi?id=67511
1424
1425         Reviewed by Dimitri Glazkov.
1426
1427         * win/WebKit2.def:
1428         * win/WebKit2CFLite.def:
1429
1430 2011-09-06  Oliver Hunt  <oliver@apple.com>
1431
1432         Remove JSObjectWithGlobalObject
1433         https://bugs.webkit.org/show_bug.cgi?id=67689
1434
1435         Reviewed by Geoff Garen.
1436
1437         Remove JSObjectWithGlobalObject usage.
1438
1439         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1440         (WebKit::JSNPObject::JSNPObject):
1441         (WebKit::JSNPObject::finishCreation):
1442         * WebProcess/Plugins/Netscape/JSNPObject.h:
1443
1444 2011-09-05  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1445
1446         [Qt][WK2] Make TiledDrawingArea request tiles only in the direction the viewport is panned to.
1447         https://bugs.webkit.org/show_bug.cgi?id=67606
1448
1449         TiledBackingStore previously used different values for horizontal and vertial multiplication
1450         to calculate the cover area. 
1451         This patch replaces this mechanism, used to give a bigger panning range to vertical panning,
1452         with the possibility to use the motion vector of the viewport to request tiles ahead instead.
1453         This allows economies on rendering resources as tiles won't be rendered beside the trajectory
1454         of the viewport.
1455
1456         * UIProcess/API/qt/qtouchwebview.cpp:
1457         (QTouchWebViewPrivate::QTouchWebViewPrivate):
1458         (QTouchWebViewPrivate::_q_viewportMotionVectorChanged):
1459         * UIProcess/API/qt/qtouchwebview.h:
1460         * UIProcess/API/qt/qtouchwebview_p.h:
1461         * UIProcess/TiledDrawingAreaProxy.cpp:
1462         (WebKit::TiledDrawingAreaProxy::setVisibleContentRectMotionVector):
1463         * UIProcess/TiledDrawingAreaProxy.h:
1464         * UIProcess/qt/ViewportInteractionEngine.cpp:
1465         (WebKit::ViewportInteractionEngine::panGestureRequestUpdate):
1466         (WebKit::ViewportInteractionEngine::panGestureEnded):
1467         (WebKit::ViewportInteractionEngine::pinchGestureStarted):
1468         * UIProcess/qt/ViewportInteractionEngine.h:
1469         * UIProcess/qt/qtouchwebpageproxy.cpp:
1470         (QTouchWebPageProxy::setVisibleContentRectMotionVector):
1471         * UIProcess/qt/qtouchwebpageproxy.h:
1472         * WebProcess/WebPage/DrawingArea.h:
1473         (WebKit::DrawingArea::setVisibleContentRectMotionVector):
1474         * WebProcess/WebPage/DrawingArea.messages.in:
1475         * WebProcess/WebPage/TiledDrawingArea.cpp:
1476         (WebKit::TiledDrawingArea::setVisibleContentRectMotionVector):
1477         * WebProcess/WebPage/TiledDrawingArea.h:
1478
1479 2011-09-01  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1480
1481         [Qt] TiledBackingStore: Import the resizeEdgeTiles logic from TiledDrawindAreaProxy.
1482         https://bugs.webkit.org/show_bug.cgi?id=67416
1483
1484         Reviewed by Kenneth Rohde Christiansen.
1485
1486         Original code by Antti Koivisto.
1487         With the current code, when the page is layouted during load, edge tiles will
1488         get removed instead of continuing to show their front buffer while the tile
1489         is being rendered for the new size.
1490
1491         * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
1492         (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
1493         (WebKit::TiledBackingStoreRemoteTile::resize):
1494         * WebProcess/WebPage/TiledBackingStoreRemoteTile.h:
1495
1496 2011-09-01  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1497
1498         TiledDrawingArea: Fix issues where the tiles of the previous scale would be removed too early.
1499         https://bugs.webkit.org/show_bug.cgi?id=67390
1500
1501         Reviewed by Tor Arne Vestbø.
1502
1503         The two issues addresssed are:
1504         - The previous instance of the tile backing store would be destroyed in createTile which
1505           would send removeTile messages for all its tiles before the DidRenderFrame message is sent for the new tiles.
1506         - When quickly changing the scale a second time after a scale change, the previous tile set would
1507           be replaced by the current incomplete tile set which may contain no tiles at all.
1508         * WebProcess/WebPage/TiledDrawingArea.cpp:
1509         (WebKit::TiledDrawingArea::setVisibleContentRectAndScale):
1510         (WebKit::TiledDrawingArea::tiledBackingStorePaintEnd):
1511         (WebKit::TiledDrawingArea::createTile):
1512
1513 2011-08-30  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1514
1515         [Qt][WK2] The scene graph is rendered continuously even when the page is idle.
1516         https://bugs.webkit.org/show_bug.cgi?id=67195
1517
1518         Reviewed by Tor Arne Vestbø.
1519
1520         Since tiledBackingStorePaintEnd is called even when no tile is dirty, the TiledDrawingArea
1521         and its proxy are looping over DidRenderFrame and RenderNextFrame messages.
1522         This causes QSGItem::update() to be called and consumes a lot of useless CPU cycles on the UI process.
1523
1524         Introduce a bool to send DidRenderFrame only when dirty content was rendered.
1525
1526         * WebProcess/WebPage/TiledDrawingArea.cpp:
1527         (WebKit::TiledDrawingArea::TiledDrawingArea):
1528         (WebKit::TiledDrawingArea::tiledBackingStorePaint):
1529         (WebKit::TiledDrawingArea::tiledBackingStorePaintEnd):
1530         * WebProcess/WebPage/TiledDrawingArea.h:
1531
1532 2011-08-30  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1533
1534         [Qt][WK2] Make sure that the visible content rect and the content scale get to the web process in one single message.
1535         https://bugs.webkit.org/show_bug.cgi?id=67189
1536
1537         Reviewed by Kenneth Rohde Christiansen.
1538
1539         The TiledBackingStore needs to know the screen size of the viewport to know how many tiles to
1540         create, and since the visible content rect is given in page coordinates, the contents scale is
1541         necessary to calculate the viewport size.
1542         Both the rect and the scale then need to arrive to the web process at the same time to prevent
1543         picking the new visible rect with the old scale or vice-versa which can produce a huge viewport size
1544         and create/render an insane amount of tiles.
1545
1546         Things this patch does:
1547         - Merge the visible contents rect and content scale handling together.
1548         - Make QTouchWebView responsible for telling those viewport values to the web process instead of QTouchWebPage.
1549         - Prevent updating the viewport in ViewportInteractionEngine while a pinch is in progress and update the viewport at the end.
1550
1551         * UIProcess/API/qt/qtouchwebpage.cpp:
1552         * UIProcess/API/qt/qtouchwebpage.h:
1553         * UIProcess/API/qt/qtouchwebpage_p.h:
1554         * UIProcess/API/qt/qtouchwebview.cpp:
1555         (QTouchWebViewPrivate::QTouchWebViewPrivate):
1556         (QTouchWebViewPrivate::_q_viewportUpdated):
1557         (QTouchWebView::geometryChanged):
1558         * UIProcess/API/qt/qtouchwebview.h:
1559         * UIProcess/API/qt/qtouchwebview_p.h:
1560         * UIProcess/TiledDrawingAreaProxy.cpp:
1561         (WebKit::TiledDrawingAreaProxy::setVisibleContentRectAndScale):
1562         * UIProcess/TiledDrawingAreaProxy.h:
1563         * UIProcess/qt/ViewportInteractionEngine.cpp:
1564         (WebKit::ViewportInteractionEngine::ViewportInteractionEngine):
1565         (WebKit::ViewportInteractionEngine::~ViewportInteractionEngine): Allows OwnPtr with the forward declaration of ViewportUpdateGuard.
1566         (WebKit::ViewportInteractionEngine::setConstraints):
1567         (WebKit::ViewportInteractionEngine::pinchGestureStarted):
1568         (WebKit::ViewportInteractionEngine::pinchGestureEnded):
1569         (WebKit::ViewportInteractionEngine::contentViewportChanged):
1570         * UIProcess/qt/ViewportInteractionEngine.h:
1571         * UIProcess/qt/qtouchwebpageproxy.cpp:
1572         (QTouchWebPageProxy::setVisibleContentRectAndScale):
1573         * UIProcess/qt/qtouchwebpageproxy.h:
1574         * WebProcess/WebPage/DrawingArea.h:
1575         (WebKit::DrawingArea::setVisibleContentRectAndScale):
1576         * WebProcess/WebPage/DrawingArea.messages.in:
1577         * WebProcess/WebPage/TiledDrawingArea.cpp:
1578         (WebKit::TiledDrawingArea::setVisibleContentRectAndScale):
1579         * WebProcess/WebPage/TiledDrawingArea.h:
1580
1581 2011-08-29  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1582
1583         [Qt][WK2] Rename SGAgent to SGUpdateQueue to sharpen it's responsability.
1584         https://bugs.webkit.org/show_bug.cgi?id=67122
1585
1586         Reviewed by Tor Arne Vestbø.
1587
1588         * UIProcess/API/qt/qtouchwebpage.cpp:
1589         (QTouchWebPage::updatePaintNode):
1590         (QTouchWebPagePrivate::QTouchWebPagePrivate):
1591         * UIProcess/API/qt/qtouchwebpage_p.h:
1592         * UIProcess/qt/SGUpdateQueue.cpp: Renamed from Source/WebKit2/UIProcess/qt/SGAgent.cpp.
1593         (WebKit::NodeUpdateCreateTile::NodeUpdateCreateTile):
1594         (WebKit::NodeUpdateRemoveTile::NodeUpdateRemoveTile):
1595         (WebKit::NodeUpdateSetBackBuffer::NodeUpdateSetBackBuffer):
1596         (WebKit::NodeUpdateSwapTileBuffers::NodeUpdateSwapTileBuffers):
1597         (WebKit::SGUpdateQueue::SGUpdateQueue):
1598         (WebKit::SGUpdateQueue::createTileNode):
1599         (WebKit::SGUpdateQueue::removeTileNode):
1600         (WebKit::SGUpdateQueue::setNodeBackBuffer):
1601         (WebKit::SGUpdateQueue::swapTileBuffers):
1602         (WebKit::SGUpdateQueue::applyUpdates):
1603         (WebKit::SGUpdateQueue::getScaleNode):
1604         * UIProcess/qt/SGUpdateQueue.h: Renamed from Source/WebKit2/UIProcess/qt/SGAgent.h.
1605         (WebKit::SGUpdateQueue::isSwapPending):
1606         (WebKit::NodeUpdate::NodeUpdate):
1607         (WebKit::NodeUpdate::~NodeUpdate):
1608         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
1609         (WebKit::TiledDrawingAreaProxy::updateWebView):
1610         (WebKit::TiledDrawingAreaProxy::createTile):
1611         (WebKit::TiledDrawingAreaProxy::updateTile):
1612         (WebKit::TiledDrawingAreaProxy::didRenderFrame):
1613         (WebKit::TiledDrawingAreaProxy::removeTile):
1614         * UIProcess/qt/TouchViewInterface.cpp:
1615         (WebKit::TouchViewInterface::sceneGraphUpdateQueue):
1616         * UIProcess/qt/TouchViewInterface.h:
1617         * WebKit2.pro:
1618
1619 2011-09-07  Alexis Menard  <alexis.menard@openbossa.org>
1620
1621         [Qt] Unreviewed suppression of an unnecessary debug output. 
1622
1623         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
1624
1625 2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1626
1627         Unreviewed, rolling out r94627 and r94632.
1628         http://trac.webkit.org/changeset/94627
1629         http://trac.webkit.org/changeset/94632
1630         https://bugs.webkit.org/show_bug.cgi?id=67698
1631
1632         It broke tests on GTK and Qt (Requested by Ossy on #webkit).
1633
1634         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1635         (WebKit::JSNPMethod::JSNPMethod):
1636         (WebKit::JSNPMethod::create):
1637         * WebProcess/Plugins/Netscape/JSNPMethod.h:
1638         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1639         (WebKit::JSNPObject::JSNPObject):
1640         (WebKit::JSNPObject::create):
1641         * WebProcess/Plugins/Netscape/JSNPObject.h:
1642
1643 2011-09-06  Ryosuke Niwa  <rniwa@webkit.org>
1644
1645         fast/forms/suggested-value-crash.html crashes on Windows
1646         https://bugs.webkit.org/show_bug.cgi?id=67688
1647
1648         Reviewed by Adam Barth.
1649
1650         Removed sybmols for inputTag and textareaTag. Added the symbol for StringImpl::equal.
1651
1652         * win/WebKit2.def:
1653         * win/WebKit2CFLite.def:
1654
1655 2011-09-06  Mark Hahnenberg  <mhahnenberg@apple.com>
1656
1657         Unzip initialization lists and constructors in JSCell hierarchy (5/7)
1658         https://bugs.webkit.org/show_bug.cgi?id=67420
1659
1660         Reviewed by Geoffrey Garen.
1661
1662         Completed the fifth level of the refactoring to add finishCreation() 
1663         methods to all classes within the JSCell hierarchy with non-trivial 
1664         constructor bodies.
1665
1666         This primarily consists of pushing the calls to finishCreation() down 
1667         into the constructors of the subclasses of the second level of the hierarchy 
1668         as well as pulling the finishCreation() calls out into the class's corresponding
1669         create() method if it has one.  Doing both simultaneously allows us to 
1670         maintain the invariant that the finishCreation() method chain is called exactly 
1671         once during the creation of an object, since calling it any other number of 
1672         times (0, 2, or more) will cause an assertion failure.
1673
1674         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1675         (WebKit::JSNPMethod::JSNPMethod):
1676         (WebKit::JSNPMethod::finishCreation):
1677         * WebProcess/Plugins/Netscape/JSNPMethod.h:
1678         (WebKit::JSNPMethod::create):
1679         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1680         (WebKit::JSNPObject::JSNPObject):
1681         * WebProcess/Plugins/Netscape/JSNPObject.h:
1682         (WebKit::JSNPObject::create):
1683
1684 2011-09-06  Ryosuke Niwa  <rniwa@webkit.org>
1685
1686         Rename confirmCompositionWithoutDisturbingSelection to cancelComposition
1687         https://bugs.webkit.org/show_bug.cgi?id=67569
1688
1689         Reviewed by Antonio Gomes.
1690
1691         * UIProcess/API/mac/WKView.mm:
1692         (-[WKView resignFirstResponder]):
1693         (-[WKView _updateTextInputStateIncludingSecureInputState:]):
1694         * UIProcess/WebPageProxy.h:
1695         * UIProcess/mac/WebPageProxyMac.mm:
1696         (WebKit::WebPageProxy::cancelComposition):
1697         * WebProcess/WebPage/WebPage.h:
1698         * WebProcess/WebPage/WebPage.messages.in:
1699         * WebProcess/WebPage/mac/WebPageMac.mm:
1700         (WebKit::WebPage::cancelComposition):
1701
1702 2011-09-05  Oliver Hunt  <oliver@apple.com>
1703
1704         An object's structure should reference the global object responsible for its creation
1705         https://bugs.webkit.org/show_bug.cgi?id=67624
1706
1707         Reviewed by Gavin Barraclough.
1708
1709         Update for new Structure::create globalObject parameter.
1710
1711         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1712         (WebKit::JSNPMethod::create):
1713         * WebProcess/Plugins/Netscape/JSNPMethod.h:
1714         (WebKit::JSNPMethod::createStructure):
1715         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1716         (WebKit::JSNPObject::create):
1717         * WebProcess/Plugins/Netscape/JSNPObject.h:
1718         (WebKit::JSNPObject::createStructure):
1719
1720 2011-09-06  Ryosuke Niwa  <rniwa@webkit.org>
1721
1722         REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on chromium
1723         https://bugs.webkit.org/show_bug.cgi?id=67453
1724
1725         Reviewed by Kent Tamura.
1726
1727         Add symbols for internals.
1728
1729         * win/WebKit2.def:
1730         * win/WebKit2CFLite.def:
1731
1732 2011-09-06  Wajahat Siddiqui  <mdwajahatali.siddiqui@motorola.com>
1733
1734         [GTK] Use soup_session_add_feature_by_type uniformly in WebKit2.
1735         https://bugs.webkit.org/show_bug.cgi?id=67593
1736
1737         Reviewed by Martin Robinson.
1738
1739         Using soup_session_add_feature_by_type for adding all soup features 
1740         instead of adding using GRefPtr.
1741
1742         * WebProcess/gtk/WebProcessMainGtk.cpp:
1743         (WebKit::WebProcessMainGtk):
1744
1745 2011-09-05  Balazs Kelemen  <kbalazs@webkit.org>
1746
1747         [Qt][WK2] Add pixel test support
1748         https://bugs.webkit.org/show_bug.cgi?id=66283
1749
1750         Reviewed by Andreas Kling.
1751
1752         * Shared/API/c/qt/WKImageQt.cpp: Added.
1753         (WKImageCreateQImage):  C style (private) API to get the contents of the backing
1754         store as an image.
1755         * Shared/API/c/qt/WKImageQt.h: Added.
1756         * Shared/qt/ShareableBitmapQt.cpp:
1757         (WebKit::ShareableBitmap::createImage): Typo. Remove useless ifdef.
1758         * WebKit2API.pri:
1759
1760 2011-09-05  Andras Becsi  <andras.becsi@nokia.com>
1761
1762         [Qt][WK2] Fix the build
1763
1764         Rubber-stamped by Csaba Osztrogonác.
1765
1766         * DerivedSources.pro: Add missing PluginProcessConnection.messages.in after r94456.
1767
1768 2011-09-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1769
1770         Unreviewed, rolling out r94473.
1771         http://trac.webkit.org/changeset/94473
1772         https://bugs.webkit.org/show_bug.cgi?id=67547
1773
1774         Putting http://trac.webkit.org/changeset/94454 back in as
1775         http://trac.webkit.org/changeset/94472 fixed the problem
1776         (Requested by msaboff on #webkit).
1777
1778         * UIProcess/API/C/WKContext.cpp:
1779         (WKContextGarbageCollectJavaScriptObjects):
1780         * UIProcess/API/C/WKContext.h:
1781         * UIProcess/WebContext.cpp:
1782         (WebKit::WebContext::garbageCollectJavaScriptObjects):
1783         * UIProcess/WebContext.h:
1784         * WebProcess/WebProcess.cpp:
1785         (WebKit::WebProcess::garbageCollectJavaScriptObjects):
1786         * WebProcess/WebProcess.h:
1787         * WebProcess/WebProcess.messages.in:
1788
1789 2011-09-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1790
1791         Unreviewed, rolling out r94454.
1792         http://trac.webkit.org/changeset/94454
1793         https://bugs.webkit.org/show_bug.cgi?id=67546
1794
1795         "Broke Windows and SnowLeopard, also no reply on the bug."
1796         (Requested by jchaffraix on #webkit).
1797
1798         * UIProcess/API/C/WKContext.cpp:
1799         * UIProcess/API/C/WKContext.h:
1800         * UIProcess/WebContext.cpp:
1801         * UIProcess/WebContext.h:
1802         * WebProcess/WebProcess.cpp:
1803         * WebProcess/WebProcess.h:
1804         * WebProcess/WebProcess.messages.in:
1805
1806 2011-09-02  Michael Saboff  <msaboff@apple.com>
1807
1808         Fixed release build by removing #ifndef NDEBUG to
1809         allow definition of gcController().
1810
1811         Rubber-stamp by Sam Weinig.
1812
1813         * WebProcess/WebProcess.cpp:
1814
1815 2011-09-02  Anders Carlsson  <andersca@apple.com>
1816
1817         NPN_SetException doesn't work with OOP plug-ins
1818         https://bugs.webkit.org/show_bug.cgi?id=67524
1819
1820         Reviewed by Sam Weinig.
1821
1822         * DerivedSources.make:
1823         Add PluginProcessConnection.messages.in.
1824
1825         * GNUmakefile.am:
1826         Add generated files.
1827
1828         * Platform/CoreIPC/MessageID.h:
1829         Add MessageClassPluginProcessConnection.
1830
1831         * PluginProcess/PluginProcess.cpp:
1832         (WebKit::PluginProcess::initialize):
1833         Set the set exception function.
1834
1835         * PluginProcess/WebProcessConnection.cpp:
1836         (WebKit::ConnectionStack::current):
1837         (WebKit::ConnectionStack::CurrentConnectionPusher::CurrentConnectionPusher):
1838         (WebKit::ConnectionStack::CurrentConnectionPusher::~CurrentConnectionPusher):
1839         Add a helper class for managing a stack of CoreIPC connections, along with a RAII
1840         object to push/pop connections onto it.
1841
1842         (WebKit::connectionStack):
1843         Add getter.
1844
1845         (WebKit::WebProcessConnection::setGlobalException):
1846         Get the current connection and send a PluginProcessConnection::SetException message to it.
1847
1848         (WebKit::WebProcessConnection::didReceiveMessage):
1849         (WebKit::WebProcessConnection::didReceiveSyncMessage):
1850         Create connection pushers.
1851
1852         * PluginProcess/WebProcessConnection.h:
1853         Add setGlobalException.
1854
1855         * WebKit2.pro:
1856         * WebKit2.xcodeproj/project.pbxproj:
1857         Add new files.
1858
1859         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1860         (WebKit::NetscapePlugin::setSetExceptionFunction):
1861         New function for setting the 'setException' function.
1862
1863         (WebKit::NetscapePlugin::setException):
1864         Call the 'setException' function.
1865
1866         * WebProcess/Plugins/PluginProcessConnection.cpp:
1867         (WebKit::PluginProcessConnection::didReceiveSyncMessage):
1868         Call the message receiver function.
1869
1870         (WebKit::PluginProcessConnection::setException):
1871         Call the NPRuntimeObjectMap.
1872         
1873         * WebProcess/Plugins/PluginProcessConnection.messages.in:
1874         Add new messages file.
1875
1876         * WebProcess/WebPage/WebPage.cpp:
1877         (WebKit::WebPage::createPlugin):
1878         When not using the plug-in process, make sure to call NetscapePlugin::setSetExceptionFunction.
1879
1880 2011-09-02  Ada Chan  <adachan@apple.com>
1881
1882         Add WKContextGarbageCollectJavaScriptObjects() which does a garbage collection in the WebProcess
1883         https://bugs.webkit.org/show_bug.cgi?id=67526
1884
1885         Reviewed by Darin Adler.
1886
1887         * UIProcess/API/C/WKContext.cpp:
1888         (WKContextGarbageCollectJavaScriptObjects):
1889         * UIProcess/API/C/WKContext.h:
1890         * UIProcess/WebContext.cpp:
1891         (WebKit::WebContext::garbageCollectJavaScriptObjects): Send a message to WebProcess to garbage collect JS objects.
1892         * UIProcess/WebContext.h:
1893         * WebProcess/WebProcess.cpp:
1894         (WebKit::WebProcess::garbageCollectJavaScriptObjects): Call GCController::garbageCollectNow().
1895         * WebProcess/WebProcess.h:
1896         * WebProcess/WebProcess.messages.in: Add GarbageCollectJavaScriptObjects message.
1897
1898 2011-09-02  Anders Carlsson  <andersca@apple.com>
1899
1900         Remove plug-in paths from web process sandbox
1901         https://bugs.webkit.org/show_bug.cgi?id=67518
1902
1903         Reviewed by Adam Roben.
1904
1905         Plug-ins are never accessed from the web process, so remove plug-in paths from the sandbox profile.
1906
1907         * WebProcess/com.apple.WebProcess.sb:
1908
1909 2011-09-02  Anders Carlsson  <andersca@apple.com>
1910
1911         Assertion/crash when running netscape-plugin-property-access-exception.html test
1912         https://bugs.webkit.org/show_bug.cgi?id=67517
1913
1914         Reviewed by Adam Roben.
1915
1916         Make sure to initialize the NPVariant in case the plug-in returns true from NP_GetProperty,
1917         but doesn't set the result NPVariant to anything.
1918
1919         * Shared/Plugins/NPObjectMessageReceiver.cpp:
1920         (WebKit::NPObjectMessageReceiver::getProperty):
1921
1922 2011-09-02  Anders Carlsson  <andersca@apple.com>
1923
1924         The private browsing state isn't saved when it changes
1925         https://bugs.webkit.org/show_bug.cgi?id=67508
1926
1927         Reviewed by Sam Weinig.
1928
1929         Store the new private browsing state so subsequent queries for it
1930         will return the right value.
1931
1932         * PluginProcess/PluginControllerProxy.cpp:
1933         (WebKit::PluginControllerProxy::privateBrowsingStateChanged):
1934
1935 2011-09-02  Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com>
1936
1937         [WK2] Anchor elements doesn't get focus on TAB key press.
1938         https://bugs.webkit.org/show_bug.cgi?id=66949
1939
1940         Reviewed by Adam Roben.
1941
1942         Setting the default property value of TabsToLinks to true
1943         only for GTK platform since Win & Mac platforms doesn't want 
1944         it to be set to true by default.
1945
1946         * Shared/WebPreferencesStore.h:
1947         Set the default value of key TabsToLinks to true for GTK platform only.
1948
1949 2011-09-02  Balazs Kelemen  <kbalazs@webkit.org>
1950
1951         [Qt][WK2] Cannot gathering glyph page statistics
1952         https://bugs.webkit.org/show_bug.cgi?id=67475
1953
1954         Rubber stamped by Csaba Osztrogonác.
1955
1956         Fix Qt WK2 build without having QRAWFONT.
1957
1958         * WebProcess/WebProcess.cpp:
1959         (WebKit::WebProcess::getWebCoreStatistics):
1960
1961 2011-09-02  Mark Rowe  <mrowe@apple.com>
1962
1963         <http://webkit.org/b/67467> WebProcessProxy::secItemCopyMatching / WebProcessProxy::secItemAdd
1964         leak the results of the APIs they wrap.
1965
1966         Reviewed by Dan Bernstein.
1967
1968         * UIProcess/mac/WebProcessProxyMac.mm:
1969         (WebKit::WebProcessProxy::secItemCopyMatching): Adopt the result of SecItemCopyMatching in to a
1970         RetainPtr to ensure it gets released at the appropriate time.
1971         (WebKit::WebProcessProxy::secItemAdd): Ditto for SecItemAdd.
1972
1973 2011-09-01  Ada Chan  <adachan@apple.com>
1974
1975         Cut down the ifdefs in WebKit::getWebCoreMemoryCacheStatistics() now that 
1976         MemoryCache::Statistics always has the xslStyleSheets field.
1977
1978         Reviewed by Darin Adler.
1979
1980         * WebProcess/WebProcess.cpp:
1981         (WebKit::getWebCoreMemoryCacheStatistics):
1982
1983 2011-09-01  Mark Hahnenberg  <mhahnenberg@apple.com>
1984
1985         Unzip initialization lists and constructors in JSCell hierarchy (4/7)
1986         https://bugs.webkit.org/show_bug.cgi?id=67174
1987
1988         Reviewed by Oliver Hunt.
1989
1990         Completed the fourth level of the refactoring to add finishCreation() 
1991         methods to all classes within the JSCell hierarchy with non-trivial 
1992         constructor bodies.
1993
1994         This primarily consists of pushing the calls to finishCreation() down 
1995         into the constructors of the subclasses of the second level of the hierarchy 
1996         as well as pulling the finishCreation() calls out into the class's corresponding
1997         create() method if it has one.  Doing both simultaneously allows us to 
1998         maintain the invariant that the finishCreation() method chain is called exactly 
1999         once during the creation of an object, since calling it any other number of 
2000         times (0, 2, or more) will cause an assertion failure.
2001
2002         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2003         (WebKit::JSNPObject::JSNPObject):
2004         (WebKit::JSNPObject::finishCreation):
2005         * WebProcess/Plugins/Netscape/JSNPObject.h:
2006
2007 2011-09-01  Ada Chan  <adachan@apple.com>
2008
2009         Gather memory cache statistics in WebProcess::getWebCoreStatistics().
2010         https://bugs.webkit.org/show_bug.cgi?id=67160
2011
2012         Reviewed by Darin Adler.
2013
2014         Encode and decode webCoreCacheStatistics data member in StatisticsData.
2015         * Shared/StatisticsData.cpp:
2016         (WebKit::StatisticsData::encode):
2017         (WebKit::StatisticsData::decode):
2018         * Shared/StatisticsData.h:
2019
2020         Convert the cache statistics data into an ImmutableArray and return it in WebContext::didGetWebCoreStatistics().
2021         * UIProcess/WebContext.cpp:
2022         (WebKit::WebContext::didGetWebCoreStatistics):
2023
2024         Store memory cache statistics into the StatisticsData object.
2025         * WebProcess/WebProcess.cpp:
2026         (WebKit::getWebCoreMemoryCacheStatistics):
2027         (WebKit::WebProcess::getWebCoreStatistics):
2028
2029 2011-09-01  Tim Horton  <timothy_horton@apple.com>
2030
2031         REGRESSION: Rendering artifacts on a rotated, pattern filled shape
2032         https://bugs.webkit.org/show_bug.cgi?id=53055
2033         <rdar://problem/8910917>
2034
2035         Reviewed by Simon Fraser.
2036
2037         Introduce wkCGPatternCreateWithImageAndTransform.
2038
2039         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2040         (InitWebCoreSystemInterface):
2041
2042 2011-09-01  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
2043
2044         [Qt] TouchWebView crashes with segmentation fault
2045         https://bugs.webkit.org/show_bug.cgi?id=67308
2046
2047         Reviewed by Benjamin Poulain.
2048
2049         If you instantiate TouchWebView element with height and width in a qml file and
2050         load a url it crashes.
2051         The functions setWidth() and setHeight() are called sequentially therefore it can happen
2052         that computeViewportAttributes was called with a size like (width, 0) breaking the
2053         assumption of the function that the size is valid. The patch makes sure we compute the
2054         viewport when both height and width are valid.
2055
2056         * UIProcess/API/qt/qtouchwebview.cpp:
2057         (QTouchWebViewPrivate::updateViewportConstraints):
2058         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_load.qml: Added.
2059         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadNegativeSizeView.qml: Added.
2060         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_loadZeroSizeView.qml: Added.
2061         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
2062
2063 2011-09-01  Ada Chan  <adachan@apple.com>
2064
2065         Gather JavaScript, FastMalloc, icon, font, and glyph page statistics in WebProcess::getWebCoreStatistics().
2066         https://bugs.webkit.org/show_bug.cgi?id=67160
2067
2068         Reviewed by Darin Adler.
2069
2070         Encode and decode the data members in StatisticsData.
2071         * Shared/StatisticsData.cpp:
2072         (WebKit::StatisticsData::encode):
2073         (WebKit::StatisticsData::decode):
2074         (WebKit::StatisticsData::StatisticsData):
2075
2076         Add three data members to StatisticsData:
2077         - statisticsNumbers: Map containing statistics values that are numbers, mapped by their names, such as 
2078         JavaScriptObjectsCount, CachedFontDataCount, etc.
2079         - javaScriptProtectedObjectTypeCounts
2080         - javaScriptObjectTypeCounts
2081         * Shared/StatisticsData.h:
2082
2083         Create a WK::Dictionary containing statistics values mapped by their names and return that dictionary
2084         in WebContext::didGetWebCoreStatistics().
2085         * UIProcess/WebContext.cpp:
2086         (WebKit::createDictionaryFromHashMap):
2087         (WebKit::WebContext::didGetWebCoreStatistics):
2088
2089         Package JavaScript, FastMalloc, icon, font, and glyph page statistics into a StatisticsData object
2090         and send it to the UIProcess.
2091         * WebProcess/WebProcess.cpp:
2092         (WebKit::fromCountedSetToHashMap):
2093         (WebKit::WebProcess::getWebCoreStatistics):
2094
2095 2011-09-01  Xan Lopez  <xlopez@igalia.com>
2096
2097         [GTK] Add XRender lib dependencies explicitly
2098
2099         Reviewed by Philippe Normand.
2100
2101         This is needed when using the GNU/Gold linker, since we use
2102         XRender directly.
2103
2104         * GNUmakefile.am:
2105
2106 2011-08-31  Anders Carlsson  <andersca@apple.com>
2107
2108         Jagged text shown in find-in-page highlight
2109         https://bugs.webkit.org/show_bug.cgi?id=67347
2110         <rdar://problem/9870444>
2111
2112         Reviewed by Dan Bernstein.
2113
2114         When painting each text line in the find indicator, make sure to clip it against
2115         the text rect and not paint the entire rect over and over.
2116
2117         * UIProcess/FindIndicator.cpp:
2118         (WebKit::FindIndicator::draw):
2119
2120 2011-08-31  Beth Dakin  <bdakin@apple.com>
2121
2122         https://bugs.webkit.org/show_bug.cgi?id=67322
2123         Re-name overrideBackingScaleFactor
2124
2125         Reviewed by John Sullivan.
2126
2127         API is now WKPageSetCustomBackingScaleFactor() and WKPageGetBackingScaleFactor() 
2128         which returns the custom scale factor if one was set, and the intrinsic scale 
2129         factor otherwise. 
2130         * UIProcess/API/C/WKPage.cpp:
2131         (WKPageGetBackingScaleFactor):
2132         (WKPageSetCustomBackingScaleFactor):
2133         * UIProcess/API/C/WKPage.h:
2134
2135         Re-named _deviceScaleFactor to _intrinsicDeviceScaleFactor since it only ever 
2136         refers to the intrinsic value.
2137         * UIProcess/API/mac/WKView.mm:
2138         (-[WKView viewDidMoveToWindow]):
2139         (-[WKView _windowDidChangeResolution:]):
2140         (-[WKView _intrinsicDeviceScaleFactor]):
2141
2142         WebPageProxy stores both the customDeviceScaleFactor and the 
2143         intrinsicDeviceScaleFactor. deviceScaleFactor() returns the appropriate value that 
2144         should be the one used. 
2145         * UIProcess/WebPageProxy.cpp:
2146         (WebKit::WebPageProxy::WebPageProxy):
2147         (WebKit::WebPageProxy::setIntrinsicDeviceScaleFactor):
2148         (WebKit::WebPageProxy::deviceScaleFactor):
2149         (WebKit::WebPageProxy::setCustomDeviceScaleFactor):
2150         (WebKit::WebPageProxy::creationParameters):
2151         * UIProcess/WebPageProxy.h:
2152
2153 2011-08-31  Anders Carlsson  <andersca@apple.com>
2154
2155         REGRESSION(r93902): Can't open external links on gmail
2156         https://bugs.webkit.org/show_bug.cgi?id=67234
2157         <rdar://problem/10053636>
2158
2159         Reviewed by Alexey Proskuryakov.
2160
2161         * Shared/cf/ArgumentCodersCF.cpp:
2162         (CoreIPC::decode):
2163         If we encounter an empty URL string, create an empty url by using NSURL, just
2164         like we do in WebCore when converting an empty KURL to an NSURL.
2165
2166         * WebKit2.xcodeproj/project.pbxproj:
2167         Compile ArgumentCodersCF.cpp as Objective-C++ for now.
2168
2169 2011-08-30  Beth Dakin  <bdakin@apple.com>
2170
2171         https://bugs.webkit.org/show_bug.cgi?id=67150
2172         Would like API to use a custom device scale factor for a particular WebView/WKView
2173         -and corresponding-
2174         <rdar://problem/10041016>
2175
2176         Reviewed by Darin Adler.
2177
2178         New API is setOverrideBackingScaleFactor() on WKPage
2179         * UIProcess/API/C/WKPage.cpp:
2180         (WKPageGetOverrideBackingScaleFactor):
2181         (WKPageSetOverrideBackingScaleFactor):
2182         * UIProcess/API/C/WKPage.h:
2183         * UIProcess/WebPageProxy.cpp:
2184         (WebKit::WebPageProxy::WebPageProxy):
2185         (WebKit::WebPageProxy::deviceScaleFactor):
2186         (WebKit::WebPageProxy::setOverrideBackingScaleFactor):
2187         * UIProcess/WebPageProxy.h:
2188         (WebKit::WebPageProxy::overrideBackingScaleFactor):
2189
2190 2011-08-30  Aaron Colwell  <acolwell@chromium.org>
2191
2192         Add MediaSource API to HTMLMediaElement
2193         https://bugs.webkit.org/show_bug.cgi?id=64731
2194
2195         Reviewed by Eric Carlson.
2196
2197         * Configurations/FeatureDefines.xcconfig:
2198
2199 2011-08-30  Ada Chan  <adachan@apple.com>
2200
2201         Laying some groundwork to fetch performance statistics from WebProcess.
2202         https://bugs.webkit.org/show_bug.cgi?id=67160
2203
2204         Reviewed by Darin Adler.
2205
2206         Add WKContextGetStatistics() which sends a message to WebProcess to fetch the performance statistics.
2207         * UIProcess/API/C/WKContext.cpp:
2208         (WKContextGetStatistics):
2209         * UIProcess/API/C/WKContext.h:
2210         * UIProcess/WebContext.cpp:
2211         (WebKit::WebContext::~WebContext):
2212         (WebKit::WebContext::getWebCoreStatistics):
2213         (WebKit::WebContext::didGetWebCoreStatistics):
2214         * UIProcess/WebContext.h:
2215         * UIProcess/WebContext.messages.in: Add the DidGetWebCoreStatistics message that WebProcess can send when it has
2216         the performance statistics ready.
2217
2218         Add WebProcess::getWebCoreStatistics().  Currently it just sends back an empty StatisticsData object.
2219         It will gather the performance statistics to store in the StatisticsData object in a future patch.
2220         * WebProcess/WebProcess.cpp:
2221         (WebKit::WebProcess::getWebCoreStatistics):
2222         * WebProcess/WebProcess.h:
2223         * WebProcess/WebProcess.messages.in:
2224
2225         Add the skeleton for StatisticsData.
2226         * Scripts/webkit2/messages.py:
2227         * Shared/StatisticsData.cpp: Added.
2228         (WebKit::StatisticsData::encode):
2229         (WebKit::StatisticsData::decode):
2230         (WebKit::StatisticsData::StatisticsData):
2231         * Shared/StatisticsData.h: Added.
2232
2233         Add StatisticsData.h/cpp to project.
2234         * CMakeLists.txt:
2235         * GNUmakefile.am:
2236         * WebKit2.pro:
2237         * WebKit2.xcodeproj/project.pbxproj:
2238         * win/WebKit2.vcproj:
2239
2240 2011-08-29  Alexey Proskuryakov  <ap@apple.com>
2241
2242         DumpRenderTree should begin each test with an empty cookie store
2243         https://bugs.webkit.org/show_bug.cgi?id=63545
2244         <rdar://problem/5666907>
2245
2246         Reviewed by Darin Adler.
2247
2248         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
2249         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
2250         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
2251         Updated to use currentCFHTTPCookieStorage() instead of privateBrowsingCookieStorage().
2252
2253         * WebProcess/Cookies/mac/WebCookieManagerMac.mm:
2254         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
2255         There is no no need to access cookie storage through session manually - we already have code
2256         for that in WebCore.
2257
2258         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2259         (WKBundleSwitchNetworkLoaderToNewTestingSession):
2260         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2261         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2262         (WebKit::InjectedBundle::switchNetworkLoaderToNewTestingSession):
2263         * WebProcess/InjectedBundle/InjectedBundle.h:
2264         Exposed bundle SPI to use a private default session. It's separate from private browsing,
2265         because some tests enable the latter, and we don't want to mix them up.
2266
2267         * WebProcess/WebPage/mac/WebPageMac.mm:
2268         (WebKit::WebPage::platformHasLocalDataForURL):
2269         (WebKit::cachedResponseForURL):
2270         Updated to use currentStorageSession() instead of privateBrowsingStorageSession().
2271
2272         * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformInitializeWebProcess):
2273         ResourceHandle::setDefaultStorageSession() no longer steals a reference, so retain it properly.
2274
2275 2011-08-30  Alexis Menard  <alexis.menard@openbossa.org>
2276
2277         [Qt][WK2] Make mouse over work again for QDesktopWebView.
2278         https://bugs.webkit.org/show_bug.cgi?id=67200
2279
2280         Reviewed by Noam Rosenthal.
2281
2282         The API has changed after QGraphicsView, SceneGraph sends
2283         QHoverEvents now.
2284
2285         * UIProcess/qt/qdesktopwebpageproxy.cpp:
2286         (QDesktopWebPageProxy::handleEvent):
2287         (QDesktopWebPageProxy::handleHoverMoveEvent):
2288         * UIProcess/qt/qdesktopwebpageproxy.h:
2289
2290 2011-08-30  Kaustubh Atrawalkar  <kaustubh@motorola.com>
2291
2292         The unused ScrollView* argument can and should be removed from
2293         scrollRectIntoView.
2294         https://bugs.webkit.org/show_bug.cgi?id=67117
2295
2296         Reviewed by Darin Adler.
2297
2298         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2299         (WebKit::WebChromeClient::scrollRectIntoView):
2300         * WebProcess/WebCoreSupport/WebChromeClient.h:
2301
2302 2011-08-29  Ryosuke Niwa  <rniwa@webkit.org>
2303
2304         Another Windows build fix after r94047.
2305
2306         * win/WebKit2.def:
2307         * win/WebKit2CFLite.def:
2308
2309 2011-08-29  Ryosuke Niwa  <rniwa@webkit.org>
2310
2311         Export more symbols for r94038.
2312
2313         * win/WebKit2.def:
2314         * win/WebKit2CFLite.def:
2315
2316 2011-08-29  Ryosuke Niwa  <rniwa@webkit.org>
2317
2318         Windows build fix for r94038.
2319
2320         * win/WebKit2.def:
2321         * win/WebKit2CFLite.def:
2322
2323 2011-08-29  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
2324
2325
2326         [Qt] QTouchWebView url property test missing
2327         https://bugs.webkit.org/show_bug.cgi?id=67159
2328
2329         Reviewed by Noam Rosenthal.
2330
2331         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.
2332
2333         * UIProcess/API/qt/tests/qmltests/TouchWebView/tst_properties.qml:
2334
2335 2011-08-29  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
2336
2337         [Qt] QDesktopWebView url property test missing
2338         https://bugs.webkit.org/show_bug.cgi?id=67155
2339
2340         Reviewed by Noam Rosenthal.
2341
2342         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.
2343
2344         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_properties.qml:
2345
2346 2011-08-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2347
2348         Unreviewed, rolling out r93987, r93992, r93995, r93998, and
2349         r93999.
2350         http://trac.webkit.org/changeset/93987
2351         http://trac.webkit.org/changeset/93992
2352         http://trac.webkit.org/changeset/93995
2353         http://trac.webkit.org/changeset/93998
2354         http://trac.webkit.org/changeset/93999
2355         https://bugs.webkit.org/show_bug.cgi?id=67147
2356
2357         Many failing tests (Requested by ap on #webkit).
2358
2359         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
2360         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
2361         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
2362         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2363         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2364         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2365         * WebProcess/InjectedBundle/InjectedBundle.h:
2366         * WebProcess/win/WebProcessWin.cpp:
2367         (WebKit::WebProcess::platformInitializeWebProcess):
2368
2369 2011-08-26  Martin Robinson  <mrobinson@igalia.com>
2370
2371         Reviewed by Xan Lopez.
2372
2373         [GTK] Build WebKit2 unconditionally
2374         https://bugs.webkit.org/show_bug.cgi?id=62749
2375
2376         Build WebKit2 by default. This will make the bots build it and catch
2377         build errors when they occur.
2378
2379         * GNUmakefile.am: Enable WebKit2 by default, but remove references to the WebKit2
2380         PC file, which should not be shipped until WebKit2 is actually shipped officially.
2381
2382 2011-08-29  Alexey Proskuryakov  <ap@apple.com>
2383
2384         Windows build fix.
2385
2386         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
2387         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
2388         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
2389         Updated for new function name and signature: currentCFHTTPCookieStorage().
2390
2391 2011-08-26  Alexey Proskuryakov  <ap@apple.com>
2392
2393         DumpRenderTree should begin each test with an empty cookie store
2394         https://bugs.webkit.org/show_bug.cgi?id=63545
2395         <rdar://problem/5666907>
2396
2397         Reviewed by Darin Adler.
2398
2399         * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformInitializeWebProcess):
2400         ResourceHandle::setDefaultStorageSession() no longer steals a reference, so retain it properly.
2401
2402         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2403         (WKBundleUsePrivateSessionForNetworkLoading):
2404         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2405         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2406         (WebKit::InjectedBundle::usePrivateSessionForNetworkLoading):
2407         * WebProcess/InjectedBundle/InjectedBundle.h:
2408         Exposed bundle SPI to use a private default session. It's separate from private browsing,
2409         because some tests enable the latter, and we don't want to mix them up.
2410
2411 2011-08-29  Chris Marrin  <cmarrin@apple.com>
2412
2413         Fixed a build problem caused by http://trac.webkit.org/changeset/93980
2414
2415         Unreviewed.
2416
2417         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2418
2419 2011-08-23  Chris Marrin  <cmarrin@apple.com>
2420
2421         [mac] requestAnimationFrame support for mac port
2422         https://bugs.webkit.org/show_bug.cgi?id=59146
2423
2424         Reviewed by Simon Fraser.
2425
2426         Implement requestAnimationFrame for WebKit2. Add a
2427         CFRunLoopObserver to WebPage, which runs just before
2428         the syncCompositingState RLO and calls into the 
2429         ScriptedAnimationController if scheduleAnimation() has
2430         been called.
2431
2432         * Configurations/FeatureDefines.xcconfig:
2433         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2434         (WebKit::WebChromeClient::scheduleAnimation):
2435         * WebProcess/WebCoreSupport/WebChromeClient.h:
2436         * WebProcess/WebPage/WebPage.cpp:
2437         (WebKit::WebPage::WebPage):
2438         (WebKit::WebPage::~WebPage):
2439         * WebProcess/WebPage/WebPage.h:
2440         * WebProcess/WebPage/mac/WebPageMac.mm:
2441         (WebKit::WebPage::requestAnimationFrameRunLoopObserverCallback):
2442         (WebKit::WebPage::scheduleAnimation):
2443         (WebKit::WebPage::unscheduleAnimation):
2444         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.cpp:
2445         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
2446
2447 2011-08-29  Pierre Rossi  <pierre.rossi@gmail.com>
2448
2449         [Qt] NPAPI support doesn't honor the ENABLE_NETSCAPE_PLUGIN_API define in WebKit2
2450         https://bugs.webkit.org/show_bug.cgi?id=67123
2451
2452         We could simply use the defines already in place for this.
2453
2454         Reviewed by Andreas Kling.
2455
2456         * WebKit2.pro:
2457
2458 2011-08-29  Vamshikrishna Yellenki  <vamshi@motorola.com>
2459
2460         [GTK][WK2] Compilation error in WebKit2 GTK - Revision 93953
2461         https://bugs.webkit.org/show_bug.cgi?id=67111
2462
2463         Reviewed by Martin Robinson.
2464
2465         WebKit2 GTK build error.
2466
2467         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
2468         Include <WebCore/ResourceError.h> explicitly to remove WebCore::ResourceError
2469         inclusion error.
2470
2471 2011-08-28  Balazs Kelemen  <kbalazs@webkit.org>
2472
2473         [Qt][WK2] Unreviewed build fix.
2474
2475         * UIProcess/qt/QtWebPageProxy.cpp:
2476         (QtWebPageProxy::init): Initialize the WKPageUIClient with memset
2477         to avoid missing initializer warning. The missing initializer is the
2478         result of using a version 0 WKPageUIClient while it has newer version (1).
2479         We have nothing to do with the callbacks in the new version so I voted
2480         for memset.
2481         * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp: Include ResourceError.h.
2482
2483 2011-08-26  Sam Weinig  <sam@webkit.org>
2484
2485         Stop using custom NSErrors for WebKit2 WebErrors
2486         https://bugs.webkit.org/show_bug.cgi?id=67075
2487
2488         Reviewed by Anders Carlsson.
2489
2490         * WebProcess/WebCoreSupport/WebErrors.h:
2491         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
2492         (WebKit::createNSError):
2493         (WebKit::cancelledError):
2494         (WebKit::fileDoesNotExistError):
2495         (WebKit::blockedError):
2496         (WebKit::cannotShowURLError):
2497         (WebKit::interruptedForPolicyChangeError):
2498         (WebKit::cannotShowMIMETypeError):
2499         (WebKit::pluginWillHandleLoadError):
2500         There is no reason to use custom registered NSErrors anymore, so don't.
2501
2502 2011-08-26  Anders Carlsson  <andersca@apple.com>
2503
2504         Fix build.
2505
2506         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2507
2508 2011-08-26  Sam Weinig  <sam@webkit.org>
2509
2510         Fold _webkit_initWithDomain into _webkit_errorWithDomain in WebKit2
2511         https://bugs.webkit.org/show_bug.cgi?id=67063
2512
2513         Reviewed by Anders Carlsson.
2514
2515         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
2516         (+[NSError _webkit_errorWithDomain:code:URL:]):
2517
2518 2011-08-26  Anders Carlsson  <andersca@apple.com>
2519
2520         Implement NPN_ScheduleTimer/NPN_UnscheduleTimer
2521         https://bugs.webkit.org/show_bug.cgi?id=67062
2522
2523         Reviewed by Sam Weinig.
2524
2525         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2526         (WebKit::NPN_ScheduleTimer):
2527         Call NetscapePlugin::scheduleTimer.
2528
2529         (WebKit::NPN_UnscheduleTimer):
2530         Call NetscapePlugin::unscheduleTimer.
2531
2532         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2533         (WebKit::NetscapePlugin::NetscapePlugin):
2534         Initialize m_nextTimerID.
2535
2536         (WebKit::NetscapePlugin::Timer::start):
2537         Start the timer.
2538
2539         (WebKit::NetscapePlugin::Timer::stop):
2540         Stop the timer.
2541
2542         (WebKit::NetscapePlugin::Timer::timerFired):
2543         Call the right callback and unschedule the timer object if it's not a repeating timer.
2544
2545         (WebKit::NetscapePlugin::scheduleTimer):
2546         Create a new timer and start it.
2547
2548         (WebKit::NetscapePlugin::unscheduleTimer):
2549         Get the timer from the map and destroy it.
2550         
2551         (WebKit::NetscapePlugin::destroy):
2552         Destroy all timers.
2553
2554         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2555         Add Timer class.
2556
2557 2011-08-26  Sam Weinig  <sam@webkit.org>
2558
2559         Fix typo in Connection.cpp
2560         https://bugs.webkit.org/show_bug.cgi?id=67060
2561
2562         Reviewed by Anders Carlsson.
2563
2564         * Platform/CoreIPC/Connection.cpp:
2565         (CoreIPC::Connection::waitForSyncReply):
2566         We want timedOut, not timeout.  There is not a current way to cause this
2567         to be an issue. This issue was caught by the Clang Static Analyzer.
2568
2569 2011-08-26  Alice Liu  <alice.liu@apple.com>
2570
2571         https://bugs.webkit.org/show_bug.cgi?id=66823
2572         Add the request info to the WebPageProxy::CreateNewPage message
2573
2574         Reviewed by Anders Carlsson.
2575
2576         Update function declarations with additional ResourceRequest parameter:
2577         * UIProcess/API/C/WKPage.h:
2578         * UIProcess/WebPageProxy.cpp:
2579         (WebKit::WebPageProxy::createNewPage):
2580         * UIProcess/WebPageProxy.h:
2581         * UIProcess/WebPageProxy.messages.in:
2582         * UIProcess/WebUIClient.cpp:
2583         (WebKit::WebUIClient::createNewPage):
2584         * UIProcess/WebUIClient.h:
2585
2586         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2587         (WebKit::WebChromeClient::createWindow): 
2588         Pass the ResourceRequest within the FrameLoadRequest.
2589
2590 2011-08-26  Alexis Menard  <alexis.menard@openbossa.org>
2591
2592         [Qt][WK2]REGRESSION(r93784): It made many tests crash
2593         https://bugs.webkit.org/show_bug.cgi?id=66958
2594
2595         Reviewed by Anders Carlsson.
2596
2597         Don't try to make sure the WebContext is deleted, for now the leak
2598         is intended and when multiple processes per context will be supported
2599         this leak should be fixed. This was the cause of DRT crashing on the bot,
2600         the context was deleted after the first test, letting other tests with nothing
2601         but a bad context.
2602
2603         * UIProcess/qt/QtWebPageProxy.cpp:
2604         (QtWebPageProxy::~QtWebPageProxy):
2605
2606 2011-08-26  Anders Carlsson  <andersca@apple.com>
2607
2608         Fix handling of keyup events in the new Cocoa text input model
2609         https://bugs.webkit.org/show_bug.cgi?id=67045
2610
2611         Reviewed by Sam Weinig.
2612
2613         Use a counter instead of a boolean for deciding when to ignore keyup events, because
2614         if multiple keys are pressed simultaneously then we need to ignore more than one keyup event in a row.
2615
2616         Also if a keyboard event is an autorepeating event we won't get a keyup event so don't increment the counter
2617         in that case.
2618
2619         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2620         (WebKit::NetscapePlugin::NetscapePlugin):
2621         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2622         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2623         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
2624
2625 2011-08-26  Jessie Berlin  <jberlin@apple.com>
2626
2627         Gut WKPageCreateSnapshotOfVisibleContent so that it can be removed later.
2628         https://bugs.webkit.org/show_bug.cgi?id=66979.
2629
2630         Removing the function altogether would break the nightlies.
2631         This patch removes the code behind it so that it is clear that
2632         WKPageCreateSnapshotOfVisibleContent should not be used, and so that the code isn't just
2633         left rotting in the tree.
2634
2635         Reviewed by Brian Weinstein.
2636
2637         * UIProcess/API/C/WKPage.cpp:
2638         (WKPageCreateSnapshotOfVisibleContent):
2639         Return 0.
2640         * UIProcess/API/C/WKPagePrivate.h:
2641         Update the comment and add a link to the bug.
2642
2643         * UIProcess/WebPageProxy.cpp:
2644         * UIProcess/WebPageProxy.h:
2645
2646         * WebProcess/WebPage/WebPage.cpp:
2647         * WebProcess/WebPage/WebPage.h:
2648         * WebProcess/WebPage/WebPage.messages.in:
2649
2650 2011-08-25  Anders Carlsson  <andersca@apple.com>
2651
2652         kNPEventStartIME doesn't work correctly for NPAPI
2653         https://bugs.webkit.org/show_bug.cgi?id=65264
2654         <rdar://problem/9996476>
2655
2656         Reviewed by Sam Weinig.
2657
2658         In order to remain compatible with older plug-ins, the updated input model won't
2659         be turned on unless a plug-in explicitly asks whether we support it. The plug-in must do
2660         this before any keyboard events have been processed.
2661
2662         * PluginProcess/mac/PluginControllerProxyMac.mm:
2663         (WebKit::PluginControllerProxy::setComplexTextInputState):
2664         Add the CoreIPC::DispatchMessageEvenWhenWaitingForSyncReply flag to this message since we want
2665         the web process to handle it while it's waiting for a reply to the PluginControllerProxy::HandleMouseEvent
2666         synchronous message.
2667
2668         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2669         (WebKit::NPN_GetValue):
2670         Implement the logic for when to turn off the legacy Cocoa text input model support.
2671
2672         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2673         (WebKit::NetscapePlugin::NetscapePlugin):
2674         Initialize m_ignoreNextKeyUpEvent to false.
2675
2676         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2677         Add m_ignoreNextKeyUpEvent member variable.
2678
2679         (WebKit::NetscapePlugin::hasHandledAKeyDownEvent):
2680         Add a getter.
2681
2682         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2683         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
2684         Don't send keydown and keyup events when complex text input is enabled in the updated model.
2685
2686 2011-08-25  Anders Carlsson  <andersca@apple.com>
2687
2688         Correctly handle events in the updated Cocoa text input model
2689         https://bugs.webkit.org/show_bug.cgi?id=67005
2690
2691         Reviewed by Sam Weinig.
2692
2693         * UIProcess/API/mac/WKTextInputWindowController.mm:
2694         (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
2695         When using the updated model, always return a string even for 'simple' characters.
2696
2697         * UIProcess/API/mac/WKView.mm:
2698         (-[WKView _tryHandlePluginComplexTextInputKeyDown:]):
2699         Only let the input method have a crack at the event in the legacy model.
2700
2701 2011-08-25  Jeff Miller  <jeffm@apple.com>
2702
2703         Move Windows-specific WebPageProxy code to WebPageProxyWin.cpp
2704         https://bugs.webkit.org/show_bug.cgi?id=67002
2705
2706         Reviewed by Brian Weinstein.
2707
2708         * UIProcess/WebPageProxy.cpp: Moved Windows-only functions to WebPageProxyWin.cpp.
2709         
2710         * UIProcess/win/WebPageProxyWin.cpp:
2711         (WebKit::WebPageProxy::firstRectForCharacterInSelectedRange): Moved from WebPageProxy.cpp.
2712         (WebKit::WebPageProxy::getSelectedText): Moved from WebPageProxy.cpp.
2713         (WebKit::WebPageProxy::gestureWillBegin): Moved from WebPageProxy.cpp.
2714         (WebKit::WebPageProxy::gestureDidScroll): Moved from WebPageProxy.cpp.
2715         (WebKit::WebPageProxy::gestureDidEnd): Moved from WebPageProxy.cpp.
2716         (WebKit::WebPageProxy::setGestureReachedScrollingLimit): Moved from WebPageProxy.cpp.
2717         (WebKit::WebPageProxy::startDragDrop): Moved from WebPageProxy.cpp.
2718         (WebKit::WebPageProxy::didChangeCompositionSelection): Moved from WebPageProxy.cpp.
2719         (WebKit::WebPageProxy::confirmComposition): Moved from WebPageProxy.cpp.
2720         (WebKit::WebPageProxy::setComposition): Moved from WebPageProxy.cpp.
2721
2722 2011-08-25  Anders Carlsson  <andersca@apple.com>
2723
2724         Handle key-down events in the updated Cocoa text input model
2725         https://bugs.webkit.org/show_bug.cgi?id=67001
2726
2727         Reviewed by Sam Weinig.
2728
2729         * UIProcess/API/mac/WKView.mm:
2730         (-[WKView performKeyEquivalent:]):
2731         Call _disableComplexTextInputIfNecessary so that we'll inform the plug-in that complex text
2732         input has been disabled.
2733
2734         (-[WKView _disableComplexTextInputIfNecessary]):
2735         If the plug-in is using the updated Cocoa text input model specification, disable text input
2736         if the text input window has been dismissed for whatever reason.
2737
2738         (-[WKView _tryHandlePluginComplexTextInputKeyDown:]):
2739         Call _disableComplexTextInputIfNecessary so that we'll inform the plug-in that complex text
2740         input has been disabled.
2741         
2742         (-[WKView _tryPostProcessPluginComplexTextInputKeyDown:]):
2743         If the plug-in is using the updated Cocoa text input model specification, let the input methods
2744         have a go at the keyboard event.
2745
2746         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2747         (WebKit::NetscapePlugin::setComplexTextInputEnabled):
2748         Actually set m_isComplexTextInputEnabled to the right value.
2749
2750 2011-08-25  Anders Carlsson  <andersca@apple.com>
2751
2752         Factor code to send a key-down event to the plug-in out into a new function
2753         https://bugs.webkit.org/show_bug.cgi?id=66999
2754
2755         Reviewed by Darin Adler.
2756
2757         * UIProcess/API/mac/WKView.mm:
2758         (-[WKView _handlePluginComplexTextInputKeyDown:]):
2759         (-[WKView _tryHandlePluginComplexTextInputKeyDown:]):
2760
2761 2011-08-25  Anders Carlsson  <andersca@apple.com>
2762
2763         WKView should keep track of the plug-in complex text input state
2764         https://bugs.webkit.org/show_bug.cgi?id=66990
2765
2766         Reviewed by Sam Weinig.
2767
2768         * UIProcess/API/mac/WKView.mm:
2769         Add a _pluginComplexTextInputState ivar to WKViewData.
2770
2771         (-[WKView _setPluginComplexTextInputState:]):
2772         Set the _pluginComplexTextInputState variable. If text input is being disabled, send back an empty string to the plug-in.
2773
2774         (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]):
2775         Call -[WKView _setPluginComplexTextInputState:].
2776
2777 2011-08-25  Anders Carlsson  <andersca@apple.com>
2778
2779         Move file internal methods to a class continuation in WKView
2780         https://bugs.webkit.org/show_bug.cgi?id=66983
2781
2782         Reviewed by Dan Bernstein.
2783
2784         * UIProcess/API/mac/WKView.mm:
2785         (-[WKView _deviceScaleFactor]):
2786         (-[WKView _setDrawingAreaSize:]):
2787
2788 2011-08-25  Anders Carlsson  <andersca@apple.com>
2789
2790         More work on the updated Cocoa text input specification
2791         https://bugs.webkit.org/show_bug.cgi?id=66977
2792
2793         Reviewed by Sam Weinig.
2794
2795         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2796         (WebKit::NetscapePlugin::NetscapePlugin):
2797         Initialize m_pluginWantsLegacyCocoaTextInput and m_hasHandledAKeyDownEvent.
2798
2799         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2800         Add m_pluginWantsLegacyCocoaTextInput and m_hasHandledAKeyDownEvent.
2801         
2802         (WebKit::NetscapePlugin::setPluginWantsLegacyCocoaTextInput):
2803         Add setter. Not called yet.
2804
2805         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2806         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
2807         Set m_hasHandledAKeyDownEvent to true if we get a KeyDown event.
2808
2809         (WebKit::NetscapePlugin::sendComplexTextInput):
2810         If the plug-in is using the updated Cocoa text input spec, we can disable text input here.
2811
2812         (WebKit::NetscapePlugin::pluginFocusOrWindowFocusChanged):
2813         If the plug-in is using the updated Cocoa text input spec, text input is not enabled when
2814         the plug-in is focused.
2815
2816         (WebKit::NetscapePlugin::setComplexTextInputEnabled):
2817         Set the right text input state based on whether the plug-in is using the updated spec or not.
2818
2819 2011-08-25  Anders Carlsson  <andersca@apple.com>
2820
2821         Return the correct value for NPNVsupportsCarbonBool
2822         https://bugs.webkit.org/show_bug.cgi?id=66964
2823
2824         Reviewed by Adam Roben.
2825
2826         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2827         (WebKit::NPN_GetValue):
2828         Remove a FIXME and set the value to true.
2829
2830 2011-08-25  Alexis Menard  <alexis.menard@openbossa.org>
2831
2832         [Qt][WK2] Remove QWKContext class and make sure the WebProcessProxy life is correctly managed.
2833         https://bugs.webkit.org/show_bug.cgi?id=66886
2834
2835         Reviewed by Benjamin Poulain.
2836
2837         Remove QWKContext class from Qt APIs as it is too low level for the vision
2838         of the Qt5 API. QtWebPageProxy now holds directly a WebContext which can be a custom one
2839         or default created one. This patch also ensure that the WebProcessProxy is correctly
2840         destroyed at application exit by removing the circular references between the WebContext,
2841         WebProcessProxy, and WebPageProxy.
2842
2843         * UIProcess/API/qt/qdesktopwebview.cpp:
2844         (QDesktopWebViewPrivate::QDesktopWebViewPrivate):
2845         * UIProcess/API/qt/qtouchwebview.cpp:
2846         (QTouchWebViewPrivate::QTouchWebViewPrivate):
2847         * UIProcess/qt/ClientImpl.cpp:
2848         (qt_wk_setStatusText):
2849         * UIProcess/qt/ClientImpl.h:
2850         * UIProcess/qt/QtWebPageProxy.cpp:
2851         (QtWebPageProxy::defaultWKContext):
2852         (QtWebPageProxy::QtWebPageProxy):
2853         (QtWebPageProxy::~QtWebPageProxy):
2854         * UIProcess/qt/QtWebPageProxy.h:
2855         * UIProcess/qt/qdesktopwebpageproxy.cpp:
2856         (QDesktopWebPageProxy::QDesktopWebPageProxy):
2857         * UIProcess/qt/qdesktopwebpageproxy.h:
2858         * UIProcess/qt/qtouchwebpageproxy.cpp:
2859         (QTouchWebPageProxy::QTouchWebPageProxy):
2860         * UIProcess/qt/qtouchwebpageproxy.h:
2861         * UIProcess/qt/qwkcontext.cpp: Removed.
2862         * UIProcess/qt/qwkcontext.h: Removed.
2863         * UIProcess/qt/qwkcontext_p.h: Removed.
2864         * WebKit2.pro:
2865
2866 2011-08-23  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2867
2868         [Qt][WK2] Drive tiling from the WebProcess and reuse TiledBackingStore.
2869         https://bugs.webkit.org/show_bug.cgi?id=66771
2870
2871         Reviewed by Tor Arne Vestbø.
2872
2873         We need the tiling logic to be moved to the web process to allow invalidated tile rects to be
2874         rendered with the same layout. This also allows the web process to render tiles into
2875         buffers readable directly by the GPU (on supported platforms). We also take the opportunity
2876         to use the TiledBackingStore in WebCore to have only one tiling implementation.
2877
2878         Before this patch:
2879         - TiledDrawingAreaProxy manages tiles from the UI process.
2880         - TiledDrawingArea received rendering requests for a rect and returns the result
2881           to the proxy through shared memory.
2882
2883         After this patch:
2884         - TiledDrawingArea uses a TiledBackingStore to manage tiles from the web process.
2885         - TiledBackingStoreRemoteTile forwards tile creations, update and removals to the proxy.
2886         - TiledDrawingAreaProxy updates the scene graph directly from requests.
2887
2888         It also implements tile buffer swapping correctly in SGTileNode, triggered by the DidRenderFrame message.
2889         Render throttling is implemented by waiting in TiledDrawingArea for the UI process to
2890         notify us when the last rendered frame is ready to make it to the screen.
2891         TiledDrawingAreaTileSets have been replaced by using two instances of TiledBackingStore instead.
2892
2893         * UIProcess/API/qt/qtouchwebpage.cpp:
2894         (QTouchWebPage::updatePaintNode):
2895         * UIProcess/API/qt/qtouchwebview.cpp:
2896         (QTouchWebViewPrivate::updateViewportState):
2897         * UIProcess/DrawingAreaProxy.h:
2898         (WebKit::DrawingAreaProxy::createTile):
2899         (WebKit::DrawingAreaProxy::updateTile):
2900         (WebKit::DrawingAreaProxy::didRenderFrame):
2901         (WebKit::DrawingAreaProxy::removeTile):
2902         * UIProcess/DrawingAreaProxy.messages.in:
2903         * UIProcess/TiledDrawingAreaProxy.cpp:
2904         (WebKit::TiledDrawingAreaProxy::create):
2905         (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
2906         (WebKit::TiledDrawingAreaProxy::~TiledDrawingAreaProxy):
2907         (WebKit::TiledDrawingAreaProxy::setVisibleContentRect):
2908         (WebKit::TiledDrawingAreaProxy::setContentsScale):
2909         (WebKit::TiledDrawingAreaProxy::renderNextFrame):
2910         (WebKit::TiledDrawingAreaProxy::sizeDidChange):
2911         (WebKit::TiledDrawingAreaProxy::paint):
2912         * UIProcess/TiledDrawingAreaProxy.h:
2913         * UIProcess/TiledDrawingAreaTile.h: Removed.
2914         * UIProcess/qt/SGAgent.cpp:
2915         (WebKit::NodeUpdateCreateTile::NodeUpdateCreateTile):
2916         (WebKit::NodeUpdateRemoveTile::NodeUpdateRemoveTile):
2917         (WebKit::NodeUpdateSetBackBuffer::NodeUpdateSetBackBuffer):
2918         (WebKit::NodeUpdateSwapTileBuffers::NodeUpdateSwapTileBuffers):
2919         (WebKit::SGAgent::SGAgent):
2920         (WebKit::SGAgent::createTileNode):
2921         (WebKit::SGAgent::removeTileNode):
2922         (WebKit::SGAgent::setNodeBackBuffer):
2923         (WebKit::SGAgent::swapTileBuffers):
2924         (WebKit::SGAgent::updatePaintNode):
2925         (WebKit::SGAgent::getScaleNode):
2926         Make the parenting logic more strict to allow SGAgent to handle the scale nodes itself (remove NodeUpdateCreateScale and use the scale in CreateTile).
2927         Delete the scale node when the last of its child tiles has been removed.
2928
2929         * UIProcess/qt/SGAgent.h:
2930         (WebKit::SGAgent::isSwapPending):
2931
2932         * UIProcess/qt/SGTileNode.cpp:
2933         (WebKit::SGTileNode::SGTileNode):
2934         (WebKit::SGTileNode::setBackBuffer):
2935         (WebKit::SGTileNode::swapIfNeeded):
2936         Replace setTargetRect, setSourceRect and setTexture by a single setBackBuffer method.
2937         This allows all those values to be used only when swapIfNeeded is called later.
2938
2939         * UIProcess/qt/SGTileNode.h:
2940         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
2941         (WebKit::TiledDrawingAreaProxy::createTile):
2942         (WebKit::TiledDrawingAreaProxy::updateTile):
2943         (WebKit::TiledDrawingAreaProxy::didRenderFrame):
2944         (WebKit::TiledDrawingAreaProxy::removeTile):
2945         * UIProcess/qt/TiledDrawingAreaTileQt.cpp: Removed.
2946         * UIProcess/qt/qtouchwebpageproxy.cpp:
2947         (QTouchWebPageProxy::renderNextFrame):
2948         * UIProcess/qt/qtouchwebpageproxy.h:
2949         * WebKit2.pro:
2950         * WebProcess/WebPage/DrawingArea.h:
2951         (WebKit::DrawingArea::setVisibleContentRect):
2952         (WebKit::DrawingArea::setContentsScale):
2953         (WebKit::DrawingArea::renderNextFrame):
2954         * WebProcess/WebPage/DrawingArea.messages.in:
2955         * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp: Added.
2956         (WebKit::TiledBackingStoreRemoteTile::TiledBackingStoreRemoteTile):
2957         (WebKit::TiledBackingStoreRemoteTile::~TiledBackingStoreRemoteTile):
2958         (WebKit::TiledBackingStoreRemoteTile::isDirty):
2959         (WebKit::TiledBackingStoreRemoteTile::invalidate):
2960         (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
2961         (WebKit::TiledBackingStoreRemoteTile::swapBackBufferToFront):
2962         (WebKit::TiledBackingStoreRemoteTile::isReadyToPaint):
2963         (WebKit::TiledBackingStoreRemoteTile::paint):
2964         (WebKit::TiledBackingStoreRemoteTileBackend::TiledBackingStoreRemoteTileBackend):
2965         (WebKit::TiledBackingStoreRemoteTileBackend::createTile):
2966         (WebKit::TiledBackingStoreRemoteTileBackend::paintCheckerPattern):
2967         * WebProcess/WebPage/TiledBackingStoreRemoteTile.h: Added.
2968         (WebKit::TiledBackingStoreRemoteTile::create):
2969         (WebKit::TiledBackingStoreRemoteTile::coordinate):
2970         (WebKit::TiledBackingStoreRemoteTile::rect):
2971         (WebKit::TiledBackingStoreRemoteTileClient::~TiledBackingStoreRemoteTileClient):
2972         (WebKit::TiledBackingStoreRemoteTileBackend::create):
2973         * WebProcess/WebPage/TiledDrawingArea.cpp:
2974         (WebKit::TiledDrawingArea::TiledDrawingArea):
2975         (WebKit::TiledDrawingArea::setNeedsDisplay):
2976         (WebKit::TiledDrawingArea::setSize):
2977         (WebKit::TiledDrawingArea::setVisibleContentRect):
2978         (WebKit::TiledDrawingArea::setContentsScale):
2979         (WebKit::TiledDrawingArea::renderNextFrame):
2980         (WebKit::TiledDrawingArea::suspendPainting):
2981         (WebKit::TiledDrawingArea::resumePainting):
2982         (WebKit::TiledDrawingArea::tiledBackingStorePaintBegin):
2983         (WebKit::TiledDrawingArea::tiledBackingStorePaint):
2984         (WebKit::TiledDrawingArea::tiledBackingStorePaintEnd):
2985         (WebKit::TiledDrawingArea::tiledBackingStoreIsUpdatingAllowed):
2986         (WebKit::TiledDrawingArea::tiledBackingStoreContentsRect):
2987         (WebKit::TiledDrawingArea::tiledBackingStoreVisibleRect):
2988         (WebKit::TiledDrawingArea::tiledBackingStoreBackgroundColor):
2989         (WebKit::TiledDrawingArea::createTile):
2990         (WebKit::TiledDrawingArea::updateTile):
2991         (WebKit::TiledDrawingArea::removeTile):
2992         * WebProcess/WebPage/TiledDrawingArea.h:
2993         * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp: Removed.
2994
2995 2011-08-24  Michael Saboff  <msaboff@apple.com>
2996
2997         Improper comment in CoreIPC/ArgumentEncoder.cpp from 66464
2998         https://bugs.webkit.org/show_bug.cgi?id=66912
2999
3000         Updated the comment in ArgumentEncoder::grow to reflect that system malloc
3001         currently checks to see if a MADV_FREE_REUSABLE will fail before calling it.
3002
3003         Reviewed by Mark Rowe.
3004
3005         * Platform/CoreIPC/ArgumentEncoder.cpp:
3006         (CoreIPC::ArgumentEncoder::grow):
3007
3008 2011-08-24  Anders Carlsson  <andersca@apple.com>
3009
3010         Rename -[WKTextInputWindowController keyboardInputSourceChanged] to unmarkText to indicate what the method does
3011         https://bugs.webkit.org/show_bug.cgi?id=66883
3012
3013         Reviewed by Beth Dakin.
3014
3015         * UIProcess/API/mac/WKTextInputWindowController.h:
3016         * UIProcess/API/mac/WKTextInputWindowController.mm:
3017         (-[WKTextInputPanel _unmarkText]):
3018         (-[WKTextInputWindowController unmarkText]):
3019         * UIProcess/API/mac/WKView.mm:
3020         (-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]):
3021
3022 2011-08-24  Oliver Hunt  <oliver@apple.com>
3023
3024         JSNPObject and JSNPMethod create their structure in their constructors
3025         https://bugs.webkit.org/show_bug.cgi?id=66879
3026
3027         Reviewed by Anders Carlsson.
3028
3029         It's not safe to create the Structure for an object inside its constructor
3030         so we hoist construction out into their ::create methods and move the methods
3031         into the cpp file.
3032
3033         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
3034         (WebKit::JSNPMethod::JSNPMethod):
3035         (WebKit::JSNPMethod::create):
3036         * WebProcess/Plugins/Netscape/JSNPMethod.h:
3037         (WebKit::JSNPMethod::create):
3038         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3039         (WebKit::JSNPObject::JSNPObject):
3040         (WebKit::JSNPObject::create):
3041         * WebProcess/Plugins/Netscape/JSNPObject.h:
3042         (WebKit::JSNPObject::create):
3043
3044 2011-08-24  Anders Carlsson  <andersca@apple.com>
3045
3046         More plug-in complex text input scaffolding
3047         https://bugs.webkit.org/show_bug.cgi?id=66865
3048
3049         Reviewed by Sam Weinig.
3050
3051         Make -[WKView _doneWithKeyEvent:eventWasHandled:] take an NSEvent * directly. Also
3052         add methods for handling plug-in text input key-down events.
3053
3054         * UIProcess/API/mac/PageClientImpl.mm:
3055         (WebKit::PageClientImpl::doneWithKeyEvent):
3056         * UIProcess/API/mac/WKView.mm:
3057         (-[WKView _tryHandlePluginComplexTextInputKeyDown:]):
3058         (-[WKView keyDown:]):
3059         (-[WKView _tryPostProcessPluginComplexTextInputKeyDown:]):
3060         (-[WKView _doneWithKeyEvent:eventWasHandled:]):
3061         * UIProcess/API/mac/WKViewInternal.h:
3062
3063 2011-08-24  Amruth Raj  <amruthraj@motorola.com>
3064
3065         [GTK] WebProcess crash on hitting assertion m_isWaitingForDidUpdate in DrawingAreaImpl
3066         https://bugs.webkit.org/show_bug.cgi?id=66640
3067
3068         Reviewed by Martin Robinson.
3069
3070         The crash happens when a new timer is created in an existing timer callback. Since 
3071         TimerBase has a single GSource* it gets overridden and the old timer can never get
3072         stopped. To handle this, keep a copy of the old timer and use it for destruction.
3073
3074         * Platform/RunLoop.h:
3075         * Platform/gtk/RunLoopGtk.cpp:
3076         (RunLoop::TimerBase::timerFiredCallback):
3077         Store the timerSource so that even if it is modified by the timer callback,
3078         it can be restored for freeing it.
3079         (RunLoop::TimerBase::start):
3080         Remove destroyNotifyCallback. Destruction is now handled in timerFiredCallback itself.
3081
3082 2011-08-23  Anders Carlsson  <andersca@apple.com>
3083
3084         Prepare WKTextInputWindowController for the new text input model
3085         https://bugs.webkit.org/show_bug.cgi?id=66826
3086
3087         Reviewed by Sam Weinig.
3088
3089         Add -[WKTextInputWindowController hasMarkedText] and make interpretKeyEvent take an
3090         additional usingLegacyCocoaTextInput flag. No functionality change.
3091
3092         * UIProcess/API/mac/WKTextInputWindowController.h:
3093         * UIProcess/API/mac/WKTextInputWindowController.mm:
3094         (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
3095         (-[WKTextInputPanel _hasMarkedText]):
3096         (-[WKTextInputWindowController hasMarkedText]):
3097         (-[WKTextInputWindowController interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
3098         * UIProcess/API/mac/WKView.mm:
3099         (-[WKView keyDown:]):
3100
3101 2011-08-23  Gopal Raghavan  <gopal.1.raghavan@nokia.com>
3102
3103         [Qt] Unnecessary folders in WebKit2.
3104         https://bugs.webkit.org/show_bug.cgi?id=66583
3105
3106         Reviewed by Benjamin Poulain.
3107
3108         Remove empty autotest folders that were left over from QGraphicsWKView times.
3109
3110         * UIProcess/API/qt/tests/qgraphicswkview: Removed.
3111         * UIProcess/API/qt/tests/qwkhistory: Removed.
3112         * UIProcess/API/qt/tests/qwkpage: Removed.
3113
3114 2011-08-23  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3115
3116         [Qt][WK2] Fix an awful memory leak introduced in r92376.
3117         https://bugs.webkit.org/show_bug.cgi?id=65528
3118
3119         Reviewed by Benjamin Poulain.
3120
3121         The non-virtual destructor would create a leak of the tile update buffer because
3122         the NodeUpdateSetTexture's QImage member destructor wouldn't be called.
3123
3124         * UIProcess/qt/SGAgent.h:
3125         (WebKit::NodeUpdate::~NodeUpdate):
3126
3127 2011-08-23  Steve Block  <steveblock@google.com>
3128
3129         Remove all mention of removed Android files from build scripts
3130         https://bugs.webkit.org/show_bug.cgi?id=66755
3131
3132         Reviewed by Tony Gentilcore.
3133
3134         * Scripts/generate-forwarding-headers.pl:
3135
3136 2011-08-23  Benjamin Poulain  <benjamin@webkit.org>
3137
3138         [Qt][WK2] ViewportInteractionEngine: the position of the content is not corrected when scaling the page manually
3139         https://bugs.webkit.org/show_bug.cgi?id=66672
3140
3141         Reviewed by Kenneth Rohde Christiansen.
3142
3143         Add the method animateContentIntoBoundariesIfNeeded() to move the content back into both scale and position boundaries.
3144         This method is now used as the entry point for animations in order to avoid bugs regarding scale or position.
3145
3146         The existing animation methods were renamed accordingly for clarity and consistency with the updateContent methods.
3147
3148         * UIProcess/qt/ViewportInteractionEngine.cpp:
3149         (WebKit::ViewportInteractionEngine::panGestureEnded):
3150         (WebKit::ViewportInteractionEngine::pinchGestureEnded):
3151         (WebKit::ViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
3152         (WebKit::ViewportInteractionEngine::animateContentPositionIntoBoundariesIfNeeded):
3153         (WebKit::ViewportInteractionEngine::animateContentScaleIntoBoundariesIfNeeded):
3154         * UIProcess/qt/ViewportInteractionEngine.h:
3155
3156 2011-08-22  Oliver Hunt  <oliver@apple.com>
3157
3158         Delay GC triggered NP object destruction to the next runloop cycle
3159         https://bugs.webkit.org/show_bug.cgi?id=66717
3160
3161         Reviewed by Anders Carlsson.
3162
3163         Delay destruction of plugin objects caused by GC until the next
3164         runloop cycle so that they can execute JS in their finalizers.
3165         We do this using a zero delay timer coupled with a queue of
3166         objects to be finalised.
3167
3168         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3169         (WebKit::JSNPObject::releaseObject):
3170         * WebProcess/Plugins/Netscape/JSNPObject.h:
3171         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
3172         (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
3173         (WebKit::NPRuntimeObjectMap::invalidate):
3174         (WebKit::NPRuntimeObjectMap::invalidateQueuedObjects):
3175         (WebKit::NPRuntimeObjectMap::addToInvalidationQueue):
3176         (WebKit::NPRuntimeObjectMap::finalize):
3177         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
3178         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp:
3179         (WebKit::trySafeReleaseNPObject):
3180         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h:
3181
3182 2011-08-22  Anders Carlsson  <andersca@apple.com>
3183
3184         Move code from PageClientImpl::doneWithKeyEvent to WKView
3185         https://bugs.webkit.org/show_bug.cgi?id=66722
3186
3187         Reviewed by Darin Adler.
3188
3189         * UIProcess/API/mac/PageClientImpl.mm:
3190         (WebKit::PageClientImpl::doneWithKeyEvent):
3191         * UIProcess/API/mac/WKView.mm:
3192         (-[WKView _doneWithKeyEvent:WebKit::eventWasHandled:]):
3193         * UIProcess/API/mac/WKViewInternal.h:
3194
3195 2011-08-22  Anders Carlsson  <andersca@apple.com>
3196
3197         Update the text input context when the plug-in focus changes and not when the complex text input state changes
3198         https://bugs.webkit.org/show_bug.cgi?id=66716
3199
3200         Reviewed by Darin Adler.
3201
3202         * UIProcess/API/mac/WKView.mm:
3203         (-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]):
3204         (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]):
3205
3206 2011-08-22  Michael Saboff  <msaboff@apple.com>
3207
3208         REGRESSION (r92231): Apple campus proposal PDF doesn't display in Safari
3209         https://bugs.webkit.org/show_bug.cgi?id=66464
3210
3211         Changed ArgumentEncoder to use system malloc instead of fastMalloc.
3212         FastMalloc uses madvise(MADV_FREE_REUSABLE) which is incompatible with
3213         mach message Out Of Line (OOL) messages that use MACH_MSG_VIRTUAL_COPY.
3214         The system malloc has no such limitation.
3215         Changed sendOutgoingMessage to use MACH_MSG_VIRTUAL_COPY again as it 
3216         doesn't have size limitations that MACH_MSG_PHYSICAL_COPY.
3217         
3218         Reviewed by Anders Carlsson.
3219
3220         * Platform/CoreIPC/ArgumentEncoder.cpp:
3221         (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
3222         (CoreIPC::ArgumentEncoder::grow):
3223         * Platform/CoreIPC/mac/ConnectionMac.cpp:
3224         (CoreIPC::Connection::sendOutgoingMessage):
3225
3226 2011-08-22  Anders Carlsson  <andersca@apple.com>
3227
3228         Use -[NSApplication updateWindows] to update the current input context
3229         https://bugs.webkit.org/show_bug.cgi?id=66715
3230
3231         Reviewed by Alexey Proskuryakov.
3232
3233         * UIProcess/API/mac/WKView.mm:
3234         (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]):
3235
3236 2011-08-22  Anders Carlsson  <andersca@apple.com>
3237
3238         The UI process should keep track of whether a plug-in has focus or not
3239         https://bugs.webkit.org/show_bug.cgi?id=66712
3240
3241         Reviewed by Darin Adler.
3242
3243         This is in preparation for implementing the updated Cocoa text input model.
3244
3245         Pipe through whether a plug-in and its containing window has focus or not, from the
3246         plug-in process and all the way to the UI process.
3247
3248         * PluginProcess/PluginControllerProxy.h:
3249         * PluginProcess/mac/PluginControllerProxyMac.mm:
3250         (WebKit::PluginControllerProxy::pluginFocusOrWindowFocusChanged):
3251         * UIProcess/API/mac/PageClientImpl.h:
3252         * UIProcess/API/mac/PageClientImpl.mm:
3253         (WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged):
3254         * UIProcess/API/mac/WKView.mm:
3255         (-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]):
3256         * UIProcess/API/mac/WKViewInternal.h:
3257         * UIProcess/PageClient.h:
3258         * UIProcess/WebPageProxy.h:
3259         * UIProcess/WebPageProxy.messages.in:
3260         * UIProcess/mac/WebPageProxyMac.mm:
3261         (WebKit::WebPageProxy::pluginFocusOrWindowFocusChanged):
3262         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3263         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3264         (WebKit::NetscapePlugin::platformSetFocus):
3265         (WebKit::NetscapePlugin::windowFocusChanged):
3266         (WebKit::NetscapePlugin::pluginFocusOrWindowFocusChanged):
3267         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
3268         (WebKit::PluginProxy::pluginFocusOrWindowFocusChanged):
3269         * WebProcess/Plugins/PluginController.h:
3270         * WebProcess/Plugins/PluginProxy.h:
3271         * WebProcess/Plugins/PluginProxy.messages.in:
3272         * WebProcess/Plugins/PluginView.cpp:
3273         (WebKit::PluginView::pluginFocusOrWindowFocusChanged):
3274         * WebProcess/Plugins/PluginView.h:
3275
3276 2011-08-22  Anders Carlsson  <andersca@apple.com>
3277
3278         Update the current NSTextInputContext whenever the plug-in complex text input state changes
3279         https://bugs.webkit.org/show_bug.cgi?id=66709
3280
3281         Reviewed by Sam Weinig.
3282
3283         Call [NSTextInputContext currentInputContext] which will force AppKit to update the current input
3284         context. Fixes a rare case when the out-of-line editing window wouldn't appear.
3285
3286         * UIProcess/API/mac/WKView.mm:
3287         (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]):
3288
3289 2011-08-19  Anders Carlsson  <andersca@apple.com>
3290
3291         Another attempt at fixing the Windows build.
3292
3293         * UIProcess/PageClient.h:
3294
3295 2011-08-19  Anders Carlsson  <andersca@apple.com>
3296
3297         Fix Windows build.
3298
3299         * WebProcess/Plugins/PluginController.h:
3300
3301 2011-08-19  Anders Carlsson  <andersca@apple.com>
3302
3303         Make the complex text input state a tri-state enum instead of a boolean
3304         https://bugs.webkit.org/show_bug.cgi?id=62245
3305
3306         Reviewed by Sam Weinig.
3307
3308         This is to prepare the infrastructure for supporting the updated Cocoa text input model for plug-ins.
3309
3310         * PluginProcess/PluginControllerProxy.cpp:
3311         * PluginProcess/PluginControllerProxy.h:
3312         * PluginProcess/mac/PluginControllerProxyMac.mm:
3313         (WebKit::PluginControllerProxy::setComplexTextInputState):
3314         (WebKit::PluginControllerProxy::compositingRenderServerPort):
3315         * Shared/Plugins/mac: Added.
3316         * Shared/Plugins/mac/PluginComplexTextInputState.h: Added.
3317         (WebKit::isValidPluginComplexTextInputState):
3318         * UIProcess/API/mac/PageClientImpl.h:
3319         * UIProcess/API/mac/PageClientImpl.mm:
3320         (WebKit::PageClientImpl::setPluginComplexTextInputState):
3321         * UIProcess/API/mac/WKView.mm:
3322         (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]):
3323         * UIProcess/API/mac/WKViewInternal.h:
3324         * UIProcess/PageClient.h:
3325         * UIProcess/WebPageProxy.h:
3326         * UIProcess/WebPageProxy.messages.in:
3327         * UIProcess/mac/WebPageProxyMac.mm:
3328         (WebKit::WebPageProxy::setPluginComplexTextInputState):
3329         * WebKit2.xcodeproj/project.pbxproj:
3330         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3331         (WebKit::NetscapePlugin::NetscapePlugin):
3332         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3333         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3334         (WebKit::NetscapePlugin::platformSetFocus):
3335         (WebKit::NetscapePlugin::windowFocusChanged):
3336         (WebKit::NetscapePlugin::setComplexTextInputEnabled):
3337         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
3338         (WebKit::PluginProxy::setComplexTextInputState):
3339         * WebProcess/Plugins/PluginController.h:
3340         * WebProcess/Plugins/PluginProxy.cpp:
3341         * WebProcess/Plugins/PluginProxy.h:
3342         * WebProcess/Plugins/PluginProxy.messages.in:
3343         * WebProcess/Plugins/PluginView.cpp:
3344         (WebKit::PluginView::~PluginView):
3345         (WebKit::PluginView::setComplexTextInputState):
3346         (WebKit::PluginView::compositingRenderServerPort):
3347         * WebProcess/Plugins/PluginView.h:
3348
3349 2011-08-19  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3350
3351         [Qt] [WK2] Provide API for intercept (and possible ignore) links clicked in QDesktopWebView
3352         https://bugs.webkit.org/show_bug.cgi?id=65920
3353
3354         Reviewed by Benjamin Poulain.
3355
3356         This patch makes QDesktopWebView delegate the decision of whether a navigation
3357         should proceed to a slot in QML. The user of the DesktopWebView must implement a
3358         'navigationPolicyForUrl()' if it wants to use the feature.
3359
3360         Such feature is useful for implementing opening links in "new tab" by using a
3361         specific mouse button or mouse button plus keyboard modifiers.
3362
3363         The patch introduces a internal Qt-level interface called PolicyInterface, that
3364         is used by QtWebPageProxy to delegate policy calls. A concrete implementation is
3365         provided for QDesktopWebView.
3366
3367         * Shared/qt/WebCoreArgumentCodersQt.cpp:
3368         (CoreIPC::::encode):
3369         (CoreIPC::::decode):
3370         Implement the serialization of the Request URL, which is the only data
3371         we exposing from the Request.
3372
3373         * WebKit2.pro:
3374         * UIProcess/qt/PolicyInterface.h: Added.
3375         * UIProcess/qt/QtWebPageProxy.cpp:
3376         (QtWebPageProxy::QtWebPageProxy):
3377         (QtWebPageProxy::init):
3378         * UIProcess/qt/QtWebPageProxy.h:
3379         Register a Policy Client in the WK2 C API only if there's a PolicyInterface available.
3380
3381         * UIProcess/qt/ClientImpl.h:
3382         * UIProcess/qt/ClientImpl.cpp:
3383         (toPolicyInterface):
3384         (toQtMouseButton):
3385         (toQtKeyboardModifiers):
3386         (qt_wk_decidePolicyForNavigationAction):
3387         Implement the callback for the Page Policy Client. It will translate the
3388         arguments to Qt jargon and call PolicyInterface.
3389
3390         * UIProcess/qt/qdesktopwebpageproxy.cpp:
3391         (QDesktopWebPageProxy::QDesktopWebPageProxy):
3392         * UIProcess/API/qt/qdesktopwebview.h:
3393         * UIProcess/API/qt/qdesktopwebview_p.h:
3394         * UIProcess/API/qt/qdesktopwebview.cpp:
3395         (toPolicyAction):
3396         (hasMetaMethod):
3397         (QDesktopWebViewPrivate::navigationPolicyForURL):
3398         The concrete implementation for QDesktopWebView. Its private object implements
3399         the PolicyInterface and try to call a possible function defined in QML (so return
3400         value and arguments all QVariants). If there's no such a function, returns the
3401         default UsePolicy, like if we haven't registered a PolicyClient in WK2 C API.
3402
3403         * UIProcess/API/qt/tests/qmltests/DesktopWebView/tst_navigationPolicyForUrl.qml: Added.
3404         * UIProcess/API/qt/tests/qmltests/common/test2.html: Added.
3405         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
3406         Add a test for DesktopWebView QML element making use of a button and a modifier to
3407         ignore a navigation.
3408
3409         * UIProcess/qt/qtouchwebpageproxy.cpp:
3410         (QTouchWebPageProxy::QTouchWebPageProxy):
3411         For now, we don't have a PolicyInterface for QTouchWebView.
3412
3413 2011-08-18  Anders Carlsson  <andersca@apple.com>
3414
3415         WebProcess crashes during startup if libdispatch is initialized by WebProcessShim.dylib
3416         https://bugs.webkit.org/show_bug.cgi?id=66508
3417         <rdar://problem/9828476>
3418
3419         Reviewed by Mark Rowe.
3420
3421         * mac/MainMac.cpp:
3422         (closeUnusedFileDescriptors):
3423         Check if a file descriptor is a kqueue and don't close it if that is the case. While this
3424         isn't a complete fix, (it won't work if other initializers end up creating non-kqueue file descriptors)
3425         it's good enough for Snow Leopard. For Lion, we should use the new posix_spawn API that lets you whitelist
3426         file descriptors from the parent process.
3427
3428 2011-08-19  Benjamin Poulain  <benjamin@webkit.org>
3429
3430         [Qt][WK2] Add a basic engine to control the content of the viewport
3431         https://bugs.webkit.org/show_bug.cgi?id=66383
3432
3433         Reviewed by Andreas Kling.
3434
3435         Add ViewportInteractionEngine to handle the content of the viewport. The class make
3436         sure the QTouchWebPage stays in the viewport and in the boundaries.
3437
3438         * UIProcess/API/qt/qdesktopwebview.cpp:
3439         (QDesktopWebViewPrivate::loadDidCommit):
3440         * UIProcess/API/qt/qdesktopwebview_p.h:
3441         * UIProcess/API/qt/qtouchwebpage.cpp:
3442         (QTouchWebPage::QTouchWebPage): Set the transform origin to the top left so
3443         we can asume the position 0, 0 is always the top left of the page.
3444         (QTouchWebPagePrivate::_q_commitScaleChange): Make commitScaleChange a slot
3445         in order to completely decouple the ViewportInteractionEngine and the WebKit classes.
3446         * UIProcess/API/qt/qtouchwebpage.h:
3447         * UIProcess/API/qt/qtouchwebpage_p.h:
3448         * UIProcess/API/qt/qtouchwebview.cpp:
3449         (QTouchWebViewPrivate::QTouchWebViewPrivate):
3450         (QTouchWebViewPrivate::loadDidCommit):
3451         (QTouchWebViewPrivate::_q_viewportRectUpdated): Make _q_viewportRectUpdated() a slot
3452         for reducing coupling.
3453         (QTouchWebViewPrivate::updateViewportConstraints):
3454         (QTouchWebViewPrivate::setViewportArguments):
3455         (QTouchWebView::geometryChanged):
3456         * UIProcess/API/qt/qtouchwebview.h:
3457         * UIProcess/API/qt/qtouchwebview_p.h:
3458         * UIProcess/qt/ClientImpl.cpp:
3459         (qt_wk_didCommitLoadForFrame):
3460         * UIProcess/qt/QtGestureRecognizer.cpp:
3461         (WebKit::QtGestureRecognizer::QtGestureRecognizer):
3462         * UIProcess/qt/QtGestureRecognizer.h: Change the gesture recognizer to talk directly
3463         to the ViewportInteractionEngine instead of interacting through TouchViewInterface.
3464         * UIProcess/qt/QtPanGestureRecognizer.cpp:
3465         (WebKit::QtPanGestureRecognizer::QtPanGestureRecognizer):
3466         (WebKit::QtPanGestureRecognizer::recognize):
3467         * UIProcess/qt/QtPanGestureRecognizer.h:
3468         * UIProcess/qt/QtPinchGestureRecognizer.cpp:
3469         (WebKit::QtPinchGestureRecognizer::QtPinchGestureRecognizer):
3470         (WebKit::QtPinchGestureRecognizer::recognize):
3471         * UIProcess/qt/QtPinchGestureRecognizer.h:
3472         * UIProcess/qt/QtWebPageProxy.cpp:
3473         (QtWebPageProxy::loadDidCommit): Add the loadCommited callback in order
3474         to reset the viewport state when the page change.
3475         * UIProcess/qt/QtWebPageProxy.h:
3476         * UIProcess/qt/TouchViewInterface.cpp:
3477         (WebKit::TouchViewInterface::TouchViewInterface):
3478         (WebKit::TouchViewInterface::contentSizeChanged):
3479         (WebKit::TouchViewInterface::loadDidCommit):
3480         * UIProcess/qt/TouchViewInterface.h:
3481         * UIProcess/qt/ViewInterface.h:
3482         * UIProcess/qt/ViewportInteractionEngine.cpp: Added.
3483         (WebKit::visibleRectInContentCoordinate):
3484         (WebKit::contentRectInViewportCoordinate):
3485         (WebKit::ViewportUpdateGuard::ViewportUpdateGuard):
3486         (WebKit::ViewportUpdateGuard::~ViewportUpdateGuard):
3487         (WebKit::ViewportInteractionEngine::ViewportInteractionEngine):
3488         (WebKit::ViewportInteractionEngine::reset):
3489         (WebKit::ViewportInteractionEngine::setConstraints):
3490         (WebKit::ViewportInteractionEngine::panGestureStarted):
3491         (WebKit::ViewportInteractionEngine::panGestureRequestScroll):
3492         (WebKit::ViewportInteractionEngine::panGestureCancelled):
3493         (WebKit::ViewportInteractionEngine::panGestureEnded):
3494         (WebKit::ViewportInteractionEngine::pinchGestureStarted):
3495         (WebKit::ViewportInteractionEngine::pinchGestureRequestUpdate):
3496         (WebKit::ViewportInteractionEngine::pinchGestureEnded):
3497         (WebKit::ViewportInteractionEngine::contentGeometryChanged):
3498         (WebKit::ViewportInteractionEngine::contentScaleChanged):
3499         (WebKit::ViewportInteractionEngine::updateContentIfNeeded):
3500         (WebKit::ViewportInteractionEngine::updateContentScaleIfNeeded):
3501         (WebKit::ViewportInteractionEngine::updateContentPositionIfNeeded):
3502         (WebKit::ViewportInteractionEngine::animateContentPositionToBoundaries):
3503         (WebKit::ViewportInteractionEngine::animateContentScaleToBoundaries):
3504         (WebKit::ViewportInteractionEngine::scaleContent):
3505         * UIProcess/qt/ViewportInteractionEngine.h: Added.
3506         (WebKit::ViewportInteractionEngine::Constraints::Constraints):
3507         (WebKit::operator==):
3508         * UIProcess/qt/qtouchwebpageproxy.cpp:
3509         (QTouchWebPageProxy::QTouchWebPageProxy):
3510         * UIProcess/qt/qtouchwebpageproxy.h:
3511         * WebKit2.pro:
3512
3513 2011-08-19  Lars Knudsen  <lars.knudsen@nokia.com>
3514
3515         [Qt][WK2] Change the rect argument of QtWebPageProxy::paint() to const ref
3516         https://bugs.webkit.org/show_bug.cgi?id=66549
3517
3518         Reviewed by Benjamin Poulain.
3519
3520         * UIProcess/qt/QtWebPageProxy.cpp:
3521         (QtWebPageProxy::paint):
3522         * UIProcess/qt/QtWebPageProxy.h:
3523
3524 2011-08-19  MORITA Hajime  <morrita@google.com>
3525
3526         Spell-checking against execCommand() inserted HTML doesn't care word boundary.
3527         https://bugs.webkit.org/show_bug.cgi?id=65902
3528
3529         Reviewed by Ryosuke Niwa.
3530         
3531         Add exports for window.internals object.
3532
3533         * win/WebKit2.def:
3534         * win/WebKit2CFLite.def:
3535
3536 2011-08-18  Beth Dakin  <bdakin@apple.com>
3537
3538         Reviewed by Sam Weinig.
3539
3540         https://bugs.webkit.org/show_bug.cgi?id=66495
3541         Lion-specific scroller SPIs can use forward declaration instead of 
3542         WebKitSystemInterface
3543
3544         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3545         (InitWebCoreSystemInterface):
3546
3547 2011-08-18  Darin Adler  <darin@apple.com>
3548
3549         Made some code even more private to a particular file and class
3550         https://bugs.webkit.org/show_bug.cgi?id=66428
3551
3552         Reviewed by Anders Carlsson.
3553
3554         * UIProcess/API/mac/WKView.mm:
3555         (-[WKView _setDrawingAreaSize:]): Made this file internal.
3556         * UIProcess/API/mac/WKViewInternal.h: Removed _setDrawingAreaSize.
3557         * UIProcess/DrawingAreaProxy.h: Made sizeDidChange private.
3558
3559 2011-08-18  Amruth Raj  <amruthraj@motorola.com>
3560
3561         [GTK] [WK2] Activating sub menus cause the WebProcess to crash
3562         https://bugs.webkit.org/show_bug.cgi?id=66471
3563
3564         Reviewed by Anders Carlsson.
3565
3566         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
3567         (WebKit::WebContextMenuProxyGtk::createGtkMenu):
3568
3569 2011-08-18  Adam Roben  <aroben@apple.com>
3570
3571         Update the device scale factor when the WKView's window changes
3572