ChangeLog 1.47 MB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2011-01-25  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Anders Carlsson.

        Improve scale factor resetting
        https://bugs.webkit.org/show_bug.cgi?id=53093
        
        Two key changes:
        - Don't set the scale factor to what it already is, as this causes an
        uneeded force layout and scroll
        - Don't ever set the scale factor based on a non-main frame committing
        
        This fixes two WebKit2 layout tests.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):

18
19
20
21
22
23
24
25
26
2011-01-24  Chris Marrin  <cmarrin@apple.com>

        Reviewed by Eric Seidel.

        Change ENABLE_3D_CANVAS to ENABLE_WEBGL
        https://bugs.webkit.org/show_bug.cgi?id=53041

        * Configurations/FeatureDefines.xcconfig:

27
28
29
30
31
32
33
34
35
36
37
38
2011-01-25  Andreas Kling  <kling@webkit.org>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt][WK2] Add QWKPage::processCrashed() signal
        https://bugs.webkit.org/show_bug.cgi?id=53076

        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPagePrivate::processDidCrash):
        * UIProcess/API/qt/qwkpage.h:
        * UIProcess/API/qt/qwkpage_p.h:

andersca@apple.com's avatar
andersca@apple.com committed
39
40
41
42
43
44
45
2011-01-24  Anders Carlsson  <andersca@apple.com>

        Fix build.
        
        * WebProcess/mac/WebProcessMac.mm:
        (WebKit::initializeSandbox):

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
2011-01-24  Anders Carlsson  <andersca@apple.com>

        Reviewed by Dan Bernstein.

        Reset the page scale factor on standard frame loads
        https://bugs.webkit.org/show_bug.cgi?id=53058
        <rdar://problem/8908844>

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::scaleWebView):
        Don't set m_viewScaleFactor here. It will be set in viewScaleFactorDidChange.

        (WebKit::WebPageProxy::viewScaleFactorDidChange):
        Update m_viewScaleFactor.

        * UIProcess/WebPageProxy.h:
        Add viewScaleFactorDidChange.

        * UIProcess/WebPageProxy.messages.in:
        Add ViewScaleFactorDidChange message.

        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
        Set the scale factor.

        (WebKit::WebFrameLoaderClient::restoreViewState):
        Inform the UI process about the new view scale factor.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::scaleWebView):
        Send a ViewScaleFactorDidChange message.

78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
2011-01-24  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Anders Carlsson.

        Use designated temp directory for the database for WebKit2
        https://bugs.webkit.org/show_bug.cgi?id=53052
        
        Add the API necessary to support this. Database path is now
        determined on the UI process side and passed to the Web process.
        Reviewed by Anders Carlsson.

        * GNUmakefile.am:
        * Shared/WebProcessCreationParameters.cpp:
        (WebKit::WebProcessCreationParameters::encode):
        (WebKit::WebProcessCreationParameters::decode):
        * Shared/WebProcessCreationParameters.h:
        * UIProcess/API/C/WKContext.cpp:
        (WKContextSetDatabaseDirectory):
        * UIProcess/API/C/WKContextPrivate.h:
        * UIProcess/WebContext.cpp:
        (WebKit::WebContext::ensureWebProcess):
        (WebKit::WebContext::databaseDirectory):
        * UIProcess/WebContext.h:
        (WebKit::WebContext::setDatabaseDirectory):
        * UIProcess/mac/WebContextMac.mm:
        (WebKit::WebContext::platformDefaultDatabaseDirectory):
        * UIProcess/qt/WebContextQt.cpp:
        (WebKit::WebContext::platformDefaultDatabaseDirectory):
        * UIProcess/win/WebContextWin.cpp:
        (WebKit::WebContext::platformDefaultDatabaseDirectory):
        * WebKit2.pro:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
        (WebKit::WebDatabaseManager::initialize):
        (WebKit::WebDatabaseManager::WebDatabaseManager):
        * WebProcess/WebCoreSupport/WebDatabaseManager.h:
        * WebProcess/WebCoreSupport/gtk/WebDatabaseManagerGtk.cpp: Removed.
        * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm: Removed.
        * WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp: Removed.
        * WebProcess/WebCoreSupport/win/WebDatabaseManagerWin.cpp: Removed.
        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::WebProcess):
        (WebKit::WebProcess::initializeWebProcess):
        * WebProcess/com.apple.WebProcess.sb:
        * WebProcess/mac/WebProcessMac.mm:
        (WebKit::initializeSandbox):
        * win/WebKit2.vcproj:

bfulgham@webkit.org's avatar
bfulgham@webkit.org committed
126
127
128
129
130
131
132
2011-01-24  Brent Fulgham  <bfulgham@webkit.org>

        Unreviewed build fix.

        * win/WebKit2.vcproj: Don't build the CG Utilities when building
        without CG support.

