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