/
ChangeLog
7035 lines (5161 loc) · 261 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
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
363
364
365
366
367
368
369
370
371
372
373
374
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
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
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
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
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
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
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
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
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
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
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
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2010-07-22 Anders Carlsson <andersca@apple.com>
Reviewed by Adam Roben.
It should be possible to attach to the WebProcess in gdb during startup
https://bugs.webkit.org/show_bug.cgi?id=42853
Create an unique bootstrap service name and pass it to the web process, instead of registering a per process
name (which was incorrect anyway). This lets us get rid of the requirement that the UI process always should be
the parent process of the web process, something which is false when running under the debugger.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess):
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain):
2010-07-22 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Don't assert when Connection::invalidate is called before Connection::dispatchConnectionDidClose
https://bugs.webkit.org/show_bug.cgi?id=42851
* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::dispatchConnectionDidClose):
Just return early if m_client is 0.
2010-07-22 Adam Roben <aroben@apple.com>
Use ::MessageBox instead of ::DebugBreak to make the web process wait
for a debugger
While ::DebugBreak can make it easier to attach a debugger (because it
brings up the Just-in-Time debugger window), using ::MessageBox has
two advantages:
1) It explains to the user what's going on, so it's harder to
mistake this debugging aid for a bug.
2) It allows you to debug the UI process and the web process using
the same debugger, if desired.
Special thanks to John Sullivan for help with the text that's shown in
the alert.
Fixes <http://webkit.org/b/42848> WebKit2's wait-for-debugger
debugging aid should explain to the user what's happening
Reviewed by John Sullivan and Anders Carlsson.
* WebProcess/WebKitMain.cpp:
(WebKitMain): Use a ::MessageBox instead of a ::DebugBreak to wait for
the debugger. The alert explains to the user what's going on.
2010-07-22 Adam Roben <aroben@apple.com>
Make WorkQueue aware of potential errors with ::WaitForMultipleObjects
Fixes <http://webkit.org/b/42846> WorkQueue should detect
::WaitForMultipleObject failures
Reviewed by Anders Carlsson.
* Platform/win/WorkQueueWin.cpp:
(WorkQueue::workQueueThreadBody): Added some assertions about the
various things that can fail with ::WaitForMultipleObjects,
specifically:
- Passing too many objects
- Timeouts (which shouldn't happen since we pass a timeout interval
of INFINITE)
- Abandoned mutexes (which shouldn't happen since we don't wait on
any mutexes currently)
- Miscellaneous failures
2010-07-22 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Patch for https://bugs.webkit.org/show_bug.cgi?id=42836
Add localized strings stubs for WebKit2.
Gets us below 200 tests failing in WebKitTestRunner.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2010-07-22 Andras Becsi <abecsi@webkit.org>
Unreviewed trivial build fix.
[Qt] Mend remaining issues to fix the WebKit2 build.
* Shared/qt/UpdateChunk.h: add missing function
(WebKit::UpdateChunk::isEmpty):
* UIProcess/API/qt/qwkpage_p.h: Add stub implementation
(QWKPagePrivate::pageDidEnterAcceleratedCompositing):
(QWKPagePrivate::pageDidLeaveAcceleratedCompositing):
2010-07-22 Andras Becsi <abecsi@webkit.org>
Reviewed by Antonio Gomes.
[Qt] Implement WebContext::applicationCacheDirectory() for the Qt port of WebKit2.
https://bugs.webkit.org/show_bug.cgi?id=42830
* UIProcess/qt/WebContextQt.cpp: Added.
(WebKit::WebContext::applicationCacheDirectory):
2010-07-22 Balazs Kelemen <kb@inf.u-szeged.hu>
Unreviewed build fix.
[Qt] Fix WebKit2 build
https://bugs.webkit.org/show_bug.cgi?id=42638
* UIProcess/API/qt/qwkpage_p.h:
(QWKPagePrivate::setCursor): Added empty implementation.
2010-07-22 Balazs Kelemen <kb@inf.u-szeged.hu>
Reviewed by Antonio Gomes.
Lazy cursor creation should be guarded by #if USE(LAZY_NATIVE_CURSOR) in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=42622
* Shared/WebCoreArgumentCoders.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessage):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::setCursor):
2010-07-22 Jon Honeycutt <jhoneycutt@apple.com>
Build fix. Unreviewed.
* win/WebKit2WebProcess.vcproj:
Remove the pre- and post-build events, so that they will use the value
inherited from the vsprops.
2010-07-21 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
WebKitTestRunner needs layoutTestController.dumpChildFrameScrollPositions
https://bugs.webkit.org/show_bug.cgi?id=42548
Added WKBundleFrameCopyName.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameCopyName): Added.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::name): Added.
* WebProcess/WebPage/WebFrame.h: Ditto.
2010-07-21 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
WebKitTestRunner needs to support dumping of scroll position
https://bugs.webkit.org/show_bug.cgi?id=42514
Added WKBundleFrameGetJavaScriptContext function.
* WebKit2.xcodeproj: Added property svn:ignore.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameGetJavaScriptContext): Added.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
Use JSGlobalContextRef instead of JSContextRef and context instead of ct.
2010-07-21 Adam Roben <aroben@apple.com>
Handle broken pipes in more places in CoreIPC
Fixes <http://webkit.org/b/42784> Assertion failure in
Connection::readEventHandler when WebKitTestRunner exits
Reviewed by Anders Carlsson.
* Platform/CoreIPC/win/ConnectionWin.cpp:
(CoreIPC::Connection::readEventHandler): Check for a broken pipe
whenever we call ::PeekNamedPipe.
2010-07-21 Adam Roben <aroben@apple.com>
Teach CoreIPC how to handle messages that are larger than the pipe's
buffer
::GetOverlappedResult and ::ReadFile can fail with ERROR_MORE_DATA
when there is more data available on the pipe than was requested in
the read operation. In those cases, the appropriate response is to
perform another read operation to read the extra data. We now do this.
Also, MSDN says that, because we are doing asynchronous read
operations, we should not pass a pointer to ::ReadFile to find out how
many bytes were read. Instead we should always call
::GetOverlappedResult to find this out. I've changed
Connection::readEventHandler to have a single loop that calls
::GetOverlappedResult and ::ReadFile in alternation, rather than
sometimes calling ::ReadFile multiple times in a row, to satisfy this
requirement.
In order to simplify the logic in this function, I've made us request
only a single byte from the pipe when there are no messages already in
the pipe. (Previously we were requesting 4096 bytes in this case.)
This allows us not to have to consider the case where the received
message is smaller than our read buffer. If we decide that this has a
negative impact on performance, we can of course change it. I've
mitigated this somewhat by using ::PeekNamedMessage to find out the
size of the next message in the pipe (if any), so that we can read it
all in one read operation.
Fixes <http://webkit.org/b/42710> <rdar://problem/8197571> Assertion
in Connection::readEventHandler when launching WebKitTestRunner
Reviewed by Anders Carlsson.
* Platform/CoreIPC/win/ConnectionWin.cpp:
(CoreIPC::Connection::readEventHandler): Put the call to
::GetOverlappedResult in the same loop as ::ReadFile so that we will
call them alternately. If ::GetOverlappedResult fails with
ERROR_MORE_DATA, use ::PeekNamedPipe to determine the size of the rest
of the message, then read it from the pipe. After dispatching the
message, use ::PeekNamedPipe to find out the size of the next message
in the pipe so we can read it all in one operation. If there's no
message in the pipe, we'll request just a single byte of the next
message that becomes available, and Windows will tell us when the rest
of the message is ready. If ::ReadFile fails with ERROR_MORE_DATA it
means there is data available now even though we didn't think there
was any. We go back to the top of the loop in this case and call
::GetOverlappedResult again to retrieve the available data.
2010-07-21 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
Patch for https://bugs.webkit.org/show_bug.cgi?id=42539
WebKitTestRunner needs to support printing ALERT, PROMPT and CONFIRM messages
- Convert injected bundle UIClient functions to will-style, at least until we establish
more concrete use cases for them past the TestRunner.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::willAddMessageToConsole):
(WebKit::InjectedBundlePageUIClient::willSetStatusbarText):
(WebKit::InjectedBundlePageUIClient::willRunJavaScriptAlert):
(WebKit::InjectedBundlePageUIClient::willRunJavaScriptConfirm):
(WebKit::InjectedBundlePageUIClient::willRunJavaScriptPrompt):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::addMessageToConsole):
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
(WebKit::WebChromeClient::setStatusbarText):
2010-07-21 Simon Fraser <simon.fraser@apple.com>
Windows build fix.
Need to supply implementations of PageClient::pageDidEnterAcceleratedCompositing()
and pageDidLeaveAcceleratedCompositing() for WebView on Windows.
* UIProcess/win/WebView.cpp:
(WebKit::WebView::pageDidEnterAcceleratedCompositing):
(WebKit::WebView::pageDidLeaveAcceleratedCompositing):
* UIProcess/win/WebView.h:
2010-07-21 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Don't assert when clicking on a plug-in in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=42762
Add stub for PluginView::handleEvent.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::handleEvent):
* WebProcess/Plugins/PluginView.h:
2010-07-21 Simon Fraser <simon.fraser@apple.com>
Reviewed by Anders Carlsson.
Get accelerated compositing working with webkit2
https://bugs.webkit.org/show_bug.cgi?id=41084
Hook up dynamic DrawingArea switching, so that when the WebProcess hits a page
that requires accelerated compositing, we switch to the LayerBackedDrawingArea.
* Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
(DrawingAreaProxyMessage::):
* Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
(WebPageProxyMessage::):
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::pageDidEnterAcceleratedCompositing):
(WebKit::PageClientImpl::pageDidLeaveAcceleratedCompositing):
* UIProcess/API/mac/WKView.mm:
(-[WKView _startAcceleratedCompositing:]):
(-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaProxy::]):
(-[WKView _pageDidEnterAcceleratedCompositing]):
(-[WKView _pageDidLeaveAcceleratedCompositing]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::didReceiveSyncMessage):
* UIProcess/ChunkedUpdateDrawingAreaProxy.h:
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::):
(WebKit::DrawingAreaProxy::type):
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
(WebKit::LayerBackedDrawingAreaProxy::didSetSize):
(WebKit::LayerBackedDrawingAreaProxy::didReceiveMessage):
(WebKit::LayerBackedDrawingAreaProxy::didReceiveSyncMessage):
* UIProcess/LayerBackedDrawingAreaProxy.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setDrawingArea):
(WebKit::WebPageProxy::didReceiveSyncMessage):
(WebKit::WebPageProxy::didEnterAcceleratedCompositing):
(WebKit::WebPageProxy::didLeaveAcceleratedCompositing):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
(WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::attachRootGraphicsLayer):
* WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
(WebKit::ChunkedUpdateDrawingArea::attachCompositingContext):
(WebKit::ChunkedUpdateDrawingArea::setRootCompositingLayer):
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::):
(WebKit::DrawingArea::type):
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
(WebKit::LayerBackedDrawingArea::setNeedsDisplay):
(WebKit::LayerBackedDrawingArea::setSize):
(WebKit::LayerBackedDrawingArea::didUpdate):
(WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
* WebProcess/WebPage/LayerBackedDrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::changeAcceleratedCompositingMode):
(WebKit::WebPage::enterAcceleratedCompositingMode):
(WebKit::WebPage::exitAcceleratedCompositingMode):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
(WebKit::LayerBackedDrawingArea::platformInit):
(WebKit::LayerBackedDrawingArea::attachCompositingContext):
(WebKit::LayerBackedDrawingArea::detachCompositingContext):
(WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
2010-07-20 Steve Falkenburg <sfalken@apple.com>
Reviewed by Adam Roben.
WebKit on Windows should build optionally with an unversioned ICU DLL
https://bugs.webkit.org/show_bug.cgi?id=42722
<rdar://problem/8211767> WebKit needs to link against unversioned ICU
To get the proper value for U_DISABLE_RENAMING into all source files, we force
the include of ICUVersion.h (our generated header) via the compiler options.
Since the versioned and unversioned ICU have different filenames (libicuuc.lib vs icuuc.lib)
we copy the ICU lib to an intermediate location under obj with a common name. This
allows us to link properly with either without adding a new build configuration.
* win/WebKit2Common.vsprops:
Copy ICU libs into a common location with a common name.
Add additional library search path to pick up icu lib.
Change ICU library filename specified to linker.
Add forced include of ICUVersion.h.
2010-07-21 Adam Roben <aroben@apple.com>
Windows build fix
* Shared/win/UpdateChunk.h:
(WebKit::UpdateChunk::isEmpty): Added to match the Mac definition.
2010-07-21 Anders Carlsson <andersca@apple.com>
Land file I forgot to add.
* WebProcess/com.apple.WebProcess.sb: Added.
2010-07-21 Adam Roben <aroben@apple.com>
Move WebKit2WebProcess's settings to a vsprops file
Fixes <http://webkit.org/b/42751> WebKit2WebProcess should use vsprops
files
Reviewed by Darin Adler.
* win/WebKit2WebProcess.vcproj: Moved settings from here...
* win/WebKit2WebProcessCommon.vsprops: ...to here.
2010-07-20 Ivan Krstić <ike@apple.com>
Reviewed and tweaked by Anders Carlsson and Sam Weinig.
Put WebProcess in a sandbox. All of the following changes are
Mac-only.
<rdar://problem/7865269>
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
Send Sandbox extension for injected bundle to WebProcess.
* WebKit2.xcodeproj/project.pbxproj:
Add Sandbox profile to Resources for WebProcess.
* WebProcess/InjectedBundle/InjectedBundle.h:
New function InjectedBundle::setSandboxToken.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
(WebKit::InjectedBundle::load):
Consume Sandbox token for the bundle if present.
(WebKit::InjectedBundle::setSandboxToken):
Set Sandbox token for the bundle.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::loadInjectedBundle):
Extra function parameter for Sandbox token.
(WebKit::WebProcess::didReceiveMessage):
Pass Sandbox token to loadInjectedBundle().
* WebProcess/WebProcess.h:
Extra function parameter for Sandbox token in loadInjectedBundle().
* WebProcess/com.apple.WebProcess.sb: Added.
Sandbox profile for WebProcess.
* WebProcess/mac/WebProcessMainMac.mm:
(WebKit::WebProcessMain):
Initialize Sandbox, exit on failure.
2010-07-20 Sam Weinig <sam@webkit.org>
Reviewed by Brady Eidson.
Patch for https://bugs.webkit.org/show_bug.cgi?id=42719
Make Acid2 pass in WebKit2
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::objectContentType): Check for supported image mimetypes
before falling back to plugins.
2010-07-20 Adam Roben <aroben@apple.com>
Remove WebKit2.sln
WebKit.sln builds all the same projects.
Rubber-stamped in advance by Steve Falkenburg.
* WebKit2.sln: Removed.
2010-07-20 Adam Roben <aroben@apple.com>
Make the web process break into the debugger when Ctrl-Alt-Shift is
held during launch
Fixes <http://webkit.org/b/42670> Would like a way to break into the
debugger when the web process launches
Reviewed by Anders Carlsson.
* WebProcess/WebKitMain.cpp:
(WebKitMain): If the Control, Alt, and Shift keys are held down in a
Debug build, call DebugBreak() so that we will break into the
debugger.
2010-07-20 Adam Roben <aroben@apple.com>
Teach Connection how to handle a slow receiver
Fixes <http://webkit.org/b/42667> Assertion in
Connection::sendOutgoingMessage when browser or web process is paused
Reviewed by Anders Carlsson.
* Platform/CoreIPC/win/ConnectionWin.cpp:
(CoreIPC::Connection::sendOutgoingMessage): If WriteFile returns FALSE
and the last error is ERROR_IO_PENDING, Windows will write the data as
soon as the current write operation is completed. We don't need to do
anything special in this case, so there's no need to assert about it.
2010-07-20 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Handle WKView visibility changes
<rdar://problem/7891077>
* Shared/mac/UpdateChunk.h:
(WebKit::UpdateChunk::isEmpty):
Add convenience getter.
* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]):
Reorder the calls to _updateActiveState and _updateVisibility based on whether the view is moved to
a window or away from a window.
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
Initialize m_forceRepaintWhenResumingPainting to false.
(WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
Pass the m_forceRepaintWhenResumingPainting along to the DrawingAreaMessage::ResumePainting message.
(WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize):
Don't try to paint empty update chunks.
(WebKit::ChunkedUpdateDrawingAreaProxy::update):
Don't paint the update chunk if we're not visible. Instead, make sure that the entire page is being redrawn
when its shown again.
* UIProcess/ChunkedUpdateDrawingAreaProxy.h:
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
(WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
(WebKit::ChunkedUpdateDrawingArea::display):
(WebKit::ChunkedUpdateDrawingArea::suspendPainting):
Rename m_shouldPaint to m_isPaintingSuspended and invert its logic.
(WebKit::ChunkedUpdateDrawingArea::scheduleDisplay):
Don't schedule a display timer if the dirty rect is empty.
(WebKit::ChunkedUpdateDrawingArea::setSize):
If painting is suspended, just send back an empty update chunk in the DidSetSize message.
(WebKit::ChunkedUpdateDrawingArea::resumePainting):
If forceRepaint is true, repaint the entire drawing area.
2010-07-20 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Implement NPN_GetURL and NPN_PostURL
https://bugs.webkit.org/show_bug.cgi?id=42650
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::parsePostBuffer):
Add a FIXME about deleting the file.
(WebKit::makeURLString):
Move this static method before NPN_GetURL.
(WebKit::NPN_GetURL):
Call NetscapePLugin::LoadURL.
(WebKit::NPN_PostURL):
Ditto.
(WebKit::NPN_PostURLNotify):
* WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
Remove unreached code.
(WebKit::NetscapePluginStream::deliverDataToPlugin):
Stop the stream if the plug-in returns -1 from NPP_Write.
2010-07-19 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
WebKitTestRunner and WebProcess simultaneously stall in CoreIPC::Connection::sendOutgoingMessage
https://bugs.webkit.org/show_bug.cgi?id=42356
Up the port queue length from 5 to 1024. While this does solve the problem, we should still try to
make sendOutgoingMessage not block. I've filed https://bugs.webkit.org/show_bug.cgi?id=42611 to track
doing this on Mac and Windows.
* Platform/CoreIPC/mac/ConnectionMac.cpp:
(CoreIPC::Connection::open):
Call setMachPortQueueLength.
* Platform/mac/MachUtilities.cpp: Added.
(setMachPortQueueLength):
Given a mach port receive right, sets the port queue length.
* Platform/mac/MachUtilities.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
Add MachUtilities.cpp and MachUtilities.h
2010-07-19 Anders Carlsson <andersca@apple.com>
Reviewed by Darin Adler, Adam Roben, Dan Bernstein and Sam Weinig.
Handle NP_ASFILE and NP_ASFILEONLY transfer modes
https://bugs.webkit.org/show_bug.cgi?id=42587
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NPP_StreamAsFile):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
Add NPP_ wrapper.
* WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
(WebKit::NetscapePluginStream::NetscapePluginStream):
Initialize m_fileHandle.
(WebKit::isSupportedTransferMode):
NP_ASFILE and NP_ASFILEONLY is now supported.
(WebKit::NetscapePluginStream::deliverData):
Call deliverDataToFile if necessary.
(WebKit::NetscapePluginStream::deliverDataToFile):
Create a temporary file and write the data into it.
(WebKit::NetscapePluginStream::stop):
If the transfer mode is either NP_ASFILE or NP_ASFILEONLY, make sure to
call NPP_StreamAsFile and close the file and delete it.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::cancelStreamLoad):
Keep a reference to the Stream since cancelling it will remove it from the map.
2010-07-19 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Implement NPN_PostURLNotify
https://bugs.webkit.org/show_bug.cgi?id=42602
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::parsePostBuffer):
Read the buffer from a file if necessary and parse it.
(WebKit::NPN_GetURLNotify):
Add extra arguments.
(WebKit::NPN_PostURLNotify):
Parse the post buffer, then call NetscapePlugin::loadURL.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::loadURL):
Pass the method, the header fields and form data along.
(WebKit::NetscapePlugin::allowPopups):
Just return false for now.
(WebKit::NetscapePlugin::initialize):
Pass extra arguments to loadURL.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/PluginController.h:
Add method, header fields and form data.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::loadURL):
Set the method, add the header fields and set the body.
2010-07-19 Sam Weinig <sam@webkit.org>
Reviewed by Darin Adler.
Add local storage support for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=42584
* Shared/WebPreferencesStore.cpp:
(WebKit::WebPreferencesStore::WebPreferencesStore):
(WebKit::WebPreferencesStore::swap):
* Shared/WebPreferencesStore.h:
(WebKit::WebPreferencesStore::encode):
(WebKit::WebPreferencesStore::decode):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetLocalStorageEnabled):
(WKPreferencesGetLocalStorageEnabled):
* UIProcess/API/C/WKPreferences.h:
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::setLocalStorageEnabled):
(WebKit::WebPreferences::localStorageEnabled):
* UIProcess/WebPreferences.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::preferencesDidChange):
2010-07-19 Simon Fraser <simon.fraser@apple.com>
Reviewed by Anders Carlsson.
Uae an OwnPtr for the drawing area in WebPage (fixes a leak!).
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::drawingArea):
2010-07-19 Anders carlsson <andersca@apple.com>
Reviewed by Adam Roben.
WebKit2 does not have application cache
https://bugs.webkit.org/show_bug.cgi?id=42552
* Shared/CoreIPCSupport/WebProcessMessageKinds.h:
(WebProcessMessage::):
Add SetApplicationCacheDirectory.
* Shared/WebPreferencesStore.h:
(WebKit::WebPreferencesStore::encode):
(WebKit::WebPreferencesStore::decode):
add offlineWebApplicationCacheEnabled.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetOfflineWebApplicationCacheEnabled):
(WKPreferencesGetOfflineWebApplicationCacheEnabled):
* UIProcess/API/C/WKPreferences.h:
Add getters/setters for whether the application cache is enabled.
* UIProcess/WebContext.h:
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::setOfflineWebApplicationCacheEnabled):
Update the store and call update().
* UIProcess/WebPreferences.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
Ask the web process to set the application cache directory.
* UIProcess/mac/WebContextMac.mm: Added.
(WebKit::WebContext::applicationCacheDirectory):
Return the application cache directory.
* UIProcess/win/WebContextWin.cpp: Added.
(WebKit::WebContext::applicationCacheDirectory):
Ditto.
* WebKit2.xcodeproj/project.pbxproj:
Add WebContextMac.mm
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::preferencesDidChange):
(WebKit::WebPage::didReceiveMessage):
Handle PreferencesDidChange. Get rid of the default: case statement so we'll
get warnings if we have unhandled message kinds.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setApplicationCacheDirectory):
Set the application cache directory.
(WebKit::WebProcess::didReceiveMessage):
Handle SetApplicationCacheDirectory.
win/WebKit2.vcproj:
Add WebContextWin.cpp
2010-07-18 Anders Carlsson <andersca@apple.com>
Another attempt at fixing the Windows build.
* WebProcess/Plugins/NPJSObjectMap.h:
2010-07-18 Anders Carlsson <andersca@apple.com>
Try to fix Windows build.
* win/WebKit2.vcproj:
2010-07-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
More NPRuntime work
https://bugs.webkit.org/show_bug.cgi?id=42526
* WebProcess/Plugins/NPJSObjectMap.cpp:
(WebKit::identifierFromIdentifierRep):
(WebKit::NPJSObject::hasProperty):
Check if the JSObject has the given property.
(WebKit::NPJSObject::getProperty):
Add stubbed out function.
(WebKit::NPJSObject::npClass):
Add NP_HasProperty and NP_GetProperty.
(WebKit::NPJSObject::NP_HasProperty):
Call NPJSObject::hasProperty.
(WebKit::NPJSObject::NP_GetProperty):
Call NPJSObject::getProperty.
* WebProcess/Plugins/NPRuntimeUtilities.cpp:
(WebKit::releaseNPVariantValue):
Release the given NPVariant.
* WebProcess/Plugins/NPRuntimeUtilities.h:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetProperty):
Call the NPClass GetProperty function.
(WebKit::NPN_HasProperty):
Call the NPClass HasProperty function.
(WebKit::NPN_ReleaseVariantValue):
Call releaseNPVariantValue.
2010-07-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add NPJSObjectMap class
https://bugs.webkit.org/show_bug.cgi?id=42524
* WebKit2.xcodeproj/project.pbxproj:
Add files.
* WebProcess/Plugins/NPJSObjectMap.cpp: Added.
* WebProcess/Plugins/NPJSObjectMap.h: Added.
Add NPJSObjectMap, a map which contains NPObjects that wrap JavaScript objects.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::PluginView):
Initialize the map.
(WebKit::PluginView::~PluginView):
Invalidate the map.
(WebKit::PluginView::frame):
Add frame getter.
(WebKit::PluginView::windowScriptNPObject):
Wrap the window object.
(WebKit::PluginView::pluginElementNPObject):
Wrap the plug-in element object.
* WebProcess/Plugins/PluginView.h:
2010-07-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Implement more NPRuntime related NPN_ functions
https://bugs.webkit.org/show_bug.cgi?id=42520
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Plugins/NPRuntimeUtilities.cpp: Added.
* WebProcess/Plugins/NPRuntimeUtilities.h: Added.
Add new file with NPRuntime related utility functions.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_CreateObject):
(WebKit::NPN_RetainObject):
(WebKit::NPN_ReleaseObject):
Call the corresponding NPRuntimeUtilities functions.
2010-07-18 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Begin work on NPRuntime support
https://bugs.webkit.org/show_bug.cgi?id=42519
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
Handle NPNVWindowNPObject and NPNVPluginElementNPObject.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::windowScriptNPObject):
(WebKit::NetscapePlugin::pluginElementNPObject):
Call the plug-in controller.
* WebProcess/Plugins/PluginController.h:
Add new windowScriptNPObject and pluginElementNPObject functions.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::windowScriptNPObject):
(WebKit::PluginView::pluginElementNPObject):
Add stubbed out functions.
2010-07-18 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Implement some NPRuntime related NPN_ functions
https://bugs.webkit.org/show_bug.cgi?id=42518
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetStringIdentifier):
(WebKit::NPN_GetStringIdentifiers):
(WebKit::NPN_GetIntIdentifier):
(WebKit::NPN_IdentifierIsString):
(WebKit::NPN_UTF8FromIdentifier):
(WebKit::NPN_IntFromIdentifier):
(WebKit::NPN_CreateObject):
2010-07-18 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Add dumping of statusbar text to WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=42516
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
Add setStatusbarText callback to WKBundlePageUIClient.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::setStatusbarText):
Call setStatusbarText.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::setStatusbarText):
Call the bundle page UI client.
2010-07-17 Anders Carlsson <andersca@apple.com>
Reviewed by Maciej Stachowiak.
WebKitTestRunner should load the test plug-in
https://bugs.webkit.org/show_bug.cgi?id=42509
* UIProcess/API/C/WKContext.cpp:
(_WKContextSetAdditionalPluginPath):
Add a private function for setting a single additional plug-in path. the WebKit1 SPI that does the
same thing takes an array of paths, but this is good enough for now.
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::setAdditionalPluginPaths):
Set the additional plug-in paths vector and refresh the database.
(WebKit::PluginInfoStore::loadPluginsIfNecessary):
First try to load plug-ins in the additional plug-in paths.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::setAdditionalPluginPath):
Call PluginInfoStore::setAdditionalPluginPaths.
* UIProcess/WebContext.h:
(WebKit::WebContext::pluginInfoStore):
Make the plug-in info store per context instead of having a single shared info store.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getPlugins):
(WebKit::WebProcessProxy::getPluginHostConnection):
* UIProcess/WebProcessProxy.h:
Get the plug-in info store from the context.
2010-07-17 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Stop all NPStreams before destroying a plug-in
https://bugs.webkit.org/show_bug.cgi?id=42504
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::stopAllStreams):
Go through all streams and stop them.
(WebKit::NetscapePlugin::destroy):
Call stopAllStreams.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
Add stopAllStreams.
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
Make stop public.
2010-07-17 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
Open streams should not keep a plug-in view alive
https://bugs.webkit.org/show_bug.cgi?id=42503
PluginView::Stream now has a weak reference to its PluginView.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::Stream::~Stream):
Assert that the plug-in view is null.
(WebKit::PluginView::Stream::didFail):
After calling removeStream, set the plug-in view member variable to 0. This is OK to do
since we keep a reference to the Stream, so we're sure that the call to removeStream does not
destroy the stream.
(WebKit::PluginView::Stream::didFinishLoading):
Ditto .
(WebKit::PluginView::~PluginView):
Cancel all streams.
(WebKit::PluginView::cancelAllStreams):
Cancel all streams.