133
134
135
136
137
138
139
140
141
142
143
144
145
146
2011-01-24  Anders Carlsson  <andersca@apple.com>

        Reviewed by John Sullivan.

        Don't use the timeout checker for non-user-interaction messages
        https://bugs.webkit.org/show_bug.cgi?id=53046

        * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
        (WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize):
        (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
        * UIProcess/LayerBackedDrawingAreaProxy.cpp:
        (WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
        (WebKit::LayerBackedDrawingAreaProxy::didSetSize):

147
148
149
150
151
152
2011-01-24  Adam Roben  <aroben@apple.com>

        Windows Production build fix

        * win/WebKit2.make: Update for move of WebKit2 into Source.

153
154
155
156
157
158
159
160
161
162
2011-01-24  Jessie Berlin  <jberlin@apple.com>

        Reviewed by Adam Roben.

        WebKit2: LayoutTests: The UNIMPLEMENTED warnings in TextCheckerWin should be disabled
        https://bugs.webkit.org/show_bug.cgi?id=53029

        * UIProcess/win/TextCheckerWin.cpp:
        Disable the warnings for this file.

163
164
165
166
167
168
169
170
171
172
2011-01-24  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Wait for half a second if we're asked to paint when receiving a DidSetSize message
        https://bugs.webkit.org/show_bug.cgi?id=53028

        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::paint):

173
174
175
176
177
178
179
180
181
182
183
2011-01-24  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Implement forceRedisplay in the new drawing area
        https://bugs.webkit.org/show_bug.cgi?id=53026

        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::forceRepaint):
        * WebProcess/WebPage/DrawingAreaImpl.h:

184
185
186
187
188
189
190
191
192
193
194
195
196
197
2011-01-24  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Fill unpainted rects with the background color.
        https://bugs.webkit.org/show_bug.cgi?id=53025

        * UIProcess/API/mac/WKView.mm:
        (drawPageBackground):
        Add new helper function.

        (-[WKView drawRect:]):
        Iterate over the unpainted rects and fill them with the background color.

198
199
200
201
202
203
204
205
206
2011-01-24  Dan Bernstein  <mitz@apple.com>

        Reviewed by John Sullivan.

        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

        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::setCursor): If the current cursor comes from a cursor rect, do not override it.

kbalazs@webkit.org's avatar
kbalazs@webkit.org committed
207
208
209
210
211
212
213
214
215
2011-01-24  Balazs Kelemen  <kbalazs@webkit.org>

        Rubber-stamped by Csaba Osztrogonác.

        Typo fix.

        * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
        (WebKit::ProcessLauncher::launchProcess): Move the bracket to the right place.

