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