[EME] Push CDMFactory into the platform layer
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2017-08-04  Zan Dobersek  <zdobersek@igalia.com>
2
3         [EME] Push CDMFactory into the platform layer
4         https://bugs.webkit.org/show_bug.cgi?id=175129
5
6         Reviewed by Xabier Rodriguez-Calvar.
7
8         This is a follow-up to r219678 that moved the majority of CDM abstraction
9         classes into the platform layer, but missed the CDMFactory class.
10
11         The CDMFactory abstraction is now also placed in the platform layer. Only
12         change to the interface is that the createCDM() method can't accept a CDM
13         object reference anymore since that class is cemented into the WebCore
14         layer, and no current implementation used it anyway.
15
16         Additionally, the static Vector object of registered factories is moved
17         under the CDMFactory class, along with the register and unregister
18         functions. The platformRegisterFactories() function is added to allow for
19         platform-specific factory registrations to occur when the registered
20         factories are queried for the first time. Empty implementation for this
21         function is provided for non-GStreamer platforms, while for GStreamer
22         the implementation is kept in CDMFactoryGStreamer.cpp. It's still empty
23         for now, but it will register the ClearKey factory there in the near
24         future.
25
26         No new tests -- none affected, only refactoring.
27
28         * CMakeLists.txt:
29         * Modules/encryptedmedia/CDM.cpp:
30         (WebCore::createCDMPrivateForKeySystem):
31         (WebCore::CDM::supportsKeySystem):
32         (WebCore::CDM::CDM):
33         (): Deleted.
34         (WebCore::CDM::registerCDMFactory): Deleted.
35         (WebCore::CDM::unregisterCDMFactory): Deleted.
36         * Modules/encryptedmedia/CDM.h:
37         (WebCore::CDMFactory::~CDMFactory): Deleted.
38         * PlatformWPE.cmake:
39         * platform/GStreamer.cmake:
40         * platform/encryptedmedia/CDMFactory.cpp: Added.
41         (WebCore::CDMFactory::registerFactory):
42         (WebCore::CDMFactory::unregisterFactory):
43         (WebCore::CDMFactory::platformRegisterFactories):
44         * platform/encryptedmedia/CDMFactory.h: Added.
45         (WebCore::CDMFactory::~CDMFactory):
46         * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
47         (WebCore::CDMFactoryClearKey::createCDM):
48         * platform/encryptedmedia/clearkey/CDMClearKey.h:
49         * platform/encryptedmedia/gstreamer/CDMFactoryGStreamer.cpp: Added.
50         (WebCore::CDMFactory::platformRegisterFactories):
51         * testing/MockCDMFactory.cpp:
52         (WebCore::m_weakPtrFactory):
53         (WebCore::MockCDMFactory::unregister):
54         (WebCore::MockCDMFactory::createCDM):
55         * testing/MockCDMFactory.h:
56
57 2017-08-04  Frederic Wang  <fwang@igalia.com>
58
59         ScrollingTreeOverflowScrollingNodeIOS uses the wrong fixed position rectangle
60         https://bugs.webkit.org/show_bug.cgi?id=175135
61
62         Reviewed by Simon Fraser.
63
64         This patch modifies ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll so
65         that it uses the fixed position rectangle relative of the first frame ancestor instead of
66         the one of the main frame. This makes it consistent with ScrollingTreeFrameScrollingNodeIOS
67         and RenderLayerCompositor. This fixes some flickering issues on iOS.
68
69         Test: fast/scrolling/ios/fixed-inside-overflow-inside-iframe.html
70
71         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
72         (WebCore::ScrollingTreeFrameScrollingNode::fixedPositionRect): Helper function to get the
73         fixed position rect to use for that frame.
74         * page/scrolling/ScrollingTreeNode.cpp:
75         (WebCore::ScrollingTreeNode::enclosingFrameNode const): Helper function to get the enclosing
76         frame for this scrolling node or null if there is none.
77         * page/scrolling/ScrollingTreeNode.h: Declare enclosingFrameNode.
78
79 2017-08-04  Zan Dobersek  <zdobersek@igalia.com>
80
81         Unreviewed. Removing redundant NotImplemented.h header inclusions
82         and cleaning up whitespace issues in libgcrypt-specific CryptoKeyEC
83         and CryptoKeyRSA implementation files.
84
85         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
86         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
87
88 2017-08-04  Jeremy Jones  <jeremyj@apple.com>
89
90         Remove unnecesary call to status bar SPI.
91         https://bugs.webkit.org/show_bug.cgi?id=175176
92         rdar://problem/20887306
93
94         Reviewed by Darin Adler.
95
96         No new tests because no behavior change.
97
98         This removes an obsolete call to SPI.
99
100         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
101         (VideoFullscreenInterfaceAVKit::cleanupFullscreen):
102
103 2017-08-03  Zan Dobersek  <zdobersek@igalia.com>
104
105         [GCrypt] Implement CryptoKeyEC PKCS#8 imports
106         https://bugs.webkit.org/show_bug.cgi?id=173647
107
108         Reviewed by Jiewen Tan.
109
110         No new tests -- affected tests are now passing and are unskipped.
111
112         Implement libgcrypt-based support for PKCS#8 imports of EC keys.
113
114         Existing libtasn1 utilities are used to achieve this. First, the provided key data
115         is decoded against the PrivateKeyInfo ASN.1 definition. First, the version member
116         of that structure is validated, followed by the algorithm member. The latter is
117         also properly tested depending on this being an import of an ECDSA or ECDH key.
118
119         Data of the parameters member is decoded against the ECParameters ASN.1 definition,
120         and the namedCurve object identifier is validated, making sure it represents a
121         valid EC curve and that this curve maches the one specified for the import
122         operation.
123
124         Data of the privateKey member is decoded against the ECPrivateKey ASN.1 definition.
125         The version member of that structure is properly validated. The optional parameters
126         member of that structure is already decoded against the ECParameters ASN.1
127         definition. If present, it is checked to contain a valid EC curve identifier that
128         matches the specified curve.
129
130         The optional publicKey member of the ECPrivateKey structure is validated, testing
131         that its data matches in size an uncompressed EC point, and that the first byte
132         of this data is 0x04, as expected for an uncompressed EC point.
133
134         What's left is the private key data on the initial ECPrivateKey structure. That
135         data is retrieved and validated, making sure its size matches the size of the
136         specified curve. The `private-key` s-expression is then constructed, embedding
137         the curve name and the validated private key data. This s-expression is then used
138         to construct an EC context.
139
140         If the optional publicKey data was provided, it's used to set the `q` parameter
141         for this EC context. Otherwise, the value for `q` is computed on-the-fly for the
142         specified EC and the provided private key. The `q` point is then tested through
143         the gcry_mpi_ec_curve_point() function, making sure that the derived point is
144         indeed located on the given EC.
145
146         Finally, with the private key properly validated, a new CryptoKeyEC object is
147         constructed, using the `private-key` s-expression and the parameters that were
148         specified for this import operation.
149
150         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
151         (WebCore::CryptoKeyEC::platformImportPkcs8):
152         * crypto/gcrypt/GCryptUtilities.h:
153
154 2017-08-03  Chris Dumez  <cdumez@apple.com>
155
156         Fix parsing of <meta http-equiv=refresh> to allow time starting with a '.' without a leading 0
157         https://bugs.webkit.org/show_bug.cgi?id=175132
158
159         Reviewed by Darin Adler.
160
161         Fix parsing of <meta http-equiv=refresh> to allow time starting with a '.', without
162         a leading 0. This is as per https://github.com/whatwg/html/pull/2852.
163
164         The latest spec is at:
165         - https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh
166
167         Test: imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html
168
169         * html/parser/HTMLParserIdioms.cpp:
170         (WebCore::parseHTTPRefreshInternal):
171
172 2017-08-03  Brian Burg  <bburg@apple.com>
173
174         Remove ENABLE(WEB_SOCKET) guards
175         https://bugs.webkit.org/show_bug.cgi?id=167044
176
177         Reviewed by Joseph Pecoraro.
178
179         * Configurations/FeatureDefines.xcconfig:
180         * Modules/websockets/ThreadableWebSocketChannel.cpp:
181         * Modules/websockets/ThreadableWebSocketChannel.h:
182         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
183         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
184         * Modules/websockets/WebSocket.cpp:
185         * Modules/websockets/WebSocket.h:
186         * Modules/websockets/WebSocket.idl:
187         * Modules/websockets/WebSocketChannel.cpp:
188         * Modules/websockets/WebSocketChannel.h:
189         * Modules/websockets/WebSocketChannelClient.h:
190         * Modules/websockets/WebSocketDeflateFramer.cpp:
191         * Modules/websockets/WebSocketDeflateFramer.h:
192         * Modules/websockets/WebSocketDeflater.cpp:
193         * Modules/websockets/WebSocketDeflater.h:
194         * Modules/websockets/WebSocketExtensionDispatcher.cpp:
195         * Modules/websockets/WebSocketExtensionDispatcher.h:
196         * Modules/websockets/WebSocketExtensionParser.cpp:
197         * Modules/websockets/WebSocketExtensionParser.h:
198         * Modules/websockets/WebSocketExtensionProcessor.h:
199         * Modules/websockets/WebSocketFrame.cpp:
200         * Modules/websockets/WebSocketFrame.h:
201         * Modules/websockets/WebSocketHandshake.cpp:
202         * Modules/websockets/WebSocketHandshake.h:
203         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
204         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
205         * dom/Document.cpp:
206         (WebCore::Document::Document):
207         (WebCore::Document::idbConnectionProxy):
208         (WebCore::Document::socketProvider):
209         * dom/Document.h:
210         * dom/ScriptExecutionContext.h:
211         * inspector/InspectorInstrumentation.cpp:
212         (WebCore::InspectorInstrumentation::didSendWebSocketFrameImpl):
213         * inspector/InspectorInstrumentation.h:
214         (WebCore::InspectorInstrumentation::didSendWebSocketFrame):
215         * inspector/InspectorNetworkAgent.cpp:
216         * inspector/InspectorNetworkAgent.h:
217         * page/RuntimeEnabledFeatures.cpp:
218         (WebCore::RuntimeEnabledFeatures::webSocketEnabled const):
219         * page/RuntimeEnabledFeatures.h:
220         * page/SocketProvider.cpp:
221         * page/SocketProvider.h:
222         * workers/WorkerGlobalScope.cpp:
223         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
224         * workers/WorkerGlobalScope.h:
225         * workers/WorkerMessagingProxy.cpp:
226         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
227         * workers/WorkerThread.cpp:
228         (WebCore::WorkerThread::WorkerThread):
229         (WebCore::WorkerThread::socketProvider):
230         * workers/WorkerThread.h:
231
232 2017-08-03  Don Olmstead  <don.olmstead@sony.com>
233
234         Remove LayoutUnit dependency in TextStream
235         https://bugs.webkit.org/show_bug.cgi?id=175110
236
237         Reviewed by Zalan Bujtas.
238
239         No new tests. No change in behavior.
240
241         * CMakeLists.txt:
242         * WebCore.xcodeproj/project.pbxproj:
243         * platform/LayoutUnit.cpp: Added.
244         (WebCore::operator<<):
245         * platform/LayoutUnit.h:
246         * platform/text/TextStream.cpp:
247         * platform/text/TextStream.h:
248
249 2017-08-03  Jeremy Jones  <jeremyj@apple.com>
250
251         Improve WebKitLegacy video fullscreen animation begin and end rects.
252         https://bugs.webkit.org/show_bug.cgi?id=175152
253         rdar://problem/32840576
254
255         Reviewed by Eric Carlson.
256
257         No new tests, becuase this change has no effect on the DOM.
258
259         This change uses different rects for fullscreen animation to prevent the animation
260         from failing, and to improve the aesthetics of the animation.
261
262         * platform/mac/WebVideoFullscreenController.mm:
263         (frameExpandedToRatioOfFrame):
264         (-[WebVideoFullscreenController enterFullscreen:]):
265         (-[WebVideoFullscreenController exitFullscreen]):
266         (-[WebVideoFullscreenWindow animateFromRect:toRect:withSubAnimation:controllerAction:]):
267         (constrainFrameToRatioOfFrame): Deleted.
268
269 2017-08-03  Jer Noble  <jer.noble@apple.com>
270
271         [EME][Mac] SecureStop left on disk in Private Browsing mode.
272         https://bugs.webkit.org/show_bug.cgi?id=175162
273
274         Reviewed by Eric Carlson.
275
276         Return an empty string from mediaKeysStorageDirectory() when the page indicates that storage should
277         be ephemeral(). Previously, an empty string in this case would be treated as an error. Instead, treat
278         an empty string as valid, and do not try to store or retrieve session information to disk in that case.
279
280         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
281         (WebCore::WebKitMediaKeySession::mediaKeysStorageDirectory const):
282         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
283         (WebCore::CDMSessionAVContentKeySession::releaseKeys):
284         (WebCore::CDMSessionAVContentKeySession::update):
285         (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
286         (WebCore::CDMSessionAVContentKeySession::contentKeySession):
287         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
288         (WebCore::CDMSessionMediaSourceAVFObjC::storagePath const):
289
290 2017-08-03  Youenn Fablet  <youenn@apple.com>
291
292         [Fetch API] Add support for Request keepalive getter
293         https://bugs.webkit.org/show_bug.cgi?id=175151
294
295         Reviewed by Chris Dumez.
296
297         Test: imported/w3c/web-platform-tests/fetch/api/request/request-keepalive.html
298
299         Adding keepalive as a fetch option.
300         Adding initialization and getter of keepalive into FetchRequest.
301
302         * Modules/fetch/FetchRequest.cpp:
303         (WebCore::buildOptions):
304         * Modules/fetch/FetchRequest.h:
305         * Modules/fetch/FetchRequest.idl:
306         * loader/FetchOptions.h:
307
308 2017-08-03  Yoshiaki Jitsukawa  <jitsu@rd.scei.sony.co.jp>
309
310         [PAL] Move spi/cf directory into PAL
311         https://bugs.webkit.org/show_bug.cgi?id=175057
312
313         Reviewed by Antti Koivisto.
314
315         * WebCore.xcodeproj/project.pbxproj:
316         * loader/cocoa/DiskCacheMonitorCocoa.mm:
317         * loader/cocoa/SubresourceLoaderCocoa.mm:
318         * loader/mac/ResourceLoaderMac.mm:
319         * platform/cf/CoreMediaSoftLink.cpp:
320         * platform/cf/CoreMediaSoftLink.h:
321         * platform/mac/PluginBlacklist.mm:
322         * platform/mac/WebCoreNSStringExtras.mm:
323         * platform/mac/WebGLBlacklist.mm:
324         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
325         * platform/network/NetworkStorageSession.h:
326         * platform/network/cf/CookieJarCFNet.cpp:
327         * platform/network/cf/CredentialStorageCFNet.cpp:
328         * platform/network/cf/ResourceHandleCFNet.cpp:
329         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
330         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
331         * platform/network/cf/ResourceRequestCFNet.cpp:
332         * platform/network/cf/ResourceRequestCFNet.h:
333         * platform/network/cf/ResourceResponse.h:
334         * platform/network/cf/ResourceResponseCFNet.cpp:
335         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
336         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
337         * platform/network/cocoa/CookieStorageObserver.h:
338         * platform/network/cocoa/CredentialCocoa.h:
339         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
340         * platform/network/cocoa/ResourceRequestCocoa.mm:
341         * platform/network/cocoa/ResourceResponseCocoa.mm:
342         * platform/network/ios/ResourceRequestIOS.mm:
343         * platform/network/mac/CookieJarMac.mm:
344         * platform/network/mac/FormDataStreamMac.mm:
345         * platform/network/mac/ResourceHandleMac.mm:
346         * platform/network/mac/ResourceRequestMac.mm:
347         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
348         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
349         * platform/network/mac/WebCoreURLResponse.h:
350         * testing/cocoa/WebArchiveDumpSupport.mm:
351
352 2017-08-03  Youenn Fablet  <youenn@apple.com>
353
354         Remove FETCH_API compilation guard
355         https://bugs.webkit.org/show_bug.cgi?id=175154
356
357         Reviewed by Chris Dumez.
358
359         No change of behavior.
360
361         * Configurations/FeatureDefines.xcconfig:
362         * Modules/fetch/DOMWindowFetch.cpp:
363         * Modules/fetch/DOMWindowFetch.h:
364         * Modules/fetch/DOMWindowFetch.idl:
365         * Modules/fetch/FetchBody.cpp:
366         * Modules/fetch/FetchBody.h:
367         * Modules/fetch/FetchBody.idl:
368         * Modules/fetch/FetchBodyConsumer.cpp:
369         * Modules/fetch/FetchBodyConsumer.h:
370         * Modules/fetch/FetchBodyOwner.cpp:
371         * Modules/fetch/FetchBodyOwner.h:
372         * Modules/fetch/FetchHeaders.cpp:
373         * Modules/fetch/FetchHeaders.h:
374         * Modules/fetch/FetchHeaders.idl:
375         * Modules/fetch/FetchInternals.js:
376         * Modules/fetch/FetchLoader.cpp:
377         * Modules/fetch/FetchLoader.h:
378         * Modules/fetch/FetchLoaderClient.h:
379         * Modules/fetch/FetchRequest.cpp:
380         * Modules/fetch/FetchRequest.h:
381         * Modules/fetch/FetchRequest.idl:
382         * Modules/fetch/FetchResponse.cpp:
383         * Modules/fetch/FetchResponse.h:
384         * Modules/fetch/FetchResponse.idl:
385         * Modules/fetch/FetchResponse.js:
386         * Modules/fetch/FetchResponseSource.cpp:
387         * Modules/fetch/FetchResponseSource.h:
388         * Modules/fetch/WorkerGlobalScopeFetch.cpp:
389         * Modules/fetch/WorkerGlobalScopeFetch.h:
390         * Modules/fetch/WorkerGlobalScopeFetch.idl:
391         * page/RuntimeEnabledFeatures.h:
392         (WebCore::RuntimeEnabledFeatures::fetchAPIEnabled const):
393
394 2017-08-03  Devin Rousso  <drousso@apple.com>
395
396         Web Inspector: add button to open Inspector^2
397         https://bugs.webkit.org/show_bug.cgi?id=175108
398
399         Reviewed by Brian Burg.
400
401         This patch just exposes a function to the inspector page. No new functionality was added.
402
403         * inspector/InspectorFrontendHost.idl:
404         * inspector/InspectorFrontendHost.h:
405         * inspector/InspectorFrontendHost.cpp:
406         (WebCore::InspectorFrontendHost::inspectInspector):
407
408 2017-08-03  Matt Baker  <mattbaker@apple.com>
409
410         Web Inspector: Instrument WebGLProgram created/deleted
411         https://bugs.webkit.org/show_bug.cgi?id=175059
412
413         Reviewed by Devin Rousso.
414
415         Tests: inspector/canvas/shaderProgram-add-remove-webgl.html
416                inspector/canvas/shaderProgram-add-remove-webgl2.html
417
418         This patch adds instrumentation to WebGLRenderingContextBase for tracking
419         WebGLPrograms. A new helper class, InspectorShaderProgram, is used by
420         the CanvasAgent to hold related data.
421
422         * CMakeLists.txt:
423         * WebCore.xcodeproj/project.pbxproj:
424
425         * html/canvas/WebGLRenderingContextBase.cpp:
426         (WebCore::WebGLRenderingContextBase::createProgram):
427         (WebCore::WebGLRenderingContextBase::deleteProgram):
428
429         * inspector/InspectorCanvasAgent.cpp:
430         (WebCore::InspectorCanvasAgent::enable):
431         (WebCore::InspectorCanvasAgent::frameNavigated):
432         (WebCore::InspectorCanvasAgent::didCreateProgram):
433         (WebCore::InspectorCanvasAgent::willDeleteProgram):
434         (WebCore::InspectorCanvasAgent::clearCanvasData):
435         (WebCore::InspectorCanvasAgent::unbindCanvas):
436         (WebCore::InspectorCanvasAgent::unbindProgram):
437         (WebCore::InspectorCanvasAgent::assertInspectorProgram):
438         (WebCore::InspectorCanvasAgent::findInspectorProgram):
439         * inspector/InspectorCanvasAgent.h:
440
441         * inspector/InspectorInstrumentation.cpp:
442         (WebCore::InspectorInstrumentation::didCreateCSSCanvasImpl):
443         (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodesImpl):
444         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContextImpl):
445         (WebCore::InspectorInstrumentation::didChangeCanvasMemoryImpl):
446         (WebCore::InspectorInstrumentation::recordCanvasActionImpl):
447         (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrameImpl):
448         (WebCore::InspectorInstrumentation::didCreateProgramImpl):
449         (WebCore::InspectorInstrumentation::willDeleteProgramImpl):
450
451         * inspector/InspectorInstrumentation.h:
452         (WebCore::InspectorInstrumentation::recordCanvasActionImpl):
453         (WebCore::InspectorInstrumentation::didCreateCSSCanvas):
454         (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodes):
455         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContext):
456         (WebCore::InspectorInstrumentation::didChangeCanvasMemory):
457         (WebCore::InspectorInstrumentation::recordCanvasAction):
458         (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrame):
459         (WebCore::InspectorInstrumentation::didCreateProgram):
460         (WebCore::InspectorInstrumentation::willDeleteProgram):
461
462         * inspector/InspectorShaderProgram.cpp: Added.
463         (WebCore::InspectorShaderProgram::create):
464         (WebCore::InspectorShaderProgram::InspectorShaderProgram):
465         (WebCore::InspectorShaderProgram::context const):
466         * inspector/InspectorShaderProgram.h: Added.
467
468 2017-08-03  Matt Lewis  <jlewis3@apple.com>
469
470         Unreviewed, rolling out r220209.
471
472         This caused internal build failures.
473
474         Reverted changeset:
475
476         "Use MPAVRoutingController instead of deprecated versions."
477         https://bugs.webkit.org/show_bug.cgi?id=175063
478         http://trac.webkit.org/changeset/220209
479
480 2017-08-03  Brady Eidson  <beidson@apple.com>
481
482         Add SW IDLs and stub out basic functionality.
483         https://bugs.webkit.org/show_bug.cgi?id=175115
484
485         Reviewed by Chris Dumez.
486
487         No new tests (Currently no behavior change).
488
489         Overall note: This feature is EnabledAtRuntime as opposed to EnabledBySetting because
490         the Settings-based code generation is completely broken for non-Document contexts,
491         whereas the RuntimeEnabledFeatures-based generation is not.
492     
493         * CMakeLists.txt:
494         * Configurations/FeatureDefines.xcconfig:
495         * DerivedSources.make:
496         * WebCore.xcodeproj/project.pbxproj:
497
498         * bindings/scripts/preprocess-idls.pl: Handle the new global scope c'tor file.
499
500         * bindings/js/JSServiceWorkerContainerCustom.cpp: Added.
501         (WebCore::JSServiceWorkerContainer::ready const):
502
503         * bindings/js/JSWorkerGlobalScopeBase.cpp:
504         (WebCore::toJSWorkerGlobalScope): Refactor to handle both types of derived workers.
505         (WebCore::toJSServiceWorkerGlobalScope):
506         * bindings/js/JSWorkerGlobalScopeBase.h:
507
508         * dom/EventNames.h:
509         * dom/EventTargetFactory.in:
510
511         * features.json: Change status of feature.
512
513         * page/Navigator.idl:
514         * page/NavigatorBase.cpp:
515         (WebCore::NavigatorBase::serviceWorker):
516         * page/NavigatorBase.h:
517         * page/NavigatorServiceWorker.idl: Added.
518
519         * page/RuntimeEnabledFeatures.h:
520         (WebCore::RuntimeEnabledFeatures::serviceWorkerEnabled const):
521         (WebCore::RuntimeEnabledFeatures::setServiceWorkerEnabled):
522
523         * workers/ServiceWorker.cpp: Added.
524         (WebCore::ServiceWorker::postMessage):
525         (WebCore::ServiceWorker::~ServiceWorker):
526         (WebCore::ServiceWorker::scriptURL const):
527         (WebCore::ServiceWorker::state const):
528         (WebCore::ServiceWorker::eventTargetInterface const):
529         (WebCore::ServiceWorker::scriptExecutionContext const):
530         * workers/ServiceWorker.h: Added.
531         * workers/ServiceWorker.idl: Added.
532
533         * workers/ServiceWorkerContainer.cpp: Added.
534         (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
535         (WebCore::ServiceWorkerContainer::controller const):
536         (WebCore::ServiceWorkerContainer::ready):
537         (WebCore::ServiceWorkerContainer::addRegistration):
538         (WebCore::ServiceWorkerContainer::getRegistration):
539         (WebCore::ServiceWorkerContainer::getRegistrations):
540         (WebCore::ServiceWorkerContainer::startMessages):
541         (WebCore::ServiceWorkerContainer::eventTargetInterface const):
542         (WebCore::ServiceWorkerContainer::scriptExecutionContext const):
543         * workers/ServiceWorkerContainer.h: Added.
544         * workers/ServiceWorkerContainer.idl: Added.
545
546         * workers/ServiceWorkerGlobalScope.cpp: Added.
547         (WebCore::ServiceWorkerGlobalScope::registration):
548         (WebCore::ServiceWorkerGlobalScope::skipWaiting):
549         * workers/ServiceWorkerGlobalScope.h: Added.
550         * workers/ServiceWorkerGlobalScope.idl: Added.
551
552         * workers/ServiceWorkerRegistration.cpp: Added.
553         (WebCore::ServiceWorkerRegistration::~ServiceWorkerRegistration):
554         (WebCore::ServiceWorkerRegistration::installing):
555         (WebCore::ServiceWorkerRegistration::waiting):
556         (WebCore::ServiceWorkerRegistration::active):
557         (WebCore::ServiceWorkerRegistration::scope const):
558         (WebCore::ServiceWorkerRegistration::update):
559         (WebCore::ServiceWorkerRegistration::unregister):
560         (WebCore::ServiceWorkerRegistration::eventTargetInterface const):
561         (WebCore::ServiceWorkerRegistration::scriptExecutionContext const):
562         * workers/ServiceWorkerRegistration.h: Added.
563         * workers/ServiceWorkerRegistration.idl: Added.
564
565 2017-08-03  Yoshiaki Jitsukawa  <jitsu@rd.scei.sony.co.jp>
566
567         [WebCore] Sort Xcode project files
568         https://bugs.webkit.org/show_bug.cgi?id=175121
569
570         Reviewed by Antti Koivisto.
571
572         * WebCore.xcodeproj/project.pbxproj:
573
574 2017-08-02  Sam Weinig  <sam@webkit.org>
575
576         [WebIDL] Convert MutationCallback to be a normal generated callback
577         https://bugs.webkit.org/show_bug.cgi?id=174140
578
579         Reviewed by Darin Adler.
580
581         To make this work more nicely, I:
582         - Added the ability to for non-nullable interfaces in sequences to be passed
583           via a Ref<> rather than a RefPtr<> as a parameter to a callback function.
584           (e.g. callback MyCallback = void (sequence<Foo> foos) will now have the 
585           signature, CallbackResult<void> handleEvent(const Vector<Ref<Foo>>&) rather
586           than CallbackResult<void> handleEvent(const Vector<RefPtr<Foo>>&).
587         - Added a new extended attribute for callback functions called [CallbackThisObject=Type]
588           which allows you to specify that the callback needs a this object in addition
589           to its arguments. When specified, the first argument of the C++ implementation
590           function will now correspond to the this object, with the remaining arguments
591           shifted over one.
592         - Converted callback objects to all inherit directly from ActiveDOMCallback rather
593           than having the generated JS callback derived class inherit from it. This allows
594           us to have access to a callback's canInvokeCallback() function anywhere (needed
595           for MutationCallback) as well as giving a place to put an optional virtual 
596           visitJSFunction to allow marking weak callbacks (while not an ideal layering, 
597           this matches what we do in EventListener). This change requires each callback to
598           have a bit more code to import the ActiveDOMCallback's constructor and requires
599           non-JS derived callbacks to pass a ScriptExecutionContext (e.g. the Document).
600
601         * CMakeLists.txt:
602         * DerivedSources.make:
603         * WebCore.xcodeproj/project.pbxproj:
604         * bindings/js/JSMutationCallback.cpp: Removed.
605         * bindings/js/JSMutationCallback.h: Removed.
606         Remove custom JSMutationCallback.h/cpp
607
608         * Modules/geolocation/PositionCallback.h:
609         * Modules/geolocation/PositionErrorCallback.h:
610         * Modules/notifications/NotificationPermissionCallback.h:
611         * Modules/webaudio/AudioBufferCallback.h:
612         * Modules/webdatabase/DatabaseCallback.h:
613         * Modules/webdatabase/SQLStatementCallback.h:
614         * Modules/webdatabase/SQLStatementErrorCallback.h:
615         * Modules/webdatabase/SQLTransactionCallback.h:
616         * Modules/webdatabase/SQLTransactionErrorCallback.h:
617         * css/MediaQueryListListener.h:
618         * dom/NodeFilter.h:
619         * dom/RequestAnimationFrameCallback.h:
620         * dom/StringCallback.h:
621         * fileapi/BlobCallback.h:
622         * html/VoidCallback.h:
623         * page/IntersectionObserverCallback.h:
624         * page/PerformanceObserverCallback.h:
625         Add ActiveDOMCallback as a base class. Import the ActiveDOMCallback constructor.
626
627         * Modules/mediastream/MediaDevicesRequest.cpp:
628         (WebCore::MediaDevicesRequest::filterDeviceList):
629         (WebCore::MediaDevicesRequest::start):
630         * Modules/mediastream/MediaDevicesRequest.h:
631         Change filterDeviceList to take a Vector of Refs.
632
633         * bindings/IDLTypes.h:
634         Add InnerParameterType and NullableInnerParameterType type hooks
635         and specialize wrappers to use Ref for InnerParameterType, and RefPtr
636         for NullableInnerParameterType.
637
638         * bindings/js/JSCallbackData.cpp:
639         * bindings/js/JSCallbackData.h:
640         Add support for passing a this object and give JSCallbackDataWeak a visitJSFunction
641         to allow marking the underlying function.
642
643         * bindings/js/JSMutationObserverCustom.cpp:
644         (WebCore::JSMutationObserver::visitAdditionalChildren):
645         (WebCore::constructJSMutationObserver): Deleted.
646         Remove the custom constructor and replace it with a custom visitAdditionalChildren
647         that calls the new ActiveDOMObject's visitJSFunction.
648
649         * bindings/scripts/CodeGenerator.pm:
650         (ParseType):
651         Add helper to parse a type and cache the result.
652
653         * bindings/scripts/CodeGeneratorJS.pm:
654         (GenerateCallbackHeaderContent):
655         (GenerateCallbackImplementationContent):
656         (GetJSCallbackDataType): Deleted.
657         - Add support for [CallbackThisObject]. When [CallbackThisObject] is not specified, use jsUndefined() 
658           as the this object as specified by WebIDL.
659         - Stop inheriting from ActiveDOMCallback now that callbacks need to do this themselves.
660         - Add a visitJSFunction override for weak callback functions which calls into the callback data.
661
662         * bindings/scripts/IDLAttributes.json:
663         Add [CallbackThisObject].
664
665         * bindings/scripts/IDLParser.pm:
666         (ParseType):
667         Add entry point to parse a single type.
668
669         * css/FontFaceSet.h:
670         Use Ref rather than RefPtr for the faces sequence.
671
672         * dom/ActiveDOMCallback.h:
673         (WebCore::ActiveDOMCallback::visitJSFunction):
674         Add an optional visitJSFunction virtual function so that derived classes
675         have a way of marking underlying function objects.
676
677         * dom/MutationCallback.h:
678         Convert to support generation (return a CallbackResult, inherit from ActiveDOMObject).
679
680         * dom/MutationCallback.idl: Added.
681         Added to generate the callback. Uses the new [CallbackThisObject].
682
683         * dom/MutationObserver.cpp:
684         (WebCore::MutationObserver::deliver):
685         Switch to call idiomatic handleEvent, and pass *this as the first parameter
686         which will be translated into the this object.
687
688         * dom/MutationObserver.h:
689         (WebCore::MutationObserver::callback):
690         Expose the callback so it can marked during GC.
691
692         * dom/MutationObserver.idl:
693         Remove CustomConstructor and replace it with a custom mark function.
694
695         * dom/NativeNodeFilter.cpp:
696         * dom/NativeNodeFilter.h:
697         * inspector/InspectorDatabaseAgent.cpp:
698         Pass now needed ScriptExecutionContext to non-js based callbacks.
699
700         * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
701         * bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp:
702         * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp: Added.
703         * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h: Added.
704         * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
705         * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
706         * bindings/scripts/test/JS/JSTestCallbackInterface.h:
707         * bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
708         * bindings/scripts/test/TestCallbackFunctionWithThisObject.idl: Added.
709         * bindings/scripts/test/TestCallbackInterface.idl:
710         Add/update tests.
711
712 2017-08-03  Jeremy Jones  <jeremyj@apple.com>
713
714         Use MPAVRoutingController instead of deprecated versions.
715         https://bugs.webkit.org/show_bug.cgi?id=175063
716
717         Reviewed by Tim Horton.
718
719         No new tests because no behavior change. This uses a different platform class to present
720         an interface.
721
722         Remove deprecated MPAudioVideoRoutingPopoverController and MPAVRoutingSheet
723         Add MPMediaControlsViewController.
724
725         * platform/spi/ios/MediaPlayerSPI.h:
726
727 2017-08-03  Chris Dumez  <cdumez@apple.com>
728
729         Improve our support for referrer policies
730         https://bugs.webkit.org/show_bug.cgi?id=175069
731         <rdar://problem/33677313>
732
733         Reviewed by Darin Adler.
734
735         Improve our support for referrer policies. In particular, we now support the
736         additional following ones: "same-origin", "origin-when-cross-origin" and
737         "strict-origin-when-cross-origin".
738
739         This is as per the following specification:
740         - https://www.w3.org/TR/referrer-policy/#referrer-policies
741
742         Also refactor the code a bit for clarity: I merged the ReferrerPolicy enum and the
743         FetchOptions::ReferrerPolicy one.
744
745         Tests: http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http-http.html
746                http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http.https.html
747                http/tests/referrer-policy/origin-when-cross-origin/same-origin.html
748                http/tests/referrer-policy/same-origin/cross-origin-http-http.html
749                http/tests/referrer-policy/same-origin/cross-origin-http.https.html
750                http/tests/referrer-policy/same-origin/same-origin.html
751                http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http-http.html
752                http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http.https.html
753                http/tests/referrer-policy/strict-origin-when-cross-origin/same-origin.html
754                http/tests/referrer-policy/strict-origin/cross-origin-http-http.html
755                http/tests/referrer-policy/strict-origin/cross-origin-http.https.html
756                http/tests/referrer-policy/strict-origin/same-origin.html
757
758         * Modules/fetch/FetchLoader.cpp:
759         (WebCore::FetchLoader::start):
760         * Modules/fetch/FetchReferrerPolicy.h:
761         * Modules/fetch/FetchReferrerPolicy.idl:
762         * Modules/fetch/FetchRequest.h:
763         * Modules/fetch/FetchRequestInit.h:
764         * dom/Document.cpp:
765         (WebCore::Document::processReferrerPolicy):
766         (WebCore::Document::applyQuickLookSandbox):
767         (WebCore::Document::applyContentDispositionAttachmentSandbox):
768         * dom/Document.h:
769         * loader/FetchOptions.h:
770         * loader/FrameNetworkingContext.h:
771         * loader/PingLoader.cpp:
772         (WebCore::PingLoader::sendBeacon):
773         Drop explicit call to SecurityPolicy::shouldHideReferrer(). This is already called inside
774         SecurityPolicy::generateReferrerHeader() and used only when needed, depending on the
775         actual referrer policy.
776
777         * loader/cache/CachedResourceLoader.cpp:
778         (WebCore::CachedResourceLoader::updateHTTPRequestHeaders):
779         * loader/cache/CachedResourceRequest.cpp:
780         (WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders):
781         * page/SecurityPolicy.cpp:
782         (WebCore::referrerToOriginString):
783         (WebCore::SecurityPolicy::generateReferrerHeader):
784         * page/SecurityPolicy.h:
785         * platform/ReferrerPolicy.h:
786
787 2017-08-03  Daniel Bates  <dabates@apple.com>
788
789         Support ::marker pseudo-element
790         https://bugs.webkit.org/show_bug.cgi?id=141477
791
792         Reviewed by David Hyatt.
793
794         Implements the ::marker pseudo element as per the CSS Pseudo-Element Module Level 4
795         spec., <https://drafts.csswg.org/css-pseudo-4> (Editor's Draft, 24 July 2017).
796
797         The ::marker pseudo element is a convenience pseudo element that allows a person to
798         style the appearance of a list item marker. For example, to render all list item
799         markers in bolded, blue text you would define a stylesheet with the following content:
800
801         li::marker {
802             color: blue;
803             font-weight: bold;
804         }
805
806         and this could be applied to a page that contains markup of the form:
807
808         <ol>
809             <li>Item 1</li>
810             <li>Item 2</li>
811             ...
812             <li>Item N-1</li>
813             <li>Item N</li>
814         </ol>
815
816         Formerly to the achieve the same effect you would need to use a stylesheet of the form:
817
818         li {
819             color: blue;
820             font-weight: bold;
821         }
822
823         .list-item-content {
824             all: initial;
825         }
826
827         and then write your markup to have the form:
828
829         <ol>
830             <li><span class="list-item-content">Item 1</span></li>
831             <li><span class="list-item-content">Item 2</span></li>
832             ...
833             <li><span class="list-item-content">Item N-1</span></li>
834             <li><span class="list-item-content">Item N</span></li>
835         </ol>
836
837         The ::marker pseudo element only supports stylizing all font properties and the color property
838         of a list item marker.
839
840         Tests: fast/lists/list-marker-with-display.html
841                http/wpt/css/css-pseudo-4/marker-and-other-pseudo-elements.html
842                http/wpt/css/css-pseudo-4/marker-color.html
843                http/wpt/css/css-pseudo-4/marker-font-properties.html
844                http/wpt/css/css-pseudo-4/marker-inherit-values.html
845
846         * css/CSSSelector.cpp:
847         (WebCore::CSSSelector::pseudoId): Return the pseudo id for the ::marker pseudo element.
848         * css/CSSSelector.h: Add enumerator PseudoElementMarker to the pseudo element enum.
849         * css/RuleSet.cpp:
850         (WebCore::determinePropertyWhitelistType): Return whitelist type PropertyWhitelistMarker for ::marker
851         so that we match rules against the acceptable rules for ::marker.
852         * css/RuleSet.h: Add enumerator PropertyWhitelistMarker to the property whitelist type enum.
853         * css/SelectorPseudoElementTypeMap.in: Add "marker" to the list of pseudo element types.
854         * css/StyleResolver.cpp:
855         (WebCore::isValidMarkerStyleProperty): Determines if the specified CSS property is valid inside ::marker.
856         (WebCore::StyleResolver::CascadedProperties::addMatch): Only recognize CSS properties in the content block
857         of ::marker that match the ::marker whitelist policy.
858         * rendering/RenderListItem.cpp:
859         (WebCore::RenderListItem::computeMarkerStyle): Computes the style object for the list item marker. We
860         apply the user-agent style to the marker here as opposed to defining ::marker in the UA sheet as per
861         the spec. as an optimization to avoid having the style resolver apply the pseudo element to all elements.
862         For now, we always inherit style from the originating element (list item). Added FIXME to selectively
863         inherit styles.
864         (WebCore::RenderListItem::styleDidChange): Always apply the list marker style to the list marker renderer.
865         * rendering/RenderListItem.h:
866         * rendering/style/RenderStyleConstants.h: Add pseudo ID for the ::marker pseudo element.
867
868 2017-08-03  Antti Koivisto  <antti@apple.com>
869
870         Factor common code in Style::*ChangeInvalidation into helper functions
871         https://bugs.webkit.org/show_bug.cgi?id=174312
872
873         Reviewed by Andreas Kling.
874
875         There is a lot of copy code here.
876
877         * Style/StyleInvalidationFunctions.h: Added.
878         (WebCore::Style::traverseRuleFeaturesInShadowTree):
879         (WebCore::Style::traverseRuleFeaturesForSlotted):
880         (WebCore::Style::traverseRuleFeatures):
881
882             Add functions for traversing rule features that may affect style of an element.
883             Use lambdas to implement client-specific behavior.
884
885         * WebCore.xcodeproj/project.pbxproj:
886         * style/AttributeChangeInvalidation.cpp:
887         (WebCore::Style::mayBeAffectedByAttributeChange):
888         (WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
889         (WebCore::Style::mayBeAffectedByHostRules): Deleted.
890         (WebCore::Style::mayBeAffectedBySlottedRules): Deleted.
891         * style/ClassChangeInvalidation.cpp:
892         (WebCore::Style::ClassChangeInvalidation::invalidateStyle):
893         (WebCore::Style::mayBeAffectedByHostRules): Deleted.
894         (WebCore::Style::mayBeAffectedBySlottedRules): Deleted.
895         * style/IdChangeInvalidation.cpp:
896         (WebCore::Style::IdChangeInvalidation::invalidateStyle):
897         (WebCore::Style::mayBeAffectedByHostRules): Deleted.
898         (WebCore::Style::mayBeAffectedBySlottedRules): Deleted.
899
900 2017-08-03  Zan Dobersek  <zdobersek@igalia.com>
901
902         [EME] CDM constructor assigns CDMPrivate member multiple times
903         https://bugs.webkit.org/show_bug.cgi?id=175128
904
905         Reviewed by Xabier Rodriguez-Calvar.
906
907         In the CDM class constructor, iterate over the registered CDM
908         factories, finding one that supports the specified key system.
909         A CDMPrivate object is created through that factory, and the
910         iteration is now stopped at that point, while previously it
911         contined to potentially create CDMPrivate objects through
912         other factories.
913
914         Helper createCDMPrivateForKeySystem() function is removed.
915
916         * Modules/encryptedmedia/CDM.cpp:
917         (WebCore::CDM::CDM):
918         (WebCore::createCDMPrivateForKeySystem): Deleted.
919
920 2017-08-03  Emilio Cobos Álvarez  <ecobos@igalia.com>
921
922         Don't always recalc the style of display: contents elements.
923         https://bugs.webkit.org/show_bug.cgi?id=172753
924
925         Reviewed by Antti Koivisto.
926
927         No new tests (no functionality change). This only removes an
928         inefficiency.
929
930         * dom/Element.cpp:
931         (WebCore::Element::existingComputedStyle):
932         * dom/Element.h:
933         * style/RenderTreeUpdater.cpp:
934         (WebCore::RenderTreeUpdater::updateRenderTree):
935         (WebCore::RenderTreeUpdater::updateElementRenderer):
936         * style/StyleTreeResolver.cpp:
937         (WebCore::Style::renderOrDisplayContentsStyle):
938         (WebCore::Style::TreeResolver::resolveElement):
939         (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
940         (WebCore::Style::shouldResolveElement):
941         (WebCore::Style::TreeResolver::resolveComposedTree):
942
943 2017-08-02  Devin Rousso  <drousso@apple.com>
944
945         Web Inspector: add stack trace information for each RecordingAction
946         https://bugs.webkit.org/show_bug.cgi?id=174663
947
948         Reviewed by Joseph Pecoraro.
949
950         Tests: inspector/canvas/recording-2d.html
951                inspector/model/recording.html
952
953         * inspector/InspectorCanvas.h:
954         * inspector/InspectorCanvas.cpp:
955         (WebCore::InspectorCanvas::indexForData):
956         (WebCore::InspectorCanvas::buildAction):
957
958 2017-08-02  Yusuke Suzuki  <utatane.tea@gmail.com>
959
960         Merge WTFThreadData to Thread::current
961         https://bugs.webkit.org/show_bug.cgi?id=174716
962
963         Reviewed by Mark Lam.
964
965         Use Thread::current() instead.
966
967         * fileapi/AsyncFileStream.cpp:
968         * platform/ThreadGlobalData.cpp:
969         (WebCore::ThreadGlobalData::ThreadGlobalData):
970         * platform/graphics/cocoa/WebCoreDecompressionSession.h:
971         * platform/ios/wak/WebCoreThread.mm:
972         (StartWebThread):
973         * workers/WorkerThread.cpp:
974         (WebCore::WorkerThread::workerThread):
975
976 2017-08-02  Sam Weinig  <sam@webkit.org>
977
978         Fix crashes in GC creating a document fragment on a background thread
979         https://bugs.webkit.org/show_bug.cgi?id=175111
980
981         Reviewed by Chris Dumez.
982
983         r220095 (https://webkit.org/b/175006) change JSHTMLTemplateElement from using a
984         private name + property to manager the lifetime of the reference DocumentFragment
985         to using the idiomatic visitAdditionalChildren. Unfortunately, the function to access
986         the DocumentFragment lazily creates it. If this lazy creation happens on a GC thread,
987         badness ensues. This introduces an accessor that returns the DocumentFragment if it
988         has been created or null if it has not.
989
990         * bindings/js/JSHTMLTemplateElementCustom.cpp:
991         (WebCore::JSHTMLTemplateElement::visitAdditionalChildren):
992         * html/HTMLTemplateElement.cpp:
993         (WebCore::HTMLTemplateElement::contentIfAvailable):
994         * html/HTMLTemplateElement.h:
995
996 2017-08-02  Sam Weinig  <sam@webkit.org>
997
998         [WebIDL] Simplify [EnabledBySettings] extended attribute code to not require passing a global object to finishCreation
999         https://bugs.webkit.org/show_bug.cgi?id=175087
1000
1001         Reviewed by Chris Dumez.
1002
1003         * bindings/scripts/CodeGeneratorJS.pm:
1004         (GenerateImplementation):
1005         (GeneratePrototypeDeclaration):
1006         Remove unnecessary passing of the global object to finishCreation for [EnabledBySettings].
1007
1008         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1009         * bindings/scripts/test/JS/JSTestNode.cpp:
1010         * bindings/scripts/test/JS/JSTestObj.cpp:
1011         Update tests.
1012
1013 2017-08-02  Andy Estes  <aestes@apple.com>
1014
1015         REGRESSION (r207155): Unable to switch sheets when previewing Numbers '09 spreadsheets
1016         https://bugs.webkit.org/show_bug.cgi?id=175098
1017         <rdar://problem/31416763>
1018
1019         Reviewed by Daniel Bates.
1020
1021         r207155 enabled sandboxing on the frame displaying a QuickLook preview. This restricted
1022         frames within the sandbox from navigating their sandboxed siblings or ancestors, which
1023         breaks the functionality of multi-sheet Numbers '09 spreadsheet previews. These previews
1024         contain a frameset with a table of contents frame and a content frame, and the table of
1025         contents frame needs to be able to navigate the content frame when the sheet selection
1026         changes.
1027
1028         Fix this by disabling the SandboxNavigation flag in the QuickLook sandbox. Frames within the
1029         sandbox will be able to navigate each other, but will not be able to navigate the top frame
1030         (due to SandboxTopNavigation still being enabled), nor will they be able to navigate any
1031         other ancestor frame outside the sandbox (due to QuickLook previews being in a different
1032         origin than the hosting frame). These two cases are covered by existing tests.
1033
1034         Test: quicklook/multi-sheet-numbers-09.html
1035
1036         * dom/Document.cpp:
1037         (WebCore::Document::applyQuickLookSandbox): Added a call to
1038         disableSandboxFlags(SandboxNavigation) after applying the content security policy.
1039         * dom/SecurityContext.h:
1040         (WebCore::SecurityContext::disableSandboxFlags): Defined disableSandboxFlags().
1041
1042 2017-08-02  Jer Noble  <jer.noble@apple.com>
1043
1044         [MSE] Removing samples when presentation order does not match decode order can cause bad behavior.
1045         https://bugs.webkit.org/show_bug.cgi?id=175091
1046
1047         Reviewed by Eric Carlson.
1048
1049         Address follow-up comments to r219519.
1050
1051         * Modules/mediasource/SourceBuffer.cpp:
1052         (WebCore::SourceBuffer::removeCodedFrames):
1053
1054 2017-08-02  Jeremy Jones  <jeremyj@apple.com>
1055
1056         Remove unused and obsolete setting mediaDocumentEntersFullscreenAutomatically
1057         https://bugs.webkit.org/show_bug.cgi?id=175080
1058
1059         Reviewed by Jon Lee.
1060
1061         No new tests because this only removes unused code.
1062
1063         This is obsolete because of the alternate solution in
1064         https://bugs.webkit.org/show_bug.cgi?id=174850
1065
1066         * page/Settings.in:
1067
1068 2017-08-02  Filip Pizlo  <fpizlo@apple.com>
1069
1070         GPUBuffer::length() should return the size of the array buffer backing the GPU buffer, not the rounded-up GPU buffer length
1071         https://bugs.webkit.org/show_bug.cgi?id=175079
1072
1073         Reviewed by Simon Fraser.
1074
1075         This fixes a failure in the GPU.BufferCreate unit test.
1076         
1077         The problem is that in order to have a Metal buffer wrap memory we allocated, we have to tell Metal
1078         that the memory is page-aligned. This means that the Metal buffer reports back a page-aligned size,
1079         which is different than what the test expected.
1080         
1081         It seems that it's most convenient for our GPUBuffer class to return the unaligned length, rather
1082         than the aligned length. This is just a simple matter of returning the length from the ArrayBuffer
1083         rather than the Metal buffer.
1084         
1085         This fixes the unit test and is probably more sensible for actual users of this class, since the page
1086         alignment of the length is a goofy implementation detail.
1087
1088         * platform/graphics/cocoa/GPUBufferMetal.mm:
1089         (WebCore::GPUBuffer::length const):
1090
1091 2017-08-01  Brian Burg  <bburg@apple.com>
1092
1093         HTML file input elements do not support file extensions in the "accept" attribute
1094         https://bugs.webkit.org/show_bug.cgi?id=95698
1095         <rdar://problem/12231850>
1096
1097         Reviewed by Darin Adler.
1098
1099         Serialize the accepted file extensions so they can be accessed in the UI process.
1100
1101         * platform/FileChooser.h:
1102         * platform/FileChooser.cpp:
1103         (WebCore::FileChooser::invalidate): Modernize.
1104         (WebCore::FileChooserSettings::acceptTypes const): Deleted.
1105         This is dead code, it was only used by Chromium.
1106
1107 2017-08-02  Fujii Hironori  <Hironori.Fujii@sony.com>
1108
1109         Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName
1110         https://bugs.webkit.org/show_bug.cgi?id=175010
1111         <rdar://problem/33647818>
1112
1113         Reviewed by Alex Christensen.
1114
1115         No new tests because no behavior change.
1116
1117         Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed.
1118
1119         * contentextensions/ContentExtensionParser.cpp:
1120         (WebCore::ContentExtensions::isValidCSSSelector):
1121         Call QualifiedName::init().
1122         * dom/DOMAllInOne.cpp: Remove the warning. Include QualifiedName.cpp.
1123         * dom/QualifiedName.cpp:
1124         (WebCore::QualifiedName::init): Call LazyNeverDestroyed::construct
1125         instead of placement new.
1126         * dom/QualifiedName.h: Use LazyNeverDestroyed.
1127
1128 2017-08-01  Joseph Pecoraro  <pecoraro@apple.com>
1129
1130         CFString leak dragging an image - allocation under PlatformPasteboard::writeObjectRepresentations
1131         https://bugs.webkit.org/show_bug.cgi?id=175064
1132
1133         Reviewed by Tim Horton.
1134
1135         * platform/ios/PlatformPasteboardIOS.mm:
1136         (WebCore::PlatformPasteboard::writeObjectRepresentations):
1137         Adopt a created string into the RetainPtr.
1138
1139         * platform/ios/WebItemProviderPasteboard.h:
1140         * platform/ios/WebItemProviderPasteboard.mm:
1141         (-[WebItemProviderRegistrationInfoList dealloc]):
1142         Release suggestedName and switch from -strong to -copy.
1143
1144 2017-08-01  Chris Dumez  <cdumez@apple.com>
1145
1146         Unreviewed, update Beacon API status to "In Development".
1147
1148         * features.json:
1149
1150 2017-08-01  Chris Dumez  <cdumez@apple.com>
1151
1152         Add initial support for navigator.sendBeacon
1153         https://bugs.webkit.org/show_bug.cgi?id=175007
1154         <rdar://problem/33547728>
1155
1156         Reviewed by Sam Weinig.
1157
1158         Add initial support for navigator.sendBeacon behind an experimental
1159         feature runtime flag. The specification is available at:
1160         - https://w3c.github.io/beacon/
1161
1162         The current implementation supports sending beacons with all types of
1163         payloads except for ReadableStream. Some functionality is incomplete
1164         and will be taken care of in follow-up patches:
1165         - Support for CORS preflight for the cases where it is required. We currently
1166           return false and do not send the beacon in such cases.
1167         - Better support for redirects.
1168         - Use a more power-friendly network priority for beacon requests.
1169
1170         Tests: http/tests/blink/sendbeacon/*
1171                http/tests/security/mixedContent/beacon/insecure-beacon-in-iframe.html
1172                http/wpt/beacon/*
1173                imported/blink/fast/beacon/*
1174                imported/w3c/web-platform-tests/beacon/*
1175
1176         * CMakeLists.txt:
1177         * DerivedSources.make:
1178         * Modules/beacon/NavigatorBeacon.cpp: Added.
1179         (WebCore::NavigatorBeacon::sendBeacon):
1180         * Modules/beacon/NavigatorBeacon.h: Added.
1181         * Modules/beacon/NavigatorBeacon.idl: Added.
1182         * WebCore.xcodeproj/project.pbxproj:
1183         * loader/PingLoader.cpp:
1184         (WebCore::PingLoader::sendBeacon):
1185         * loader/PingLoader.h:
1186
1187 2017-08-01  Filip Pizlo  <fpizlo@apple.com>
1188
1189         Bmalloc and GC should put auxiliaries (butterflies, typed array backing stores) in a gigacage (separate multi-GB VM region)
1190         https://bugs.webkit.org/show_bug.cgi?id=174727
1191
1192         Reviewed by Mark Lam.
1193
1194         No new tests because no change in behavior.
1195         
1196         Needed to teach Metal how to allocate in the Gigacage.
1197
1198         * platform/graphics/cocoa/GPUBufferMetal.mm:
1199         (WebCore::GPUBuffer::GPUBuffer):
1200         (WebCore::GPUBuffer::contents):
1201
1202 2017-08-01  Fujii Hironori  <Hironori.Fujii@sony.com>
1203
1204         [WinCairo] Implement Font::platformBoundsForGlyph
1205         https://bugs.webkit.org/show_bug.cgi?id=174813
1206
1207         Reviewed by Alex Christensen.
1208
1209         Test: fast/text/emphasis.html
1210
1211         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
1212         (WebCore::Font::platformBoundsForGlyph): Implemented by copying
1213         the code from Font::boundsForGDIGlyph().
1214
1215 2017-08-01  Zalan Bujtas  <zalan@apple.com>
1216
1217         REGRESSION (r217197): New Yorker website hangs for a long time on load, lots of blank tiles
1218         https://bugs.webkit.org/show_bug.cgi?id=175009
1219         <rdar://problem/33505791>
1220
1221         Reviewed by Simon Fraser.
1222
1223         This patch ensures that we report the desktop, non-frame-flattened frame size for media queries in subframes.
1224         Some websites don't expect the iframes to be expanded to the size of the content and when the media query
1225         callback mutates the content (triggering frame resize), they might end up getting into a never ending layout.
1226
1227         Test: fast/frames/flattening/media-query-growing-content.html
1228
1229         * css/MediaQueryEvaluator.cpp:
1230         (WebCore::orientationEvaluate):
1231         (WebCore::aspectRatioEvaluate):
1232         (WebCore::heightEvaluate):
1233         (WebCore::widthEvaluate):
1234         * page/FrameView.cpp:
1235         (WebCore::FrameView::layout):
1236         (WebCore::FrameView::layoutSizeForMediaQuery const):
1237         (WebCore::FrameView::evaluateMediaQueryList):
1238         * page/FrameView.h:
1239
1240 2017-07-26  Jiewen Tan  <jiewen_tan@apple.com>
1241
1242         Add tests to detect mistakes in backward compatibility when the structured clone algorithm is changed in the future
1243         https://bugs.webkit.org/show_bug.cgi?id=173998
1244
1245         Reviewed by Darin Adler.
1246
1247         * bindings/js/SerializedScriptValue.cpp:
1248         Add a comment.
1249
1250 2017-08-01  Matt Lewis  <jlewis3@apple.com>
1251
1252         Unreviewed, rolling out r220089.
1253
1254         This caused multiple crashes on macOS Debug testers.
1255
1256         Reverted changeset:
1257
1258         "Use LazyNeverDestroyed instead of DEFINE_GLOBAL for
1259         QualifiedName"
1260         https://bugs.webkit.org/show_bug.cgi?id=175010
1261         http://trac.webkit.org/changeset/220089
1262
1263 2017-08-01  Sam Weinig  <sam@webkit.org>
1264
1265         [WebIDL] Swap a custom attribute for a custom mark function for HTMLTemplateElement
1266         https://bugs.webkit.org/show_bug.cgi?id=175006
1267
1268         Reviewed by Chris Dumez.
1269
1270         Use the standard way of augmenting GC, visitAdditionalChildren, rather
1271         than using a private name to create ownership.
1272
1273         * bindings/js/JSHTMLTemplateElementCustom.cpp:
1274         (WebCore::JSHTMLTemplateElement::visitAdditionalChildren):
1275         (WebCore::JSHTMLTemplateElement::content const): Deleted.
1276         * html/HTMLTemplateElement.idl:
1277
1278 2017-08-01  Zan Dobersek  <zdobersek@igalia.com>
1279
1280         [GCrypt] Gather crypto constants in a single location
1281         https://bugs.webkit.org/show_bug.cgi?id=174091
1282
1283         Reviewed by Jiewen Tan.
1284
1285         Gather common constants used across the libgcrypt-specific Web Crypto
1286         implementations in a single place -- in the GCryptUtilities.h header,
1287         inside the CryptoConstants namespace. The various ASN.1 object identifiers
1288         and other helper values are placed inside, in the std::array<uint8_t, N>
1289         container.
1290
1291         Additionally, CryptoConstants::matches() helper function is provided. It
1292         compares the provided data-and-size pair with the given std::array
1293         container and returns true if the std::memcmp() call returns 0.
1294
1295         Changes in CryptoKeyEC and CryptoKeyRSA consist mostly of switching to the
1296         use of CryptoConstants::matches() and the CryptoConstants data arrays, as
1297         well as some whitespace cleanup.
1298
1299         Additionallity in CryptoKeyEC, the helper functions covering various curve
1300         attributes are reordered, renamed and reorganized for simplicity.
1301
1302         No new tests -- no changes in behavior.
1303
1304         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
1305         (WebCore::curveIdentifier):
1306         (WebCore::curveSize):
1307         (WebCore::curveUncompressedFieldElementSize):
1308         (WebCore::curveUncompressedPointSize):
1309         (WebCore::CryptoKeyEC::platformImportRaw):
1310         (WebCore::CryptoKeyEC::platformImportJWKPublic):
1311         (WebCore::CryptoKeyEC::platformImportJWKPrivate):
1312         (WebCore::supportedAlgorithmIdentifier):
1313         (WebCore::curveForIdentifier):
1314         (WebCore::CryptoKeyEC::platformImportSpki):
1315         (WebCore::CryptoKeyEC::platformExportRaw):
1316         (WebCore::CryptoKeyEC::platformAddFieldElements):
1317         (WebCore::CryptoKeyEC::platformExportSpki):
1318         (WebCore::CryptoKeyEC::platformExportPkcs8):
1319         (WebCore::uncompressedPointSizeForCurve): Deleted.
1320         (WebCore::uncompressedFieldElementSizeForCurve): Deleted.
1321         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
1322         (WebCore::supportedAlgorithmIdentifier):
1323         (WebCore::CryptoKeyRSA::importPkcs8):
1324         (WebCore::CryptoKeyRSA::exportSpki):
1325         (WebCore::CryptoKeyRSA::exportPkcs8):
1326         * crypto/gcrypt/GCryptUtilities.h:
1327         (WebCore::CryptoConstants::matches):
1328
1329 2017-07-31  Fujii Hironori  <Hironori.Fujii@sony.com>
1330
1331         Use LazyNeverDestroyed instead of DEFINE_GLOBAL for MediaFeatureNames
1332         https://bugs.webkit.org/show_bug.cgi?id=175008
1333
1334         Reviewed by Alex Christensen.
1335
1336         No new tests because no behavior change.
1337
1338         Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed.
1339
1340         * css/MediaFeatureNames.cpp:
1341         (WebCore::MediaFeatureNames::init): Do not include
1342         <wtf/StaticConstructors.h>. Use LazyNeverDestroyed instead of
1343         DEFINE_GLOBAL. Call LazyNeverDestroyed::construct instead of
1344         placement new.
1345         * css/MediaFeatureNames.h: Use LazyNeverDestroyed.
1346         * css/MediaQueryEvaluator.cpp:
1347         (WebCore::MediaQueryEvaluator::evaluate const): Dereference with ->.
1348
1349 2017-07-31  Fujii Hironori  <Hironori.Fujii@sony.com>
1350
1351         Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName
1352         https://bugs.webkit.org/show_bug.cgi?id=175010
1353
1354         Reviewed by Alex Christensen.
1355
1356         No new tests because no behavior change.
1357
1358         Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed.
1359
1360         * dom/DOMAllInOne.cpp: Remove the warning. Include QualifiedName.cpp.
1361         * dom/QualifiedName.cpp:
1362         (WebCore::QualifiedName::init): Call LazyNeverDestroyed::construct
1363         instead of placement new.
1364         * dom/QualifiedName.h: Use LazyNeverDestroyed.
1365
1366 2017-07-31  Matt Rajca  <mrajca@apple.com>
1367
1368         Support quirk for letting media autoplay if the user interacted with at least one media element.
1369         https://bugs.webkit.org/show_bug.cgi?id=175005
1370         <rdar://problem/33476038>
1371
1372         Reviewed by Eric Carlson.
1373
1374         If the user has interacted with at least one media element, let other media elements auto-play
1375         as a quirk.
1376
1377         * dom/Document.cpp:
1378         (WebCore::Document::updateIsPlayingMedia):
1379         * dom/Document.h:
1380         (WebCore::Document::noteUserInteractionWithMediaElement):
1381         * html/HTMLMediaElement.cpp:
1382         (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture):
1383         * html/MediaElementSession.cpp:
1384         (WebCore::needsDocumentLevelMediaUserGestureQuirk):
1385         (WebCore::MediaElementSession::playbackPermitted const):
1386         * page/MediaProducer.h:
1387
1388 2017-07-31  Nan Wang  <n_wang@apple.com>
1389
1390         AX: CFEqual is failing on text markers with exact same data
1391         https://bugs.webkit.org/show_bug.cgi?id=175002
1392         <rdar://problem/33636985>
1393
1394         Reviewed by Chris Fleizach.
1395
1396         We should zero the memory of the TextMarkerData instance so that it
1397         can be tested for byte-equivalence.
1398
1399         Made sure this change won't break any of the existing tests.
1400
1401         * accessibility/AXObjectCache.cpp:
1402         (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
1403         (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):
1404
1405 2017-07-28  Matt Rajca  <mrajca@apple.com>
1406
1407         Propagate user gesture tokens when script elements are loaded.
1408         https://bugs.webkit.org/show_bug.cgi?id=174959
1409
1410         Reviewed by Eric Carlson.
1411
1412         Propagate user gesture tokens when script elements are loaded (i.e. between the time an
1413         element is created and its onload handler is invoked).
1414
1415         * dom/ScriptElement.cpp:
1416         (WebCore::ScriptElement::ScriptElement):
1417         (WebCore::ScriptElement::dispatchLoadEventRespectingUserGestureIndicator):
1418         (WebCore::ScriptElement::executeScriptAndDispatchEvent):
1419         (WebCore::ScriptElement::executePendingScript):
1420         * dom/ScriptElement.h:
1421
1422 2017-07-31  Matt Lewis  <jlewis3@apple.com>
1423
1424         Unreviewed, rolling out r220048.
1425
1426         This revision caused multiple crashes in fast/images. See
1427         webkit.org/b/174990
1428
1429         Reverted changeset:
1430
1431         "RenderImageResourceStyleImage::image() should return the
1432         nullImage() if the image is not available"
1433         https://bugs.webkit.org/show_bug.cgi?id=174874
1434         http://trac.webkit.org/changeset/220048
1435
1436 2017-07-31  Sam Weinig  <sam@webkit.org>
1437
1438         Remove unnecessary exceptions from storage code
1439         https://bugs.webkit.org/show_bug.cgi?id=174572
1440
1441         Reviewed by Chris Dumez.
1442
1443         Remove checks for canAccessStorage() and the exceptions they would cause.
1444         These were used for Storage in ephemeral sessions, but they are now supported.
1445         Add checks for a null frame to functions that can mutate the storage, as the
1446         frame is needed for that, and it retains our existing behavior for disconnected
1447         frames. By removing these checks / exceptions, we can fully generate Storage.idl.
1448
1449         * CMakeLists.txt:
1450         * WebCore.xcodeproj/project.pbxproj:
1451         * bindings/js/JSBindingsAllInOne.cpp:
1452         * bindings/js/JSStorageCustom.cpp: Removed.
1453         Remove JSStorageCustom.cpp
1454
1455         * loader/EmptyClients.cpp:
1456         * page/DOMWindow.cpp:
1457         (WebCore::DOMWindow::sessionStorage):
1458         (WebCore::DOMWindow::localStorage):
1459         * storage/StorageArea.h:
1460         Remove canAccessStorage.
1461
1462         * storage/Storage.cpp:
1463         (WebCore::Storage::length):
1464         (WebCore::Storage::key):
1465         (WebCore::Storage::getItem):
1466         (WebCore::Storage::setItem):
1467         (WebCore::Storage::removeItem):
1468         (WebCore::Storage::clear):
1469         (WebCore::Storage::contains):
1470         (WebCore::Storage::isSupportedPropertyName):
1471         (WebCore::Storage::supportedPropertyNames):
1472         * storage/Storage.h:
1473         * storage/Storage.idl:
1474         Remove canAccessStorage checks and corresponding exceptions. Add supportedPropertyNames
1475         to allow the removal of the [CustomGetOwnPropertyNames].
1476
1477 2017-07-31  Matt Lewis  <jlewis3@apple.com>
1478
1479         Unreviewed, rolling out r220060.
1480
1481         This broke our internal builds. Contact reviewer of patch for
1482         more information.
1483
1484         Reverted changeset:
1485
1486         "Merge WTFThreadData to Thread::current"
1487         https://bugs.webkit.org/show_bug.cgi?id=174716
1488         http://trac.webkit.org/changeset/220060
1489
1490 2017-07-31  Yusuke Suzuki  <utatane.tea@gmail.com>
1491
1492         Merge WTFThreadData to Thread::current
1493         https://bugs.webkit.org/show_bug.cgi?id=174716
1494
1495         Reviewed by Sam Weinig.
1496
1497         Use Thread::current() instead.
1498
1499         * fileapi/AsyncFileStream.cpp:
1500         * platform/ThreadGlobalData.cpp:
1501         (WebCore::ThreadGlobalData::ThreadGlobalData):
1502         * platform/graphics/cocoa/WebCoreDecompressionSession.h:
1503         * platform/ios/wak/WebCoreThread.mm:
1504         (StartWebThread):
1505         * workers/WorkerThread.cpp:
1506         (WebCore::WorkerThread::workerThread):
1507
1508 2017-07-31  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1509
1510         Created a bool pretty printer at WTF for debugging purposes
1511         https://bugs.webkit.org/show_bug.cgi?id=174893
1512
1513         Reviewed by Darin Adler.
1514
1515         Use WTF::boolPrettyPrinter in debugging messages.
1516
1517         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1518         (WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem):
1519         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
1520         (WebCore::MediaPlayerPrivateGStreamerMSE::seek):
1521
1522 2017-07-30  Zan Dobersek  <zdobersek@igalia.com>
1523
1524         Unreviewed. Suppress the -Wextra compiler warning when building with GCC 6.3.0,
1525         explicitly initializing the RefCounted<> base class in the
1526         FetchHeaders(const FetchHeaders&) constructor.
1527
1528         Note that while that's the signature of the copy constructor for the FetchHeaders
1529         class, the base RefCounted<> class is not copyable, so the default RefCounted<>
1530         constructor is used, but the FetchHeaders resources are normally copied into the
1531         new object from the one that's passed in.
1532
1533         * Modules/fetch/FetchHeaders.h:
1534         (WebCore::FetchHeaders::FetchHeaders):
1535
1536 2017-07-30  Darin Adler  <darin@apple.com>
1537
1538         Remove code in HTMLObjectElement attribute parsing that forces style resolution and layout
1539         https://bugs.webkit.org/show_bug.cgi?id=130653
1540
1541         Reviewed by Antti Koivisto.
1542
1543         Also fixes a bug where load events are delivered prematurely in some cases
1544         when an object, embed, frame, or iframe element is still loading.
1545
1546         * dom/Document.cpp:
1547         (WebCore::Document::loadEventDelayTimerFired): Added a call to
1548         FrameLoader::checkLoadComplete. Goes along with the change to
1549         FrameLoader::checkLoadCompleteForThisFrame, which now respects the
1550         isDelayingLoadEvent flag.
1551
1552         * html/HTMLAppletElement.cpp:
1553         (WebCore::HTMLAppletElement::HTMLAppletElement): Removed the createdByParser argument,
1554         no longer needed by the base class.
1555         (WebCore::HTMLAppletElement::create): Added call to finishCreating, which is now part of
1556         the process of creating any object in a class derived from HTMLPlugInImageElement.
1557         (WebCore::HTMLAppletElement::updateWidget): Rearranged logic so setNeedsWidgetUpdate
1558         is only called when it's becoming false; avoids a false/true/false round trip that can
1559         cause trouble.
1560         * html/HTMLAppletElement.h: Updated for the above.
1561
1562         * html/HTMLEmbedElement.cpp:
1563         (WebCore::HTMLEmbedElement::HTMLEmbedElement): Removed the createdByParser argument,
1564         no longer needed by the base class.
1565         (WebCore::HTMLEmbedElement::create): Added call to finishCreating, which is now part of
1566         the process of creating any object in a class derived from HTMLPlugInImageElement.
1567         (WebCore::HTMLEmbedElement::parseAttribute): Changed srcAttr to call
1568         updateImageLoaderWithNewURLSoon to do the image loading logic.
1569         (WebCore::HTMLEmbedElement::updateWidget): Rearranged logic so setNeedsWidgetUpdate
1570         is only called when it's becoming false; avoids a false/true/false round trip that can
1571         cause trouble.
1572         * html/HTMLEmbedElement.h: Updated for the above.
1573
1574         * html/HTMLMediaElement.cpp:
1575         (WebCore::HTMLMediaElement::setReadyState): Call setShouldDelayLoadEvent(false) when
1576         transitioning to HAVE_CURRENT_DATA (or beyond), even if we have already fired a loadeddata
1577         event in the past. This matches what the HTML specification calls for, but only if you
1578         read it carefully. Without this change, and with the more complete implementation of
1579         load event delay below, one of the regression tests hangs because are permanently stuck
1580         dealying load events. Also added a FIXME about other code that likely has a similar
1581         problem; the symptom is likely to be subtle and minor, though.
1582
1583         * html/HTMLObjectElement.cpp:
1584         (WebCore::HTMLObjectElement::HTMLObjectElement): Removed the createdByParser argument,
1585         no longer needed by the base class.
1586         (WebCore::HTMLObjectElement::create): Added call to finishCreating, which is now part of
1587         the process of creating any object in a class derived from HTMLPlugInImageElement.
1588         (WebCore::HTMLObjectElement::parseAttribute): Changed dataAttr to use
1589         updateImageLoaderWithNewURLSoon. Explicitly call scheduleUpdateForAfterStyleResolution
1590         since just calling invalidateStyleAndRenderersForSubtree alone is no longer sufficient.
1591         (WebCore::HTMLObjectElement::updateWidget): Rearranged logic so setNeedsWidgetUpdate
1592         is only called when it's becoming false; avoids a false/true/false round trip that can
1593         cause trouble.
1594         (WebCore::HTMLObjectElement::childrenChanged): Added calls to the new
1595         scheduleUpdateForAfterStyleResolution since invalidating style is no longer sufficient.
1596         (WebCore::HTMLObjectElement::renderFallbackContent): Remove the call to
1597         updateStyleIfNeeded. This is the main change that the title of this bug refers to.
1598         * html/HTMLObjectElement.h: Updated for the above. Also removed the
1599         clearUseFallbackContent function because it's clearer to set the data member in
1600         line at the single call site in HTMLObjectElement::parseAttribute.
1601
1602         * html/HTMLPlugInImageElement.cpp:
1603         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Removed the createdByParser
1604         argument; no need to set an m_needsWidgetUpdate flag differently for parser cases now.
1605         (WebCore::HTMLPlugInImageElement::finshCreating): Added. To be called after creating
1606         an element to do work that can't be done in a constructor.
1607         (WebCore::HTMLPlugInImageElement::didRecalcStyle): Added. Calls the new
1608         scheduleUpdateForAfterStyleResolution function.
1609         (WebCore::HTMLPlugInImageElement::didAttachRenderers): Moved all the logic from this
1610         function into scheduleUpdateForAfterStyleResolution. Also added a call through to the base
1611         class; cleans things up, even though it's just an assertion.
1612         (WebCore::HTMLPlugInImageElement::willDetachRenderers): Removed the call to
1613         setNeedsWidgetUpdate(true) here; no longer needed because the new logic already
1614         does the right thing in this case.
1615         (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary): Deleted. Now handled by
1616         updateAfterStyleResolution instead.
1617         (WebCore::HTMLPlugInImageElement::finishParsingChildren): Deleted. Handling updates
1618         after parsing all the children now comes naturally out of the new implementation.
1619         (WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Added.
1620         Schedules a call to updateAfterStyleResolution when needed, and equally importantly,
1621         increments the load event delay count to make sure that loads that are part of that
1622         update can participate in decision about whether it's time for the load event.
1623         (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Added.
1624         Combines updateWidgetIfNecessary and startLoadingImage, and also deals with the new
1625         m_needsImageReload boolean in cases where no actual loading is done.
1626         (WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Update load event delay
1627         count when moving an element that is in the middle of loading. This lets the
1628         updateAfterStyleResolution function do the right thing even when the element is
1629         moved without leaving anything stuck in a strange state.
1630         (WebCore::HTMLPlugInImageElement::prepareForDocumentSuspension): Call the new
1631         scheduleUpdateForAfterStyleResolution since invalidating style is no longer sufficient.
1632         (WebCore::HTMLPlugInImageElement::startLoadingImage): Deleted. Now handled by
1633         updateAfterStyleResolution instead.
1634         (WebCore::HTMLPlugInImageElement::updateImageLoaderWithNewURLSoon): Added. Does all
1635         the right things for when an image URL is changed; for use by the concrete derived classes.
1636         * html/HTMLPlugInImageElement.h: Updated for above changes. Also made m_imageLoader
1637         private rather than protected, and added the two new boolean data members.
1638
1639         * html/HTMLTagNames.in: Removed unneeded constructorNeedsCreatedByParser flags for
1640         applet, embed, and object.
1641
1642         * loader/DocumentLoader.cpp:
1643         (WebCore::DocumentLoader::isLoadingInAPISense): Return true if the document is
1644         delaying a load event.
1645
1646         * loader/FrameLoader.cpp:
1647         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Don't do any work if
1648         isDelayingLoadEvent is true; otherwise this function can have a side effect of
1649         triggering the load event.
1650         (WebCore::FrameLoader::detachFromParent): Schedule a checkLoadComplete here, too, not
1651         just a checkCompleted. This is relevant if the frame we are detaching was delaying
1652         a load event because it no longer will be and so the load might be complete.
1653
1654 2017-07-30  Sam Weinig  <sam@webkit.org>
1655
1656         [WebIDL] Remove JS builtin bindings for FetchRequest, DOMWindowFetch and WorkerGlobalScopeFetch
1657         https://bugs.webkit.org/show_bug.cgi?id=174974
1658
1659         Reviewed by Darin Adler.
1660
1661         * CMakeLists.txt:
1662         * DerivedSources.make:
1663         * WebCore.xcodeproj/project.pbxproj:
1664         * Modules/fetch/DOMWindowFetch.js: Removed.
1665         * Modules/fetch/FetchRequest.js: Removed.
1666         * Modules/fetch/WorkerGlobalScopeFetch.js: Removed.
1667         Remove builtin files.
1668
1669         * Modules/fetch/DOMWindowFetch.cpp:
1670         (WebCore::DOMWindowFetch::fetch):
1671         * Modules/fetch/DOMWindowFetch.h:
1672         * Modules/fetch/DOMWindowFetch.idl:
1673         * Modules/fetch/WorkerGlobalScopeFetch.cpp:
1674         (WebCore::WorkerGlobalScopeFetch::fetch):
1675         * Modules/fetch/WorkerGlobalScopeFetch.h:
1676         * Modules/fetch/WorkerGlobalScopeFetch.idl:
1677         Remove builtin and instead create FetchRequest in the implementation.
1678
1679         * Modules/fetch/FetchBody.cpp:
1680         (WebCore::FetchBody::extract):
1681         * Modules/fetch/FetchBody.h:
1682         * Modules/fetch/FetchBodyOwner.cpp:
1683         (WebCore::FetchBodyOwner::extractBody):
1684         * Modules/fetch/FetchBodyOwner.h:
1685         * Modules/fetch/FetchResponse.cpp:
1686         * Modules/fetch/FetchResponse.h:
1687         Rename FetchBody::BindingDataType to FetchBody::Init to match its IDL naming.
1688
1689         * Modules/fetch/FetchHeaders.cpp:
1690         (WebCore::appendToHeaderMap):
1691         (WebCore::fillHeaderMap):
1692         (WebCore::FetchHeaders::create):
1693         (WebCore::FetchHeaders::fill):
1694         * Modules/fetch/FetchHeaders.h:
1695         Add helpers to implement the fill algorithm for various input types.
1696         Leave the existing fill for now, as it is still used by the FetchResponse
1697         builtin, but will eventually be removed.
1698
1699         * Modules/fetch/FetchRequest.cpp:
1700         (WebCore::FetchRequest::initializeOptions):
1701         (WebCore::FetchRequest::initializeWith):
1702         (WebCore::FetchRequest::setBody):
1703         (WebCore::FetchRequest::create):
1704         (WebCore::FetchRequest::setBodyFromInputRequest): Deleted.
1705         * Modules/fetch/FetchRequest.h:
1706         Migrate builtin code to the implementation. This is 1-to-1 re-implementation,
1707         so I did not attempt to fix any conformance issues. That will come in follow up.
1708
1709         * Modules/fetch/FetchRequest.idl:
1710         Replace builtins with an IDL constructor.
1711
1712         * Modules/fetch/FetchRequestInit.h:
1713         * Modules/fetch/FetchRequestInit.idl:
1714         Add missing headers and body to FetchRequestInit.
1715
1716 2017-07-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
1717
1718         RenderImageResourceStyleImage::image() should return the nullImage() if the image is not available
1719         https://bugs.webkit.org/show_bug.cgi?id=174874
1720         <rdar://problem/33530130>
1721
1722         Reviewed by Darin Adler.
1723
1724         If an <img> element has image content data for a none cached image, e.g.
1725         -webkit-named-image, RenderImageResourceStyleImage will be created and 
1726         attached to the RenderImage. RenderImageResourceStyleImage::m_cachedImage
1727         will be set to null because the m_styleImage->isCachedImage() is false in
1728         this case. When ImageLoader finishes loading the url of the src attribute, 
1729         RenderImageResource::setCachedImage() will be called to set m_cachedImage.
1730
1731         A crash will happen when the RenderImage is destroyed. Destroying the 
1732         RenderImage calls RenderImageResourceStyleImage::shutdown() which checks
1733         m_cachedImage and finds it not null, so it calls RenderImageResourceStyleImage::image()
1734         which ends up calling CSSNamedImageValue::image() which returns a null pointer
1735         because the size is empty. RenderImageResourceStyleImage::shutdown() calls
1736         image()->stopAnimation() without checking the return value of image().
1737
1738         Like the base class virtual method RenderImageResource::image(), 
1739         RenderImageResourceStyleImage::image() should return the nullImage() if
1740         the image is not available.
1741
1742         Test: fast/images/image-element-image-content-data.html
1743
1744         * css/CSSCrossfadeValue.cpp:
1745         * css/CSSFilterImageValue.cpp:
1746         * page/EventHandler.cpp:
1747         * page/PageSerializer.cpp:
1748         * rendering/RenderElement.cpp:
1749         * rendering/RenderImageResource.cpp:
1750         * rendering/RenderImageResourceStyleImage.cpp:
1751         (WebCore::RenderImageResourceStyleImage::initialize):
1752
1753         (WebCore::RenderImageResourceStyleImage::shutdown): Revert back the changes
1754         of r208511 in this function. Add a call to image()->stopAnimation() without
1755         checking the return of image() since it will return the nullImage() if
1756         the image not available. There is no need to check m_cachedImage before 
1757         calling image() because image() does not check or access m_cachedImage.
1758
1759         (WebCore::RenderImageResourceStyleImage::image): The base class method
1760         RenderImageResource::image() returns the nullImage() if the image not
1761         available. This is because CachedImage::imageForRenderer() returns
1762         the nullImage() if the image is not available; see CachedImage.h. We should
1763         do the same for the derived class for consistency.
1764
1765         * rendering/style/ContentData.cpp:
1766         * rendering/style/StyleCachedImage.cpp:
1767         * style/StylePendingResources.cpp:
1768
1769 2017-07-29  Filip Pizlo  <fpizlo@apple.com>
1770
1771         Unreviewed, rollout r220044 because it set the bots on fire.
1772         
1773         It seems that the "-Wunguarded-availability-new" pragma is not widely supported. So, a bunch of the
1774         Mac bots are now unable to build and that includes EWS.
1775         
1776         Fixing by rolling it out.
1777
1778         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
1779         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1780         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1781         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample):
1782         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
1783         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
1784         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1785         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1786         (-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
1787         (-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
1788         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
1789         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
1790         (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
1791         (WebCore::SourceBufferPrivateAVFObjC::flush):
1792
1793 2017-07-29  Dan Bernstein  <mitz@apple.com>
1794
1795         Fixed building for macOS 10.12 with the macOS 10.13 SDK.
1796
1797         Suppressed the unguarded-availability-new warning around uses of AVSampleBufferAudioRenderer
1798         and AVSampleBufferRenderSynchronizer. Even though the 10.13 SDK declares them as available
1799         starting in that release, they have been available as SPI earlier.
1800
1801         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
1802         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1803         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1804         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample):
1805         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
1806         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
1807         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1808         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1809         (-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
1810         (-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
1811         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
1812         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
1813         (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
1814         (WebCore::SourceBufferPrivateAVFObjC::flush):
1815
1816 2017-07-29  Nan Wang  <n_wang@apple.com>
1817
1818         AX: findMatchingObjects doesn't work when the startObject is ignored
1819         https://bugs.webkit.org/show_bug.cgi?id=174965
1820
1821         Reviewed by Chris Fleizach.
1822
1823         findMatchingObjects would return a wrong element if we pass in an ignored
1824         start object. To fix this, we should use the closest accessible sibling as 
1825         the start object.
1826
1827         Test: accessibility/mac/search-predicate-from-ignored-element.html
1828
1829         * accessibility/AccessibilityObject.cpp:
1830         (WebCore::appendChildrenToArray):
1831
1832 2017-07-29  Aaron Chu  <aaron_chu@apple.com>
1833
1834         AX: FKA: Buttons need a visible focus indicator
1835         https://bugs.webkit.org/show_bug.cgi?id=171040
1836         <rdar://problem/30922548>
1837
1838         Reviewed by Antoine Quint.
1839
1840         Added a background color for the focus state of the icon buttons in modern media controls.
1841
1842         Test: media/modern-media-controls/button/button-focus-state.html
1843
1844         * Modules/modern-media-controls/controls/button.css:
1845         (button:focus):
1846         (button:focus > picture):
1847         * Modules/modern-media-controls/controls/slider.css:
1848         (.slider > input):
1849
1850 2017-07-28  Sam Weinig  <sam@webkit.org>
1851
1852         [WebIDL] Remove JS builtin bindings for FetchHeaders
1853         https://bugs.webkit.org/show_bug.cgi?id=174905
1854
1855         Reviewed by Alex Christensen.
1856
1857         * CMakeLists.txt:
1858         * DerivedSources.make:
1859         * WebCore.xcodeproj/project.pbxproj:
1860         * Modules/fetch/FetchHeaders.js: Removed.
1861         Remove FetchHeaders.js
1862
1863         * Modules/fetch/FetchHeaders.cpp:
1864         (WebCore::appendToHeaderMap):
1865         (WebCore::FetchHeaders::create):
1866         (WebCore::FetchHeaders::append):
1867         * Modules/fetch/FetchHeaders.h:
1868         (WebCore::FetchHeaders::FetchHeaders):
1869         Add create function for generated constructor.
1870         Add appendToHeaderMap static function which takes the functionality
1871         from the existing append function, and makes it useable in create.
1872
1873         * Modules/fetch/FetchHeaders.idl:
1874         Replace [JSBuiltinConstructor] with real constructor. Keep other builtin
1875         attributes as they are still used by other Fetch code.
1876
1877         * bindings/js/JSDOMConvertRecord.h:
1878         Fix record conversion to work with proxies by changing to use the method table
1879         for getOwnPropertyNames, and undefined values by not excluding undefined values. 
1880
1881 2017-07-28  Matt Baker  <mattbaker@apple.com>
1882
1883         Web Inspector: capture an async stack trace when web content calls addEventListener
1884         https://bugs.webkit.org/show_bug.cgi?id=174739
1885         <rdar://problem/33468197>
1886
1887         Reviewed by Brian Burg.
1888
1889         Test: inspector/debugger/async-stack-trace.html
1890
1891         Add instrumentation to EventTarget to support showing asynchronous
1892         stack traces when the debugger breaks in a script event listener.
1893
1894         * dom/EventTarget.cpp:
1895         (WebCore::EventTarget::addEventListener):
1896         (WebCore::EventTarget::removeEventListener):
1897         (WebCore::EventTarget::fireEventListeners):
1898         * inspector/InspectorInstrumentation.cpp:
1899         (WebCore::InspectorInstrumentation::didAddEventListenerImpl):
1900         (WebCore::InspectorInstrumentation::willRemoveEventListenerImpl):
1901         (WebCore::InspectorInstrumentation::willHandleEventImpl):
1902         (WebCore::InspectorInstrumentation::didHandleEventImpl):
1903         * inspector/InspectorInstrumentation.h:
1904         (WebCore::InspectorInstrumentation::didAddEventListener):
1905         (WebCore::InspectorInstrumentation::willRemoveEventListener):
1906         (WebCore::InspectorInstrumentation::willHandleEvent):
1907         (WebCore::InspectorInstrumentation::didHandleEvent):
1908         * inspector/PageDebuggerAgent.cpp:
1909         (WebCore::PageDebuggerAgent::didClearAsyncStackTraceData):
1910         (WebCore::PageDebuggerAgent::didAddEventListener):
1911         (WebCore::PageDebuggerAgent::willRemoveEventListener):
1912         (WebCore::PageDebuggerAgent::willHandleEvent):
1913         * inspector/PageDebuggerAgent.h:
1914
1915 2017-07-28  Matt Rajca  <mrajca@apple.com>
1916
1917         Don't add autoplay restrictions to media elements created in response to user gestures.
1918         https://bugs.webkit.org/show_bug.cgi?id=174947
1919
1920         Reviewed by Eric Carlson.
1921
1922         Test: media/video-create-with-user-gesture.html
1923
1924         * html/HTMLMediaElement.cpp:
1925         (WebCore::HTMLMediaElement::HTMLMediaElement):
1926
1927 2017-07-28  Jeremy Jones  <jeremyj@apple.com>
1928
1929         WebMediaSessionHelper calls -[UIApplication beginReceivingRemoteControlEvents] from WebThread
1930         https://bugs.webkit.org/show_bug.cgi?id=174934
1931         rdar://problem/33586772
1932
1933         Reviewed by Eric Carlson.
1934
1935         No new tests because no effect on DOM.
1936
1937         This dispatches a UIKit call to the main thread since it might happen on WebThread in WK1.
1938
1939         * platform/audio/ios/MediaSessionManagerIOS.mm:
1940         (-[WebMediaSessionHelper initWithCallback:]):
1941
1942 2017-07-28  Myles C. Maxfield  <mmaxfield@apple.com>
1943
1944         [macOS] Reeder's defaults font is Times instead of San Francisco
1945         https://bugs.webkit.org/show_bug.cgi?id=174885
1946         <rdar://problem/33462483>
1947
1948         Reviewed by Simon Fraser.
1949
1950         Reeder uses explicit dot-prefixed names in its source code. Within Core Text,
1951         dot-prefixed names cannot be matched case insensitively. The solution is to
1952         not case-fold these family names, and to make our caches case sensitive for
1953         these special names.
1954
1955         Tests: fast/text/font-lookup-dot-prefix-case-sensitive-2.html
1956                fast/text/font-lookup-dot-prefix-case-sensitive.html
1957
1958         * platform/graphics/FontCache.cpp:
1959         (WebCore::FontPlatformDataCacheKey::operator==):
1960         (WebCore::FontPlatformDataCacheKeyHash::hash):
1961         * platform/graphics/FontCascade.cpp:
1962         (WebCore::keysMatch):
1963         (WebCore::computeFontCascadeCacheHash):
1964         * platform/graphics/FontDescription.cpp:
1965         (WebCore::FontCascadeDescription::familyNamesAreEqual):
1966         (WebCore::FontCascadeDescription::familyNameHash):
1967         (WebCore::FontCascadeDescription::foldedFamilyName):
1968         * platform/graphics/FontDescription.h:
1969         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1970         (WebCore::FontDatabase::fontForPostScriptName):
1971
1972 2017-07-28  Devin Rousso  <drousso@apple.com>
1973
1974         Web Inspector: Record actions performed on CanvasRenderingContext2D
1975         https://bugs.webkit.org/show_bug.cgi?id=174482
1976
1977         Reviewed by Joseph Pecoraro.
1978
1979         Tests: inspector/canvas/recording-2d.html
1980                inspector/canvas/recording.html
1981
1982         * html/canvas/CanvasRenderingContext2D.idl:
1983         Add CallTracingCallback to interface to record all API calls.
1984
1985         * html/HTMLCanvasElement.cpp:
1986         (WebCore::HTMLCanvasElement::paint):
1987         If a recording is active, mark the current frame as completed.
1988
1989         * bindings/scripts/CodeGeneratorJS.pm:
1990         (GenerateAttributeGetterBodyDefinition):
1991         (GenerateAttributeSetterBodyDefinition):
1992         (GenerateImplementationFunctionCall):
1993         (GenerateCallTracerParameter):
1994         (GenerateCallTracer):
1995         * bindings/scripts/test/TestCallTracer.idl:
1996         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
1997         (WebCore::setJSTestCallTracerTestAttributeInterfaceSetter):
1998         (WebCore::setJSTestCallTracerTestAttributeSpecifiedSetter):
1999         (WebCore::jsTestCallTracerTestAttributeWithVariantGetter):
2000         (WebCore::jsTestCallTracerTestAttributeWithVariant):
2001         (WebCore::setJSTestCallTracerTestAttributeWithVariantSetter):
2002         (WebCore::setJSTestCallTracerTestAttributeWithVariant):
2003         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationInterfaceBody):
2004         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationSpecifiedBody):
2005         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArgumentsBody):
2006         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgumentBody):
2007         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgumentBody):
2008         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgument):
2009         * inspector/InspectorCanvas.h:
2010         * inspector/InspectorCanvas.cpp:
2011         (WebCore::InspectorCanvas::recordAction):
2012         (WebCore::InspectorCanvas::buildAction):
2013         Change CallTracer IDL generation to flatten any variants so that all types for the
2014         parameters of an action are able to be listed in a single variant. This prevents possible
2015         ambiguity when constructing the variant, as they require that exactly one type be
2016         constructible and a sub-variant might not satisfy that condition. This was only an issue for
2017         older mac SDKs.
2018
2019         * bindings/js/CallTracer.h:
2020         * bindings/js/CallTracer.cpp:
2021         (WebCore::CallTracer::recordCanvasAction):
2022         * bindings/js/CallTracerTypes.h:
2023         * inspector/InspectorCanvasAgent.h:
2024         * inspector/InspectorCanvasAgent.cpp:
2025         (WebCore::InspectorCanvasAgent::recordCanvasAction):
2026         * inspector/InspectorInstrumentation.h:
2027         * inspector/InspectorInstrumentation.cpp:
2028         (WebCore::InspectorInstrumentation::recordCanvasAction):
2029         (WebCore::InspectorInstrumentation::recordCanvasActionImpl):
2030         Rename CanvasActionParameterVariant to RecordCanvasActionVariant to match what is expected by
2031         the IDL generator. Also remove unnecessary includes now that they are in CallTracerTypes.h.
2032
2033         * CMakeLists.txt:
2034         * bindings/js/JSBindingsAllInOne.cpp:
2035         Add CallTracer for CMake builds.
2036
2037 2017-07-28  Sam Weinig  <sam@webkit.org>
2038
2039         [WebIDL] Split-up and cleanup Fetch IDL files in preparation for removing unnecessary js builtins
2040         https://bugs.webkit.org/show_bug.cgi?id=174915
2041
2042         Reviewed by Alex Christensen.
2043
2044         - Split FetchRequest enums and Init dictionary out of FetchRequest so they
2045           can be used from other files like WorkerGlobalScopeFetch and DOMWindowFetch.
2046         - Add missing FetchResponseInit. Currently unused but will be in a subsequent patch.
2047         - Add and update comments about missing properties and functions.
2048
2049         * CMakeLists.txt:
2050         * DerivedSources.make:
2051         * WebCore.xcodeproj/project.pbxproj:
2052         * Modules/fetch/DOMWindowFetch.idl:
2053         * Modules/fetch/FetchBody.idl:
2054         * Modules/fetch/FetchBodyOwner.h:
2055         * Modules/fetch/FetchHeaders.h:
2056         * Modules/fetch/FetchHeaders.idl:
2057         * Modules/fetch/FetchReferrerPolicy.h: Added.
2058         * Modules/fetch/FetchReferrerPolicy.idl: Added.
2059         * Modules/fetch/FetchRequest.h:
2060         * Modules/fetch/FetchRequest.idl:
2061         * Modules/fetch/FetchRequestCache.h: Added.
2062         * Modules/fetch/FetchRequestCache.idl: Added.
2063         * Modules/fetch/FetchRequestCredentials.h: Added.
2064         * Modules/fetch/FetchRequestCredentials.idl: Added.
2065         * Modules/fetch/FetchRequestInit.h: Added.
2066         * Modules/fetch/FetchRequestInit.idl: Added.
2067         * Modules/fetch/FetchRequestMode.h: Added.
2068         * Modules/fetch/FetchRequestMode.idl: Added.
2069         * Modules/fetch/FetchRequestRedirect.h: Added.
2070         * Modules/fetch/FetchRequestRedirect.idl: Added.
2071         * Modules/fetch/FetchResponse.h:
2072         * Modules/fetch/FetchResponse.idl:
2073         * Modules/fetch/WorkerGlobalScopeFetch.idl:
2074
2075 2017-07-28  Myles C. Maxfield  <mmaxfield@apple.com>
2076
2077         REGRESSION(r216944): Fallback fonts erroneously visible when the primary font is loading
2078         https://bugs.webkit.org/show_bug.cgi?id=174772
2079         <rdar://problem/33267643>
2080
2081         Reviewed by Simon Fraser.
2082
2083         During a font load, we try pretty hard to find a font to use that isn't the
2084         last resort font (which happens to be Times). We do this by iterating through
2085         all the fonts in the font-family list, as well as through all the relevant
2086         @font-face blocks which share the requested font family name. 
2087
2088         Unfortunately, if we find one of these fallback fonts, we were simply using it
2089         directly, which means that it was being drawn as visible (because the
2090         visibility setting lives inside the Font object). Instead, we should carry the
2091         invisibility setting from the interstitial font to this used fallback font.
2092
2093         This patch is an extension of r219221, which fixed the problem only for system
2094         fallback fonts. This patch adopts the same methodology to all fallback fonts.
2095
2096         Test: http/tests/webfont/font-loading-system-fallback-visibility-FontRanges.html
2097
2098         * platform/graphics/FontCascadeFonts.cpp:
2099         (WebCore::FontCascadeFonts::glyphDataForVariant):
2100         (WebCore::glyphPageFromFontRanges):
2101         * platform/graphics/FontRanges.cpp:
2102         (WebCore::FontRanges::glyphDataForCharacter):
2103
2104 2017-07-28  Frederic Wang  <fwang@igalia.cpm>
2105
2106         Fix typo in scrollPositionChangedViaDelegatedScrolling
2107         https://bugs.webkit.org/show_bug.cgi?id=174937
2108
2109         Reviewed by Wenson Hsieh.
2110
2111         No new tests, fix typo in the inUserInteraction parameter.
2112
2113         * page/scrolling/ScrollingTree.cpp:
2114         (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
2115         * page/scrolling/ScrollingTree.h:
2116
2117 2017-07-28  Wenson Hsieh  <wenson_hsieh@apple.com>
2118
2119         [iOS DnD] [WK1] Snapshots generated using -[DOMRange renderImageForcingBlackText:] are upside down
2120         https://bugs.webkit.org/show_bug.cgi?id=174928
2121         <rdar://problem/33584280>
2122
2123         Reviewed by Tim Horton.
2124
2125         Pulls the implementation of createDragImageForRange out into DragImageIOS, and use TextIndicator to generate a
2126         snapshot instead of FrameSelection's snapshotting utilities. This makes snapshotting a DOMRange behave the same
2127         way as snapshotting a dragged selection.
2128
2129         No way of testing TextIndicator-based snapshotting yet.
2130
2131         * platform/DragImage.cpp:
2132
2133         Guard createDragImageForRange for !PLATFORM(IOS).
2134
2135         * platform/ios/DragImageIOS.mm:
2136         (WebCore::createDragImageForSelection):
2137
2138         Add a FIXME to point out that having an additional context flip inside the UIGraphicsImageRenderer block results
2139         in an upside-down drag image being returned from createDragImageFromImage. This image is being flipped elsewhere
2140         in drag initiation code, which eventually results in the correct orientation; we'll need further investigation
2141         to remove this extraneous flip.
2142
2143         (WebCore::createDragImageForRange):
2144
2145 2017-07-28  Jeremy Jones  <jeremyj@apple.com>
2146
2147         Remove Web prefix from WebVideoFullscreen and WebPlaybackSession classes.
2148         https://bugs.webkit.org/show_bug.cgi?id=174437
2149
2150         Reviewed by Darin Adler.
2151
2152         No new tests because no behavior change.
2153
2154         Remove redundant Web- prefix from classes in WebCore namespace.
2155
2156         * WebCore.xcodeproj/project.pbxproj:
2157         * html/HTMLMediaElement.cpp:
2158         * html/HTMLVideoElement.cpp:
2159         * platform/cocoa/PlaybackSessionInterface.h: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionInterface.h.
2160         (WebCore::PlaybackSessionInterface::~PlaybackSessionInterface):
2161         * platform/cocoa/PlaybackSessionModel.h: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h.
2162         (WebCore::PlaybackSessionModel::~PlaybackSessionModel):
2163         (WebCore::PlaybackSessionModelClient::~PlaybackSessionModelClient):
2164         (WebCore::PlaybackSessionModelClient::externalPlaybackChanged):
2165         * platform/cocoa/PlaybackSessionModelMediaElement.h: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h.
2166         * platform/cocoa/PlaybackSessionModelMediaElement.mm: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm.
2167         * platform/cocoa/VideoFullscreenChangeObserver.h: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenChangeObserver.h.
2168         (WebCore::VideoFullscreenChangeObserver::~VideoFullscreenChangeObserver):
2169         * platform/cocoa/VideoFullscreenModel.h: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenModel.h.
2170         (WebCore::VideoFullscreenModel::~VideoFullscreenModel):
2171         (WebCore::VideoFullscreenModelClient::~VideoFullscreenModelClient):
2172         * platform/cocoa/VideoFullscreenModelVideoElement.h: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.h.
2173         (WebCore::VideoFullscreenModelVideoElement::create):
2174         * platform/cocoa/VideoFullscreenModelVideoElement.mm: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.mm.
2175         * platform/ios/PlaybackSessionInterfaceAVKit.h: Renamed from Source/WebCore/platform/ios/WebPlaybackSessionInterfaceAVKit.h.
2176         * platform/ios/PlaybackSessionInterfaceAVKit.mm: Renamed from Source/WebCore/platform/ios/WebPlaybackSessionInterfaceAVKit.mm.
2177         * platform/ios/VideoFullscreenInterfaceAVKit.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h.
2178         * platform/ios/VideoFullscreenInterfaceAVKit.mm: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm.
2179         * platform/ios/WebAVPlayerController.h:
2180         * platform/ios/WebAVPlayerController.mm:
2181         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2182         * platform/mac/PlaybackSessionInterfaceMac.h: Renamed from Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h.
2183         * platform/mac/PlaybackSessionInterfaceMac.mm: Renamed from Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm.
2184         * platform/mac/VideoFullscreenInterfaceMac.h: Renamed from Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h.
2185         * platform/mac/VideoFullscreenInterfaceMac.mm: Renamed from Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm.
2186         * platform/mac/WebPlaybackControlsManager.h:
2187         * platform/mac/WebPlaybackControlsManager.mm:
2188
2189 2017-07-27  Jeremy Jones  <jeremyj@apple.com>
2190
2191         Don't override _allowsMediaDocumentInlinePlayback in MediaDocument with playsinlineAttr.
2192         https://bugs.webkit.org/show_bug.cgi?id=174850
2193         rdar://problem/33449903
2194
2195         Reviewed by Jon Lee.
2196
2197         This change removes playsinlineAttr from MediaDocument so that it doesn't override the setting
2198         from _allowsMediaDocumentInlinePlayback. In its place is an update to requiresFullscreenForVideoPlayback
2199         that implements the details of exactly which media documents are still allowed to play inlne.
2200
2201         Media documents always use a video element; but when there are no video tracks, it has behavior like 
2202         an audio element. See media-controller.js isAudio().
2203
2204         This change preserves this behavior with respect to fullscreen requirements for media document by
2205         mirroring the isAudio() check in requiresFullscreenForVideoPlayback.
2206
2207         * html/MediaDocument.cpp:
2208         (WebCore::MediaDocumentParser::createDocumentStructure):
2209         * html/MediaElementSession.cpp:
2210         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
2211
2212 2017-07-27  Jeremy Jones  <jeremyj@apple.com>
2213
2214         MediaDocument fullscreen pinch gesture should trigger navigate back.
2215         https://bugs.webkit.org/show_bug.cgi?id=174914
2216
2217         Reviewed by Jon Lee.
2218
2219         No new tests because only effect is from interaction with platform.
2220
2221         For media documents, pressing the "done" button on fullscreen video navigates back
2222         to the previous page. The same should happen for other gestures that pause playback
2223         when returning to inline. This allows the gesture to have the same behavior as the
2224         button.
2225
2226         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2227         (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):
2228
2229 2017-07-27  Aaron Chu  <aaron_chu@apple.com>
2230
2231         AX: VoiceOver silent or skipping over time values on media player.
2232         https://bugs.webkit.org/show_bug.cgi?id=174324
2233         <rdar://problem/32021784>
2234
2235         Reviewed by Antoine Quint.
2236
2237         Added role attribute to modern media controls time lable class so that VoiceOver can access the time label when the media is playing.
2238
2239         Test Updated: media/modern-media-controls/time-label/time-label.html
2240         Test Added: media/modern-media-controls/time-label/ios-time-label.html
2241         
2242         * Modules/modern-media-controls/controls/time-label.js:
2243
2244 2017-07-27  Yusuke Suzuki  <utatane.tea@gmail.com>
2245
2246         Hoist DOM binding attribute getter prologue into JavaScriptCore taking advantage of DOMJIT / CheckSubClass
2247         https://bugs.webkit.org/show_bug.cgi?id=171637
2248
2249         Reviewed by Darin Adler.
2250
2251         We use DOMAttribute. When DOMAttribute is specified, ClassInfo check is performed by JSC side.
2252         So, we can drop ClassInfo check from the actual function.
2253
2254         We also simplify DOMJIT::GetterSetter to make it smaller size.
2255
2256         WebCore size comparison
2257             Before: 48443292
2258             After:  48087800 (0.7% reduction)
2259
2260         Speedometer Scores show 0.8% improvement.
2261             Before: 158.9 +- 0.46
2262             After:  160.2 +- 0.36
2263
2264         Dromaeo DOM core Scores show 5.8% improvement.
2265                                         Before                   After
2266             Total Score:         8424.12runs/s ±1.38%     8911.60runs/s ±1.47%
2267               DOM Attributes    12627.27runs/s ±1.87%    14023.17runs/s ±1.87%
2268               DOM Modification   1207.82runs/s ±2.48%     1204.21runs/s ±3.05%
2269               DOM Query         68068.82runs/s ±0.63%    74273.38runs/s ±0.69%
2270               DOM Traversal      1240.07runs/s ±1.96%     1256.64runs/s ±1.77%
2271
2272         Performance improvement can be explained by the following optimizations.
2273
2274         1. Type checks are typically eliminated in all the JIT tiers. IC / DFG / FTL can
2275            drop type checks since get_by_id operation already performs a structure check
2276            which subsumes this type check.
2277         2. Direct getter call by CallDOMGetter without creating IC in DFG and FTL.
2278
2279         * bindings/js/JSDOMAttribute.h:
2280         (WebCore::IDLAttribute::get):
2281         Add CastedThisErrorBehavior::Assert case. When this is specified, we perform casting without using jsDynamicCast.
2282
2283         * bindings/scripts/CodeGeneratorJS.pm:
2284         (IsAcceleratedDOMAttribute):
2285         (GetJSCAttributesForAttribute):
2286         (GenerateHeader):
2287         (GeneratePropertiesHashTable):
2288         (GenerateImplementation):
2289         (GenerateAttributeGetterTrampolineDefinition):
2290         (GenerateAttributeGetterDefinition):
2291         (GenerateCallbackImplementationContent):
2292         (GenerateHashTableValueArray):
2293         (GenerateHashTable):
2294         (GenerateConstructorHelperMethods):
2295         Update CodeGeneratorJS to emit DOMAttribute. And DOMJIT::GetterSetter becomes changed to be smaller size.
2296
2297         * bindings/scripts/test/JS/JSInterfaceName.cpp:
2298         (WebCore::JSInterfaceNamePrototype::finishCreation):
2299         * bindings/scripts/test/JS/JSMapLike.cpp:
2300         (WebCore::JSMapLikePrototype::finishCreation):
2301         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
2302         (WebCore::JSReadOnlyMapLikePrototype::finishCreation):
2303         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2304         (WebCore::JSTestActiveDOMObjectPrototype::finishCreation):
2305         (WebCore::jsTestActiveDOMObjectExcitingAttr):
2306         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
2307         (WebCore::JSTestCEReactionsPrototype::finishCreation):
2308         (WebCore::jsTestCEReactionsAttributeWithCEReactions):
2309         (WebCore::jsTestCEReactionsReflectAttributeWithCEReactions):
2310         (WebCore::jsTestCEReactionsStringifierAttribute):
2311         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
2312         (WebCore::JSTestCEReactionsStringifierPrototype::finishCreation):
2313         (WebCore::jsTestCEReactionsStringifierValue):
2314         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
2315         (WebCore::JSTestCallTracerPrototype::finishCreation):
2316         (WebCore::jsTestCallTracerTestAttributeInterface):
2317         (WebCore::jsTestCallTracerTestAttributeSpecified):
2318         * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
2319         (WebCore::JSTestCallbackInterfaceConstructor::initializeProperties):
2320         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
2321         (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::finishCreation):
2322         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2323         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation):
2324         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
2325         (WebCore::JSTestDOMJITPrototype::finishCreation):
2326         (WebCore::TestDOMJITAnyAttrDOMJIT::TestDOMJITAnyAttrDOMJIT): Deleted.
2327         (WebCore::domJITGetterSetterForTestDOMJITAnyAttr): Deleted.
2328         (WebCore::TestDOMJITBooleanAttrDOMJIT::TestDOMJITBooleanAttrDOMJIT): Deleted.
2329         (WebCore::domJITGetterSetterForTestDOMJITBooleanAttr): Deleted.
2330         (WebCore::TestDOMJITByteAttrDOMJIT::TestDOMJITByteAttrDOMJIT): Deleted.
2331         (WebCore::domJITGetterSetterForTestDOMJITByteAttr): Deleted.
2332         (WebCore::TestDOMJITOctetAttrDOMJIT::TestDOMJITOctetAttrDOMJIT): Deleted.
2333         (WebCore::domJITGetterSetterForTestDOMJITOctetAttr): Deleted.
2334         (WebCore::TestDOMJITShortAttrDOMJIT::TestDOMJITShortAttrDOMJIT): Deleted.
2335         (WebCore::domJITGetterSetterForTestDOMJITShortAttr): Deleted.
2336         (WebCore::TestDOMJITUnsignedShortAttrDOMJIT::TestDOMJITUnsignedShortAttrDOMJIT): Deleted.
2337         (WebCore::domJITGetterSetterForTestDOMJITUnsignedShortAttr): Deleted.
2338         (WebCore::TestDOMJITLongAttrDOMJIT::TestDOMJITLongAttrDOMJIT): Deleted.
2339         (WebCore::domJITGetterSetterForTestDOMJITLongAttr): Deleted.
2340         (WebCore::TestDOMJITUnsignedLongAttrDOMJIT::TestDOMJITUnsignedLongAttrDOMJIT): Deleted.
2341         (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongAttr): Deleted.
2342         (WebCore::TestDOMJITLongLongAttrDOMJIT::TestDOMJITLongLongAttrDOMJIT): Deleted.
2343         (WebCore::domJITGetterSetterForTestDOMJITLongLongAttr): Deleted.
2344         (WebCore::TestDOMJITUnsignedLongLongAttrDOMJIT::TestDOMJITUnsignedLongLongAttrDOMJIT): Deleted.
2345         (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongLongAttr): Deleted.
2346         (WebCore::TestDOMJITFloatAttrDOMJIT::TestDOMJITFloatAttrDOMJIT): Deleted.
2347         (WebCore::domJITGetterSetterForTestDOMJITFloatAttr): Deleted.
2348         (WebCore::TestDOMJITUnrestrictedFloatAttrDOMJIT::TestDOMJITUnrestrictedFloatAttrDOMJIT): Deleted.
2349         (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedFloatAttr): Deleted.
2350         (WebCore::TestDOMJITDoubleAttrDOMJIT::TestDOMJITDoubleAttrDOMJIT): Deleted.
2351         (WebCore::domJITGetterSetterForTestDOMJITDoubleAttr): Deleted.
2352         (WebCore::TestDOMJITUnrestrictedDoubleAttrDOMJIT::TestDOMJITUnrestrictedDoubleAttrDOMJIT): Deleted.
2353         (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedDoubleAttr): Deleted.
2354         (WebCore::TestDOMJITDomStringAttrDOMJIT::TestDOMJITDomStringAttrDOMJIT): Deleted.
2355         (WebCore::domJITGetterSetterForTestDOMJITDomStringAttr): Deleted.
2356         (WebCore::TestDOMJITByteStringAttrDOMJIT::TestDOMJITByteStringAttrDOMJIT): Deleted.
2357         (WebCore::domJITGetterSetterForTestDOMJITByteStringAttr): Deleted.
2358         (WebCore::TestDOMJITUsvStringAttrDOMJIT::TestDOMJITUsvStringAttrDOMJIT): Deleted.
2359         (WebCore::domJITGetterSetterForTestDOMJITUsvStringAttr): Deleted.
2360         (WebCore::TestDOMJITNodeAttrDOMJIT::TestDOMJITNodeAttrDOMJIT): Deleted.
2361         (WebCore::domJITGetterSetterForTestDOMJITNodeAttr): Deleted.
2362         (WebCore::TestDOMJITBooleanNullableAttrDOMJIT::TestDOMJITBooleanNullableAttrDOMJIT): Deleted.
2363         (WebCore::domJITGetterSetterForTestDOMJITBooleanNullableAttr): Deleted.
2364         (WebCore::TestDOMJITByteNullableAttrDOMJIT::TestDOMJITByteNullableAttrDOMJIT): Deleted.
2365         (WebCore::domJITGetterSetterForTestDOMJITByteNullableAttr): Deleted.
2366         (WebCore::TestDOMJITOctetNullableAttrDOMJIT::TestDOMJITOctetNullableAttrDOMJIT): Deleted.
2367         (WebCore::domJITGetterSetterForTestDOMJITOctetNullableAttr): Deleted.
2368         (WebCore::TestDOMJITShortNullableAttrDOMJIT::TestDOMJITShortNullableAttrDOMJIT): Deleted.
2369         (WebCore::domJITGetterSetterForTestDOMJITShortNullableAttr): Deleted.
2370         (WebCore::TestDOMJITUnsignedShortNullableAttrDOMJIT::TestDOMJITUnsignedShortNullableAttrDOMJIT): Deleted.
2371         (WebCore::domJITGetterSetterForTestDOMJITUnsignedShortNullableAttr): Deleted.
2372         (WebCore::TestDOMJITLongNullableAttrDOMJIT::TestDOMJITLongNullableAttrDOMJIT): Deleted.
2373         (WebCore::domJITGetterSetterForTestDOMJITLongNullableAttr): Deleted.
2374         (WebCore::TestDOMJITUnsignedLongNullableAttrDOMJIT::TestDOMJITUnsignedLongNullableAttrDOMJIT): Deleted.
2375         (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongNullableAttr): Deleted.
2376         (WebCore::TestDOMJITLongLongNullableAttrDOMJIT::TestDOMJITLongLongNullableAttrDOMJIT): Deleted.
2377         (WebCore::domJITGetterSetterForTestDOMJITLongLongNullableAttr): Deleted.
2378         (WebCore::TestDOMJITUnsignedLongLongNullableAttrDOMJIT::TestDOMJITUnsignedLongLongNullableAttrDOMJIT): Deleted.
2379         (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongLongNullableAttr): Deleted.
2380         (WebCore::TestDOMJITFloatNullableAttrDOMJIT::TestDOMJITFloatNullableAttrDOMJIT): Deleted.
2381         (WebCore::domJITGetterSetterForTestDOMJITFloatNullableAttr): Deleted.
2382         (WebCore::TestDOMJITUnrestrictedFloatNullableAttrDOMJIT::TestDOMJITUnrestrictedFloatNullableAttrDOMJIT): Deleted.
2383         (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedFloatNullableAttr): Deleted.
2384         (WebCore::TestDOMJITDoubleNullableAttrDOMJIT::TestDOMJITDoubleNullableAttrDOMJIT): Deleted.
2385         (WebCore::domJITGetterSetterForTestDOMJITDoubleNullableAttr): Deleted.
2386         (WebCore::TestDOMJITUnrestrictedDoubleNullableAttrDOMJIT::TestDOMJITUnrestrictedDoubleNullableAttrDOMJIT): Deleted.
2387         (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedDoubleNullableAttr): Deleted.
2388         (WebCore::TestDOMJITDomStringNullableAttrDOMJIT::TestDOMJITDomStringNullableAttrDOMJIT): Deleted.
2389         (WebCore::domJITGetterSetterForTestDOMJITDomStringNullableAttr): Deleted.
2390         (WebCore::TestDOMJITByteStringNullableAttrDOMJIT::TestDOMJITByteStringNullableAttrDOMJIT): Deleted.
2391         (WebCore::domJITGetterSetterForTestDOMJITByteStringNullableAttr): Deleted.
2392         (WebCore::TestDOMJITUsvStringNullableAttrDOMJIT::TestDOMJITUsvStringNullableAttrDOMJIT): Deleted.
2393         (WebCore::domJITGetterSetterForTestDOMJITUsvStringNullableAttr): Deleted.
2394         (WebCore::TestDOMJITNodeNullableAttrDOMJIT::TestDOMJITNodeNullableAttrDOMJIT): Deleted.
2395         (WebCore::domJITGetterSetterForTestDOMJITNodeNullableAttr): Deleted.
2396         * bindings/scripts/test/JS/JSTestDOMJIT.h:
2397         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2398         (WebCore::JSTestEventConstructorPrototype::finishCreation):
2399         (WebCore::jsTestEventConstructorAttr1):
2400         (WebCore::jsTestEventConstructorAttr2):
2401         (WebCore::jsTestEventConstructorAttr3):
2402         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2403         (WebCore::JSTestEventTargetPrototype::finishCreation):
2404         * bindings/scripts/test/JS/JSTestException.cpp:
2405         (WebCore::JSTestExceptionPrototype::finishCreation):
2406         (WebCore::jsTestExceptionName):
2407         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2408         (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
2409         (WebCore::jsTestGenerateIsReachableASecretAttribute):
2410         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
2411         (WebCore::jsTestGlobalObjectRegularAttribute):
2412         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
2413         (WebCore::JSTestIndexedSetterNoIdentifierPrototype::finishCreation):
2414         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
2415         (WebCore::JSTestIndexedSetterThrowingExceptionPrototype::finishCreation):
2416         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
2417         (WebCore::JSTestIndexedSetterWithIdentifierPrototype::finishCreation):
2418         * bindings/scripts/test/JS/JSTestInterface.cpp:
2419         (WebCore::JSTestInterfaceConstructor::initializeProperties):
2420         (WebCore::JSTestInterfacePrototype::finishCreation):
2421         (WebCore::jsTestInterfaceImplementsStr1):
2422         (WebCore::jsTestInterfaceImplementsStr2):
2423         (WebCore::jsTestInterfaceImplementsStr3):
2424         (WebCore::jsTestInterfaceImplementsNode):
2425         (WebCore::jsTestInterfaceSupplementalStr1):
2426         (WebCore::jsTestInterfaceSupplementalStr2):
2427         (WebCore::jsTestInterfaceSupplementalStr3):
2428         (WebCore::jsTestInterfaceSupplementalNode):
2429         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
2430         (WebCore::JSTestInterfaceLeadingUnderscorePrototype::finishCreation):
2431         (WebCore::jsTestInterfaceLeadingUnderscoreReadonly):
2432         * bindings/scripts/test/JS/JSTestIterable.cpp:
2433         (WebCore::JSTestIterablePrototype::finishCreation):
2434         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2435         (WebCore::JSTestJSBuiltinConstructorPrototype::finishCreation):
2436         (WebCore::jsTestJSBuiltinConstructorTestAttributeCustom):
2437         (WebCore::jsTestJSBuiltinConstructorTestAttributeRWCustom):
2438         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2439         (WebCore::JSTestMediaQueryListListenerPrototype::finishCreation):
2440         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
2441         (WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::finishCreation):
2442         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
2443         (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::finishCreation):
2444         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
2445         (WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::finishCreation):
2446         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2447         (WebCore::JSTestNamedConstructorPrototype::finishCreation):
2448         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
2449         (WebCore::JSTestNamedDeleterNoIdentifierPrototype::finishCreation):
2450         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
2451         (WebCore::JSTestNamedDeleterThrowingExceptionPrototype::finishCreation):
2452         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
2453         (WebCore::JSTestNamedDeleterWithIdentifierPrototype::finishCreation):
2454         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
2455         (WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::finishCreation):
2456         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
2457         (WebCore::JSTestNamedGetterCallWithPrototype::finishCreation):
2458         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
2459         (WebCore::JSTestNamedGetterNoIdentifierPrototype::finishCreation):
2460         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
2461         (WebCore::JSTestNamedGetterWithIdentifierPrototype::finishCreation):
2462         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
2463         (WebCore::JSTestNamedSetterNoIdentifierPrototype::finishCreation):
2464         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
2465         (WebCore::JSTestNamedSetterThrowingExceptionPrototype::finishCreation):
2466         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
2467         (WebCore::JSTestNamedSetterWithIdentifierPrototype::finishCreation):
2468         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
2469         (WebCore::JSTestNamedSetterWithIndexedGetterPrototype::finishCreation):
2470         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
2471         (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::finishCreation):
2472         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
2473         (WebCore::JSTestNamedSetterWithOverrideBuiltinsPrototype::finishCreation):
2474         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
2475         (WebCore::JSTestNamedSetterWithUnforgablePropertiesPrototype::finishCreation):
2476         (WebCore::jsTestNamedSetterWithUnforgablePropertiesUnforgeableAttribute):
2477         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
2478         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::finishCreation):
2479         (WebCore::jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsUnforgeableAttribute):
2480         * bindings/scripts/test/JS/JSTestNode.cpp:
2481         (WebCore::JSTestNodePrototype::finishCreation):
2482         (WebCore::jsTestNodeName):
2483         * bindings/scripts/test/JS/JSTestObj.cpp:
2484         (WebCore::JSTestObjConstructor::initializeProperties):
2485         (WebCore::JSTestObjPrototype::finishCreation):
2486         (WebCore::jsTestObjReadOnlyLongAttr):
2487         (WebCore::jsTestObjReadOnlyStringAttr):
2488         (WebCore::jsTestObjReadOnlyTestObjAttr):
2489         (WebCore::jsTestObjEnumAttr):
2490         (WebCore::jsTestObjByteAttr):
2491         (WebCore::jsTestObjOctetAttr):
2492         (WebCore::jsTestObjShortAttr):
2493         (WebCore::jsTestObjClampedShortAttr):
2494         (WebCore::jsTestObjEnforceRangeShortAttr):
2495         (WebCore::jsTestObjUnsignedShortAttr):
2496         (WebCore::jsTestObjLongAttr):
2497         (WebCore::jsTestObjLongLongAttr):
2498         (WebCore::jsTestObjUnsignedLongLongAttr):
2499         (WebCore::jsTestObjStringAttr):
2500         (WebCore::jsTestObjUsvstringAttr):
2501         (WebCore::jsTestObjTestObjAttr):
2502         (WebCore::jsTestObjTestNullableObjAttr):
2503         (WebCore::jsTestObjUnforgeableAttr):
2504         (WebCore::jsTestObjStringAttrTreatingNullAsEmptyString):
2505         (WebCore::jsTestObjUsvstringAttrTreatingNullAsEmptyString):
2506         (WebCore::jsTestObjByteStringAttrTreatingNullAsEmptyString):
2507         (WebCore::jsTestObjStringLongRecordAttr):
2508         (WebCore::jsTestObjUsvstringLongRecordAttr):
2509         (WebCore::jsTestObjStringObjRecordAttr):
2510         (WebCore::jsTestObjStringNullableObjRecordAttr):
2511         (WebCore::jsTestObjDictionaryAttr):
2512         (WebCore::jsTestObjNullableDictionaryAttr):
2513         (WebCore::jsTestObjAnnotatedTypeInUnionAttr):
2514         (WebCore::jsTestObjAnnotatedTypeInSequenceAttr):
2515         (WebCore::jsTestObjImplementationEnumAttr):
2516         (WebCore::jsTestObjXMLObjAttr):
2517         (WebCore::jsTestObjCreate):
2518         (WebCore::jsTestObjReflectedStringAttr):
2519         (WebCore::jsTestObjReflectedUSVStringAttr):
2520         (WebCore::jsTestObjReflectedIntegralAttr):
2521         (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
2522         (WebCore::jsTestObjReflectedBooleanAttr):
2523         (WebCore::jsTestObjReflectedURLAttr):
2524         (WebCore::jsTestObjReflectedUSVURLAttr):
2525         (WebCore::jsTestObjReflectedCustomIntegralAttr):
2526         (WebCore::jsTestObjReflectedCustomBooleanAttr):
2527         (WebCore::jsTestObjReflectedCustomURLAttr):
2528         (WebCore::jsTestObjEnabledAtRuntimeAttribute):
2529         (WebCore::jsTestObjEnabledBySettingAttribute):
2530         (WebCore::jsTestObjTypedArrayAttr):
2531         (WebCore::jsTestObjAttributeWithGetterException):
2532         (WebCore::jsTestObjAttributeWithSetterException):
2533         (WebCore::jsTestObjStringAttrWithGetterException):
2534         (WebCore::jsTestObjStringAttrWithSetterException):
2535         (WebCore::jsTestObjCustomAttr):
2536         (WebCore::jsTestObjOnfoo):
2537         (WebCore::jsTestObjOnwebkitfoo):
2538         (WebCore::jsTestObjWithScriptStateAttribute):
2539         (WebCore::jsTestObjWithCallWithAndSetterCallWithAttribute):
2540         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
2541         (WebCore::jsTestObjWithScriptStateAttributeRaises):
2542         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
2543         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
2544         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
2545         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
2546         (WebCore::jsTestObjConditionalAttr1):
2547         (WebCore::jsTestObjConditionalAttr2):
2548         (WebCore::jsTestObjConditionalAttr3):
2549         (WebCore::jsTestObjCachedAttribute1):
2550         (WebCore::jsTestObjCachedAttribute2):
2551         (WebCore::jsTestObjAnyAttribute):
2552         (WebCore::jsTestObjObjectAttribute):
2553         (WebCore::jsTestObjContentDocument):
2554         (WebCore::jsTestObjMutablePoint):
2555         (WebCore::jsTestObjStrawberry):
2556         (WebCore::jsTestObjDescription):
2557         (WebCore::jsTestObjId):
2558         (WebCore::jsTestObjHash):
2559         (WebCore::jsTestObjReplaceableAttribute):
2560         (WebCore::jsTestObjNullableDoubleAttribute):
2561         (WebCore::jsTestObjNullableLongAttribute):
2562         (WebCore::jsTestObjNullableBooleanAttribute):
2563         (WebCore::jsTestObjNullableStringAttribute):
2564         (WebCore::jsTestObjNullableLongSettableAttribute):
2565         (WebCore::jsTestObjNullableStringSettableAttribute):
2566         (WebCore::jsTestObjNullableUSVStringSettableAttribute):
2567         (WebCore::jsTestObjNullableByteStringSettableAttribute):
2568         (WebCore::jsTestObjNullableStringValue):
2569         (WebCore::jsTestObjAttribute):
2570         (WebCore::jsTestObjAttributeWithReservedEnumType):
2571         (WebCore::jsTestObjPutForwardsAttribute):
2572         (WebCore::jsTestObjPutForwardsNullableAttribute):
2573         (WebCore::jsTestObjStringifierAttribute):
2574         (WebCore::jsTestObjConditionallyReadWriteAttribute):
2575         (WebCore::jsTestObjConditionalAndConditionallyReadWriteAttribute):
2576         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2577         (WebCore::JSTestOverloadedConstructorsPrototype::finishCreation):
2578         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
2579         (WebCore::JSTestOverloadedConstructorsWithSequencePrototype::finishCreation):
2580         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2581         (WebCore::JSTestOverrideBuiltinsPrototype::finishCreation):
2582         * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
2583         (WebCore::JSTestPluginInterfacePrototype::finishCreation):
2584         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
2585         (WebCore::JSTestPromiseRejectionEventPrototype::finishCreation):
2586         (WebCore::jsTestPromiseRejectionEventReason):
2587         * bindings/scripts/test/JS/JSTestSerialization.cpp:
2588         (WebCore::JSTestSerializationPrototype::finishCreation):
2589         (WebCore::jsTestSerializationFirstStringAttribute):
2590         (WebCore::jsTestSerializationSecondLongAttribute):
2591         (WebCore::jsTestSerializationThirdUnserializableAttribute):
2592         (WebCore::jsTestSerializationFourthUnrestrictedDoubleAttribute):
2593         (WebCore::jsTestSerializationFifthLongAttribute):
2594         (WebCore::jsTestSerializationSixthTypedefAttribute):
2595         (WebCore::jsTestSerializationSeventhDirectlySerializableAttribute):
2596         (WebCore::jsTestSerializationEighthIndirectlyAttribute):
2597         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
2598         (WebCore::JSTestSerializationIndirectInheritancePrototype::finishCreation):
2599         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
2600         (WebCore::JSTestSerializationInheritPrototype::finishCreation):
2601         (WebCore::jsTestSerializationInheritInheritLongAttribute):
2602         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
2603         (WebCore::JSTestSerializationInheritFinalPrototype::finishCreation):
2604         (WebCore::jsTestSerializationInheritFinalFinalLongAttributeFoo):
2605         (WebCore::jsTestSerializationInheritFinalFinalLongAttributeBar):
2606         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2607         (WebCore::JSTestSerializedScriptValueInterfacePrototype::finishCreation):
2608         (WebCore::jsTestSerializedScriptValueInterfaceValue):
2609         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
2610         (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
2611         (WebCore::jsTestSerializedScriptValueInterfacePorts):
2612         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
2613         * bindings/scripts/test/JS/JSTestStringifier.cpp:
2614         (WebCore::JSTestStringifierPrototype::finishCreation):
2615         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
2616         (WebCore::JSTestStringifierAnonymousOperationPrototype::finishCreation):
2617         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
2618         (WebCore::JSTestStringifierNamedOperationPrototype::finishCreation):
2619         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
2620         (WebCore::JSTestStringifierOperationImplementedAsPrototype::finishCreation):
2621         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
2622         (WebCore::JSTestStringifierOperationNamedToStringPrototype::finishCreation):
2623         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
2624         (WebCore::JSTestStringifierReadOnlyAttributePrototype::finishCreation):
2625         (WebCore::jsTestStringifierReadOnlyAttributeIdentifier):
2626         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
2627         (WebCore::JSTestStringifierReadWriteAttributePrototype::finishCreation):
2628         (WebCore::jsTestStringifierReadWriteAttributeIdentifier):
2629         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2630         (WebCore::JSTestTypedefsConstructor::initializeProperties):
2631         (WebCore::JSTestTypedefsPrototype::finishCreation):
2632         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
2633         (WebCore::jsTestTypedefsSerializedScriptValue):
2634         (WebCore::jsTestTypedefsAttributeWithClamp):
2635         (WebCore::jsTestTypedefsAttributeWithClampInTypedef):
2636         (WebCore::jsTestTypedefsAttrWithGetterException):
2637         (WebCore::jsTestTypedefsAttrWithSetterException):
2638         (WebCore::jsTestTypedefsStringAttrWithGetterException):
2639         (WebCore::jsTestTypedefsStringAttrWithSetterException):
2640         (WebCore::jsTestTypedefsBufferSourceAttr):
2641         (WebCore::jsTestTypedefsDomTimeStampAttr):
2642         They are binding test rebaselines.
2643
2644         * domjit/DOMJITIDLTypeFilter.h:
2645         * domjit/JSDocumentDOMJIT.cpp:
2646         (WebCore::compileDocumentDocumentElementAttribute):
2647         (WebCore::compileDocumentBodyAttribute):
2648         (WebCore::DocumentDocumentElementDOMJIT::callDOMGetter): Deleted.
2649         (WebCore::DocumentBodyDOMJIT::callDOMGetter): Deleted.
2650         * domjit/JSNodeDOMJIT.cpp:
2651         (WebCore::compileNodeFirstChildAttribute):
2652         (WebCore::compileNodeLastChildAttribute):
2653         (WebCore::compileNodeNextSiblingAttribute):
2654         (WebCore::compileNodePreviousSiblingAttribute):
2655         (WebCore::compileNodeParentNodeAttribute):
2656         (WebCore::compileNodeNodeTypeAttribute):
2657         (WebCore::compileNodeOwnerDocumentAttribute):
2658         (WebCore::NodeFirstChildDOMJIT::callDOMGetter): Deleted.
2659         (WebCore::NodeLastChildDOMJIT::callDOMGetter): Deleted.
2660         (WebCore::NodeNextSiblingDOMJIT::callDOMGetter): Deleted.
2661         (WebCore::NodePreviousSiblingDOMJIT::callDOMGetter): Deleted.
2662         (WebCore::NodeParentNodeDOMJIT::callDOMGetter): Deleted.
2663         (WebCore::NodeNodeTypeDOMJIT::callDOMGetter): Deleted.
2664         (WebCore::NodeOwnerDocumentDOMJIT::callDOMGetter): Deleted.
2665         DOMJIT::GetterSetter becomes smaller constexpr data.
2666
2667 2017-07-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2668
2669         [GStreamer][EME] Not having a key id buffer should not always error
2670         https://bugs.webkit.org/show_bug.cgi?id=174889
2671
2672         Reviewed by Žan Doberšek.
2673
2674         In r219946 we introduced a hard requirement for a key id buffer
2675         that does not happen for all CDMs.
2676
2677         * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
2678         (webKitMediaClearKeyDecryptorSetupCipher): Check for key id buffer
2679         and error if we didn't get it.
2680         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
2681         (webkitMediaCommonEncryptionDecryptTransformInPlace): Soften the
2682         requirement for key id buffer.
2683
2684 2017-07-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2685
2686         [GStreamer][EME] Fix phony debug output in player base for supported key system
2687         https://bugs.webkit.org/show_bug.cgi?id=174888
2688
2689         Reviewed by Žan Doberšek.
2690
2691         The debug output was returning always false because that method
2692         was not checking anything before. Now it is and should reflect it.
2693
2694         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2695         (WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem):
2696
2697 2017-07-27  Zan Dobersek  <zdobersek@igalia.com>
2698
2699         [EME][GStreamer] Add barebones CDM interface implementations for ClearKey
2700         https://bugs.webkit.org/show_bug.cgi?id=174887
2701
2702         Reviewed by Xabier Rodriguez-Calvar.
2703
2704         Add empty ClearKey derivations of CDMFactory, CDMPrivate and CDMInstance
2705         classes. These will be enhanced as the implementation progresses.
2706
2707         ClearKey is added to CDMInstance::ImplementationType, and the
2708         CDMInstanceClearKey::implementationType() override returns that value.
2709         Type traits specialization for the CDMInstanceClearKey class is also
2710         added, utilizing the CDMInstance::ImplementationType::ClearKey value.
2711
2712         The implementation file is added to the WPE build, along with the
2713         necessary inclusion directory.
2714
2715         * PlatformWPE.cmake:
2716         * platform/encryptedmedia/CDMInstance.h:
2717         * platform/encryptedmedia/clearkey/CDMClearKey.cpp: Added.
2718         (WebCore::CDMFactoryClearKey::createCDM):
2719         (WebCore::CDMFactoryClearKey::supportsKeySystem):
2720         (WebCore::CDMPrivateClearKey::supportsInitDataType):
2721         (WebCore::CDMPrivateClearKey::supportsConfiguration):
2722         (WebCore::CDMPrivateClearKey::supportsConfigurationWithRestrictions):
2723         (WebCore::CDMPrivateClearKey::supportsSessionTypeWithConfiguration):
2724         (WebCore::CDMPrivateClearKey::supportsRobustness):
2725         (WebCore::CDMPrivateClearKey::distinctiveIdentifiersRequirement):
2726         (WebCore::CDMPrivateClearKey::persistentStateRequirement):
2727         (WebCore::CDMPrivateClearKey::distinctiveIdentifiersAreUniquePerOriginAndClearable):
2728         (WebCore::CDMPrivateClearKey::createInstance):
2729         (WebCore::CDMPrivateClearKey::loadAndInitialize):
2730         (WebCore::CDMPrivateClearKey::supportsServerCertificates):
2731         (WebCore::CDMPrivateClearKey::supportsSessions):
2732         (WebCore::CDMPrivateClearKey::supportsInitData):
2733         (WebCore::CDMPrivateClearKey::sanitizeResponse):
2734         (WebCore::CDMPrivateClearKey::sanitizeSessionId):
2735         (WebCore::CDMInstanceClearKey::initializeWithConfiguration):
2736         (WebCore::CDMInstanceClearKey::setDistinctiveIdentifiersAllowed):
2737         (WebCore::CDMInstanceClearKey::setPersistentStateAllowed):
2738         (WebCore::CDMInstanceClearKey::setServerCertificate):
2739         (WebCore::CDMInstanceClearKey::requestLicense):
2740         (WebCore::CDMInstanceClearKey::updateLicense):
2741         (WebCore::CDMInstanceClearKey::loadSession):
2742         (WebCore::CDMInstanceClearKey::closeSession):
2743         (WebCore::CDMInstanceClearKey::removeSessionData):
2744         (WebCore::CDMInstanceClearKey::storeRecordOfKeyUsage):
2745         * platform/encryptedmedia/clearkey/CDMClearKey.h: Added.
2746
2747 2017-07-27  Zan Dobersek  <zdobersek@igalia.com>
2748
2749         [EME] Allow CDMInstance type traits specialization
2750         https://bugs.webkit.org/show_bug.cgi?id=174886
2751
2752         Reviewed by Xabier Rodriguez-Calvar.
2753
2754         Allow using the trait-based type casting for the CDMInstance class and its
2755         derivatives. ImplementationType enumeration values are to be used and
2756         returned from the new implementationType() virtual method. This method is
2757         leveraged in the type trait specialization that enables using is<>() and
2758         downcast<>() helpers for CDMInstance objects.
2759
2760         This will allow differentiating between CDMInstance implementations once
2761         the media playback pipeline has to retrieve any key information that's
2762         necessary for playback of encrypted content.
2763
2764         MockCDMInstance class overrides the implementationType() method, returning
2765         the ImplementationType::Mock value. Type trait specializations for this
2766         class aren't added since they're not needed anywhere at this point.
2767
2768         * platform/encryptedmedia/CDMInstance.h:
2769         * testing/MockCDMFactory.h:
2770
2771 2017-07-27  Zan Dobersek  <zdobersek@igalia.com>
2772
2773         [GCrypt] Key serialization support
2774         https://bugs.webkit.org/show_bug.cgi?id=173883
2775
2776         Reviewed by Jiewen Tan.
2777
2778         Implement crypto key serialization for platforms that use libgcrypt.
2779
2780         Despite the function names and the existing implementation for the Mac port,
2781         we don't perform the KEK wrapping and unwrapping due to the review feedback
2782         advising against it.
2783
2784         Instead the passed-in key data is simply copied and returned as the result of
2785         the 'wrapping' operation, and similarly the passed-in serialized data is simply
2786         copied and returned as the result of the 'unwrapping' operation.
2787
2788         No new tests -- related tests are now passing and are unskipped.
2789
2790         * crypto/gcrypt/SerializedCryptoKeyWrapGCrypt.cpp:
2791         (WebCore::getDefaultWebCryptoMasterKey):
2792         (WebCore::wrapSerializedCryptoKey):
2793         (WebCore::unwrapSerializedCryptoKey):
2794
2795 2017-07-26  Arnaud Renevier  <a.renevier@sisa.samsung.com> and Fujii Hironori  <Hironori.Fujii@sony.com>
2796
2797         Implement new TextMetrics, returned by canvas measureText()
2798         https://bugs.webkit.org/show_bug.cgi?id=82798
2799         <rdar://problem/11159332>
2800
2801         Reviewed by Dean Jackson.
2802
2803         The specification: https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-measuretext
2804
2805         Add new attributes to TextMetrics.
2806
2807         Add a new method textOffset() of CanvasRenderingContext2D by
2808         extracting from drawTextInternal() to use the same horizontal and
2809         vertical offsets of a text in both drawTextInternal() and
2810         measureText().
2811
2812         Test: fast/canvas/canvas-measureText-2.html
2813
2814         * html/TextMetrics.h:
2815         (WebCore::TextMetrics::actualBoundingBoxLeft):
2816         (WebCore::TextMetrics::setActualBoundingBoxLeft):
2817         (WebCore::TextMetrics::actualBoundingBoxRight):
2818         (WebCore::TextMetrics::setActualBoundingBoxRight):
2819         (WebCore::TextMetrics::fontBoundingBoxAscent):
2820         (WebCore::TextMetrics::setFontBoundingBoxAscent):
2821         (WebCore::TextMetrics::fontBoundingBoxDescent):
2822         (WebCore::TextMetrics::setFontBoundingBoxDescent):
2823         (WebCore::TextMetrics::actualBoundingBoxAscent):
2824         (WebCore::TextMetrics::setActualBoundingBoxAscent):
2825         (WebCore::TextMetrics::actualBoundingBoxDescent):
2826         (WebCore::TextMetrics::setActualBoundingBoxDescent):
2827         (WebCore::TextMetrics::emHeightAscent):
2828         (WebCore::TextMetrics::setEmHeightAscent):
2829         (WebCore::TextMetrics::emHeightDescent):
2830         (WebCore::TextMetrics::setEmHeightDescent):
2831         (WebCore::TextMetrics::hangingBaseline):
2832         (WebCore::TextMetrics::setHangingBaseline):
2833         (WebCore::TextMetrics::alphabeticBaseline):
2834         (WebCore::TextMetrics::setAlphabeticBaseline):
2835         (WebCore::TextMetrics::ideographicBaseline):
2836         (WebCore::TextMetrics::setIdeographicBaseline):
2837         Added getters and setters.
2838         (WebCore::TextMetrics::TextMetrics): Deleted.
2839         * html/TextMetrics.idl: Added new attributes.
2840         * html/canvas/CanvasRenderingContext2D.cpp:
2841         (WebCore::CanvasRenderingContext2D::FontProxy::fontMetrics):
2842         Changed the return value type to a const reference of FontMetrics
2843         not to copy it.
2844         (WebCore::CanvasRenderingContext2D::FontProxy::width):
2845         Added the second arguemnt of GlyphOverflow type.
2846         (WebCore::CanvasRenderingContext2D::measureText): Calculate and
2847         set the new attributes of TextMetrics.
2848         (WebCore::CanvasRenderingContext2D::textOffset): Extracted from drawTextInternal.
2849         (WebCore::CanvasRenderingContext2D::drawTextInternal): Removed the
2850         offset calculation code and call textOffset.
2851         * html/canvas/CanvasRenderingContext2D.h: Added the method
2852         declaration of textOffset. Change types of fontMetrics and width
2853         methods.
2854         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
2855         (WebCore::FontCascade::floatWidthForComplexText): Added a dummy
2856         implementation of calculating GlyphOverflow.
2857
2858 2017-07-26  Devin Rousso  <drousso@apple.com>
2859
2860         Web Inspector: create protocol for recording Canvas contexts
2861         https://bugs.webkit.org/show_bug.cgi?id=174481
2862
2863         Reviewed by Joseph Pecoraro.
2864
2865         Currently, a recording doesn't actually "start" until an action is performed on the context.
2866         This change adds the recording logic, but it does not use it anywhere. Additonal tests will
2867         be added in the patches that add uses:
2868          - <https://webkit.org/b/174482> Web Inspector: Record actions performed on CanvasRenderingContext2D
2869          - <https://webkit.org/b/174483> Web Inspector: Record actions performed on WebGLRenderingContext
2870
2871         Test: inspector/model/recording.html
2872
2873         * bindings/scripts/IDLAttributes.json:
2874         * bindings/scripts/CodeGeneratorJS.pm:
2875         (GenerateAttributeGetterBodyDefinition):
2876         (GenerateAttributeSetterBodyDefinition):
2877         (GenerateImplementationFunctionCall):
2878         * WebCore.xcodeproj/project.pbxproj:
2879         * bindings/js/CallTracer.h: Added.
2880         * bindings/js/CallTracer.cpp: Added.
2881         (WebCore::CallTracer::recordCanvasAction):
2882         * bindings/js/CallTracerTypes.h: Added.
2883         * bindings/scripts/test/TestCallTracer.idl: Added.
2884         * bindings/scripts/test/JS/JSTestCallTracer.h: Added.
2885         * bindings/scripts/test/JS/JSTestCallTracer.cpp: Added.
2886
2887         Create new IDL extended attribute called "CallTracingCallback" that will add code to call a
2888         static function on CallTracer with the given extended attribute value as the function name,
2889         the `impl` object as the first parameter, the name of the attribute/operation as the second,
2890         and an optional object that accepts an initializer list of all the parameters as the third.
2891
2892         This function will not be called, however, unless a `callTracingActive` function on the
2893         `impl` object returns true, and this is marked as UNLIKELY.
2894
2895         "CallTracingCallback" can be added to an Interface, in which case it will apply to all
2896         attributes/operations of the generated class, or an individual Attribute/Operation.
2897
2898         * html/canvas/CanvasRenderingContext.h:
2899         (WebCore::CanvasRenderingContext::callTracingActive):
2900         (WebCore::CanvasRenderingContext::setCallTracingActive):
2901
2902         * inspector/InspectorCanvas.h:
2903         * inspector/InspectorCanvas.cpp:
2904         (WebCore::InspectorCanvas::~InspectorCanvas):
2905         (WebCore::InspectorCanvas::resetRecordingData):
2906         (WebCore::InspectorCanvas::hasRecordingData):
2907         (WebCore::InspectorCanvas::recordAction):
2908         (WebCore::InspectorCanvas::releaseInitialState):
2909         (WebCore::InspectorCanvas::releaseFrames):
2910         (WebCore::InspectorCanvas::releaseData):
2911         (WebCore::InspectorCanvas::markNewFrame):
2912         (WebCore::InspectorCanvas::markCurrentFrameIncomplete):
2913         (WebCore::InspectorCanvas::setBufferLimit):
2914         (WebCore::InspectorCanvas::hasBufferSpace):
2915         (WebCore::InspectorCanvas::singleFrame):
2916         (WebCore::InspectorCanvas::setSingleFrame):
2917         (WebCore::InspectorCanvas::indexForData):
2918         (WebCore::buildArrayForAffineTransform):
2919         (WebCore::buildArrayForVector):
2920         (WebCore::InspectorCanvas::buildInitialState):
2921         (WebCore::InspectorCanvas::buildAction):
2922         (WebCore::InspectorCanvas::buildArrayForCanvasGradient):
2923         (WebCore::InspectorCanvas::buildArrayForCanvasPattern):
2924         (WebCore::InspectorCanvas::buildArrayForImageData):
2925
2926         Hold the recording data on the corresponding InspectorCanvas. Recording Frames are
2927         completed when the HTMLCanvasElement paints or a  0_s timer is fired. A recording is not
2928         considered valid until at least one action is performed on the canvas context. Once that
2929         condition is satisfied, canceling the recording will flush the data.
2930
2931         * inspector/InspectorCanvasAgent.h:
2932         * inspector/InspectorCanvasAgent.cpp:
2933         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
2934         (WebCore::InspectorCanvasAgent::disable):
2935         (WebCore::InspectorCanvasAgent::requestRecording):
2936         (WebCore::InspectorCanvasAgent::cancelRecording):
2937         (WebCore::InspectorCanvasAgent::recordCanvasAction):
2938         (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
2939         (WebCore::InspectorCanvasAgent::canvasDestroyed):
2940         (WebCore::InspectorCanvasAgent::canvasRecordingTimerFired):
2941         (WebCore::InspectorCanvasAgent::clearCanvasData):
2942
2943         * inspector/InspectorInstrumentation.h:
2944         * inspector/InspectorInstrumentation.cpp:
2945         (WebCore::InspectorInstrumentation::recordCanvasAction):
2946         (WebCore::InspectorInstrumentation::recordCanvasActionImpl):
2947         (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrameImpl):
2948
2949         * html/canvas/CanvasRenderingContext2D.h:
2950         * html/canvas/CanvasRenderingContext2D.cpp:
2951         (WebCore::CanvasRenderingContext2D::stringForWindingRule):
2952         (WebCore::CanvasRenderingContext2D::stringForImageSmoothingQuality):
2953
2954         * platform/graphics/Gradient.h:
2955         (WebCore::Gradient::stops):
2956
2957         * svg/SVGPathUtilities.h:
2958         * svg/SVGPathUtilities.cpp:
2959         (WebCore::buildStringFromPath):
2960
2961 2017-07-26  Ali Juma  <ajuma@chromium.org>
2962
2963         Implement document.elementsFromPoint
2964         https://bugs.webkit.org/show_bug.cgi?id=153137
2965
2966         Reviewed by Simon Fraser.
2967
2968         This ports Blink's implementation of elementsFromPoint, from the
2969         following patches by Philip Rogers (pdr@chromium.org):
2970         -https://src.chromium.org/viewvc/blink?revision=190686&view=revision
2971         -https://src.chromium.org/viewvc/blink?revision=191240&view=revision
2972         -https://src.chromium.org/viewvc/blink?revision=199214&view=revision
2973
2974         Tests: imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-iframes.html
2975                imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-invalid-cases.html
2976                imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-shadowroot.html
2977                imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-simple.html
2978                imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-svg.html
2979                imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-table.html
2980
2981         * dom/DocumentOrShadowRoot.idl:
2982         * dom/TreeScope.cpp:
2983         (WebCore::absolutePointIfNotClipped):
2984         (WebCore::TreeScope::nodeFromPoint):
2985         (WebCore::TreeScope::elementFromPoint):
2986         (WebCore::TreeScope::elementsFromPoint):
2987         * dom/TreeScope.h:
2988         * page/EventHandler.cpp:
2989         (WebCore::EventHandler::hitTestResultAtPoint):
2990         * rendering/EllipsisBox.cpp:
2991         (WebCore::EllipsisBox::nodeAtPoint):
2992         * rendering/HitTestRequest.h:
2993         (WebCore::HitTestRequest::HitTestRequest):
2994         (WebCore::HitTestRequest::resultIsElementList):
2995         (WebCore::HitTestRequest::includesAllElementsUnderPoint):
2996         * rendering/HitTestResult.cpp:
2997         (WebCore::HitTestResult::HitTestResult):
2998         (WebCore::HitTestResult::operator=):
2999         (WebCore::HitTestResult::addNodeToListBasedTestResult):
3000         (WebCore::HitTestResult::append):
3001         (WebCore::HitTestResult::listBasedTestResult):
3002         (WebCore::HitTestResult::mutableListBasedTestResult):
3003         (WebCore::HitTestResult::addNodeToRectBasedTestResult): Deleted.
3004         (WebCore::HitTestResult::rectBasedTestResult): Deleted.
3005         (WebCore::HitTestResult::mutableRectBasedTestResult): Deleted.
3006         * rendering/HitTestResult.h:
3007         * rendering/InlineFlowBox.cpp:
3008         (WebCore::InlineFlowBox::nodeAtPoint):
3009         * rendering/InlineTextBox.cpp:
3010         (WebCore::InlineTextBox::nodeAtPoint):
3011         * rendering/RenderBlock.cpp:
3012         (WebCore::RenderBlock::nodeAtPoint):
3013         * rendering/RenderBox.cpp:
3014         (WebCore::RenderBox::nodeAtPoint):
3015         * rendering/RenderImage.cpp:
3016         (WebCore::RenderImage::nodeAtPoint):
3017         * rendering/RenderInline.cpp:
3018         (WebCore::RenderInline::hitTestCulledInline):
3019         * rendering/RenderLayer.cpp:
3020         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
3021         (WebCore::RenderLayer::hitTestLayer):
3022         (WebCore::RenderLayer::hitTestContents):
3023         (WebCore::RenderLayer::hitTestList):
3024         (WebCore::RenderLayer::calculateClipRects):
3025         * rendering/RenderTable.cpp:
3026         (WebCore::RenderTable::nodeAtPoint):
3027         * rendering/RenderTableSection.cpp:
3028         (WebCore::RenderTableSection::nodeAtPoint):
3029         * rendering/RenderWidget.cpp:
3030         (WebCore::RenderWidget::nodeAtPoint):
3031         * rendering/SimpleLineLayoutFunctions.cpp:
3032         (WebCore::SimpleLineLayout::hitTestFlow):
3033         * rendering/svg/RenderSVGContainer.cpp:
3034         (WebCore::RenderSVGContainer::nodeAtFloatPoint):
3035         * rendering/svg/RenderSVGImage.cpp:
3036         (WebCore::RenderSVGImage::nodeAtFloatPoint):
3037         * rendering/svg/RenderSVGRoot.cpp:
3038         (WebCore::RenderSVGRoot::nodeAtPoint):
3039         * rendering/svg/RenderSVGShape.cpp:
3040         (WebCore::RenderSVGShape::nodeAtFloatPoint):
3041         * rendering/svg/SVGInlineTextBox.cpp:
3042         (WebCore::SVGInlineTextBox::nodeAtPoint):
3043         * testing/Internals.cpp:
3044         (WebCore::Internals::nodesFromRect):
3045
3046 2017-07-26  Charlie Turner  <cturner@igalia.com>
3047
3048         [GStreamer] Review WebKitWebSource after r219252.
3049         https://bugs.webkit.org/show_bug.cgi?id=174415
3050
3051         Reviewed by Carlos Garcia Campos.
3052
3053         Remove ResourceHandleStreamingClient, and flatten the StreamingClient
3054         into CachedResourceStreamingClient (the only implemetation left). They
3055         are no longer required after r219252.
3056
3057         Also remove the locking code. It's not needed now, and what existed
3058         was heavy-handed and missed several cases it was supposed to protect
3059
3060         Covered by existing tests.
3061
3062         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3063         (webkit_web_src_init):
3064         (webKitWebSrcDispose):
3065         (webKitWebSrcStop):
3066         (webKitWebSrcStart):
3067         (webKitWebSrcNeedData):
3068         (webKitWebSrcEnoughData):
3069         (webKitWebSrcSeek):
3070         (webKitWebSrcSetMediaPlayer):
3071         (CachedResourceStreamingClient::CachedResourceStreamingClient):
3072         (CachedResourceStreamingClient::~CachedResourceStreamingClient):
3073         (CachedResourceStreamingClient::getOrCreateReadBuffer):
3074         (CachedResourceStreamingClient::responseReceived):
3075         (CachedResourceStreamingClient::dataReceived):
3076         (CachedResourceStreamingClient::loadFinished):
3077         (ResourceHandleStreamingClient::create): Deleted.
3078         (): Deleted.
3079         (StreamingClient::StreamingClient): Deleted.
3080         (StreamingClient::~StreamingClient): Deleted.
3081         (StreamingClient::createReadBuffer): Deleted.
3082         (StreamingClient::handleResponseReceived): Deleted.
3083         (StreamingClient::handleDataReceived): Deleted.
3084         (StreamingClient::handleNotifyFinished): Deleted.
3085         (ResourceHandleStreamingClient::ResourceHandleStreamingClient): Deleted.
3086         (ResourceHandleStreamingClient::~ResourceHandleStreamingClient): Deleted.
3087         (ResourceHandleStreamingClient::cleanupAndStopRunLoop): Deleted.
3088         (ResourceHandleStreamingClient::invalidate): Deleted.
3089         (ResourceHandleStreamingClient::loadFailed): Deleted.
3090         (ResourceHandleStreamingClient::setDefersLoading): Deleted.
3091         (ResourceHandleStreamingClient::getOrCreateReadBuffer): Deleted.
3092         (ResourceHandleStreamingClient::willSendRequest): Deleted.
3093         (ResourceHandleStreamingClient::didReceiveResponse): Deleted.
3094         (ResourceHandleStreamingClient::didReceiveData): Deleted.
3095         (ResourceHandleStreamingClient::didReceiveBuffer): Deleted.
3096         (ResourceHandleStreamingClient::didFinishLoading): Deleted.
3097         (ResourceHandleStreamingClient::didFail): Deleted.
3098         (ResourceHandleStreamingClient::wasBlocked): Deleted.
3099         (ResourceHandleStreamingClient::cannotShowURL): Deleted.
3100
3101 2017-07-26  Brian Burg  <bburg@apple.com>
3102
3103         Remove WEB_TIMING feature flag
3104         https://bugs.webkit.org/show_bug.cgi?id=174795
3105
3106         Reviewed by Alex Christensen.
3107
3108         * Configurations/FeatureDefines.xcconfig:
3109         * bindings/js/JSPerformanceEntryCustom.cpp:
3110         * dom/Document.cpp:
3111         (WebCore::Document::setReadyState):
3112         (WebCore::Document::finishedParsing):
3113         * dom/Document.h:
3114         (WebCore::Document::timing):
3115         * dom/DocumentTiming.h:
3116         * dom/EventTargetFactory.in:
3117         * loader/DocumentThreadableLoader.cpp:
3118         (WebCore::DocumentThreadableLoader::finishedTimingForWorkerLoad):
3119         (WebCore::DocumentThreadableLoader::loadRequest):
3120         * loader/DocumentThreadableLoader.h:
3121         * loader/ResourceTimingInformation.cpp:
3122         * loader/ResourceTimingInformation.h:
3123         * loader/SubresourceLoader.cpp:
3124         (WebCore::SubresourceLoader::didFinishLoading):
3125         (WebCore::SubresourceLoader::reportResourceTiming):
3126         * loader/SubresourceLoader.h:
3127         * loader/ThreadableLoaderClient.h:
3128         (WebCore::ThreadableLoaderClient::didFail):
3129         (WebCore::ThreadableLoaderClient::didFinishTiming):
3130         * loader/WorkerThreadableLoader.cpp:
3131         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishTiming):
3132         * loader/WorkerThreadableLoader.h:
3133         * loader/cache/CachedResourceLoader.cpp:
3134         (WebCore::CachedResourceLoader::requestResource):
3135         (WebCore::CachedResourceLoader::revalidateResource):
3136         (WebCore::CachedResourceLoader::loadResource):
3137         * loader/cache/CachedResourceLoader.h:
3138         (WebCore::CachedResourceLoader::resourceTimingInformation):
3139         * page/DOMWindow.cpp:
3140         (WebCore::DOMWindow::~DOMWindow):
3141         (WebCore::DOMWindow::resetDOMWindowProperties):
3142         (WebCore::DOMWindow::nowTimestamp):
3143         (WebCore::DOMWindow::removeAllEventListeners):
3144         * page/DOMWindow.h:
3145         * page/GlobalPerformance.idl:
3146         * page/Performance.cpp:
3147         * page/Performance.h:
3148         * page/Performance.idl:
3149         * page/PerformanceEntry.cpp:
3150         * page/PerformanceEntry.h:
3151         * page/PerformanceEntry.idl:
3152         * page/PerformanceMark.h:
3153         * page/PerformanceMark.idl:
3154         * page/PerformanceMeasure.h:
3155         * page/PerformanceMeasure.idl:
3156         * page/PerformanceNavigation.cpp:
3157         * page/PerformanceNavigation.h:
3158         * page/PerformanceNavigation.idl:
3159         * page/PerformanceObserver.cpp:
3160         * page/PerformanceObserver.h:
3161         * page/PerformanceObserver.idl:
3162         * page/PerformanceObserverCallback.h:
3163         * page/PerformanceObserverCallback.idl:
3164         * page/PerformanceObserverEntryList.cpp:
3165         * page/PerformanceObserverEntryList.h:
3166         * page/PerformanceObserverEntryList.idl:
3167         * page/PerformanceResourceTiming.cpp:
3168         * page/PerformanceResourceTiming.h:
3169         * page/PerformanceResourceTiming.idl:
3170         * page/PerformanceTiming.cpp:
3171         * page/PerformanceTiming.h:
3172         * page/PerformanceTiming.idl:
3173         * page/PerformanceUserTiming.cpp:
3174         * page/PerformanceUserTiming.h:
3175         * platform/network/ResourceHandle.h:
3176         * platform/network/ResourceHandleInternal.h:
3177         * platform/network/cf/ResourceHandleCFNet.cpp:
3178         (WebCore::ResourceHandle::start):
3179         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
3180         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
3181         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
3182         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
3183         * platform/network/curl/ResourceHandleCurl.cpp:
3184         (WebCore::ResourceHandleInternal::didFinish):
3185         (WebCore::ResourceHandleInternal::calculateWebTimingInformations):
3186         (WebCore::ResourceHandleInternal::dispatchSynchronousJob):
3187         * platform/network/mac/ResourceHandleMac.mm:
3188         (WebCore::ResourceHandle::createNSURLConnection):
3189         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
3190         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
3191         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3192         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
3193         * platform/network/soup/ResourceHandleSoup.cpp:
3194         (WebCore::restartedCallback):
3195         (WebCore::sendRequestCallback):
3196         (WebCore::createSoupMessageForHandleAndRequest):
3197         (WebCore::ResourceHandle::sendPendingRequest):
3198         * platform/network/soup/SoupNetworkSession.cpp:
3199         (WebCore::SoupNetworkSession::SoupNetworkSession):
3200         * workers/WorkerGlobalScope.cpp:
3201         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
3202         (WebCore::WorkerGlobalScope::~WorkerGlobalScope):
3203         (WebCore::WorkerGlobalScope::removeAllEventListeners):
3204         * workers/WorkerGlobalScope.h:
3205
3206 2017-07-26  Chris Dumez  <cdumez@apple.com>
3207
3208         Pressing the Escape key should not be a valid user gesture to enter fullscreen
3209         https://bugs.webkit.org/show_bug.cgi?id=174864
3210         <rdar://problem/33009088>
3211
3212         Reviewed by Geoffrey Garen.
3213
3214         Pressing the Escape key should not be a valid user gesture to enter fullscreen since this
3215         is the gesture to exit fullscreen already.
3216
3217         Test: fullscreen/requestFullscreen-escape-key.html
3218
3219         * dom/Document.cpp:
3220         (WebCore::Document::requestFullScreenForElement):
3221         * dom/UserGestureIndicator.cpp:
3222         (WebCore::UserGestureIndicator::UserGestureIndicator):
3223         * dom/UserGestureIndicator.h:
3224         (WebCore::UserGestureToken::create):
3225         (WebCore::UserGestureToken::gestureType):
3226         (WebCore::UserGestureToken::UserGestureToken):
3227         * page/EventHandler.cpp:
3228         (WebCore::EventHandler::internalKeyEvent):
3229
3230 2017-07-26  Nan Wang  <n_wang@apple.com>
3231
3232         AX: Incorrect range from index and length in contenteditable with <p> tags
3233         https://bugs.webkit.org/show_bug.cgi?id=174856
3234
3235         Reviewed by Chris Fleizach.
3236
3237         When asking for the string inside a text control with a given range, we sometimes get
3238         a wrong string at the line boundary due to a bad plain range to text marker conversion.
3239         To fix this, we should use the exsisting method on text controls to avoid this issue. 
3240
3241         Updated the test to test the problematic case.
3242
3243         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3244         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3245
3246 2017-07-26  Daewoong Jang  <daewoong.jang@navercorp.com>
3247
3248         [Curl] Bug fix after r219606
3249         https://bugs.webkit.org/show_bug.cgi?id=174845
3250
3251         Reviewed by Alex Christensen.
3252
3253         * platform/network/curl/CurlContext.h:
3254         (WebCore::CurlSList::isEmpty):
3255         * platform/network/curl/ResourceHandleCurl.cpp:
3256         (WebCore::ResourceHandleInternal::didReceiveHeaderLine):
3257         (WebCore::ResourceHandleInternal::headerCallback):
3258
3259 2017-07-26  Zan Dobersek  <zdobersek@igalia.com>
3260
3261         [EME][GStreamer] Multi-key support in the GStreamer ClearKey decryptor
3262         https://bugs.webkit.org/show_bug.cgi?id=174779
3263
3264         Reviewed by Xabier Rodriguez-Calvar.
3265
3266         In the CENC decryptor, the key ID value is retrieved from the info structure
3267         on the GstProtectionMeta object. GstBuffer for that value is retrieved and
3268         passed to the setupCipher() function.
3269
3270         In the ClearKey decryptor (which extends the CENC decryptor), the single
3271         GstBuffer object on the private instance that holds the key value is replaced
3272         with a Vector object that holds pairs of key ID and value GstBuffers. In the
3273         handleKeyResponse() implementation that Vector is emptied and then refilled
3274         with key ID and value pairs that are passed in through the drm-cipher-clearkey
3275         structure that's attached to the GstEvent that signalled new key information.
3276
3277         In the ClearKey decryptor's setupCipher() implementation the passed-in key ID
3278         buffer is used to find a matching key ID and value pair stored on the private
3279         instance. If not found, an error is thrown. If found, the matching key value
3280         is used for decryption.
3281
3282         * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
3283         (webKitMediaClearKeyDecryptorHandleKeyResponse):
3284         (webKitMediaClearKeyDecryptorSetupCipher):
3285         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
3286         (webkitMediaCommonEncryptionDecryptTransformInPlace):
3287         (webKitMediaCommonEncryptionDecryptDefaultSetupCipher):
3288         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
3289
3290 2017-07-26  Zan Dobersek  <zdobersek@igalia.com>
3291
3292         [EME][GStreamer] Handle ClearKey as a supported key system
3293         https://bugs.webkit.org/show_bug.cgi?id=174778
3294
3295         Reviewed by Xabier Rodriguez-Calvar.
3296
3297         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3298         (WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem):
3299         Return true for the 'org.w3.clearkey' key system when building with
3300         ENCRYPTED_MEDIA enabled. The underlying implementation will follow.
3301
3302 2017-07-26  Claudio Saavedra  <csaavedra@igalia.com>
3303
3304         [WPE] Fix a potential crash in the platform pasteboard when reading a string
3305         https://bugs.webkit.org/show_bug.cgi?id=174859
3306
3307         Reviewed by Žan Doberšek.
3308
3309         We shouldn't assume that the wpe_pasteboard_string struct will be
3310         filled in, so initialize it.
3311
3312         * platform/wpe/PlatformPasteboardWPE.cpp:
3313         (WebCore::PlatformPasteboard::readString): Initialize the struct
3314         before passing it to wpe and early return if it's still empty.
3315
3316 2017-07-26  Javier Fernandez  <jfernandez@igalia.com>
3317
3318         InsertOrderedList command applied to table cells inserts an extra BR before the table
3319         https://bugs.webkit.org/show_bug.cgi?id=174593
3320
3321         Reviewed by Darin Adler.
3322
3323         Don't add BR when pruning empty blocks if it's the start of a paragraph.
3324
3325         The function MoveParagraph is used for several operations and editing
3326         commands, like 'insertOrderedList'. When moving paragraphs we check out
3327         whether we should add a 'br' element to avoid undesired block collapse.
3328
3329         However, we shouldn't do this when destination is the start of a
3330         paragraph.
3331
3332         Tests: editing/inserting/insert-list-in-table-cell-01.html
3333                editing/inserting/insert-list-in-table-cell-02.html
3334                editing/inserting/insert-list-in-table-cell-03.html
3335                editing/inserting/insert-list-in-table-cell-04.html
3336                editing/inserting/insert-list-in-table-cell-05.html
3337                editing/inserting/insert-list-in-table-cell-06.html
3338                editing/inserting/insert-list-in-table-cell-07.html
3339                editing/inserting/insert-list-in-table-cell-08.html
3340
3341         * editing/CompositeEditCommand.cpp:
3342         (WebCore::CompositeEditCommand::moveParagraphs):
3343
3344 2017-07-26  Zan Dobersek  <zdobersek@igalia.com>
3345
3346         [WPE] WebGL2 support
3347         https://bugs.webkit.org/show_bug.cgi?id=174249
3348
3349         Reviewed by Alex Christensen.
3350
3351         Implement WebGL2 support in GraphicsContext3DCairo for the WPE port, but keep
3352         the implementation specific to libepoxy (which WPE leverages by default).
3353
3354         In the GraphicsContext3D::create() method, we first construct the
3355         GraphicsContext3D object that also ensures a current GL context on this thread.
3356         Only then can we determine through libepoxy whether the underlying GL library
3357         is able to support WebGL2.
3358
3359         For WebGL2, the GLES3 support is required. The initial libepoxy implementation
3360         ensures this only in case of 'non-desktop GL' library of minimum version 3.0.
3361         This effectively translates to the only supported configuration being the
3362         EGL and OpenGL ES 3.0 (or higher) combination. If this cannot be ensured, we
3363         discard the existing GraphicsContext3D object and return null.
3364
3365         WebGL2 can also be supported via OpenGL (i.e. 'desktop GL'), but this hasn't
3366         been tested yet. Implementation will in the future be extended to support that
3367         as required.
3368
3369         In the GraphicsContext3D constructor itself, the ANGLEWebKitBridge constructor
3370         has to now receive the second argument, the desired shader specification that's
3371         used when parsing the provided shaders. This should be SH_WEBGL_SPEC for WebGL1,
3372         and SH_WEBGL2_SPEC for WebGL2.
3373
3374         No new tests -- a small set of existing WebGL2 tests is unskipped and passing.
3375
3376         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
3377         (WebCore::GraphicsContext3D::create):
3378         (WebCore::GraphicsContext3D::GraphicsContext3D):
3379         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3380         Add WebGL2-specific methods to the build.
3381
3382 2017-07-26  Nan Wang  <n_wang@apple.com>
3383
3384         AX: should dispatch accessibilityPerformPressAction async on MacOS
3385         https://bugs.webkit.org/show_bug.cgi?id=174849
3386
3387         Reviewed by Chris Fleizach.