216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
2011-01-24  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>

        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Remove CleanupHandler by passing file descriptors.

        Deleting files in signal handler of UI process is not a good idea,
        because the memory where filenames are stored might not be valid
        after a crash.

        To avoid the need of using signal handlers for cleanup,
        change following:
          1) Avoid passing filenames between processes, pass fds
          2) When mmap'ing files, delete them immediately after
             opening and mmap'ing them.
          3) Pass sockets with fds during fork+exec instead of
             passing them via the filesystem.
          4) Use mmap'ed files for implementation of SharedMemory.
             QSharedMemory does not support cleanup correctly.

        Consquences:
          - Move MappedMemory to SharedMemory, make UpdateChunk use this.
          - Implement CoreIPC::Attachment using mmaped files.
          - Send messages using datagram socket. This solution works
            similiarly to Mach ports on Mac.
          - Send big messages out-of-line and thus avoid increasing
            the receive buffer.
          - Remove MemoryMappedPool and rely on libc/kernel caching
            of mmapped areas.
          - Unmap memory areas after use.
          - When UI process crashes, kill the web process using SIGKILL.
            This is possible again because cleanup handler is not needed.

        [WK2][Qt] Multiple problems with MemoryMappedPool
        https://bugs.webkit.org/show_bug.cgi?id=51984

        * Platform/CoreIPC/Attachment.cpp:
        (CoreIPC::Attachment::Attachment):
        * Platform/CoreIPC/Attachment.h:
        (CoreIPC::Attachment::size):
        (CoreIPC::Attachment::releaseFileDescriptor):
        (CoreIPC::Attachment::fileDescriptor):
        * Platform/CoreIPC/Connection.h:
        * Platform/CoreIPC/qt/ConnectionQt.cpp:
        (CoreIPC::MessageInfo::MessageInfo):
        (CoreIPC::MessageInfo::setMessageBodyOOL):
        (CoreIPC::MessageInfo::isMessageBodyOOL):
        (CoreIPC::MessageInfo::bodySize):
        (CoreIPC::MessageInfo::messageID):
        (CoreIPC::MessageInfo::attachmentCount):
        (CoreIPC::Connection::platformInitialize):
        (CoreIPC::Connection::platformInvalidate):
        (CoreIPC::SocketNotifierDisableGuard::SocketNotifierDisableGuard):
        (CoreIPC::SocketNotifierDisableGuard::~SocketNotifierDisableGuard):
        (CoreIPC::Connection::readyReadHandler):
        (CoreIPC::Connection::open):
        (CoreIPC::Connection::platformCanSendOutgoingMessages):
        (CoreIPC::Connection::sendOutgoingMessage):
        * Platform/SharedMemory.h:
        * Platform/WorkQueue.h:
        * Platform/qt/MappedMemoryPool.cpp: Removed.
        * Platform/qt/MappedMemoryPool.h: Removed.
        * Platform/qt/SharedMemoryQt.cpp:
        (WebKit::SharedMemory::Handle::Handle):
        (WebKit::SharedMemory::Handle::~Handle):
        (WebKit::SharedMemory::Handle::isNull):
        (WebKit::SharedMemory::Handle::encode):
        (WebKit::SharedMemory::Handle::decode):
        (WebKit::SharedMemory::Handle::releaseToAttachment):
        (WebKit::SharedMemory::Handle::adoptFromAttachment):
        (WebKit::SharedMemory::create):
        (WebKit::accessModeMMap):
        (WebKit::SharedMemory::~SharedMemory):
        (WebKit::accessModeFile):
        (WebKit::SharedMemory::createHandle):
        * Platform/qt/WorkQueueQt.cpp:
        (WorkQueue::registerSocketEventHandler):
        * Shared/qt/UpdateChunk.cpp:
        (WebKit::UpdateChunk::UpdateChunk):
        (WebKit::UpdateChunk::~UpdateChunk):
        (WebKit::UpdateChunk::encode):
        (WebKit::UpdateChunk::decode):
        (WebKit::UpdateChunk::createImage):
        * Shared/qt/UpdateChunk.h:
        * UIProcess/Launcher/ProcessLauncher.h:
        * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
        (WebKit::QtWebProcess::QtWebProcess):
        (WebKit::QtWebProcess::setupChildProcess):
        (WebKit::ProcessLauncher::launchProcess):
        (WebKit::ProcessLauncher::platformInvalidate):
        * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
        (WebKit::webThreadBody):
        (WebKit::ThreadLauncher::createWebThread):
        * WebKit2.pro:
        * WebProcess/qt/WebProcessMainQt.cpp:
        (WebKit::WebProcessMainQt):

313
314
315
316
317
318
319
320
321
322
323
2011-01-24  Andras Becsi  <abecsi@webkit.org>

        Reviewed by Csaba Osztrogonác.

        [Qt] Move project files into Source
        https://bugs.webkit.org/show_bug.cgi?id=52891

        * DerivedSources.pro:
        * WebKit2.pro:
        * WebProcess.pro:

324
325
326
327
328
329
330
331
332
333
334
2011-01-23  Damian Kaleta  <dkaleta@apple.com>

        Reviewed by Kevin Decker.

        <rdar://problem/8905171>
        https://bugs.webkit.org/show_bug.cgi?id=52985 

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::scaleWebView): Eliminated early return inside WebPageProxy::scaleWebView, making it 
        consistent with WebKit1.

335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
2011-01-23  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Dan Bernstein.

        https://bugs.webkit.org/show_bug.cgi?id=52968
        Use a separate NSView for printing

        Also addresses <rdar://problem/8900148> Improper check for 
        -[NSGraphicsContext currentContextDrawingToScreen]

        * UIProcess/API/mac/WKPrintingView.h: Added.
        * UIProcess/API/mac/WKPrintingView.mm: Added.
        (-[WKPrintingView initWithFrameProxy:]):
        (-[WKPrintingView isFlipped]):
        (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]):
        (-[WKPrintingView knowsPageRange:]):
        (-[WKPrintingView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
        (-[WKPrintingView drawPageBorderWithSize:]):
        (-[WKPrintingView _provideTotalScaleFactorForPrintOperation:]):
        (-[WKPrintingView rectForPage:]):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView drawRect:]):
        (-[WKView canChangeFrameLayout:]):
        (-[WKView printOperationWithPrintInfo:forFrame:]):
        * WebKit2.xcodeproj/project.pbxproj:
        Moved printing code to a separate view, simplifying as appropriate. The view is currently not
        referenced by anything in WebKit2 directly, being owned by NSPrintOperation.

