Crash in SWServer::Connection::resolveRegistrationReadyRequests
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-01-07  Youenn Fablet  <youenn@apple.com>
2
3         Crash in SWServer::Connection::resolveRegistrationReadyRequests
4         https://bugs.webkit.org/show_bug.cgi?id=193217
5
6         Reviewed by Chris Dumez.
7
8         As can be seen from the traces, SWServer might clear its connections HashMap in its destructor.
9         This might then trigger calling SWServer::resolveRegistrationReadyRequests.
10         This method is iterating on the connections HashMap which is being cleared.
11         To remove this problem, move the HashMap in a temporary variable and clear the temporary variable.
12
13         * workers/service/server/SWServer.cpp:
14         (WebCore::SWServer::~SWServer):
15
16 2019-01-07  Jer Noble  <jer.noble@apple.com>
17
18         REGRESSION (r239519): ASSERTION FAILED: !m_adoptionIsRequired in com.apple.WebCore: void WTF::refIfNotNull<WebCore::CDMSessionMediaSourceAVFObjC> + 53
19         https://bugs.webkit.org/show_bug.cgi?id=193211
20         <rdar://problem/46937412>
21
22         Reviewed by Eric Carlson.
23
24         Make CDMSessionMediaSourceAVFObjC a CanMakeWeakPtr rather than RefCounted, as CDMSessions are stored in
25         std::unique_ptrs, and not in Ref or RefPtr.
26
27         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
28         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
29         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
30         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
31
32 2019-01-07  David Kilzer  <ddkilzer@apple.com>
33
34         Prefer RetainPtr<NSObject> to RetainPtr<NSObject *>
35         <https://webkit.org/b/193056>
36
37         Reviewed by Alex Christensen.
38
39         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
40         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]):
41         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]):
42         * platform/network/cf/AuthenticationChallenge.h:
43         - Remove '*' from RetainPtr<> type.
44
45         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
46         (WebCore::cookiesForURL):
47         - Once retainPtr() was changed to return RetainPtr<NSArray>
48           instead of RetainPtr<NSArray *> here, that forced the type of
49           `cookiesPtr` to change as well since
50           Optional<RetainPtr<NSArray>> is not assignable to
51           Optional<RetainPtr<NSArray *>> without further template
52           specialization, which didn't seem useful since
53           Optional<RetainPtr<>> variable types are rarely used.
54
55 2019-01-07  Devin Rousso  <drousso@apple.com>
56
57         Web Inspector: extend XHR breakpoints to work with fetch
58         https://bugs.webkit.org/show_bug.cgi?id=185843
59         <rdar://problem/40431027>
60
61         Reviewed by Matt Baker.
62
63         Test: inspector/dom-debugger/url-breakpoints.html
64
65         * Modules/fetch/FetchResponse.cpp:
66         (WebCore::FetchResponse::fetch):
67
68         * inspector/InspectorInstrumentation.h:
69         (WebCore::InspectorInstrumentation::willFetch): Added.
70         * inspector/InspectorInstrumentation.cpp:
71         (WebCore::InspectorInstrumentation::willFetchImpl): Added.
72
73         * inspector/agents/InspectorDOMDebuggerAgent.h:
74         * inspector/agents/InspectorDOMDebuggerAgent.cpp:
75         (WebCore::InspectorDOMDebuggerAgent::disable):
76         (WebCore::InspectorDOMDebuggerAgent::discardBindings):
77         (WebCore::InspectorDOMDebuggerAgent::setURLBreakpoint): Added.
78         (WebCore::InspectorDOMDebuggerAgent::removeURLBreakpoint): Added.
79         (WebCore::InspectorDOMDebuggerAgent::breakOnURLIfNeeded): Added.
80         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
81         (WebCore::InspectorDOMDebuggerAgent::willFetch): Added.
82         (WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint): Deleted.
83         (WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint): Deleted.
84
85 2019-01-07  Eric Carlson  <eric.carlson@apple.com>
86
87         Cleanup AudioTrackPrivateMediaStreamCocoa
88         https://bugs.webkit.org/show_bug.cgi?id=193208
89         <rdar://problem/42225870>
90
91         Reviewed by Youenn Fablet.
92
93         * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
94         (WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable): Clear input and
95         output format descriptions after stopping the audio unit.
96
97 2019-01-07  Devin Rousso  <drousso@apple.com>
98
99         Web Inspector: Network: show secure connection details per-request
100         https://bugs.webkit.org/show_bug.cgi?id=191539
101         <rdar://problem/45979891>
102
103         Reviewed by Joseph Pecoraro.
104
105         Test: http/tests/inspector/network/resource-security-connection.html
106
107         * platform/network/NetworkLoadMetrics.h:
108         (WebCore::NetworkLoadMetrics:isolatedCopy):
109         (WebCore::NetworkLoadMetrics:clearNonTimingData):
110         (WebCore::NetworkLoadMetrics:operator==):
111         (WebCore::NetworkLoadMetrics:encode):
112         (WebCore::NetworkLoadMetrics:decode):
113
114         * inspector/agents/InspectorNetworkAgent.cpp:
115         (WebCore::InspectorNetworkAgent::buildObjectForMetrics):
116
117 2019-01-07  Eric Carlson  <eric.carlson@apple.com>
118
119         Deactivate audio session whenever possible
120         https://bugs.webkit.org/show_bug.cgi?id=193188
121         <rdar://problem/42678977>
122
123         Reviewed by Jer Noble.
124
125         Test: media/deactivate-audio-session.html
126
127         * platform/audio/AudioSession.cpp:
128         (WebCore::AudioSession::tryToSetActive):
129         (WebCore::AudioSession::tryToSetActiveInternal):
130         * platform/audio/AudioSession.h:
131         (WebCore::AudioSession::isActive const):
132
133         * platform/audio/PlatformMediaSessionManager.cpp:
134         (WebCore::PlatformMediaSessionManager::removeSession):
135         (WebCore::deactivateAudioSession):
136         (WebCore::PlatformMediaSessionManager::shouldDeactivateAudioSession):
137         (WebCore::PlatformMediaSessionManager::setShouldDeactivateAudioSession):
138         * platform/audio/PlatformMediaSessionManager.h:
139
140         * platform/audio/ios/AudioSessionIOS.mm:
141         (WebCore::AudioSession::tryToSetActiveInternal):
142         (WebCore::AudioSession::tryToSetActive): Deleted.
143
144         * platform/audio/mac/AudioSessionMac.cpp:
145         (WebCore::AudioSession::tryToSetActiveInternal):
146         (WebCore::AudioSession::tryToSetActive): Deleted.
147
148         * testing/Internals.cpp:
149         (WebCore::Internals::audioSessionActive const):
150         * testing/Internals.h:
151         * testing/Internals.idl:
152
153 2019-01-07  David Kilzer  <ddkilzer@apple.com>
154
155         PlatformECKey should use a std::unique_ptr
156         <https://webkit.org/b/193170>
157
158         Reviewed by Brent Fulgham.
159
160         Broadly:
161         - Switch from using raw pointers to using std::unique_ptr<> to
162           hold PlatformECKey.
163         - Introduce PlatformECKeyContainer type to handle different
164           std::unique_ptr<> types on each platform.
165         - Get rid of custom CryptoKeyEC destructors since the
166           std::unique_ptr<> handles that with a Deleter.
167         - Initialize stack variables to nullptr.
168
169         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
170         (WebCore::CryptoKeyEC::keySizeInBits const):
171         (WebCore::CryptoKeyEC::platformGeneratePair):
172         (WebCore::CryptoKeyEC::platformImportRaw):
173         (WebCore::CryptoKeyEC::platformImportJWKPublic):
174         (WebCore::CryptoKeyEC::platformImportJWKPrivate):
175         (WebCore::CryptoKeyEC::platformImportSpki):
176         (WebCore::CryptoKeyEC::platformImportPkcs8):
177         (WebCore::CryptoKeyEC::platformExportRaw const):
178         (WebCore::CryptoKeyEC::platformAddFieldElements const):
179         (WebCore::CryptoKeyEC::platformExportSpki const):
180         (WebCore::CryptoKeyEC::platformExportPkcs8 const):
181         (WebCore::CryptoKeyEC::~CryptoKeyEC): Deleted.
182         * crypto/keys/CryptoKeyEC.cpp:
183         (WebCore::CryptoKeyEC::CryptoKeyEC):
184         * crypto/keys/CryptoKeyEC.h:
185         (WebCore::CCECCryptorRefDeleter::operator() const):
186         * crypto/mac/CryptoKeyECMac.cpp:
187         (WebCore::CryptoKeyEC::keySizeInBits const):
188         (WebCore::CryptoKeyEC::platformGeneratePair):
189         (WebCore::CryptoKeyEC::platformImportRaw):
190         (WebCore::CryptoKeyEC::platformExportRaw const):
191         (WebCore::CryptoKeyEC::platformImportJWKPublic):
192         (WebCore::CryptoKeyEC::platformImportJWKPrivate):
193         (WebCore::CryptoKeyEC::platformAddFieldElements const):
194         (WebCore::CryptoKeyEC::platformImportSpki):
195         (WebCore::CryptoKeyEC::platformExportSpki const):
196         (WebCore::CryptoKeyEC::platformImportPkcs8):
197         (WebCore::CryptoKeyEC::platformExportPkcs8 const):
198         (WebCore::CryptoKeyEC::~CryptoKeyEC): Deleted.
199
200 2019-01-07  Antti Koivisto  <antti@apple.com>
201
202         UI process side scrollbars for UI side compositing on Mac
203         https://bugs.webkit.org/show_bug.cgi?id=193106
204
205         Reviewed by Tim Horton.
206
207         * page/FrameView.cpp:
208         (WebCore::FrameView::paintScrollCorner):
209         * page/scrolling/AsyncScrollingCoordinator.cpp:
210         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
211
212         Pass scrollbar host layers and the dark appearance bit to the scrolling tree.
213
214         * page/scrolling/ScrollingCoordinator.cpp:
215         (WebCore::ScrollingCoordinator::verticalScrollbarLayerForFrameView):
216         (WebCore::ScrollingCoordinator::horizontalScrollbarLayerForFrameView):
217         * page/scrolling/ScrollingCoordinator.h:
218         (WebCore::ScrollableAreaParameters::ScrollableAreaParameters):
219         (WebCore::ScrollableAreaParameters::operator== const):
220         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
221         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
222         (WebCore::ScrollingStateFrameScrollingNode::setScrollbarLayers):
223         * page/scrolling/ScrollingStateFrameScrollingNode.h:
224         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
225         * page/scrolling/ScrollingTreeScrollingNode.h:
226         (WebCore::ScrollingTreeScrollingNode::scrollableAreaSize const):
227         (WebCore::ScrollingTreeScrollingNode::totalContentsSize const):
228         (WebCore::ScrollingTreeScrollingNode::useDarkAppearanceForScrollbars const):
229         (WebCore::ScrollingTreeScrollingNode::lastCommittedScrollPosition const):
230         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
231         * platform/ScrollableArea.cpp:
232         (WebCore::ScrollableArea::useDarkAppearanceForScrollbars const):
233
234         Factor into a function as this is used in several places.
235
236         * platform/ScrollableArea.h:
237         * platform/mac/NSScrollerImpDetails.h:
238         * platform/mac/ScrollAnimatorMac.mm:
239         (-[WebScrollerImpDelegate effectiveAppearanceForScrollerImp:]):
240         * platform/mac/ScrollbarThemeMac.h:
241
242 2019-01-07  Wenson Hsieh  <wenson_hsieh@apple.com>
243
244         Native caret shows up alongside the page's caret when requesting desktop site on jsfiddle.net
245         https://bugs.webkit.org/show_bug.cgi?id=193180
246         <rdar://problem/45971041>
247
248         Reviewed by Tim Horton.
249
250         Adjust a method on RenderObject to additionally detect when the RenderObject is inside of an `overflow: hidden`
251         container that is also empty. See WebKit ChangeLog for more details.
252
253         Test:   editing/selection/ios/hide-selection-in-empty-overflow-hidden-container.html
254                 editing/selection/ios/show-selection-in-empty-overflow-hidden-document.html
255
256         * rendering/RenderObject.cpp:
257         (WebCore::RenderObject::isTransparentOrFullyClippedRespectingParentFrames const):
258         (WebCore::RenderObject::isTransparentRespectingParentFrames const): Deleted.
259         * rendering/RenderObject.h:
260
261 2019-01-07  Zalan Bujtas  <zalan@apple.com>
262
263         [LFC][BFC] Margin collapsing should not be limited to in-flow non-replaced boxes.
264         https://bugs.webkit.org/show_bug.cgi?id=193183
265
266         Reviewed by Antti Koivisto.
267
268         * layout/FormattingContext.cpp:
269         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
270         * layout/FormattingContextGeometry.cpp:
271         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
272         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
273         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
274         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
275         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
276         * layout/LayoutUnits.h:
277         * layout/blockformatting/BlockFormattingContext.cpp:
278         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
279         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
280         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
281         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
282         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
283         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
284         * layout/inlineformatting/InlineFormattingContext.cpp:
285         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):
286
287 2019-01-07  Zalan Bujtas  <zalan@apple.com>
288
289         [LFC][BFC] Move MarginCollapse from BlockFormattingContext::Geometry to BlockFormattingContext
290         https://bugs.webkit.org/show_bug.cgi?id=193181
291
292         Reviewed by Antti Koivisto.
293
294         This is in preparation to share margin collapsing across all boxes in block formatting context.
295
296         * layout/blockformatting/BlockFormattingContext.h:
297         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
298         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
299         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
300         * layout/blockformatting/BlockMarginCollapse.cpp:
301         (WebCore::Layout::BlockFormattingContext::MarginCollapse::computedNonCollapsedMarginBefore):
302         (WebCore::Layout::BlockFormattingContext::MarginCollapse::computedNonCollapsedMarginAfter):
303         (WebCore::Layout::BlockFormattingContext::MarginCollapse::nonCollapsedMarginBefore):
304         (WebCore::Layout::BlockFormattingContext::MarginCollapse::nonCollapsedMarginAfter):
305         (WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedMarginBeforeFromFirstChild):
306         (WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedMarginAfterFromLastChild):
307         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter):
308         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore):
309         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance):
310         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginBefore):
311         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
312         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSibling):
313         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithNextSibling):
314         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough):
315         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBefore):
316         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfter):
317         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBefore): Deleted.
318         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginAfter): Deleted.
319         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginBefore): Deleted.
320         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginAfter): Deleted.
321         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginBeforeFromFirstChild): Deleted.
322         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginAfterFromLastChild): Deleted.
323         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter): Deleted.
324         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore): Deleted.
325         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance): Deleted.
326         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginBefore): Deleted.
327         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter): Deleted.
328         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithPreviousSibling): Deleted.
329         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithNextSibling): Deleted.
330         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginsCollapseThrough): Deleted.
331         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBefore): Deleted.
332         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter): Deleted.
333
334 2019-01-07  Zan Dobersek  <zdobersek@igalia.com>
335
336         [WPE] Use Widget bounds for PlatformScreen rectangle information
337         https://bugs.webkit.org/show_bug.cgi?id=193190
338
339         Reviewed by Philippe Normand.
340
341         Provide a better screen area estimate in screenRect() and
342         screenAvailableRect() return values than the current 1240x640 value by
343         using the Widget's bounds rectangle.
344
345         This approach is only factually correct when the Widget-associated view
346         is displayed in fullscreen, but it provides a better estimate even when
347         displayed in any other case as well. WPE doesn't provide specific API
348         that could enable the embedding environment to provide this information.
349
350         * platform/wpe/PlatformScreenWPE.cpp:
351         (WebCore::screenRect): Return bounds of the Widget object.
352         (WebCore::screenAvailableRect): Relay the call to screenRect().
353
354 2019-01-07  Zan Dobersek  <zdobersek@igalia.com>
355
356         Make Gradient::gradientSpaceTransform(), Pattern::patternSpaceTransform() methods const
357         https://bugs.webkit.org/show_bug.cgi?id=193189
358
359         Reviewed by Philippe Normand.
360
361         The transform getter methods on the Gradient and Pattern classes both
362         return const references to the transform objects, and don't modify any
363         internal state. They should be marked const accordingly, allowing
364         invocations of these two methods through const references to Gradient
365         and Pattern objects.
366
367         * platform/graphics/Gradient.h:
368         (WebCore::Gradient::gradientSpaceTransform): Now const.
369         * platform/graphics/Pattern.h:
370         (WebCore::Pattern::patternSpaceTransform): Now const.
371
372 2019-01-07  Zan Dobersek  <zdobersek@igalia.com>
373
374         REGRESSION(r239636): ImageDecoder::setEncodedDataStatusChangeCallback() can be called on a null decoder
375         https://bugs.webkit.org/show_bug.cgi?id=193187
376
377         Reviewed by Philippe Normand.
378
379         * platform/graphics/ImageSource.cpp:
380         (WebCore::ImageSource::ensureDecoderAvailable): Bail before calling the
381         setEncodedDataStatusChangeCallback() method when the returned
382         ImageDecoder object is null.
383
384 2019-01-06  Zan Dobersek  <zdobersek@igalia.com>
385
386         [Nicosia] Take over CoordinatedGraphics-named implementation of async scrolling classes
387         https://bugs.webkit.org/show_bug.cgi?id=193133
388
389         Reviewed by Michael Catanzaro.
390
391         Move the CoordinatedGraphics-specific files under
392         page/scrolling/coordinatedgraphics/ to page/scrolling/nicosia/, along
393         with renaming the files and classes accordingly. Implementation will
394         only depend on the Nicosia-specific layer structure and is not specific
395         to the CoordinatedGraphics system.
396
397         * PlatformPlayStation.cmake:
398         * SourcesGTK.txt:
399         * SourcesWPE.txt:
400         * page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp.
401         * page/scrolling/nicosia/ScrollingCoordinatorNicosia.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h.
402         * page/scrolling/nicosia/ScrollingStateNodeNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingStateNodeCoordinatedGraphics.cpp.
403         * page/scrolling/nicosia/ScrollingTreeFixedNode.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.cpp.
404         * page/scrolling/nicosia/ScrollingTreeFixedNode.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.h.
405         * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFrameScrollingNodeCoordinatedGraphics.cpp.
406         * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFrameScrollingNodeCoordinatedGraphics.h.
407         * page/scrolling/nicosia/ScrollingTreeNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeCoordinatedGraphics.cpp.
408         * page/scrolling/nicosia/ScrollingTreeNicosia.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeCoordinatedGraphics.h.
409         * page/scrolling/nicosia/ScrollingTreeStickyNode.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.cpp.
410         * page/scrolling/nicosia/ScrollingTreeStickyNode.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.h.
411         * platform/TextureMapper.cmake:
412
413 2019-01-06  Jiewen Tan  <jiewen_tan@apple.com>
414
415         [WebAuthN] Import U2F command/response converters from Chromium
416         https://bugs.webkit.org/show_bug.cgi?id=193150
417         <rdar://problem/47054028>
418
419         Reviewed by Brent Fulgham.
420
421         This patch imports Chromium's U2F command/response converters:
422         https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-client-to-authenticator-protocol-v2.0-id-20180227.html#u2f-interoperability
423         1. It directly imports the following files and suit them to WebKit's coding style:
424         https://cs.chromium.org/chromium/src/device/fido/u2f_command_constructor.cc?l=1&rcl=db624110317d01efa78cd32e7be1524190e1beb0
425         https://cs.chromium.org/chromium/src/device/fido/u2f_command_constructor.h?rcl=db624110317d01efa78cd32e7be1524190e1beb0
426         https://cs.chromium.org/chromium/src/device/fido/u2f_command_constructor_unittest.cc?rcl=db624110317d01efa78cd32e7be1524190e1beb0
427         2. It gathers the following methods into U2fResponseConverter:
428         AuthenticatorMakeCredentialResponse::CreateFromU2fRegisterResponse()
429         AuthenticatorGetAssertionResponse::CreateFromU2fSignResponse()
430         3. It also updates FidoConstants.h, FidoTestData.h and CtapResponseTest.cpp accordingly.
431
432         Besides importing stuff from Chroimum, it also gathers a bunch of constants and helper functions into WebAuthenticationConstants.h
433         and WebAuthenticationUtils.h. It also fixes Bug 183534: 2) and 7).
434
435         Covered by API tests.
436
437         * Modules/webauthn/AuthenticatorCoordinator.cpp:
438         (WebCore::AuthenticatorCoordinatorInternal::produceClientDataJsonHash):
439         * Modules/webauthn/WebAuthenticationConstants.h: Copied from Source/WebCore/Modules/webauthn/COSEConstants.h.
440         * Modules/webauthn/WebAuthenticationUtils.cpp: Added.
441         (WebCore::convertBytesToVector):
442         (WebCore::produceRpIdHash):
443         (WebCore::encodeES256PublicKeyAsCBOR):
444         (WebCore::buildAttestedCredentialData):
445         (WebCore::buildAuthData):
446         (WebCore::buildAttestationObject):
447         * Modules/webauthn/WebAuthenticationUtils.h: Renamed from Source/WebCore/Modules/webauthn/COSEConstants.h.
448         * Modules/webauthn/fido/DeviceResponseConverter.cpp:
449         (fido::getCredentialId):
450         (fido::readCTAPGetInfoResponse):
451         * Modules/webauthn/fido/FidoConstants.h:
452         * Modules/webauthn/fido/U2fCommandConstructor.cpp: Added.
453         (fido::WebCore::constructU2fRegisterCommand):
454         (fido::WebCore::constructU2fSignCommand):
455         (fido::isConvertibleToU2fRegisterCommand):
456         (fido::isConvertibleToU2fSignCommand):
457         (fido::convertToU2fRegisterCommand):
458         (fido::convertToU2fCheckOnlySignCommand):
459         (fido::convertToU2fSignCommand):
460         (fido::constructBogusU2fRegistrationCommand):
461         * Modules/webauthn/fido/U2fCommandConstructor.h: Added.
462         * Modules/webauthn/fido/U2fResponseConverter.cpp: Added.
463         (fido::WebCore::extractECPublicKeyFromU2fRegistrationResponse):
464         (fido::WebCore::extractCredentialIdFromU2fRegistrationResponse):
465         (fido::WebCore::createAttestedCredentialDataFromU2fRegisterResponse):
466         (fido::WebCore::parseX509Length):
467         (fido::WebCore::createFidoAttestationStatementFromU2fRegisterResponse):
468         (fido::readU2fRegisterResponse):
469         (fido::readFromU2fSignResponse):
470         * Modules/webauthn/fido/U2fResponseConverter.h: Added.
471         * Modules/webgpu/WebGPUCommandBuffer.cpp:
472         * Sources.txt:
473         * WebCore.xcodeproj/project.pbxproj:
474
475 2019-01-06  David Kilzer  <ddkilzer@apple.com>
476
477         Leak of WTF::Function objects in WebCore::CryptoKeyRSA::generatePair() (64-80 bytes each) in com.apple.WebKit.WebContent running WebKit layout tests
478         <https://webkit.org/b/193177>
479         <rdar://problem/47072196>
480
481         Reviewed by Saam Barati.
482
483         * crypto/mac/CryptoKeyRSAMac.cpp:
484         (WebCore::CryptoKeyRSA::generatePair): Fix the leak by changing
485         raw pointers to heap-allocated __block variables to hold the
486         WTF::Function objects until they are consumed within the block
487         passed to dispatch_async().  The __block variables act like
488         captured variables in a C++ lambda and have the same lifetime as
489         the block that they are captured in.  Note that we would have to
490         convert the source file from C++ to Objective-C++ to use a C++
491         lambda functor with dispatch_async(), which creates its own
492         issue because the comipiler requires a copy constructor to
493         convert the C++ lambda to a block functor, but the copy
494         constructor for the C++ lambda is implicitly deleted because the
495         WTF::Function copy constructor is explicitly deleted.  Whew!
496
497 2019-01-06  Pablo Saavedra  <psaavedra@igalia.com>
498
499         [WPE][GTK] Building with ENABLE_VIDEO=OFF fails trying to use Document MediaPlayback functions.
500         https://bugs.webkit.org/show_bug.cgi?id=193174
501
502         Reviewed by Michael Catanzaro.
503
504         * page/Page.cpp:
505         (WebCore::Page::stopAllMediaPlayback):
506         (WebCore::Page::suspendAllMediaPlayback):
507         (WebCore::Page::resumeAllMediaPlayback):
508
509 2019-01-05  David Kilzer  <ddkilzer@apple.com>
510
511         Leak of two CCRSACryptorRef (4.0 Kbytes/1 page each) in com.apple.WebKit.WebContent running WebKit layout tests
512         <https://webkit.org/b/193154>
513         <rdar://problem/47052993>
514
515         Reviewed by Brent Fulgham.
516
517         Broadly:
518         - Fix leaks by switching from using raw pointers to using
519           std::unique_ptr<>.
520         - Introduce PlatformRSAKeyContainer type to handle different
521           std::unique_ptr<> on each platform.
522         - Get rid of custom CryptoKeyRSA destructors since the
523           std::unique_ptr<> handles that with a Deleter.
524         - Initialize stack variables to nullptr.
525
526         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
527         (WebCore::CryptoKeyRSA::create):
528         (WebCore::CryptoKeyRSA::CryptoKeyRSA):
529         (WebCore::CryptoKeyRSA::keySizeInBits const):
530         (WebCore::CryptoKeyRSA::generatePair):
531         (WebCore::CryptoKeyRSA::importSpki):
532         (WebCore::CryptoKeyRSA::importPkcs8):
533         (WebCore::CryptoKeyRSA::exportSpki const):
534         (WebCore::CryptoKeyRSA::exportPkcs8 const):
535         (WebCore::CryptoKeyRSA::algorithm const):
536         (WebCore::CryptoKeyRSA::exportData const):
537         (WebCore::CryptoKeyRSA::~CryptoKeyRSA): Deleted.
538         * crypto/keys/CryptoKeyRSA.h:
539         (WebCore::CCRSACryptorRefDeleter::operator() const):
540         * crypto/mac/CryptoKeyRSAMac.cpp:
541         (WebCore::getPublicKeyComponents):
542         (WebCore::getPrivateKeyComponents):
543         (WebCore::CryptoKeyRSA::CryptoKeyRSA):
544         (WebCore::CryptoKeyRSA::create):
545         (WebCore::CryptoKeyRSA::exportData const):
546         (WebCore::CryptoKeyRSA::generatePair):
547         (WebCore::CryptoKeyRSA::importSpki):
548         (WebCore::CryptoKeyRSA::importPkcs8):
549         (WebCore::CryptoKeyRSA::~CryptoKeyRSA): Deleted.
550
551 2019-01-05  Zalan Bujtas  <zalan@apple.com>
552
553         Incorrect clipping across compositing boundary.
554         https://bugs.webkit.org/show_bug.cgi?id=193172
555         <rdar://problem/44693008>
556
557         Reviewed by Simon Fraser.
558
559         Use temporary cliprect type when crossing compositing boundary to prevent cliprect caching.
560
561         The issue here is that RenderLayer::backgroundClipRect() could cross compositing boundary by calling parentClipRects() which triggers
562         clip rect update using the wrong painting root. This happens when the layer hierarchy and the compositing context do not match.
563         For clip rect computation, we need to climb up on the layer hierarchy (calling parent layer's cliprect functions)
564         but we also need to make sure that the computed cliprects on any given layer are cached only when the painting root is correct.
565         It ensures that when we paint a layer (with the painting root as entry point), the cached cliprects are always based on its onw painting root. 
566
567         Test: compositing/clipping/cached-cliprect-with-compositing-boundary.html
568
569         * rendering/RenderLayer.cpp:
570         (WebCore::RenderLayer::calculateClipRects const):
571
572 2019-01-05  Youenn Fablet  <youenn@apple.com>
573
574         Service Worker fetch should obey its referrer policy
575         https://bugs.webkit.org/show_bug.cgi?id=193152
576
577         Reviewed by Chris Dumez.
578
579         Pass referrer policy retrieved when fetching the service worker script to the SWServer.
580         The SWServer then stores it persistently and sends it to the manager creating service workers.
581         This manager will then set the referrer policy on the dummy Document of the corresponding service worker.
582
583         Covered by rebased test.
584
585         * workers/WorkerScriptLoader.cpp:
586         (WebCore::WorkerScriptLoader::didReceiveResponse):
587         * workers/WorkerScriptLoader.h:
588         (WebCore::WorkerScriptLoader::referrerPolicy const):
589         * workers/service/SWClientConnection.cpp:
590         (WebCore::SWClientConnection::failedFetchingScript):
591         * workers/service/ServiceWorkerContainer.cpp:
592         (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
593         * workers/service/ServiceWorkerContainer.h:
594         * workers/service/ServiceWorkerContextData.cpp:
595         (WebCore::ServiceWorkerContextData::isolatedCopy const):
596         * workers/service/ServiceWorkerContextData.h:
597         (WebCore::ServiceWorkerContextData::encode const):
598         (WebCore::ServiceWorkerContextData::decode):
599         * workers/service/ServiceWorkerFetchResult.h:
600         (WebCore::ServiceWorkerFetchResult::encode const):
601         (WebCore::ServiceWorkerFetchResult::decode):
602         * workers/service/ServiceWorkerJob.cpp:
603         (WebCore::ServiceWorkerJob::notifyFinished):
604         * workers/service/ServiceWorkerJobClient.h:
605         * workers/service/context/ServiceWorkerThreadProxy.cpp:
606         (WebCore::createPageForServiceWorker):
607         * workers/service/server/RegistrationDatabase.cpp:
608         (WebCore::recordsTableSchema):
609         (WebCore::RegistrationDatabase::doPushChanges):
610         (WebCore::RegistrationDatabase::importRecords):
611         * workers/service/server/SWServer.cpp:
612         (WebCore::SWServer::addRegistrationFromStore):
613         (WebCore::SWServer::updateWorker):
614         (WebCore::SWServer::installContextData):
615         * workers/service/server/SWServer.h:
616         * workers/service/server/SWServerJobQueue.cpp:
617         (WebCore::SWServerJobQueue::scriptFetchFinished):
618         * workers/service/server/SWServerWorker.cpp:
619         (WebCore::SWServerWorker::SWServerWorker):
620         (WebCore::SWServerWorker::contextData const):
621         * workers/service/server/SWServerWorker.h:
622
623 2019-01-04  Simon Fraser  <simon.fraser@apple.com>
624
625         Factor legacy WK1 code for fixed and scrolling layers into their own helper class
626         https://bugs.webkit.org/show_bug.cgi?id=193165
627
628         Reviewed by Frédéric Wang.
629
630         RenderLayerCompositor has some code to handle registration of viewport-constrained
631         and scrolling layers which is specific to iOS WK1. To reduce pollution, move this
632         into its own helper class called LegacyWebKitScrollingLayerCoordinator, which is only
633         allocated for iOS WK1.
634         
635         iOS WK1 never has a ScrollingCoordinator, so rather than the check for scrollingCoordinator(),
636         we know that we only made a LegacyWebKitScrollingLayerCoordinator when there's a platform widget
637         (i.e. WK1).
638         
639         * page/ChromeClient.h:
640         * rendering/RenderLayerCompositor.cpp:
641         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
642         (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
643         (WebCore::RenderLayerCompositor::didFlushChangesForLayer):
644         (WebCore::RenderLayerCompositor::setIsInWindow):
645         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking): No longer check the page cache state; now we
646         destroy the render tree of pages in the page cache, so we should never hit this code path.
647         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
648         (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers):
649         (WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllViewportConstrainedLayers):
650         (WebCore::scrollbarHasDisplayNone):
651         (WebCore::LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer):
652         (WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllScrollingLayers):
653         (WebCore::LegacyWebKitScrollingLayerCoordinator::registerScrollingLayersNeedingUpdate):
654         (WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllScrollingLayers):
655         (WebCore::LegacyWebKitScrollingLayerCoordinator::addScrollingLayer):
656         (WebCore::LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer):
657         (WebCore::LegacyWebKitScrollingLayerCoordinator::didFlushChangesForLayer):
658         (WebCore::updateScrollingLayerWithClient): Deleted.
659         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers): Deleted.
660         (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers): Deleted.
661         (WebCore::RenderLayerCompositor::registerAllScrollingLayers): Deleted.
662         (WebCore::RenderLayerCompositor::unregisterAllScrollingLayers): Deleted.
663         * rendering/RenderLayerCompositor.h:
664         (WebCore::LegacyWebKitScrollingLayerCoordinator::LegacyWebKitScrollingLayerCoordinator):
665         * workers/service/ServiceWorkerContainer.cpp:
666         (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
667
668 2019-01-05  Zalan Bujtas  <zalan@apple.com>
669
670         [LFC] VerticalMargin should only have the used values.
671         https://bugs.webkit.org/show_bug.cgi?id=193168
672
673         Reviewed by Antti Koivisto.
674
675         Split VerticalMargin into ComputedVerticalMargin and UsedVerticalMargin.
676         ComputedVerticalMargin holds the computed (optional) values while UsedVerticalMargin holds both the
677         collapsed (optional) and the non-collapsed values.
678
679         * layout/FormattingContext.cpp:
680         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
681         * layout/FormattingContext.h:
682         * layout/FormattingContextGeometry.cpp:
683         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
684         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
685         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
686         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
687         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
688         (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin):
689         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue): Deleted.
690         * layout/FormattingContextQuirks.cpp:
691         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
692         * layout/LayoutUnits.h:
693         * layout/MarginTypes.h:
694         (WebCore::Layout::UsedVerticalMargin::before const):
695         (WebCore::Layout::UsedVerticalMargin::after const):
696         (WebCore::Layout::UsedVerticalMargin::nonCollapsedValues const):
697         (WebCore::Layout::UsedVerticalMargin::collapsedValues const):
698         (WebCore::Layout::UsedVerticalMargin::hasCollapsedValues const):
699         (WebCore::Layout::UsedVerticalMargin::setCollapsedValues):
700         (WebCore::Layout::UsedVerticalMargin::UsedVerticalMargin):
701         (WebCore::Layout::VerticalMargin::nonCollapsedValues const): Deleted.
702         (WebCore::Layout::VerticalMargin::collapsedValues const): Deleted.
703         (WebCore::Layout::VerticalMargin::setCollapsedValues): Deleted.
704         (WebCore::Layout::VerticalMargin::VerticalMargin): Deleted.
705         (WebCore::Layout::VerticalMargin::usedValues const): Deleted.
706         * layout/blockformatting/BlockFormattingContext.cpp:
707         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
708         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
709         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
710         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
711         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
712         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
713         * layout/blockformatting/BlockMarginCollapse.cpp:
714         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBefore):
715         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginAfter):
716         * layout/displaytree/DisplayBox.h:
717         (WebCore::Display::Box::setVerticalMargin):
718         (WebCore::Display::Box::verticalMargin const):
719         (WebCore::Display::Box::marginBefore const):
720         (WebCore::Display::Box::marginAfter const):
721         * layout/floats/FloatingContext.cpp:
722         (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
723         * layout/inlineformatting/InlineFormattingContext.cpp:
724         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):
725
726 2019-01-04  Daniel Bates  <dabates@apple.com>
727
728         REGRESSION (r238522): Erratic scrolling on Google flights search result page and vrbo.com
729         https://bugs.webkit.org/show_bug.cgi?id=192996
730         <rdar://problem/46573552>
731
732         Reviewed by Simon Fraser.
733
734         Only scroll a text field if its inner text size changes and it is the currently active and
735         focused element on the page.
736
737         Test: fast/scrolling/page-should-not-scroll-on-unfocused-text-field-layout.html
738
739         * rendering/RenderTextControlSingleLine.cpp:
740         (WebCore::RenderTextControlSingleLine::layout):
741
742 2019-01-04  Alex Christensen  <achristensen@webkit.org>
743
744         Progress towards fixing Mac CMake build
745         https://bugs.webkit.org/show_bug.cgi?id=193105
746
747         Reviewed by Don Olmstead.
748
749         * PlatformMac.cmake:
750         * Sources.txt:
751         * SourcesCocoa.txt:
752         * WebCore.xcodeproj/project.pbxproj:
753         * platform/graphics/gpu/GPURenderPassEncoder.h:
754
755 2019-01-04  Zalan Bujtas  <zalan@apple.com>
756
757         [iOS] ERROR: post-layout: dirty renderer(s) in WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker()
758         https://bugs.webkit.org/show_bug.cgi?id=189608
759         <rdar://problem/44473299>
760
761         Reviewed by Simon Fraser.
762
763         When a frameset/iframe is hidden and we skip layout, clear the dirty flag on its subtree as well.
764
765         Covered by fast/frames/invalid-frameset.html.
766
767         * rendering/RenderFrameSet.cpp:
768         (WebCore::clearSiblingSubtrees):
769         (WebCore::RenderFrameSet::positionFrames):
770         (WebCore::RenderFrameSet::positionFramesWithFlattening):
771
772 2019-01-04  Youenn Fablet  <youenn@apple.com>
773
774         [Fetch API] Implement abortable fetch
775         https://bugs.webkit.org/show_bug.cgi?id=174980
776         <rdar://problem/46861402>
777
778         Reviewed by Chris Dumez.
779
780         Add an AbortSignal to FetchRequest.
781
782         Add support for AbortSignal algorithm.
783         The fetch request signal is added an algorithm to abort the fetch.
784         Update clone algorithm to let signal of the cloned request be following the origin request.
785
786         Update ReadableStream error handling to return an exception instead of a string.
787         This allows passing an AbortError instead of a TypeError as previously done.
788
789         Update FetchBodyOwner to store a loading error either as an exception or as a resource error.
790         The latter is used for passing the error from service worker back to the page.
791         The former is used to pass it to ReadableStream or body accessors.
792
793         Covered by enabled tests.
794
795         * Modules/cache/DOMCache.cpp:
796         (WebCore::DOMCache::put):
797         * Modules/fetch/FetchBody.cpp:
798         (WebCore::FetchBody::consumeAsStream):
799         (WebCore::FetchBody::loadingFailed):
800         * Modules/fetch/FetchBody.h:
801         * Modules/fetch/FetchBodyConsumer.cpp:
802         (WebCore::FetchBodyConsumer::loadingFailed):
803         * Modules/fetch/FetchBodyConsumer.h:
804         * Modules/fetch/FetchBodyOwner.cpp:
805         (WebCore::FetchBodyOwner::arrayBuffer):
806         (WebCore::FetchBodyOwner::blob):
807         (WebCore::FetchBodyOwner::cloneBody):
808         (WebCore::FetchBodyOwner::formData):
809         (WebCore::FetchBodyOwner::json):
810         (WebCore::FetchBodyOwner::text):
811         (WebCore::FetchBodyOwner::loadBlob):
812         (WebCore::FetchBodyOwner::blobLoadingFailed):
813         (WebCore::FetchBodyOwner::consumeBodyAsStream):
814         (WebCore::FetchBodyOwner::setLoadingError):
815         * Modules/fetch/FetchBodyOwner.h:
816         (WebCore::FetchBodyOwner::loadingError const):
817         (WebCore::FetchBodyOwner::loadingException const):
818         * Modules/fetch/FetchBodySource.cpp:
819         (WebCore::FetchBodySource::error):
820         * Modules/fetch/FetchBodySource.h:
821         * Modules/fetch/FetchRequest.cpp:
822         (WebCore::FetchRequest::initializeWith):
823         (WebCore::FetchRequest::clone):
824         * Modules/fetch/FetchRequest.h:
825         (WebCore::FetchRequest::FetchRequest):
826         * Modules/fetch/FetchRequest.idl:
827         * Modules/fetch/FetchRequestInit.h:
828         (WebCore::FetchRequestInit::hasMembers const):
829         * Modules/fetch/FetchRequestInit.idl:
830         * Modules/fetch/FetchResponse.cpp:
831         (WebCore::FetchResponse::clone):
832         (WebCore::FetchResponse::fetch):
833         (WebCore::FetchResponse::BodyLoader::didFail):
834         * Modules/fetch/FetchResponse.h:
835         * bindings/js/ReadableStreamDefaultController.h:
836         (WebCore::ReadableStreamDefaultController::error):
837         * dom/AbortSignal.cpp:
838         (WebCore::AbortSignal::abort):
839         (WebCore::AbortSignal::follow):
840         * dom/AbortSignal.h:
841
842 2019-01-04  Brent Fulgham  <bfulgham@apple.com>
843
844         Parsed protocol of javascript URLs with embedded newlines and carriage returns do not match parsed protocol in Chrome and Firefox
845         https://bugs.webkit.org/show_bug.cgi?id=193155
846         <rdar://problem/40230982>
847
848         Reviewed by Chris Dumez.
849
850         Test: fast/loader/comment-only-javascript-url.html
851
852         Make a special case for URLs beginning with 'javascript:'. We should always
853         treat these as JS URLs, even if the content contained within the URL
854         string might match other parts of the URL parsing spec.
855
856         * html/URLUtils.h:
857         (WebCore::URLUtils<T>::protocol const):
858
859 2019-01-04  Jer Noble  <jer.noble@apple.com>
860
861         [WebKitLegacy] Media playback pauses on scroll
862         https://bugs.webkit.org/show_bug.cgi?id=192829
863
864         Reviewed by Eric Carlson.
865
866         New API tests:
867             WebKitLegacy.ScrollingDoesNotPauseMedia
868             WKWebView.StopAllMediaPlayback
869             WKWebView.SuspendResumeAllMediaPlayback
870
871         Do not use suspendActiveDOMObjects(ReasonForSuspension::PageWillBeSuspended) to pause
872         video. Roll back the changes to HTMLMediaElement, and introduce a new set of Page calls
873         suspendAllMediaPlayback() & resumeAllMediaPlayback() which replaces the removed bahavior.
874
875         * dom/Document.cpp:
876         (WebCore::Document::~Document):
877         (WebCore::Document::stopAllMediaPlayback):
878         (WebCore::Document::suspendAllMediaPlayback):
879         (WebCore::Document::resumeAllMediaPlayback):
880         * dom/Document.h:
881         * html/HTMLMediaElement.cpp:
882         (WebCore::HTMLMediaElement::HTMLMediaElement):
883         (WebCore::HTMLMediaElement::parseAttribute):
884         (WebCore::HTMLMediaElement::didFinishInsertingNode):
885         (WebCore::HTMLMediaElement::setSrcObject):
886         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
887         (WebCore::HTMLMediaElement::suspend):
888         (WebCore::HTMLMediaElement::resume):
889         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless const):
890         * html/HTMLMediaElement.h:
891         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless const): Deleted.
892         * html/MediaElementSession.cpp:
893         (WebCore::MediaElementSession::playbackPermitted const):
894         * page/Page.cpp:
895         (WebCore::Page::stopAllMediaPlayback):
896         (WebCore::Page::suspendAllMediaPlayback):
897         (WebCore::Page::resumeAllMediaPlayback):
898         * page/Page.h:
899         (WebCore::Page::mediaPlaybackIsSuspended):
900         * platform/audio/PlatformMediaSession.h:
901         * platform/audio/PlatformMediaSessionManager.cpp:
902         (WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForDocument):
903         (WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForDocument):
904         * platform/audio/PlatformMediaSessionManager.h:
905
906 2019-01-04  Chris Dumez  <cdumez@apple.com>
907
908         Add support for toggling device orientation API support per site
909         https://bugs.webkit.org/show_bug.cgi?id=193143
910         <rdar://problem/46605724>
911
912         Reviewed by Alex Christensen.
913
914         Add support for toggling device orientation API support per site via _WKWebsitePolicies.
915
916         * dom/Document.cpp:
917         (WebCore::Document::simulateDeviceOrientationChange):
918         * dom/Document.h:
919         * loader/DocumentLoader.h:
920         (WebCore::DocumentLoader::deviceOrientationEventEnabled const):
921         (WebCore::DocumentLoader::setDeviceOrientationEventEnabled):
922         * page/DOMWindow.cpp:
923         (WebCore::DOMWindow::addEventListener):
924
925 2019-01-04  Jer Noble  <jer.noble@apple.com>
926
927         Web Content process main thread blocked beneath ImageDecoderAVFObjC::readSamples for many seconds on imgur.com
928         https://bugs.webkit.org/show_bug.cgi?id=191806
929         <rdar://problem/46151477>
930
931         Reviewed by Dean Jackson.
932
933         Test: http/tests/images/mp4-partial-load.html
934
935         Rather than use an AVAssetReaderTrackOutput, which will load both sample metadata and sample data
936         synchronously when a sample is requested, use AVAssetReaderSampleReferenceOutput, which only loads
937         sample metadata, including the byte offset and byte length of the sample data. By waiting until the
938         AVAsset signals that it's own metadata is loaded, we can safely parse all the sample metadata without
939         blocking on network loads. Once enough data is loaded, we can replace the byte reference and offset
940         attachements in the sample with actual data, and mark the sample as "complete".
941
942         Because the existing ImageSource assumes that image data parsing will occur synchronously, and that
943         synchronous parsing could cause a hang if the metadata is not loaded, add a new callback method which
944         allows the ImageSource to be notified when the encodedDataStatus changes. The ImageSource notifies the
945         CacheImage, which notifies the RenderImage, and thus the asynchronous parsing will kick off the
946         renderer's animation loop.
947
948         * loader/cache/CachedImage.cpp:
949         (WebCore::CachedImage::CachedImageObserver::encodedDataStatusChanged):
950         (WebCore::CachedImage::encodedDataStatusChanged):
951         * loader/cache/CachedImage.h:
952         * platform/graphics/ImageDecoder.h:
953         (WebCore::ImageDecoder::setEncodedDataStatusChangeCallback):
954         * platform/graphics/ImageObserver.h:
955         (WebCore::ImageObserver::encodedDataStatusChanged):
956         * platform/graphics/ImageSource.cpp:
957         (WebCore::ImageSource::ensureDecoderAvailable):
958         (WebCore::ImageSource::encodedDataStatusChanged):
959         (WebCore::ImageSource::frameDecodingStatusAtIndex):
960         * platform/graphics/ImageSource.h:
961         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
962         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
963         (-[WebCoreSharedBufferResourceLoaderDelegate data]):
964         (WebCore::ImageDecoderAVFObjCSample::byteRange const):
965         (WebCore::ImageDecoderAVFObjC::readSamples):
966         (WebCore::ImageDecoderAVFObjC::setEncodedDataStatusChangeCallback):
967         (WebCore::ImageDecoderAVFObjC::encodedDataStatus const):
968         (WebCore::ImageDecoderAVFObjC::frameIsCompleteAtIndex const):
969         (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):
970         (WebCore::ImageDecoderAVFObjC::sampleIsComplete const):
971
972 2019-01-04  Youenn Fablet  <youenn@apple.com>
973
974         CSP violation reports should bypass CSP checks
975         https://bugs.webkit.org/show_bug.cgi?id=192857
976         <rdar://problem/46887236>
977
978         Reviewed by Chris Dumez.
979
980         For ping loads, pass the option to do CSP checks from PingLoader to LoaderStrategy.
981         This new option is unused by WebKit Legacy.
982         It is used by WebKit loader strategy to only send any CSP response header to network process
983         in case CSP checks should be done.
984
985         This option is used to disable CSP checks for Ping Loads that report CSP violations.
986
987         Test: http/wpt/fetch/csp-reports-bypass-csp-checks.html
988
989         * loader/LoaderStrategy.h:
990         * loader/PingLoader.cpp:
991         (WebCore::PingLoader::loadImage):
992         (WebCore::PingLoader::sendPing):
993         (WebCore::PingLoader::sendViolationReport):
994         (WebCore::PingLoader::startPingLoad):
995         * loader/PingLoader.h:
996         * loader/cache/CachedResource.cpp:
997         (WebCore::CachedResource::load):
998
999 2019-01-04  Wenson Hsieh  <wenson_hsieh@apple.com>
1000
1001         [Cocoa] Merge WebEditCommandProxy::nameForEditAction and undoNameForEditAction into a single function
1002         https://bugs.webkit.org/show_bug.cgi?id=193129
1003
1004         Reviewed by Tim Horton.
1005
1006         Adds a new helper function that returns the undo/redo name for a given EditAction. No change in behavior.
1007
1008         * Sources.txt:
1009         * WebCore.xcodeproj/project.pbxproj:
1010         * editing/EditAction.cpp: Copied from Source/WebKit/UIProcess/WebEditCommandProxy.cpp.
1011         (WebCore::nameForUndoRedo):
1012         * editing/EditAction.h:
1013         * editing/Editor.cpp:
1014
1015 2019-01-03  Matt Rajca  <mrajca@apple.com>
1016
1017         Make DidPlayMediaPreventedFromPlaying autoplay event more generic.
1018         https://bugs.webkit.org/show_bug.cgi?id=193128
1019         rdar://34554231
1020
1021         Reviewed by Jer Noble.
1022
1023         Today, the "DidPlayMediaPreventedFromPlaying" autoplay event is only sent for
1024         media prevented from autoplaying. It could be generalized to a "DidPlayMediaWithUserGesture"
1025         event along with a flag that indicates whether or not autoplay was actually prevented.
1026         Moreover, we can include a flag that indicates whether the media element in question
1027         is main content. Clients will then know in more cases when media was played with a user
1028         gesture, whether or not it has audio, as well as its main content status. While the main
1029         content heuristics may not be perfect, they covered the top 20 video-centric websites that
1030         this was tested with and are meant to be used by clients for data evaluation purposes.
1031
1032         As part of this, the PlaybackWithoutUserGesture enum was renamed to AutoplayEventPlaybackState
1033         since it now also applies to cases where there is a user gesture. The
1034         `m_playbackWithoutUserGestureStartedTime` member variable was also removed in favor of
1035         `playbackStartedTime` which also covers all the cases we care about.
1036
1037         Tests: existing API tests were updated to reflect the new names. New API tests
1038         were added for the new case in which the "DidPlayMediaWithUserGesture" event is sent.
1039
1040         * html/HTMLMediaElement.cpp:
1041         (WebCore::convertEnumerationToString): Update to new enum cases.
1042         (WebCore::HTMLMediaElement::setReadyState): Ditto.
1043         (WebCore::HTMLMediaElement::play): Ditto.
1044         (WebCore::HTMLMediaElement::playInternal): Also cover the case where
1045          playback was not prevented but there was a user gesture.
1046         (WebCore::HTMLMediaElement::pauseInternal): Use new name.
1047         (WebCore::HTMLMediaElement::setVolume): Use new name.
1048         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Dispatch the
1049          DidPlayMediaWithUserGesture event when playback was started with a user
1050          gesture as well.
1051         (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Use new name.
1052         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Ditto.
1053         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
1054         (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer): Ditto.
1055         (WebCore::HTMLMediaElement::handleAutoplayEvent): Pass along new media state.
1056         (WebCore::HTMLMediaElement::userDidInterfereWithAutoplay): Use new name.
1057         (WebCore::HTMLMediaElement::setAutoplayEventPlaybackState): Stop setting
1058          m_playbackWithoutUserGestureStartedTime in favor of using playbackStartedTime.
1059         (WebCore::HTMLMediaElement::updateShouldPlay): Use new name.
1060         (WebCore::HTMLMediaElement::setPlaybackWithoutUserGesture): Renamed.
1061         * html/HTMLMediaElement.h:
1062         (WTF::LogArgument<WebCore::HTMLMediaElement::AutoplayEventPlaybackState>::toString): Renamed from...
1063         (WTF::LogArgument<WebCore::HTMLMediaElement::PlaybackWithoutUserGesture>::toString):
1064         * html/MediaElementSession.cpp:
1065         (WebCore::MediaElementSession::isMainContentForPurposesOfAutoplayEvents const): Don't
1066          do the hit testing check for the purposes of autoplay events. It seems to fail on the
1067          basic Vimeo player due to overlapping divs.
1068         (WebCore::isElementMainContentForPurposesOfAutoplay):
1069         (WebCore::MediaElementSession::updateIsMainContent const): Keep the existing behavior
1070          here of hit testing.
1071         (WebCore::isMainContentForPurposesOfAutoplay): Renamed.
1072         * html/MediaElementSession.h:
1073         * page/AutoplayEvent.h:
1074
1075 2019-01-04  Youenn Fablet  <youenn@apple.com>
1076
1077         Crash in WebCore::ServiceWorkerGlobalScope
1078         https://bugs.webkit.org/show_bug.cgi?id=192513
1079         <rdar://problem/46563880>
1080
1081         Reviewed by Alex Christensen.
1082
1083         Store the identifier in its own variable to make sure we do not use workerThread after being moved.
1084
1085         * workers/service/ServiceWorkerGlobalScope.cpp:
1086         (WebCore::ServiceWorkerGlobalScope::skipWaiting):
1087
1088 2019-01-04  Chris Fleizach  <cfleizach@apple.com>
1089
1090         AX: String check: "Rule" does not reflect the meaning of the <hr> html tag
1091         https://bugs.webkit.org/show_bug.cgi?id=193041
1092         <rdar://problem/46954090>
1093
1094         Reviewed by Zalan Bujtas.
1095
1096         * en.lproj/Localizable.strings:
1097         * platform/cocoa/LocalizedStringsCocoa.mm:
1098         (WebCore::AXHorizontalRuleDescriptionText):
1099
1100 2019-01-04  Zalan Bujtas  <zalan@apple.com>
1101
1102         [LFC] ComputedHorizontalMargin should have optional members
1103         https://bugs.webkit.org/show_bug.cgi?id=193131
1104
1105         Reviewed by Antti Koivisto.
1106
1107         Split HorizontalMargin into UsedHorizontalMargin and ComputedHorizontalMargin. ComputedHorizontalMargin's members are optional.
1108         (see computed vs used values)
1109
1110         * layout/FormattingContext.h:
1111         * layout/FormattingContextGeometry.cpp:
1112         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
1113         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
1114         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
1115         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
1116         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
1117         (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin):
1118         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue): Deleted.
1119         * layout/LayoutUnits.h:
1120         * layout/MarginTypes.h:
1121         * layout/Verification.cpp:
1122         (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
1123         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1124         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
1125         * layout/displaytree/DisplayBox.h:
1126         (WebCore::Display::Box::setHorizontalMargin):
1127         (WebCore::Display::Box::setHorizontalComputedMargin):
1128         (WebCore::Display::Box::computedMarginStart const):
1129         (WebCore::Display::Box::computedMarginEnd const):
1130         * layout/floats/FloatAvoider.h:
1131         (WebCore::Layout::FloatAvoider::marginStart const):
1132         (WebCore::Layout::FloatAvoider::marginEnd const):
1133         * layout/inlineformatting/InlineFormattingContext.cpp:
1134         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
1135         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
1136         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
1137
1138 2019-01-04  Zalan Bujtas  <zalan@apple.com>
1139
1140         [LFC][BFC] Use computedValue and usedValue consistently
1141         https://bugs.webkit.org/show_bug.cgi?id=193059
1142
1143         Reviewed by Antti Koivisto.
1144
1145         https://www.w3.org/TR/CSS22/cascade.html#value-stages
1146
1147         6.1.2 Computed values
1148         Specified values are resolved to computed values during the cascade; for example URIs are made absolute and 'em' and 'ex' units
1149         are computed to pixel or absolute lengths. Computing a value never requires the user agent to render the document...
1150
1151         6.1.3 Used values
1152         Computed values are processed as far as possible without formatting the document. Some values, however, can only be determined when the document
1153         is being laid out. For example, if the width of an element is set to be a certain percentage of its containing block, the width cannot be determined
1154         until the width of the containing block has been determined. The used value is the result of taking the computed value and resolving any remaining
1155         dependencies into an absolute value.
1156
1157         * layout/FormattingContext.cpp:
1158         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
1159         * layout/FormattingContextGeometry.cpp:
1160         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
1161         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
1162         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
1163         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
1164         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
1165         * layout/LayoutState.cpp:
1166         (WebCore::Layout::LayoutState::LayoutState):
1167         * layout/LayoutUnits.h:
1168         * layout/Verification.cpp:
1169         (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
1170         * layout/blockformatting/BlockFormattingContext.cpp:
1171         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
1172         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1173         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
1174         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
1175         * layout/displaytree/DisplayBox.cpp:
1176         (WebCore::Display::Box::Box):
1177         * layout/displaytree/DisplayBox.h:
1178         (WebCore::Display::Box::setHasValidHorizontalComputedMargin):
1179         (WebCore::Display::Box::setHorizontalComputedMargin):
1180         (WebCore::Display::Box::computedMarginStart const):
1181         (WebCore::Display::Box::computedMarginEnd const):
1182         (WebCore::Display::Box::setHasValidHorizontalNonComputedMargin): Deleted.
1183         (WebCore::Display::Box::setHorizontalNonComputedMargin): Deleted.
1184         (WebCore::Display::Box::nonComputedMarginStart const): Deleted.
1185         (WebCore::Display::Box::nonComputedMarginEnd const): Deleted.
1186         * layout/floats/FloatAvoider.h:
1187         (WebCore::Layout::FloatAvoider::marginStart const):
1188         (WebCore::Layout::FloatAvoider::marginEnd const):
1189         * layout/inlineformatting/InlineFormattingContext.cpp:
1190         (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const):
1191
1192 2019-01-03  Zalan Bujtas  <zalan@apple.com>
1193
1194         REGRESSION: -webkit-appearance test case crashes
1195         https://bugs.webkit.org/show_bug.cgi?id=189302
1196         <rdar://problem/44143049>
1197
1198         Reviewed by Wenson Hsieh.
1199
1200         The painting and the layout positions of the cancel button need to match in order to be able to interact with it.
1201         This patch removes the previous position inlining attempts.
1202
1203         Test: fast/forms/webkit-appearance-searchfield-cancel-button-crash.html
1204
1205         * rendering/RenderThemeMac.mm:
1206         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1207
1208 2019-01-03  David Kilzer  <ddkilzer@apple.com>
1209
1210         Leak of WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback (48 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
1211         <https://webkit.org/b/193122>
1212         <rdar://problem/47022987>
1213
1214         Reviewed by Youenn Fablet.
1215
1216         * Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:
1217         (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::AddRef const):
1218         (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::Release const):
1219         - Remove `final` keyword so that
1220           `new rtc::RefCountedObject<RTCCertificateGeneratorCallback>()`
1221           can be called.
1222         (WebCore::LibWebRTCCertificateGenerator::generateCertificate):
1223         - To fix the leak call
1224           `new rtc::RefCountedObject<RTCCertificateGeneratorCallback>()`
1225           to create the object.
1226
1227 2019-01-03  Simon Fraser  <simon.fraser@apple.com>
1228
1229         REGRESSION (r238090): After showing the Find banner or tab bar, hit tests are vertically offset (or painting is not offset)
1230         https://bugs.webkit.org/show_bug.cgi?id=193124
1231         rdar://problem/46755409
1232
1233         Reviewed by Tim Horton.
1234
1235         Top content inset feeds into scrolling tree geometry, so when it changes we need to trigger
1236         an update of the root scrolling node, which happens via RenderLayerBacking::updateGeometry().
1237         So set a dirty bit on the root layer in frameViewDidChangeSize(), which is called from the code
1238         path that runs when top content inset changes.
1239
1240         Find banner behavior is not easily testable. platform/mac/fast/events/content-inset-hit-testing.html did not detect the regression.
1241
1242         * rendering/RenderLayerCompositor.cpp:
1243         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
1244
1245 2019-01-03  Chris Dumez  <cdumez@apple.com>
1246
1247         Potential infinite recursion in isFrameFamiliarWith(Frame&, Frame&)
1248         https://bugs.webkit.org/show_bug.cgi?id=192997
1249         <rdar://problem/46217271>
1250
1251         Reviewed by Antti Koivisto.
1252
1253         isFrameFamiliarWith(Frame&, Frame&) was called recursively using the passed frames' openers.
1254         The issue is that a Frame can be its opener. There could also be a cycle in the opener chain.
1255
1256         To address the issue, simplify isFrameFamiliarWith() so that it is no longer recursive. We now
1257         only check if the frames belong to the same pages or if their openers do. We no longer check
1258         openers' opener and up.
1259
1260         Note that this function is used to check if a frame is allowed to target another. In practice,
1261         it is unlikely to be useful to navigate an opener's opener and an openee's openee.
1262
1263         Tests: fast/dom/Window/window-open-opener-cycle.html
1264                fast/dom/Window/window-open-self-as-opener.html
1265
1266         * page/FrameTree.cpp:
1267         (WebCore::isFrameFamiliarWith):
1268
1269 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
1270
1271         REGRESSION (r239306): Don't disable font smoothing in transparent layers on macOS Mojave and later
1272         https://bugs.webkit.org/show_bug.cgi?id=193095
1273         <rdar://problem/47014944>
1274
1275         Reviewed by Zalan Bujtas.
1276         
1277         In r239306 we stopped making CALayers for font-smoothed text when not necessary on macOS Mojave
1278         and later. However, we still turned off smoothing for non-opaque layers (setShouldSmoothFonts(false)),
1279         which continues to affect the appearance of text.
1280         
1281         Fix by only calling setShouldSmoothFonts(false) when the OS supports font smoothing.
1282
1283         Test: compositing/contents-format/subpixel-antialiased-text.html
1284
1285         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1286         (WebCore::PlatformCALayer::drawLayerContents):
1287
1288 2019-01-02  David Kilzer  <ddkilzer@apple.com>
1289
1290         Leak of CMSampleBuffer (752 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
1291         <https://webkit.org/b/193016>
1292         <rdar://problem/46925703>
1293
1294         Reviewed by Simon Fraser.
1295
1296         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
1297         (WebCore::copySampleBufferWithCurrentTimeStamp):
1298         - Change to return RetainPtr<CMSampleBufferRef>.
1299         - Check return value of CMSampleBufferCreateCopyWithNewTiming().
1300         (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
1301         - Check return value of copySampleBufferWithCurrentTimeStamp().
1302         - Fix leak by using RetainPtr<CMSampleBufferRef> returned from
1303           copySampleBufferWithCurrentTimeStamp() instead of leaking
1304           `bufferWithCurrentTime` by using retainPtr().
1305         (WebCore::createAudioFormatDescription):
1306         - Extract method from appendAudioSampleBuffer() to return
1307           RetainPtr<CMFormatDescriptionRef> after calling
1308           CMAudioFormatDescriptionCreate().
1309         - Check return value of CMAudioFormatDescriptionCreate().
1310         (WebCore::createAudioSampleBufferWithPacketDescriptions):
1311         - Extract method from appendAudioSampleBuffer() to return
1312           RetainPtr<CMSampleBufferRef> after calling
1313           CMAudioSampleBufferCreateWithPacketDescriptions().
1314         (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
1315         - Check return values of createAudioFormatDescription() and
1316           createAudioSampleBufferWithPacketDescriptions().
1317         - Fix leaks by extracting code into helper methods that return
1318           RetainPtr<> objects instead of leaking CMFormatDescriptionRef
1319           directly or leaking `sampleBuffer` by using retainPtr().
1320
1321 2019-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
1322
1323         Add support for using the current text selection as the find string on iOS
1324         https://bugs.webkit.org/show_bug.cgi?id=193034
1325         <rdar://problem/45138739>
1326
1327         Reviewed by Tim Horton.
1328
1329         Add support for "TakeFindStringFromSelection" on iOS. Unlike macOS, iOS does not have a notion of a "find
1330         pasteboard" like macOS; instead, we handle this editing command by sending the selection string to the UI
1331         process, where it is exposed via WebKit SPI so that clients that present find-in-page UI (i.e. MobileSafari) are
1332         able to trigger find-in-page with this string.
1333
1334         Test: WebKit.UseSelectionAsFindString
1335
1336         * editing/Editor.cpp:
1337         (WebCore::Editor::canCopyExcludingStandaloneImages const):
1338
1339         Make this helper function cross-platform.
1340
1341         * editing/Editor.h:
1342         * editing/EditorCommand.cpp:
1343         (WebCore::createCommandMap):
1344         * editing/cocoa/EditorCocoa.mm:
1345         (WebCore::Editor::takeFindStringFromSelection):
1346
1347         Move this from EditorMac to EditorCocoa, and implement it on iOS by calling into the editor client to update the
1348         find string (see WebKit/ChangeLog for more details).
1349
1350         * editing/mac/EditorMac.mm:
1351         (WebCore::Editor::canCopyExcludingStandaloneImages): Deleted.
1352         (WebCore::Editor::takeFindStringFromSelection): Deleted.
1353         * loader/EmptyClients.cpp:
1354         * page/EditorClient.h:
1355
1356         Add a new editor client method to send the string for find-in-page to the UI process.
1357
1358 2019-01-02  Devin Rousso  <webkit@devinrousso.com>
1359
1360         Web Inspector: Implement `queryObjects` Command Line API
1361         https://bugs.webkit.org/show_bug.cgi?id=176766
1362         <rdar://problem/34890689>
1363
1364         Reviewed by Joseph Pecoraro.
1365
1366         Test: inspector/console/queryObjects.html
1367
1368         * inspector/CommandLineAPIModuleSource.js:
1369         (CommandLineAPI):
1370         (CommandLineAPIImpl.prototype.queryObjects): Added.
1371
1372 2019-01-02  Charles Vazac  <cvazac@gmail.com>
1373
1374         Fix resourcetimingbufferfull bubbles attribute
1375         https://bugs.webkit.org/show_bug.cgi?id=193087
1376
1377         Reviewed by Chris Dumez.
1378
1379         This change is covered by web-platform-tests [1].
1380
1381         [1] https://github.com/web-platform-tests/wpt/blob/master/resource-timing/buffer-full-when-populate-entries.html#L20
1382
1383         * page/Performance.cpp:
1384         (WebCore::Performance::resourceTimingBufferFullTimerFired):
1385
1386 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
1387
1388         Rename LayerScrollCoordinationRole to ScrollCoordinationRole and make an enum class
1389         https://bugs.webkit.org/show_bug.cgi?id=193010
1390
1391         Reviewed by Zalan Bujtas.
1392
1393         Move the enum LayerScrollCoordinationRole from RenderLayer.h to RenderLayerCompositor.h,
1394         and make it an enum class.
1395
1396         * page/FrameView.cpp:
1397         (WebCore::FrameView::scrollLayerID const):
1398         * rendering/RenderLayer.h:
1399         * rendering/RenderLayerBacking.cpp:
1400         (WebCore::RenderLayerBacking::~RenderLayerBacking):
1401         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
1402         (WebCore::operator<<):
1403         * rendering/RenderLayerBacking.h:
1404         * rendering/RenderLayerCompositor.cpp:
1405         (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
1406         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
1407         (WebCore::scrollCoordinationRoleForNodeType):
1408         (WebCore::RenderLayerCompositor::attachScrollingNode):
1409         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
1410         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1411         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
1412         * rendering/RenderLayerCompositor.h:
1413
1414 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
1415
1416         Don't spin up a CalcParser if the current token is not a function token
1417         https://bugs.webkit.org/show_bug.cgi?id=193067
1418
1419         Reviewed by Zalan Bujtas.
1420
1421         Various functions in CSSPropertyParserHelpers fall back to trying to parse
1422         a calc expression if the normal parsing fails. Don't do this unless the
1423         current token is a function token, which should be slightly more efficient.
1424
1425         * css/parser/CSSPropertyParserHelpers.cpp:
1426         (WebCore::CSSPropertyParserHelpers::consumeInteger):
1427         (WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw):
1428         (WebCore::CSSPropertyParserHelpers::consumeNumberRaw):
1429         (WebCore::CSSPropertyParserHelpers::consumeNumber):
1430         (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
1431         (WebCore::CSSPropertyParserHelpers::consumeLength):
1432         (WebCore::CSSPropertyParserHelpers::consumePercent):
1433         (WebCore::CSSPropertyParserHelpers::consumeLengthOrPercent):
1434         (WebCore::CSSPropertyParserHelpers::consumeAngle):
1435         (WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
1436         (WebCore::CSSPropertyParserHelpers::consumeTime):
1437
1438 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
1439
1440         Support css-color-4 rgb functions
1441         https://bugs.webkit.org/show_bug.cgi?id=192321
1442
1443         Reviewed by Zalan Bujtas.
1444         
1445         Support the new rgb()/rgba() syntax described in https://drafts.csswg.org/css-color/#rgb-functions.
1446         The differences are:
1447         1. There is a new comma-free syntax, where the optional alpha is separated by a slash:
1448             rgb(128 34 56)
1449             rgb(128 34 56 / 50%)
1450         2. Floating point values are allowed, and rounded:
1451             rgb(128.5 34.2 56.5) becomes rgb(129 34 57)
1452         3. rgba() is a pure alias for rgb(), so these are equivalent:
1453             rgb(128 34 56 / 50%)
1454             rgba(128 34 56 / 50%)
1455             
1456         hsl()/hsla() parsing was already updated to this new syntax in r230861.
1457
1458         Tested by tests in imported/w3c/web-platform-tests/css/css-color/
1459
1460         * css/parser/CSSPropertyParserHelpers.cpp:
1461         (WebCore::CSSPropertyParserHelpers::clampRGBComponent):
1462         (WebCore::CSSPropertyParserHelpers::parseRGBParameters):
1463         (WebCore::CSSPropertyParserHelpers::parseColorFunction):
1464
1465 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
1466
1467         Handle calc() expressions in gradient color stops
1468         https://bugs.webkit.org/show_bug.cgi?id=193066
1469         rdar://problem/46961985
1470
1471         Reviewed by Sam Weinig.
1472         
1473         Fix two issues that prevented calc() expressions from working in conic-gradient color stops,
1474         for the angle or percent value. First, consumeAngleOrPercent() needs to look for CalculationCategory::Percent
1475         calc values as well as angle ones.
1476
1477         Second, CSSPrimitiveValue::isAngle() needs to use primitiveType() (which takes calc into account),
1478         just as isPx() etc do.
1479
1480         Test: fast/gradients/conic-calc-stop-position.html
1481
1482         * css/CSSPrimitiveValue.h:
1483         (WebCore::CSSPrimitiveValue::isAngle const):
1484         * css/parser/CSSPropertyParserHelpers.cpp:
1485         (WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
1486         (WebCore::CSSPropertyParserHelpers::consumeGradientColorStops):
1487
1488 2018-12-31  Keith Miller  <keith_miller@apple.com>
1489
1490         SourceProviders should use an actual URL instead of a string
1491         https://bugs.webkit.org/show_bug.cgi?id=192734
1492
1493         Reviewed by Yusuke Suzuki.
1494
1495         Remove ScriptSourceCode's URL member and make the url() method
1496         reference the URL on the SourceProvider. Also, avoid some
1497         ref count churn.
1498
1499         Additionally, this patch fixes an existing bug in
1500         WorkletGlobalScope() that would use a ScriptSourceCode after
1501         WTFMoving it.
1502
1503         * bindings/js/CachedScriptSourceProvider.h:
1504         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
1505         * bindings/js/ScheduledAction.cpp:
1506         (WebCore::ScheduledAction::execute):
1507         * bindings/js/ScriptController.cpp:
1508         (WebCore::ScriptController::executeScriptInWorld):
1509         (WebCore::ScriptController::executeScript):
1510         * bindings/js/ScriptSourceCode.h:
1511         (WebCore::ScriptSourceCode::ScriptSourceCode):
1512         (WebCore::ScriptSourceCode::m_code):
1513         (WebCore::ScriptSourceCode::url const):
1514         (WebCore::ScriptSourceCode::m_url): Deleted.
1515         * dom/ScriptElement.cpp:
1516         (WebCore::ScriptElement::prepareScript):
1517         (WebCore::ScriptElement::requestModuleScript):
1518         (WebCore::ScriptElement::executePendingScript):
1519         * html/HTMLMediaElement.cpp:
1520         (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
1521         * page/Frame.cpp:
1522         (WebCore::Frame::injectUserScriptImmediately):
1523         * workers/WorkerGlobalScope.cpp:
1524         (WebCore::WorkerGlobalScope::importScripts):
1525         * workers/WorkerThread.cpp:
1526         (WebCore::WorkerThread::workerThread):
1527         * worklets/WorkletGlobalScope.cpp:
1528         (WebCore::WorkletGlobalScope::WorkletGlobalScope):
1529         * xml/parser/XMLDocumentParserLibxml2.cpp:
1530         (WebCore::XMLDocumentParser::endElementNs):
1531
1532 2019-01-01  Jeff Miller  <jeffm@apple.com>
1533
1534         Update user-visible copyright strings to include 2019
1535         https://bugs.webkit.org/show_bug.cgi?id=192811
1536
1537         Reviewed by Mark Lam.
1538
1539         * Info.plist:
1540
1541 2018-12-30  David Kilzer  <ddkilzer@apple.com>
1542
1543         clang-tidy: Save 8 padding bytes on WebCore::BorderEdge
1544         <https://webkit.org/b/193058>
1545         <rdar://problem/46979275>
1546
1547         Reviewed by Yusuke Suzuki.
1548
1549         * rendering/BorderEdge.cpp:
1550         (WebCore::BorderEdge::BorderEdge): Reorder initialization to
1551         match new instance variable order.
1552         * rendering/BorderEdge.h: Reorder instance variables to save
1553         8 padding bytes.
1554
1555 2018-12-28  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
1556
1557         [JSC] Remove one indirection in JSObject::toStringName
1558         https://bugs.webkit.org/show_bug.cgi?id=193037
1559
1560         Reviewed by Keith Miller.
1561
1562         Use old JSObject::toStringName function here.
1563
1564         * bindings/js/JSDOMConstructorBase.cpp:
1565         (WebCore::JSDOMConstructorBase::className):
1566         (WebCore::JSDOMConstructorBase::toStringName):
1567         * bindings/js/JSDOMConstructorBase.h:
1568         (WebCore::JSDOMConstructorBase::className): Deleted.
1569
1570 2018-12-27  Alex Christensen  <achristensen@webkit.org>
1571
1572         Resurrect Mac CMake build
1573         https://bugs.webkit.org/show_bug.cgi?id=192658
1574
1575         Reviewed by Yusuke Suzuki.
1576
1577         This makes it so JSC and most of WebCore builds.
1578         WebCore's use of ARC seems inconsistent, so I'll fix that later.
1579
1580         * PlatformMac.cmake:
1581         * config.h:
1582
1583 2018-12-26  Jim Mason  <jmason@ibinx.com>
1584
1585         [FreeType] Restore conditional compilation logic for recent HarfBuzz refactoring
1586         https://bugs.webkit.org/show_bug.cgi?id=193036
1587
1588         Reviewed by Michael Catanzaro.
1589
1590         * platform/graphics/FontPlatformData.h:
1591         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1592
1593 2018-12-24  Fujii Hironori  <Hironori.Fujii@sony.com>
1594
1595         Remove "using namespace std;"
1596         https://bugs.webkit.org/show_bug.cgi?id=192973
1597         <rdar://problem/46937309>
1598
1599         Unreviewed Windows port Debug builds fix.
1600
1601         No new tests since no behavior changes.
1602
1603         * accessibility/win/AXObjectCacheWin.cpp:
1604         (WebCore::AXObjectCache::postPlatformNotification): Add "std::" prefix to numeric_limits in ASSERT macro.
1605
1606 2018-12-24  Fujii Hironori  <Hironori.Fujii@sony.com>
1607
1608         Remove "using namespace std;"
1609         https://bugs.webkit.org/show_bug.cgi?id=192973
1610
1611         Reviewed by Alex Christensen.
1612
1613         Removed "using namespace std" statement, and use std:: prefix.
1614
1615         No new tests since no behavior changes.
1616
1617         * accessibility/win/AXObjectCacheWin.cpp:
1618         * platform/graphics/GraphicsContext3DPrivate.cpp:
1619         * platform/graphics/cairo/ImageBufferCairo.cpp:
1620         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
1621         * platform/graphics/win/FontWin.cpp:
1622         (WebCore::FontCascade::floatWidthForComplexText const):
1623         * platform/graphics/win/GraphicsContextCGWin.cpp:
1624         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1625         * platform/graphics/win/GraphicsContextDirect2D.cpp:
1626         * platform/graphics/win/GraphicsContextWin.cpp:
1627         * platform/graphics/win/SimpleFontDataCGWin.cpp:
1628         * platform/graphics/win/UniscribeController.cpp:
1629         (WebCore::UniscribeController::UniscribeController):
1630         (WebCore::UniscribeController::shapeAndPlaceItem):
1631         * platform/image-decoders/ScalableImageDecoder.cpp:
1632         * platform/text/LocaleICU.cpp:
1633         * platform/text/win/LocaleWin.cpp:
1634         * platform/win/ScrollbarThemeWin.cpp:
1635         * rendering/RenderRubyRun.cpp:
1636         (WebCore::RenderRubyRun::layoutBlock):
1637         * rendering/RenderThemeWin.cpp:
1638         (WebCore::RenderThemeWin::adjustMenuListButtonStyle const):
1639         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
1640         (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle const):
1641         (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle const):
1642         (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
1643         (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle const):
1644         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
1645
1646 2018-12-24  Simon Fraser  <simon.fraser@apple.com>
1647
1648         Change ScrollingNodeType to an enum class
1649         https://bugs.webkit.org/show_bug.cgi?id=193009
1650
1651         Reviewed by Zalan Bujtas.
1652
1653         Change the ScrollingNodeType enum to an enum class.
1654         
1655         No behavior change.
1656
1657         * page/scrolling/AsyncScrollingCoordinator.cpp:
1658         (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
1659         * page/scrolling/ScrollingCoordinator.cpp:
1660         (WebCore::operator<<):
1661         * page/scrolling/ScrollingCoordinator.h:
1662         * page/scrolling/ScrollingStateFixedNode.cpp:
1663         (WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode):
1664         * page/scrolling/ScrollingStateNode.h:
1665         (WebCore::ScrollingStateNode::isFixedNode const):
1666         (WebCore::ScrollingStateNode::isStickyNode const):
1667         (WebCore::ScrollingStateNode::isFrameScrollingNode const):
1668         (WebCore::ScrollingStateNode::isOverflowScrollingNode const):
1669         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
1670         (WebCore::ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode):
1671         * page/scrolling/ScrollingStateStickyNode.cpp:
1672         (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
1673         * page/scrolling/ScrollingStateTree.cpp:
1674         (WebCore::ScrollingStateTree::createNode):
1675         (WebCore::ScrollingStateTree::attachNode):
1676         * page/scrolling/ScrollingTreeNode.h:
1677         (WebCore::ScrollingTreeNode::isFixedNode const):
1678         (WebCore::ScrollingTreeNode::isStickyNode const):
1679         (WebCore::ScrollingTreeNode::isFrameScrollingNode const):
1680         (WebCore::ScrollingTreeNode::isOverflowScrollingNode const):
1681         * page/scrolling/ScrollingTreeOverflowScrollingNode.cpp:
1682         (WebCore::ScrollingTreeOverflowScrollingNode::ScrollingTreeOverflowScrollingNode):
1683         * page/scrolling/ios/ScrollingTreeIOS.cpp:
1684         (WebCore::ScrollingTreeIOS::createScrollingTreeNode):
1685         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1686         (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
1687         * page/scrolling/mac/ScrollingTreeMac.cpp:
1688         (ScrollingTreeMac::createScrollingTreeNode):
1689         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
1690         (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
1691         * platform/graphics/GraphicsLayerClient.h:
1692         * rendering/RenderLayerCompositor.cpp:
1693         (WebCore::RenderLayerCompositor::reattachSubframeScrollLayers):
1694         (WebCore::scrollCoordinationRoleForNodeType):
1695         (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
1696         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1697
1698 2018-12-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1699
1700         [HarfBuzz] Width not correctly reported as 0 for zero font size
1701         https://bugs.webkit.org/show_bug.cgi?id=192986
1702
1703         Reviewed by Michael Catanzaro.
1704
1705         Fixes test fast/text/font-size-zero.html
1706
1707         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
1708         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Use empty advances for glyphs when the font
1709         size is zero.
1710
1711 2018-12-20  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
1712
1713         Use Ref<> as much as possible
1714         https://bugs.webkit.org/show_bug.cgi?id=192808
1715
1716         Reviewed by Alex Christensen.
1717
1718         * Modules/encryptedmedia/NavigatorEME.cpp:
1719         (WebCore::NavigatorEME::requestMediaKeySystemAccess):
1720         * Modules/fetch/FetchBody.cpp:
1721         (WebCore::FetchBody::bodyAsFormData const):
1722         * Modules/geolocation/Geolocation.cpp:
1723         (WebCore::Geolocation::getCurrentPosition):
1724         (WebCore::Geolocation::watchPosition):
1725         * Modules/indexeddb/IDBDatabase.cpp:
1726         (WebCore::IDBDatabase::objectStoreNames const):
1727         * Modules/indexeddb/IDBDatabase.h:
1728         * Modules/indexeddb/IDBObjectStore.cpp:
1729         (WebCore::IDBObjectStore::indexNames const):
1730         * Modules/indexeddb/IDBObjectStore.h:
1731         * Modules/indexeddb/IDBTransaction.cpp:
1732         (WebCore::IDBTransaction::scheduleOperation):
1733         * Modules/indexeddb/IDBTransaction.h:
1734         * Modules/indexeddb/client/TransactionOperation.h:
1735         (WebCore::IDBClient::createTransactionOperation):
1736         * Modules/mediastream/MediaDevices.cpp:
1737         (WebCore::MediaDevices::getUserMedia const):
1738         (WebCore::MediaDevices::getDisplayMedia const):
1739         * Modules/mediastream/UserMediaRequest.cpp:
1740         (WebCore::UserMediaRequest::create):
1741         * Modules/mediastream/UserMediaRequest.h:
1742         * Modules/webaudio/AudioParam.cpp:
1743         (WebCore::AudioParam::calculateFinalValues):
1744         * Modules/webaudio/ScriptProcessorNode.cpp:
1745         (WebCore::ScriptProcessorNode::initialize):
1746         * Modules/webdatabase/SQLStatement.cpp:
1747         (WebCore::SQLStatement::execute):
1748         * Modules/webgpu/WebGPU.cpp:
1749         (WebCore::WebGPU::requestAdapter const):
1750         * Modules/webgpu/WebGPUAdapter.cpp:
1751         (WebCore::WebGPUAdapter::create):
1752         * Modules/webgpu/WebGPUAdapter.h:
1753         * Modules/webgpu/WebGPUBuffer.cpp:
1754         (WebCore::WebGPUBuffer::create):
1755         * Modules/webgpu/WebGPUBuffer.h:
1756         * Modules/webgpu/WebGPUCommandBuffer.cpp:
1757         (WebCore::WebGPUCommandBuffer::create):
1758         (WebCore::WebGPUCommandBuffer::beginRenderPass):
1759         * Modules/webgpu/WebGPUCommandBuffer.h:
1760         * Modules/webgpu/WebGPUDevice.cpp:
1761         (WebCore::WebGPUDevice::create):
1762         (WebCore::WebGPUDevice::createBuffer const):
1763         (WebCore::WebGPUDevice::createShaderModule const):
1764         (WebCore::WebGPUDevice::createRenderPipeline const):
1765         (WebCore::WebGPUDevice::createCommandBuffer const):
1766         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
1767         (WebCore::WebGPURenderPassEncoder::create):
1768         * Modules/webgpu/WebGPURenderPassEncoder.h:
1769         * Modules/webgpu/WebGPURenderPipeline.cpp:
1770         (WebCore::WebGPURenderPipeline::create):
1771         * Modules/webgpu/WebGPURenderPipeline.h:
1772         * Modules/webgpu/WebGPUShaderModule.cpp:
1773         (WebCore::WebGPUShaderModule::create):
1774         * Modules/webgpu/WebGPUShaderModule.h:
1775         * Modules/webgpu/WebGPUTexture.cpp:
1776         (WebCore::WebGPUTexture::createDefaultTextureView):
1777         * Modules/webgpu/WebGPUTextureView.cpp:
1778         (WebCore::WebGPUTextureView::create):
1779         * Modules/webgpu/WebGPUTextureView.h:
1780         * accessibility/AXObjectCache.cpp:
1781         (WebCore::AXObjectCache::rangeMatchesTextNearRange):
1782         * accessibility/atk/AXObjectCacheAtk.cpp:
1783         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
1784         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
1785         (webkitAccessibleHyperlinkGetStartIndex):
1786         (webkitAccessibleHyperlinkGetEndIndex):
1787         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1788         (getSelectionOffsetsForObject):
1789         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1790         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
1791         * bindings/js/JSDOMGlobalObjectTask.cpp:
1792         * bindings/js/JSDOMWindowBase.cpp:
1793         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
1794         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1795         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
1796         * bindings/js/ScriptControllerMac.mm:
1797         (WebCore::ScriptController::createScriptInstanceForWidget):
1798         * bindings/js/SerializedScriptValue.cpp:
1799         (WebCore::CloneDeserializer::readTerminal):
1800         (WebCore::SerializedScriptValue::create):
1801         * bridge/objc/objc_instance.h:
1802         * bridge/objc/objc_instance.mm:
1803         (ObjcInstance::create):
1804         * css/CSSComputedStyleDeclaration.cpp:
1805         (WebCore::ComputedStyleExtractor::currentColorOrValidColor const):
1806         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
1807         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
1808         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
1809         * css/CSSComputedStyleDeclaration.h:
1810         * css/CSSFontFaceSource.cpp:
1811         (WebCore::CSSFontFaceSource::load):
1812         * css/CSSStyleSheet.cpp:
1813         (WebCore::CSSStyleSheet::rules):
1814         * css/FontFace.cpp:
1815         (WebCore::FontFace::unicodeRange const):
1816         (WebCore::FontFace::featureSettings const):
1817         * css/InspectorCSSOMWrappers.cpp:
1818         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheetContents):
1819         * css/SVGCSSComputedStyleDeclaration.cpp:
1820         (WebCore::strokeDashArrayToCSSValueList):
1821         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor const):
1822         * css/StyleResolver.cpp:
1823         (WebCore::StyleResolver::createFilterOperations):
1824         * css/StyleRule.cpp:
1825         (WebCore::StyleRuleBase::createCSSOMWrapper const):
1826         * css/StyleRule.h:
1827         * dom/ChildListMutationScope.cpp:
1828         (WebCore::ChildListMutationAccumulator::getOrCreate):
1829         * dom/ChildListMutationScope.h:
1830         * dom/DocumentMarkerController.cpp:
1831         (WebCore::updateRenderedRectsForMarker):
1832         * dom/InlineStyleSheetOwner.cpp:
1833         (WebCore::InlineStyleSheetOwner::createSheet):
1834         * dom/PointerEvent.h:
1835         * dom/UserGestureIndicator.h:
1836         (WebCore::UserGestureToken::create):
1837         * editing/AlternativeTextController.cpp:
1838         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1839         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
1840         (WebCore::AlternativeTextController::respondToUnappliedEditing):
1841         (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
1842         (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
1843         * editing/ApplyStyleCommand.cpp:
1844         (WebCore::ApplyStyleCommand::applyBlockStyle):
1845         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
1846         * editing/CompositeEditCommand.cpp:
1847         (WebCore::CompositeEditCommand::targetRanges const):
1848         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
1849         (WebCore::CompositeEditCommand::moveParagraphs):
1850         * editing/DeleteSelectionCommand.cpp:
1851         (WebCore::DeleteSelectionCommand::mergeParagraphs):
1852         * editing/Editing.cpp:
1853         (WebCore::visiblePositionForIndexUsingCharacterIterator):
1854         * editing/EditingStyle.cpp:
1855         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
1856         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement const):
1857         (WebCore::EditingStyle::prepareToApplyAt):
1858         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
1859         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
1860         (WebCore::EditingStyle::removeStyleFromRulesAndContext):
1861         (WebCore::extractPropertiesNotIn):
1862         * editing/Editor.cpp:
1863         (WebCore::Editor::setBaseWritingDirection):
1864         (WebCore::Editor::setComposition):
1865         * editing/EditorCommand.cpp:
1866         (WebCore::executeApplyParagraphStyle):
1867         (WebCore::executeMakeTextWritingDirectionLeftToRight):
1868         (WebCore::executeMakeTextWritingDirectionNatural):
1869         (WebCore::executeMakeTextWritingDirectionRightToLeft):
1870         * editing/FormatBlockCommand.cpp:
1871         (WebCore::FormatBlockCommand::formatRange):
1872         * editing/RemoveFormatCommand.cpp:
1873         (WebCore::RemoveFormatCommand::doApply):
1874         * editing/ReplaceRangeWithTextCommand.cpp:
1875         (WebCore::ReplaceRangeWithTextCommand::targetRanges const):
1876         * editing/ReplaceSelectionCommand.cpp:
1877         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
1878         (WebCore::handleStyleSpansBeforeInsertion):
1879         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
1880         * editing/SpellingCorrectionCommand.cpp:
1881         (WebCore::SpellingCorrectionCommand::targetRanges const):
1882         * editing/TextCheckingHelper.cpp:
1883         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
1884         * editing/TypingCommand.cpp:
1885         (WebCore::TypingCommand::insertText):
1886         (WebCore::TypingCommand::willAddTypingToOpenCommand):
1887         * editing/VisibleUnits.cpp:
1888         (WebCore::distanceBetweenPositions):
1889         * editing/cocoa/EditorCocoa.mm:
1890         (WebCore::Editor::selectionInWebArchiveFormat):
1891         * editing/ios/DictationCommandIOS.cpp:
1892         (WebCore::DictationCommandIOS::doApply):
1893         * editing/ios/EditorIOS.mm:
1894         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
1895         (WebCore::Editor::removeUnchangeableStyles):
1896         (WebCore::Editor::writeImageToPasteboard):
1897         * editing/mac/EditorMac.mm:
1898         (WebCore::Editor::replaceNodeFromPasteboard):
1899         (WebCore::Editor::imageInWebArchiveFormat):
1900         * editing/markup.cpp:
1901         (WebCore::styleFromMatchedRulesAndInlineDecl):
1902         (WebCore::createFragmentForTransformToFragment):
1903         * fileapi/FileReaderLoader.cpp:
1904         (WebCore::FileReaderLoader::didFinishLoading):
1905         * html/FTPDirectoryDocument.cpp:
1906         (WebCore::createTemplateDocumentData):
1907         * html/HTMLMediaElement.cpp:
1908         (WebCore::HTMLMediaElement::scheduleEvent):
1909         (WebCore::HTMLMediaElement::createMediaControls):
1910         * html/HTMLTableElement.cpp:
1911         (WebCore::HTMLTableElement::createSharedCellStyle):
1912         * html/HTMLTableElement.h:
1913         * html/URLUtils.h:
1914         (WebCore::URLUtils<T>::origin const):
1915         * html/parser/HTMLConstructionSite.cpp:
1916         (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
1917         * html/shadow/TextControlInnerElements.cpp:
1918         (WebCore::TextControlInnerElement::resolveCustomStyle):
1919         * html/track/WebVTTParser.cpp:
1920         (WebCore::WebVTTParser::createNewCue):
1921         * inspector/DOMPatchSupport.cpp:
1922         * inspector/InspectorCanvas.cpp:
1923         (WebCore::InspectorCanvas::buildInitialState):
1924         (WebCore::InspectorCanvas::buildAction):
1925         * inspector/InspectorFrontendClientLocal.cpp:
1926         (WebCore::InspectorFrontendClientLocal::openInNewTab):
1927         * inspector/InspectorStyleSheet.cpp:
1928         (WebCore::asCSSRuleList):
1929         (WebCore::InspectorStyle::styleWithProperties const):
1930         (WebCore::InspectorStyleSheet::ensureSourceData):
1931         * inspector/agents/InspectorCanvasAgent.cpp:
1932         (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
1933         * inspector/agents/InspectorIndexedDBAgent.cpp:
1934         (WebCore::Inspector::keyPathFromIDBKeyPath):
1935         * inspector/agents/InspectorPageAgent.cpp:
1936         (WebCore::InspectorPageAgent::archive):
1937         * loader/EmptyClients.cpp:
1938         (WebCore::EmptyStorageNamespaceProvider::createSessionStorageNamespace):
1939         (WebCore::EmptyStorageNamespaceProvider::createLocalStorageNamespace):
1940         (WebCore::EmptyStorageNamespaceProvider::createEphemeralLocalStorageNamespace):
1941         (WebCore::EmptyStorageNamespaceProvider::createTransientLocalStorageNamespace):
1942         * loader/FrameLoader.cpp:
1943         (WebCore::FrameLoader::loadURL):
1944         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
1945         (WebCore::FrameLoader::loadDifferentDocumentItem):
1946         * loader/WorkerThreadableLoader.cpp:
1947         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
1948         * loader/archive/mhtml/MHTMLParser.cpp:
1949         (WebCore::MHTMLParser::addResourceToArchive):
1950         (WebCore::MHTMLParser::parseNextPart):
1951         * loader/cache/MemoryCache.cpp:
1952         (WebCore::MemoryCache::addImageToCache):
1953         (WebCore::MemoryCache::removeResourcesWithOrigin):
1954         * page/DOMWindow.cpp:
1955         (WebCore::DOMWindow::getMatchedCSSRules const):
1956         (WebCore::DOMWindow::createWindow):
1957         * page/EventHandler.cpp:
1958         (WebCore::textDistance):
1959         * page/Page.cpp:
1960         (WebCore::Page::userStyleSheet const):
1961         * page/animation/CSSPropertyAnimation.cpp:
1962         (WebCore::blendFilterOperations):
1963         * page/ios/FrameIOS.mm:
1964         (WebCore::Frame::initWithSimpleHTMLDocument):
1965         (WebCore::Frame::interpretationsForCurrentRoot const):
1966         * page/mac/ServicesOverlayController.mm:
1967         (WebCore::ServicesOverlayController::Highlight::fadeIn):
1968         (WebCore::ServicesOverlayController::Highlight::fadeOut):
1969         * platform/SharedBuffer.cpp:
1970         (WebCore::SharedBuffer::tryCreateArrayBuffer const):
1971         * platform/audio/HRTFElevation.cpp:
1972         (WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
1973         * platform/audio/SincResampler.cpp:
1974         (WebCore::SincResampler::consumeSource):
1975         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1976         (WebCore::AudioFileReader::createBus):
1977         * platform/audio/mac/AudioFileReaderMac.cpp:
1978         (WebCore::AudioFileReader::createBus):
1979         * platform/graphics/Icon.h:
1980         (WebCore::Icon::create):
1981         * platform/graphics/InbandTextTrackPrivate.h:
1982         (WebCore::InbandTextTrackPrivate::create):
1983         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1984         (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
1985         * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h:
1986         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1987         (WebCore::fulfillRequestWithKeyData):
1988         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
1989         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
1990         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
1991         (WebCore::MediaSourcePrivateAVFObjC::create):
1992         (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
1993         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1994         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1995         (WebCore::SourceBufferPrivateAVFObjC::create):
1996         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
1997         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
1998         * platform/graphics/ca/TileController.cpp:
1999         (WebCore::TileController::createTileLayer):
2000         * platform/graphics/ca/TileController.h:
2001         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2002         (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable):
2003         (WebCore::CACFLayerTreeHost::create):
2004         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
2005         (WebCore::GPUBuffer::create):
2006         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2007         (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
2008         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
2009         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
2010         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
2011         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2012         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
2013         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
2014         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2015         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
2016         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2017         (WebCore::AppendPipeline::appsinkNewSample):
2018         * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.cpp:
2019         (WebCore::ISOProtectionSystemSpecificHeaderBox::parse):
2020         * platform/graphics/iso/ISOTrackEncryptionBox.cpp:
2021         (WebCore::ISOTrackEncryptionBox::parse):
2022         * platform/graphics/texmap/TextureMapperAnimation.cpp:
2023         (WebCore::applyFilterAnimation):
2024         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
2025         (WebCore::TextureMapperPlatformLayerBuffer::clone):
2026         * platform/graphics/transforms/TransformOperations.cpp:
2027         (WebCore::TransformOperations::blendByMatchingOperations const):
2028         * platform/image-decoders/ico/ICOImageDecoder.cpp:
2029         (WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex):
2030         * platform/mock/mediasource/MockBox.cpp:
2031         (WebCore::MockInitializationBox::MockInitializationBox):
2032         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2033         (WebCore::MockSourceBufferPrivate::create):
2034         (WebCore::MockSourceBufferPrivate::append):
2035         * platform/mock/mediasource/MockSourceBufferPrivate.h:
2036         * platform/mock/mediasource/MockTracks.h:
2037         (WebCore::MockTextTrackPrivate::create):
2038         (WebCore::MockVideoTrackPrivate::create):
2039         * platform/network/FormData.h:
2040         (WebCore::FormData::decode):
2041         * platform/network/cocoa/CookieStorageObserver.h:
2042         * platform/network/cocoa/CookieStorageObserver.mm:
2043         (WebCore::CookieStorageObserver::create):
2044         * platform/network/soup/ResourceRequestSoup.cpp:
2045         (WebCore::appendEncodedBlobItemToSoupMessageBody):
2046         (WebCore::ResourceRequest::updateSoupMessageBody const):
2047         * platform/text/hyphen/HyphenationLibHyphen.cpp:
2048         (WebCore::HyphenationDictionary::createNull):
2049         (WebCore::HyphenationDictionary::create):
2050         * platform/win/SearchPopupMenuWin.cpp:
2051         (WebCore::SearchPopupMenuWin::SearchPopupMenuWin):
2052         (WebCore::SearchPopupMenuWin::popupMenu):
2053         * platform/win/SearchPopupMenuWin.h:
2054         * rendering/RenderThemeIOS.mm:
2055         (WebCore::applyCommonButtonPaddingToStyle):
2056         (WebCore::RenderThemeIOS::paintProgressBar):
2057         (WebCore::RenderThemeIOS::adjustButtonStyle const):
2058         (WebCore::paintAttachmentIcon):
2059         * rendering/svg/SVGRenderTreeAsText.cpp:
2060         (WebCore::writeSVGResourceContainer):
2061         * storage/Storage.cpp:
2062         (WebCore::Storage::create):
2063         (WebCore::Storage::Storage):
2064         * storage/Storage.h:
2065         (WebCore::Storage::area const):
2066         * storage/StorageNamespace.h:
2067         * storage/StorageNamespaceProvider.cpp:
2068         (WebCore::StorageNamespaceProvider::localStorageArea):
2069         * storage/StorageNamespaceProvider.h:
2070         * svg/SVGElement.cpp:
2071         (WebCore::SVGElement::getPresentationAttribute):
2072         * svg/SVGFEBlendElement.cpp:
2073         (WebCore::SVGFEBlendElement::build):
2074         * svg/SVGFEColorMatrixElement.cpp:
2075         (WebCore::SVGFEColorMatrixElement::build):
2076         * svg/SVGFEComponentTransferElement.cpp:
2077         (WebCore::SVGFEComponentTransferElement::build):
2078         * svg/SVGFECompositeElement.cpp:
2079         (WebCore::SVGFECompositeElement::build):
2080         * svg/SVGFEDiffuseLightingElement.cpp:
2081         (WebCore::SVGFEDiffuseLightingElement::build):
2082         * svg/SVGFEDisplacementMapElement.cpp:
2083         (WebCore::SVGFEDisplacementMapElement::build):
2084         * svg/SVGFEDropShadowElement.cpp:
2085         (WebCore::SVGFEDropShadowElement::build):
2086         * svg/SVGFEGaussianBlurElement.cpp:
2087         (WebCore::SVGFEGaussianBlurElement::build):
2088         * svg/SVGFEMergeElement.cpp:
2089         (WebCore::SVGFEMergeElement::build):
2090         * svg/SVGFEMorphologyElement.cpp:
2091         (WebCore::SVGFEMorphologyElement::build):
2092         * svg/SVGFEOffsetElement.cpp:
2093         (WebCore::SVGFEOffsetElement::build):
2094         * svg/SVGFESpecularLightingElement.cpp:
2095         (WebCore::SVGFESpecularLightingElement::build):
2096         * svg/SVGFETileElement.cpp:
2097         (WebCore::SVGFETileElement::build):
2098         * testing/GCObservation.h:
2099         * xml/XSLTProcessor.cpp:
2100         (WebCore::XSLTProcessor::createDocumentFromSource):
2101         * xml/parser/XMLDocumentParser.cpp:
2102         (WebCore::XMLDocumentParser::parseDocumentFragment):
2103
2104 2018-12-21  Chris Dumez  <cdumez@apple.com>
2105
2106         navigator.userAgent in service workers does not reflect customUserAgent set by client
2107         https://bugs.webkit.org/show_bug.cgi?id=192951
2108
2109         Reviewed by Youenn Fablet.
2110
2111         Whenever a service worker client registers itself, also pass its effective user agent.
2112         In the network process, for each origin, we store the latest client's user agent and
2113         use it when starting the service worker.
2114
2115         * dom/Document.cpp:
2116         (WebCore::Document::setServiceWorkerConnection):
2117         * loader/DocumentLoader.cpp:
2118         (WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
2119         * workers/service/SWClientConnection.h:
2120         * workers/service/server/SWServer.cpp:
2121         (WebCore::SWServer::serviceWorkerClientUserAgent const):
2122         (WebCore::SWServer::installContextData):
2123         (WebCore::SWServer::runServiceWorker):
2124         (WebCore::SWServer::registerServiceWorkerClient):
2125         * workers/service/server/SWServer.h:
2126         * workers/service/server/SWServerToContextConnection.h:
2127         * workers/service/server/SWServerWorker.cpp:
2128         (WebCore::SWServerWorker::userAgent const):
2129         * workers/service/server/SWServerWorker.h:
2130
2131 2018-12-21  Youenn Fablet  <youenn@apple.com>
2132
2133         RTCRtpSender.setParameters() does set active parameter
2134         https://bugs.webkit.org/show_bug.cgi?id=192848
2135
2136         Reviewed by Eric Carlson.
2137
2138         Covered by updated test.
2139
2140         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
2141         (WebCore::updateRTCRtpSendParameters):
2142         The routine was updating the local value, not the out parameter.
2143
2144 2018-12-21  Eric Carlson  <eric.carlson@apple.com>
2145
2146         'ended' Event doesn't fire on MediaStreamTrack when a USB camera is unplugged
2147         https://bugs.webkit.org/show_bug.cgi?id=187896
2148         <rdar://problem/42681445>
2149
2150         Reviewed by Jer Noble.
2151
2152         No new tests, tested manually.
2153
2154         * platform/mediastream/mac/AVVideoCaptureSource.h:
2155         * platform/mediastream/mac/AVVideoCaptureSource.mm:
2156         (WebCore::AVVideoCaptureSource::deviceDisconnected):
2157         (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
2158         (-[WebCoreAVVideoCaptureSourceObserver removeNotificationObservers]):
2159         (-[WebCoreAVVideoCaptureSourceObserver deviceConnectedDidChange:]):
2160         * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
2161         (WebCore::deviceHasInputStreams):
2162         (WebCore::isValidCaptureDevice):
2163         (WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
2164         (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
2165         (WebCore::CoreAudioCaptureDeviceManager::devicesChanged): Deleted.
2166         * platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:
2167         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
2168         (WebCore::CoreAudioSharedUnit::setCaptureDevice):
2169         (WebCore::CoreAudioSharedUnit::devicesChanged):
2170         (WebCore::CoreAudioSharedUnit::startProducingData):
2171         (WebCore::CoreAudioSharedUnit::startInternal):
2172         (WebCore::CoreAudioSharedUnit::verifyIsCapturing):
2173         (WebCore::CoreAudioSharedUnit::captureFailed):
2174         (WebCore::CoreAudioCaptureSourceFactory::devicesChanged):
2175         (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
2176         (WebCore::CoreAudioSharedUnit::setCaptureDeviceID): Deleted.
2177         * platform/mediastream/mac/CoreAudioCaptureSource.h:
2178
2179 2018-12-20  Ryosuke Niwa  <rniwa@webkit.org>
2180
2181         REGRESSION(r239353): iOS WK1 Assertion failure in notifyChildNodeRemoved while running
2182         TestWebKitAPI.QuickLook.LegacyQuickLookContent
2183         https://bugs.webkit.org/show_bug.cgi?id=192859
2184         <rdar://problem/46887237>
2185
2186         Reviewed by Antti Koivisto.
2187
2188         After r239353, ScriptDisallowedScope::InMainThread::isScriptAllowed() may return false when the web thread
2189         is inside a delegate callback even when there is a ScriptDisallowedScope defined.
2190
2191         Replace the existign debug assertions which assert !ScriptDisallowedScope::InMainThread::isScriptAllowed()
2192         by a newly added ScriptDisallowedScope::InMainThread::hasDisallowedScope to avoid hitting this assertion.
2193
2194         Tests: TestWebKitAPI.QuickLook.LegacyQuickLookContent
2195
2196         * dom/ContainerNodeAlgorithms.cpp:
2197         (WebCore::notifyChildNodeInserted):
2198         (WebCore::notifyChildNodeRemoved):
2199         * dom/Document.cpp:
2200         (WebCore::Document::nodeChildrenWillBeRemoved):
2201         (WebCore::Document::nodeWillBeRemoved):
2202         * dom/ScriptDisallowedScope.h:
2203         (WebCore::ScriptDisallowedScope::InMainThread::hasDisallowedScope):
2204         * html/HTMLFormElement.cpp:
2205         (WebCore:: const):
2206
2207 2018-12-21  Joseph Pecoraro  <pecoraro@apple.com>
2208
2209         Update status of some WebCore features in features.json
2210         https://bugs.webkit.org/show_bug.cgi?id=192998
2211
2212         Reviewed by Tim Horton.
2213
2214         * features.json:
2215         - Variation Fonts: Supported
2216         - Conic Gradients: Supported in Preview
2217         - Web Share: Supported in Preview
2218         - <datalist>: Supported in Preview
2219         - Intersection Observers: Supported in Preview
2220
2221 2018-12-21  Zalan Bujtas  <zalan@apple.com>
2222
2223         [iOS] Using file upload can trigger a crash under RenderThemeIOS::paintFileUploadIconDecorations()
2224         https://bugs.webkit.org/show_bug.cgi?id=192357
2225         <rdar://problem/42852260>
2226
2227         Reviewed by Simon Fraser.
2228
2229         Do not try to paint the file picker when painting is disabled.
2230
2231         * rendering/RenderFileUploadControl.cpp:
2232         (WebCore::RenderFileUploadControl::paintObject):
2233
2234 2018-12-21  Jiewen Tan  <jiewen_tan@apple.com>
2235
2236         [WebAuthN] userPresence should always be true
2237         https://bugs.webkit.org/show_bug.cgi?id=192835
2238         <rdar://problem/46538788>
2239
2240         Reviewed by Brent Fulgham.
2241
2242         In the current spec as of 7 August 2018, userPresence is suggested to set to the inverse of userVerification.
2243         This doesn't comply with the CTAP spec. Details in: https://github.com/w3c/webauthn/issues/1123.
2244         After discussing with other members of the working group, we decided to make userPresence always default to true.
2245
2246         Covered by exisiting tests.
2247
2248         * Modules/webauthn/fido/DeviceRequestConverter.cpp:
2249         (fido::encodeGetAssertionRequestAsCBOR):
2250
2251 2018-12-21  Jiewen Tan  <jiewen_tan@apple.com>
2252
2253         [WebAuthN] Import an APDU coder from Chromium
2254         https://bugs.webkit.org/show_bug.cgi?id=192949
2255         <rdar://problem/46879933>
2256
2257         Reviewed by Brent Fulgham.
2258
2259         This patch imports an APDU coder from Chromium. Here is the documentation:
2260         https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-raw-message-formats-v1.2-ps-20170411.html#u2f-message-framing
2261         APDU is a binary format to frame any U2F requests/responses into binaries. It is equivalent to CBOR in CTAP2.
2262
2263         Here is a list of files that are imported from Chromium:
2264         https://cs.chromium.org/chromium/src/components/apdu/apdu_command.cc?rcl=a2f290c10d132f53518e7f99d5635ee814ff8090
2265         https://cs.chromium.org/chromium/src/components/apdu/apdu_command.h?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
2266         https://cs.chromium.org/chromium/src/components/apdu/apdu_response.cc?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
2267         https://cs.chromium.org/chromium/src/components/apdu/apdu_response.h?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
2268         https://cs.chromium.org/chromium/src/components/apdu/apdu_unittest.cc?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
2269
2270         Covered by API tests.
2271
2272         * Modules/webauthn/apdu/ApduCommand.cpp: Added.
2273         (apdu::ApduCommand::createFromMessage):
2274         (apdu::ApduCommand::ApduCommand):
2275         (apdu::ApduCommand::getEncodedCommand const):
2276         * Modules/webauthn/apdu/ApduCommand.h: Added.
2277         * Modules/webauthn/apdu/ApduResponse.cpp: Added.
2278         (apdu::ApduResponse::createFromMessage):
2279         (apdu::ApduResponse::ApduResponse):
2280         (apdu::ApduResponse::getEncodedResponse const):
2281         * Modules/webauthn/apdu/ApduResponse.h: Added.
2282         * Sources.txt:
2283         * WebCore.xcodeproj/project.pbxproj:
2284
2285 2018-12-21  Jer Noble  <jer.noble@apple.com>
2286
2287         Convert raw CDMSessionMediaSourceAVFObjC pointer in MediaPlayerPrivateMediaSourceAVFObjC
2288         https://bugs.webkit.org/show_bug.cgi?id=192985
2289         <rdar://problem/46750743>
2290
2291         Reviewed by Eric Carlson.
2292
2293         Make m_session a RefPtr; drive-by fix: make m_mediaElement in WebKitMediaKeys a WeakPtr.
2294
2295         * Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
2296         (WebCore::WebKitMediaKeys::setMediaElement):
2297         * Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
2298         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2299         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2300         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2301         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
2302         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
2303
2304 2018-12-21  Justin Michaud  <justin_michaud@apple.com>
2305
2306         CSS variables don't work for colors in "border" property
2307         https://bugs.webkit.org/show_bug.cgi?id=192922
2308
2309         Reviewed by Simon Fraser.
2310
2311         ParseColorFunction no longer consumes anything if the color was not valid.
2312
2313         Test: css-custom-properties-api/border-variable-parsing.html
2314
2315         * css/parser/CSSPropertyParserHelpers.cpp:
2316         (WebCore::CSSPropertyParserHelpers::parseColorFunction):
2317
2318 2018-12-21  Justin Fan  <justin_fan@apple.com>
2319
2320         [WebGPU] GPUBindGroupLayout refactoring: no HashMap, and failure logging
2321         https://bugs.webkit.org/show_bug.cgi?id=192990
2322
2323         Reviewed by Myles C. Maxfield.
2324
2325         Refactor away the unnecessary HashMaps when creating MTLArgumentEncoders in GPUBindGroupLayout creation.
2326         Also update GPUBindGroupLayout::create -> tryCreate, in order to better handle Objective-C exceptions.
2327
2328         No new tests; no change in behavior.
2329
2330         * Modules/webgpu/WebGPUBindGroupLayout.cpp:
2331         (WebCore::WebGPUBindGroupLayout::create):
2332         (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
2333         * Modules/webgpu/WebGPUBindGroupLayout.h:
2334         (WebCore::WebGPUBindGroupLayout::bindGroupLayout const):
2335         * Modules/webgpu/WebGPUDevice.cpp:
2336         (WebCore::WebGPUDevice::createBindGroupLayout const):
2337         * platform/graphics/gpu/GPUBindGroupLayout.h:
2338         * platform/graphics/gpu/GPUDevice.cpp:
2339         (WebCore::GPUDevice::tryCreateBindGroupLayout const): Renamed from ::create*. Now returning a RefPtr. 
2340         (WebCore::GPUDevice::createBindGroupLayout const): Deleted.
2341         * platform/graphics/gpu/GPUDevice.h:
2342         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
2343         (WebCore::appendArgumentToArray):
2344         (WebCore::newEncoder):
2345         (WebCore::GPUBindGroupLayout::tryCreate): Renamed from ::create. Now returning a RefPtr.
2346         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
2347         (WebCore::appendArgumentToArrayInMap): Deleted.
2348         (WebCore::GPUBindGroupLayout::create): Deleted.
2349
2350         Deleted unneeded GPUBindGroupLayout.cpp:
2351         * Sources.txt:
2352         * WebCore.xcodeproj/project.pbxproj:
2353         * platform/graphics/gpu/GPUBindGroupLayout.cpp: Removed.
2354
2355 2018-12-21  Alejandro G. Castro  <alex@igalia.com>
2356
2357         [GTK][WPE] Add DeviceIdHashSaltStorage disk persistence
2358         https://bugs.webkit.org/show_bug.cgi?id=190466
2359
2360         Reviewed by Youenn Fablet.
2361
2362         Added persistency to the DeviceIdHashSaltStorage.
2363
2364         * platform/glib/FileSystemGlib.cpp:
2365         (WebCore::FileSystem::getFileSize): Implemented this function to
2366         allow sharing code with the statistics storage class.
2367         * platform/glib/KeyedDecoderGlib.cpp:
2368         (WebCore::KeyedDecoderGlib::dictionaryFromGVariant): Added a
2369         condition to control situations where the key is empty, it can
2370         happen if the user modifies the file in the disk.
2371         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp: Add include
2372         to make work compilation with debug, unified builds.
2373
2374 2018-12-21  Zalan Bujtas  <zalan@apple.com>
2375
2376         Synchronous media query evaluation could destroy current Frame/FrameView.
2377         https://bugs.webkit.org/show_bug.cgi?id=192781
2378         <rdar://problem/34416793>
2379
2380         Reviewed by Chris Dumez.
2381
2382         Protect Frame and FrameView when coming back from printing and check if the current Frame/FrameView/FrameLoader objects are still valid.
2383
2384         Test: printing/print-with-media-query-destory.html
2385
2386         * loader/DocumentLoader.cpp:
2387         (WebCore::DocumentLoader::finishedLoading):
2388         * page/Frame.cpp:
2389         (WebCore::Frame::setPrinting):
2390         * page/FrameView.cpp:
2391         (WebCore::FrameView::forceLayoutForPagination):
2392         * page/PrintContext.cpp:
2393         (WebCore::PrintContext::PrintContext):
2394         (WebCore::PrintContext::computePageRects):
2395         (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
2396         (WebCore::PrintContext::begin):
2397         (WebCore::PrintContext::computeAutomaticScaleFactor):
2398         (WebCore::PrintContext::spoolPage):
2399         (WebCore::PrintContext::spoolRect):
2400         (WebCore::PrintContext::end):
2401         * page/PrintContext.h:
2402         (WebCore::PrintContext::frame const): Deleted.
2403
2404 2018-12-21  Wenson Hsieh  <wenson_hsieh@apple.com>
2405
2406         Setting the file wrapper and content type of an attachment to a PDF should update its image
2407         https://bugs.webkit.org/show_bug.cgi?id=192984
2408         <rdar://problem/46798028>
2409
2410         Reviewed by Tim Horton.
2411
2412         Allow PDF data to be used to update enclosing image elements when setting the file wrapper for an attachment.
2413         Covered by a new API test: WKAttachmentTests.SetFileWrapperForPDFImageAttachment.
2414
2415         * html/HTMLAttachmentElement.cpp:
2416         (WebCore::mimeTypeIsSuitableForInlineImageAttachment):
2417         (WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
2418
2419 2018-12-21  Justin Michaud  <justin_michaud@apple.com>
2420
2421         Repeated background images with zero size should display the background color
2422         https://bugs.webkit.org/show_bug.cgi?id=192962
2423
2424         Reviewed by Antti Koivisto.
2425
2426         Test: fast/backgrounds/background-repeat-with-zero-size.html
2427
2428         * platform/LengthSize.h:
2429         (WebCore::LengthSize::isEmpty const):
2430         * rendering/RenderBoxModelObject.cpp:
2431         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2432         * rendering/style/FillLayer.h:
2433         (WebCore::FillLayer::isEmpty const):
2434
2435 2018-12-21  Manuel Rego Casasnovas  <rego@igalia.com>
2436
2437         [css-grid] Fix percentages in relative offsets for grid items
2438         https://bugs.webkit.org/show_bug.cgi?id=190492
2439
2440         Reviewed by Sergio Villar Senin.
2441
2442         The method RenderBoxModelObject::relativePositionOffset() was not considering the case of grid items,
2443         where the containing block is the grid area.
2444         The patch modifies the method so the new code uses overrideContainingBlockContentWidth|Height when required.
2445
2446         Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-relative-offsets-002.html
2447
2448         * rendering/RenderBox.cpp: Implement the physical versions of the already existent methods.
2449         (WebCore::RenderBox::overrideContainingBlockContentWidth const):
2450         (WebCore::RenderBox::overrideContainingBlockContentHeight const):
2451         (WebCore::RenderBox::hasOverrideContainingBlockContentWidth const):
2452         (WebCore::RenderBox::hasOverrideContainingBlockContentHeight const):
2453         * rendering/RenderBox.h:
2454         * rendering/RenderBoxModelObject.cpp:
2455         (WebCore::RenderBoxModelObject::relativePositionOffset const): Modified method
2456         to take into account overrideContainingBlockContentWidth|Height for grid items.
2457         * rendering/RenderBoxModelObject.h: Added new headers for physical virtual methods
2458         that will be overridden in RenderBox.
2459         (WebCore::RenderBoxModelObject::overrideContainingBlockContentWidth const):
2460         (WebCore::RenderBoxModelObject::overrideContainingBlockContentHeight const):
2461         (WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentWidth const):
2462         (WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentHeight const):
2463
2464 2018-12-20  Justin Fan  <justin_fan@apple.com>
2465
2466         [WebGPU] Convert WebGPUBindGroups into MTLArgumentEncoders
2467         https://bugs.webkit.org/show_bug.cgi?id=192956
2468
2469         Reviewed by Myles Maxfield.
2470
2471         No testable behavior change. Existing tests cover possible crashing.
2472
2473         Add GPUBindGroupLayoutMetal.mm:
2474         * SourcesCocoa.txt:
2475         * WebCore.xcodeproj/project.pbxproj:
2476
2477         Flesh out GPUBindGroupLayout::create:
2478         * platform/graphics/gpu/GPUBindGroupLayout.cpp:
2479         * platform/graphics/gpu/GPUBindGroupLayout.h:
2480         * platform/graphics/gpu/GPUDevice.cpp:
2481         (WebCore::GPUDevice::createBindGroupLayout const):
2482         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm: Added.
2483         (WebCore::appendArgumentToArrayInMap): Added.
2484         (WebCore::GPUBindGroupLayout::create):
2485         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
2486         (WebCore::MTLDataTypeForBindingType): Added.
2487
2488 2018-12-20  Michael Catanzaro  <mcatanzaro@igalia.com>
2489
2490         Unreviewed, remove stray #pragma once added to .cpp file
2491
2492         * svg/properties/SVGAttributeOwnerProxy.cpp:
2493
2494 2018-12-20  Justin Michaud  <justin_michaud@apple.com>
2495
2496         Adding runtime-enabled attribute to Element prevents inlining property access
2497         https://bugs.webkit.org/show_bug.cgi?id=192901
2498
2499         Add a call to flattenDictionaryObject after disabling runtime-enabled attributes.
2500
2501         Reviewed by Ryosuke Niwa.
2502
2503         * bindings/scripts/CodeGeneratorJS.pm:
2504         (GenerateImplementation):
2505         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
2506         (WebCore::JSTestEnabledBySettingPrototype::finishCreation):
2507         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2508         (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
2509         * bindings/scripts/test/JS/JSTestNode.cpp:
2510         (WebCore::JSTestNodePrototype::finishCreation):
2511         * bindings/scripts/test/JS/JSTestObj.cpp:
2512         (WebCore::JSTestObjPrototype::finishCreation):
2513
2514 2018-12-20  Chris Dumez  <cdumez@apple.com>
2515
2516         Use Optional::hasValue() instead of Optional::has_value()
2517         https://bugs.webkit.org/show_bug.cgi?id=192948
2518
2519         Reviewed by Tim Horton.
2520
2521         * bindings/js/DOMPromiseProxy.h:
2522         (WebCore::DOMPromiseProxy<IDLType>::isFulfilled const):
2523         (WebCore::DOMPromiseProxy<IDLVoid>::isFulfilled const):
2524         (WebCore::DOMPromiseProxyWithResolveCallback<IDLType>::isFulfilled const):
2525         * dom/DataTransferItemList.h:
2526         (WebCore::DataTransferItemList::hasItems const):
2527         * dom/EventTarget.cpp:
2528         (WebCore::EventTarget::addEventListener):
2529         * html/HTMLMediaElement.cpp:
2530         (WebCore::HTMLMediaElement::captionDisplayMode):
2531         * platform/graphics/MediaPlayer.cpp:
2532         (WebCore::MediaPlayer::wouldTaintOrigin const):
2533         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2534         (WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
2535         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2536         (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
2537         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
2538         (webKitMediaSrcUpdatePresentationSize):
2539         * platform/mac/NSScrollerImpDetails.mm:
2540         (WebCore::ScrollerStyle::recommendedScrollerStyle):
2541         * rendering/RenderListItem.cpp:
2542         (WebCore::RenderListItem::setExplicitValue):
2543
2544 2018-12-20  Chris Dumez  <cdumez@apple.com>
2545
2546         Move HTTPS_UPGRADE code behind a runtime flag, off by default
2547         https://bugs.webkit.org/show_bug.cgi?id=192937
2548
2549         Reviewed by Youenn Fablet.
2550
2551         Move HTTPS_UPGRADE code behind a runtime flag, off by default and drop the build time flag.
2552
2553         * page/Settings.yaml:
2554
2555 2018-12-20  Youenn Fablet  <youenn@apple.com>
2556
2557         Remove custom constructors of ReadableStreamDefaultReader and ReadableStreamBYOBReader
2558         https://bugs.webkit.org/show_bug.cgi?id=192838
2559
2560         Reviewed by Chris Dumez.
2561
2562         Generate constructor code in case of a Private but not Public constructor.
2563         Make sure this is correctly exposed in global objects.
2564         Add JS built-in constructor implementations for those two objects.
2565
2566         Also add JS built-in constructors for controller and byob request.
2567         To keep existing behavior, JS built-ins calling these constructors need to pass
2568         an additional parameter that allows making the difference between a JS builtin caller or a JS caller.
2569         In the latter case, the constructor will throw.
2570
2571         Covered by existing tests, no observable change of behavior.
2572
2573         * Modules/streams/ReadableByteStreamController.idl:
2574         * Modules/streams/ReadableByteStreamController.js:
2575         (initializeReadableByteStreamController):
2576         (getter.byobRequest):
2577         * Modules/streams/ReadableByteStreamInternals.js:
2578         (privateInitializeReadableByteStreamController): Deleted.
2579         (privateInitializeReadableStreamBYOBRequest): Deleted.
2580         * Modules/streams/ReadableStream.js:
2581         (initializeReadableStream):
2582         * Modules/streams/ReadableStreamBYOBReader.js:
2583         (initializeReadableStreamBYOBReader):
2584         * Modules/streams/ReadableStreamBYOBRequest.idl:
2585         * Modules/streams/ReadableStreamBYOBRequest.js:
2586         (initializeReadableStreamBYOBRequest):
2587         * Modules/streams/ReadableStreamDefaultController.idl:
2588         * Modules/streams/ReadableStreamDefaultController.js:
2589         (initializeReadableStreamDefaultController):
2590         (enqueue):
2591         * Modules/streams/ReadableStreamDefaultReader.js:
2592         (initializeReadableStreamDefaultReader):
2593         * Modules/streams/ReadableStreamInternals.js:
2594         (readableStreamDefaultControllerError): Deleted.
2595         * Sources.txt:
2596         * UnifiedSources-input.xcfilelist:
2597         * WebCore.xcodeproj/project.pbxproj:
2598         * bindings/js/JSDOMBuiltinConstructor.h:
2599         * bindings/js/JSDOMGlobalObject.cpp:
2600         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
2601         * bindings/js/JSReadableStreamPrivateConstructors.cpp: Removed.
2602         * bindings/js/JSReadableStreamPrivateConstructors.h: Removed.
2603         * bindings/scripts/CodeGeneratorJS.pm:
2604         (GeneratePropertiesHashTable):
2605         * bindings/scripts/preprocess-idls.pl:
2606         (shouldExposeInterface):
2607
2608 2018-12-20  Jiewen Tan  <jiewen_tan@apple.com>
2609
2610         [WebAuthN] Remove hash from Client Data
2611         https://bugs.webkit.org/show_bug.cgi?id=192727
2612         <rdar://problem/46746673>
2613
2614         Reviewed by Brent Fulgham.
2615
2616         The hash algorithm for hashing the client data is enforced to SHA_256 in the latest spec:
2617         https://www.w3.org/TR/webauthn/#sec-client-data. Therefore, we should remove it.
2618
2619         Covered by existing tests.
2620
2621         * Modules/webauthn/AuthenticatorCoordinator.cpp:
2622         (WebCore::AuthenticatorCoordinatorInternal::produceClientDataJson):
2623
2624 2018-12-20  Jiewen Tan  <jiewen_tan@apple.com>
2625
2626         [WebAuthN] Add a runtime flag for local authenticator
2627         https://bugs.webkit.org/show_bug.cgi?id=192792
2628         <rdar://problem/46798738>
2629
2630         Reviewed by Brent Fulgham.
2631
2632         No tests.
2633
2634         This patch adds a runtime flag for local authenticator and removes ways to
2635         set the runtime flag for web authentication in LegacyWebKit.
2636
2637         * page/RuntimeEnabledFeatures.h:
2638         (WebCore::RuntimeEnabledFeatures::setWebAuthenticationLocalAuthenticatorEnabled):
2639         (WebCore::RuntimeEnabledFeatures::webAuthenticationLocalAuthenticatorEnabled const):
2640
2641 2018-12-20  Jeremy Jones  <jeremyj@apple.com>
2642
2643         Pointer lock causes abandoned documents
2644         https://bugs.webkit.org/show_bug.cgi?id=188727
2645         rdar://problem/44248197
2646         
2647         Reviewed by Simon Fraser.
2648
2649         Fixes --world-leaks in these tests:
2650
2651         pointer-lock/locked-element-removed-from-dom.html
2652         pointer-lock/mouse-event-delivery.html
2653         fast/shadow-dom/pointerlockelement-in-slot.html
2654
2655         PointerLockController now uses WeakPtr instead of RefPtr because it has no need to extend the lifetime of a document.
2656
2657         * page/PointerLockController.cpp:
2658         (WebCore::PointerLockController::elementRemoved):
2659         (WebCore::PointerLockController::documentDetached):
2660         (WebCore::PointerLockController::didAcquirePointerLock):
2661         * page/PointerLockController.h:
2662
2663 2018-12-20  Chris Dumez  <cdumez@apple.com>
2664
2665         Use Optional::valueOr() instead of Optional::value_or()
2666         https://bugs.webkit.org/show_bug.cgi?id=192933
2667
2668         Reviewed by Geoffrey Garen.
2669
2670         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
2671         (WebCore::convert):
2672         (WebCore::ApplePayPaymentHandler::didAuthorizePayment):
2673         * Modules/encryptedmedia/MediaKeySession.cpp:
2674         (WebCore::MediaKeySession::load):
2675         * Modules/indexeddb/IDBDatabaseIdentifier.h:
2676         (WebCore::IDBDatabaseIdentifier::hash const):
2677         * Modules/indexeddb/IDBFactory.cpp:
2678         (WebCore::IDBFactory::open):
2679         * Modules/mediastream/MediaStreamTrack.cpp:
2680         (WebCore::MediaStreamTrack::applyConstraints):
2681         * Modules/mediastream/RTCDTMFSender.cpp:
2682         (WebCore::RTCDTMFSender::insertDTMF):
2683         * Modules/webdatabase/SQLTransaction.cpp:
2684         (WebCore::SQLTransaction::executeSql):
2685         * Modules/webvr/VRFrameData.cpp:
2686         (WebCore::VRFrameData::update):
2687         * animation/AnimationTimeline.cpp:
2688         (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
2689         * animation/DeclarativeAnimation.cpp:
2690         (WebCore::DeclarativeAnimation::cancel):
2691         (WebCore::DeclarativeAnimation::invalidateDOMEvents):
2692         * animation/KeyframeEffect.cpp:
2693         (WebCore::computeMissingKeyframeOffsets):
2694         (WebCore::KeyframeEffect::applyPendingAcceleratedActions):
2695         * animation/WebAnimation.cpp:
2696         (WebCore::WebAnimation::runPendingPlayTask):
2697         (WebCore::WebAnimation::runPendingPauseTask):
2698         * bindings/js/SerializedScriptValue.cpp:
2699         (WebCore::CloneSerializer::write):
2700         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2701         (WebCore::CryptoAlgorithmHMAC::generateKey):
2702         (WebCore::CryptoAlgorithmHMAC::importKey):
2703         * crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp:
2704         (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
2705         (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
2706         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
2707         (WebCore::CryptoKeyRSA::importSpki):
2708         (WebCore::CryptoKeyRSA::importPkcs8):
2709         * crypto/keys/CryptoKeyRSA.cpp:
2710         (WebCore::CryptoKeyRSA::importJwk):
2711         * crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
2712         (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
2713         (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
2714         * crypto/mac/CryptoKeyRSAMac.cpp:
2715         (WebCore::CryptoKeyRSA::importSpki):
2716         (WebCore::CryptoKeyRSA::importPkcs8):
2717         * css/CSSComputedStyleDeclaration.cpp:
2718         (WebCore::counterToCSSValue):
2719         * css/CSSFontFace.cpp:
2720         (WebCore::calculateItalicRange):
2721         * css/CSSPrimitiveValue.cpp:
2722         (WebCore::CSSPrimitiveValue::doubleValue const):
2723         * css/CSSStyleSheet.cpp:
2724         (WebCore::CSSStyleSheet::addRule):
2725         * css/DOMMatrix.cpp:
2726         (WebCore::DOMMatrix::rotateSelf):
2727         * css/DOMMatrixReadOnly.cpp:
2728         (WebCore::DOMMatrixReadOnly::validateAndFixup):
2729         * css/StyleBuilderCustom.h:
2730         (WebCore::StyleBuilderCustom::applyValueCounter):
2731         * css/parser/MediaQueryParser.cpp:
2732         (WebCore::MediaQueryParser::commitMediaQuery):
2733         * dom/Document.h:
2734         (WebCore::Document::referrerPolicy const):
2735         * dom/Element.cpp:
2736         (WebCore::toScrollAlignment):
2737         * dom/EventTarget.cpp:
2738         (WebCore::EventTarget::addEventListener):
2739         * dom/MutationObserver.cpp:
2740         (WebCore::MutationObserver::observe):
2741         * editing/cocoa/FontAttributeChangesCocoa.mm:
2742         (WebCore::FontChanges::platformFontFamilyNameForCSS const):
2743         * fileapi/File.cpp:
2744         (WebCore::File::File):
2745         * html/DOMTokenList.cpp:
2746         (WebCore::DOMTokenList::toggle):
2747         * html/HTMLOListElement.h:
2748         * html/ImageBitmap.cpp:
2749         (WebCore::croppedSourceRectangleWithFormatting):
2750         * html/canvas/CanvasPattern.cpp:
2751         (WebCore::CanvasPattern::setTransform):
2752         * html/canvas/CanvasRenderingContext2DBase.cpp:
2753         (WebCore::CanvasRenderingContext2DBase::setTransform):
2754         (WebCore::CanvasRenderingContext2DBase::isPointInPathInternal):
2755         (WebCore::CanvasRenderingContext2DBase::isPointInStrokeInternal):
2756         * html/canvas/Path2D.cpp:
2757         (WebCore::Path2D::addPath):
2758         * inspector/InspectorCanvas.cpp:
2759         (WebCore::InspectorCanvas::buildAction):
2760         * inspector/InspectorFrontendHost.cpp:
2761         (WebCore::populateContextMenu):
2762         * layout/FormattingContext.cpp:
2763         (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
2764         * layout/FormattingContextGeometry.cpp:
2765         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
2766         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
2767         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
2768         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
2769         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
2770         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
2771         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset):
2772         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue):
2773         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue):
2774         * layout/FormattingContextQuirks.cpp:
2775         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
2776         * layout/MarginTypes.h:
2777         (WebCore::Layout::VerticalMargin::usedValues const):
2778         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2779         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2780         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
2781         (WebCore::Layout::BlockFormattingContext::Geometry::instrinsicWidthConstraints):
2782         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
2783         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
2784         * layout/displaytree/DisplayBox.h:
2785         (WebCore::Display::Box::width const):
2786         (WebCore::Display::Box::height const):
2787         (WebCore::Display::Box::contentBoxTop const):
2788         (WebCore::Display::Box::contentBoxLeft const):
2789         * layout/floats/FloatingContext.cpp:
2790         (WebCore::Layout::Iterator::set):
2791         * layout/inlineformatting/InlineFormattingContext.cpp:
2792         (WebCore::Layout::InlineFormattingContext::appendContentToLine const):
2793         (WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const):
2794         * loader/FrameLoader.cpp:
2795         (WebCore::FrameLoader::urlSelected):
2796         * loader/NavigationAction.cpp:
2797         * page/FrameView.cpp:
2798         (WebCore::FrameView::setLayoutViewportOverrideRect):
2799         (WebCore::FrameView::documentToAbsoluteScaleFactor const):
2800         (WebCore::FrameView::viewportSizeForCSSViewportUnits const):
2801         * page/Page.cpp:
2802         (WebCore::Page::setLowPowerModeEnabledOverrideForTesting):
2803         * page/SecurityOriginData.cpp:
2804         (WebCore::SecurityOriginData::databaseIdentifier const):
2805         * page/SecurityOriginData.h:
2806         (WebCore::SecurityOriginDataHash::hash):
2807         * page/SecurityOriginHash.h:
2808         (WebCore::SecurityOriginHash::hash):
2809         * page/ViewportConfiguration.cpp:
2810         (WebCore::ViewportConfiguration::setViewLayoutSize):
2811         * page/WindowFeatures.cpp:
2812         (WebCore::parseDialogFeatures):
2813         * page/animation/AnimationBase.cpp:
2814         (WebCore::AnimationBase::updateStateMachine):
2815         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
2816         (WebCore::AnimationBase::getTimeToNextEvent const):
2817         (WebCore::AnimationBase::freezeAtTime):
2818         (WebCore::AnimationBase::getElapsedTime const):
2819         * page/animation/CSSAnimationController.cpp:
2820         (WebCore::CSSAnimationControllerPrivate::updateAnimationTimer):
2821         * page/cocoa/ResourceUsageThreadCocoa.mm:
2822         (WebCore::ResourceUsageThread::platformThreadBody):
2823         * page/linux/ResourceUsageThreadLinux.cpp:
2824         (WebCore::ResourceUsageThread::platformThreadBody):
2825         * platform/graphics/ComplexTextController.cpp:
2826         (WebCore::ComplexTextController::offsetForPosition):
2827         * platform/graphics/FontCache.h:
2828         (WebCore::FontDescriptionKey::computeHash const):
2829         * platform/graphics/FontCascade.cpp:
2830         (WebCore::FontCascade::drawText const):
2831         (WebCore::FontCascade::drawEmphasisMarks const):
2832         (WebCore::FontCascade::displayListForTextRun const):
2833         (WebCore::FontCascade::adjustSelectionRectForText const):
2834         (WebCore::FontCascade::codePath const):
2835         * platform/graphics/FontSelectionAlgorithm.cpp:
2836         (WebCore::FontSelectionAlgorithm::styleDistance const):
2837         * platform/graphics/FontSelectionAlgorithm.h:
2838         (WebCore::operator<<):
2839         (WebCore::FontSelectionSpecifiedCapabilities::computeWeight const):
2840         (WebCore::FontSelectionSpecifiedCapabilities::computeWidth const):
2841         (WebCore::FontSelectionSpecifiedCapabilities::computeSlope const):
2842         * platform/graphics/ShadowBlur.cpp:
2843         (WebCore::ShadowBlur::calculateLayerBoundingRect):
2844         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
2845         (WebCore::WebCoreAVCFResourceLoader::startLoading):
2846         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2847         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
2848         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2849         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext):
2850         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2851         (WebCore::SourceBufferPrivateAVFObjC::naturalSize):
2852         * platform/graphics/ca/GraphicsLayerCA.cpp:
2853         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
2854         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2855         (WebCore::preparePlatformFont):
2856         * platform/graphics/filters/FETurbulence.cpp:
2857         (WebCore::FETurbulence::fillRegion const):
2858         * platform/graphics/gstreamer/GStreamerCommon.cpp:
2859         (WebCore::initializeGStreamer):
2860         * platform/graphics/texmap/TextureMapperLayer.cpp:
2861         (WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
2862         (WebCore::TextureMapperLayer::replicaTransform):
2863         (WebCore::TextureMapperLayer::syncAnimations):
2864         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2865         (WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
2866         (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
2867         * platform/graphics/transforms/TransformState.cpp:
2868         (WebCore::TransformState::mappedPoint const):
2869         (WebCore::TransformState::mapQuad const):
2870         (WebCore::TransformState::flattenWithTransform):
2871         * platform/network/CacheValidation.cpp:
2872         (WebCore::computeCurrentAge):
2873         (WebCore::computeFreshnessLifetimeForHTTPFamily):
2874         * platform/network/NetworkStateNotifier.cpp:
2875         (WebCore::NetworkStateNotifier::onLine):
2876         * rendering/FloatingObjects.cpp:
2877         (WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom const):
2878         (WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom const):
2879         * rendering/GridBaselineAlignment.cpp:
2880         (WebCore::GridBaselineAlignment::ascentForChild const):
2881         * rendering/GridTrackSizingAlgorithm.cpp:
2882         (WebCore::GridTrack::setGrowthLimit):
2883         (WebCore::GridTrackSizingAlgorithm::initialBaseSize const):
2884         (WebCore::GridTrackSizingAlgorithm::initialGrowthLimit const):
2885         (WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem):
2886         (WebCore::sortByGridTrackGrowthPotential):
2887         (WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const):
2888         (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
2889         (WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
2890         * rendering/PaintInfo.h:
2891         (WebCore::PaintInfo::applyTransform):
2892         * rendering/RenderBox.cpp:
2893         (WebCore::RenderBox::computeLogicalHeight const):
2894         * rendering/RenderCounter.cpp:
2895         (WebCore::planCounter):
2896         * rendering/RenderDeprecatedFlexibleBox.cpp:
2897         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2898         * rendering/RenderFlexibleBox.cpp:
2899         (WebCore::RenderFlexibleBox::baselinePosition const):
2900         (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
2901         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
2902         * rendering/RenderGrid.cpp:
2903         (WebCore::RenderGrid::gridGap const):
2904         (WebCore::RenderGrid::baselinePosition const):
2905         * rendering/RenderLayer.cpp:
2906         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2907         * rendering/RenderListBox.cpp:
2908         (WebCore::RenderListBox::paintItem):
2909         (WebCore::RenderListBox::listIndexIsVisible):
2910         * rendering/RenderMultiColumnSet.cpp:
2911         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight const):
2912         * rendering/RenderTable.cpp:
2913         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
2914         * rendering/RenderTableCell.cpp:
2915         (WebCore::RenderTableCell::cellBaselinePosition const):
2916         * rendering/RenderTableSection.cpp:
2917         (WebCore::RenderTableSection::firstLineBaseline const):
2918         * rendering/RenderText.cpp:
2919         (WebCore::RenderText::computePreferredLogicalWidths):
2920         (WebCore::RenderText::previousOffset const):
2921         (WebCore::RenderText::previousOffsetForBackwardDeletion const):
2922         (WebCore::RenderText::nextOffset const):
2923         (WebCore::RenderText::stringView const):
2924         * rendering/RenderView.cpp:
2925         (WebCore::RenderView::layout):
2926         * rendering/mathml/RenderMathMLBlock.cpp:
2927         (WebCore::RenderMathMLBlock::baselinePosition const):
2928         * rendering/mathml/RenderMathMLBlock.h:
2929         (WebCore::RenderMathMLBlock::ascentForChild):
2930         * rendering/style/GridPosition.cpp:
2931         (WebCore::GridPosition::max):
2932         * rendering/style/TextUnderlineOffset.h:
2933         (WebCore::TextUnderlineOffset::lengthOr const):
2934         * rendering/svg/RenderSVGContainer.cpp:
2935         (WebCore::RenderSVGContainer::nodeAtFloatPoint):
2936         * rendering/svg/RenderSVGForeignObject.cpp:
2937         (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
2938         * rendering/svg/RenderSVGImage.cpp:
2939         (WebCore::RenderSVGImage::nodeAtFloatPoint):
2940         * rendering/svg/RenderSVGResourceClipper.cpp:
2941         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
2942         * rendering/svg/RenderSVGResourceFilter.cpp:
2943         (WebCore::RenderSVGResourceFilter::postApplyResource):
2944         * rendering/svg/RenderSVGRoot.cpp:
2945         (WebCore::RenderSVGRoot::nodeAtPoint):
2946         * rendering/svg/RenderSVGShape.cpp:
2947         (WebCore::RenderSVGShape::nodeAtFloatPoint):
2948         * rendering/svg/RenderSVGText.cpp:
2949         (WebCore::RenderSVGText::nodeAtFloatPoint):
2950         * rendering/svg/SVGRenderingContext.cpp:
2951         (WebCore::SVGRenderingContext::clipToImageBuffer):
2952         * svg/SVGToOTFFontConversion.cpp:
2953         (WebCore::SVGToOTFFontConverter::processGlyphElement):
2954         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
2955
2956 2018-12-20  Jer Noble  <jer.noble@apple.com>
2957
2958         REGRESSION (r239419): heap-use-after-free in AudioSourceProviderAVFObjC::finalizeCallback()
2959         https://bugs.webkit.org/show_bug.cgi?id=192941
2960         <rdar://problem/46874096>
2961
2962         Reviewed by Brent Fulgham.
2963
2964         Don't delete the locked lock before unlocking the lock. 
2965
2966         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2967         (WebCore::AudioSourceProviderAVFObjC::finalizeCallback):
2968
2969 2018-12-20  Keith Rollin  <krollin@apple.com>
2970
2971         Improve release-level page-load logging
2972         https://bugs.webkit.org/show_bug.cgi?id=192872
2973         <rdar://problem/46850309>
2974
2975         Reviewed by Chris Dumez.
2976
2977         There are a number of reported bugs that are difficult or impossible
2978         to track down with our current level of logging. Additionally, some
2979         software groups lower in the page-loading stack have requested logging
2980         sufficient for tracking a user-visible error message down to the
2981         requested resource that caused the message. Add more-comprehensive
2982         logging to address these issues/requests.
2983
2984         No new tests -- no changed functionality.
2985
2986         * loader/DocumentLoader.cpp:
2987         (WebCore::DocumentLoader::setMainDocumentError):
2988         (WebCore::DocumentLoader::mainReceivedError):
2989         (WebCore::DocumentLoader::stopLoading):
2990         (WebCore::DocumentLoader::notifyFinished):
2991         (WebCore::DocumentLoader::willSendRequest):
2992         (WebCore::DocumentLoader::continueAfterContentPolicy):
2993         (WebCore::DocumentLoader::startLoadingMainResource):
2994         (WebCore::DocumentLoader::loadMainResource):
2995         (WebCore::DocumentLoader::cancelMainResourceLoad):
2996         * loader/FrameLoader.cpp:
2997         (WebCore::FrameLoader::urlSelected):
2998         (WebCore::FrameLoader::loadURLIntoChildFrame):
2999         (WebCore::FrameLoader::loadArchive):
3000         (WebCore::FrameLoader::loadInSameDocument):
3001         (WebCore::FrameLoader::loadFrameRequest):
3002         (WebCore::FrameLoader::loadURL):
3003         (WebCore::FrameLoader::load):
3004         (WebCore::FrameLoader::loadWithNavigationAction):
3005         (WebCore::FrameLoader::loadWithDocumentLoader):
3006         (WebCore::FrameLoader::reloadWithOverrideEncoding):
3007         (WebCore::FrameLoader::reload):
3008         (WebCore::FrameLoader::setState):
3009         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3010         (WebCore::FrameLoader::loadPostRequest):
3011         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
3012         (WebCore::FrameLoader::loadDifferentDocumentItem):
3013         * loader/ProgressTracker.cpp:
3014         (WebCore::ProgressItem::ProgressItem):
3015         (WebCore::ProgressTracker::reset):
3016         (WebCore::ProgressTracker::progressStarted):
3017         (WebCore::ProgressTracker::progressCompleted):
3018         (WebCore::ProgressTracker::finalProgressComplete):
3019         (WebCore::ProgressTracker::incrementProgress):
3020         (WebCore::ProgressTracker::completeProgress):
3021         (WebCore::ProgressTracker::isAlwaysOnLoggingAllowed const):
3022         * loader/ProgressTracker.h:
3023         * loader/ResourceLoader.cpp:
3024         (WebCore::ResourceLoader::loadDataURL):
3025         (WebCore::ResourceLoader::willSendRequestInternal):
3026         (WebCore::ResourceLoader::didFinishLoading):
3027         (WebCore::ResourceLoader::didFail):
3028         (WebCore::ResourceLoader::willSendRequestAsync):
3029         (WebCore::ResourceLoader::wasBlocked):
3030         (WebCore::ResourceLoader::cannotShowURL):
3031         * loader/SubresourceLoader.cpp:
3032         (WebCore::SubresourceLoader::willSendRequestInternal):
3033         (WebCore::=):
3034         (WebCore::SubresourceLoader::didReceiveResponse):
3035         (WebCore::SubresourceLoader::didFinishLoading):
3036         (WebCore::SubresourceLoader::didFail):
3037         (WebCore::SubresourceLoader::willCancel):
3038         * loader/cache/CachedResource.cpp:
3039         (WebCore::CachedResource::load):
3040
3041 2018-12-20  Jeremy Jones  <jeremyj@apple.com>
3042
3043         Switch tabs before retuning PiP video to inline.
3044         https://bugs.webkit.org/show_bug.cgi?id=192767
3045         rdar://problem/46006046
3046
3047         Reviewed by Jer Noble.
3048
3049         No new tests because this code path only happens with a user action on system UI.
3050
3051         When exiting PiP, notify the fullscreen change observer so it can restore client UI state before exiting.
3052
3053         * platform/mac/VideoFullscreenInterfaceMac.mm:
3054         (-[WebVideoFullscreenInterfaceMacObjC pipShouldClose:]):
3055
3056 2018-12-19  Michael Catanzaro  <mcatanzaro@igalia.com>
3057
3058         Unreviewed, fix GTK build after r239410
3059
3060         It added a new file to the build, breaking the unified sources magic that obscured a bug in
3061         URLSoup.h. It forward-declares URL, but this never worked unless the URL.h header was
3062         included via another source file in the unified source bundle.
3063
3064         * platform/network/soup/URLSoup.h:
3065
3066 2018-12-19  Chris Dumez  <cdumez@apple.com>
3067
3068         wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from
3069         https://bugs.webkit.org/show_bug.cgi?id=192728
3070         <rdar://problem/46746779>
3071
3072         Reviewed by Geoff Garen.
3073
3074         * Modules/*:
3075         * animation/*:
3076         * bindings/*:
3077         * crypto/*:
3078         * css/*:
3079         * dom/*:
3080         * editing/*:
3081         * fileapi/*:
3082         * html/*:
3083         * inspector/*:
3084         * layout/*:
3085         * loader/*:
3086         * mathml/*:
3087         * page/*:
3088         * platform/*:
3089         * plugins/*:
3090         * rendering/*:
3091         * testing/*:
3092         * workers/*:
3093         * xml/*:
3094
3095 2018-12-19  Jer Noble  <jer.noble@apple.com>
3096
3097         Leak of MTAudioProcessingTap (304 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
3098         https://bugs.webkit.org/show_bug.cgi?id=192896
3099         <rdar://46732186>
3100
3101         Reviewed by Eric Carlson.
3102
3103         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
3104         (WebCore::AudioSourceProviderAVFObjC::initCallback):
3105
3106 2018-12-19  Timothy Hatcher  <timothy@apple.com>
3107
3108         REGRESSION (r232991): Switching to dark mode in Mail does not update the message view to be transparent
3109         https://bugs.webkit.org/show_bug.cgi?id=188891
3110         rdar://problem/42344352
3111
3112         Reviewed by Simon Fraser.
3113
3114         * rendering/RenderLayerCompositor.cpp:
3115         (WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
3116         Don't return early when m_layerForOverhangAreas is null to avoid skipping
3117         setRootLayerConfigurationNeedsUpdate() and scheduleCompositingLayerUpdate().
3118
3119 2018-12-19  Justin Fan  <justin_fan@apple.com>
3120
3121         [WebGPU] Add stubs for WebGPUPipelineLayout/Descriptor and device::createPipelineLayout
3122         https://bugs.webkit.org/show_bug.cgi?id=192843
3123         <rdar://problem/46820395>
3124
3125         Reviewed by Myles Maxfield.
3126
3127         Test: webgpu/pipeline-layouts.html
3128
3129         Implement the emtpy WebGPUPipelineLayout interface, and enable creation via WebGPUDevice::createPipelineLayout:
3130         * Modules/webgpu/WebGPUBindGroupLayout.cpp:
3131         (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
3132         * Modules/webgpu/WebGPUBindGroupLayout.h:
3133         (WebCore::WebGPUBindGroupLayout::bindGroupLayout const): Added getter.
3134         * Modules/webgpu/WebGPUDevice.cpp:
3135         (WebCore::WebGPUDevice::createPipelineLayout const): Added.
3136         * Modules/webgpu/WebGPUDevice.h:
3137         * Modules/webgpu/WebGPUDevice.idl: Enable createPipelineLayout.
3138         * Modules/webgpu/WebGPUPipelineLayout.cpp: Added.
3139         (WebCore::WebGPUPipelineLayout::create):
3140         (WebCore::WebGPUPipelineLayout::WebGPUPipelineLayout):
3141         * Modules/webgpu/WebGPUPipelineLayout.h: Added.
3142         * Modules/webgpu/WebGPUPipelineLayout.idl: Added.
3143         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.h: Added.
3144         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl: Added.
3145         * platform/graphics/gpu/GPUDevice.cpp:
3146         (WebCore::GPUDevice::createPipelineLayout const): Added.
3147         * platform/graphics/gpu/GPUDevice.h:
3148         * platform/graphics/gpu/GPUPipelineLayout.cpp: Added.
3149         (WebCore::GPUPipelineLayout::create):
3150         (WebCore::GPUPipelineLayout::GPUPipelineLayout):
3151         * platform/graphics/gpu/GPUPipelineLayout.h: Added.
3152         * platform/graphics/gpu/GPUPipelineLayoutDescriptor.h: Added.
3153
3154         Add files and symbols to project:
3155         * CMakeLists.txt:
3156         * DerivedSources.make:
3157         * Sources.txt:
3158         * WebCore.xcodeproj/project.pbxproj:
3159         * bindings/js/WebCoreBuiltinNames.h:
3160
3161         Add missing include:
3162         * Modules/webgpu/WebGPUQueue.h:
3163
3164 2018-12-18  Ryosuke Niwa  <rniwa@webkit.org>
3165
3166         SVGUseElement::findTarget should return nullptr when there is a cycle
3167         https://bugs.webkit.org/show_bug.cgi?id=192840
3168
3169         Reviewed by Tim Horton.
3170
3171         r233366 added an early return to updateShadowTree() when there is a cycle between an use element and its target.
3172         Consolidate this cycle detection code with the one in SVGUseElement::findTarget which detected cycles when
3173         the SVG use element itself had a corresponding element.
3174
3175         No new tests since there should be no behavioral change.
3176
3177         * svg/SVGUseElement.cpp:
3178         (WebCore::SVGUseElement::updateShadowTree):
3179         (WebCore::SVGUseElement::findTarget const):
3180
3181 2018-12-19  Myles C. Maxfield  <mmaxfield@apple.com>
3182
3183         [WHLSL] Add a handwritten lexer
3184         https://bugs.webkit.org/show_bug.cgi?id=192294
3185
3186         Reviewed by Jon Lee.
3187
3188         This is infrastructure necessary for https://bugs.webkit.org/show_bug.cgi?id=192355. The
3189         implementation matches the lexing rules in the spec (specifically, the rules that start
3190         with an uppercase letter). The spec is at
3191         https://github.com/gpuweb/WHLSL/blob/master/Spec/WHLSL.g4.
3192
3193         This patch also modifies the lexer according to https://github.com/gpuweb/WHLSL/pull/283.
3194
3195         No new tests because the lexer isn't hooked up yet; there are tests in the parser,
3196         once that gets committed.
3197
3198         * Modules/webgpu/WHLSL/WHLSLLexer.cpp: Added.
3199         (WebCore::WHLSL::Lexer::Token::typeName):
3200         (WebCore::WHLSL::Lexer::recognizeKeyword):
3201         (WebCore::WHLSL::Lexer::consumeTokenFromStream):
3202         (WebCore::WHLSL::Lexer::skipWhitespaceAndComments):
3203         (WebCore::WHLSL::isWhitespace):
3204         (WebCore::WHLSL::isNewline):
3205         (WebCore::WHLSL::Lexer::skipWhitespace):
3206         (WebCore::WHLSL::Lexer::skipLineComment):
3207         (WebCore::WHLSL::Lexer::skipLongComment):
3208         (WebCore::WHLSL::Lexer::coreDecimalIntLiteral const):
3209         (WebCore::WHLSL::Lexer::decimalIntLiteral const):
3210         (WebCore::WHLSL::Lexer::decimalUintLiteral const):
3211         (WebCore::WHLSL::isHexadecimalCharacter):
3212         (WebCore::WHLSL::Lexer::coreHexadecimalIntLiteral const):
3213         (WebCore::WHLSL::Lexer::hexadecimalIntLiteral const):
3214         (WebCore::WHLSL::Lexer::hexadecimalUintLiteral const):
3215         (WebCore::WHLSL::Lexer::intLiteral const):
3216         (WebCore::WHLSL::Lexer::uintLiteral const):
3217         (WebCore::WHLSL::Lexer::digit const):
3218         (WebCore::WHLSL::Lexer::digitStar const):
3219         (WebCore::WHLSL::Lexer::character const):
3220         (WebCore::WHLSL::Lexer::coreFloatLiteralType1 const):
3221         (WebCore::WHLSL::Lexer::coreFloatLiteral const):
3222         (WebCore::WHLSL::Lexer::floatLiteral const):
3223         (WebCore::WHLSL::Lexer::validIdentifier const):
3224         (WebCore::WHLSL::Lexer::identifier const):
3225         (WebCore::WHLSL::Lexer::operatorName const):
3226         * Modules/webgpu/WHLSL/WHLSLLexer.h: Added.
3227         (WebCore::WHLSL::Lexer::Lexer):
3228         (WebCore::WHLSL::Lexer::consumeToken):
3229         (WebCore::WHLSL::Lexer::unconsumeToken):
3230         (WebCore::WHLSL::Lexer::state const):
3231         (WebCore::WHLSL::Lexer::setState):
3232         (WebCore::WHLSL::Lexer::isFullyConsumed const):
3233         (WebCore::WHLSL::Lexer::errorString):
3234         (WebCore::WHLSL::Lexer::string const):
3235         (WebCore::WHLSL::Lexer::anyCharacter const):
3236         * Sources.txt:
3237         * WebCore.xcodeproj/project.pbxproj:
3238
3239 2018-12-18  Simon Fraser  <simon.fraser@apple.com>
3240
3241         Web Inspector: Timelines: correctly label Intersection Observer callbacks
3242         https://bugs.webkit.org/show_bug.cgi?id=192669
3243         <rdar://problem/46702490>
3244
3245         Reviewed by Joseph Pecoraro.
3246
3247         Add InspectorInstrumentation::willFireObserverCallback() and use it to wrap calls
3248         to Intersection Observer, Performance Observer and Mutation Observer callbacks so 
3249         that they get correctly labeled in the Inspector timeline.
3250
3251         * dom/MutationObserver.cpp:
3252         (WebCore::MutationObserver::deliver):
3253         * en.lproj/Localizable.strings:
3254         * inspector/InspectorInstrumentation.cpp:
3255         (WebCore::InspectorInstrumentation::willFireObserverCallbackImpl):
3256         (WebCore::InspectorInstrumentation::didFireObserverCallbackImpl):
3257         * inspector/InspectorInstrumentation.h:
3258         (WebCore::InspectorInstrumentation::willFireObserverCallback):
3259         (WebCore::InspectorInstrumentation::didFireObserverCallback):
3260         * inspector/TimelineRecordFactory.cpp:
3261         (WebCore::TimelineRecordFactory::createObserverCallbackData):
3262         * inspector/TimelineRecordFactory.h:
3263         * inspector/agents/InspectorTimelineAgent.cpp:
3264         (WebCore::InspectorTimelineAgent::willFireObserverCallback):
3265         (WebCore::InspectorTimelineAgent::didFireObserverCallback):
3266         (WebCore::toProtocol):
3267         * inspector/agents/InspectorTimelineAgent.h:
3268         * page/IntersectionObserver.cpp:
3269         (WebCore::IntersectionObserver::notify):
3270         * page/PerformanceObserver.cpp:
3271         (WebCore::PerformanceObserver::deliver):
3272
3273 2018-12-19  Claudio Saavedra  <csaavedra@igalia.com>
3274
3275         ContentExtensions: DFANode.cpp:66:44: error: narrowing conversion of '-1' from 'int' to 'char' inside { }
3276         https://bugs.webkit.org/show_bug.cgi?id=192854
3277
3278         Reviewed by Alex Christensen.
3279
3280         * contentextensions/DFANode.h: Define CharRange's chars as signed
3281
3282 2018-12-19  Youenn Fablet  <youenn@apple.com>
3283
3284         Remove RTCRtpTransceiver.setDirection
3285         https://bugs.webkit.org/show_bug.cgi?id=192869
3286
3287         Reviewed by Alex Christensen.
3288
3289         Covered by rebased test.
3290
3291         * Modules/mediastream/RTCRtpTransceiver.idl:
3292
3293 2018-12-19  Jer Noble  <jer.noble@apple.com>
3294
3295         Force synchronous decode in WebCoreDecompressionSession::decodeSampleSync()
3296         https://bugs.webkit.org/show_bug.cgi?id=192856
3297         <rdar://problem/46843245>
3298
3299         Reviewed by Alex Christensen.
3300
3301         Some decoders exposed through VideoToolbox will decode asynchronously even when 
3302         kVTDecodeInfo_Asynchronous is not set. Force synchronous behavior with a Semaphore.
3303
3304         * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
3305         (WebCore::WebCoreDecompressionSession::decodeSampleSync):
3306
3307 2018-12-19  Megan Gardner  <megan_gardner@apple.com>
3308
3309         Allow clients to set the navigator platform
3310         https://bugs.webkit.org/show_bug.cgi?id=192735
3311
3312         Reviewed by Tim Horton.
3313
3314         Expanded TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm.
3315
3316         Lots of piping to allow the setting of a custom navigator platform.
3317
3318         * loader/DocumentLoader.h:
3319         (WebCore::DocumentLoader::setCustomNavigatorPlatform):
3320         (WebCore::DocumentLoader::customNavigatorPlatform const):
3321         * loader/FrameLoader.cpp:
3322         (WebCore::FrameLoader::navigatorPlatform const):
3323         * loader/FrameLoader.h:
3324         * page/Navigator.cpp:
3325         (WebCore::Navigator::platform const):
3326         * page/Navigator.h:
3327         * page/NavigatorBase.cpp:
3328         (WebCore::NavigatorBase::platform const):
3329         (WebCore::NavigatorBase::platform): Deleted.
3330         * page/NavigatorBase.h:
3331
3332 2018-12-19  Ryan Haddad  <ryanhaddad@apple.com>
3333
3334         Unreviewed, rolling out r239347.
3335
3336         Caused the leaks bot to hit an exception and the new test
3337         crashes on certain configurations.
3338
3339         Reverted changeset:
3340
3341         "Synchronous media query evaluation could destroy current
3342         Frame/FrameView."
3343         https://bugs.webkit.org/show_bug.cgi?id=192781
3344         https://trac.webkit.org/changeset/239347
3345
3346 2018-12-19  Truitt Savell  <tsavell@apple.com>
3347
3348         Unreviewed, rolling out r239358.
3349
3350         Revision caused imported/w3c/web-platform-tests/IndexedDB/ to
3351         crash on Debug bots
3352
3353         Reverted changeset:
3354
3355         "Clean up IndexedDB files between tests"
3356         https://bugs.webkit.org/show_bug.cgi?id=192796
3357         https://trac.webkit.org/changeset/239358
3358
3359 2018-12-19  Don Olmstead  <don.olmstead@sony.com>
3360
3361         Sync some include directories in WebCore
3362         https://bugs.webkit.org/show_bug.cgi?id=192819
3363
3364         Reviewed by Michael Catanzaro.
3365
3366         Added missing include directories around features that have only been enabled on
3367         Apple ports. Removes obsolete directories from list and moves harfbuzz directories
3368         into the freetype cmake file.
3369
3370         * CMakeLists.txt:
3371         * platform/FreeType.cmake:
3372
3373 2018-12-19  Alicia Boya García  <aboya@igalia.com>
3374
3375         [MSE] Remove unused method: stopAskingForMoreSamples()
3376         https://bugs.webkit.org/show_bug.cgi?id=192754
3377
3378         Reviewed by Xabier Rodriguez-Calvar.
3379
3380         The stopAskingForMoreSamples() method from SourceBufferPrivate is not
3381         being used by anyone. SourceBuffer is not calling it and no
3382         SourceBufferPrivate is implementing it. Let's remove that noise.
3383
3384         * platform/graphics/SourceBufferPrivate.h:
3385         (WebCore::SourceBufferPrivate::setActive):
3386         (WebCore::SourceBufferPrivate::stopAskingForMoreSamples): Deleted.
3387         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
3388         (WebCore::SourceBufferPrivateGStreamer::stopAskingForMoreSamples): Deleted.
3389         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
3390
3391 2018-12-19  Alicia Boya García  <aboya@igalia.com>
3392
3393         [MSE] Remove dead code: sourceBufferPrivateSeekToTime()
3394         https://bugs.webkit.org/show_bug.cgi?id=192827
3395
3396         Reviewed by Xabier Rodriguez-Calvar.
3397
3398         This patch makes two dead code removal changes in
3399         SourceBufferPrivateClient:
3400
3401         First, sourceBufferPrivateFastSeekTimeForMediaTime() is made pure
3402         virtual in SourceBufferPrivateClient. Since SourceBufferPrivateClient
3403         is only inherited by SourceBuffer, it makes no sense to have default
3404         implementations there (they will never be used), moreso it being a
3405         client interface.
3406
3407         Second, sourceBufferPrivateSeekToTime() is removed entirely. It used
3408         to had an empty implementation, which SourceBuffer did not overwrite,
3409         therefore making any calls to it useless.
3410
3411         All calls to sourceBufferPrivateSeekToTime() have been removed:
3412
3413         SourceBufferPrivateAVFObjC::seekToTime(), which was also dead code
3414         itself, used to call this method. This patch deletes it completely.
3415
3416         MockSourceBufferPrivate::seekToTime(), which only called this empty
3417         method, has also been removed along with its only usage in
3418         MockMediaSourcePrivate::seekToTime().
3419
3420         * platform/graphics/SourceBufferPrivateClient.h:
3421         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateFastSeekTimeForMediaTime): Deleted.
3422         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateSeekToTime): Deleted.
3423         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
3424         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3425         (WebCore::SourceBufferPrivateAVFObjC::seekToTime): Deleted.
3426         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
3427         (WebCore::MockMediaSourcePrivate::seekToTime):
3428         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
3429         (WebCore::MockSourceBufferPrivate::seekToTime): Deleted.
3430         * platform/mock/mediasource/MockSourceBufferPrivate.h:
3431
3432 2018-12-19  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3433
3434         [EME] MediaKeySystemConfiguration distinctiveIdentifier and persistentState should default to optional
3435         https://bugs.webkit.org/show_bug.cgi?id=192815
3436
3437         Reviewed by Jer Noble.
3438
3439         https://www.w3.org/TR/encrypted-media/#dom-mediakeysystemconfiguration
3440         says that distinctiveIdentifier and persistentState default to
3441         optional. Our implementation does not define a default leaving it
3442         to the first option of the enum, which currently is Required.
3443
3444         * platform/encryptedmedia/CDMKeySystemConfiguration.h:
3445
3446 2018-12-19  Rob Buis  <rbuis@igalia.com>
3447
3448         Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
3449         https://bugs.webkit.org/show_bug.cgi?id=192288
3450
3451         Reviewed by Frédéric Wang.
3452
3453         Prefer return value to out parameter for parseAccessControlAllowList.
3454
3455         * loader/CrossOriginPreflightResultCache.cpp:
3456         (WebCore::CrossOriginPreflightResultCacheItem::parse):
3457         * platform/network/HTTPParsers.h:
3458         (WebCore::parseAccessControlAllowList):
3459         * platform/network/ResourceResponseBase.cpp:
3460         (WebCore::ResourceResponseBase::filter):
3461         (WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):
3462
3463 2018-12-18  Zan Dobersek  <zdobersek@igalia.com>
3464
3465         REGRESSION(r235165): [GTK][WPE] Garbled rendering on GitLab
3466         https://bugs.webkit.org/show_bug.cgi?id=192230
3467
3468         Reviewed by Carlos Garcia Campos.
3469
3470         Single tile can after r235165 be assigned multiple content updates
3471         without a commit occurring between each update, whereas before these
3472         commits were done for each update.
3473
3474         To avoid repeating updates for a single tile purging information about
3475         the previous update, these updates are now accumulated inside a Vector
3476         and then iterated over during the commit phase.
3477
3478         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
3479         (WebCore::CoordinatedBackingStoreTile::addUpdate):
3480         (WebCore::CoordinatedBackingStoreTile::swapBuffers):
3481         (WebCore::CoordinatedBackingStore::updateTile):
3482         (WebCore::CoordinatedBackingStoreTile::setBackBuffer): Deleted.
3483         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
3484         (WebCore::CoordinatedBackingStoreTile::scale const):
3485
3486 2018-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
3487
3488         [iOS] A copied text selection is pasted as a web archive attachment in the entry view in Messages
3489         https://bugs.webkit.org/show_bug.cgi?id=192842
3490         <rdar://problem/46823586>
3491
3492         Reviewed by Tim Horton.
3493
3494         Temporarily revert a behavior change introduced by r238661, where we now add "com.apple.webarchive" as a
3495         registered UTI when dragging or copying a text selection. This broke the Messages app on iOS, which currently
3496         inserts a copied or dragged text selection from WebKit-based views as a web archive file attachment. A fix for
3497         this is internally tracked in <rdar://problem/46830277>.
3498
3499         * platform/ios/PlatformPasteboardIOS.mm:
3500         (WebCore::PlatformPasteboard::write):
3501
3502 2018-12-18  Michael Catanzaro  <mcatanzaro@igalia.com>
3503
3504         Unreviewed, add a missing UNUSED_PARAM()
3505
3506         * Modules/mediarecorder/MediaRecorder.cpp:
3507         (WebCore::MediaRecorder::getPrivateImpl):
3508
3509 2018-12-18  Justin Michaud  <justin_michaud@apple.com>
3510
3511         Update CSS Properties and Values API to use new cycle fallback behaviour
3512         https://bugs.webkit.org/show_bug.cgi?id=192800
3513
3514         Reviewed by Antti Koivisto.
3515
3516         Make CSS variables that are registered and involved in a cycle be treated as invalid. This also fixes a crash in the
3517         wpt tests where relative units and calc() in a registered property's initial value would break things instead of failing. 
3518
3519         * css/CSSCustomPropertyValue.h:
3520         * css/CSSVariableReferenceValue.cpp:
3521         (WebCore::resolveVariableReference):
3522         * css/DOMCSSRegisterCustomProperty.cpp:
3523         (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
3524         * css/StyleResolver.cpp:
3525         (WebCore::StyleResolver::applyCascadedCustomProperty):
3526         * css/parser/CSSPropertyParser.cpp:
3527         (WebCore::CSSPropertyParser::parseTypedCustomPropertyValue):
3528
3529 2018-12-18  Daniel Bates  <dabates@apple.com>
3530
3531         Wrong value for key property in keydown and keyup events generated holding Control key
3532         https://bugs.webkit.org/show_bug.cgi?id=192788
3533         <rdar://problem/46795214>
3534
3535         Reviewed by Wenson Hsieh.
3536
3537         Similar to what we do on Mac, compute the DOM key property from the characters ignoring
3538         modifier keys input string when the Control key is held down.
3539
3540         * platform/ios/PlatformEventFactoryIOS.mm:
3541         (WebCore::keyForKeyEvent):
3542         * platform/mac/PlatformEventFactoryMac.mm:
3543         (WebCore::keyForKeyEvent):
3544
3545 2018-12-18  Sihui Liu  <sihui_liu@apple.com>
3546
3547         Clean up IndexedDB files between tests
3548         https://bugs.webkit.org/show_bug.cgi?id=192796
3549
3550         Reviewed by Geoffrey Garen.
3551
3552         We should clean up the IndexedDB files between tests to make sure each test is independent of others.
3553
3554         This patch also fixes some issues in IDB.
3555
3556         Covered by existing tests.
3557
3558         * Modules/indexeddb/server/IDBServer.cpp:
3559         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
3560         We should shut down all open databases instead of databases from open database connections before deleting 
3561         files, because database starts accessing files before connection to database is established.
3562
3563         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3564         (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
3565         We should shutdown database after tasks in queue are completed, because tasks have pointer of UniqueIDBDatabase 
3566         and UniqueIDBDatabase can be destructed after shutdown.
3567
3568         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
3569         didDeleteBackingStore can be posted to main thread after immediateCloseForUserDelete, and timer should not be 
3570         invoked during the hard close.
3571
3572         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
3573         Tasks like didOpenBackingStore could be posted from database thread to main thread after 
3574         immediateCloseForUserDelete, but we know the backing store will be deleted soon, so no need to handle any 
3575         database operation. 
3576
3577         (WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):
3578         performPrefetchCursor needs to be aware of whether UniqueIDBDatabase is being closed, so that it will not access 
3579         m_backingStore when m_backingStore may already be deleted. 
3580
3581         (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
3582         immediateCloseForUserDelete does not handle transactions that are in the process of commit or abort. 
3583         m_objectStoreTransactionCounts and m_objectStoreWriteTransactions may be used by those transactions in 
3584         transactionCompleted, so they do not need to be cleared here.
3585
3586 2018-12-18  Myles C. Maxfield  <mmaxfield@apple.com>
3587
3588         Thick overlines and line-throughs grow in the wrong direction
3589         https://bugs.webkit.org/show_bug.cgi?id=192264
3590
3591         Reviewed by Dean Jackson.
3592
3593         Overlines should grow upward, and line-throughs should stay centered.
3594
3595         Test: fast/css3-text/css3-text-decoration/text-decoration-thicknes-overline-grow-direction.html
3596
3597         * rendering/TextDecorationPainter.cpp:
3598         (WebCore::TextDecorationPainter::paintTextDecoration):
3599         * style/InlineTextBoxStyle.cpp:
3600         (WebCore::visualOverflowForDecorations):
3601
3602 2018-12-18  Ryosuke Niwa  <rniwa@webkit.org>
3603
3604         Some iOS app crash in FrameLoader::checkCompleted
3605         https://bugs.webkit.org/show_bug.cgi?id=192804
3606         <rdar://problem/44240573>
3607
3608         Reviewed by Tim Horton.
3609
3610         It's possible for the main thread to call into WebCore / UIWebView selectors while Web thread
3611         is trying to send a delegate message. Disable the release assertion while this is happening
3612         so that iOS app would not crash.
3613
3614         Unfortunately no new test as there is no way to easily test UIWebView in iOS,
3615         and this requires a race between the web thread & the main thread.
3616
3617         * dom/ScriptDisallowedScope.h:
3618         (WebCore::ScriptDisallowedScope::InMainThread::isScriptAllowed):
3619         * platform/ios/wak/WebCoreThread.h:
3620         * platform/ios/wak/WebCoreThread.mm:
3621         (WebThreadDelegateMessageScope::WebThreadDelegateMessageScope):
3622         (WebThreadDelegateMessageScope::~WebThreadDelegateMessageScope):
3623         (SendDelegateMessage):
3624
3625 2018-12-18  David Kilzer  <ddkilzer@apple.com>
3626
3627         clang-tidy: Use const reference for MediaTime parameter to prevent object copy
3628         <https://webkit.org/b/192814>
3629
3630         Reviewed by Mark Lam.
3631
3632         * bindings/js/JSDOMConvertNumbers.h:
3633         (WebCore::JSConverter<IDLUnrestrictedDouble>::convert):
3634
3635 2018-12-18  Justin Fan  <justin_fan@apple.com>
3636
3637         [WebGPU] BindGroupLayout and Device::createBindGroupLayout
3638         https://bugs.webkit.org/show_bug.cgi?id=192817
3639
3640         Reviewed by Dean Jackson.
3641
3642         Update bind-group-layouts to test new functionality.
3643
3644         Implement the emtpy WebGPUBindGroupLayout interface, and enable creation via WebGPUDevice::createBindGroupLayout:
3645         * Modules/webgpu/WebGPUBindGroupLayout.cpp: Added.
3646         (WebCore::WebGPUBindGroupLayout::create):
3647         (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
3648         * Modules/webgpu/WebGPUBindGroupLayout.h: Added.
3649         * Modules/webgpu/WebGPUBindGroupLayout.idl: Added. Empty interface for now.
3650         * Modules/webgpu/WebGPUDevice.cpp:
3651         (WebCore::WebGPUDevice::createBindGroupLayout const): Added.
3652         * Modules/webgpu/WebGPUDevice.h:
3653         * Modules/webgpu/WebGPUDevice.idl:
3654         * platform/graphics/gpu/GPUBindGroupLayout.cpp: Added.
3655         (WebCore::GPUBindGroupLayout::tryCreate):
3656         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
3657         * platform/graphics/gpu/GPUBindGroupLayout.h: Added.
3658         * platform/graphics/gpu/GPUDevice.cpp:
3659         (WebCore::GPUDevice::tryCreateBindGroupLayout const): Added.
3660         * platform/graphics/gpu/GPUDevice.h:
3661
3662         Add files and symbols to project:
3663         * CMakeLists.txt:
3664         * DerivedSources.make:
3665         * Sources.txt:
3666         * WebCore.xcodeproj/project.pbxproj:
3667         * bindings/js/WebCoreBuiltinNames.h:
3668
3669         Missing includes that were previously provided via UnifiedSources:
3670         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
3671         * platform/sql/SQLiteFileSystem.h:
3672
3673 2018-12-18  Youenn Fablet  <youenn@apple.com>
3674
3675         Make ReadableStreamXX constructs use PrivateIdentifier
3676         https://bugs.webkit.org/show_bug.cgi?id=192771
3677
3678         Reviewed by Chris Dumez.
3679
3680         PrivateIdentifier is a better name for making sure a given construct does not show up in the global scope.
3681         Covered by existing binding tests.
3682
3683         * Modules/streams/ReadableByteStreamController.idl:
3684         * Modules/streams/ReadableStreamBYOBReader.idl:
3685         * Modules/streams/ReadableStreamBYOBRequest.idl:
3686         * Modules/streams/ReadableStreamDefaultController.idl:
3687         * Modules/streams/ReadableStreamDefaultReader.idl:
3688         * bindings/scripts/CodeGeneratorJS.pm:
3689         (NeedsConstructorProperty):
3690         * bindings/scripts/preprocess-idls.pl:
3691         (shouldExposeInterface):
3692         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: Removed.
3693         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: Removed.
3694         * bindings/scripts/test/TestCustomConstructor.idl: Removed.
3695
3696 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3697
3698         Synchronous media query evaluation could destroy current Frame/FrameView.
3699         https://bugs.webkit.org/show_bug.cgi?id=192781
3700         <rdar://problem/34416793>
3701
3702         Reviewed by Chris Dumez.
3703
3704         Protect Frame and FrameView when coming back from printing and check if the current Frame/FrameView/FrameLoader objects are still valid.
3705
3706         Test: printing/print-with-media-query-destory.html
3707
3708         * loader/DocumentLoader.cpp:
3709         (WebCore::DocumentLoader::finishedLoading):
3710         * page/Frame.cpp:
3711         (WebCore::Frame::setPrinting):
3712         * page/FrameView.cpp:
3713         (WebCore::FrameView::forceLayoutForPagination):
3714
3715 2018-12-18  Joseph Pecoraro  <pecoraro@apple.com>
3716
3717         Web Inspector: m3u8 content not shown, it should be text
3718         https://bugs.webkit.org/show_bug.cgi?id=192731
3719         <rdar://problem/46747728>
3720
3721         Reviewed by Devin Rousso.
3722
3723         * inspector/NetworkResourcesData.cpp:
3724         (WebCore::NetworkResourcesData::setResourceContent):
3725         Don't clobber data if setting empty content on a resource that has content.
3726
3727         * inspector/agents/InspectorNetworkAgent.cpp:
3728         (WebCore::InspectorNetworkAgent::shouldTreatAsText):
3729         Additional non-"text/" mime types that can be treated as text.
3730
3731         * platform/MIMETypeRegistry.cpp:
3732         (WebCore::MIMETypeRegistry::isTextMediaPlaylistMIMEType):
3733         * platform/MIMETypeRegistry.h:
3734         Detect media playlist mime types that are text (m3u8/m3u).
3735
3736 2018-12-18  Daniel Bates  <dabates@apple.com>
3737
3738         Remove <meta http-equiv=set-cookie> support
3739         https://bugs.webkit.org/show_bug.cgi?id=185077
3740         <rdar://problem/41791397>
3741
3742         Reviewed by Brent Fulgham.
3743
3744         Remove support for the HTTP-equiv. pragma Set-Cookie to set a cookie. In <https://github.com/whatwg/html/pull/3649>
3745         the HTML living standard was ammended to define this pragma as no-op. Chrome and Edge have also
3746         removed support for this pragma and Firefox has an open bug to remove it.
3747
3748         * dom/Document.cpp:
3749         (WebCore::Document::processHttpEquiv): Emit a message that the Set-Cookie pragma is obsolete and
3750         was ignored instead of setting the cookie.
3751         * html/parser/XSSAuditor.cpp:
3752         (WebCore::isDangerousHTTPEquiv): We no longer need to consider the Set-Cookie pragma
3753         as dangerous and erase attribute http-equiv when we find it because we no longer honor
3754         this pragma.
3755
3756 2018-12-18  Justin Michaud  <justin_michaud@apple.com>
3757
3758         CSS Typed OM should expose attributeStyleMap
3759         https://bugs.webkit.org/show_bug.cgi?id=192671
3760
3761         Reviewed by Ryosuke Niwa.
3762
3763         Exposes element.attributeStyleMap, adds a stub for the StylePropertyMap class, and updates the existing
3764         TypedOMCSSImageValue to not require a RenderObject so that it can still work inside attributeStyleMap.
3765
3766         Test: css-typedom/attributeStyleMap.html
3767
3768         * CMakeLists.txt:
3769         * DerivedSources.make:
3770         * Sources.txt:
3771         * WebCore.xcodeproj/project.pbxproj:
3772         * bindings/js/WebCoreBuiltinNames.h:
3773         * css/ElementCSSInlineStyle.idl:
3774         * css/typedom/StylePropertyMap.h: Copied from Source/WebCore/css/typedom/StylePropertyMapReadOnly.h.
3775         * css/typedom/StylePropertyMap.idl: Copied from Source/WebCore/css/typedom/StylePropertyMapReadOnly.idl.
3776         * css/typedom/StylePropertyMapReadOnly.cpp: Added.
3777         (WebCore::StylePropertyMapReadOnly::reifyValue):
3778         (WebCore::StylePropertyMapReadOnly::customPropertyValueOrDefault):
3779         * css/typedom/StylePropertyMapReadOnly.h:
3780         (WebCore::StylePropertyMapReadOnly::create): Deleted.
3781         (WebCore::StylePropertyMapReadOnly::get const): Deleted.
3782         (WebCore::StylePropertyMapReadOnly::StylePropertyMapReadOnly): Deleted.
3783         * css/typedom/StylePropertyMapReadOnly.idl:
3784         * css/typedom/TypedOMCSSImageValue.h:
3785         * dom/Element.cpp:
3786         (WebCore::Element::attributeStyleMap):
3787         (WebCore::Element::setAttributeStyleMap):
3788         * dom/Element.h:
3789         * dom/ElementRareData.cpp:
3790         * dom/ElementRareData.h:
3791         (WebCore::ElementRareData::attributeStyleMap):
3792         (WebCore::ElementRareData::setAttributeStyleMap):
3793         * dom/StyledElement.cpp:
3794         (WebCore::StyledElement::ensureAttributeStyleMap):
3795         * dom/StyledElement.h:
3796         * html/canvas/CanvasRenderingContext2DBase.cpp:
3797         (WebCore::size):
3798         (WebCore::CanvasRenderingContext2DBase::drawImage):
3799         * platform/graphics/CustomPaintImage.cpp:
3800         (WebCore::extractComputedProperty):
3801         (WebCore::CustomPaintImage::doCustomPaint):
3802
3803 2018-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
3804
3805         Calling setValue() while typing should invoke -textDidChangeInTextField in the injected bundle
3806         https://bugs.webkit.org/show_bug.cgi?id=192785
3807         <rdar://problem/45321184>
3808
3809         Reviewed by Tim Horton.
3810
3811         Makes a minor adjustment in `TextFieldInputType::setValue` to consider value changes as "user editing", if we're
3812         currently processing a keystroke from the user. This is useful for certain private clients, such as Safari, that
3813         need to know when the user is typing in a text form control, but the page is preventing default text insertion
3814         behavior and instead updating values programmatically.
3815
3816         Test: fast/forms/call-text-did-change-in-text-field-when-typing.html
3817
3818         * html/TextFieldInputType.cpp:
3819         (WebCore::TextFieldInputType::setValue):
3820
3821 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3822
3823         [LFC][BFC][MarginCollapsing] Implement marginBeforeCollapsesWithParentMarginAfter
3824         https://bugs.webkit.org/show_bug.cgi?id=192801
3825
3826         Reviewed by Antti Koivisto.
3827
3828         * layout/blockformatting/BlockFormattingContext.h:
3829         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3830         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
3831         * layout/blockformatting/BlockMarginCollapse.cpp:
3832         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter):
3833
3834 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3835
3836         [LFC][BFC][MarginCollapsing] Implement marginAfterCollapsesWithSiblingMarginBeforeWithClearance
3837         https://bugs.webkit.org/show_bug.cgi?id=192799
3838
3839         Reviewed by Antti Koivisto.
3840
3841         * layout/blockformatting/BlockFormattingContext.h:
3842         * layout/blockformatting/BlockMarginCollapse.cpp:
3843         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance):
3844         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
3845
3846 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3847
3848         [LFC][BFC][MarginCollapsing] Implement marginAfterCollapsesWithParentMarginBefore
3849         https://bugs.webkit.org/show_bug.cgi?id=192798
3850
3851         Reviewed by Antti Koivisto.
3852
3853         * layout/blockformatting/BlockFormattingContext.h:
3854         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3855         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
3856         * layout/blockformatting/BlockMarginCollapse.cpp:
3857         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginAfterFromLastChild):
3858         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginBefore):
3859         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
3860         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter):
3861
3862 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3863
3864         [LFC][BFC][MarginCollapsing] Expand marginsCollapseThrough collapsing logic
3865         https://bugs.webkit.org/show_bug.cgi?id=192794
3866
3867         Reviewed by Antti Koivisto.
3868
3869         * layout/blockformatting/BlockFormattingContext.h:
3870         * layout/blockformatting/BlockMarginCollapse.cpp:
3871         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginsCollapseThrough):
3872         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBefore):
3873         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter):
3874
3875 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3876
3877         [LFC][BFC][MarginCollapsing] Expand marginAfterCollapsesWithNextSibling and marginBeforeCollapsesWithPreviousSibling collapsing logic
3878         https://bugs.webkit.org/show_bug.cgi?id=192791
3879
3880         Reviewed by Antti Koivisto.
3881
3882         * layout/blockformatting/BlockMarginCollapse.cpp:
3883         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithPreviousSibling):
3884         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithNextSibling):
3885
3886 2018-12-18  Zalan Bujtas  <zalan@apple.com>
3887
3888         [LFC][BFC][MarginCollapsing] Expand marginAfterCollapsesWithParentMarginAfter and marginBeforeCollapsesWithParentMarginBefore collapsing logic
3889         https://bugs.webkit.org/show_bug.cgi?id=192787
3890
3891         Reviewed by Antti Koivisto.
3892
3893         * layout/blockformatting/BlockFormattingContext.h:
3894         * layout/blockformatting/BlockMarginCollapse.cpp:
3895         (WebCore::Layout::hasClearance):
3896         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore):
3897         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance):
3898         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginBefore):
3899         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
3900
3901 2018-12-17  Fujii Hironori  <Hironori.Fujii@sony.com>
3902
3903         [Win][Clang] Fix compilation warnings WebCore/platform/graphics directory
3904         https://bugs.webkit.org/show_bug.cgi?id=192752
3905
3906         Reviewed by Don Olmstead.
3907
3908         No new tests, no behavior changes.
3909
3910         * platform/graphics/win/DIBPixelData.cpp:
3911         Enclosed bitmapType and bitmapPixelsPerMeter with #ifndef NDEBUG.
3912         * platform/graphics/win/FontPlatformDataWin.cpp:
3913         (WebCore::FontPlatformData::openTypeTable const): Use ASSERT_UNUSED instead of ASSERT.
3914         * platform/graphics/win/GraphicsContextWin.cpp: Removed unused variable 'deg2rad'.
3915         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3916         Removed unused soft links MFCreateSampleGrabberSinkActivate, MFCreateMemoryBuffer and MFCreateSample.
3917         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
3918         Reorder the initializer list.
3919         (WebCore::MediaPlayerPrivateMediaFoundation::seek): Use ASSERT_UNUSED instead of ASSERT.
3920         (WebCore::MediaPlayerPrivateMediaFoundation::setAllChannelVolumes): Ditto.
3921         (WebCore::MediaPlayerPrivateMediaFoundation::createSession): Ditto.
3922         (WebCore::MediaPlayerPrivateMediaFoundation::endSession): Ditto.
3923         (WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSource): Ditto.
3924         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame): Added default case.
3925         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
3926         (WebCore::Font::platformBoundsForGlyph const): Use inner braces to initialize subobjects of MAT2.
3927         * platform/graphics/win/SimpleFontDataWin.cpp: Removed unused 'cSmallCapsFontSizeMultiplier'.
3928         (WebCore::Font::initGDIFont): Use inner braces to initialize subobjects of MAT2.
3929         (WebCore::Font::boundsForGDIGlyph const): Ditto.
3930         (WebCore::Font::widthForGDIGlyph const): Ditto.
3931         * platform/graphics/win/UniscribeController.cpp:
3932         (WebCore::UniscribeController::UniscribeController):
3933         Reorder the initializer list.
3934         (WebCore::UniscribeController::offsetForPosition): Use parentheses to combine && and ||.
3935         (WebCore::UniscribeController::shapeAndPlaceItem): Removed unused 'glyphCount'.
3936
3937 2018-12-17  Eric Carlson  <eric.carlson@apple.com>
3938
3939         [MediaStream] A stream's first video frame should be rendered
3940         https://bugs.webkit.org/show_bug.cgi?id=192629
3941         <rdar://problem/46664353>
3942
3943         Reviewed by Youenn Fablet.
3944
3945         Test: fast/mediastream/media-stream-renders-first-frame.html
3946
3947         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
3948         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3949         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):
3950         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
3951         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode const):
3952         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode):
3953         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play):
3954         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState):
3955         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged):
3956         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack):
3957         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext):
3958         * platform/mediastream/RealtimeMediaSource.cpp:
3959         (WebCore::RealtimeMediaSource::size const):
3960         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3961         (WebCore::AVVideoCaptureSource::processNewFrame):
3962         * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
3963         (WebCore::RealtimeIncomingVideoSourceCocoa::processNewSample):
3964
3965 2018-12-17  Justin Michaud  <justin_michaud@apple.com>
3966
3967         Bindings generator should support Conditional= along with CachedAttribute
3968         https://bugs.webkit.org/show_bug.cgi?id=192721
3969
3970         Reviewed by Ryosuke Niwa.
3971
3972         Fix a bug where specifying both attributes causes compilation errors because the compile-time
3973         condition is not included in the derived code.
3974
3975         * bindings/scripts/CodeGeneratorJS.pm:
3976         (GenerateImplementation):
3977         * bindings/scripts/test/JS/JSTestObj.cpp:
3978         (WebCore::jsTestObjCachedAttribute3Getter):
3979         (WebCore::jsTestObjCachedAttribute3):
3980         (WebCore::JSTestObj::visitChildren):
3981         * bindings/scripts/test/JS/JSTestObj.h:
3982         * bindings/scripts/test/TestObj.idl:
3983
3984 2018-12