forked from WebKit/WebKit-http
/
ChangeLog
2608 lines (2065 loc) · 111 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
2012-10-10 Brady Eidson <beidson@apple.com>
Switch ResourceLoader::resourceData() from SharedBuffer to ResourceBuffer
https://bugs.webkit.org/show_bug.cgi?id=98976
Reviewed by Anders Carlsson.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::finishedLoading):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::source):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getMainResourceDataOfFrame):
2012-10-11 Sam Weinig <sam@webkit.org>
Add missing WK_EXPORT for WKDOMTextIterator.
Rubber-stamped by Brady Eidson.
* WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h:
2012-10-11 Zeno Albisser <zeno@webkit.org>
[Qt] Implement GraphicsSurfaceToken to replace uint64_t as token type.
https://bugs.webkit.org/show_bug.cgi?id=98501
Replace the token type for GraphicsSurface with a new class GraphicsSurfaceToken.
This is necessary in order to implement GraphicsSurface for Windows.
Depending on the platform a GraphicsSurfaceToken might contain a
WindowID (Linux/GLX), two IOSurfaceIDs (Mac) or in the future two HANDLEs (Windows).
The simple uint64_t is not sufficient anymore, since a single HANDLE in windows
can be 64bit already.
Reviewed by Noam Rosenthal.
* Shared/ShareableSurface.cpp:
(WebKit::ShareableSurface::Handle::encode):
(WebKit::ShareableSurface::Handle::decode):
(WebKit::ShareableSurface::create):
(WebKit::ShareableSurface::createHandle):
* Shared/ShareableSurface.h:
(WebKit::ShareableSurface::Handle::graphicsSurfaceToken):
(Handle):
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC):
(CoreIPC::::encode):
(CoreIPC::::decode):
* Shared/WebCoreArgumentCoders.h:
(WebCore):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
(WebKit::LayerTreeCoordinatorProxy::updateTileForLayer):
(WebKit::LayerTreeCoordinatorProxy::syncCanvas):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h:
(LayerTreeCoordinatorProxy):
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in:
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::syncCanvas):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
(LayerTreeRenderer):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::syncCanvas):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
(CoordinatedGraphicsLayerClient):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::syncCanvas):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h:
(LayerTreeCoordinator):
2012-10-10 Andras Becsi <andras.becsi@digia.com>
[Qt][WK2] Avoid unnecessary calls in PageViewportController
https://bugs.webkit.org/show_bug.cgi?id=98886
Reviewed by Jocelyn Turcotte.
Remove leftover and unneeded update guards and visibility update
notifications to avoid unnecessary update cycles between the
controller an the client.
Previously didRenderFrame triggered updates for no reason since
animations on the page cause a lot of DidRenderFrame messages
for which the viewport state does not change.
* UIProcess/PageViewportController.cpp:
(WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
(WebKit::PageViewportController::didRenderFrame):
* UIProcess/PageViewportController.h:
(PageViewportController):
* UIProcess/qt/PageViewportControllerClientQt.cpp:
(WebKit::PageViewportControllerClientQt::setContentsScale):
(WebKit::PageViewportControllerClientQt::didChangeViewportAttributes):
(WebKit::PageViewportControllerClientQt::updateViewportController):
* UIProcess/qt/PageViewportControllerClientQt.h:
(PageViewportControllerClientQt):
2012-10-11 Mario Sanchez Prada <msanchez@igalia.com>
[GTK] It should be possible to disable favicons in WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=98885
Reviewed by Carlos Garcia Campos.
Make support for favicons in WebKit2GTK+ disabled by default, and
allow enabling it even after calling webkit_web_context_get_favicon_database(),
by decoupling opening the IconDatabase, which will happen when
setting the path for the database directory, from creating the
instance of WebKitFaviconDatabase from WebKitWebContext.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(_WebKitWebContextPrivate): Renamed faviconDatabasePath to
faviconDatabaseDirectory;
(ensureFaviconDatabase): Makes sure there's an instance of
WebKitFaviconDatabase created and associated to the context.
(webkit_web_context_set_favicon_database_directory): Use the
default path if NULL is passed, or the specified one, creating the
database if needed and opening it by setting it's path. If the
database is already open this method does nothing.
(webkit_web_context_get_favicon_database_directory): Return the
path or NULL if webkit_web_context_set_favicon_database_directory
has not been called yet.
(webkit_web_context_get_favicon_database): Return the instance of
WebKitFaviconDatabase, or create it if it doesn't exist yet, but
never set the path (would cause the icon database to be opened).
* UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp:
(testNotInitialized): New test to check that a NOT_INITIALIZED
error is got when using the database before setting its path.
(testSetDirectory): Call set_favicon_database_directory() here
instead of doing it in the constructor of FaviconDatabaseTest.
(beforeAll): Add testNotInitialized() to the test suite.
2012-10-11 Jinwoo Song <jinwoo7.song@samsung.com>
[EFL][WK2] Revisit setting API names and documentation
https://bugs.webkit.org/show_bug.cgi?id=98793
Reviewed by Kenneth Rohde Christiansen.
Make setting API names to be consistent and revisit the documentation.
* UIProcess/API/efl/ewk_settings.cpp:
(ewk_settings_frame_flattening_enabled_set):
(ewk_settings_frame_flattening_enabled_get):
(ewk_settings_dns_prefetching_enabled_set):
(ewk_settings_dns_prefetching_enabled_get):
* UIProcess/API/efl/ewk_settings.h:
* UIProcess/API/efl/tests/test_ewk2_settings.cpp:
(TEST_F):
2012-10-10 Jer Noble <jer.noble@apple.com>
Disallow full screen mode keyboard access by default.
https://bugs.webkit.org/show_bug.cgi?id=98971
<rdar://problem/12474226>
Reviewed by Sam Weinig.
Only support full screen if keyboard access is not requested.
* UIProcess/WebFullScreenManagerProxy.cpp:
(WebKit::WebFullScreenManagerProxy::supportsFullScreen):
2012-10-10 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130972 and r130984.
http://trac.webkit.org/changeset/130972
http://trac.webkit.org/changeset/130984
https://bugs.webkit.org/show_bug.cgi?id=98986
Huge numbers of WK2 crashes (Requested by smfr on #webkit).
* Platform/CoreIPC/Connection.h:
(Connection):
* Platform/CoreIPC/MessageReceiverMap.cpp:
(CoreIPC::MessageReceiverMap::addMessageReceiver):
(CoreIPC::MessageReceiverMap::clearAllMessageReceivers):
(CoreIPC::MessageReceiverMap::knowsHowToHandleMessage):
(CoreIPC::MessageReceiverMap::dispatchMessage):
(CoreIPC::MessageReceiverMap::dispatchSyncMessage):
* Platform/CoreIPC/MessageReceiverMap.h:
(MessageReceiverMap):
* UIProcess/WebConnectionToWebProcess.h:
(WebConnectionToWebProcess):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::~WebContext):
(WebKit::WebContext::knowsHowToHandleMessage):
(WebKit::WebContext::didReceiveMessage):
(WebKit::WebContext::didReceiveSyncMessage):
* UIProcess/WebContext.h:
(WebContext):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveMessage):
(WebKit::WebProcessProxy::didReceiveSyncMessage):
* UIProcess/WebProcessProxy.h:
(WebProcessProxy):
2012-10-10 Sam Weinig <sam@webkit.org>
Add more Objective-C WebKit2 DOM API skeletons.
https://bugs.webkit.org/show_bug.cgi?id=98981
Reviewed by Anders Carlsson.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
* WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
* WebProcess/InjectedBundle/API/mac/WKDOMElement.mm:
Update guards to actually do something. __CLANG__ is never defined, but __clang__ is.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.h:
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
- Abstracts DOM object caching into the DOMCache class which can only be used as a singleton.
- Adds WKDOMRange class extension to allow manipulating its internal pointer for caching purposes.
- Add WKDOMRange conversion functions.
* WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
* WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
Rename _node to _impl for consistency.
* WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
* WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
(-[WKDOMRange _initWithImpl:WebCore::]):
(-[WKDOMRange initWithDocument:]):
(-[WKDOMRange dealloc]):
(-[WKDOMRange startContainer]):
(-[WKDOMRange startOffset]):
(-[WKDOMRange endContainer]):
(-[WKDOMRange endOffset]):
(-[WKDOMRange text]):
Added. Only offers base range functionality.
* WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h:
* WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.mm:
(-[WKDOMTextIterator initWithRange:]):
(-[WKDOMTextIterator advance]):
(-[WKDOMTextIterator atEnd]):
(-[WKDOMTextIterator currentRange]):
(-[WKDOMTextIterator currentTextPointer]):
(-[WKDOMTextIterator currentTextLength]):
Added. Almost identical to WebTextIterator API in WebKit.
2012-10-10 Anders Carlsson <andersca@apple.com>
Stop crashing left and right.
* UIProcess/WebConnectionToWebProcess.h:
(WebKit::WebConnectionToWebProcess::webProcessProxy):
Add a getter.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::fromConnection):
The WebProcessProxy is not the Connection::Client, the WebConnectionToWebProcess is.
2012-10-10 Sam Weinig <sam@webkit.org>
Fix the GCC Mac build. Why are we still building with GCC again?
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
* WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
* WebProcess/InjectedBundle/API/mac/WKDOMElement.mm:
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.h:
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
* WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
* WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
2012-10-10 Christophe Dumez <christophe.dumez@intel.com>
[EFL][WK2] Add toolbar buttons to MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=98883
Reviewed by Kenneth Rohde Christiansen.
Add "back,forward,list,changed" signal on the Ewk_View
to notify the client when the view's back / forward
list has changed. This is useful for the UI to update
its back / forward buttons disabled state.
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_back_forward_list_changed):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/ewk_view_loader_client.cpp:
(didChangeBackForwardList):
* UIProcess/API/efl/ewk_view_private.h:
2012-10-10 Jon Lee <jonlee@apple.com>
[WK2] Activate plugins when user clicks on snapshot
https://bugs.webkit.org/show_bug.cgi?id=98328
<rdar://problem/12426681>
Reviewed by Brady Eidson.
Implement the recreation of the plugin.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::recreateAndInitialize): We can run into a situation where the user
decided to run the plugin before the snapshot was ready to be taken. In this case, the
plugin member variable is non-null, and the timer is still active. Turn off the timer, and
destroy that instance of the plugin. We set the plugin to the instance provided in the
first parameter to this function, and reset the member variables so that the PluginView is
in a state similar to when it was first created. We also immediately initialize the plugin,
which may happen synchronously or asynchronously.
* WebProcess/Plugins/PluginView.h:
(WebKit::PluginView::initialParameters): Expose the initial parameters. Used to recreate
the plugin.
(WebKit::PluginView::pluginElement): Expose the element associated with the widget. Used to
recreate the plugin.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::recreatePlugin): Create a new Plugin instance using the same
parameters used to create the plugin for snapshotting. Forward that instance to the widget.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
(WebFrameLoaderClient): Implement recreatePlugin().
2012-10-10 Sam Weinig <sam@webkit.org>
Fix 32-bit build.
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
* WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
* WebProcess/InjectedBundle/API/mac/WKDOMElement.mm:
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.h:
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
* WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
* WebProcess/InjectedBundle/API/mac/WKDOMNode.mm:
2012-10-10 Anders Carlsson <andersca@apple.com>
WebContext should be a MessageReceiver
https://bugs.webkit.org/show_bug.cgi?id=98958
Reviewed by Sam Weinig.
Make WebContext be a MessageReceiver that lives in its own map. This allows us to get rid of the
knowsHowToHandleMessage functions on MessageReceiverMap and WebContext.
* Platform/CoreIPC/Connection.h:
(CoreIPC::Connection::client):
(Connection):
* Platform/CoreIPC/MessageReceiverMap.cpp:
(CoreIPC::MessageReceiverMap::addMessageReceiver):
(CoreIPC::MessageReceiverMap::invalidate):
(CoreIPC::MessageReceiverMap::knowsHowToHandleMessage):
(CoreIPC::MessageReceiverMap::dispatchMessage):
(CoreIPC::MessageReceiverMap::dispatchSyncMessage):
* Platform/CoreIPC/MessageReceiverMap.h:
(MessageReceiverMap):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::~WebContext):
(WebKit::WebContext::dispatchMessage):
(WebKit::WebContext::dispatchSyncMessage):
(WebKit::WebContext::didReceiveMessage):
(WebKit::WebContext::didReceiveSyncMessage):
* UIProcess/WebContext.h:
(WebContext):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::fromConnection):
(WebKit):
(WebKit::WebProcessProxy::didReceiveMessage):
(WebKit::WebProcessProxy::didReceiveSyncMessage):
* UIProcess/WebProcessProxy.h:
(WebProcessProxy):
2012-10-10 Sam Weinig <sam@webkit.org>
Add skeleton of a WebKit2 ObjC DOM SPI (not intended to be the full DOM)
https://bugs.webkit.org/show_bug.cgi?id=98955
Reviewed by Anders Carlsson.
Add a skeleton DOM implementation only exposing Node, Element and Document
for now. It is currently only available in 64-bit as it relies on the non-fragile
ABI for now.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.h: Added.
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm: Added.
* WebProcess/InjectedBundle/API/mac/WKDOMElement.h: Added.
* WebProcess/InjectedBundle/API/mac/WKDOMElement.mm: Added.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.h: Added.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm: Added.
* WebProcess/InjectedBundle/API/mac/WKDOMNode.h: Added.
* WebProcess/InjectedBundle/API/mac/WKDOMNode.mm: Added.
2012-10-04 Andy Estes <aestes@apple.com>
[WebKit2] Create an API for adding and removing user stylesheets from a page group
https://bugs.webkit.org/show_bug.cgi?id=98432
Reviewed by Sam Weinig.
This patch adds the following API to WKBrowsingContextGroup:
- (void)addUserStyleSheet:(NSString *)source baseURL:(NSURL *)baseURL whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist mainFrameOnly:(BOOL)mainFrameOnly;
- (void)removeAllUserStyleSheets;
Sheets added via this API are sent to all processes that contain a page
in the given page group. Sheets are also cached in the UI process in a
new object called UserContentContainer, which is a property of each
group's WebPageGroupData and is sent to new web processes during page
initialization.
This is less than ideal, since new pages added to a pre-existing
process / page group combination will send redundant user stylesheet
strings over the wire. To avoid this we'd have to keep track track of
the groups that currently exist in each process and only send user
content during page creation if it is the first time a process has seen
the page's group. I decided to not add this complexity for the time
being, but we might need to consider it if we find that the current
approach impacts performance for clients that heavily utilize user
content.
* Shared/API/c/WKArray.cpp:
(WKArrayCreateAdoptingValues): Add a WKArray creation function that
adopts the incoming WKTypeRefs rather than refing them.
* Shared/API/c/WKArray.h:
* Shared/API/c/WKBase.h: Move WKUserContentInjectedFrames out of
WKBundlePrivate.h so it can be used in WKPageGroup, too.
* Shared/API/c/cf/WKURLCF.cpp:
(WKURLCreateWithCFURL): Return 0 for null CFURLRefs instead of crashing
inside CFURLGetString().
* Shared/ImmutableArray.cpp:
(WebKit::ImmutableArray::ImmutableArray): Add a tag to differentiate
between the adopting and refing ctors.
* Shared/ImmutableArray.h:
(WebKit::ImmutableArray::create): Call the refing ctor.
(WebKit::ImmutableArray::adopt): Call the adopting ctor.
* Shared/UserContentContainer.cpp: Added.
(UserContentItemMessageEncoder): Create a UserMessageEncoder for
serializing UserContentContainer::Item's APIObjects.
(WebKit::UserContentItemMessageEncoder::UserContentItemMessageEncoder):
(WebKit::UserContentItemMessageEncoder::encode):
(UserContentItemMessageDecoder): Create a UserMessageEncoder for
deserializing UserContentContainer::Item's APIObjects.
(WebKit::UserContentItemMessageDecoder::UserContentItemMessageDecoder):
(WebKit::UserContentItemMessageDecoder::decode):
(WebKit::UserContentContainer::Item::Item):
(WebKit::encodeStringArray): Add a helper function for encoding
ImmutableArrays of WebStrings.
(WebKit::UserContentContainer::Item::encode): Encode the item's
properties using UserContentItemMessageEncoder.
(WebKit::decodeStringArray): Add a helper function for decoding
ImmutableArrays of WebStrings.
(WebKit::UserContentContainer::Item::decode): Decode the item's
properties using UserContentItemMessageDecoder.
(WebKit::toStringVector): Add a helper function for converting an
ImmutableArray of WebStrings to a Vector of Strings.
(WebKit::UserContentContainer::Item::whitelist): Use toStringVector().
(WebKit::UserContentContainer::Item::blacklist): Ditto.
(WebKit::UserContentContainer::encode): Encode the Vector of UserContentContainer::Items.
(WebKit::UserContentContainer::decode): Decode the Vector of UserContentContainer::Items.
* Shared/UserContentContainer.h: Added.
* Shared/WebPageGroupData.cpp:
(WebKit::WebPageGroupData::encode): Include userStyleSheets when encoding.
(WebKit::WebPageGroupData::decode): Include userStyleSheets when decoding.
* Shared/WebPageGroupData.h:
(WebPageGroupData): Add a UserContentContainer called userStyleSheets
to WebPageGroupData.
* UIProcess/API/C/WKPageGroup.cpp: Add the C SPI version of the Objective-C API.
(WKPageGroupAddUserStyleSheet):
(WKPageGroupRemoveAllUserStyleSheets):
* UIProcess/API/C/WKPageGroup.h:
* UIProcess/API/mac/WKBrowsingContextGroup.h: Add the Objective-C API.
* UIProcess/API/mac/WKBrowsingContextGroup.mm:
(createWKArray): Add a helper function that converts an NSArray of NSStrings to a WKArray of WKStrings.
(-[WKBrowsingContextGroup addUserStyleSheet:baseURL:whitelist:blacklist:mainFrameOnly:]):
Implement the Objective-C API in terms of the C SPI.
(-[WKBrowsingContextGroup removeAllUserStyleSheets]): Ditto.
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::addUserStyleSheet): Add the new sheet to the
group's WebPageGroupData, which ensures that the group's sheets are
sent to new web processes.
(WebKit::WebPageGroup::removeAllUserStyleSheets): Ditto for removal.
* UIProcess/WebPageGroup.h:
(WebKit::WebPageGroup::sendToAllProcessesInGroup): Add a helper message
that sends a message to all processes that have a page in the current
group. This is used to add new user sheets to already-initialized page
groups in the UI processes.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Moved
WKUserContentInjectedFrames from here to WKBase.h.
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::WebPageGroupProxy): Add each sheet in the
WebPageGroupData to WebCore's page group.
(WebKit::WebPageGroupProxy::addUserStyleSheet): Add the sheet received
from the UI process to WebCore's page group.
(WebKit::WebPageGroupProxy::removeAllUserStyleSheets): Remove all
sheets from WebCore's page group.
* WebProcess/WebPage/WebPageGroupProxy.h:
* WebProcess/WebPage/WebPageGroupProxy.messages.in: Define
AddUserStyleSheet and RemoveAllUserStyleSheets, two messages sent from
the UI process to a web process's WebPageGroupProxy.
2012-10-10 Sam Weinig <sam@webkit.org>
Make all of the WebContext sub objects MessageReceivers
https://bugs.webkit.org/show_bug.cgi?id=98661
Reviewed by Anders Carlsson.
Start work towards simplified message dispatch.
* Platform/CoreIPC/MessageReceiverMap.cpp:
(CoreIPC::MessageReceiverMap::clearAllMessageReceivers):
(CoreIPC::MessageReceiverMap::knowsHowToHandleMessage):
(CoreIPC::MessageReceiverMap::dispatchSyncMessage):
* Platform/CoreIPC/MessageReceiverMap.h:
Add additional helper methods.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::~WebContext):
(WebKit::WebContext::addMessageReceiver):
(WebKit::WebContext::knowsHowToHandleMessage):
(WebKit::WebContext::didReceiveMessage):
(WebKit::WebContext::didReceiveSyncMessage):
* UIProcess/WebContext.h:
Add a MessageReceiverMap that chains to the main on in WebProcessProxy. Simplifies
didReceiveMessage and didReceiveSyncMessage.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveMessage):
(WebKit::WebProcessProxy::didReceiveSyncMessage):
Use the new WebContext methods to simplify dispatch.
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy):
* UIProcess/Notifications/WebNotificationManagerProxy.h:
(WebNotificationManagerProxy):
* UIProcess/WebApplicationCacheManagerProxy.cpp:
(WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy):
* UIProcess/WebApplicationCacheManagerProxy.h:
(WebApplicationCacheManagerProxy):
* UIProcess/WebBatteryManagerProxy.cpp:
(WebKit::WebBatteryManagerProxy::WebBatteryManagerProxy):
* UIProcess/WebBatteryManagerProxy.h:
(WebBatteryManagerProxy):
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
* UIProcess/WebCookieManagerProxy.h:
(WebCookieManagerProxy):
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::WebDatabaseManagerProxy):
(WebKit::WebDatabaseManagerProxy::didReceiveMessage):
(WebKit):
* UIProcess/WebDatabaseManagerProxy.h:
(WebDatabaseManagerProxy):
* UIProcess/WebGeolocationManagerProxy.cpp:
(WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy):
* UIProcess/WebGeolocationManagerProxy.h:
(WebGeolocationManagerProxy):
* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::WebIconDatabase):
* UIProcess/WebIconDatabase.h:
(WebIconDatabase):
(WebKit::WebIconDatabase::type):
* UIProcess/WebKeyValueStorageManagerProxy.cpp:
(WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy):
* UIProcess/WebKeyValueStorageManagerProxy.h:
(WebKeyValueStorageManagerProxy):
* UIProcess/WebMediaCacheManagerProxy.cpp:
(WebKit::WebMediaCacheManagerProxy::WebMediaCacheManagerProxy):
* UIProcess/WebMediaCacheManagerProxy.h:
(WebMediaCacheManagerProxy):
* UIProcess/WebNetworkInfoManagerProxy.cpp:
(WebKit::WebNetworkInfoManagerProxy::WebNetworkInfoManagerProxy):
(WebKit::WebNetworkInfoManagerProxy::didReceiveSyncMessage):
* UIProcess/WebNetworkInfoManagerProxy.h:
(WebNetworkInfoManagerProxy):
* UIProcess/WebResourceCacheManagerProxy.cpp:
(WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy):
(WebKit::WebResourceCacheManagerProxy::didReceiveMessage):
(WebKit):
* UIProcess/WebResourceCacheManagerProxy.h:
(WebResourceCacheManagerProxy):
* UIProcess/WebVibrationProxy.cpp:
(WebKit::WebVibrationProxy::WebVibrationProxy):
* UIProcess/WebVibrationProxy.h:
(WebVibrationProxy):
* UIProcess/soup/WebSoupRequestManagerProxy.cpp:
(WebKit::WebSoupRequestManagerProxy::WebSoupRequestManagerProxy):
(WebKit::WebSoupRequestManagerProxy::didReceiveMessage):
(WebKit):
* UIProcess/soup/WebSoupRequestManagerProxy.h:
(WebSoupRequestManagerProxy):
* WebProcess/Authentication/AuthenticationManager.h:
(AuthenticationManager):
* WebProcess/Geolocation/WebGeolocationManager.h:
(WebGeolocationManager):
Make all the WebContext sub-objects MessageReceivers to simplify dispatch.
2012-10-10 Simon Fraser <simon.fraser@apple.com>
Add the mangled symbol name for Frame::layerTreeAsText() to the confusingly named
Windows export file.
* win/WebKit2.def:
2012-10-10 Simon Fraser <simon.fraser@apple.com>
Store a visible rect in GraphicsLayers, and optionally dump it in layerTreeAsText
https://bugs.webkit.org/show_bug.cgi?id=98839
Reviewed by Sam Weinig.
Add a flag to layerTreeAsText() so that tests can optionally include this visible rect in
layer tree dumps. This output will be platform-specific, so we don't want to do it unconditionally.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::layerTreeAsText):
2012-10-10 Shinya Kawanaka <shinyak@chromium.org>
Needs internal API to return distributed nodes for InsertionPoint
https://bugs.webkit.org/show_bug.cgi?id=98868
Reviewed by Hajime Morita.
* win/WebKit2.def:
* win/WebKit2CFLite.def:
2012-10-10 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Qt][WK2] REGRESSION(r130879): It made fast/events/touch/* tests crash
https://bugs.webkit.org/show_bug.cgi?id=98888
Reviewed by Kenneth Rohde Christiansen.
Add null-checks in the gesture recognizers to allow them working without a PageViewportController.
The pinch and pan gesture recognizers aren't used in that case yet, but they could eventually
be used to send pinch and pan gesture events to the web process. They are currently kept active
because we need the tap gesture recognizer and its logic is bound to those other recognizers.
* UIProcess/qt/QtPanGestureRecognizer.cpp:
(WebKit::QtPanGestureRecognizer::update):
(WebKit::QtPanGestureRecognizer::finish):
(WebKit::QtPanGestureRecognizer::cancel):
* UIProcess/qt/QtPinchGestureRecognizer.cpp:
(WebKit::QtPinchGestureRecognizer::update):
(WebKit::QtPinchGestureRecognizer::finish):
(WebKit::QtPinchGestureRecognizer::cancel):
2012-10-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Test /webkit2/WebKitWebView/history-cache asserts in debug bot
https://bugs.webkit.org/show_bug.cgi?id=98731
Reviewed by Martin Robinson.
The problem is in the test itself that is using
SingleResourceLoadTest class to load a multiresource document.
* UIProcess/API/gtk/tests/TestResources.cpp:
(testWebViewResourcesHistoryCache): Load only single resource
documents and check also that the main resource given is the
expected one.
(serverCallback): Add another single resource document.
2012-10-10 Christophe Dumez <christophe.dumez@intel.com>
[WK2][SOUP] ResourceError.isCancellation() is not carried over IPC
https://bugs.webkit.org/show_bug.cgi?id=98882
Reviewed by Kenneth Rohde Christiansen.
Properly serialize / deserialize ResourceError.isCancellation
boolean so that it can be used in UIProcess.
* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):
2012-10-10 Jinwoo Song <jinwoo7.song@samsung.com>
[EFL][WK2] Add APIs to get/set the DNS prefetching
https://bugs.webkit.org/show_bug.cgi?id=98790
Reviewed by Laszlo Gombos.
Add setting APIs for DNS prefetching and a unit test.
* UIProcess/API/efl/ewk_settings.cpp:
(ewk_settings_DNS_prefetching_enabled_set):
(ewk_settings_DNS_prefetching_enabled_get):
* UIProcess/API/efl/ewk_settings.h:
* UIProcess/API/efl/tests/test_ewk2_settings.cpp:
(TEST_F):
2012-10-09 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
[Qt][WK2] REGRESSION(r130629): It made touchadjustment/focusout-on-touch.html fai1
https://bugs.webkit.org/show_bug.cgi?id=98642
Reviewed by Kenneth Rohde Christiansen.
There was an early return that would prevent gesture recognition if no PageViewportController
has been set on QtWebPageEventHandler. The gesture recognizer are also used to send
GestureEvents to WebCore which this layout test is using.
Make sure that the gesture recognition is done even when no PageViewportController is present.
* UIProcess/qt/QtWebPageEventHandler.cpp:
(WebKit::QtWebPageEventHandler::handleInputEvent):
(WebKit::QtWebPageEventHandler::doneWithTouchEvent):
2012-10-10 Zeno Albisser <zeno@webkit.org>
[Qt] ProcessLauncherQt should use QStringLiteral for serviceName.
https://bugs.webkit.org/show_bug.cgi?id=98398
QString(const char*) is deprecated, we should use QStringLiteral instead.
Reviewed by Kenneth Rohde Christiansen.
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
(WebKit::ProcessLauncher::launchProcess):
2012-10-10 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
[EFL][WK2] Add History callbacks API
https://bugs.webkit.org/show_bug.cgi?id=98594
Reviewed by Kenneth Rohde Christiansen.
Added History callbacks API to Ewk Context. Added unit tests.
* PlatformEfl.cmake:
* UIProcess/API/efl/EWebKit2.h:
* UIProcess/API/efl/ewk_context.cpp:
(_Ewk_Context):
(_Ewk_Context::_Ewk_Context):
(ewk_context_history_callbacks_set): New public function which lets the client to set History callbacks.
(ewk_context_history_client_get):
(ewk_context_add_visited_link): New public function to mark a URL as visited link.
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_history_client.cpp: Added.
(getEwkHistoryDelegate):
(didNavigateWithNavigationData):
(didPerformClientRedirect):
(didPerformServerRedirect):
(didUpdateHistoryTitle):
(populateVisitedLinks):
(ewk_context_history_client_attach):
* UIProcess/API/efl/ewk_context_history_client_private.h: Added.
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/ewk_navigation_data.cpp: Added.
(_Ewk_Navigation_Data):
(_Ewk_Navigation_Data::_Ewk_Navigation_Data):
(_Ewk_Navigation_Data::~_Ewk_Navigation_Data):
(ewk_navigation_data_ref):
(ewk_navigation_data_unref):
(ewk_navigation_data_title_get):
(ewk_navigation_data_original_request_get):
(ewk_navigation_data_url_get):
(ewk_navigation_data_new):
* UIProcess/API/efl/ewk_navigation_data.h: Added.
* UIProcess/API/efl/ewk_navigation_data_private.h: Added.
* UIProcess/API/efl/ewk_view.cpp:
(addToPageViewMap):
(removeFromPageViewMap):
(_ewk_view_smart_del):
(_ewk_view_initialize):
(ewk_view_from_page_get):
* UIProcess/API/efl/ewk_view_private.h:
* UIProcess/API/efl/tests/test_ewk2_context_history_delegate.cpp: Added.
(httpServer):
(navigateWithNavigationData):
(performClientRedirect):
(performServerRedirect):
(updateHistoryTitle):
(populateVisitedLinks):
(onLoadFinishedForRedirection):
(serverCallbackRedirection):
(TEST_F):
2012-10-09 Byungwoo Lee <bw80.lee@samsung.com>
[EFL][WK2] Change parameter and return type of loadUrlSync().
https://bugs.webkit.org/show_bug.cgi?id=97920
Reviewed by Gyuyoung Kim.
loadUrlSync() uses waitUntilLoadFinished() internally, and it has
a parameter and return value for timeout.
To set and check timeout, loadUrlSync() should have those.
A parameter for timeout interval is added to loadUrlSync() and it
returns the result of waitUntilLoadFinished() for checking timeout.
And I added codes to check the result of all the LoadUrlSync()
function calls with ASSERT_TRUE() macro.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::EWK2UnitTestBase::loadUrlSync):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
(EWK2UnitTestBase):
* UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp:
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_intents.cpp:
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
2012-10-09 Byungwoo Lee <bw80.lee@samsung.com>
[EFL][WK2] Move timeout callback to the CallbackDataTimer class.
https://bugs.webkit.org/show_bug.cgi?id=97861
Reviewed by Gyuyoung Kim.
Timeout callbacks for waitUntil{LoadFinished,TitleChanged,URIChanged}
can be moved to the CallbackDataTimer class.
Moved the callback implementation to the CallbackDataTimer class.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::CallbackDataTimer::CallbackDataTimer):
(CallbackDataTimer):
(EWK2UnitTest::CallbackDataTimer::timeOutCallback):
(EWK2UnitTest::CallbackDataExpectedValue::CallbackDataExpectedValue):
(EWK2UnitTest::EWK2UnitTestBase::waitUntilLoadFinished):
(EWK2UnitTest::EWK2UnitTestBase::waitUntilTitleChangedTo):
(EWK2UnitTest::EWK2UnitTestBase::waitUntilURIChangedTo):
2012-10-09 Jian Li <jianli@chromium.org>
Update the CSS property used to support draggable regions.
https://bugs.webkit.org/show_bug.cgi?id=97156
Reviewed by Adam Barth.
The CSS property to support draggable regions, guarded under
WIDGET_REGION is now disabled from Mac WebKit, in order not to cause
confusion with DASHBOARD_SUPPORT feature.
Also update the code to use the new name annotatedRegions to work for
both features.
* Configurations/FeatureDefines.xcconfig: Disable WIDGET_REGION feature.
* WebProcess/WebCoreSupport/WebChromeClient.cpp: Rename dashboardRegions to annotatedRegions.
(WebKit::WebChromeClient::annotatedRegionsChanged):
* WebProcess/WebCoreSupport/WebChromeClient.h: Rename dashboardRegions to annotatedRegions.
(WebChromeClient):
2012-10-09 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130811 and r130821.
http://trac.webkit.org/changeset/130811
http://trac.webkit.org/changeset/130821
https://bugs.webkit.org/show_bug.cgi?id=98831
Broke date-suggestion-picker-appearance-with-scroll-bar.html
(Requested by abarth|gardening on #webkit).
* Shared/WebRenderObject.cpp:
(WebKit::WebRenderObject::WebRenderObject):
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::screenRectOfContents):
2012-10-09 Jon Lee <jonlee@apple.com>
[WK2] Have plugins render offscreen to capture snapshot
https://bugs.webkit.org/show_bug.cgi?id=98326
<rdar://problem/12426658>
Reviewed by Simon Fraser.
Keep the plugin rendering without compositing to easily grab the snapshot.
PluginView now has two variables referring to snapshots, but are unrelated. The timer
is used to capture a snapshot that acts as a poster for a plugin. The ShareableBitmap
variable m_snapshot is used whenever the plugin paints in software, to avoid side effects
should the plugin run JS during painting.
* WebProcess/Plugins/PluginView.cpp:
(WebKit): Add a named constant for the time delay before a snapshot is taken.
(WebKit::PluginView::PluginView): Initialize a 3-second timer to get the snapshot.
(WebKit::PluginView::~PluginView): Refactor part of the destructor code out into
destroyPluginAndReset() for reuse.
(WebKit::PluginView::destroyPluginAndReset): Contains part of the destructor code.
In addition to destroying the plugin, the destructor cancels pending loads and streams.
(WebKit::PluginView::didInitializePlugin): If the plugin is in a state where it needs
to generate or display a poster, don't setup the compositing layer and start the timer.
(WebKit::PluginView::paint): Avoid painting if the plugin is not running.
(WebKit::PluginView::invalidateRect): Avoid painting if the plugin is not running.
(WebKit::PluginView::isAcceleratedCompositingEnabled): Don't enable accelerated compositing
until the plugin is running.
(WebKit::PluginView::pluginSnapshotTimerFired): When the timer fires, get a snapshot, generate
an Image that WebCore can render, and destroy the plugin.
Rename m_snapshot to m_transientPaintingSnapshot.
* WebProcess/Plugins/PluginView.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::paint):
(WebKit::PluginView::notifyWidget):
(WebKit::PluginView::pluginSnapshotTimerFired):
2012-10-09 Rik Cabanier <cabanier@adobe.com>
Add missing compile flag for compositing
https://bugs.webkit.org/show_bug.cgi?id=98681
Reviewed by Dirk Schulze.
This flag is needed in case there is a difference in API
when compositing is enabled
* Configurations/FeatureDefines.xcconfig:
2012-10-09 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r130680.
http://trac.webkit.org/changeset/130680
https://bugs.webkit.org/show_bug.cgi?id=98720
this patch has a typo so was ineffective (Requested by
cabanier on #webkit).
* Configurations/FeatureDefines.xcconfig:
2012-10-09 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
[EFL][WK2] Inform the PageProxy about visibility changes when the view is shown/hidden.
https://bugs.webkit.org/show_bug.cgi?id=98757
Reviewed by Kenneth Rohde Christiansen.
SVN r130720 exposed a bug in our code: the PageProxy is not
notified when one calls evas_object_show() or evas_object_hide()
on the view, so the visibility it has when the WebPageProxy is
constructed remained set forever.
This made the ewk_context_vibration_client_callbacks_set unit test
start running forever, because WebPageProxy's constructor now sets
the page's visibility to hidden by the default for us, since it is
called from within ewk_view_smart_add() and before
evas_object_show().
We now listen to the EVAS_CALLBACK_SHOW and EVAS_CALLBACK_HIDE
callbacks and update the WebPageProxy accordingly. Note that we
could not do this from the smart_show and smart_hide functions we
already had, since they are called before the object's actual
visibility is updated.
* UIProcess/API/efl/ewk_view.cpp:
(_ewk_view_on_show):
(_ewk_view_on_hide):
(_ewk_view_smart_add):
2012-10-09 Simon Pena <spena@igalia.com>
[GTK] Add support for running JavaScript from GResources
https://bugs.webkit.org/show_bug.cgi?id=98488
Reviewed by Carlos Garcia Campos.
GResources allow embedding certain resources, frequently used, in a "bundle"
which can be kept separated or stored in the binary. This patch adds
support for running JavaScript from GResources.
For this, methods run_javascript_from_gresource and
run_javascript_from_gresource_finish are added, which load the resource
asynchronously and, when it is ready, run the JavaScript.
* UIProcess/API/gtk/WebKitWebView.cpp: Include the new methods.
(resourcesStreamReadCallback):
(webkit_web_view_run_javascript_from_gresource):
(webkit_web_view_run_javascript_from_gresource_finish):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the new
methods in the documentation.
* UIProcess/API/gtk/tests/GNUmakefile.am: Add the test resources to the
build infrastructure.
* UIProcess/API/gtk/tests/TestMain.cpp: Register the resources in the tests,
so that they can be accessed in all of them.
(register_gresource):
(main):
* UIProcess/API/gtk/tests/TestWebKitWebView.cpp: Test the
run_javascript_from_gresource method.
(testWebViewRunJavaScript):
* UIProcess/API/gtk/tests/WebViewTest.cpp: Add a method for testing the
new run_javascript_from_gresource method.
(runJavaScriptFromGResourceReadyCallback):
(WebViewTest::runJavaScriptFromGResourceAndWaitUntilFinished):
* UIProcess/API/gtk/tests/WebViewTest.h:
* UIProcess/API/gtk/tests/resources/webkit2gtk-tests.gresource.xml: Added.
Resource bundle containing the resources.
* UIProcess/API/gtk/tests/resources/webkit2gtk-tests.test.js: Added.
Example JavaScript file to test the GResources support.