363
364
365
366
367
368
369
370
371
372
373
374
2011-01-22  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Transparent windows with compositing WebKit2 content show garbage
        https://bugs.webkit.org/show_bug.cgi?id=52966
        <rdar://problem/8765051>

        * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
        (WebKit::LayerBackedDrawingAreaProxy::paint):
        If the WKView should draw transparent background, do so.

375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
2011-01-22  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Add an asynchronous WKPageForceRepaint
        https://bugs.webkit.org/show_bug.cgi?id=52964
        <rdar://problem/8898527>

        * UIProcess/API/C/WKPage.cpp:
        (WKPageForceRepaint):
        Call WebPageProxy::forceRepaint.

        * UIProcess/API/C/WKPage.h:
        Add WKPageForceRepaint.

        * UIProcess/GenericCallback.h:
        Add a "generic" VoidCallback class.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::forceRepaint):
        Insert the callback in the m_voidCallbacks map and send a forceRepaint message.

        (WebKit::WebPageProxy::voidCallback):
        Call the right void callback.

        (WebKit::WebPageProxy::processDidCrash):
        Invalidate m_voidCallbacks.

        * UIProcess/WebPageProxy.messages.in:
        Add a VoidCallback message.

        * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
        (WebKit::ChunkedUpdateDrawingArea::forceRepaint):
        Force a repaint.

        * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
        Add forceRepaint.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::forceRepaint):
        Call forceRepaint on the drawing area.

        * WebProcess/WebPage/WebPage.messages.in:
        Add a ForceRepaint message.

420
421
422
423
424
425
426
427
428
429
2011-01-21  Nikolas Zimmermann  <nzimmermann@rim.com>

        Reviewed by Dirk Schulze.

        Introduce FontMetrics abstraction
        https://bugs.webkit.org/show_bug.cgi?id=51456

        * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Use FontMetrics instead of Font to access the metrics.
        (WebKit::WebPopupMenu::setUpPlatformData):

430
431
432
433
434
435
436
437
438
2011-01-22  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Dan Bernstein.

        https://bugs.webkit.org/show_bug.cgi?id=52950
        Leak in WebPage::drawRectToPDF

        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRectToPDF): Use RetainPtr here, too.

439
440
441
442
443
444
445
446
447
448
449
2011-01-22  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Dan Bernstein.

        https://bugs.webkit.org/show_bug.cgi?id=52951
        WebKit2 generates a bad PDF for cross process messaging

        * UIProcess/API/mac/WKView.mm:
        (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
        Use a correct offset when flipping.

ap@apple.com's avatar
ap@apple.com committed
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
2011-01-21  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Dan Bernstein.

        https://bugs.webkit.org/show_bug.cgi?id=52943
        Objective-C files should use #import, not #include

        * UIProcess/API/C/WebKit2.h: This is an interesting one, because it's cross-platform, and
        there is more than one WKView.h.

        * Platform/mac/ModuleMac.mm:
        * Platform/mac/RunLoopMac.mm:
        * PluginProcess/mac/PluginControllerProxyMac.mm:
        * PluginProcess/mac/PluginProcessMac.mm:
        * PluginProcess/mac/PluginProcessMainMac.mm:
        * Shared/API/c/mac/WKCertificateInfoMac.mm:
        * Shared/API/c/mac/WKURLRequestNS.mm:
        * Shared/API/c/mac/WKURLResponseNS.mm:
        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
        * Shared/mac/PlatformCertificateInfo.mm:
        * Shared/mac/SandboxExtensionMac.mm:
        * Shared/mac/WebCoreArgumentCodersMac.mm:
        * Shared/mac/WebMemorySampler.mac.mm:
        * Shared/mac/WebURLRequestMac.mm:
        * Shared/mac/WebURLResponseMac.mm:
        * UIProcess/API/mac/FindIndicatorWindow.mm:
        * UIProcess/API/mac/WKTextInputWindowController.mm:
        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
        * UIProcess/Launcher/mac/ThreadLauncherMac.mm:
        * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
        * UIProcess/mac/BackingStoreMac.mm:
        * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
        * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
        * UIProcess/mac/TextCheckerMac.mm:
        * UIProcess/mac/WebContextMac.mm:
        * UIProcess/mac/WebContextMenuProxyMac.mm:
        * UIProcess/mac/WebPageProxyMac.mm:
        * UIProcess/mac/WebPopupMenuProxyMac.mm:
        * UIProcess/mac/WebPreferencesMac.mm:
        * WebProcess/Downloads/mac/DownloadMac.mm:
        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
        * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
        * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
        * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm:
        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
        * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
        * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
        * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
        * WebProcess/WebPage/mac/WebPageMac.mm:
        * WebProcess/mac/WebProcessMac.mm:

502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
2011-01-21  Mark Rowe  <mrowe@apple.com>

        Reviewed by Sam Weinig.

        Fix the WebKit2 build with clang.

        * Scripts/webkit2/messages.py: Add some more structs to the list.
        * UIProcess/DrawingAreaProxy.h: Forward-declare UpdateInfo as a class.
        * UIProcess/TextChecker.h: Forward-declare TextCheckerState as a struct.
        * UIProcess/WebPageProxy.h: Forward-declare ContextMenuState as a struct.
        * UIProcess/mac/TextCheckerMac.mm: Fix the type of the string constants so that they can be passed to
        functions expecting NSString* without generating warnings.
        * WebProcess/WebPage/DrawingArea.h: Forward-declare WebPageCreationParameters as a struct.
        * WebProcess/WebPage/DrawingAreaImpl.h: Forward-declare UpdateInfo as a class.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::getResourceDataFromFrame): Add parens around the assignment in the condition of
        the if statement to suppress a warning.

