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