Unreviewed, fix some -Wreturn-type warnings
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-09-11  Michael Catanzaro  <mcatanzaro@igalia.com>
2
3         Unreviewed, fix some -Wreturn-type warnings
4
5         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
6         (WebCore::sourceFromNewReceiver):
7         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
8         (WebCore::toRTCRtpTransceiverDirection):
9         (WebCore::fromRTCRtpTransceiverDirection):
10
11 2018-09-11  Jiewen Tan  <jiewen_tan@apple.com>
12
13         Unreviewed, a speculative build fix for r235888.
14
15         * Modules/mediastream/MediaDevices.h:
16         Add class Document forward declaration.
17
18 2018-09-11  Woodrow Wang  <woodrow_wang@apple.com>
19
20         Add Web API Statistics Collection
21         https://bugs.webkit.org/show_bug.cgi?id=187773
22         <rdar://problem/44155162>
23
24         Reviewed by Brent Fulgham.
25
26         Added data collection for web API statistics, specifically regarding the canvas, font loads, 
27         screen functions, and navigator functions. The data collection code is placed under a runtime 
28         enabled feature flag. The statistics are stored in a ResourceLoadStatistics object and written 
29         to a plist on disk. Added a new file CanvasActivityRecord.h and CanvasActivityRecord.cpp which
30         includes a struct to keep track of HTML5 canvas element read and writes. 
31
32         Tests: http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html
33                http/tests/webAPIStatistics/font-load-data-collection.html
34                http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html
35                http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html
36
37         * Sources.txt:
38         * WebCore.xcodeproj/project.pbxproj:
39         * css/CSSFontFaceSource.cpp:
40         (WebCore::CSSFontFaceSource::load):
41         * css/CSSFontSelector.cpp:
42         (WebCore::CSSFontSelector::fontRangesForFamily):
43         (WebCore::CSSFontSelector::fallbackFontAt):
44
45         The following are the functions where we'd like to record a canvas read.
46
47         * html/HTMLCanvasElement.cpp:
48         (WebCore::HTMLCanvasElement::toDataURL):
49         (WebCore::HTMLCanvasElement::toBlob):
50         (WebCore::HTMLCanvasElement::getImageData):
51         (WebCore::HTMLCanvasElement::toMediaSample):
52         (WebCore::HTMLCanvasElement::captureStream):
53
54         The following are the functions where we'd like to record a canvas write.
55
56         * html/canvas/CanvasRenderingContext2D.cpp:
57         (WebCore::CanvasRenderingContext2D::measureText):
58         (WebCore::CanvasRenderingContext2D::drawTextInternal):
59
60         The following files and functions handle the CanvasActivityRecord struct and
61         its respective functions.
62
63         * loader/CanvasActivityRecord.cpp: Added.
64         (WebCore::CanvasActivityRecord::recordWrittenOrMeasuredText):
65         (WebCore::CanvasActivityRecord::mergeWith):
66         * loader/CanvasActivityRecord.h: Added.
67         (WebCore::CanvasActivityRecord::encode const):
68         (WebCore::CanvasActivityRecord::decode):
69
70         * loader/DocumentThreadableLoader.cpp:
71         * loader/FrameLoader.cpp:
72         * loader/ResourceLoadObserver.cpp:
73         (WebCore::ResourceLoadObserver::logFontLoad):
74         (WebCore::ResourceLoadObserver::logCanvasRead):
75         (WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure):
76         (WebCore::ResourceLoadObserver::logNavigatorAPIAccessed):
77         (WebCore::ResourceLoadObserver::logScreenAPIAccessed):
78
79         Before, entries in the ResourceLoadStatistics involving HashSets used "origin" as the key. 
80         Now the encodeHashSet function has been generalized to take any key to encode the entries 
81         in the HashSet. Also added functionality to encode an OptionSet by converting it to its 
82         raw bitmask state. 
83
84         * loader/ResourceLoadObserver.h:
85         * loader/ResourceLoadStatistics.cpp:
86         (WebCore::encodeHashSet):
87         (WebCore::encodeOriginHashSet):
88         (WebCore::encodeOptionSet):
89         (WebCore::encodeFontHashSet):
90         (WebCore::encodeCanvasActivityRecord):
91         (WebCore::ResourceLoadStatistics::encode const):
92         (WebCore::decodeHashSet):
93         (WebCore::decodeOriginHashSet):
94         (WebCore::decodeOptionSet):
95         (WebCore::decodeFontHashSet):
96         (WebCore::decodeCanvasActivityRecord):
97         (WebCore::ResourceLoadStatistics::decode):
98         (WebCore::navigatorAPIEnumToString):
99         (WebCore::screenAPIEnumToString):
100         (WebCore::appendNavigatorAPIOptionSet):
101         (WebCore::appendScreenAPIOptionSet):
102         (WebCore::ResourceLoadStatistics::toString const):
103         (WebCore::ResourceLoadStatistics::merge):
104         * loader/ResourceLoadStatistics.h:
105         * loader/ResourceTiming.cpp:
106
107         The following are the navigator functions recorded for the web API statistics.
108
109         * page/Navigator.cpp:
110         (WebCore::Navigator::appVersion const):
111         (WebCore::Navigator::userAgent const):
112         (WebCore::Navigator::plugins):
113         (WebCore::Navigator::mimeTypes):
114         (WebCore::Navigator::cookieEnabled const):
115         (WebCore::Navigator::javaEnabled const):
116
117         The following are the screen functions recorded for the web API statistics.
118
119         * page/Screen.cpp:
120         (WebCore::Screen::height const):
121         (WebCore::Screen::width const):
122         (WebCore::Screen::colorDepth const):
123         (WebCore::Screen::pixelDepth const):
124         (WebCore::Screen::availLeft const):
125         (WebCore::Screen::availTop const):
126         (WebCore::Screen::availHeight const):
127         (WebCore::Screen::availWidth const):
128
129 2018-09-11  Pablo Saavedra  <psaavedra@igalia.com>
130
131         playbackControlsManagerUpdateTimerFired and
132         m_playbackControlsManagerUpdateTimer must be
133         guarded with ENABLE(VIDEO), otherwise the following
134         error occurs with the VIDEO feature turned off:
135
136           error: 'MediaElementSession' has not been declared
137
138         Add missing #if ENABLE(VIDEO) Page.cpp and Page.h
139         https://bugs.webkit.org/show_bug.cgi?id=189500
140
141         Reviewed by Anders Carlsson.
142
143         * page/Page.cpp:
144         (WebCore::Page::Page):
145         (WebCore::Page::schedulePlaybackControlsManagerUpdate):
146         * page/Page.h:
147
148 2018-09-11  Frederic Wang  <fwang@igalia.com>
149
150         Refactor filter list checking code
151         https://bugs.webkit.org/show_bug.cgi?id=185087
152
153         Reviewed by Antonio Gomes.
154
155         No new tests, behavior unchanged.
156
157         * page/animation/KeyframeAnimation.h: Add missing forward-declaration FilterOperations.
158
159 == Rolled over to ChangeLog-2018-09-11 ==