520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
2011-01-21  Brian Weinstein  <bweinstein@apple.com>

        Reviewed by Adam Roben.

        WebKit2: Need API to stop loading a WKFrame
        https://bugs.webkit.org/show_bug.cgi?id=52925

        * UIProcess/API/C/WKFrame.cpp:
        (WKFrameStopLoading): Call through to WebFrameProxy::stopLoading.
        * UIProcess/API/C/WKFrame.h:
        * UIProcess/WebFrameProxy.cpp:
        (WebKit::WebFrameProxy::stopLoading): Send a message to the WebProcess to stop loading the frame
            with the passed in ID.
        * UIProcess/WebFrameProxy.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::stopLoadingFrame): Call stopForUserCancel on the passed-in frame.
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in: Add StopLoadingFrame.

539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
2011-01-21  Brady Eidson  <beidson@apple.com>

        Reviewed by Adam Roben.

        <rdar://problem/8894125> and https://bugs.webkit.org/show_bug.cgi?id=52916
        Expose "suggested filename" for a resource based on its resource response.

        API pieces:
        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
        (WKBundleFrameCopySuggestedFilenameForResourceURL):
        * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
        
        Implementation:
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::suggestedFilenameForResourceURL): See if the DocumentLoader has
          a resource for this URL and, if so, return the response's suggested filename.
        * WebProcess/WebPage/WebFrame.h:

557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
2011-01-21  Anders Carlsson  <andersca@apple.com>

        Reviewed by Dan Bernstein.

        DrawingAreaProxyImpl::paint should return the unpainted region
        https://bugs.webkit.org/show_bug.cgi?id=52918

        * UIProcess/API/mac/WKView.mm:
        (-[WKView drawRect:]):
        Add unpaintedRegion parameter.

        * UIProcess/BackingStore.h:
        (WebKit::BackingStore::size):
        Add a size getter.

        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::paint):
        Initialize the unpainted region to the dirty region, then subtract the painted region.

576
577
578
579
580
581
582
583
584
585
2011-01-21  Anders Carlsson  <andersca@apple.com>

        Reviewed by Dan Bernstein and Maciej Stachowiak.

        Fix for <rdar://problem/8896057>

        Give the Web Process access to the PubSub agent.

        * WebProcess/com.apple.WebProcess.sb:

586
587
588
589
590
591
592
593
594
595
596
597
598
599
2011-01-21  Sam Weinig  <sam@webkit.org>

        Reviewed by Anders Carlsson.

        Part 2 of "Cleanup Scrollbar/ScrollbarClient relationship"
        https://bugs.webkit.org/show_bug.cgi?id=52779

        Rename ScrollbarClient -> ScrollableArea.

        * UIProcess/win/WebPopupMenuProxyWin.cpp:
        (WebKit::WebPopupMenuProxyWin::onMouseWheel):
        (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
        * UIProcess/win/WebPopupMenuProxyWin.h:

600
601
602
603
604
605
606
607
608
609
610
2011-01-21  Adam Roben  <aroben@apple.com>

        Update for WKCACFLayerRenderer -> CACFLayerView rename

        Fixes <http://webkit.org/b/52898> WKCACFLayerRenderer sounds like a render object, but isn't

        Reviewed by Simon Fraser.

        * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Just removed all the unnecessary
        #includes.

611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
2011-01-20  Darin Adler  <darin@apple.com>

        Reviewed by Dan Bernstein.

        WebKit2: Implement showModalDialog
        https://bugs.webkit.org/show_bug.cgi?id=52855

        * Shared/WebPageCreationParameters.h: Added canRunModal.

        * UIProcess/API/C/WKPage.h: Added a runModal function pointer to
        WKPageUIClient. Also removed a lot of redundant typedefs and added
        a new one, WKPageCallback, for callbacks without arguments or return
        values.

        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPage::QWKPage): Added a runModal function pointer of 0.

        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::creationParameters): Set canRunModal
        based on return value of WebUIClient::canRunModal.

        * UIProcess/WebPageProxy.h: Added runModal.
        Calls WebUIClient::runModal.

        * UIProcess/WebPageProxy.messages.in: Added RunModal message.
        Also removed the periods from the phrases in the comments
        as Maciej requested a while back.

        * UIProcess/WebUIClient.cpp:
        (WebKit::WebUIClient::canRunModal): Added. Returns true or false
        based on whether a runModal function was supplied in the
        WKPageUIClient structure.
        (WebKit::WebUIClient::runModal): Added. Calls the runModal
        function from the WKPageUIClient structure.
        * UIProcess/WebUIClient.h: Declared the above functions.

        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::canRunModal): Call through to WebPage.
        (WebKit::WebChromeClient::runModal): Ditto.

        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::WebPage): Initialize m_canRunModal based on the
        creation parameters. Initialize m_isRunningModal to false.
        (WebKit::WebPage::close): Stop the nested run loop if we are running modal.
        (WebKit::WebPage::runModal): Send a message to ask the UI process to run
        modal and then start a nested run loop. It gets stopped when the page is closed.
        * WebProcess/WebPage/WebPage.h: Defined the canRunModal function
        and declared the runModal function.

