1 2018-09-12 Pablo Saavedra <psaavedra@igalia.com>
3 Linking against libWPEWebKit-0.1.so is not posible when WPE is build with ENABLE_VIDEO=OFF and ENABLE_WEB_AUDIO=OFF
4 https://bugs.webkit.org/show_bug.cgi?id=189540
6 Reviewed by Philippe Normand.
10 This issue is related with changes in https://bugs.webkit.org/show_bug.cgi?id=183080
11 This issue is introduced in https://bugs.webkit.org/show_bug.cgi?id=186547
13 No new tests, no changes in the functionality.
15 * platform/GStreamer.cmake:
16 * platform/SourcesGLib.txt:
17 * platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp:
18 (WebCore::LibWebRTCProvider::webRTCAvailable):
20 2018-09-11 Zan Dobersek <zdobersek@igalia.com>
22 Unreviewed WPE build fix.
24 * platform/network/soup/SocketStreamHandleImplSoup.cpp:
25 Add extra header inclusions to get this code building after the unified
26 sources system shifted it into a different translation unit.
28 2018-09-11 Basuke Suzuki <Basuke.Suzuki@sony.com>
30 [Curl] WebInspector doesn't display request headers added during processing.
31 https://bugs.webkit.org/show_bug.cgi?id=189531
33 Reviewed by Alex Christensen.
35 While processing the request, Curl port network layer adds some headers to the request
36 such as cookies. Those headers should be displayed in the WebInspector.
38 Tested on MiniBrowser.
40 * platform/network/curl/CurlRequest.cpp:
41 (WebCore::CurlRequest::didReceiveHeader):
42 (WebCore::CurlRequest::didCompleteTransfer):
43 (WebCore::CurlRequest::updateNetworkLoadMetrics):
44 * platform/network/curl/CurlRequest.h:
46 2018-09-11 James Savage <james.savage@apple.com>
49 Expose -apple-system-container-border color to internal web views.
50 https://bugs.webkit.org/show_bug.cgi?id=189178.
52 Reviewed by Timothy Hatcher.
54 * rendering/RenderThemeMac.mm:
55 (WebCore::RenderThemeMac::systemColor const): Add a separate #if block for
56 Mojave. When I used CSSValueAppleSystemFindHighlightBackground as a template
57 for this change, I had to write out the condition in the first change, but
58 mistakenly thought I could reuse the block here. Turns out the versions were
59 different, and I could not.
61 2018-09-11 Youenn Fablet <youenn@apple.com>
63 Remove MediaDevices NoInterfaceObject
64 https://bugs.webkit.org/show_bug.cgi?id=189512
66 Reviewed by Alex Christensen.
68 Covered by rebased WPT tests.
70 * Modules/mediastream/MediaDevices.idl:
72 2018-09-11 Jer Noble <jer.noble@apple.com>
74 [MediaCapabilities] Implement MediaEngineConfigurationFactory registration
75 https://bugs.webkit.org/show_bug.cgi?id=189438
77 Reviewed by Eric Carlson.
79 Implement a mechanism to register platform-specific MediaEngineConfigurationFactory methods, and a mechanism to iterate
80 over those registered factories when createDecodingConfiguration() and createEncodingConfiguration() are called.
82 The Factory has been radically simplified; the concept of MediaEngineDecodingConfiguration
83 and MediaEngineEncodingConfiguration and its subclasess have been removed. Since the primary
84 objects representing video and audio configurations are IDLDictionaries, the native objects
85 are just structs full of POD types (and Strings). Since these have no dependencies on
86 higher-level HTML concepts, they can be moved into platform/ and accessed from there. This
87 patch also converts MediaCapabilitiesInfo to an Interface, so its implementation also can
88 become a struct and live in platform/. The MediaEngineDecodingConfigurationMock and
89 MediaEngineEncodingConfigurationMock have been consolidated in a single class which simply
90 parses MediaDecodingConfiguration and MediaEncodingConifguration objects (now that they live
91 in Platform) and return a MediaCapabilitiesInfo object (now that it does too).
93 * Modules/mediacapabilities/MediaCapabilities.cpp:
94 (WebCore::isValidVideoConfiguration):
95 (WebCore::MediaCapabilities::decodingInfo):
96 (WebCore::MediaCapabilities::encodingInfo):
97 * Modules/mediacapabilities/MediaCapabilitiesInfo.h: Removed.
98 * Modules/mediacapabilities/MediaCapabilitiesInfo.idl:
99 * Modules/mediacapabilities/VideoConfiguration.idl:
101 * WebCore.xcodeproj/project.pbxproj:
102 * platform/MediaCapabilitiesInfo.h: Copied from Source/WebCore/Modules/mediacapabilities/MediaDecodingType.h.
103 * platform/mediacapabilities/AudioConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/AudioConfiguration.h.
104 * platform/mediacapabilities/MediaConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaConfiguration.h.
105 * platform/mediacapabilities/MediaDecodingConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaDecodingConfiguration.h.
106 * platform/mediacapabilities/MediaDecodingType.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaDecodingType.h.
107 * platform/mediacapabilities/MediaEncodingConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaEncodingConfiguration.h.
108 * platform/mediacapabilities/MediaEncodingType.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaEncodingType.h.
109 * platform/mediacapabilities/MediaEngineConfiguration.cpp: Removed.
110 * platform/mediacapabilities/MediaEngineConfiguration.h: Removed.
111 * platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:
112 (WebCore::factories):
113 (WebCore::MediaEngineConfigurationFactory::createDecodingConfiguration):
114 (WebCore::MediaEngineConfigurationFactory::createEncodingConfiguration):
115 * platform/mediacapabilities/MediaEngineConfigurationFactory.h:
116 * platform/mediacapabilities/MediaEngineEncodingConfiguration.h: Removed.
117 * platform/mediacapabilities/VideoConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/VideoConfiguration.h.
118 * platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
119 * platform/mock/MediaEngineConfigurationFactoryMock.cpp: Added.
120 (WebCore::canDecodeMedia):
121 (WebCore::canSmoothlyDecodeMedia):
122 (WebCore::canPowerEfficientlyDecodeMedia):
123 (WebCore::canEncodeMedia):
124 (WebCore::canSmoothlyEncodeMedia):
125 (WebCore::canPowerEfficientlyEncodeMedia):
126 (WebCore::MediaEngineConfigurationFactoryMock::createDecodingConfiguration):
127 (WebCore::MediaEngineConfigurationFactoryMock::createEncodingConfiguration):
128 * platform/mock/MediaEngineConfigurationFactoryMock.h: Renamed from Source/WebCore/platform/mediacapabilities/MediaEngineDecodingConfiguration.h.
129 * platform/mock/MediaEngineDecodingConfigurationMock.cpp: Removed.
130 * platform/mock/MediaEngineDecodingConfigurationMock.h: Removed.
131 * platform/mock/MediaEngineEncodingConfigurationMock.cpp: Removed.
132 * platform/mock/MediaEngineEncodingConfigurationMock.h: Removed.
134 2018-09-08 Ryosuke Niwa <rniwa@webkit.org>
136 :first-child, :last-child, :nth-child, and :nth-of-type don't work on shadow root's children
137 https://bugs.webkit.org/show_bug.cgi?id=166748
138 <rdar://problem/29649177>
140 Reviewed by Yusuke Suzuki.
142 Added the support for matching positional pseudo classes. For now, we invalidate whenever a child node
143 of a non-UA ShadowRoot is mutated instead of a fine-grained style invalidation as done for regular elements.
145 Tests: fast/shadow-dom/nth-node-on-shadow-child-invalidation.html
146 fast/shadow-dom/nth-node-on-shadow-child-no-jit.html
147 fast/shadow-dom/nth-node-on-shadow-child.html
149 * css/SelectorChecker.cpp:
150 (WebCore::SelectorChecker::checkOne const):
151 * cssjit/SelectorCompiler.cpp:
152 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentElementOrShadowRoot):
153 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
154 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
155 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
156 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthChildParentCheckAndRelationUpdate):
157 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
158 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
159 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthLastChildParentCheckAndRelationUpdate):
160 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
161 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):
162 * dom/ShadowRoot.cpp:
163 (WebCore::ShadowRoot::childrenChanged): Invalidate the subtree whenever a child node is mutated.
165 * domjit/DOMJITHelpers.h:
166 (WebCore::DOMJIT::branchTestIsShadowRootFlagOnNode): Added.
167 (WebCore::DOMJIT::branchTestIsElementOrShadowRootFlagOnNode): Added.
169 2018-09-11 Per Arne Vollan <pvollan@apple.com>
171 Addressing post-review feedback on r235619.
172 https://bugs.webkit.org/show_bug.cgi?id=187925
176 * testing/Internals.cpp:
177 (WebCore::Internals::primaryScreenDisplayID):
178 * testing/Internals.h:
180 2018-09-11 Wenson Hsieh <wenson_hsieh@apple.com>
182 [macOS] [WK2] Support changing foreground colors via color panel
183 https://bugs.webkit.org/show_bug.cgi?id=189382
184 <rdar://problem/44227311>
186 Reviewed by Ryosuke Niwa.
188 Small adjustments to support changing foreground text color using NSColorPanel in WebKit2. See comments below.
189 Tested by FontManagerTests.ChangeFontColorWithColorPanel.
191 * editing/EditingStyle.cpp:
192 (WebCore::StyleChange::extractTextStyles):
194 Support setting foreground text color with alpha by using a styled span element rather than a font element with
195 attributes. To do this, only populate `StyleChange::m_applyFontColor` if the color is opaque. This is because
196 the font element does not support `rgba()` syntax, so any font colors here with alpha that are serialized to
197 `rgba()` result in a garbage value for the computed color style.
199 * editing/FontAttributeChanges.cpp:
200 (WebCore::FontAttributeChanges::editAction const):
202 Add a helper to return the relevant EditAction describing this set of FontAttributeChanges.
204 * editing/FontAttributeChanges.h:
205 (WebCore::FontChanges::isEmpty const):
207 2018-09-11 Yusuke Suzuki <yusukesuzuki@slowstart.org>
209 Shrink size of ResourseResponseBase
210 https://bugs.webkit.org/show_bug.cgi?id=189501
212 Reviewed by Simon Fraser.
214 We reduce the size of ResourceResponseBase by the following two optimizations.
216 1. Use bitfields for bool flags and reorder them.
218 2. Use Markable<> in CacheControlDirectives, which is held by ResourceResponseBase.
220 This patch reduces the size of ResourceResponseBase from 416 to 392 bytes.
224 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
225 (WebCore::WebCoreAVFResourceLoader::responseReceived):
226 (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):
227 * platform/network/CacheValidation.h:
228 (WebCore::CacheControlDirectives::CacheControlDirectives):
229 * platform/network/ResourceResponseBase.cpp:
230 (WebCore::ResourceResponseBase::ResourceResponseBase):
231 (WebCore::ResourceResponseBase::contentRange const):
232 * platform/network/ResourceResponseBase.h:
233 (WebCore::ResourceResponseBase::decode):
235 2018-09-11 Michael Catanzaro <mcatanzaro@igalia.com>
237 Unreviewed, fix some -Wreturn-type warnings
239 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
240 (WebCore::sourceFromNewReceiver):
241 * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
242 (WebCore::toRTCRtpTransceiverDirection):
243 (WebCore::fromRTCRtpTransceiverDirection):
245 2018-09-11 Jiewen Tan <jiewen_tan@apple.com>
247 Unreviewed, a speculative build fix for r235888.
249 * Modules/mediastream/MediaDevices.h:
250 Add class Document forward declaration.
252 2018-09-11 Woodrow Wang <woodrow_wang@apple.com>
254 Add Web API Statistics Collection
255 https://bugs.webkit.org/show_bug.cgi?id=187773
256 <rdar://problem/44155162>
258 Reviewed by Brent Fulgham.
260 Added data collection for web API statistics, specifically regarding the canvas, font loads,
261 screen functions, and navigator functions. The data collection code is placed under a runtime
262 enabled feature flag. The statistics are stored in a ResourceLoadStatistics object and written
263 to a plist on disk. Added a new file CanvasActivityRecord.h and CanvasActivityRecord.cpp which
264 includes a struct to keep track of HTML5 canvas element read and writes.
266 Tests: http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html
267 http/tests/webAPIStatistics/font-load-data-collection.html
268 http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html
269 http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html
272 * WebCore.xcodeproj/project.pbxproj:
273 * css/CSSFontFaceSource.cpp:
274 (WebCore::CSSFontFaceSource::load):
275 * css/CSSFontSelector.cpp:
276 (WebCore::CSSFontSelector::fontRangesForFamily):
277 (WebCore::CSSFontSelector::fallbackFontAt):
279 The following are the functions where we'd like to record a canvas read.
281 * html/HTMLCanvasElement.cpp:
282 (WebCore::HTMLCanvasElement::toDataURL):
283 (WebCore::HTMLCanvasElement::toBlob):
284 (WebCore::HTMLCanvasElement::getImageData):
285 (WebCore::HTMLCanvasElement::toMediaSample):
286 (WebCore::HTMLCanvasElement::captureStream):
288 The following are the functions where we'd like to record a canvas write.
290 * html/canvas/CanvasRenderingContext2D.cpp:
291 (WebCore::CanvasRenderingContext2D::measureText):
292 (WebCore::CanvasRenderingContext2D::drawTextInternal):
294 The following files and functions handle the CanvasActivityRecord struct and
295 its respective functions.
297 * loader/CanvasActivityRecord.cpp: Added.
298 (WebCore::CanvasActivityRecord::recordWrittenOrMeasuredText):
299 (WebCore::CanvasActivityRecord::mergeWith):
300 * loader/CanvasActivityRecord.h: Added.
301 (WebCore::CanvasActivityRecord::encode const):
302 (WebCore::CanvasActivityRecord::decode):
304 * loader/DocumentThreadableLoader.cpp:
305 * loader/FrameLoader.cpp:
306 * loader/ResourceLoadObserver.cpp:
307 (WebCore::ResourceLoadObserver::logFontLoad):
308 (WebCore::ResourceLoadObserver::logCanvasRead):
309 (WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure):
310 (WebCore::ResourceLoadObserver::logNavigatorAPIAccessed):
311 (WebCore::ResourceLoadObserver::logScreenAPIAccessed):
313 Before, entries in the ResourceLoadStatistics involving HashSets used "origin" as the key.
314 Now the encodeHashSet function has been generalized to take any key to encode the entries
315 in the HashSet. Also added functionality to encode an OptionSet by converting it to its
318 * loader/ResourceLoadObserver.h:
319 * loader/ResourceLoadStatistics.cpp:
320 (WebCore::encodeHashSet):
321 (WebCore::encodeOriginHashSet):
322 (WebCore::encodeOptionSet):
323 (WebCore::encodeFontHashSet):
324 (WebCore::encodeCanvasActivityRecord):
325 (WebCore::ResourceLoadStatistics::encode const):
326 (WebCore::decodeHashSet):
327 (WebCore::decodeOriginHashSet):
328 (WebCore::decodeOptionSet):
329 (WebCore::decodeFontHashSet):
330 (WebCore::decodeCanvasActivityRecord):
331 (WebCore::ResourceLoadStatistics::decode):
332 (WebCore::navigatorAPIEnumToString):
333 (WebCore::screenAPIEnumToString):
334 (WebCore::appendNavigatorAPIOptionSet):
335 (WebCore::appendScreenAPIOptionSet):
336 (WebCore::ResourceLoadStatistics::toString const):
337 (WebCore::ResourceLoadStatistics::merge):
338 * loader/ResourceLoadStatistics.h:
339 * loader/ResourceTiming.cpp:
341 The following are the navigator functions recorded for the web API statistics.
343 * page/Navigator.cpp:
344 (WebCore::Navigator::appVersion const):
345 (WebCore::Navigator::userAgent const):
346 (WebCore::Navigator::plugins):
347 (WebCore::Navigator::mimeTypes):
348 (WebCore::Navigator::cookieEnabled const):
349 (WebCore::Navigator::javaEnabled const):
351 The following are the screen functions recorded for the web API statistics.
354 (WebCore::Screen::height const):
355 (WebCore::Screen::width const):
356 (WebCore::Screen::colorDepth const):
357 (WebCore::Screen::pixelDepth const):
358 (WebCore::Screen::availLeft const):
359 (WebCore::Screen::availTop const):
360 (WebCore::Screen::availHeight const):
361 (WebCore::Screen::availWidth const):
363 2018-09-11 Pablo Saavedra <psaavedra@igalia.com>
365 playbackControlsManagerUpdateTimerFired and
366 m_playbackControlsManagerUpdateTimer must be
367 guarded with ENABLE(VIDEO), otherwise the following
368 error occurs with the VIDEO feature turned off:
370 error: 'MediaElementSession' has not been declared
372 Add missing #if ENABLE(VIDEO) Page.cpp and Page.h
373 https://bugs.webkit.org/show_bug.cgi?id=189500
375 Reviewed by Anders Carlsson.
378 (WebCore::Page::Page):
379 (WebCore::Page::schedulePlaybackControlsManagerUpdate):
382 2018-09-11 Frederic Wang <fwang@igalia.com>
384 Refactor filter list checking code
385 https://bugs.webkit.org/show_bug.cgi?id=185087
387 Reviewed by Antonio Gomes.
389 No new tests, behavior unchanged.
391 * page/animation/KeyframeAnimation.h: Add missing forward-declaration FilterOperations.
393 == Rolled over to ChangeLog-2018-09-11 ==