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