ap@apple.com's avatar
ap@apple.com committed
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
2011-01-20  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=52849
        Make window.print work with WebKit2

        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPage::QWKPage):
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::printFrame):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * UIProcess/WebUIClient.cpp:
        (WebKit::WebUIClient::printFrame):
        * UIProcess/WebUIClient.h:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::print):
        Just pass through deelagte call to a WebKit2 client.

        * UIProcess/API/C/WKPage.h: Also added "Callback" suffix to other printing related function
        types.

683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
2011-01-20  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin Adler.

        Keep track of the latest update timestamp in the backing store
        https://bugs.webkit.org/show_bug.cgi?id=52848

        * Shared/UpdateInfo.h:
        (WebKit::UpdateInfo::UpdateInfo):
        Initialize timestamp to 0.

        * UIProcess/BackingStore.cpp:
        (WebKit::BackingStore::BackingStore):
        Initialize m_latestUpdateTimestamp to 0.

        (WebKit::BackingStore::incorporateUpdate):
        If the update is too old, discard it. Otherwise, create a bitmap
        and pass it to platformIncorporateUpdate. Finally update the timestamp.

        * UIProcess/BackingStore.h:
        Add m_latestUpdateTimestamp.

        * UIProcess/mac/BackingStoreMac.mm:
        (WebKit::BackingStore::platformIncorporateUpdate):
        Update now that we are already given the shareable bitmap.

709
710
711
712
713
714
715
716
717
718
719
2011-01-20  Beth Dakin  <bdakin@apple.com>

        Reviewed by Geoffrey Garen.

        Fix for <rdar://problem/8890255>

        Allow WebKitSystemInterface to draw scrollbars 
        when appropriate.
        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
        (InitWebCoreSystemInterface):

720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
2011-01-20  Sam Weinig  <sam@webkit.org>

        Reviewed by Dave Hyatt.

        Cleanup Scrollbar/ScrollbarClient relationship
        https://bugs.webkit.org/show_bug.cgi?id=52779

        * UIProcess/win/WebPopupMenuProxyWin.cpp:
        (WebKit::WebPopupMenuProxyWin::scrollPosition):
        (WebKit::WebPopupMenuProxyWin::setScrollOffset):
        (WebKit::WebPopupMenuProxyWin::scrollTo):
        (WebKit::WebPopupMenuProxyWin::onMouseWheel):
        (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
        * UIProcess/win/WebPopupMenuProxyWin.h:
        (WebKit::WebPopupMenuProxyWin::verticalScrollbar):

736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
2011-01-20  Anders Carlsson  <andersca@apple.com>

        Reviewed by Adam Roben.

        Add a timestamp to UpdateInfo
        https://bugs.webkit.org/show_bug.cgi?id=52844

        * Shared/UpdateInfo.cpp:
        (WebKit::UpdateInfo::encode):
        (WebKit::UpdateInfo::decode):
        * Shared/UpdateInfo.h:
        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::setSize):
        (WebKit::DrawingAreaImpl::display):

751
752
753
754
755
756
757
758
759
760
2011-01-20  Anders Carlsson  <andersca@apple.com>

        Reviewed by Beth Dakin.

        Add Connection::waitForAndDispatchImmediately
        https://bugs.webkit.org/show_bug.cgi?id=52841

        * Platform/CoreIPC/Connection.h:
        (CoreIPC::Connection::waitForAndDispatchImmediately):

