5473a23e6e46543461b7dd182d63bcbfea5e41c8
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-01-26  Sam Weinig  <sam@webkit.org>
2
3         Reviewed by Maciej Stachowiak.
4
5         Add events to represent the start/end of a gesture scroll
6         https://bugs.webkit.org/show_bug.cgi?id=53215
7
8         * Scripts/webkit2/messages.py:
9         * Shared/WebEvent.h:
10         (WebKit::WebGestureEvent::WebGestureEvent):
11         (WebKit::WebGestureEvent::position):
12         (WebKit::WebGestureEvent::globalPosition):
13         * Shared/WebEventConversion.cpp:
14         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
15         (WebKit::platform):
16         * Shared/WebEventConversion.h:
17         * Shared/WebGestureEvent.cpp: Added.
18         (WebKit::WebGestureEvent::WebGestureEvent):
19         (WebKit::WebGestureEvent::encode):
20         (WebKit::WebGestureEvent::decode):
21         (WebKit::WebGestureEvent::isGestureEventType):
22         * Shared/mac/WebEventFactory.h:
23         * Shared/mac/WebEventFactory.mm:
24         (WebKit::gestureEventTypeForEvent):
25         (WebKit::WebEventFactory::createWebGestureEvent):
26         * UIProcess/API/mac/WKView.mm:
27         (-[WKView shortCircuitedEndGestureWithEvent:]):
28         (-[WKView beginGestureWithEvent:]):
29         (-[WKView viewDidMoveToWindow]):
30         * UIProcess/WebPageProxy.cpp:
31         (WebKit::WebPageProxy::handleGestureEvent):
32         (WebKit::WebPageProxy::didReceiveEvent):
33         * UIProcess/WebPageProxy.h:
34         * WebKit2.xcodeproj/project.pbxproj:
35         * WebProcess/WebPage/WebPage.cpp:
36         (WebKit::handleGestureEvent):
37         (WebKit::WebPage::gestureEvent):
38         * WebProcess/WebPage/WebPage.h:
39         * WebProcess/WebPage/WebPage.messages.in:
40         Pipe gesture events down to WebCore.
41
42 2011-01-26  Dan Bernstein  <mitz@apple.com>
43
44         Reviewed by Dave Hyatt.
45
46         <rdar://problem/8446709> Allow inter-ideograph justification for CJK
47         https://bugs.webkit.org/show_bug.cgi?id=53184
48
49         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
50         (WebKit::WebPopupMenu::setUpPlatformData): Added a TrailingExpansionBehavior parameter to the
51         RenderText constructor.
52
53 2011-01-26  Jing Jin  <jjin@apple.com>
54
55         Reviewed by Darin Adler.
56
57         Methods to temporarily disable size updates to the page drawing area in WKView.
58         https://bugs.webkit.org/show_bug.cgi?id=53206
59         Part of <rdar://problem/8818585>
60
61         * UIProcess/API/mac/WKView.h: Added _frameSizeUpdateDisabledCount.
62         * UIProcess/API/mac/WKView.mm:
63         (-[WKView setFrameSize:]): Only update page size if frame size updates are enabled.
64         (-[WKView _setDrawingAreaSize:]): Helper method to set the page's drawing area's size.
65         (-[WKView disableFrameSizeUpdates]): Increment _frameSizeUpdateDisabledCount
66         (-[WKView enableFrameSizeUpdates]): Decrement _frameSizeUpdateDisabledCount, and if the count is 0, meaning
67         that no one is disabling frame size updates anymore, update the drawing area's size to match the current frame.
68         (-[WKView frameSizeUpdatesDisabled]): Returns YES if at least one caller is disabling frame size updates.
69         * UIProcess/API/mac/WKViewInternal.h: Declared -disableFrameSizeUpdates, -enableFrameSizeUpdates, and -frameSizeUpdatesDisabled.
70         * UIProcess/API/mac/WKViewPrivate.h: Added.
71         * WebKit2.xcodeproj/project.pbxproj: Added WKViewPrivate.h
72
73 2011-01-26  Jing Jin  <jjin@apple.com>
74
75         Rubber-stamped by Dan Bernstein.
76         
77         Several WKView Internal category methods are implemented in the main category.
78         https://bugs.webkit.org/show_bug.cgi?id=53195
79
80         * UIProcess/API/mac/WKView.mm:
81         (-[WKView _setEventBeingResent:]): Moved into implementation of WKView (Internal).
82         (-[WKView _interceptKeyEvent:]): Moved into implementation of WKView (Internal).
83         (-[WKView _getTextInputState:selectionEnd:underlines:WebCore::]): Moved into implementation of WKView (Internal).
84         (-[WKView _setAccessibilityChildToken:]): Moved into implementation of WKView (Internal).
85
86 2011-01-26  Brian Weinstein  <bweinstein@apple.com>
87
88         Reviewed by John Sullivan.
89
90         WebKit2: Need API to get the frame load state of a BundleFrame
91         https://bugs.webkit.org/show_bug.cgi?id=53193
92
93         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
94         (WKBundleFrameGetFrameLoadState): Call through to the FrameLoader to get the frame load state.
95         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
96
97 2011-01-25  Brian Weinstein  <bweinstein@apple.com>
98
99         Reviewed by Antti Koivisto.
100
101         Crashes loading pages when cancelling subresource loads through WebKit
102         https://bugs.webkit.org/show_bug.cgi?id=53123
103         <rdar://problem/8914361>
104
105         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
106         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): If our URL is null, return early instead of dispatching
107             a message.
108
109 2011-01-25  Chris Fleizach  <cfleizach@apple.com>
110
111         Reviewed by Darin Adler.
112
113         WK2 leaks when a page is closed
114         https://bugs.webkit.org/show_bug.cgi?id=53100
115
116         Allow the WKView a chance to clean up on a page close. In this case,
117         cleaning up means removing the references the accessibility token has
118         to the window.
119
120         * UIProcess/API/mac/PageClientImpl.h:
121         * UIProcess/API/mac/PageClientImpl.mm:
122         (WebKit::PageClientImpl::pageClosed):
123         * UIProcess/API/mac/WKView.mm:
124         (-[WKView _setRemoteAccessibilityWindow:]):
125         (-[WKView _setAccessibilityChildToken:]):
126         (-[WKView _processDidCrash]):
127         (-[WKView _pageClosed]):
128         * UIProcess/API/mac/WKViewInternal.h:
129         * UIProcess/API/qt/qwkpage_p.h:
130         (QWKPagePrivate::pageClosed):
131         * UIProcess/PageClient.h:
132         * UIProcess/WebPageProxy.cpp:
133         (WebKit::WebPageProxy::close):
134         * UIProcess/win/WebView.cpp:
135         (WebKit::WebView::pageClosed):
136         * UIProcess/win/WebView.h:
137
138 2011-01-25  Chris Marrin  <cmarrin@apple.com>
139
140         Reviewed by Adam Roben.
141
142         Expose WebGL flag set/get in WK2
143         https://bugs.webkit.org/show_bug.cgi?id=53096
144
145         * Shared/WebPreferencesStore.h:
146         * UIProcess/API/C/WKPreferences.cpp:
147         (WKPreferencesSetWebGLEnabled):
148         (WKPreferencesGetWebGLEnabled):
149         * UIProcess/API/C/WKPreferencesPrivate.h:
150         * WebProcess/WebPage/WebPage.cpp:
151         (WebKit::WebPage::updatePreferences):
152
153 2011-01-25  Anders Carlsson  <andersca@apple.com>
154
155         Reviewed by Adam Roben.
156
157         Add and implement LayerTreeHost::scheduleLayerFlush
158         https://bugs.webkit.org/show_bug.cgi?id=53135
159
160         * WebKit2.xcodeproj/project.pbxproj:
161         Add LayerTreeHostMac.mm.
162
163         * WebProcess/WebPage/DrawingAreaImpl.cpp:
164         (WebKit::DrawingAreaImpl::scheduleCompositingLayerSync):
165         Call LayerTreeHost::scheduleLayerFlush.
166
167         * WebProcess/WebPage/LayerTreeHost.cpp:
168         (WebKit::LayerTreeHost::~LayerTreeHost):
169         Call platformInvalidate().
170
171         (WebKit::LayerTreeHost::flushPendingLayerChanges):
172         Rename from syncCompositingLayers.
173
174         * WebProcess/WebPage/mac/LayerTreeHostMac.mm: Added.
175         (WebKit::LayerTreeHost::scheduleLayerFlush):
176         Create a run loop observer if needed. This code is copied from LayerBackedDrawingAreaMac.mm
177
178         (WebKit::LayerTreeHost::platformInvalidate):
179         Invalidate the run loop observer.
180
181         (WebKit::LayerTreeHost::flushPendingLayerChangesRunLoopObserverCallback):
182         Call flushPendingChanges() and remove the run loop observer if it succeeded.
183
184 2011-01-25  Anders Carlsson  <andersca@apple.com>
185
186         Reviewed by Simon Fraser.
187
188         Add LayerTreeHost class
189         https://bugs.webkit.org/show_bug.cgi?id=53132
190
191         * WebKit2.xcodeproj/project.pbxproj:
192         Add LayerTreeHost files.
193
194         * WebProcess/WebPage/DrawingAreaImpl.cpp:
195         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
196         Initialize m_layerTreeHost.
197
198         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
199         Call the m_layerTreeHost.
200
201         * WebProcess/WebPage/LayerTreeHost.cpp: Added.
202         (WebKit::LayerTreeHost::attachRootCompositingLayer):
203         (WebKit::LayerTreeHost::detachRootCompositingLayer):
204         Add stubbed out functions.
205
206         (WebKit::LayerTreeHost::syncCompositingLayers):
207         Sync the compositing layers in the main frame.
208
209         * WebProcess/WebPage/LayerTreeHost.h: Added.
210
211 2011-01-25  Steve Falkenburg  <sfalken@apple.com>
212
213         Rubber-stamped by Adam Roben.
214
215         Windows production build fix.
216         Use correct environment variable escaping
217
218         * win/WebKit2.make:
219         * win/WebKit2Generated.make:
220
221 2011-01-25  Anders Carlsson  <andersca@apple.com>
222
223         Reviewed by Sam Weinig.
224
225         Don't inform the UI process about compositing changes when using the new drawing area
226         https://bugs.webkit.org/show_bug.cgi?id=53120
227
228         * WebProcess/WebPage/WebPage.cpp:
229         (WebKit::WebPage::changeAcceleratedCompositingMode):
230         Return early if we're using the new drawing area.
231
232         (WebKit::WebPage::exitAcceleratedCompositingMode):
233         Call setRootCompositingLayer(0) so the drawing area knows when we leave accelerated compositing.
234
235 2011-01-25  Sam Weinig  <sam@webkit.org>
236
237         Reviewed by Anders Carlsson.
238
239         Pipe a timestamp down into the PlatformWheelEvent for the Mac.
240         https://bugs.webkit.org/show_bug.cgi?id=53111
241
242         * Shared/WebEventConversion.cpp:
243         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
244         Assign the timestamp.
245
246 2011-01-25  Sam Weinig  <sam@webkit.org>
247
248         Reviewed by Anders Carlsson.
249
250         Add hasPreciseScrollingDeltas bit to PlatformWheelEvent on the Mac.
251         https://bugs.webkit.org/show_bug.cgi?id=53107
252
253         * Shared/WebEvent.h:
254         (WebKit::WebWheelEvent::hasPreciseScrollingDeltas):
255         * Shared/WebEventConversion.cpp:
256         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
257         * Shared/WebWheelEvent.cpp:
258         (WebKit::WebWheelEvent::WebWheelEvent):
259         * Shared/mac/WebEventFactory.mm:
260         (WebKit::WebEventFactory::createWebWheelEvent):
261
262 2011-01-25  Anders Carlsson  <andersca@apple.com>
263
264         Reviewed by Sam Weinig.
265
266         need a way to request the host CALayer render server port
267         https://bugs.webkit.org/show_bug.cgi?id=53101
268         <rdar://problem/8913620>
269
270         * PluginProcess/PluginControllerProxy.cpp:
271         (WebKit::PluginControllerProxy::compositingRenderServerPort):
272         Get the render server port from the plug-in process.
273
274         * PluginProcess/PluginControllerProxy.h:
275         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
276         (WebKit::NPN_GetValue):
277         Call NetscapePlugin::compositingRenderServerPort.
278
279         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
280         (WebKit::NetscapePlugin::compositingRenderServerPort):
281         Call PluginController::compositingRenderServerPort.
282
283         * WebProcess/Plugins/PluginView.cpp:
284         (WebKit::PluginView::compositingRenderServerPort):
285         Get the render server port from the web process.
286
287         * WebProcess/Plugins/PluginView.h:
288         Add compositingRenderServerPort.
289
290 2011-01-25  Maciej Stachowiak  <mjs@apple.com>
291
292         Rubber stamped by Dan Bernstein.
293
294         Change some floating point constants from 1.0 to 1.
295
296         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
297         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
298
299 2011-01-25  Maciej Stachowiak  <mjs@apple.com>
300
301         Reviewed by Anders Carlsson.
302
303         Improve scale factor resetting
304         https://bugs.webkit.org/show_bug.cgi?id=53093
305         
306         Two key changes:
307         - Don't set the scale factor to what it already is, as this causes an
308         uneeded force layout and scroll
309         - Don't ever set the scale factor based on a non-main frame committing
310         
311         This fixes two WebKit2 layout tests.
312
313         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
314         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
315
316 2011-01-24  Chris Marrin  <cmarrin@apple.com>
317
318         Reviewed by Eric Seidel.
319
320         Change ENABLE_3D_CANVAS to ENABLE_WEBGL
321         https://bugs.webkit.org/show_bug.cgi?id=53041
322
323         * Configurations/FeatureDefines.xcconfig:
324
325 2011-01-25  Andreas Kling  <kling@webkit.org>
326
327         Reviewed by Kenneth Rohde Christiansen.
328
329         [Qt][WK2] Add QWKPage::processCrashed() signal
330         https://bugs.webkit.org/show_bug.cgi?id=53076
331
332         * UIProcess/API/qt/qwkpage.cpp:
333         (QWKPagePrivate::processDidCrash):
334         * UIProcess/API/qt/qwkpage.h:
335         * UIProcess/API/qt/qwkpage_p.h:
336
337 2011-01-24  Anders Carlsson  <andersca@apple.com>
338
339         Fix build.
340         
341         * WebProcess/mac/WebProcessMac.mm:
342         (WebKit::initializeSandbox):
343
344 2011-01-24  Anders Carlsson  <andersca@apple.com>
345
346         Reviewed by Dan Bernstein.
347
348         Reset the page scale factor on standard frame loads
349         https://bugs.webkit.org/show_bug.cgi?id=53058
350         <rdar://problem/8908844>
351
352         * UIProcess/WebPageProxy.cpp:
353         (WebKit::WebPageProxy::scaleWebView):
354         Don't set m_viewScaleFactor here. It will be set in viewScaleFactorDidChange.
355
356         (WebKit::WebPageProxy::viewScaleFactorDidChange):
357         Update m_viewScaleFactor.
358
359         * UIProcess/WebPageProxy.h:
360         Add viewScaleFactorDidChange.
361
362         * UIProcess/WebPageProxy.messages.in:
363         Add ViewScaleFactorDidChange message.
364
365         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
366         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
367         Set the scale factor.
368
369         (WebKit::WebFrameLoaderClient::restoreViewState):
370         Inform the UI process about the new view scale factor.
371
372         * WebProcess/WebPage/WebPage.cpp:
373         (WebKit::WebPage::scaleWebView):
374         Send a ViewScaleFactorDidChange message.
375
376 2011-01-24  Maciej Stachowiak  <mjs@apple.com>
377
378         Reviewed by Anders Carlsson.
379
380         Use designated temp directory for the database for WebKit2
381         https://bugs.webkit.org/show_bug.cgi?id=53052
382         
383         Add the API necessary to support this. Database path is now
384         determined on the UI process side and passed to the Web process.
385         Reviewed by Anders Carlsson.
386
387         * GNUmakefile.am:
388         * Shared/WebProcessCreationParameters.cpp:
389         (WebKit::WebProcessCreationParameters::encode):
390         (WebKit::WebProcessCreationParameters::decode):
391         * Shared/WebProcessCreationParameters.h:
392         * UIProcess/API/C/WKContext.cpp:
393         (WKContextSetDatabaseDirectory):
394         * UIProcess/API/C/WKContextPrivate.h:
395         * UIProcess/WebContext.cpp:
396         (WebKit::WebContext::ensureWebProcess):
397         (WebKit::WebContext::databaseDirectory):
398         * UIProcess/WebContext.h:
399         (WebKit::WebContext::setDatabaseDirectory):
400         * UIProcess/mac/WebContextMac.mm:
401         (WebKit::WebContext::platformDefaultDatabaseDirectory):
402         * UIProcess/qt/WebContextQt.cpp:
403         (WebKit::WebContext::platformDefaultDatabaseDirectory):
404         * UIProcess/win/WebContextWin.cpp:
405         (WebKit::WebContext::platformDefaultDatabaseDirectory):
406         * WebKit2.pro:
407         * WebKit2.xcodeproj/project.pbxproj:
408         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
409         (WebKit::WebDatabaseManager::initialize):
410         (WebKit::WebDatabaseManager::WebDatabaseManager):
411         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
412         * WebProcess/WebCoreSupport/gtk/WebDatabaseManagerGtk.cpp: Removed.
413         * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm: Removed.
414         * WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp: Removed.
415         * WebProcess/WebCoreSupport/win/WebDatabaseManagerWin.cpp: Removed.
416         * WebProcess/WebProcess.cpp:
417         (WebKit::WebProcess::WebProcess):
418         (WebKit::WebProcess::initializeWebProcess):
419         * WebProcess/com.apple.WebProcess.sb:
420         * WebProcess/mac/WebProcessMac.mm:
421         (WebKit::initializeSandbox):
422         * win/WebKit2.vcproj:
423
424 2011-01-24  Brent Fulgham  <bfulgham@webkit.org>
425
426         Unreviewed build fix.
427
428         * win/WebKit2.vcproj: Don't build the CG Utilities when building
429         without CG support.
430
431 2011-01-24  Anders Carlsson  <andersca@apple.com>
432
433         Reviewed by John Sullivan.
434
435         Don't use the timeout checker for non-user-interaction messages
436         https://bugs.webkit.org/show_bug.cgi?id=53046
437
438         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
439         (WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize):
440         (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
441         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
442         (WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
443         (WebKit::LayerBackedDrawingAreaProxy::didSetSize):
444
445 2011-01-24  Adam Roben  <aroben@apple.com>
446
447         Windows Production build fix
448
449         * win/WebKit2.make: Update for move of WebKit2 into Source.
450
451 2011-01-24  Jessie Berlin  <jberlin@apple.com>
452
453         Reviewed by Adam Roben.
454
455         WebKit2: LayoutTests: The UNIMPLEMENTED warnings in TextCheckerWin should be disabled
456         https://bugs.webkit.org/show_bug.cgi?id=53029
457
458         * UIProcess/win/TextCheckerWin.cpp:
459         Disable the warnings for this file.
460
461 2011-01-24  Anders Carlsson  <andersca@apple.com>
462
463         Reviewed by Sam Weinig.
464
465         Wait for half a second if we're asked to paint when receiving a DidSetSize message
466         https://bugs.webkit.org/show_bug.cgi?id=53028
467
468         * UIProcess/DrawingAreaProxyImpl.cpp:
469         (WebKit::DrawingAreaProxyImpl::paint):
470
471 2011-01-24  Anders Carlsson  <andersca@apple.com>
472
473         Reviewed by Sam Weinig.
474
475         Implement forceRedisplay in the new drawing area
476         https://bugs.webkit.org/show_bug.cgi?id=53026
477
478         * WebProcess/WebPage/DrawingAreaImpl.cpp:
479         (WebKit::DrawingAreaImpl::forceRepaint):
480         * WebProcess/WebPage/DrawingAreaImpl.h:
481
482 2011-01-24  Anders Carlsson  <andersca@apple.com>
483
484         Reviewed by Sam Weinig.
485
486         Fill unpainted rects with the background color.
487         https://bugs.webkit.org/show_bug.cgi?id=53025
488
489         * UIProcess/API/mac/WKView.mm:
490         (drawPageBackground):
491         Add new helper function.
492
493         (-[WKView drawRect:]):
494         Iterate over the unpainted rects and fill them with the background color.
495
496 2011-01-24  Dan Bernstein  <mitz@apple.com>
497
498         Reviewed by John Sullivan.
499
500         WebKit2 version of <rdar://problem/6097826> Mail's cursor does not become a resize cursor when moving mouse from scrolled email to the horizontal splitter
501
502         * UIProcess/API/mac/PageClientImpl.mm:
503         (WebKit::PageClientImpl::setCursor): If the current cursor comes from a cursor rect, do not override it.
504
505 2011-01-24  Balazs Kelemen  <kbalazs@webkit.org>
506
507         Rubber-stamped by Csaba Osztrogonác.
508
509         Typo fix.
510
511         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
512         (WebKit::ProcessLauncher::launchProcess): Move the bracket to the right place.
513
514 2011-01-24  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
515
516         Reviewed by Kenneth Rohde Christiansen.
517
518         [Qt] Remove CleanupHandler by passing file descriptors.
519
520         Deleting files in signal handler of UI process is not a good idea,
521         because the memory where filenames are stored might not be valid
522         after a crash.
523
524         To avoid the need of using signal handlers for cleanup,
525         change following:
526           1) Avoid passing filenames between processes, pass fds
527           2) When mmap'ing files, delete them immediately after
528              opening and mmap'ing them.
529           3) Pass sockets with fds during fork+exec instead of
530              passing them via the filesystem.
531           4) Use mmap'ed files for implementation of SharedMemory.
532              QSharedMemory does not support cleanup correctly.
533
534         Consquences:
535           - Move MappedMemory to SharedMemory, make UpdateChunk use this.
536           - Implement CoreIPC::Attachment using mmaped files.
537           - Send messages using datagram socket. This solution works
538             similiarly to Mach ports on Mac.
539           - Send big messages out-of-line and thus avoid increasing
540             the receive buffer.
541           - Remove MemoryMappedPool and rely on libc/kernel caching
542             of mmapped areas.
543           - Unmap memory areas after use.
544           - When UI process crashes, kill the web process using SIGKILL.
545             This is possible again because cleanup handler is not needed.
546
547         [WK2][Qt] Multiple problems with MemoryMappedPool
548         https://bugs.webkit.org/show_bug.cgi?id=51984
549
550         * Platform/CoreIPC/Attachment.cpp:
551         (CoreIPC::Attachment::Attachment):
552         * Platform/CoreIPC/Attachment.h:
553         (CoreIPC::Attachment::size):
554         (CoreIPC::Attachment::releaseFileDescriptor):
555         (CoreIPC::Attachment::fileDescriptor):
556         * Platform/CoreIPC/Connection.h:
557         * Platform/CoreIPC/qt/ConnectionQt.cpp:
558         (CoreIPC::MessageInfo::MessageInfo):
559         (CoreIPC::MessageInfo::setMessageBodyOOL):
560         (CoreIPC::MessageInfo::isMessageBodyOOL):
561         (CoreIPC::MessageInfo::bodySize):
562         (CoreIPC::MessageInfo::messageID):
563         (CoreIPC::MessageInfo::attachmentCount):
564         (CoreIPC::Connection::platformInitialize):
565         (CoreIPC::Connection::platformInvalidate):
566         (CoreIPC::SocketNotifierDisableGuard::SocketNotifierDisableGuard):
567         (CoreIPC::SocketNotifierDisableGuard::~SocketNotifierDisableGuard):
568         (CoreIPC::Connection::readyReadHandler):
569         (CoreIPC::Connection::open):
570         (CoreIPC::Connection::platformCanSendOutgoingMessages):
571         (CoreIPC::Connection::sendOutgoingMessage):
572         * Platform/SharedMemory.h:
573         * Platform/WorkQueue.h:
574         * Platform/qt/MappedMemoryPool.cpp: Removed.
575         * Platform/qt/MappedMemoryPool.h: Removed.
576         * Platform/qt/SharedMemoryQt.cpp:
577         (WebKit::SharedMemory::Handle::Handle):
578         (WebKit::SharedMemory::Handle::~Handle):
579         (WebKit::SharedMemory::Handle::isNull):
580         (WebKit::SharedMemory::Handle::encode):
581         (WebKit::SharedMemory::Handle::decode):
582         (WebKit::SharedMemory::Handle::releaseToAttachment):
583         (WebKit::SharedMemory::Handle::adoptFromAttachment):
584         (WebKit::SharedMemory::create):
585         (WebKit::accessModeMMap):
586         (WebKit::SharedMemory::~SharedMemory):
587         (WebKit::accessModeFile):
588         (WebKit::SharedMemory::createHandle):
589         * Platform/qt/WorkQueueQt.cpp:
590         (WorkQueue::registerSocketEventHandler):
591         * Shared/qt/UpdateChunk.cpp:
592         (WebKit::UpdateChunk::UpdateChunk):
593         (WebKit::UpdateChunk::~UpdateChunk):
594         (WebKit::UpdateChunk::encode):
595         (WebKit::UpdateChunk::decode):
596         (WebKit::UpdateChunk::createImage):
597         * Shared/qt/UpdateChunk.h:
598         * UIProcess/Launcher/ProcessLauncher.h:
599         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
600         (WebKit::QtWebProcess::QtWebProcess):
601         (WebKit::QtWebProcess::setupChildProcess):
602         (WebKit::ProcessLauncher::launchProcess):
603         (WebKit::ProcessLauncher::platformInvalidate):
604         * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
605         (WebKit::webThreadBody):
606         (WebKit::ThreadLauncher::createWebThread):
607         * WebKit2.pro:
608         * WebProcess/qt/WebProcessMainQt.cpp:
609         (WebKit::WebProcessMainQt):
610
611 2011-01-24  Andras Becsi  <abecsi@webkit.org>
612
613         Reviewed by Csaba Osztrogonác.
614
615         [Qt] Move project files into Source
616         https://bugs.webkit.org/show_bug.cgi?id=52891
617
618         * DerivedSources.pro:
619         * WebKit2.pro:
620         * WebProcess.pro:
621
622 2011-01-23  Damian Kaleta  <dkaleta@apple.com>
623
624         Reviewed by Kevin Decker.
625
626         <rdar://problem/8905171>
627         https://bugs.webkit.org/show_bug.cgi?id=52985 
628
629         * UIProcess/WebPageProxy.cpp:
630         (WebKit::WebPageProxy::scaleWebView): Eliminated early return inside WebPageProxy::scaleWebView, making it 
631         consistent with WebKit1.
632
633 2011-01-23  Alexey Proskuryakov  <ap@apple.com>
634
635         Reviewed by Dan Bernstein.
636
637         https://bugs.webkit.org/show_bug.cgi?id=52968
638         Use a separate NSView for printing
639
640         Also addresses <rdar://problem/8900148> Improper check for 
641         -[NSGraphicsContext currentContextDrawingToScreen]
642
643         * UIProcess/API/mac/WKPrintingView.h: Added.
644         * UIProcess/API/mac/WKPrintingView.mm: Added.
645         (-[WKPrintingView initWithFrameProxy:]):
646         (-[WKPrintingView isFlipped]):
647         (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]):
648         (-[WKPrintingView knowsPageRange:]):
649         (-[WKPrintingView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
650         (-[WKPrintingView drawPageBorderWithSize:]):
651         (-[WKPrintingView _provideTotalScaleFactorForPrintOperation:]):
652         (-[WKPrintingView rectForPage:]):
653         * UIProcess/API/mac/WKView.mm:
654         (-[WKView drawRect:]):
655         (-[WKView canChangeFrameLayout:]):
656         (-[WKView printOperationWithPrintInfo:forFrame:]):
657         * WebKit2.xcodeproj/project.pbxproj:
658         Moved printing code to a separate view, simplifying as appropriate. The view is currently not
659         referenced by anything in WebKit2 directly, being owned by NSPrintOperation.
660
661 2011-01-22  Anders Carlsson  <andersca@apple.com>
662
663         Reviewed by Sam Weinig.
664
665         Transparent windows with compositing WebKit2 content show garbage
666         https://bugs.webkit.org/show_bug.cgi?id=52966
667         <rdar://problem/8765051>
668
669         * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
670         (WebKit::LayerBackedDrawingAreaProxy::paint):
671         If the WKView should draw transparent background, do so.
672
673 2011-01-22  Anders Carlsson  <andersca@apple.com>
674
675         Reviewed by Sam Weinig.
676
677         Add an asynchronous WKPageForceRepaint
678         https://bugs.webkit.org/show_bug.cgi?id=52964
679         <rdar://problem/8898527>
680
681         * UIProcess/API/C/WKPage.cpp:
682         (WKPageForceRepaint):
683         Call WebPageProxy::forceRepaint.
684
685         * UIProcess/API/C/WKPage.h:
686         Add WKPageForceRepaint.
687
688         * UIProcess/GenericCallback.h:
689         Add a "generic" VoidCallback class.
690
691         * UIProcess/WebPageProxy.cpp:
692         (WebKit::WebPageProxy::forceRepaint):
693         Insert the callback in the m_voidCallbacks map and send a forceRepaint message.
694
695         (WebKit::WebPageProxy::voidCallback):
696         Call the right void callback.
697
698         (WebKit::WebPageProxy::processDidCrash):
699         Invalidate m_voidCallbacks.
700
701         * UIProcess/WebPageProxy.messages.in:
702         Add a VoidCallback message.
703
704         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
705         (WebKit::ChunkedUpdateDrawingArea::forceRepaint):
706         Force a repaint.
707
708         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
709         Add forceRepaint.
710
711         * WebProcess/WebPage/WebPage.cpp:
712         (WebKit::WebPage::forceRepaint):
713         Call forceRepaint on the drawing area.
714
715         * WebProcess/WebPage/WebPage.messages.in:
716         Add a ForceRepaint message.
717
718 2011-01-21  Nikolas Zimmermann  <nzimmermann@rim.com>
719
720         Reviewed by Dirk Schulze.
721
722         Introduce FontMetrics abstraction
723         https://bugs.webkit.org/show_bug.cgi?id=51456
724
725         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Use FontMetrics instead of Font to access the metrics.
726         (WebKit::WebPopupMenu::setUpPlatformData):
727
728 2011-01-22  Alexey Proskuryakov  <ap@apple.com>
729
730         Reviewed by Dan Bernstein.
731
732         https://bugs.webkit.org/show_bug.cgi?id=52950
733         Leak in WebPage::drawRectToPDF
734
735         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRectToPDF): Use RetainPtr here, too.
736
737 2011-01-22  Alexey Proskuryakov  <ap@apple.com>
738
739         Reviewed by Dan Bernstein.
740
741         https://bugs.webkit.org/show_bug.cgi?id=52951
742         WebKit2 generates a bad PDF for cross process messaging
743
744         * UIProcess/API/mac/WKView.mm:
745         (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
746         Use a correct offset when flipping.
747
748 2011-01-21  Alexey Proskuryakov  <ap@apple.com>
749
750         Reviewed by Dan Bernstein.
751
752         https://bugs.webkit.org/show_bug.cgi?id=52943
753         Objective-C files should use #import, not #include
754
755         * UIProcess/API/C/WebKit2.h: This is an interesting one, because it's cross-platform, and
756         there is more than one WKView.h.
757
758         * Platform/mac/ModuleMac.mm:
759         * Platform/mac/RunLoopMac.mm:
760         * PluginProcess/mac/PluginControllerProxyMac.mm:
761         * PluginProcess/mac/PluginProcessMac.mm:
762         * PluginProcess/mac/PluginProcessMainMac.mm:
763         * Shared/API/c/mac/WKCertificateInfoMac.mm:
764         * Shared/API/c/mac/WKURLRequestNS.mm:
765         * Shared/API/c/mac/WKURLResponseNS.mm:
766         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
767         * Shared/mac/PlatformCertificateInfo.mm:
768         * Shared/mac/SandboxExtensionMac.mm:
769         * Shared/mac/WebCoreArgumentCodersMac.mm:
770         * Shared/mac/WebMemorySampler.mac.mm:
771         * Shared/mac/WebURLRequestMac.mm:
772         * Shared/mac/WebURLResponseMac.mm:
773         * UIProcess/API/mac/FindIndicatorWindow.mm:
774         * UIProcess/API/mac/WKTextInputWindowController.mm:
775         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
776         * UIProcess/Launcher/mac/ThreadLauncherMac.mm:
777         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
778         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
779         * UIProcess/mac/BackingStoreMac.mm:
780         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
781         * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
782         * UIProcess/mac/TextCheckerMac.mm:
783         * UIProcess/mac/WebContextMac.mm:
784         * UIProcess/mac/WebContextMenuProxyMac.mm:
785         * UIProcess/mac/WebPageProxyMac.mm:
786         * UIProcess/mac/WebPopupMenuProxyMac.mm:
787         * UIProcess/mac/WebPreferencesMac.mm:
788         * WebProcess/Downloads/mac/DownloadMac.mm:
789         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
790         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
791         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
792         * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm:
793         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
794         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
795         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
796         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
797         * WebProcess/WebPage/mac/WebPageMac.mm:
798         * WebProcess/mac/WebProcessMac.mm:
799
800 2011-01-21  Mark Rowe  <mrowe@apple.com>
801
802         Reviewed by Sam Weinig.
803
804         Fix the WebKit2 build with clang.
805
806         * Scripts/webkit2/messages.py: Add some more structs to the list.
807         * UIProcess/DrawingAreaProxy.h: Forward-declare UpdateInfo as a class.
808         * UIProcess/TextChecker.h: Forward-declare TextCheckerState as a struct.
809         * UIProcess/WebPageProxy.h: Forward-declare ContextMenuState as a struct.
810         * UIProcess/mac/TextCheckerMac.mm: Fix the type of the string constants so that they can be passed to
811         functions expecting NSString* without generating warnings.
812         * WebProcess/WebPage/DrawingArea.h: Forward-declare WebPageCreationParameters as a struct.
813         * WebProcess/WebPage/DrawingAreaImpl.h: Forward-declare UpdateInfo as a class.
814         * WebProcess/WebPage/WebPage.cpp:
815         (WebKit::WebPage::getResourceDataFromFrame): Add parens around the assignment in the condition of
816         the if statement to suppress a warning.
817
818 2011-01-21  Brian Weinstein  <bweinstein@apple.com>
819
820         Reviewed by Adam Roben.
821
822         WebKit2: Need API to stop loading a WKFrame
823         https://bugs.webkit.org/show_bug.cgi?id=52925
824
825         * UIProcess/API/C/WKFrame.cpp:
826         (WKFrameStopLoading): Call through to WebFrameProxy::stopLoading.
827         * UIProcess/API/C/WKFrame.h:
828         * UIProcess/WebFrameProxy.cpp:
829         (WebKit::WebFrameProxy::stopLoading): Send a message to the WebProcess to stop loading the frame
830             with the passed in ID.
831         * UIProcess/WebFrameProxy.h:
832         * WebProcess/WebPage/WebPage.cpp:
833         (WebKit::WebPage::stopLoadingFrame): Call stopForUserCancel on the passed-in frame.
834         * WebProcess/WebPage/WebPage.h:
835         * WebProcess/WebPage/WebPage.messages.in: Add StopLoadingFrame.
836
837 2011-01-21  Brady Eidson  <beidson@apple.com>
838
839         Reviewed by Adam Roben.
840
841         <rdar://problem/8894125> and https://bugs.webkit.org/show_bug.cgi?id=52916
842         Expose "suggested filename" for a resource based on its resource response.
843
844         API pieces:
845         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
846         (WKBundleFrameCopySuggestedFilenameForResourceURL):
847         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
848         
849         Implementation:
850         * WebProcess/WebPage/WebFrame.cpp:
851         (WebKit::WebFrame::suggestedFilenameForResourceURL): See if the DocumentLoader has
852           a resource for this URL and, if so, return the response's suggested filename.
853         * WebProcess/WebPage/WebFrame.h:
854
855 2011-01-21  Anders Carlsson  <andersca@apple.com>
856
857         Reviewed by Dan Bernstein.
858
859         DrawingAreaProxyImpl::paint should return the unpainted region
860         https://bugs.webkit.org/show_bug.cgi?id=52918
861
862         * UIProcess/API/mac/WKView.mm:
863         (-[WKView drawRect:]):
864         Add unpaintedRegion parameter.
865
866         * UIProcess/BackingStore.h:
867         (WebKit::BackingStore::size):
868         Add a size getter.
869
870         * UIProcess/DrawingAreaProxyImpl.cpp:
871         (WebKit::DrawingAreaProxyImpl::paint):
872         Initialize the unpainted region to the dirty region, then subtract the painted region.
873
874 2011-01-21  Anders Carlsson  <andersca@apple.com>
875
876         Reviewed by Dan Bernstein and Maciej Stachowiak.
877
878         Fix for <rdar://problem/8896057>
879
880         Give the Web Process access to the PubSub agent.
881
882         * WebProcess/com.apple.WebProcess.sb:
883
884 2011-01-21  Sam Weinig  <sam@webkit.org>
885
886         Reviewed by Anders Carlsson.
887
888         Part 2 of "Cleanup Scrollbar/ScrollbarClient relationship"
889         https://bugs.webkit.org/show_bug.cgi?id=52779
890
891         Rename ScrollbarClient -> ScrollableArea.
892
893         * UIProcess/win/WebPopupMenuProxyWin.cpp:
894         (WebKit::WebPopupMenuProxyWin::onMouseWheel):
895         (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
896         * UIProcess/win/WebPopupMenuProxyWin.h:
897
898 2011-01-21  Adam Roben  <aroben@apple.com>
899
900         Update for WKCACFLayerRenderer -> CACFLayerView rename
901
902         Fixes <http://webkit.org/b/52898> WKCACFLayerRenderer sounds like a render object, but isn't
903
904         Reviewed by Simon Fraser.
905
906         * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Just removed all the unnecessary
907         #includes.
908
909 2011-01-20  Darin Adler  <darin@apple.com>
910
911         Reviewed by Dan Bernstein.
912
913         WebKit2: Implement showModalDialog
914         https://bugs.webkit.org/show_bug.cgi?id=52855
915
916         * Shared/WebPageCreationParameters.h: Added canRunModal.
917
918         * UIProcess/API/C/WKPage.h: Added a runModal function pointer to
919         WKPageUIClient. Also removed a lot of redundant typedefs and added
920         a new one, WKPageCallback, for callbacks without arguments or return
921         values.
922
923         * UIProcess/API/qt/qwkpage.cpp:
924         (QWKPage::QWKPage): Added a runModal function pointer of 0.
925
926         * UIProcess/WebPageProxy.cpp:
927         (WebKit::WebPageProxy::creationParameters): Set canRunModal
928         based on return value of WebUIClient::canRunModal.
929
930         * UIProcess/WebPageProxy.h: Added runModal.
931         Calls WebUIClient::runModal.
932
933         * UIProcess/WebPageProxy.messages.in: Added RunModal message.
934         Also removed the periods from the phrases in the comments
935         as Maciej requested a while back.
936
937         * UIProcess/WebUIClient.cpp:
938         (WebKit::WebUIClient::canRunModal): Added. Returns true or false
939         based on whether a runModal function was supplied in the
940         WKPageUIClient structure.
941         (WebKit::WebUIClient::runModal): Added. Calls the runModal
942         function from the WKPageUIClient structure.
943         * UIProcess/WebUIClient.h: Declared the above functions.
944
945         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
946         (WebKit::WebChromeClient::canRunModal): Call through to WebPage.
947         (WebKit::WebChromeClient::runModal): Ditto.
948
949         * WebProcess/WebPage/WebPage.cpp:
950         (WebKit::WebPage::WebPage): Initialize m_canRunModal based on the
951         creation parameters. Initialize m_isRunningModal to false.
952         (WebKit::WebPage::close): Stop the nested run loop if we are running modal.
953         (WebKit::WebPage::runModal): Send a message to ask the UI process to run
954         modal and then start a nested run loop. It gets stopped when the page is closed.
955         * WebProcess/WebPage/WebPage.h: Defined the canRunModal function
956         and declared the runModal function.
957
958 2011-01-20  Alexey Proskuryakov  <ap@apple.com>
959
960         Reviewed by Darin Adler.
961
962         https://bugs.webkit.org/show_bug.cgi?id=52849
963         Make window.print work with WebKit2
964
965         * UIProcess/API/qt/qwkpage.cpp:
966         (QWKPage::QWKPage):
967         * UIProcess/WebPageProxy.cpp:
968         (WebKit::WebPageProxy::printFrame):
969         * UIProcess/WebPageProxy.h:
970         * UIProcess/WebPageProxy.messages.in:
971         * UIProcess/WebUIClient.cpp:
972         (WebKit::WebUIClient::printFrame):
973         * UIProcess/WebUIClient.h:
974         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
975         (WebKit::WebChromeClient::print):
976         Just pass through deelagte call to a WebKit2 client.
977
978         * UIProcess/API/C/WKPage.h: Also added "Callback" suffix to other printing related function
979         types.
980
981 2011-01-20  Anders Carlsson  <andersca@apple.com>
982
983         Reviewed by Darin Adler.
984
985         Keep track of the latest update timestamp in the backing store
986         https://bugs.webkit.org/show_bug.cgi?id=52848
987
988         * Shared/UpdateInfo.h:
989         (WebKit::UpdateInfo::UpdateInfo):
990         Initialize timestamp to 0.
991
992         * UIProcess/BackingStore.cpp:
993         (WebKit::BackingStore::BackingStore):
994         Initialize m_latestUpdateTimestamp to 0.
995
996         (WebKit::BackingStore::incorporateUpdate):
997         If the update is too old, discard it. Otherwise, create a bitmap
998         and pass it to platformIncorporateUpdate. Finally update the timestamp.
999
1000         * UIProcess/BackingStore.h:
1001         Add m_latestUpdateTimestamp.
1002
1003         * UIProcess/mac/BackingStoreMac.mm:
1004         (WebKit::BackingStore::platformIncorporateUpdate):
1005         Update now that we are already given the shareable bitmap.
1006
1007 2011-01-20  Beth Dakin  <bdakin@apple.com>
1008
1009         Reviewed by Geoffrey Garen.
1010
1011         Fix for <rdar://problem/8890255>
1012
1013         Allow WebKitSystemInterface to draw scrollbars 
1014         when appropriate.
1015         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1016         (InitWebCoreSystemInterface):
1017
1018 2011-01-20  Sam Weinig  <sam@webkit.org>
1019
1020         Reviewed by Dave Hyatt.
1021
1022         Cleanup Scrollbar/ScrollbarClient relationship
1023         https://bugs.webkit.org/show_bug.cgi?id=52779
1024
1025         * UIProcess/win/WebPopupMenuProxyWin.cpp:
1026         (WebKit::WebPopupMenuProxyWin::scrollPosition):
1027         (WebKit::WebPopupMenuProxyWin::setScrollOffset):
1028         (WebKit::WebPopupMenuProxyWin::scrollTo):
1029         (WebKit::WebPopupMenuProxyWin::onMouseWheel):
1030         (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
1031         * UIProcess/win/WebPopupMenuProxyWin.h:
1032         (WebKit::WebPopupMenuProxyWin::verticalScrollbar):
1033
1034 2011-01-20  Anders Carlsson  <andersca@apple.com>
1035
1036         Reviewed by Adam Roben.
1037
1038         Add a timestamp to UpdateInfo
1039         https://bugs.webkit.org/show_bug.cgi?id=52844
1040
1041         * Shared/UpdateInfo.cpp:
1042         (WebKit::UpdateInfo::encode):
1043         (WebKit::UpdateInfo::decode):
1044         * Shared/UpdateInfo.h:
1045         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1046         (WebKit::DrawingAreaImpl::setSize):
1047         (WebKit::DrawingAreaImpl::display):
1048
1049 2011-01-20  Anders Carlsson  <andersca@apple.com>
1050
1051         Reviewed by Beth Dakin.
1052
1053         Add Connection::waitForAndDispatchImmediately
1054         https://bugs.webkit.org/show_bug.cgi?id=52841
1055
1056         * Platform/CoreIPC/Connection.h:
1057         (CoreIPC::Connection::waitForAndDispatchImmediately):
1058
1059 2011-01-20  Kevin Decker  <kdecker@apple.com>
1060
1061         Reviewed by Anders Carlsson.
1062
1063         <rdar://problem/8880689> need a way to obtain the rendered rectangle for box elements
1064         https://bugs.webkit.org/show_bug.cgi?id=52823
1065         
1066         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
1067         (WKBundleNodeHandleGetRenderRect): Added new method that will return a rendered rectangle for box elements
1068         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: Ditto.
1069         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: Ditto.
1070         (WebKit::InjectedBundleNodeHandle::renderRect): Ditto.
1071         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Ditto.
1072
1073 2011-01-20  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
1074
1075         Reviewed by Andreas Kling.
1076
1077         Remove null ptr deref that happens when reattaching to
1078         a new web process.
1079
1080         Implement didRelaunchProcess that sets the drawing area size
1081         after the drawing area is re-instantiated.
1082
1083         [Qt][WK2] Null ptr deref in UI process after web process has crashed
1084         https://bugs.webkit.org/show_bug.cgi?id=52796
1085
1086         * UIProcess/API/qt/qgraphicswkview.cpp:
1087         (QGraphicsWKView::QGraphicsWKView):
1088         * UIProcess/API/qt/qwkpage.cpp:
1089         (QWKPagePrivate::QWKPagePrivate):
1090         (QWKPagePrivate::init):
1091         (QWKPagePrivate::createDrawingAreaProxy):
1092         (QWKPagePrivate::didRelaunchProcess): Reset drawing area size after crash.
1093         * UIProcess/API/qt/qwkpage_p.h:
1094
1095 2011-01-20  Maciej Stachowiak  <mjs@apple.com>
1096
1097         Reviewed by Adam Roben.
1098
1099         WebKitTestRunner needs to support layoutTestController.evaluateScriptInIsolatedWorld
1100         https://bugs.webkit.org/show_bug.cgi?id=42327
1101         
1102         Added a new API call, WKBundleFrameForJavaScriptContext, that gets the WKBundleFrameRef
1103         that corresponds to a JSContextRef (or null if none).
1104
1105         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1106         (WKBundleFrameForJavaScriptContext): Simple wrapper, defers to a WebFrame
1107         static method.
1108         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
1109         * WebProcess/WebPage/WebFrame.cpp:
1110         (WebKit::WebFrame::frameForContext): Follow the maze of twisty pointers.
1111         * WebProcess/WebPage/WebFrame.h:
1112
1113 2011-01-20  Alejandro G. Castro  <alex@igalia.com>
1114
1115         Fix compilation error in GTK WebKit2.
1116
1117         * Platform/CoreIPC/gtk/ConnectionGtk.cpp:
1118         (CoreIPC::readBytesFromSocket):
1119         (CoreIPC::writeBytesToSocket):
1120
1121 2011-01-20  Zoltan Horvath  <zoltan@webkit.org>
1122
1123         Reviewed by Csaba Osztrogonác.
1124
1125         Refactoring of the custom allocation framework
1126         https://bugs.webkit.org/show_bug.cgi?id=49897
1127
1128         Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
1129         The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
1130         equivalent macro implementation at the necessary places.
1131
1132 2011-01-19  Simon Fraser  <simon.fraser@apple.com>
1133
1134         Fix the WebKit2 build.
1135
1136         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
1137         (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
1138
1139 2011-01-19  Brian Weinstein  <bweinstein@apple.com>
1140
1141         Reviewed by Darin Adler.
1142
1143         WebKit2: Need API to get the parent frame of a frame
1144         https://bugs.webkit.org/show_bug.cgi?id=52774
1145         
1146         Add the API to get the parent frame of a frame.
1147
1148         * UIProcess/API/C/WKFrame.cpp:
1149         (WKFrameGetParentFrame):
1150         * UIProcess/API/C/WKFrame.h:
1151
1152 2011-01-19  Enrica Casucci  <enrica@apple.com>
1153
1154         Reviewed by Darin Adler.
1155
1156         WebKit2: add support for drag and drop
1157         https://bugs.webkit.org/show_bug.cgi?id=52343
1158         <rdar://problem/7660558>
1159         
1160         This patch contains the remaining work to support drag and drop on Mac.
1161         I've added a PasteboardTypes class to encapsulate all the pasteboard formats
1162         supported for drag and drop.
1163         In this implementation we don't support the promised types, since I could not
1164         find an efficient way to do this across processes.
1165         The bulk of the patch consists in creating a shareable bitmap for the drag image,
1166         pass its handle to the UI process and create a new NSImage from it to be given to
1167         AppKit for dragging.
1168         I've added the missing implementation of the methods in the drag client to hook
1169         up the placement of the data in the pasteboard.
1170         
1171         * Shared/mac/PasteboardTypes.h: Added.
1172         * Shared/mac/PasteboardTypes.mm: Added.
1173         (WebKit::PasteboardTypes::forEditing):
1174         (WebKit::PasteboardTypes::forURL):
1175         (WebKit::PasteboardTypes::forImages):
1176         (WebKit::PasteboardTypes::forImagesWithArchive):
1177         * UIProcess/API/mac/PageClientImpl.h:
1178         * UIProcess/API/mac/PageClientImpl.mm:
1179         (WebKit::PageClientImpl::setDragImage): Added.
1180         * UIProcess/API/mac/WKView.mm:
1181         (-[WKView _registerDraggedTypes]): Refactored to use the new PasteboardTypes class.
1182         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1183         (-[WKView _setMouseDownEvent:]):
1184         (-[WKView _mouseHandler:]):
1185         (-[WKView mouseDown:]):
1186         (-[WKView mouseUp:]):
1187         (-[WKView mouseDragged:]):
1188         (-[WKView draggedImage:endedAt:operation:]):
1189         (-[WKView draggingEntered:]):
1190         (-[WKView _setDragImage:at:linkDrag:]):
1191         * UIProcess/API/mac/WKViewInternal.h:
1192         * UIProcess/PageClient.h:
1193         * UIProcess/WebPageProxy.cpp:
1194         (WebKit::WebPageProxy::setDragImage):
1195         (WebKit::WebPageProxy::dragEnded):
1196         * UIProcess/WebPageProxy.h:
1197         * UIProcess/WebPageProxy.messages.in:
1198         * WebKit2.xcodeproj/project.pbxproj:
1199         * WebProcess/WebCoreSupport/WebDragClient.cpp:
1200         * WebProcess/WebCoreSupport/WebDragClient.h:
1201         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: Added.
1202         (WebKit::fontFromNSFont):
1203         (WebKit::WebDragClient::startDrag): Added implementation.
1204         (WebKit::WebDragClient::createDragImageForLink): Ditto.
1205         (WebKit::writeURL): Helper function.
1206         (WebKit::writeImage): Helper function.
1207         (WebKit::WebDragClient::declareAndWriteDragImage): Added implementation.
1208         * WebProcess/WebPage/WebPage.cpp:
1209         (WebKit::WebPage::dragEnded):
1210         * WebProcess/WebPage/WebPage.h:
1211         * WebProcess/WebPage/WebPage.messages.in:
1212
1213 2011-01-19  Anders Carlsson  <andersca@apple.com>
1214
1215         Reviewed by Dan Bernstein.
1216
1217         Put the deprecated Connection member functions next to eachother
1218         https://bugs.webkit.org/show_bug.cgi?id=52767
1219
1220         * Platform/CoreIPC/Connection.h:
1221         (CoreIPC::Connection::sendSync):
1222         (CoreIPC::Connection::send):
1223
1224 2011-01-19  Anders Carlsson  <andersca@apple.com>
1225
1226         Reviewed by Sam Weinig.
1227
1228         When resizing, the web process should repaint the page
1229         https://bugs.webkit.org/show_bug.cgi?id=52764
1230
1231         * UIProcess/DrawingAreaProxyImpl.cpp:
1232         (WebKit::DrawingAreaProxyImpl::didSetSize):
1233         Incorporate the update.
1234
1235         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
1236         Return early if the update bounds rect is empty. This can happen if painting is
1237         disabled and we get a DidSetSize message.
1238
1239         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1240         (WebKit::DrawingAreaImpl::setSize):
1241         If painting is disabled, just send back an empty UpdateInfo struct. Otherwise,
1242         paint and fill in the UpdateInfo struct.
1243
1244         (WebKit::DrawingAreaImpl::display):
1245         Assert that painting is not disabled.
1246
1247 2011-01-19  Alexey Proskuryakov  <ap@apple.com>
1248
1249         Reviewed by Darin Adler.
1250
1251         https://bugs.webkit.org/show_bug.cgi?id=52739
1252         Make it possible for a WebKit2 client to print headers and footers
1253
1254         * UIProcess/API/C/WKPage.h:
1255         * UIProcess/WebPageProxy.cpp:
1256         (WebKit::WebPageProxy::headerHeight):
1257         (WebKit::WebPageProxy::footerHeight):
1258         (WebKit::WebPageProxy::drawHeader):
1259         (WebKit::WebPageProxy::drawFooter):
1260         * UIProcess/WebPageProxy.h:
1261         * UIProcess/WebUIClient.cpp:
1262         (WebKit::WebUIClient::headerHeight):
1263         (WebKit::WebUIClient::footerHeight):
1264         (WebKit::WebUIClient::drawHeader):
1265         (WebKit::WebUIClient::drawFooter):
1266         * UIProcess/WebUIClient.h:
1267         Pass UIClient calls through.
1268
1269         * UIProcess/API/mac/WKView.mm:
1270         (currentPrintOperationScale): A helper to extract scale factor from the current NSPrintOperation.
1271         (-[WKView _adjustPrintingMarginsForHeaderAndFooter]): Copied from WebKit1. Change current
1272         print info to account for header and footer height as provided by the client.
1273         (-[WKView knowsPageRange:]): Call -[self _adjustPrintingMarginsForHeaderAndFooter].
1274         (-[WKView drawPageBorderWithSize:]): When AppKit asks to print page border, call the client
1275         to do that. Code adapted form WebKit1.
1276
1277         * UIProcess/API/qt/qwkpage:
1278         (QWKPage::QWKPage): Added zeroes for new WKPageUIClient members to avoid breaking the build.
1279
1280 2011-01-19  Jessie Berlin  <jberlin@apple.com>
1281
1282         Reviewed by Darin Adler.
1283
1284         Crash in WebDatabaseManagerProxy::getDatabaseOrigins when called after the WebProcess has
1285         died at least once
1286         https://bugs.webkit.org/show_bug.cgi?id=52730
1287
1288         WebDatabaseManagerProxy::invalidate was setting m_webContext to 0, and invalidate gets
1289         called in WebContext::processDidClose. However, m_webContext is only set in the
1290         constructor, which is only called from the constructor of WebContext, so attempting to send
1291         a message to any new WebProcess after the first one died was causing a null deref.
1292
1293         This patch moves setting m_webcontext into clearContext and clearContext is only called in
1294         the WebContext destructor.
1295
1296         This patch also adds checks for a valid WebProcessProxy before attempting to send messages to
1297         the WebProcessProxy so that if the WebProcess has died and has not been revived, it does not
1298         attempt to dereference a null WebProcessProxy.
1299
1300         * UIProcess/WebContext.cpp:
1301         (WebKit::WebContext::~WebContext):
1302         Call WebDatabaseManagerProxy::clearContext.
1303         * UIProcess/WebContext.h:
1304         (WebKit::WebContext::hasValidProcess):
1305         Make this method public so that it can be called from WebDatabaseManagerProxy.
1306
1307         * UIProcess/WebDatabaseManagerProxy.cpp:
1308         (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
1309         If there isn't a valid process, invalidate the callback and return early.
1310         (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
1311         Ditto.
1312         (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
1313         If tehre isn't a valid process return early.
1314         (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
1315         Ditto.
1316         (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
1317         Ditto.
1318         (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
1319         Ditto.
1320         (WebKit::WebDatabaseManagerProxy::invalidate):
1321         Move setting m_webContext to 0 from here ...
1322         * UIProcess/WebDatabaseManagerProxy.h:
1323         (WebKit::WebDatabaseManagerProxy::clearContext):
1324         ... to here.
1325
1326 2011-01-19  Anders Carlsson  <andersca@apple.com>
1327
1328         Reviewed by Sam Weinig.
1329
1330         Suspend/resume painting as the WKView visibility changes
1331         https://bugs.webkit.org/show_bug.cgi?id=52738
1332
1333         * UIProcess/DrawingAreaProxy.h:
1334         (WebKit::DrawingAreaProxy::visibilityDidChange):
1335         Add new member function. It should really be pure virtual once setPageIsVisible
1336         is removed.
1337
1338         * UIProcess/DrawingAreaProxyImpl.cpp:
1339         (WebKit::DrawingAreaProxyImpl::visibilityDidChange):
1340         Send SuspendPainting/ResumePainting messages based on whether the view is visible or not.
1341
1342         (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
1343         Make this a stub; it should really be removed.
1344
1345         * UIProcess/WebPageProxy.cpp:
1346         (WebKit::WebPageProxy::viewStateDidChange):
1347         Call visibilityDidChange.
1348
1349         * UIProcess/WebPageProxy.h:
1350         (WebKit::WebPageProxy::isViewVisible):
1351         Add new getter.
1352
1353         * WebProcess/WebPage/DrawingArea.messages.in:
1354         Add SuspendPainting and ResumePainting messages.
1355
1356         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1357         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
1358         Initialize m_isPaintingSuspended.
1359
1360         (WebKit::DrawingAreaImpl::suspendPainting):
1361         Set m_isPaintingSuspended to true and stop the display timer.
1362
1363         (WebKit::DrawingAreaImpl::resumePainting):
1364         Set m_isPaintingSuspended to false.
1365
1366         (WebKit::DrawingAreaImpl::scheduleDisplay):
1367         (WebKit::DrawingAreaImpl::display):
1368         Bail if m_isPaintingSuspended is true.
1369
1370 2011-01-19  Andreas Kling  <kling@webkit.org>
1371
1372         Reviewed by Simon Hausmann.
1373
1374         [Qt][WK2] Implement formatLocalizedString() for Qt.
1375
1376         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1377         (WebKit::formatLocalizedString):
1378
1379 2011-01-19  Chris Marrin  <cmarrin@apple.com>
1380
1381         Reviewed by Simon Fraser.
1382
1383         WK2 - Multiple crashes in PlatformCALayer::replaceSublayer
1384         https://bugs.webkit.org/show_bug.cgi?id=52695
1385
1386         Added a hostingLayer as the parent of the existing drawingLayer.
1387         The hostingLayer is now the root which is passed to the 
1388         remote context. It never changes except to track the size
1389         of the window. The backingLayer is now a child of the 
1390         hostingLayer, which allow it to switch between tiled and
1391         non-tiled.
1392
1393         I also now give back accurate settings for debug borders and
1394         repaint counters.
1395
1396         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
1397         (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
1398         (WebKit::LayerBackedDrawingArea::setSize):
1399         (WebKit::LayerBackedDrawingArea::showDebugBorders):
1400         (WebKit::LayerBackedDrawingArea::showRepaintCounter):
1401         * WebProcess/WebPage/LayerBackedDrawingArea.h:
1402         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
1403         (WebKit::LayerBackedDrawingArea::platformInit):
1404         (WebKit::LayerBackedDrawingArea::attachCompositingContext):
1405         (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
1406
1407 2011-01-19  Anders Carlsson  <andersca@apple.com>
1408
1409         Reviewed by Sam Weinig.
1410
1411         Send a new SetSize message if the size differs from the current size
1412         https://bugs.webkit.org/show_bug.cgi?id=52728
1413
1414         * UIProcess/DrawingAreaProxy.h:
1415         (WebKit::DrawingAreaProxy::didSetSize):
1416         Add UpdateInfo parameter.
1417
1418         * UIProcess/DrawingAreaProxy.messages.in:
1419         Add UpdateInfo parameter to the DidSetSize message.
1420
1421         * UIProcess/DrawingAreaProxyImpl.cpp:
1422         (WebKit::DrawingAreaProxyImpl::didSetSize):
1423         If the view size differs from the current size send another SetSize message.
1424
1425         * UIProcess/DrawingAreaProxyImpl.h:
1426         Add UpdateInfo parameter to didSetSize.
1427
1428         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1429         (WebKit::DrawingAreaImpl::setSize):
1430         The DidSetSize message now takes an UpdateInfo parameter.
1431
1432 2011-01-19  Anders Carlsson  <andersca@apple.com>
1433
1434         Reviewed by Darin Adler.
1435
1436         Throttle sending of SetSize messages
1437         https://bugs.webkit.org/show_bug.cgi?id=52727
1438
1439         * UIProcess/DrawingAreaProxyImpl.cpp:
1440         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
1441         Initialize m_isWaitingForDidSetSize to false.
1442
1443         (WebKit::DrawingAreaProxyImpl::didSetSize):
1444         Null out the backing store.
1445
1446         (WebKit::DrawingAreaProxyImpl::sendSetSize):
1447         If m_isWaitingForDidSetSize is true, do nothing. Otherwise, set m_isWaitingForDidSetSize
1448         to true and send a SetSize message.
1449
1450         * UIProcess/DrawingAreaProxyImpl.h:
1451         Add m_isWaitingForDidSetSize.
1452
1453 2011-01-19  Anders Carlsson  <andersca@apple.com>
1454
1455         Reviewed by Darin Adler.
1456
1457         Pass WebPageCreationParameters to DrawingArea::create
1458         https://bugs.webkit.org/show_bug.cgi?id=52726
1459
1460         * WebProcess/WebPage/DrawingArea.cpp:
1461         (WebKit::DrawingArea::create):
1462         * WebProcess/WebPage/DrawingArea.h:
1463         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1464         (WebKit::DrawingAreaImpl::create):
1465         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
1466         * WebProcess/WebPage/DrawingAreaImpl.h:
1467         * WebProcess/WebPage/WebPage.cpp:
1468         (WebKit::WebPage::WebPage):
1469         (WebKit::WebPage::changeAcceleratedCompositingMode):
1470
1471 2011-01-19  Csaba Osztrogonác  <ossy@webkit.org>
1472
1473         Reviewed by Laszlo Gombos and Tor Arne Vestbø.
1474
1475         [Qt] Remove unnecessary "../Source" from paths
1476         after moving source files into Source is finished.
1477
1478         * DerivedSources.pro:
1479         * WebKit2.pro:
1480
1481 2011-01-18  Maciej Stachowiak  <mjs@apple.com>
1482
1483         Reviewed by Sam Weinig.
1484
1485         WebKitTestRunner should track loading more like DumpRenderTree
1486         https://bugs.webkit.org/show_bug.cgi?id=52692
1487         
1488         Relax the message check in didSaveFrameToPageCache a bit more, since
1489         layout tests were still hitting the old one.
1490
1491         * UIProcess/WebPageProxy.cpp:
1492         (WebKit::isDisconnectedFrame):
1493         (WebKit::WebPageProxy::didSaveFrameToPageCache):
1494
1495 2011-01-18  Brady Eidson  <beidson@apple.com>
1496
1497         Reviewed by Darin Adler.
1498
1499         <rdar://problem/8860833> and https://bugs.webkit.org/show_bug.cgi?id=52599
1500         UIProcess crash in WebPageProxy::reattachToWebProcess when web process crashes with a new tab/window.
1501
1502         * UIProcess/WebPageProxy.cpp:
1503         (WebKit::WebPageProxy::reattachToWebProcessWithItem): Null check item *both* places it is used.
1504
1505 2011-01-18  Brady Eidson  <beidson@apple.com>
1506
1507         Reviewed by Maciej Stachowiak. 
1508
1509         <rdar://problem/8752200> and https://bugs.webkit.org/show_bug.cgi?id=52664
1510         Need WebKit2 API to asynchronously get the resource data for a URL
1511
1512         Rename WKFrameGetMainResourceDataFunction to WKFrameGetResourceDataFunction, and add
1513         new API to get a resource by URL:
1514         * UIProcess/API/C/WKFrame.cpp:
1515         (WKFrameGetMainResourceData):
1516         (WKFrameGetResourceData):
1517         (callGetResourceDataBlockAndDispose):
1518         (WKFrameGetMainResourceData_b):
1519         (WKFrameGetResourceData_b):
1520         * UIProcess/API/C/WKFrame.h:
1521
1522         Implement the new API in the UIProcess side:
1523         * UIProcess/WebFrameProxy.cpp:
1524         (WebKit::WebFrameProxy::getResourceData):
1525         * UIProcess/WebFrameProxy.h:
1526         * UIProcess/WebPageProxy.cpp:
1527         (WebKit::WebPageProxy::getResourceDataFromFrame):
1528         * UIProcess/WebPageProxy.h:
1529
1530         Have the WebProcess get the data and call back to the UIProcess:
1531         * WebProcess/WebPage/WebPage.cpp:
1532         (WebKit::WebPage::getResourceDataFromFrame):
1533         * WebProcess/WebPage/WebPage.h:
1534         * WebProcess/WebPage/WebPage.messages.in:
1535
1536 2011-01-18  Anders Carlsson  <andersca@apple.com>
1537
1538         Reviewed by Dan Bernstein.
1539
1540         Make PageClientImpl::scrollView do hardware blitting
1541         https://bugs.webkit.org/show_bug.cgi?id=52689
1542
1543         * UIProcess/API/mac/PageClientImpl.mm:
1544         (WebKit::PageClientImpl::scrollView):
1545         Clip the scroll rect and scroll the view.
1546
1547         * UIProcess/DrawingAreaProxyImpl.cpp:
1548         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
1549         Scroll before painting.
1550
1551 2011-01-18  Anders Carlsson  <andersca@apple.com>
1552
1553         Reviewed by Darin Adler.
1554
1555         Artifacts when scrolling with new drawing area
1556         https://bugs.webkit.org/show_bug.cgi?id=52682
1557
1558         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1559         (WebKit::WebChromeClient::scroll):
1560         When scrolling, we want the intersection of the scroll rect and clip rect.
1561
1562 2011-01-18  Anders Carlsson  <andersca@apple.com>
1563
1564         Reviewed by Darin Adler.
1565
1566         Use a CGLayer for the backing store when possible
1567         https://bugs.webkit.org/show_bug.cgi?id=52679
1568
1569         * UIProcess/mac/BackingStoreMac.mm:
1570         (WebKit::BackingStore::paint):
1571         If there is a layer, paint it into the given context.
1572
1573         (WebKit::BackingStore::backingStoreContext):
1574         If we can get the containing window graphics context, use it to create a 
1575         CGLayer that we'll use for the backing store.
1576
1577         (WebKit::BackingStore::scroll):
1578         Paint the layer into itself.
1579
1580         * UIProcess/mac/WebPageProxyMac.mm:
1581         (WebKit::WebPageProxy::containingWindowGraphicsContext):
1582         Call the page client.
1583
1584 2011-01-18  Anders Carlsson  <andersca@apple.com>
1585
1586         Reviewed by Dan Bernstein.
1587
1588         Pass the web page proxy to BackingStore::create
1589         https://bugs.webkit.org/show_bug.cgi?id=52673
1590
1591         * UIProcess/BackingStore.cpp:
1592         (WebKit::BackingStore::create):
1593         Add WebPageProxy parameter.
1594     
1595         (WebKit::BackingStore::BackingStore):
1596         Add WebPageProxy parameter.
1597
1598         * UIProcess/BackingStore.h:
1599         Add WebPageProxy member variable.
1600
1601         * UIProcess/DrawingAreaProxyImpl.cpp:
1602         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
1603         Pass the web page proxy when creating the backing store.
1604
1605         * UIProcess/mac/BackingStoreMac.mm:
1606         (WebKit::BackingStore::backingStoreContext):
1607         Set the default blend mode.
1608
1609 2011-01-18  Anders Carlsson  <andersca@apple.com>
1610
1611         Reviewed by Darin Adler.
1612
1613         Factor code to create the backing store bitmap context out into a new function
1614         https://bugs.webkit.org/show_bug.cgi?id=52670
1615
1616         * UIProcess/BackingStore.h:
1617         * UIProcess/mac/BackingStoreMac.mm:
1618         (WebKit::BackingStore::backingStoreContext):
1619         Create the backing store context.
1620
1621         (WebKit::BackingStore::incorporateUpdate):
1622         Call backingStoreContext.
1623
1624         (WebKit::BackingStore::scroll):
1625         Assert that the context is not null.
1626
1627 2011-01-18  Anders Carlsson  <andersca@apple.com>
1628
1629         Reviewed by Dan Bernstein.
1630
1631         Add PageClientImpl::containingWindowGraphicsContext
1632         https://bugs.webkit.org/show_bug.cgi?id=52666
1633
1634         * UIProcess/API/mac/PageClientImpl.h:
1635         * UIProcess/API/mac/PageClientImpl.mm:
1636         (WebKit::PageClientImpl::containingWindowGraphicsContext):
1637         * UIProcess/PageClient.h:
1638         * UIProcess/WebPageProxy.h:
1639
1640 2011-01-18  Damian Kaleta  <dkaleta@apple.com>
1641
1642         Reviewed by Sam Weinig.
1643
1644         WK2 methods WKPageScaleWebView and WKPageGetViewScaleFactor need to have consistent names
1645         https://bugs.webkit.org/show_bug.cgi?id=52647
1646
1647         * UIProcess/API/C/WKPage.cpp:
1648         (WKPageSetScaleFactor):
1649         (WKPageGetScaleFactor):
1650         * UIProcess/API/C/WKPage.h:
1651
1652 2011-01-18  Anders Carlsson  <andersca@apple.com>
1653
1654         Reviewed by Dan Bernstein.
1655
1656         Ask the web page proxy to scroll the view when needed
1657         https://bugs.webkit.org/show_bug.cgi?id=52665
1658
1659         * UIProcess/DrawingAreaProxyImpl.cpp:
1660         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
1661         * UIProcess/WebPageProxy.cpp:
1662         (WebKit::WebPageProxy::scrollView):
1663         * UIProcess/WebPageProxy.h:
1664
1665 2011-01-18  Anders Carlsson  <andersca@apple.com>
1666
1667         Fix build.
1668
1669         * UIProcess/win/WebView.cpp:
1670         (WebKit::WebView::scrollView):
1671
1672 2011-01-18  Anders Carlsson  <andersca@apple.com>
1673
1674         Reviewed by Sam Weinig.
1675
1676         Add PageClient::scrollView
1677         https://bugs.webkit.org/show_bug.cgi?id=52663
1678
1679         * UIProcess/API/mac/PageClientImpl.h:
1680         * UIProcess/API/mac/PageClientImpl.mm:
1681         (WebKit::PageClientImpl::scrollView):
1682         * UIProcess/API/qt/qwkpage.cpp:
1683         (QWKPagePrivate::scrollView):
1684         * UIProcess/API/qt/qwkpage_p.h:
1685         * UIProcess/PageClient.h:
1686         * UIProcess/win/WebView.cpp:
1687         (WebKit::PageClientImpl::scrollView):
1688         * UIProcess/win/WebView.h:
1689
1690 2011-01-18  Anders Carlsson  <andersca@apple.com>
1691
1692         Reviewed by Sam Weinig.
1693
1694         Rename scrollDelta to scrollOffset everywhere.
1695
1696         * Shared/UpdateInfo.cpp:
1697         (WebKit::UpdateInfo::encode):
1698         (WebKit::UpdateInfo::decode):
1699         * Shared/UpdateInfo.h:
1700         * UIProcess/BackingStore.h:
1701         * UIProcess/mac/BackingStoreMac.mm:
1702         (WebKit::BackingStore::incorporateUpdate):
1703         (WebKit::BackingStore::scroll):
1704         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1705         (WebKit::WebChromeClient::scroll):
1706         (WebKit::WebChromeClient::delegatedScrollRequested):
1707         * WebProcess/WebCoreSupport/WebChromeClient.h:
1708         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1709         (WebKit::ChunkedUpdateDrawingArea::scroll):
1710         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
1711         * WebProcess/WebPage/DrawingArea.h:
1712         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1713         (WebKit::DrawingAreaImpl::scroll):
1714         (WebKit::DrawingAreaImpl::display):
1715         * WebProcess/WebPage/DrawingAreaImpl.h:
1716         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
1717         (WebKit::LayerBackedDrawingArea::scroll):
1718         * WebProcess/WebPage/LayerBackedDrawingArea.h:
1719
1720 2011-01-18  Anders Carlsson  <andersca@apple.com>
1721
1722         Reviewed by Sam Weinig.
1723
1724         Get and paint each individual rect in -[WKView drawRect:]
1725         https://bugs.webkit.org/show_bug.cgi?id=52660
1726
1727         * UIProcess/API/mac/WKView.mm:
1728         (-[WKView drawRect:]):
1729
1730 2011-01-18  Anders Carlsson  <andersca@apple.com>
1731
1732         Reviewed by Darin Adler.
1733
1734         Assertion when loading two URLs in quick succession
1735         https://bugs.webkit.org/show_bug.cgi?id=52649
1736         <rdar://problem/8764645>
1737
1738         If beginLoad is called twice without didStartProvisionalLoad being called in between,
1739         m_pendingProvisionalSandboxExtension would be non-null and an assert would fire.
1740
1741         * WebProcess/WebPage/WebPage.cpp:
1742         (WebKit::WebPage::SandboxExtensionTracker::beginLoad):
1743         Instead of asserting that m_pendingProvisionalSandboxExtension is null, invalidate it
1744         if it is not null, since that's valid.
1745
1746 2011-01-18  Anders Carlsson  <andersca@apple.com>
1747
1748         Reviewed by Sam Weinig.
1749
1750         Implement NPN_PopUpContextMenu
1751         https://bugs.webkit.org/show_bug.cgi?id=52646
1752         <rdar://problem/8735616>
1753
1754         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1755         (WebKit::NPN_PopUpContextMenu):
1756         Call NetscapePlugin::popUpContextMenu.
1757
1758         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1759         (WebKit::NetscapePlugin::NetscapePlugin):
1760         Initialize m_currentMouseEvent.
1761
1762         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1763         Add m_currentMouseEvent.
1764
1765         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1766         (WebKit::NetscapePlugin::popUpContextMenu):
1767         Convert the coordinates from the current mouse event to screen coordinates and call
1768         WKPopupContextMenu.
1769
1770         (WebKit::NetscapePlugin::platformHandleMouseEvent):
1771         Update m_currentMouseEvent.
1772
1773 2011-01-18  Jessie Berlin  <jberlin@apple.com>
1774
1775         Reviewed by Darin Adler.
1776
1777         WebKit2: Do not assert that the provisional and committed URLs cannot be empty/null
1778         https://bugs.webkit.org/show_bug.cgi?id=52641
1779
1780         * UIProcess/WebFrameProxy.cpp:
1781         (WebKit::WebFrameProxy::didStartProvisionalLoad):
1782         (WebKit::WebFrameProxy::didCommitLoad):
1783         (WebKit::WebFrameProxy::didFinishLoad):
1784
1785 2011-01-18  Anders Carlsson  <andersca@apple.com>
1786
1787         Reviewed by Sam Weinig.
1788
1789         ASSERT in plug-in code when going to youtube
1790         https://bugs.webkit.org/show_bug.cgi?id=52638
1791
1792         * PluginProcess/PluginControllerProxy.cpp:
1793         (WebKit::PluginControllerProxy::paintEntirePlugin):
1794         Don't try to paint the plug-in if the plug-in frame is empty.
1795
1796 2011-01-18  Anders Carlsson  <andersca@apple.com>
1797
1798         Reviewed by Dan Bernstein.
1799
1800         Plug-in hosting WebProcess instances appear in Activity Monitor as WebProcess
1801         https://bugs.webkit.org/show_bug.cgi?id=52635
1802         <rdar://problem/8731337>
1803
1804         * PluginProcess/PluginProcess.cpp:
1805         (WebKit::PluginProcess::initialize):
1806         Call platformInitialize.
1807
1808         * PluginProcess/PluginProcess.h:
1809         Add platformInitialize.
1810
1811         * PluginProcess/mac/PluginProcessMac.mm:
1812         (WebKit::PluginProcess::platformInitialize):
1813         Set the compositing render server port and the visible application name.
1814
1815         * Shared/Plugins/PluginProcessCreationParameters.cpp:
1816         (WebKit::PluginProcessCreationParameters::encode):
1817         (WebKit::PluginProcessCreationParameters::decode):
1818         Encode/decode the parent process name.
1819
1820         * Shared/Plugins/PluginProcessCreationParameters.h:
1821         Add parentProcessName.
1822
1823         * Shared/WebProcessCreationParameters.cpp:
1824         (WebKit::WebProcessCreationParameters::encode):
1825         (WebKit::WebProcessCreationParameters::decode):
1826         Encode/decode the parent process name.
1827
1828         * Shared/WebProcessCreationParameters.h:
1829         Add parentProcessName.
1830
1831         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1832         (WebKit::ProcessLauncher::launchProcess):
1833         Don't pass the parent process name here.
1834
1835         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1836         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
1837         Set the visible name.
1838
1839         * UIProcess/mac/WebContextMac.mm:
1840         (WebKit::WebContext::platformInitializeWebProcess):
1841         Pass along the parent process name.
1842
1843         * WebProcess/mac/WebProcessMac.mm:
1844         (WebKit::WebProcess::platformInitializeWebProcess):
1845         Set the visible name.
1846
1847         * WebProcess/mac/WebProcessMainMac.mm:
1848         (WebKit::WebProcessMain):
1849         Don't set the visible name here. It's done in platformInitializeWebProcess.
1850
1851 2011-01-18  Balazs Kelemen  <kbalazs@webkit.org>
1852
1853         Reviewed by Csaba Osztrogonác.
1854
1855         [Qt][WK2] Not implemented warnings should not break layout tests
1856         https://bugs.webkit.org/show_bug.cgi?id=52616
1857
1858         * WebKit2Prefix.h: Define DISABLE_NOT_IMPLEMENTED_WARNINGS on Qt.
1859
1860 2011-01-17  Jon Honeycutt  <jhoneycutt@apple.com>
1861
1862         Windows build fix. Unreviewed.
1863
1864         * Shared/PrintInfo.cpp:
1865         Use #include, not #import.
1866
1867 2011-01-17  Alexey Proskuryakov  <ap@apple.com>
1868
1869         Actually wrote a FIXME promised for a review comment.
1870
1871         * UIProcess/API/mac/WKView.mm:
1872         (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
1873
1874 2011-01-17  Alexey Proskuryakov  <ap@apple.com>
1875
1876         Reviewed by Anders Carlsson and Darin Adler.
1877
1878         https://bugs.webkit.org/show_bug.cgi?id=52595
1879         Make basic printing work in WebKit2
1880
1881         * Shared/WebPreferencesStore.h:
1882         * UIProcess/API/C/WKPreferences.cpp:
1883         (WKPreferencesSetShouldPrintBackgrounds):
1884         (WKPreferencesGetShouldPrintBackgrounds):
1885         * UIProcess/API/C/WKPreferences.h:
1886         Implement a preference for printing backgrounds.
1887
1888         * Shared/PrintInfo.cpp: Added.
1889         (WebKit::PrintInfo::encode):
1890         (WebKit::PrintInfo::decode):
1891         * Shared/PrintInfo.h: Added.
1892         * Shared/mac/PrintInfoMac.mm: Added.
1893         (WebKit::PrintInfo::PrintInfo):
1894         A new class for passing page setup information down to the web process.
1895
1896         * WebKit2.xcodeproj/project.pbxproj:
1897         * GNUmakefile.am:
1898         * WebKit2.pro:
1899         * win/WebKit2.vcproj:
1900         Added PrintInfo.
1901
1902         * Scripts/webkit2/messages.py: Added PrintInfo.h to a list of structs.
1903
1904         * UIProcess/API/mac/WKView.mm:
1905         (WKViewData): Cache page count and geometry.
1906         (WebFrameWrapper): Added a wrapper class for adding a WebFrameProxy to an NSDictionary.
1907         (-[WKView drawRect:]): Added logging.
1908         (setFrameBeingPrinted): Store a frame into NSPrintOperation's NSPrintInfo, so that all 
1909         methods invoked for this operation would know what's being printed.
1910         (frameBeingPrinted): Retrieve this data.
1911         (-[WKView printOperationWithPrintInfo:forFrame:]): Create a print operation that's appropriate
1912         for the frame.
1913         (-[WKView knowsPageRange:]): Ask the web process.
1914         (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
1915         Take over printing, because I couldn't make drawRect: work correctly with WebKit custom fit
1916         to page implementation.
1917         (-[WKView _provideTotalScaleFactorForPrintOperation:]): Help AppKit clip correctly.
1918         (-[WKView rectForPage:]): Return a pre-calculated rect.
1919
1920         * UIProcess/WebPageProxy.h: Added m_isInPrintingMode to track whether the web page is in
1921         printing mode. The UI process controls that.
1922
1923         * UIProcess/WebPageProxy.cpp:
1924         (WebKit::WebPageProxy::WebPageProxy): Initialize m_isInPrintingMode.
1925         (WebKit::WebPageProxy::beginPrinting): Change printing mode in web process if the value changes.
1926         (WebKit::WebPageProxy::endPrinting): Ditto.
1927         (WebKit::WebPageProxy::computePagesForPrinting): Ask the web process about output page geometry.
1928         (WebKit::WebPageProxy::drawRectToPDF): Ask the web process about printed page data.
1929
1930         * WebProcess/WebPage/WebPage.cpp:
1931         (WebKit::WebPage::close): Delete m_printContext while there is still a Frame pointer.
1932         (WebKit::WebPage::updatePreferences): Pass through ShouldPrintBackgrounds.
1933         (WebKit::WebPage::beginPrinting): Switch into printing mode (or update parameters if we're
1934         already in printing mode).
1935         (WebKit::WebPage::endPrinting): Delete m_printContext, implicitly calling end().
1936         (WebKit::WebPage::computePagesForPrinting): Make sure that we're in printing mode, and
1937         copmute page rects.
1938         (WebKit::WebPage::drawRectToPDF): Added a CG specific function to create a PDF document out
1939         of a page rect. It should really work for onscreen content, but we only need it for printing.
1940
1941         * WebProcess/WebPage/WebPage.h:
1942
1943         * WebProcess/WebPage/WebPage.messages.in: Added BeginPrinting, EndPrinting,
1944         ComputePagesForPrinting and DrawRectToPDF.
1945
1946 2011-01-17  Tony Gentilcore  <tonyg@chromium.org>
1947
1948         Reviewed by Alexey Proskuryakov.
1949
1950         Fix some headers with missing or misspelled #ifndef guards
1951         https://bugs.webkit.org/show_bug.cgi?id=52545
1952
1953         * Shared/UserMessageCoders.h:
1954         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
1955         * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
1956         * WebProcess/WebProcessMain.h:
1957
1958 2011-01-17  Alexey Proskuryakov  <ap@apple.com>
1959
1960         Build fix.
1961
1962         * Platform/Logging.cpp:
1963
1964 2011-01-17  Alexey Proskuryakov  <ap@apple.com>
1965
1966         Reviewed by Dan Bernstein.
1967
1968         https://bugs.webkit.org/show_bug.cgi?id=52592
1969         Add a logging channel for WKView
1970
1971         * Platform/Logging.cpp:
1972         * Platform/Logging.h:
1973
1974 2011-01-17  Anders Carlsson  <andersca@apple.com>
1975
1976         Reviewed by Sam Weinig.
1977
1978         Factor bitmap context drawing code out into a shared function
1979         https://bugs.webkit.org/show_bug.cgi?id=52589
1980
1981         * Platform/cg/CGUtilities.h: Added.
1982         * Platform/cg/CGUtilities.cpp: Added.
1983         (WebKit::paintBitmapContext):
1984         New function that will paint a bitmap context into a CGContext.
1985
1986         * Shared/cg/ShareableBitmapCG.cpp:
1987         (WebKit::ShareableBitmap::paint):
1988         Use paintBitmapContext.
1989
1990         * UIProcess/mac/BackingStoreMac.mm:
1991         (WebKit::BackingStore::paint):
1992         (WebKit::BackingStore::scroll):
1993         Use paintBitmapContext.
1994
1995         * WebKit2.xcodeproj/project.pbxproj:
1996         * win/WebKit2.vcproj:
1997         * win/WebKit2Common.vsprops:
1998         Add CGUtilities.{cpp|h}.
1999
2000 2011-01-17  Dan Bernstein  <mitz@apple.com>
2001
2002         Rubber-stamped by Mark Rowe.
2003
2004         Update xcodeproj svn:ignore to include xcuserdata.
2005
2006         * WebKit2.xcodeproj: Modified property svn:ignore.
2007
2008 2011-01-17  Alexey Proskuryakov  <ap@apple.com>
2009
2010         Fixing a typo from a bad merge.
2011
2012         * UIProcess/API/mac/WKView.mm: (-[WKView canChangeFrameLayout:]):
2013
2014 2011-01-17  Alexey Proskuryakov  <ap@apple.com>
2015
2016         Reviewed by John Sullivan.
2017
2018         https://bugs.webkit.org/show_bug.cgi?id=52590
2019         Should pass a frame into -[WKView canPrintHeadersAndFooters]
2020
2021         * UIProcess/API/mac/WKView.h:
2022         * UIProcess/API/mac/WKView.mm: (-[WKView canChangeFrameLayout:]): Also, renamed the method
2023         to canChangeFrameLayout.
2024
2025 2011-01-17  Anders Carlsson  <andersca@apple.com>
2026
2027         Reviewed by Sam Weinig.
2028
2029         Implement scrolling support
2030         https://bugs.webkit.org/show_bug.cgi?id=52502
2031
2032         * Shared/UpdateInfo.cpp:
2033         (WebKit::UpdateInfo::encode):
2034         (WebKit::UpdateInfo::decode):
2035         * Shared/UpdateInfo.h:
2036         Add scrollRect and scrollDelta member variables.
2037
2038         * UIProcess/BackingStore.h:
2039         Add scroll member function.
2040
2041         * UIProcess/DrawingAreaProxyImpl.cpp:
2042         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2043         Repaint the scroll rect. Force a display of the view when the update info contains a scroll rect.
2044
2045         * UIProcess/mac/BackingStoreMac.mm:
2046         (WebKit::BackingStore::incorporateUpdate):
2047         Call scroll.
2048
2049         (WebKit::BackingStore::scroll):
2050         Paint the backing store into itself.
2051
2052         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2053         (WebKit::DrawingAreaImpl::display):
2054         Pass the scroll information in the update info.
2055
2056 2011-01-17  Andrey Kosyakov  <caseq@chromium.org>
2057
2058         Unreviewed. Fixed malformed reference to WebKitVSPropsRedirectionDir that broke win build.
2059
2060         * win/WebKit2.vcproj:
2061         * win/WebKit2GeneratedCommon.vsprops:
2062         * win/WebKit2WebProcess.vcproj:
2063
2064 2011-01-17  Pavel Feldman  <pfeldman@chromium.org>
2065
2066         Reviewed by Yury Semikhatsky.
2067
2068         Web Inspector: simplify debugger enabling routine.
2069         https://bugs.webkit.org/show_bug.cgi?id=52472
2070
2071         * WebProcess/WebPage/WebInspector.cpp:
2072         (WebKit::WebInspector::startJavaScriptDebugging):
2073
2074 2011-01-17  Balazs Kelemen  <kbalazs@webkit.org>
2075
2076         Reviewed by Andreas Kling.
2077
2078         [Qt][WK2] Crash due to double destruction of QSharedMemory
2079         https://bugs.webkit.org/show_bug.cgi?id=52569
2080
2081         Avoid deleting the QSharedMemory twice.
2082         * Platform/qt/SharedMemoryQt.cpp:
2083         (WebKit::SharedMemory::~SharedMemory):
2084         * Shared/qt/CleanupHandler.cpp:
2085         Renamed m_inDeleteObjects to m_hasStartedDeleting and
2086         added a getter for it.
2087         (WebKit::CleanupHandler::CleanupHandler):
2088         (WebKit::CleanupHandler::deleteObjects):
2089         * Shared/qt/CleanupHandler.h:
2090         (WebKit::CleanupHandler::unmark):
2091         (WebKit::CleanupHandler::hasStartedDeleting):
2092
2093 2011-01-15  Adam Barth  <abarth@webkit.org>
2094
2095         Rubber-stamped by Eric Seidel.
2096
2097         Move WebKit2 into Source
2098         https://bugs.webkit.org/show_bug.cgi?id=52438
2099
2100         * DerivedSources.pro:
2101         * GNUmakefile.am:
2102         * WebKit2.pro:
2103         * WebProcess.pro:
2104         * win/WebKit2.vcproj:
2105         * win/WebKit2WebProcess.vcproj:
2106
2107 2011-01-14  Yuzo Fujishima  <yuzo@google.com>
2108
2109         Reviewed by Antti Koivisto.
2110
2111         Rename cache() to memoryCache()
2112         https://bugs.webkit.org/show_bug.cgi?id=52433
2113
2114         * WebProcess/WebProcess.cpp:
2115         (WebKit::WebProcess::shutdownIfPossible):
2116         (WebKit::WebProcess::didClose):
2117         * WebProcess/mac/WebProcessMac.mm:
2118         (WebKit::WebProcess::platformSetCacheModel):
2119         * WebProcess/win/WebProcessWin.cpp:
2120         (WebKit::WebProcess::platformSetCacheModel):
2121
2122 2011-01-13  Geoffrey Garen  <ggaren@apple.com>
2123
2124         Reviewed by Oliver Hunt.
2125
2126         Split out a MarkedSpace strategy object from Heap.
2127         https://bugs.webkit.org/show_bug.cgi?id=52421
2128
2129         * Shared/mac/WebMemorySampler.mac.mm:
2130         (WebKit::WebMemorySampler::sampleWebKit): Updated for class move.
2131
2132 2011-01-14  Anders Carlsson  <andersca@apple.com>
2133
2134         Reviewed by Dan Bernstein.
2135
2136         Add a new PageClient::displayView function and expose it on WebPageProxy
2137         https://bugs.webkit.org/show_bug.cgi?id=52500
2138
2139         * UIProcess/API/mac/PageClientImpl.h:
2140         * UIProcess/API/mac/PageClientImpl.mm:
2141         (WebKit::PageClientImpl::displayView):
2142         * UIProcess/API/qt/qwkpage.cpp:
2143         (QWKPagePrivate::displayView):
2144         * UIProcess/API/qt/qwkpage_p.h:
2145         * UIProcess/PageClient.h:
2146         * UIProcess/WebPageProxy.cpp:
2147         (WebKit::WebPageProxy::displayView):
2148         * UIProcess/WebPageProxy.h:
2149         * UIProcess/win/WebView.cpp:
2150         (WebKit::WebView::displayView):
2151         * UIProcess/win/WebView.h:
2152
2153 2011-01-14  Anders Carlsson  <andersca@apple.com>
2154
2155         Reviewed by Sam Weinig.
2156
2157         Implement the "should paint bounds instead of indiviual rects" algorithm from WebKit1
2158         https://bugs.webkit.org/show_bug.cgi?id=52499
2159
2160         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2161         (WebKit::shouldPaintBoundsRect):
2162         Port code from -[WebView _mustDrawUnionedRect:singleRects:count:].
2163
2164         (WebKit::DrawingAreaImpl::display):
2165         If shouldPaintBoundsRect returns true, clear the rects vector and append the bounds rect.
2166
2167 2011-01-14  Brian Weinstein  <bweinstein@apple.com>
2168
2169         Reviewed by Geoff Garen.
2170
2171         ShouldLoadResourceForFrame should use strings, not URLs.
2172         https://bugs.webkit.org/show_bug.cgi?id=52476
2173
2174         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2175         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2176         (WebKit::InjectedBundlePageLoaderClient::shouldLoadResourceForFrame): Pass resourceURL as a string instead of
2177             a URL, and rename from subresourceURL to resourceURL.
2178
2179 2011-01-14  Anders Carlsson  <andersca@apple.com>
2180
2181         Reviewed by Sam Weinig.
2182
2183         Fix for <rdar://problem/8711576> The web process should be able to read resources from the UI process.
2184
2185         Based on a patch by Ivan Krstić. This also makes the NSURLCache path a sandbox parameter.
2186
2187         * Shared/WebProcessCreationParameters.cpp:
2188         (WebKit::WebProcessCreationParameters::encode):
2189         (WebKit::WebProcessCreationParameters::decode):
2190         Encode and decode the uiProcessBundleResourcePath member variable.
2191
2192         * Shared/WebProcessCreationParameters.h:
2193         Add uiProcessBundleResourcePath member variable.
2194
2195         * UIProcess/mac/WebContextMac.mm:
2196         (WebKit::WebContext::platformInitializeWebProcess):
2197         Set the uiProcessBundleResourcePath member variable.
2198
2199         * WebProcess/com.apple.WebProcess.sb:
2200         Allow read-only access to UI_PROCESS_BUNDLE_RESOURCE_DIR and all subdirectories.
2201
2202         * WebProcess/mac/WebProcessMac.mm:
2203         (WebKit::initializeSandbox):
2204         When initializing the sandbox, pass UI_PROCESS_BUNDLE_RESOURCE_DIR.
2205
2206         (WebKit::WebProcess::platformInitializeWebProcess):
2207         Remove the code that would consume a sandbox extension for the url cache path.
2208
2209 2011-01-14  Anders Carlsson  <andersca@apple.com>
2210
2211         Reviewed by Sam Weinig.
2212
2213         Delay initializing the sandbox until we get the InitializeWebProcess message.
2214
2215         * WebProcess/mac/WebProcessMac.mm:
2216         (WebKit::initializeSandbox):
2217         (WebKit::WebProcess::platformInitializeWebProcess):
2218         * WebProcess/mac/WebProcessMainMac.mm:
2219         (WebKit::WebProcessMain):
2220
2221 2011-01-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2222
2223         Reviewed by Kenneth Rohde Christiansen.
2224
2225         Align import/export directives
2226         https://bugs.webkit.org/show_bug.cgi?id=52208
2227
2228         * Shared/API/c/WKBase.h: Align import/export directives with
2229         JavaScriptCore/API/JSBase.h.
2230
2231 2011-01-14  Pavel Feldman  <pfeldman@chromium.org>
2232
2233         Reviewed by Yury Semikhatsky.
2234
2235         Web Inspector: extract InspectorSettings from InspectorState, 
2236         simplify it.
2237         https://bugs.webkit.org/show_bug.cgi?id=52429
2238
2239         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2240
2241 2011-01-13  Enrica Casucci  <enrica@apple.com>
2242
2243         Reviewed by Darin Adler.
2244
2245         WebKit2: Add support for drag and drop
2246         https://bugs.webkit.org/show_bug.cgi?id=52343
2247         <rdar://problem/7660558>
2248                
2249         This patch contains the changes required to support dropping content
2250         in WebKit on the Mac. The DragData class has been extended to provide
2251         additional context from the application (keyboard state, modal windows, etc.)
2252         as well as information of the drag pasteboard being used.
2253         The support for WebKit as drag source will be added with a separate patch.
2254
2255         * Shared/DragControllerAction.h: Added.
2256         * UIProcess/API/mac/WKView.mm:
2257         Added implemention of the methods required to add suport for a drop target.
2258         To maintain asynchronous communication with the WebProcess, we always return
2259         the previous calculated value for the drag operation.
2260         (-[WKView _registerDraggedTypes]):
2261         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
2262         (-[WKView applicationFlags:]):
2263         (-[WKView draggingEntered:]):
2264         (-[WKView draggingUpdated:]):
2265         (-[WKView draggingExited:]):
2266         (-[WKView prepareForDragOperation:]):
2267         (-[WKView performDragOperation:]):
2268         * UIProcess/WebPageProxy.cpp:
2269         (WebKit::WebPageProxy::WebPageProxy):
2270         (WebKit::WebPageProxy::performDragControllerAction):
2271         (WebKit::WebPageProxy::didPerformDragControllerAction):
2272         * UIProcess/WebPageProxy.h:
2273         (WebKit::WebPageProxy::dragOperation):
2274         (WebKit::WebPageProxy::resetDragOperation):
2275         * UIProcess/WebPageProxy.messages.in:
2276         * WebKit2.xcodeproj/project.pbxproj:
2277         * WebProcess/WebCoreSupport/WebDragClient.cpp:
2278         (WebKit::WebDragClient::willPerformDragDestinationAction):
2279         (WebKit::WebDragClient::willPerformDragSourceAction):
2280         (WebKit::WebDragClient::actionMaskForDrag):
2281         (WebKit::WebDragClient::dragSourceActionMaskForPoint):
2282         (WebKit::WebDragClient::startDrag):
2283         * WebProcess/WebPage/WebPage.cpp:
2284         (WebKit::WebPage::performDragControllerAction):
2285         * WebProcess/WebPage/WebPage.h:
2286         * WebProcess/WebPage/WebPage.messages.in:
2287
2288 2011-01-13  Dan Bernstein  <mitz@apple.com>
2289
2290         Reviewed by John Sullivan.
2291
2292         Incorrect assertion in DrawingAreaImpl::scroll()
2293         https://bugs.webkit.org/show_bug.cgi?id=52376
2294
2295         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2296         (WebKit::DrawingAreaImpl::scroll): Changed to take the fast path if the rects have the same area.
2297         This made the assertion valid, but I removed it anyway.
2298
2299 2011-01-12  Balazs Kelemen  <kbalazs@webkit.org>
2300
2301         Unreviewed.
2302
2303         Getting rid of the unused 'viewportSize' argument in QWKPagePrivate:init.
2304         The argument is unused since http://trac.webkit.org/changeset/75468.
2305
2306         * UIProcess/API/qt/qgraphicswkview.cpp:
2307         (QGraphicsWKView::QGraphicsWKView):
2308         * UIProcess/API/qt/qwkpage.cpp:
2309         (QWKPagePrivate::init):
2310         * UIProcess/API/qt/qwkpage_p.h:
2311
2312 2011-01-12  Anders Carlsson  <andersca@apple.com>
2313
2314         Reviewed by Sam Weinig.
2315
2316         Implement DrawingAreaImpl::scroll
2317         https://bugs.webkit.org/show_bug.cgi?id=52346
2318
2319         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2320         (WebKit::DrawingAreaImpl::scroll):
2321         If there is already an active scroll, compute the area of both scroll rects and
2322         invalidate the smallest one. Compute a new dirty region if necessary and also
2323         add the scroll repaint region to the dirty region.
2324
2325         (WebKit::DrawingAreaImpl::display):
2326         Reset the scroll area and scroll delta.
2327
2328         * WebProcess/WebPage/DrawingAreaImpl.h:
2329         Add scroll area and scroll delta member variables.
2330
2331 2011-01-12  Anders Carlsson  <andersca@apple.com>
2332
2333         Reviewed by Dan Bernstein.
2334
2335         Region improvements
2336         https://bugs.webkit.org/show_bug.cgi?id=52344
2337
2338         * Platform/Region.cpp:
2339         (WebKit::Region::Shape::move):
2340         (WebKit::Region::move):
2341         Change Region::move to take an IntSize.
2342
2343         * Platform/Region.h:
2344         (WebKit::intersect):
2345         (WebKit::subtract):
2346         (WebKit::move):
2347         Add convenience functions.
2348
2349 2011-01-12  Ryosuke Niwa  <rniwa@webkit.org>
2350
2351         Unreviewed Qt build fix for r75661
2352
2353         * Shared/WebEvent.h: Don't declare phase() on non-Mac platforms.
2354
2355 2011-01-12  Beth Dakin  <bdakin@apple.com>
2356
2357         Reviewed by Anders Carlsson.
2358
2359         Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309 
2360         Expose fixed layout through WebKit SPI
2361         -and corresponding-
2362         <rdar://problem/8844464>
2363
2364         And now with getters!
2365         * UIProcess/API/C/WKPage.cpp:
2366         (WKPageUseFixedLayout):
2367         (WKPageFixedLayoutSize):
2368         * UIProcess/API/C/WKPage.h:
2369         * UIProcess/WebPageProxy.h:
2370         (WebKit::WebPageProxy::useFixedLayout):
2371         (WebKit::WebPageProxy::fixedLayoutSize):
2372
2373 2011-01-12  Sam Weinig  <sam@webkit.org>
2374
2375         Reviewed by Anders Carlsson.
2376
2377         https://bugs.webkit.org/show_bug.cgi?id=52337
2378         PlatformWheelEvent should know about the scroll phase on the Mac
2379
2380         Add a phase parameter on Mac WebWheelEvent and pipe it down to PlatformWheelEvent.
2381
2382         * Shared/WebEvent.h:
2383         (WebKit::WebWheelEvent::phase):
2384         * Shared/WebEventConversion.cpp:
2385         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
2386         * Shared/WebWheelEvent.cpp:
2387         (WebKit::WebWheelEvent::WebWheelEvent):
2388         (WebKit::WebWheelEvent::encode):
2389         (WebKit::WebWheelEvent::decode):
2390         * Shared/mac/WebEventFactory.mm:
2391         (WebKit::phaseForEvent):
2392         (WebKit::WebEventFactory::createWebWheelEvent):
2393
2394 2011-01-12  Anders Carlsson  <andersca@apple.com>
2395
2396         Reviewed by Sam Weinig.
2397
2398         Get rid of an unneeded parameter from DrawingArea::scroll
2399         https://bugs.webkit.org/show_bug.cgi?id=52336
2400
2401         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2402         (WebKit::WebChromeClient::scroll):
2403         * WebProcess/WebCoreSupport/WebChromeClient.h:
2404         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
2405         (WebKit::ChunkedUpdateDrawingArea::scroll):
2406         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
2407         * WebProcess/WebPage/DrawingArea.h:
2408         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2409         (WebKit::DrawingAreaImpl::scroll):
2410         * WebProcess/WebPage/DrawingAreaImpl.h:
2411         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
2412         (WebKit::LayerBackedDrawingArea::scroll):
2413         * WebProcess/WebPage/LayerBackedDrawingArea.h:
2414         * WebProcess/WebPage/TiledDrawingArea.cpp:
2415         (WebKit::TiledDrawingArea::scroll):
2416         * WebProcess/WebPage/TiledDrawingArea.h:
2417
2418 2011-01-12  Anders Carlsson  <andersca@apple.com>
2419
2420         Reviewed by Sam Weinig.
2421
2422         Get the new drawing area painting to the screen
2423         https://bugs.webkit.org/show_bug.cgi?id=52331
2424
2425         * UIProcess/DrawingAreaProxyImpl.cpp:
2426         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2427         Call setViewNeedsDisplay on all the update rects.
2428
2429         * UIProcess/WebPageProxy.cpp:
2430         (WebKit::WebPageProxy::setViewNeedsDisplay):
2431         Call through to the page client.
2432
2433         (WebKit::WebPageProxy::processDidCrash):
2434         Null out the drawing area proxy.
2435         
2436         * UIProcess/mac/BackingStoreMac.mm:
2437         (WebKit::BackingStore::paint):
2438         Paint.
2439
2440 2011-01-12  Anders Carlsson  <andersca@apple.com>
2441
2442         Reviewed by Sam Weinig.
2443
2444         More work on getting the drawing area proxy to paint
2445         https://bugs.webkit.org/show_bug.cgi?id=52328
2446
2447         * UIProcess/API/mac/WKView.mm:
2448         (-[WKView drawRect:]):
2449         Handle the new drawing area.
2450
2451         * UIProcess/BackingStore.cpp:
2452         (WebKit::BackingStore::BackingStore):
2453         Assert that the size isn't empty.
2454         
2455         * UIProcess/BackingStore.h:
2456         * UIProcess/mac/BackingStoreMac.mm:
2457         (WebKit::BackingStore::incorporateUpdate):
2458         Paint all update rects into the bitmap context.
2459
2460         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2461         (WebKit::DrawingAreaImpl::display):
2462         Create a handle so the shareable bitmap will actually be transferred over.
2463
2464 2011-01-12  Anders Carlsson  <andersca@apple.com>
2465
2466         Fix build.
2467
2468         * UIProcess/DrawingAreaProxyImpl.cpp:
2469         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2470
2471 2011-01-12  Anders Carlsson  <andersca@apple.com>
2472
2473         Reviewed by Sam Weinig.
2474
2475         Begin stubbing out some more BackingStore member functions
2476         https://bugs.webkit.org/show_bug.cgi?id=52323
2477
2478         * UIProcess/BackingStore.cpp:
2479         (WebKit::BackingStore::~BackingStore):
2480         This was accidentally made into a constructor; it should be a destructor.
2481
2482         * UIProcess/DrawingAreaProxyImpl.cpp:
2483         (WebKit::DrawingAreaProxyImpl::paint):
2484         Call the backing store.
2485
2486         (WebKit::DrawingAreaProxyImpl::update):
2487         Incorporate the update.
2488
2489         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2490         Create the backing store if needed and incorporate the update.
2491
2492         * UIProcess/mac/BackingStoreMac.mm: Added.
2493         (WebKit::BackingStore::platformInitialize):
2494         Create a bitmap context.
2495
2496         (WebKit::BackingStore::paint):
2497         (WebKit::BackingStore::incorporateUpdate):
2498         Add stubs.
2499
2500         * WebKit2.xcodeproj/project.pbxproj:
2501         Add BackingStoreMac.mm
2502
2503 2011-01-12  Beth Dakin  <bdakin@apple.com>
2504
2505         Reviewed by Anders Carlsson.
2506
2507         Fix for https://bugs.webkit.org/show_bug.cgi?id=52309 Expose
2508         fixed layout through WebKit SPI
2509         -and corresponding-
2510         <rdar://problem/8844464>
2511
2512         Store useFixedLayout and fixedLayoutSize in the 
2513         WebPageCreationParameters and the WebPageProxy.
2514         * Shared/WebPageCreationParameters.cpp:
2515         (WebKit::WebPageCreationParameters::encode):
2516         (WebKit::WebPageCreationParameters::decode):
2517         * Shared/WebPageCreationParameters.h:
2518         * UIProcess/API/C/WKPage.cpp:
2519         (WKPageSetUseFixedLayout):
2520         (WKPageSetFixedLayoutSize):
2521         * UIProcess/API/C/WKPage.h:
2522         * UIProcess/WebPageProxy.cpp:
2523         (WebKit::WebPageProxy::WebPageProxy):
2524         (WebKit::WebPageProxy::setUseFixedLayout):
2525         (WebKit::WebPageProxy::setFixedLayoutSize):
2526         (WebKit::WebPageProxy::creationParameters):
2527         * UIProcess/WebPageProxy.h:
2528         * WebProcess/WebPage/WebPage.cpp:
2529         (WebKit::WebPage::setUseFixedLayout):
2530         (WebKit::WebPage::setFixedLayoutSize):
2531         * WebProcess/WebPage/WebPage.h:
2532         * WebProcess/WebPage/WebPage.messages.in:
2533
2534 2011-01-12  Anders Carlsson  <andersca@apple.com>
2535
2536         Reviewed by Beth Dakin.
2537
2538         Add BackingStore class
2539         https://bugs.webkit.org/show_bug.cgi?id=52318
2540
2541         * UIProcess/BackingStore.cpp: Added.
2542         (WebKit::BackingStore::create):
2543         (WebKit::BackingStore::BackingStore):
2544         * UIProcess/BackingStore.h: Added.
2545         * WebKit2.xcodeproj/project.pbxproj:
2546
2547 2011-01-12  Brady Eidson  <beidson@apple.com>
2548
2549         Reviewed by Sam Weinig.
2550
2551         <rdar://problem/8837307>, <rdar://problem/8637038>, and https://bugs.webkit.org/show_bug.cgi?id=52248
2552         Back/forward list recovery after a WebProcess crash is crashy itself.
2553
2554         Add an isEmpty() accessor so the WebProcess knows if it is actually restoring a session:
2555         * Shared/SessionState.cpp:
2556         (WebKit::SessionState::isEmpty):
2557         * Shared/SessionState.h:
2558
2559         Keep track of the highest used itemID so a relaunched WebProcess can later be informed:
2560         * Shared/WebBackForwardListItem.cpp:
2561         (WebKit::WebBackForwardListItem::WebBackForwardListItem):
2562         (WebKit::WebBackForwardListItem::highedUsedItemID):
2563         * Shared/WebBackForwardListItem.h:
2564         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2565         (WebKit::generateHistoryItemID):
2566         (WebKit::WebBackForwardListProxy::setHighestItemIDFromUIProcess):
2567         (WebKit::WebBackForwardListProxy::addItemFromUIProcess): Remove a now-invalid ASSERT, as the UIProcess
2568           now tells the WebProcess that a previous WebProcess created.
2569         * WebProcess/WebPage/WebBackForwardListProxy.h:
2570
2571         Encode/decode data relevant to restoring a session on WebPage creation:
2572         * Shared/WebPageCreationParameters.cpp:
2573         (WebKit::WebPageCreationParameters::encode):
2574         (WebKit::WebPageCreationParameters::decode):
2575         * Shared/WebPageCreationParameters.h:
2576
2577         If the WebProcess has crashed since the last load, change reload and the various back/forward APIs to 
2578         update the current back/forward item (if necessary) then relaunch the process:
2579         * UIProcess/WebPageProxy.cpp:
2580         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
2581         (WebKit::WebPageProxy::reattachToWebProcess): Renamed from "relaunch()" and made private.
2582         (WebKit::WebPageProxy::initializeWebPage):
2583         (WebKit::WebPageProxy::loadURL):
2584         (WebKit::WebPageProxy::loadURLRequest):
2585         (WebKit::WebPageProxy::reload):
2586         (WebKit::WebPageProxy::goForward):
2587         (WebKit::WebPageProxy::goBack):
2588         (WebKit::WebPageProxy::goToBackForwardItem):
2589         (WebKit::WebPageProxy::creationParameters):
2590         * UIProcess/WebPageProxy.h:
2591
2592         Rename "RestoreSession" to "RestoreSessionAndNavigateToCurrentItem"
2593         * WebProcess/WebPage/WebPage.messages.in:
2594         * UIProcess/cf/WebPageProxyCF.cpp:
2595         (WebKit::WebPageProxy::restoreFromSessionStateData):
2596
2597         Restore a session on page creation if the parameters include it:
2598         * WebProcess/WebPage/WebPage.cpp:
2599         (WebKit::WebPage::WebPage): Call restoreSession if session state exists.
2600         (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
2601         (WebKit::WebPage::restoreSession):
2602         * WebProcess/WebPage/WebPage.h:
2603
2604 2011-01-12  Anders Carlsson  <andersca@apple.com>
2605
2606         Reviewed by Sam Weinig.
2607
2608         Send Update and DidUpdate messages
2609         https://bugs.webkit.org/show_bug.cgi?id=52316
2610
2611         * UIProcess/DrawingAreaProxy.h:
2612         (WebKit::DrawingAreaProxy::update):
2613         Add empty stub.
2614
2615         * UIProcess/DrawingAreaProxy.messages.in:
2616         Add Update message.
2617
2618         * UIProcess/DrawingAreaProxyImpl.cpp:
2619         (WebKit::DrawingAreaProxyImpl::update):
2620         Just send back a DidUpdate message.
2621
2622         * WebProcess/WebPage/DrawingArea.h:
2623         (WebKit::DrawingArea::didUpdate):
2624         Add empty stub.
2625
2626         * WebProcess/WebPage/DrawingArea.messages.in:
2627         Add DidUpdate message.
2628
2629         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2630         (WebKit::DrawingAreaImpl::didUpdate):
2631         Call display().
2632
2633         (WebKit::DrawingAreaImpl::display):
2634         Send an Update message.
2635
2636 2011-01-12  Anders Carlsson  <andersca@apple.com>
2637
2638         Reviewed by Sam Weinig.
2639
2640         Make the new drawing area actually draw something
2641         https://bugs.webkit.org/show_bug.cgi?id=52314
2642
2643         * Shared/UpdateInfo.cpp:
2644         (WebKit::UpdateInfo::encode):
2645         (WebKit::UpdateInfo::decode):
2646         Encode and decode newly added fields.
2647
2648         * Shared/UpdateInfo.h:
2649         Add a vector of update rects and a handle for the sharable bitmap.
2650
2651         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2652         (WebKit::DrawingAreaImpl::display):
2653         Get the individual rects from the region and paint them into the shareable bitmap.
2654
2655         * WebProcess/WebPage/WebPage.cpp:
2656         (WebKit::WebPage::mainFrameHasCustomRepresentation):
2657         * WebProcess/WebPage/WebPage.h:
2658         Add helper function.
2659
2660         * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp:
2661         (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
2662         Use helper function.
2663
2664 2011-01-12  Anders Carlsson  <andersca@apple.com>
2665
2666         Reviewed by Sam Weinig.
2667
2668         Add UpdateInfo class
2669         https://bugs.webkit.org/show_bug.cgi?id=52306
2670
2671         * Shared/UpdateInfo.cpp: Added.
2672         (WebKit::UpdateInfo::encode):
2673         (WebKit::UpdateInfo::decode):
2674         * Shared/UpdateInfo.h: Added.
2675         (WebKit::UpdateInfo::UpdateInfo):
2676         * WebKit2.xcodeproj/project.pbxproj:
2677
2678 2011-01-12  Anders Carlsson  <andersca@apple.com>
2679
2680         Reviewed by Sam Weinig.
2681
2682         More work on the new drawing area implementation
2683         https://bugs.webkit.org/show_bug.cgi?id=52302
2684
2685         * Platform/Region.cpp:
2686         (WebKit::Region::Shape::segments_end):
2687         segments_end could end up returning an iterator that is one element past the Vector data, so
2688         we can't use operator[] since that will assert.
2689
2690         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2691         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2692         Initialize the timer.
2693
2694         (WebKit::DrawingAreaImpl::setNeedsDisplay):
2695         Unite the rect with the dirty region and schedule a display.
2696
2697         (WebKit::DrawingAreaImpl::setSize):
2698         Tell the web page to resize.
2699
2700         (WebKit::DrawingAreaImpl::scheduleDisplay):
2701         Start a display timer if needed.
2702
2703         (WebKit::DrawingAreaImpl::display):
2704         Add a stub.
2705
2706 2011-01-12  Brent Fulgham  <bfulgham@webkit.org>
2707
2708         Unreviewed build fix after r75527.  Rename 'BackingStoreCairo.cpp'
2709         to 'ShareableBitmapCairo.cpp' to match VS project changes.
2710
2711         * Shared/cairo/BackingStoreCairo.cpp: Removed.
2712         * Shared/cairo/ShareableBitmapCairo.cpp: Copied from Shared/cairo/BackingStoreCairo.cpp.
2713
2714 2011-01-11  Jeff Miller  <jeffm@apple.com>
2715
2716         Reviewed by John Sullivan.
2717
2718         WebKit2: "Webpages not responding" dialog appears when <select> popup menu is showing
2719         https://bugs.webkit.org/show_bug.cgi?id=52242
2720
2721         * UIProcess/WebPageProxy.cpp:
2722         (WebKit::WebPageProxy::showPopupMenu):
2723         On Windows, stop the responsiveness timer before calling showPopupMenu().
2724
2725 2011-01-11  Maciej Stachowiak  <mjs@apple.com>
2726
2727         Reviewed by Anders Carlsson.
2728
2729         UIProcess kills the WebProcess sometimes when detached frames exist
2730         https://bugs.webkit.org/show_bug.cgi?id=52227
2731
2732         * UIProcess/WebPageProxy.cpp:
2733         (WebKit::WebPageProxy::didSaveFrameToPageCache): Don't consider the message invalid
2734         if it came in for a detached frame.
2735
2736 2011-01-11  Anders Carlsson  <andersca@apple.com>
2737
2738         Build fix.
2739
2740         * WebKit2.xcodeproj/project.pbxproj:
2741
2742 2011-01-11  Anders Carlsson  <andersca@apple.com>
2743
2744         Reviewed by Sam Weinig.
2745
2746         Add a Region class which represents a graphical region
2747         https://bugs.webkit.org/show_bug.cgi?id=52255
2748
2749         * Platform/Region.cpp: Added.
2750         (WebKit::Region::Region):
2751         (WebKit::Region::rects):
2752         (WebKit::Region::Shape::Shape):
2753         (WebKit::Region::Shape::appendSpan):
2754         (WebKit::Region::Shape::canCoalesce):
2755         (WebKit::Region::Shape::appendSpans):
2756         (WebKit::Region::Shape::appendSegment):
2757         (WebKit::Region::Shape::spans_begin):
2758         (WebKit::Region::Shape::spans_end):
2759         (WebKit::Region::Shape::segments_begin):
2760         (WebKit::Region::Shape::segments_end):
2761         (WebKit::Region::Shape::dump):
2762         (WebKit::Region::Shape::bounds):
2763         (WebKit::Region::Shape::move):
2764         (WebKit::Region::Shape::swap):
2765         (WebKit::Region::Shape::shapeOperation):
2766         (WebKit::Region::Shape::UnionOperation::trySimpleOperation):
2767         (WebKit::Region::Shape::unionShapes):
2768         (WebKit::Region::Shape::IntersectOperation::trySimpleOperation):
2769         (WebKit::Region::Shape::intersectShapes):
2770         (WebKit::Region::Shape::SubtractOperation::trySimpleOperation):
2771         (WebKit::Region::Shape::subtractShapes):
2772         (WebKit::Region::dump):
2773         (WebKit::Region::intersect):
2774         (WebKit::Region::unite):
2775         (WebKit::Region::subtract):
2776         (WebKit::Region::move):
2777         * Platform/Region.h: Added.
2778         (WebKit::Region::bounds):
2779         (WebKit::Region::isEmpty):
2780         (WebKit::Region::Span::Span):
2781         (WebKit::Region::Shape::isEmpty):
2782         * WebKit2.xcodeproj/project.pbxproj:
2783
2784 2011-01-11  Anders Carlsson  <andersca@apple.com>
2785
2786         Reviewed by Darin Adler.
2787
2788         Add DidSetSize message
2789         https://bugs.webkit.org/show_bug.cgi?id=52254
2790
2791         * DerivedSources.make:
2792         Add DrawingAReaProxy.messages.in.
2793
2794         * Platform/CoreIPC/MessageID.h:
2795         Add DrawingAreaProxy message class.
2796
2797         * UIProcess/DrawingAreaProxy.h:
2798         (WebKit::DrawingAreaProxy::didSetSize):
2799         Add CoreIPC message handler function.
2800
2801         * UIProcess/DrawingAreaProxy.messages.in: Added.
2802
2803         * UIProcess/DrawingAreaProxyImpl.cpp:
2804         (WebKit::DrawingAreaProxyImpl::didSetSize):
2805         Add stub.
2806
2807         * UIProcess/WebPageProxy.cpp:
2808         (WebKit::WebPageProxy::didReceiveMessage):
2809         Handle DrawingAreaProxy messages.
2810
2811         * WebKit2.xcodeproj/project.pbxproj:
2812         Add new files.
2813
2814         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2815         (WebKit::DrawingAreaImpl::setSize):
2816         Send a DidSetSize message for now.
2817
2818 2011-01-11  Sam Weinig  <sam@webkit.org>
2819
2820         Reviewed by Anders Carlsson.
2821
2822         Fix spelling mistake. Sharable -> Shareable.
2823
2824         * Shared/API/c/WKImage.h:
2825         * Shared/API/c/WKSharedAPICast.h:
2826         (WebKit::toImageOptions):
2827         * Shared/ImageOptions.h:
2828         * Shared/WebImage.cpp:
2829         (WebKit::WebImage::create):
2830
2831 2011-01-11  Anders Carlsson  <andersca@apple.com>
2832
2833         Reviewed by Sam Weinig.
2834
2835         Add SetSize message
2836         https://bugs.webkit.org/show_bug.cgi?id=52247
2837
2838         * DerivedSources.make:
2839         Add DrawingArea.messages.in
2840
2841         * Platform/CoreIPC/MessageID.h:
2842         Add DrawingArea message class.
2843
2844         * UIProcess/DrawingAreaProxyImpl.cpp:
2845         (WebKit::DrawingAreaProxyImpl::sizeDidChange):
2846         Call sendSetSize.
2847
2848         (WebKit::DrawingAreaProxyImpl::sendSetSize):
2849         Send a SetSize message.
2850
2851         * UIProcess/DrawingAreaProxyImpl.h:
2852         Add setSize override.
2853
2854         * WebKit2.xcodeproj/project.pbxproj:
2855         Add new files.
2856
2857         * WebProcess/WebPage/DrawingArea.h:
2858         (WebKit::DrawingArea::setSize):
2859         Add setSize member function.
2860
2861         * WebProcess/WebPage/DrawingArea.messages.in: Added.
2862
2863         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2864         * WebProcess/WebPage/DrawingAreaImpl.h:
2865         Add setSize.
2866
2867         * WebProcess/WebPage/WebPage.cpp:
2868         (WebKit::WebPage::didReceiveMessage):
2869         Handle drawing area messages.
2870
2871 2011-01-11  Anders Carlsson  <andersca@apple.com>
2872
2873         Reviewed by Sam Weinig.
2874
2875         Replace ASSERTs with FIXMEs.
2876
2877         * UIProcess/DrawingAreaProxyImpl.cpp:
2878         (WebKit::DrawingAreaProxyImpl::sizeDidChange):
2879         (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
2880
2881 2011-01-11  Anders Carlsson  <andersca@apple.com>
2882
2883         Reviewed by Sam Weinig.
2884
2885         Add DrawingAreaImpl skeleton class
2886         https://bugs.webkit.org/show_bug.cgi?id=52246
2887
2888         * UIProcess/API/mac/WKView.mm:
2889         (useNewDrawingArea):
2890         New function which controls which drawing area to use, through an environment variable.
2891
2892         (-[WKView drawRect:]):
2893         Bail if we're using the new drawing area (for now).
2894
2895         (-[WKView WebKit::]):
2896         Create a DrawingAreaProxyImpl when asked to.
2897
2898         * WebKit2.xcodeproj/project.pbxproj:
2899         Add new files.
2900
2901         * WebProcess/WebPage/DrawingArea.cpp:
2902         (WebKit::DrawingArea::create):
2903         Create a DrawingAreaImpl when asked to.
2904
2905         * WebProcess/WebPage/DrawingAreaImpl.cpp: Added.
2906         * WebProcess/WebPage/DrawingAreaImpl.h: Added.
2907         Add DrawingAreaImpl class.
2908
2909 2011-01-11  Anders Carlsson  <andersca@apple.com>
2910
2911         Reviewed by Sam Weinig.
2912
2913         Add Mac-only DrawingAreaProxyImpl class skeleton
2914         https://bugs.webkit.org/show_bug.cgi?id=52243
2915
2916         This is the proxy side of a new drawing area implementation. This is Mac only for now
2917         while the design is being fleshed out.
2918
2919         * Shared/DrawingAreaInfo.h:
2920         * UIProcess/API/mac/WKView.mm:
2921         (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
2922         * UIProcess/DrawingAreaProxyImpl.cpp: Added.
2923         (WebKit::DrawingAreaProxyImpl::create):
2924         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2925         (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl):
2926         (WebKit::DrawingAreaProxyImpl::didReceiveMessage):
2927         (WebKit::DrawingAreaProxyImpl::didReceiveSyncMessage):
2928         (WebKit::DrawingAreaProxyImpl::paint):
2929         (WebKit::DrawingAreaProxyImpl::sizeDidChange):
2930         (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
2931         (WebKit::DrawingAreaProxyImpl::attachCompositingContext):
2932         (WebKit::DrawingAreaProxyImpl::detachCompositingContext):
2933         * UIProcess/DrawingAreaProxyImpl.h: Added.
2934         * WebKit2.xcodeproj/project.pbxproj:
2935         * WebProcess/WebPage/DrawingArea.cpp:
2936         (WebKit::DrawingArea::create):
2937
2938 2011-01-11  Anders Carlsson  <andersca@apple.com>
2939
2940         Fix Windows build.
2941
2942         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
2943         (WebKit::WebPopupMenu::setUpPlatformData):
2944
2945 2011-01-11  Anders Carlsson  <andersca@apple.com>
2946
2947         Reviewed by Sam Weinig.
2948
2949         Rename ShareableBitmap::createSharable to createShareable
2950         https://bugs.webkit.org/show_bug.cgi?id=52234
2951
2952         * Shared/ShareableBitmap.cpp:
2953         (WebKit::ShareableBitmap::createShareable):
2954         * Shared/ShareableBitmap.h:
2955         * Shared/WebImage.cpp:
2956         (WebKit::WebImage::create):
2957         * WebProcess/Plugins/PluginProxy.cpp:
2958         (WebKit::PluginProxy::geometryDidChange):
2959         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
2960         (WebKit::WebPopupMenu::setUpPlatformData):
2961         * WebProcess/WebPage/FindController.cpp:
2962         (WebKit::FindController::updateFindIndicator):
2963
2964 2011-01-11  Anders Carlsson  <andersca@apple.com>
2965
2966         Reviewed by Sam Weinig.
2967
2968         Rename BackingStore to ShareableBitmap
2969         https://bugs.webkit.org/show_bug.cgi?id=52228
2970
2971         * GNUmakefile.am:
2972         * PluginProcess/PluginControllerProxy.cpp:
2973         (WebKit::PluginControllerProxy::geometryDidChange):
2974         * PluginProcess/PluginControllerProxy.h:
2975         * Shared/API/c/cg/WKImageCG.cpp:
2976         (WKImageCreateCGImage):
2977         * Shared/BackingStore.cpp: Removed.
2978         * Shared/BackingStore.h: Removed.
2979         * Shared/PlatformPopupMenuData.cpp:
2980         (WebKit::PlatformPopupMenuData::decode):
2981         * Shared/PlatformPopupMenuData.h:
2982         * Shared/ShareableBitmap.cpp: Copied from WebKit2/Shared/BackingStore.cpp.
2983         (WebKit::ShareableBitmap::create):
2984         (WebKit::ShareableBitmap::createSharable):
2985         (WebKit::ShareableBitmap::createHandle):
2986         (WebKit::ShareableBitmap::ShareableBitmap):
2987         (WebKit::ShareableBitmap::~ShareableBitmap):
2988         (WebKit::ShareableBitmap::resize):
2989         (WebKit::ShareableBitmap::data):
2990         * Shared/ShareableBitmap.h: Copied from WebKit2/Shared/BackingStore.h.
2991         * Shared/UserMessageCoders.h:
2992         (WebKit::UserMessageEncoder::baseEncode):
2993         (WebKit::UserMessageDecoder::baseDecode):
2994         * Shared/WebImage.cpp:
2995         (WebKit::WebImage::create):
2996         (WebKit::WebImage::WebImage):
2997         (WebKit::WebImage::~WebImage):
2998         (WebKit::WebImage::size):
2999         * Shared/WebImage.h:
3000         (WebKit::WebImage::bitmap):
3001         * Shared/cairo/BackingStoreCairo.cpp:
3002         (WebKit::ShareableBitmap::createGraphicsContext):
3003         (WebKit::ShareableBitmap::paint):
3004         * Shared/cg/BackingStoreCG.cpp: Removed.
3005         * Shared/cg/ShareableBitmapCG.cpp: Copied from WebKit2/Shared/cg/BackingStoreCG.cpp.
3006         (WebKit::ShareableBitmap::createGraphicsContext):
3007         (WebKit::ShareableBitmap::paint):
3008         * Shared/gtk/BackingStoreGtk.cpp: Removed.
3009         * Shared/gtk/ShareableBitmapGtk.cpp: Copied from WebKit2/Shared/gtk/BackingStoreGtk.cpp.
3010         (WebKit::ShareableBitmap::createGraphicsContext):
3011         (WebKit::ShareableBitmap::paint):
3012         * Shared/qt/BackingStoreQt.cpp: Removed.
3013         * Shared/qt/ShareableBitmapQt.cpp: Copied from WebKit2/Shared/qt/BackingStoreQt.cpp.
3014         (WebKit::ShareableBitmap::createGraphicsContext):
3015         (WebKit::ShareableBitmap::paint):
3016         * UIProcess/FindIndicator.cpp:
3017         (WebKit::FindIndicator::create):
3018         (WebKit::FindIndicator::FindIndicator):
3019         * UIProcess/FindIndicator.h:
3020         (WebKit::FindIndicator::contentImage):
3021         * WebKit2.pro:
3022         * WebKit2.xcodeproj/project.pbxproj:
3023         * WebProcess/Plugins/PluginProxy.cpp:
3024         (WebKit::PluginProxy::geometryDidChange):
3025         * WebProcess/Plugins/PluginProxy.h:
3026         * WebProcess/WebPage/FindController.cpp:
3027         (WebKit::FindController::updateFindIndicator):
3028         * WebProcess/WebPage/WebPage.cpp:
3029         (WebKit::WebPage::snapshotInViewCoordinates):
3030         (WebKit::WebPage::snapshotInDocumentCoordinates):
3031         * win/WebKit2.vcproj:
3032
3033 2011-01-11  John Sullivan  <sullivan@apple.com>
3034
3035         Reviewed by Anders Carlsson.
3036
3037         [WKView setFrameSize:] derefs _page->drawingArea() without null check
3038         <https://bugs.webkit.org/show_bug.cgi?id=52231>
3039
3040         * UIProcess/API/mac/WKView.mm:
3041         (-[WKView setFrameSize:]):
3042         Null check drawingArea(). This is OK because if it doesn't exist then it will be
3043         created later with the correct initial size.
3044
3045 2011-01-07  Enrica Casucci  <enrica@apple.com>
3046
3047         Reviewed by Alexey Proskuryakov.
3048
3049         Paste and drag and drop use different code paths to interact with the pasteboard.
3050         https://bugs.webkit.org/show_bug.cgi?id=52093
3051         The change consists in a refactoring of the code to have only one class that
3052         deals with the pasteboard on Mac.
3053
3054         * WebProcess/WebCoreSupport/WebEditorClient.h:
3055         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Added two methods to provide to WebCore functionality
3056         exposed by NSURLExtras.
3057         (WebKit::WebEditorClient::canonicalizeURL):
3058         (WebKit::WebEditorClient::canonicalizeURLString):
3059
3060 2011-01-11  Jessie Berlin  <jberlin@apple.com>
3061
3062         Reviewed by Anders Carlsson and Sam Weinig.
3063
3064         Fix crash on launch on Windows.
3065
3066         * UIProcess/win/WebView.cpp:
3067         (WebKit::WebView::onSizeEvent):
3068         The drawing area is no longer initialized before the WebView is created and the first
3069         onSize is receieved.
3070
3071 2011-01-11  Anders Carlsson  <andersca@apple.com>
3072
3073         Reviewed by Dan Bernstein.
3074
3075         Automatically reinitialize the web page on relaunch
3076         https://bugs.webkit.org/show_bug.cgi?id=52224
3077         <rdar://problem/8765695>
3078
3079         * UIProcess/API/mac/WKView.mm:
3080         (-[WKView _didRelaunchProcess]):
3081         Remove call to reinitializeWebPage.
3082
3083         * UIProcess/WebPageProxy.cpp:
3084         (WebKit::WebPageProxy::relaunch):
3085         Call initializeWebPage().
3086
3087         (WebKit::WebPageProxy::initializeWebPage):
3088         Assert that the web page is valid here.
3089
3090         * UIProcess/WebPageProxy.h:
3091         Remove reinitializeWebPage.
3092
3093         * UIProcess/win/WebView.cpp:
3094         (WebKit::WebView::didRelaunchProcess):
3095         Remove call to reinitializeWebPage.
3096
3097 2011-01-10  Anders Carlsson  <andersca@apple.com>
3098
3099         Reviewed by Sam Weinig.
3100
3101         Pass the view size to the DrawingAreaProxy constructor
3102         https://bugs.webkit.org/show_bug.cgi?id=52189
3103
3104         * UIProcess/DrawingAreaProxy.cpp:
3105         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
3106         * UIProcess/WebPageProxy.cpp:
3107         (WebKit::WebPageProxy::viewSize):
3108         * UIProcess/WebPageProxy.h:
3109
3110 2011-01-11  Sam Weinig  <sam@webkit.org>
3111
3112         Roll r75460 back in with build fix.
3113
3114 2011-01-11  Anders Carlsson  <andersca@apple.com>
3115
3116         Reviewed by Andreas Kling.
3117
3118         Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
3119         https://bugs.webkit.org/show_bug.cgi?id=52184
3120
3121         Qt part made my Balazs Kelemen.
3122
3123         * UIProcess/API/mac/PageClientImpl.h:
3124         * UIProcess/API/mac/PageClientImpl.mm:
3125         (WebKit::PageClientImpl::createDrawingAreaProxy):
3126         Call -[WKView _createDrawingAreaProxy].
3127
3128         (WebKit::PageClientImpl::setViewNeedsDisplay):
3129         Call setNeedsDisplayInRect on the WKView.
3130
3131         * UIProcess/API/mac/WKView.mm:
3132         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
3133         No need to set the drawing area proxy anymore.
3134
3135         (-[WKView _createDrawingAreaProxy]):
3136         Create a chunked update drawing area proxy for now.
3137
3138         * UIProcess/API/qt/qgraphicswkview.cpp:
3139         Added a QGraphicsItem* member that is initialized in init to the accociated view.
3140         Implement the new functions. This is a temporary solution, in the long term the view
3141         and the page should be decoupled.
3142         (QGraphicsWKView::QGraphicsWKView):
3143         * UIProcess/API/qt/qwkpage.cpp:
3144         (QWKPagePrivate::QWKPagePrivate):
3145         (QWKPagePrivate::init):
3146         (QWKPagePrivate::createDrawingAreaProxy):
3147         (QWKPagePrivate::setViewNeedsDisplay):
3148         * UIProcess/API/qt/qwkpage.h:
3149         * UIProcess/API/qt/qwkpage_p.h:
3150         
3151         * UIProcess/PageClient.h:
3152         Add new pure virtual member functions.
3153
3154         * UIProcess/WebPageProxy.cpp:
3155         (WebKit::WebPageProxy::initializeWebPage):
3156         (WebKit::WebPageProxy::reinitializeWebPage):
3157         Set the new drawing area proxy.
3158
3159         * UIProcess/win/WebView.cpp:
3160         (WebKit::WebView::WebView):
3161         No need to set the drawing area proxy anymore.
3162
3163         (WebKit::WebView::createDrawingAreaProxy):
3164         Create a chunked update drawing area proxy for now.
3165
3166         (WebKit::WebView::setViewNeedsDisplay):
3167         Invalidate the window.
3168
3169 2011-01-11  Adam Roben  <aroben@apple.com>
3170
3171         Fix a typo in a comment
3172
3173         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3174
3175 2011-01-10  Sheriff Bot  <webkit.review.bot@gmail.com>
3176
3177         Unreviewed, rolling out r75460.
3178         http://trac.webkit.org/changeset/75460
3179         https://bugs.webkit.org/show_bug.cgi?id=52191
3180
3181         It broke Qt-WK2 build (Requested by Ossy on #webkit).
3182
3183         * Shared/API/c/WKBase.h:
3184         * Shared/APIObject.h:
3185         * UIProcess/API/C/WKAPICast.h:
3186         * UIProcess/API/C/WKGeolocationPermissionRequest.cpp: Removed.
3187         * UIProcess/API/C/WKGeolocationPermissionRequest.h: Removed.
3188         * UIProcess/API/C/WKPage.h:
3189         * UIProcess/API/C/WebKit2.h:
3190         * UIProcess/API/qt/qwkpage.cpp:
3191         (QWKPage::QWKPage):
3192         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: Removed.
3193         * UIProcess/GeolocationPermissionRequestManagerProxy.h: Removed.
3194         * UIProcess/GeolocationPermissionRequestProxy.cpp: Removed.
3195         * UIProcess/GeolocationPermissionRequestProxy.h: Removed.
3196         * UIProcess/WebPageProxy.cpp:
3197         (WebKit::WebPageProxy::WebPageProxy):
3198         (WebKit::WebPageProxy::close):
3199         (WebKit::WebPageProxy::processDidCrash):
3200         * UIProcess/WebPageProxy.h:
3201         * UIProcess/WebPageProxy.messages.in:
3202         * UIProcess/WebUIClient.cpp:
3203         * UIProcess/WebUIClient.h:
3204         * WebKit2.pro:
3205         * WebKit2.xcodeproj/project.pbxproj:
3206         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Removed.
3207         * WebProcess/Geolocation/GeolocationPermissionRequestManager.h: Removed.
3208         * WebProcess/Geolocation/WebGeolocationManager.cpp:
3209         * WebProcess/Geolocation/WebGeolocationManager.h:
3210         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
3211         (WebKit::WebGeolocationClient::requestPermission):
3212         (WebKit::WebGeolocationClient::cancelPermissionRequest):
3213         * WebProcess/WebCoreSupport/WebGeolocationClient.h:
3214         * WebProcess/WebPage/WebPage.cpp:
3215         (WebKit::WebPage::WebPage):
3216         * WebProcess/WebPage/WebPage.h:
3217         * WebProcess/WebPage/WebPage.messages.in:
3218         * win/WebKit2.vcproj:
3219         * win/WebKit2Generated.make:
3220
3221 2011-01-10  Csaba Osztrogonác  <ossy@webkit.org>
3222
3223         Unreviewed, rolling out r75459
3224         http://trac.webkit.org/changeset/75459
3225
3226         Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
3227         https://bugs.webkit.org/show_bug.cgi?id=52184
3228
3229         * UIProcess/API/mac/PageClientImpl.h:
3230         * UIProcess/API/mac/PageClientImpl.mm:
3231         * UIProcess/API/mac/WKView.mm:
3232         * UIProcess/API/mac/WKViewInternal.h:
3233         * UIProcess/API/qt/qwkpage.cpp:
3234         * UIProcess/API/qt/qwkpage_p.h:
3235         * UIProcess/PageClient.h:
3236         * UIProcess/WebPageProxy.cpp:
3237         (WebKit::WebPageProxy::initializeWebPage):
3238         (WebKit::WebPageProxy::reinitializeWebPage):
3239         * UIProcess/win/WebView.cpp:
3240         (WebKit::WebView::WebView):
3241         * UIProcess/win/WebView.h:
3242
3243 2011-01-10  Anders Carlsson  <andersca@apple.com>
3244
3245         Reviewed by Sam Weinig.
3246
3247         Remove size parameter to WebPageProxy::initializeWebPage
3248         https://bugs.webkit.org/show_bug.cgi?id=52188
3249
3250         * UIProcess/API/mac/WKView.mm:
3251         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
3252         * UIProcess/API/qt/qwkpage.cpp:
3253         (QWKPagePrivate::init):
3254         * UIProcess/WebPageProxy.cpp:
3255         (WebKit::WebPageProxy::initializeWebPage):
3256         * UIProcess/WebPageProxy.h:
3257         * UIProcess/win/WebView.cpp:
3258         (WebKit::WebView::WebView):
3259
3260 2011-01-10  Anders Carlsson  <andersca@apple.com>
3261
3262         Didn't mean to land this.
3263
3264         * UIProcess/WebPageProxy.cpp:
3265         (WebKit::WebPageProxy::initializeWebPage):
3266         * UIProcess/WebPageProxy.h:
3267
3268 2011-01-10  Anders Carlsson  <andersca@apple.com>
3269
3270         Reviewed by Sam Weinig.
3271
3272         WebPageProxy::creationParameters no longer needs to take a size
3273         https://bugs.webkit.org/show_bug.cgi?id=52187
3274
3275         WebPageProxy::creationParameters can just ask the page client for the view size now.
3276
3277         * UIProcess/WebInspectorProxy.cpp:
3278         (WebKit::WebInspectorProxy::createInspectorPage):
3279         * UIProcess/WebPageProxy.cpp:
3280         (WebKit::WebPageProxy::initializeWebPage):
3281         (WebKit::WebPageProxy::reinitializeWebPage):
3282         (WebKit::WebPageProxy::createNewPage):
3283         (WebKit::WebPageProxy::creationParameters):
3284         * UIProcess/WebPageProxy.h:
3285
3286 2011-01-10  Anders Carlsson  <andersca@apple.com>
3287
3288         Reviewed by Sam Weinig.
3289
3290         Pass information about the view in the WebPageCreationParameters
3291         https://bugs.webkit.org/show_bug.cgi?id=52186
3292
3293         * Shared/WebPageCreationParameters.cpp:
3294         (WebKit::WebPageCreationParameters::encode):
3295         (WebKit::WebPageCreationParameters::decode):
3296         Encode and decode the state flags.
3297
3298         * Shared/WebPageCreationParameters.h:
3299         Add new state flags.
3300
3301         * UIProcess/WebPageProxy.cpp:
3302         (WebKit::WebPageProxy::creationParameters):
3303         Initialize the state flags.
3304
3305         * WebProcess/WebPage/WebPage.cpp:
3306         (WebKit::WebPage::WebPage):
3307         Update the page state from the state flags.
3308
3309 2011-01-10  Sam Weinig  <sam@webkit.org>
3310
3311         Reviewed by Anders Carlsson.
3312
3313         Make Geolocation features work in WebKit2
3314         https://bugs.webkit.org/show_bug.cgi?id=52078
3315
3316         Step 2 - Add support for requesting and granting permission for geolocation.
3317
3318         * Shared/API/c/WKBase.h:
3319         * Shared/APIObject.h:
3320         * UIProcess/API/C/WebKit2.h:
3321         * UIProcess/API/C/WKAPICast.h:
3322         * UIProcess/API/C/WKGeolocationPermissionRequest.cpp: Added.
3323         * UIProcess/API/C/WKGeolocationPermissionRequest.h: Added.
3324         Add new API type, WKGeolocationPermissionRequestRef.
3325
3326         * UIProcess/API/C/WKPage.h:
3327         Add new UIClient function for requesting permission.
3328
3329         * UIProcess/API/qt/qwkpage.cpp:
3330         (QWKPage::QWKPage): 
3331         Stub out the UIClient.
3332
3333         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: Added.
3334         * UIProcess/GeolocationPermissionRequestManagerProxy.h: Added.
3335         * UIProcess/GeolocationPermissionRequestProxy.cpp: Added.
3336         * UIProcess/WebPageProxy.cpp:
3337         * UIProcess/WebPageProxy.h:
3338         * UIProcess/WebPageProxy.messages.in:
3339         * UIProcess/WebUIClient.cpp:
3340         * UIProcess/WebUIClient.h:
3341         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Added.
3342         * WebProcess/Geolocation/GeolocationPermissionRequestManager.h: Added.
3343         * WebProcess/Geolocation/WebGeolocationManager.cpp:
3344         * WebProcess/Geolocation/WebGeolocationManager.h:
3345         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
3346         * WebProcess/WebCoreSupport/WebGeolocationClient.h:
3347         * WebProcess/WebPage/WebPage.cpp:
3348         (WebKit::WebPage::WebPage):
3349         (WebKit::WebPage::didReceiveGeolocationPermissionDecision):
3350         * WebProcess/WebPage/WebPage.h:
3351         (WebKit::WebPage::geolocationPermissionRequestManager):
3352         * WebProcess/WebPage/WebPage.messages.in:
3353         Track the permission request through both sides of the process divide.
3354
3355         * WebKit2.pro:
3356         * WebKit2.xcodeproj/project.pbxproj:
3357         * win/WebKit2.vcproj:
3358         * win/WebKit2Generated.make:
3359         Add new files.
3360
3361 2011-01-10  Anders Carlsson  <andersca@apple.com>
3362
3363         Reviewed by Sam Weinig.
3364
3365         Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
3366         https://bugs.webkit.org/show_bug.cgi?id=52184
3367
3368         * UIProcess/API/mac/PageClientImpl.h:
3369         * UIProcess/API/mac/PageClientImpl.mm:
3370         (WebKit::PageClientImpl::createDrawingAreaProxy):
3371         Call -[WKView _createDrawingAreaProxy].
3372
3373         (WebKit::PageClientImpl::setViewNeedsDisplay):
3374         Call setNeedsDisplayInRect on the WKView.
3375
3376         * UIProcess/API/mac/WKView.mm:
3377         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
3378         No need to set the drawing area proxy anymore.
3379
3380         (-[WKView _createDrawingAreaProxy]):
3381         Create a chunked update drawing area proxy for now.
3382
3383         * UIProcess/API/qt/qwkpage.cpp:
3384         (QWKPagePrivate::createDrawingAreaProxy):
3385         (QWKPagePrivate::setViewNeedsDisplay):
3386         Add stubs.
3387     
3388         * UIProcess/PageClient.h:
3389         Add new pure virtual member functions.
3390
3391         * UIProcess/WebPageProxy.cpp:
3392         (WebKit::WebPageProxy::initializeWebPage):
3393         (WebKit::WebPageProxy::reinitializeWebPage):
3394         Set the new drawing area proxy.
3395
3396         * UIProcess/win/WebView.cpp:
3397         (WebKit::WebView::WebView):
3398         No need to set the drawing area proxy anymore.
3399
3400         (WebKit::WebView::createDrawingAreaProxy):
3401         Create a chunked update drawing area proxy for now.
3402
3403         (WebKit::WebView::setViewNeedsDisplay):
3404         Invalidate the window.
3405
3406 2011-01-10  Anders Carlsson  <andersca@apple.com>
3407
3408         Fix Windows build again.
3409
3410         * UIProcess/win/WebView.cpp:
3411         (WebKit::WebView::isViewWindowActive):
3412
3413 2011-01-10  Anders Carlsson  <andersca@apple.com>
3414
3415         Fix Windows build.
3416
3417         * UIProcess/win/WebView.cpp:
3418         (WebKit::WebView::onShowWindowEvent):
3419
3420 2011-01-10  Anders Carlsson  <andersca@apple.com>
3421
3422         Reviewed by Sam Weinig.
3423
3424         Use a pull model for view state changes
3425         https://bugs.webkit.org/show_bug.cgi?id=52175
3426
3427         Instead of having the WKView call setFocused, setActive etc on the WebPageProxy, the
3428         WKView now simply informs the WebPageProxy what has changed, using the WebPageProxy::viewStateDidChange
3429         function. The WebPageProxy can then fetch the relevant information using newly added PageClient functions.
3430
3431         * UIProcess/API/mac/PageClientImpl.h:
3432         * UIProcess/API/mac/PageClientImpl.mm:
3433         (WebKit::PageClientImpl::viewSize):
3434         (WebKit::PageClientImpl::isViewWindowActive):
3435         (WebKit::PageClientImpl::isViewFocused):
3436         (WebKit::PageClientImpl::isViewVisible):
3437         (WebKit::PageClientImpl::isViewInWindow):
3438         * UIProcess/API/mac/WKView.mm:
3439         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
3440         (-[WKView becomeFirstResponder]):
3441         (-[WKView resignFirstResponder]):
3442         (-[WKView viewDidMoveToWindow]):
3443         (-[WKView _windowDidBecomeKey:]):
3444         (-[WKView _windowDidResignKey:]):
3445         (-[WKView viewDidHide]):
3446         (-[WKView viewDidUnhide]):
3447         (-[WKView _isFocused]):
3448         (-[WKView _didRelaunchProcess]):
3449         * UIProcess/API/mac/WKViewInternal.h:
3450         * UIProcess/API/qt/qgraphicswkview.cpp:
3451         (QGraphicsWKView::focusInEvent):
3452         (QGraphicsWKView::focusOutEvent):
3453         * UIProcess/API/qt/qwkpage.cpp:
3454         (QWKPagePrivate::QWKPagePrivate):
3455         (QWKPagePrivate::viewSize):
3456         (QWKPagePrivate::isViewWindowActive):
3457         (QWKPagePrivate::isViewFocused):
3458         (QWKPagePrivate::isViewVisible):
3459         (QWKPagePrivate::isViewInWindow):
3460         * UIProcess/API/qt/qwkpage_p.h:
3461         * UIProcess/PageClient.h:
3462         * UIProcess/WebContext.cpp:
3463         (WebKit::WebContext::createWebPage):
3464         * UIProcess/WebContext.h:
3465         * UIProcess/WebPageProxy.cpp:
3466         (WebKit::WebPageProxy::create):
3467         (WebKit::WebPageProxy::WebPageProxy):
3468         (WebKit::WebPageProxy::viewStateDidChange):
3469         * UIProcess/WebPageProxy.h:
3470         * UIProcess/WebProcessProxy.cpp:
3471         (WebKit::WebProcessProxy::createWebPage):
3472         * UIProcess/WebProcessProxy.h:
3473         * UIProcess/win/WebView.cpp:
3474         (WebKit::WebView::WebView):
3475         (WebKit::WebView::onSetFocusEvent):
3476         (WebKit::WebView::onKillFocusEvent):
3477         (WebKit::WebView::onShowWindowEvent):
3478         (WebKit::WebView::updateActiveState):
3479         (WebKit::WebView::viewSize):
3480         (WebKit::WebView::isViewWindowActive):
3481         (WebKit::WebView::isViewFocused):
3482         (WebKit::WebView::isViewVisible):
3483         (WebKit::WebView::isViewInWindow):
3484         (WebKit::WebView::didRelaunchProcess):
3485         (WebKit::WebView::setIsInWindow):
3486         * UIProcess/win/WebView.h:
3487
3488 2011-01-10  Adam Roben  <aroben@apple.com>
3489
3490         Don't pass a reference type to va_start
3491
3492         C++ says this results in undefined behavior:
3493
3494             The restrictions that ISO C places on the second parameter to the
3495             va_start() macro in header <stdarg.h> are different in this
3496             International Standard. The parameter parmN is the identifier of
3497             the rightmost parameter in the variable parameter list of the
3498             function definition (the one just before the ...).221) If the
3499             parameter parmN is declared with a function, array, or reference
3500             type, or with a type that is not compatible with the type that
3501             results when passing an argument for which there is no parameter,
3502             the behavior is undefined.
3503
3504         Fixes <http://webkit.org/b/52168> Title of standalone image document
3505         includes bogus image dimensions
3506
3507         Rubber-stamped by Eric Seidel.
3508
3509         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3510         (WebKit::formatLocalizedString): Don't use a reference type for
3511         |format|.
3512
3513 2011-01-10  Siddharth Mathur  <siddharth.mathur@nokia.com>
3514
3515         Reviewed by Eric Seidel.
3516
3517         Support for ARM's RVCT(ARMCC) compiler in import/export directives
3518         https://bugs.webkit.org/show_bug.cgi?id=52146 
3519
3520         * Shared/API/c/WKBase.h:
3521
3522 2011-01-10  Sam Weinig  <sam@webkit.org>
3523
3524         Fix the build.
3525
3526         * WebProcess/WebPage/WebPage.cpp:
3527         (WebKit::WebPage::WebPage):
3528
3529 2011-01-10  Sam Weinig  <sam@webkit.org>
3530
3531         Reviewed by Anders Carlsson.
3532
3533         Make Geolocation features work in WebKit2
3534         https://bugs.webkit.org/show_bug.cgi?id=52078
3535
3536         Step 1 - Add enough support to get position data from a provider.
3537         This does not include permission support.
3538
3539         * Platform/CoreIPC/HandleMessage.h:
3540         Add #include of Arguments.h for CoreIPC::In and Out definitions.
3541
3542         * Platform/CoreIPC/MessageID.h:
3543         Add new message types.
3544
3545         * Shared/API/c/WKBase.h:
3546         * Shared/APIObject.h:
3547         Add new API types.
3548
3549         * Shared/WebGeolocationPosition.cpp: Added.
3550         * Shared/WebGeolocationPosition.h: Added.
3551         Internal position representation.
3552
3553         * UIProcess/API/C/WKAPICast.h:
3554         Add casts for new API types.
3555
3556         * UIProcess/API/C/WKContext.cpp:
3557         * UIProcess/API/C/WKContext.h:
3558         * UIProcess/API/C/WKGeolocationManager.cpp: Added.
3559         * UIProcess/API/C/WKGeolocationManager.h: Added.
3560         * UIProcess/API/C/WKGeolocationPosition.cpp: Added.
3561         * UIProcess/API/C/WKGeolocationPosition.h: Added.
3562         * UIProcess/API/C/WebKit2.h:
3563         Add API to provide and control geolocation data.
3564
3565         * UIProcess/WebContext.cpp:
3566         (WebKit::WebContext::WebContext):
3567         (WebKit::WebContext::~WebContext):
3568         (WebKit::WebContext::processDidClose):
3569         (WebKit::WebContext::didReceiveMessage):
3570         * UIProcess/WebContext.h:
3571         (WebKit::WebContext::geolocationManagerProxy):
3572         * UIProcess/WebGeolocationManagerProxy.cpp: Added.
3573         (WebKit::WebGeolocationManagerProxy::create):
3574         (WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy):
3575         (WebKit::WebGeolocationManagerProxy::~WebGeolocationManagerProxy):
3576         (WebKit::WebGeolocationManagerProxy::invalidate):
3577         (WebKit::WebGeolocationManagerProxy::initializeProvider):
3578         (WebKit::WebGeolocationManagerProxy::providerDidChangePosition):
3579         (WebKit::WebGeolocationManagerProxy::providerDidFailToDeterminePosition):
3580         (WebKit::WebGeolocationManagerProxy::didReceiveMessage):
3581         (WebKit::WebGeolocationManagerProxy::startUpdating):
3582         (WebKit::WebGeolocationManagerProxy::stopUpdating):
3583         * UIProcess/WebGeolocationManagerProxy.h: Added.
3584         (WebKit::WebGeolocationManagerProxy::clearContext):
3585         (WebKit::WebGeolocationManagerProxy::type):
3586         * UIProcess/WebGeolocationManagerProxy.messages.in: Added.
3587         * UIProcess/WebGeolocationProvider.cpp: Added.
3588         (WebKit::WebGeolocationProvider::startUpdating):
3589         (WebKit::WebGeolocationProvider::stopUpdating):
3590         * UIProcess/WebGeolocationProvider.h: Added.
3591         * UIProcess/WebProcessProxy.cpp:
3592         (WebKit::WebProcessProxy::didReceiveMessage):
3593         * WebProcess/Geolocation: Added.
3594         * WebProcess/Geolocation/WebGeolocationManager.cpp: Added.
3595         (WebKit::WebGeolocationManager::WebGeolocationManager):
3596         (WebKit::WebGeolocationManager::~WebGeolocationManager):
3597         (WebKit::WebGeolocationManager::didReceiveMessage):
3598         (WebKit::WebGeolocationManager::registerWebPage):
3599         (WebKit::WebGeolocationManager::unregisterWebPage):
3600         (WebKit::WebGeolocationManager::didChangePosition):
3601         (WebKit::WebGeolocationManager::didFailToDeterminePosition):
3602         * WebProcess/Geolocation/WebGeolocationManager.h: Added.
3603         * WebProcess/Geolocation/WebGeolocationManager.messages.in: Added.
3604         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp: Added.
3605         (WebKit::WebGeolocationClient::geolocationDestroyed):
3606         (WebKit::WebGeolocationClient::startUpdating):
3607         (WebKit::WebGeolocationClient::stopUpdating):
3608         (WebKit::WebGeolocationClient::setEnableHighAccuracy):
3609         (WebKit::WebGeolocationClient::lastPosition):
3610         (WebKit::WebGeolocationClient::requestPermission):
3611         (WebKit::WebGeolocationClient::cancelPermissionRequest):
3612         * WebProcess/WebCoreSupport/WebGeolocationClient.h: Added.
3613         (WebKit::WebGeolocationClient::WebGeolocationClient):
3614         * WebProcess/WebPage/WebPage.cpp:
3615         (WebKit::WebPage::WebPage):
3616         * WebProcess/WebProcess.cpp:
3617         (WebKit::WebProcess::WebProcess):
3618         (WebKit::WebProcess::didReceiveMessage):
3619         * WebProcess/WebProcess.h:
3620         (WebKit::WebProcess::geolocationManager):
3621         Pipe geolocation positions/errors from the UIProcess to the WebProcess.
3622
3623         * DerivedSources.make:
3624         * DerivedSources.pro:
3625         * WebKit2.pro:
3626         * WebKit2.xcodeproj/project.pbxproj:
3627         * win/WebKit2.vcproj:
3628         * win/WebKit2Common.vsprops:
3629          * win/WebKit2Generated.make:
3630         Add new files.
3631
3632 2011-01-10  Martin Robinson  <mrobinson@igalia.com>
3633
3634         GTK+ build fix. Continue to fix 'make dist.'
3635
3636         * GNUmakefile.am: Remove more non-existent files from the WebKit2 build.
3637
3638 2011-01-10  Alejandro G. Castro  <alex@igalia.com>
3639
3640         Reviewed by Martin Robinson.
3641
3642         [GTK] Remove webkit2 files that are still not added to the
3643         repository from the makefile
3644         https://bugs.webkit.org/show_bug.cgi?id=52145
3645
3646         This change is required for the release, we can add the lines
3647         again to the makefiles with the patches adding the files.
3648
3649         * GNUmakefile.am:
3650
3651 2011-01-10  Andreas Kling  <kling@webkit.org>
3652
3653         Reviewed by Simon Hausmann.
3654
3655         [Qt] [WK2] MiniBrowser does not load pages opened in new windows
3656         https://bugs.webkit.org/show_bug.cgi?id=52111
3657
3658         * UIProcess/API/qt/qwkpage.cpp:
3659         (QWKPage::context): Implement this method.
3660
3661 2011-01-09  Dan Bernstein  <mitz@apple.com>
3662
3663         Reviewed by Simon Fraser.
3664
3665         <rdar://problem/8839498> Assertion failure in KURL::KURL when calling WKURLRequestCreateWithWKURL with a non-parsed URL
3666         https://bugs.webkit.org/show_bug.cgi?id=52132
3667
3668         * Shared/API/c/WKURLRequest.cpp:
3669         (WKURLRequestCreateWithWKURL): Parse the URL.
3670         * Shared/WebString.h: Fixed a comment.
3671         * Shared/WebURL.h: Ditto.
3672
3673 2011-01-09  Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com>
3674
3675         Reviewed by Martin Robinson.
3676
3677         Changes to add Process Launcher and Thread Launcher implementation to the WebKit2 GTK port.
3678         The main() implementation for WebKitWebProcess binary to launch Web process from UI process.
3679         https://bugs.webkit.org/show_bug.cgi?id=48511
3680
3681         * UIProcess/Launcher/gtk: Added.
3682         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: Added. GTK (UNIX_X11 specific) implementation
3683         (WebKit::ProcessLauncher::launchProcess):
3684         (WebKit::ProcessLauncher::terminateProcess):
3685         (WebKit::ProcessLauncher::platformInvalidate):
3686         * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
3687         (WebKit::ThreadLauncher::createWebThread):
3688         * WebProcess/gtk: Added.
3689         * WebProcess/gtk/WebProcessGtk.cpp: Added. The stubbed implementations of virtual functions of WebProcess.h for GTK port.
3690         (WebKit::WebProcess::platformSetCacheModel):
3691         (WebKit::WebProcess::platformClearResourceCaches):
3692         (WebKit::WebProcess::platformInitializeWebProcess):
3693         (WebKit::WebProcess::platformShutdown):
3694         * WebProcess/gtk/WebProcessMainGtk.cpp: Added. The WebProcessMain call which initiates the Web Process for GTK port.
3695         (WebKit::WebProcessMainGtk):
3696         * WebProcess/gtk/WebProcessMainGtk.h: Added. The WebProcessMain declaration for Web Process for GTK port.
3697         * gtk/MainGtk.cpp: Added. The main function implementation for binary WebKitWebProcess.
3698         (main):
3699
3700 2011-01-07 Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com>
3701
3702         Reviewed by Martin Robinson.
3703
3704         [GTK] WebKit2 GNUmakefile is out of date from trunk
3705         https://bugs.webkit.org/show_bug.cgi?id=51883
3706
3707         * GNUmakefile.am: Updated sources list as per latest revision
3708         * Platform/gtk/RunLoopGtk.cpp:
3709         (RunLoop::TimerBase::start):
3710         * Platform/gtk/WorkQueueGtk.cpp:
3711         (WorkQueue::scheduleWorkAfterDelay):
3712         * Shared/gtk/BackingStoreGtk.cpp:
3713         (WebKit::BackingStore::paint):
3714         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
3715         (WebKit::InjectedBundle::load):
3716         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
3717         (WebKit::NetscapePlugin::platformInvalidate):
3718
3719 2011-01-08  Dan Bernstein  <mitz@apple.com>
3720
3721         Reviewed by Sam Weinig.
3722
3723         <rdar://problem/8812759> In WebKit2, PDF view settings (mode and scale) do not stick
3724         https://bugs.webkit.org/show_bug.cgi?id=52118
3725
3726         * Shared/WebPreferencesStore.cpp:
3727         (WebKit::WebPreferencesStore::encode): Encode the double values map.
3728         (WebKit::WebPreferencesStore::decode): Decode the double values map.
3729         (WebKit::defaultValueForKey): Added double instance.
3730         (WebKit::WebPreferencesStore::setDoubleValueForKey): Added.
3731         (WebKit::WebPreferencesStore::getDoubleValueForKey): Added.
3732         * Shared/WebPreferencesStore.h: Added PDFScaleFactor and PDFDisplayMode preferences.
3733         * UIProcess/API/mac/PDFViewController.mm:
3734         (-[WKPDFView initWithFrame:PDFViewController:WebKit::]): Initialize the _pdfViewController ivar.
3735         (-[WKPDFView invalidate]): Changed 'nil' to '0' in assignment to a non-Objective-C pointer.
3736         (-[WKPDFView setDocument:]): Added.
3737         (-[WKPDFView _applyPDFPreferences]): Added.
3738         (-[WKPDFView _updatePreferences:]): Added.
3739         (-[WKPDFView _updatePreferencesSoon]): Added.
3740         (-[WKPDFView _scaleOrDisplayModeOrPageChanged:]): Added.
3741         (-[WKPDFView viewDidMoveToWindow]): Added. Starts observing the PDF view for changes to scale
3742         and display mode.
3743         (-[WKPDFView viewWillMoveToWindow:]): Added. Stops observing for changes.
3744         (WebKit::PDFViewController::setPDFDocumentData): Changed to call throguh -[WKPDFView setDocument:].
3745         * UIProcess/WebPreferences.cpp:
3746         (WebKit::WebPreferences::updateDoubleValueForKey): Added.
3747         * UIProcess/WebPreferences.h:
3748         * UIProcess/cf/WebPreferencesCF.cpp:
3749         (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added empty implementation.
3750         * UIProcess/gtk/WebPreferencesGtk.cpp:
3751         (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added stub.
3752         * UIProcess/mac/WebPreferencesMac.mm:
3753         (WebKit::setDoubleValueIfInUserDefaults): Added.
3754         (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added.
3755         * UIProcess/qt/WebPreferencesQt.cpp:
3756         (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added.
3757
3758 2011-01-08  Dan Bernstein  <mitz@apple.com>
3759
3760         Reviewed by Maciej Stachowiak.
3761
3762         In WebKit2, page zooming does not work with PDF
3763         https://bugs.webkit.org/show_bug.cgi?id=52113
3764
3765         * UIProcess/API/C/WKPage.cpp:
3766         (WKPageSupportsTextZoom): Added. Returns whether the page currently supports text-only zoom.
3767         * UIProcess/API/C/WKPage.h:
3768         * UIProcess/API/mac/PDFViewController.h: Made pdfDocumentClass() private and declared new
3769         member functions.
3770         * UIProcess/API/mac/PDFViewController.mm:
3771         (WebKit::PDFViewController::zoomFactor): Added.
3772         (WebKit::PDFViewController::setZoomFactor): Added.
3773         * UIProcess/API/mac/PageClientImpl.h:
3774         * UIProcess/API/mac/PageClientImpl.mm:
3775         (WebKit::PageClientImpl::customRepresentationZoomFactor): Added. Calls through to the WKView.
3776         (WebKit::PageClientImpl::setCustomRepresentationZoomFactor): Ditto.
3777         * UIProcess/API/mac/WKView.mm:
3778         (-[WKView _customRepresentationZoomFactor]): Added. Calls through to the PDFViewController.
3779         (-[WKView _setCustomRepresentationZoomFactor:]): Ditto.
3780         * UIProcess/API/mac/WKViewInternal.h:
3781         * UIProcess/API/qt/qwkpage_p.h:
3782         (QWKPagePrivate::customRepresentationZoomFactor): Added.
3783         (QWKPagePrivate::setCustomRepresentationZoomFactor): Added.
3784         * UIProcess/PageClient.h:
3785         * UIProcess/WebPageProxy.cpp:
3786         (WebKit::WebPageProxy::WebPageProxy): Coding style fix.
3787         (WebKit::WebPageProxy::supportsTextZoom): Added. Returns false if the main frame has a custom
3788         representation or is a standalone image, true otherwise.
3789         (WebKit::WebPageProxy::setTextZoomFactor): Bail out if the main frame has a custom representation.
3790         (WebKit::WebPageProxy::pageZoomFactor): If the main frame has a custom representation, get the
3791         zoom factor from the page client.
3792         (WebKit::WebPageProxy::setPageZoomFactor): If the main frame has a custom representation, have
3793         the client set the zoom factor.
3794         (WebKit::WebPageProxy::setPageAndTextZoomFactors): Ditto.
3795         * UIProcess/WebPageProxy.h:
3796         (WebKit::WebPageProxy::textZoomFactor): Changed to return 1 if the main frame has a custom
3797         representation.
3798         * UIProcess/win/WebView.cpp:
3799         (WebKit::WebView::customRepresentationZoomFactor): Added.
3800         (WebKit::WebView::setCustomRepresentationZoomFactor): Added.
3801         * UIProcess/win/WebView.h:
3802
3803 2011-01-08  Jeff Miller  <jeffm@apple.com>
3804
3805         Reviewed by Jon Honeycutt.
3806
3807         Add WKBundleFrameGetVisibleContentBounds().
3808         https://bugs.webkit.org/show_bug.cgi?id=52089
3809
3810         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3811         (WKBundleFrameGetVisibleContentBounds):
3812         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3813         Added WKBundleFrameGetVisibleContentBounds().
3814
3815 2011-01-08  Balazs Kelemen  <kbalazs@webkit.org>
3816
3817         Reviewed by Kenneth Rohde Christiansen.
3818
3819         [Qt][WK2] QWKView does not propagate show and hide events to the drawing area
3820         https://bugs.webkit.org/show_bug.cgi?id=52108
3821
3822         * UIProcess/API/qt/qgraphicswkview.cpp:
3823         (QGraphicsWKView::event): Call setPageIsVisible on the drawing area
3824         if the event is Show or Hide.
3825
3826 2011-01-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3827
3828         Reviewed by Kenneth Rohde Christiansen.
3829
3830         [Qt][Symbian] Make sure WebKit headers are included before platform headers on Symbian
3831         https://bugs.webkit.org/show_bug.cgi?id=31273
3832
3833         On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers
3834         are included before platform headers. On all other platforms continue to use
3835         INCLUDEPATH (as before).
3836
3837         * WebKit2.pro:
3838
3839 2011-01-08  Csaba Osztrogonác  <ossy@webkit.org>
3840
3841         [Qt][WK2] Unreviewed buildfix after r75313.
3842
3843         * Scripts/generate-forwarding-headers.pl:
3844
3845 2011-01-08  Adam Barth  <abarth@webkit.org>
3846
3847         Moving WebCore changes the layout of the Qt build directory as well,
3848         which means we need to change where we look for these generated files.
3849
3850         * DerivedSources.pro:
3851
3852 2011-01-07  Adam Barth  <abarth@webkit.org>
3853
3854         Rubber-stamped by Eric Seidel.
3855
3856         Move WebCore to Source
3857         https://bugs.webkit.org/show_bug.cgi?id=52050
3858
3859         * WebKit2.pro:
3860
3861 2011-01-07  Stephanie Lewis  <slewis@apple.com>
3862
3863         Reviewed by Geoff Garen.
3864
3865         <rdar://problem/8649617> Migrate memory tracking from Safari to WebKit
3866         https://bugs.webkit.org/show_bug.cgi?id=50799 Add Memory Sampler to WebKit
3867         
3868         Add a sampler for printing off process memory statistics.
3869         This tool can track:
3870                 
3871                 WebCore
3872                    - FastMalloc allocations bytes              (in use or committed)
3873                 JavaScriptCore
3874                    - Garbage collector heap bytes              (in use or committed)
3875                    - Stack bytes                               (committed only!)
3876                    - JIT Code bytes                            (committed only!)
3877                 Malloc zones
3878                    - In use bytes for the following zones:
3879                        * Default zone                          (in use or committed)
3880                        * DispCon zone                          (in use or committed)
3881                        * Purgable zone                         (in use or committed)
3882                 Task Info
3883                    - Resident size memory (RSIZE)
3884         
3885                 Data collected is dumped to a temporary file.
3886         
3887         Create a sandbox for a temporary file.
3888         * Shared/SandboxExtension.h:
3889         (WebKit::SandboxExtension::createHandleForTemporaryFile):
3890         * Shared/mac/SandboxExtensionMac.mm:
3891         (WebKit::SandboxExtension::createHandleForTemporaryFile):
3892         
3893         Memory Sampler files
3894         
3895         * Shared/WebMemorySampler.cpp: Added.
3896         (WebKit::WebMemorySampler::shared):
3897         (WebKit::WebMemorySampler::WebMemorySampler):
3898         (WebKit::WebMemorySampler::start):
3899         (WebKit::WebMemorySampler::initializeTimers):
3900         (WebKit::WebMemorySampler::stop):
3901         (WebKit::WebMemorySampler::isRunning):
3902         (WebKit::WebMemorySampler::initializeTempLogFile):
3903         (WebKit::WebMemorySampler::initializeSandboxedLogFile):
3904         (WebKit::WebMemorySampler::writeHeaders):
3905         (WebKit::WebMemorySampler::sampleTimerFired):
3906         (WebKit::WebMemorySampler::stopTimerFired):
3907         (WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile):
3908         * Shared/WebMemorySampler.h: Added.
3909         * Shared/mac/WebMemorySampler.mac.mm: Added.
3910         (WebKit::WebMemorySampler::sampleSystemMalloc):
3911         (WebKit::WebMemorySampler::sampleProcessCommittedBytes):
3912         (WebKit::WebMemorySampler::processName):
3913         (WebKit::WebMemorySampler::sampleWebKit):
3914         
3915         API to start and stop UIProcess and WebProcess sampling.
3916         
3917         * UIProcess/API/C/WKContext.cpp:
3918         (WKContextStartMemorySampler):
3919         (WKContextStopMemorySampler):
3920         * UIProcess/API/C/WKContext.h:
3921         
3922         Send messages to WebProcess to start and stop memory sampling.
3923         
3924         * UIProcess/WebContext.cpp:
3925         (WebKit::WebContext::WebContext):
3926         (WebKit::WebContext::processDidFinishLaunching):
3927         (WebKit::WebContext::startMemorySampler):
3928         (WebKit::WebContext::stopMemorySampler):
3929         * UIProcess/WebContext.h:
3930         * WebKit2.xcodeproj/project.pbxproj:
3931         * WebProcess/WebProcess.cpp:
3932         (WebKit::WebProcess::startMemorySampler):
3933         (WebKit::WebProcess::stopMemorySampler):
3934         * WebProcess/WebProcess.h:
3935         * WebProcess/WebProcess.messages.in:
3936
3937 2011-01-07  Jessie Berlin  <jberlin@apple.com>
3938
3939         Reviewed by Dan Bernstein.
3940
3941         WebKit2: Need WKBundleFrameCopyProvisionalURL
3942         https://bugs.webkit.org/show_bug.cgi?id=52083
3943
3944         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3945         (WKBundleFrameCopyProvisionalURL):
3946         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3947         * WebProcess/WebPage/WebFrame.cpp:
3948         (WebKit::WebFrame::provisionalURL):
3949         Grab the URL from the provisional document loader.
3950         * WebProcess/WebPage/WebFrame.h:
3951
3952 2011-01-07  James Robinson  <jamesr@chromium.org>
3953
3954         Revert "Implement mozilla's animationTime property"
3955         https://bugs.webkit.org/show_bug.cgi?id=51952
3956
3957         This approach isn't quite right.
3958
3959         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
3960         (WebKit::ChunkedUpdateDrawingArea::display):
3961         (WebKit::ChunkedUpdateDrawingArea::setSize):
3962         * WebProcess/WebPage/WebPage.cpp:
3963         (WebKit::WebPage::drawRect):
3964         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
3965         (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
3966
3967 2011-01-07 Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com>
3968
3969         Reviewed by Martin Robinson.
3970
3971         [GTK] WebKit2 GNUmakefile is out of date from trunk
3972         Adding new stub files for compiling on latest revision
3973         https://bugs.webkit.org/show_bug.cgi?id=51883
3974
3975         * UIProcess/gtk: Added.
3976         * UIProcess/gtk/TextCheckerGtk.cpp: Added.
3977         (WebKit::TextChecker::state):
3978         (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
3979         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
3980         (WebKit::TextChecker::setGrammarCheckingEnabled):
3981         (WebKit::TextChecker::uniqueSpellDocumentTag):
3982         (WebKit::TextChecker::closeSpellDocumentWithTag):
3983         (WebKit::TextChecker::checkTextOfParagraph):
3984         (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
3985         (WebKit::TextChecker::getGuessesForWord):
3986         (WebKit::TextChecker::learnWord):
3987         (WebKit::TextChecker::ignoreWord):
3988         * UIProcess/gtk/WebInspectorGtk.cpp: Added.
3989         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3990         (WebKit::WebInspectorProxy::platformOpen):
3991         (WebKit::WebInspectorProxy::platformClose):
3992         (WebKit::WebInspectorProxy::inspectorPageURL):
3993         * UIProcess/gtk/WebPageProxyGtk.cpp: Added.
3994         (WebKit::WebPageProxy::standardUserAgent):
3995         * UIProcess/gtk/WebPreferencesGtk.cpp: Added.
3996         (WebKit::WebPreferences::platformInitializeStore):
3997         (WebKit::WebPreferences::platformUpdateStringValueForKey):
3998         (WebKit::WebPreferences::platformUpdateBoolValueForKey):
3999         (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
4000         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp: Added.
4001         (WebKit::WebContextMenuClient::lookUpInDictionary):
4002         (WebKit::WebContextMenuClient::isSpeaking):
4003         (WebKit::WebContextMenuClient::speak):
4004         (WebKit::WebContextMenuClient::stopSpeaking):
4005         * WebProcess/WebCoreSupport/gtk/WebDatabaseManagerGtk.cpp: Added.
4006         (WebKit::WebDatabaseManager::databaseDirectory):
4007         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp: Added.
4008         (WebKit::WebPopupMenu::setUpPlatformData):
4009         * WebProcess/WebPage/gtk: Added.
4010         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp: Added.
4011         (WebKit::WebInspector::localizedStringsURL):
4012
4013 2011-01-06  Adam Roben  <aroben@apple.com>
4014
4015         Don't ever call ::SetCursor(0)
4016
4017         Doing so makes the cursor disappear from the screen.
4018
4019         Fixes <http://webkit.org/b/52024> Mouse cursor flashes when moving it
4020         around a WKView before the web process has finished launching
4021
4022         Reviewed by Jon Honeycutt.
4023
4024         * UIProcess/win/WebView.cpp:
4025         (WebKit::WebView::onSetCursor): If we don't have a cursor to set, just
4026         let Windows do its default thing (which is to set the cursor to the
4027         window class's cursor, which in our case is the arrow cursor).
4028         (WebKit::WebView::cursorToShow): Just return 0 when the page has
4029         crashed so that we'll show the default cursor (which is the arrow
4030         cursor). This change has no visible effect, but seems slightly better
4031         conceptually.
4032         (WebKit::WebView::updateNativeCursor): Don't do anything if we don't
4033         have a cursor to set.
4034
4035 2011-01-06  Adam Roben  <aroben@apple.com>
4036
4037         Fill the WKView with white when the web process hasn't drawn anything
4038         yet
4039
4040         Fixes <http://webkit.org/b/52023> WKView accumulates pixel garbage
4041         before web process has had a chance to draw anything (if Aero is
4042         disabled)
4043
4044         Reviewed by Jon Honeycutt.
4045
4046         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
4047         (WebKit::ChunkedUpdateDrawingAreaProxy::paint):
4048         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
4049         * UIProcess/DrawingAreaProxy.h:
4050         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
4051         (WebKit::LayerBackedDrawingAreaProxy::paint):
4052         * UIProcess/LayerBackedDrawingAreaProxy.h:
4053         * UIProcess/TiledDrawingAreaProxy.cpp:
4054         (WebKit::TiledDrawingAreaProxy::paint):
4055         * UIProcess/TiledDrawingAreaProxy.h:
4056         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
4057         (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
4058         * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
4059         (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
4060         * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
4061         (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
4062         * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp:
4063         (WebKit::LayerBackedDrawingAreaProxy::paint):
4064         Changed these functions to return a boolean indicating whether we
4065         actually painted anything.
4066
4067         * UIProcess/win/WebView.cpp:
4068         (WebKit::WebView::onPaintEvent): Fill with white (and don't call
4069         didDraw) when the DrawingAreaProxy isn't able to paint.
4070
4071 2011-01-06  Jessie Berlin  <jberlin@apple.com>
4072
4073         Reviewed by Jon Honeycutt.
4074
4075         WebKit2: Need WKBundlePagePrivate equivalent of WebKit1's WebViewPrivate's setDefersCallbacks
4076         https://bugs.webkit.org/show_bug.cgi?id=52038
4077
4078         The implementation of WebKit1's WebViewPrivate's setDefersCallbacks on both Windows and Mac
4079         calls WebCore::Page::setDefersLoading.
4080
4081         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
4082         (WKBundlePageSetDefersLoading):
4083         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
4084         * WebProcess/WebPage/WebPage.cpp:
4085         (WebKit::WebPage::setDefersLoading):
4086         * WebProcess/WebPage/WebPage.h:
4087
4088 2011-01-06  Brady Eidson  <beidson@apple.com>
4089
4090         Reviewed by Darin Adler.
4091
4092         <rdar://problem/8261624> and https://bugs.webkit.org/show_bug.cgi?id=47355
4093         Change WebKit2 session restoring to restore the full back/forward list.
4094
4095         * UIProcess/WebProcessProxy.cpp:
4096         (WebKit::WebProcessProxy::registerNewWebBackForwardListItem): Let the UIProcess register its own
4097           WebBackForwardListItems in its ID map upon creation.
4098         * UIProcess/WebProcessProxy.h:
4099
4100         * UIProcess/cf/WebPageProxyCF.cpp:
4101         (WebKit::WebPageProxy::restoreFromSessionStateData): Register each new list entry in the
4102           UIProcess ID map.
4103
4104         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
4105         (WebKit::WebBackForwardListProxy::addItemFromUIProcess): Add this method to register UIProcess
4106           created items without doing any of the other work normally associated with adding a new back/forward item
4107           (such as notifying the UIProcess).
4108         * WebProcess/WebPage/WebBackForwardListProxy.h:
4109
4110         * WebProcess/WebPage/WebPage.cpp:
4111         (WebKit::WebPage::restoreSession): Map all of the back/forward list entries from the UIProcess then
4112           cause a load of the current entry.
4113
4114 2011-01-06  Adam Roben  <aroben@apple.com>
4115
4116         Always show the arrow cursor when the web process has crashed
4117
4118         Fixes <http://webkit.org/b/52006> WKView shows a stale cursor when the
4119         web process crashes
4120
4121         Reviewed by Ada Chan.
4122
4123         * UIProcess/win/WebView.cpp:
4124         (WebKit::WebView::processDidCrash):
4125         (WebKit::WebView::didRelaunchProcess):
4126         Update the cursor to reflect the new state.
4127
4128         (WebKit::WebView::cursorToShow): Always show the arrow cursor when the
4129         web process has crashed.
4130
4131 2011-01-06  Adam Roben  <aroben@apple.com>
4132
4133         Reduce code duplication in WebView::updateNativeCursor
4134
4135         Fixes <http://webkit.org/b/52005> It's not easy to add new behavior to
4136         WebView::updateNativeCursor
4137
4138         Reviewed by Ada Chan.
4139
4140         * UIProcess/win/WebView.cpp:
4141         (WebKit::WebView::cursorToShow): Moved code to choose a cursor here...
4142         (WebKit::WebView::updateNativeCursor): ...from here.
4143
4144         * UIProcess/win/WebView.h: Added cursorToShow.
4145
4146 2011-01-06  Adam Roben  <aroben@apple.com>
4147
4148         Make WKView fill with white when the web process has crashed
4149
4150         Previously we would just draw whatever we had last drawn into the
4151         WKView (i.e., a stale picture of the web page), which was confusing
4152         (because the web page would mysteriously not respond to input) and ugly
4153         (because it wouldn't behave properly if the window was resized).
4154
4155         Fixes <http://webkit.org/b/52004> WKView keeps painting a stale
4156         picture of the web page when the web process crashes
4157
4158         Reviewed by Ada Chan.
4159
4160         * UIProcess/win/WebView.cpp:
4161         (WebKit::WebView::onPaintEvent): Ported code from -[WKView drawRect:]
4162         to fill with white if the page is invalid or has no DrawingArea. As a
4163         bonus, also ported the call to WebPageProxy::didDraw from that method.
4164
4165         (WebKit::WebView::processDidCrash):
4166         (WebKit::WebView::didRelaunchProcess):
4167         Invalidate our window so that we'll redraw with white or the new page.
4168
4169 2011-01-06  Adam Roben  <aroben@apple.com>
4170
4171         Make WKViews work on Windows after a crashed web process gets relaunched
4172
4173         Fixes <http://webkit.org/b/52001> Relaunching the web process fails to
4174         revivify WKViews on Windows
4175
4176         Reviewed by Ada Chan.
4177
4178         * UIProcess/win/WebView.cpp:
4179         (WebKit::WebView::didRelaunchProcess): Implemented by porting code from
4180         -[WKView _didRelaunchProcess].
4181
4182 2011-01-06  Adam Roben  <aroben@apple.com>
4183
4184         Remove WebView::m_rect
4185
4186         It was only used in the constructor, and wasn't even kept up-to-date as
4187         the WebView's size changed.
4188
4189         Fixes <http://webkit.org/b/52000> WebView::m_rect is unnecessary
4190
4191         Reviewed by Ada Chan.
4192
4193         * UIProcess/win/WebView.cpp:
4194         * UIProcess/win/WebView.h:
4195
4196 2011-01-05  Brian Weinstein  <bweinstein@apple.com>
4197
4198         Reviewed by Ada Chan.
4199
4200         WebKit2: Should be able to call into injected bundle to ask if we should allow resource loads
4201       &