761
762
763
764
765
766
767
768
769
770
771
772
773
774
2011-01-20  Kevin Decker  <kdecker@apple.com>

        Reviewed by Anders Carlsson.

        <rdar://problem/8880689> need a way to obtain the rendered rectangle for box elements
        https://bugs.webkit.org/show_bug.cgi?id=52823
        
        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
        (WKBundleNodeHandleGetRenderRect): Added new method that will return a rendered rectangle for box elements
        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: Ditto.
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: Ditto.
        (WebKit::InjectedBundleNodeHandle::renderRect): Ditto.
        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Ditto.

775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
2011-01-20  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>

        Reviewed by Andreas Kling.

        Remove null ptr deref that happens when reattaching to
        a new web process.

        Implement didRelaunchProcess that sets the drawing area size
        after the drawing area is re-instantiated.

        [Qt][WK2] Null ptr deref in UI process after web process has crashed
        https://bugs.webkit.org/show_bug.cgi?id=52796

        * UIProcess/API/qt/qgraphicswkview.cpp:
        (QGraphicsWKView::QGraphicsWKView):
        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPagePrivate::QWKPagePrivate):
        (QWKPagePrivate::init):
        (QWKPagePrivate::createDrawingAreaProxy):
        (QWKPagePrivate::didRelaunchProcess): Reset drawing area size after crash.
        * UIProcess/API/qt/qwkpage_p.h:

797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
2011-01-20  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Adam Roben.

        WebKitTestRunner needs to support layoutTestController.evaluateScriptInIsolatedWorld
        https://bugs.webkit.org/show_bug.cgi?id=42327
        
        Added a new API call, WKBundleFrameForJavaScriptContext, that gets the WKBundleFrameRef
        that corresponds to a JSContextRef (or null if none).

        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
        (WKBundleFrameForJavaScriptContext): Simple wrapper, defers to a WebFrame
        static method.
        * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
        * WebProcess/WebPage/WebFrame.cpp:
        (WebKit::WebFrame::frameForContext): Follow the maze of twisty pointers.
        * WebProcess/WebPage/WebFrame.h:

815
816
817
818
819
820
821
822
2011-01-20  Alejandro G. Castro  <alex@igalia.com>

        Fix compilation error in GTK WebKit2.

        * Platform/CoreIPC/gtk/ConnectionGtk.cpp:
        (CoreIPC::readBytesFromSocket):
        (CoreIPC::writeBytesToSocket):

823
824
825
826
827
828
829
830
831
832
833
2011-01-20  Zoltan Horvath  <zoltan@webkit.org>

        Reviewed by Csaba Osztrogonác.

        Refactoring of the custom allocation framework
        https://bugs.webkit.org/show_bug.cgi?id=49897

        Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
        The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
        equivalent macro implementation at the necessary places.

834
835
836
837
838
839
840
2011-01-19  Simon Fraser  <simon.fraser@apple.com>

        Fix the WebKit2 build.

        * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
        (WebKit::LayerBackedDrawingArea::syncCompositingLayers):

841
842
843
844
845
846
847
848
849
850
851
852
853
2011-01-19  Brian Weinstein  <bweinstein@apple.com>

        Reviewed by Darin Adler.

        WebKit2: Need API to get the parent frame of a frame
        https://bugs.webkit.org/show_bug.cgi?id=52774
        
        Add the API to get the parent frame of a frame.

        * UIProcess/API/C/WKFrame.cpp:
        (WKFrameGetParentFrame):
        * UIProcess/API/C/WKFrame.h:

854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
2011-01-19  Enrica Casucci  <enrica@apple.com>

        Reviewed by Darin Adler.

        WebKit2: add support for drag and drop
        https://bugs.webkit.org/show_bug.cgi?id=52343
        <rdar://problem/7660558>
        
        This patch contains the remaining work to support drag and drop on Mac.
        I've added a PasteboardTypes class to encapsulate all the pasteboard formats
        supported for drag and drop.
        In this implementation we don't support the promised types, since I could not
        find an efficient way to do this across processes.
        The bulk of the patch consists in creating a shareable bitmap for the drag image,
        pass its handle to the UI process and create a new NSImage from it to be given to
        AppKit for dragging.
        I've added the missing implementation of the methods in the drag client to hook
        up the placement of the data in the pasteboard.
        
        * Shared/mac/PasteboardTypes.h: Added.
        * Shared/mac/PasteboardTypes.mm: Added.
        (WebKit::PasteboardTypes::forEditing):
        (WebKit::PasteboardTypes::forURL):
        (WebKit::PasteboardTypes::forImages):
        (WebKit::PasteboardTypes::forImagesWithArchive):
        * UIProcess/API/mac/PageClientImpl.h:
        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::setDragImage): Added.
        * UIProcess/API/mac/WKView.mm:
        (-[WKView _registerDraggedTypes]): Refactored to use the new PasteboardTypes class.
        (-[WKView initWithFrame:contextRef:pageGroupRef:]):
        (-[WKView _setMouseDownEvent:]):
        (-[WKView _mouseHandler:]):
        (-[WKView mouseDown:]):
        (-[WKView mouseUp:]):
        (-[WKView mouseDragged:]):
        (-[WKView draggedImage:endedAt:operation:]):
        (-[WKView draggingEntered:]):
        (-[WKView _setDragImage:at:linkDrag:]):
        * UIProcess/API/mac/WKViewInternal.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::setDragImage):
        (WebKit::WebPageProxy::dragEnded):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebKit2.xcodeproj/project.pbxproj:
        * WebProcess/WebCoreSupport/WebDragClient.cpp:
        * WebProcess/WebCoreSupport/WebDragClient.h:
        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: Added.
        (WebKit::fontFromNSFont):
        (WebKit::WebDragClient::startDrag): Added implementation.
        (WebKit::WebDragClient::createDragImageForLink): Ditto.
        (WebKit::writeURL): Helper function.
        (WebKit::writeImage): Helper function.
        (WebKit::WebDragClient::declareAndWriteDragImage): Added implementation.
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::dragEnded):
        * WebProcess/WebPage/WebPage.h:
        * WebProcess/WebPage/WebPage.messages.in:

915
916
917
918
919
920
921
922
923
924
925
2011-01-19  Anders Carlsson  <andersca@apple.com>

        Reviewed by Dan Bernstein.

        Put the deprecated Connection member functions next to eachother
        https://bugs.webkit.org/show_bug.cgi?id=52767

        * Platform/CoreIPC/Connection.h:
        (CoreIPC::Connection::sendSync):
        (CoreIPC::Connection::send):

926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
2011-01-19  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        When resizing, the web process should repaint the page
        https://bugs.webkit.org/show_bug.cgi?id=52764

        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::didSetSize):
        Incorporate the update.

        (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
        Return early if the update bounds rect is empty. This can happen if painting is
        disabled and we get a DidSetSize message.

        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::setSize):
        If painting is disabled, just send back an empty UpdateInfo struct. Otherwise,
        paint and fill in the UpdateInfo struct.

        (WebKit::DrawingAreaImpl::display):
        Assert that painting is not disabled.

ap@apple.com's avatar
ap@apple.com committed
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
2011-01-19  Alexey Proskuryakov  <ap@apple.com>

        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=52739
        Make it possible for a WebKit2 client to print headers and footers

        * UIProcess/API/C/WKPage.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::headerHeight):
        (WebKit::WebPageProxy::footerHeight):
        (WebKit::WebPageProxy::drawHeader):
        (WebKit::WebPageProxy::drawFooter):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebUIClient.cpp:
        (WebKit::WebUIClient::headerHeight):
        (WebKit::WebUIClient::footerHeight):
        (WebKit::WebUIClient::drawHeader):
        (WebKit::WebUIClient::drawFooter):
        * UIProcess/WebUIClient.h:
        Pass UIClient calls through.

        * UIProcess/API/mac/WKView.mm:
        (currentPrintOperationScale): A helper to extract scale factor from the current NSPrintOperation.
        (-[WKView _adjustPrintingMarginsForHeaderAndFooter]): Copied from WebKit1. Change current
        print info to account for header and footer height as provided by the client.
        (-[WKView knowsPageRange:]): Call -[self _adjustPrintingMarginsForHeaderAndFooter].
        (-[WKView drawPageBorderWithSize:]): When AppKit asks to print page border, call the client
        to do that. Code adapted form WebKit1.

        * UIProcess/API/qt/qwkpage:
        (QWKPage::QWKPage): Added zeroes for new WKPageUIClient members to avoid breaking the build.

982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2011-01-19  Jessie Berlin  <jberlin@apple.com>

        Reviewed by Darin Adler.

        Crash in WebDatabaseManagerProxy::getDatabaseOrigins when called after the WebProcess has
        died at least once
        https://bugs.webkit.org/show_bug.cgi?id=52730

        WebDatabaseManagerProxy::invalidate was setting m_webContext to 0, and invalidate gets
        called in WebContext::processDidClose. However, m_webContext is only set in the
        constructor, which is only called from the constructor of WebContext, so attempting to send
        a message to any new WebProcess after the first one died was causing a null deref.

        This patch moves setting m_webcontext into clearContext and clearContext is only called in
        the WebContext destructor.

        This patch also adds checks for a valid WebProcessProxy before attempting to send messages to
        the WebProcessProxy so that if the WebProcess has died and has not been revived, it does not
        attempt to dereference a null WebProcessProxy.