Unreviewed, rolling out r219379.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2017-07-12  Matt Lewis  <jlewis3@apple.com>
2
3         Unreviewed, rolling out r219379.
4
5         This revision caused a consistent failure in the test
6         fast/dom/Window/property-access-on-cached-window-after-frame-
7         removed.html.
8
9         Reverted changeset:
10
11         "Remove NAVIGATOR_HWCONCURRENCY"
12         https://bugs.webkit.org/show_bug.cgi?id=174400
13         http://trac.webkit.org/changeset/219379
14
15 2017-07-12  Zalan Bujtas  <zalan@apple.com>
16
17         Paginated mode: Infinite recursion in RenderTable::layout
18         https://bugs.webkit.org/show_bug.cgi?id=174413
19
20         Reviewed by Simon Fraser.
21
22         This patch is a workaround for avoiding infinite recursion when the table layout does not stabilize.
23         Apparently we leak some context (computed padding in this case) from the current to the subsequent layout.
24         The subsequent layouts always end up producing different line heights for some of the cells in the <thead>.
25         In paginated mode, when the section moves (<thead>, <tbody> etc) we call layout again recursively.
26         This could lead to infinite recursion for unstable table layout.
27
28         Unable to come up with a reduction yet.
29
30         * rendering/RenderTable.cpp:
31         (WebCore::RenderTable::layout):
32         * rendering/RenderTable.h:
33
34 2017-07-12  Youenn Fablet  <youenn@apple.com>
35
36         WebRTC: Incorrect sdpMLineIndex for video breaks Firefox interop
37         https://bugs.webkit.org/show_bug.cgi?id=173530
38
39         Reviewed by Alex Christensen.
40
41         Test: webrtc/ice-candidate-sdpMLineIndex.html
42
43         Reading missing parameter from libwebrtc backend and setting it when firing the RTCIceCandidate event.
44
45         * Modules/mediastream/PeerConnectionBackend.cpp:
46         (WebCore::PeerConnectionBackend::disableICECandidateFiltering):
47         (WebCore::PeerConnectionBackend::newICECandidate):
48         * Modules/mediastream/PeerConnectionBackend.h:
49         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
50         (WebCore::LibWebRTCMediaEndpoint::OnIceCandidate):
51
52 2017-07-12  Zan Dobersek  <zdobersek@igalia.com>
53
54         [GCrypt] Implement CryptoKeyEC PKCS#8 exports
55         https://bugs.webkit.org/show_bug.cgi?id=173648
56
57         Reviewed by Jiewen Tan.
58
59         Implement the PKCS#8 export operation for EC keys for platforms that use
60         libgcrypt.
61
62         First, the `ECParameters` and the `ECPrivateKey` ASN.1 structures are created
63         and filled out accordingly. For the former, the appropriate object identifier
64         is written under the `namedCurve` element of the structure. For the latter, we
65         write out '1' under `version`, and eliminate the optional `parameters` element.
66         An libgcrypt EC context is then used to retrieve the private and public key
67         MPIs that are then written out under the `privateKey` and `publicKey` elements,
68         respectively.
69
70         After that, we can proceed to create and fill out the `PrivateKeyInfo` structure.
71         0 is written out under the `version` element, and the id-ecPublicKey object
72         identifier is written out under the `privateKeyAlgorithm.algorithm` element. This
73         doesn't strictly follow the specification, since the id-ecDH identifier should be
74         used for ECDH keys, but no test in WebKit or the web-platform-tests suite covers
75         this, so this specific detail should be revisited later.
76
77         Data of the previously-constructed `ECParameters` structure is retrieved and
78         written out under the `privateKeyAlgorithm.parameters` element. Similarly is done
79         for the `ECPrivateKey` structure, writing out its data under the `privateKey`
80         element. Finally, the optional `attributes` element of the `PrivateKeyInfo`
81         structure is eliminated, and the encoded data of this structure is retrieved and
82         returned.
83
84         No new tests -- relevant tests are now passing and are unskipped.
85
86         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
87         (WebCore::CryptoKeyEC::platformExportPkcs8):
88
89 2017-07-12  Zan Dobersek  <zdobersek@igalia.com>
90
91         [WPE] Use libepoxy
92         https://bugs.webkit.org/show_bug.cgi?id=172104
93
94         Reviewed by Michael Catanzaro.
95
96         No new tests -- no changes in behavior.
97
98         Implement the proper libepoxy header inclusion for ports that enable it.
99
100         The library acts as a loading facility working on top of the system-provided
101         OpenGL and EGL libraries, with the headers providing a complete collection of
102         specification-defined OpenGL and EGL types, constants and entrypoints.
103
104         Support is added through the USE(LIBEPOXY) build guard. Note that this guard
105         isn't exclusive with USE(OPENGL), USE(OPENGL_ES_2) or USE(EGL), so the
106         USE(LIBEPOXY) condition is tested before those.
107
108         In case of OpenGL headers, the <epoxy/gl.h> header is included, and in
109         case of EGL headers, the <epoxy/egl.h> header. <epoxy/egl.h> includes
110         <epoxy/gl.h> on its own, so in some cases the inclusion of the latter is
111         omitted.
112
113         EpoxyShims.h header is added, doing a job similar to OpenGLESShims.h. The
114         EXT-suffixed GL entrypoints are redefined to the non-suffixed versions.
115         No suffixed constants are defined because those are defined by the libepoxy
116         headers to the well-known values.
117
118         * CMakeLists.txt:
119         * PlatformWPE.cmake:
120         * platform/graphics/ANGLEWebKitBridge.h:
121         * platform/graphics/EpoxyShims.h: Added.
122         * platform/graphics/GLContext.cpp:
123         (WebCore::initializeOpenGLShimsIfNeeded):
124         * platform/graphics/GraphicsContext3DPrivate.cpp:
125         * platform/graphics/PlatformDisplay.cpp:
126         * platform/graphics/cairo/CairoUtilities.cpp:
127         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
128         (WebCore::GraphicsContext3D::create):
129         * platform/graphics/cairo/ImageBufferCairo.cpp:
130         * platform/graphics/egl/GLContextEGL.cpp:
131         * platform/graphics/egl/GLContextEGLWPE.cpp:
132         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
133         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
134         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
135         * platform/graphics/opengl/Extensions3DOpenGLES.h:
136         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
137         * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
138         * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
139         * platform/graphics/wpe/PlatformDisplayWPE.cpp:
140
141 2017-07-12  Carlos Garcia Campos  <cgarcia@igalia.com>
142
143         ImageDecoder: Gifs with infinite animation only play once very often
144         https://bugs.webkit.org/show_bug.cgi?id=173403
145
146         Reviewed by Michael Catanzaro.
147
148         It doesn't always happen, it's easier to reproduce when loading big files from the network, but it also depends
149         on every file. The problem is that ImageFrameCache is caching the repetition count value always when the size is
150         already available. In the case of gif files, the loop count value can be at any point of the image stream, so
151         having the size available doesn't mean we also have the loop count. So, if the value is queried before it's
152         available, the default value is cached (repeat once) and then always used. We should clear the cached value when
153         new data is added to the decoder, like we do with other cached values that can change when more data is decoded.
154
155         * platform/graphics/ImageFrameCache.cpp:
156         (WebCore::ImageFrameCache::clearMetadata): Clear m_repetitionCount.
157
158 2017-07-12  Adrian Perez de Castro  <aperez@igalia.com>
159
160         [SOUP] Do not use C linkage for functions using C++ features
161         https://bugs.webkit.org/show_bug.cgi?id=174392
162
163         Reviewed by Michael Catanzaro.
164
165         No new tests because there is no behavior change.
166
167         * platform/network/soup/WebKitSoupRequestGeneric.h: Move G_END_DECLS
168         to leave functions which use C++ features outside of the block it
169         delimits.
170
171 2017-07-12  Carlos Garcia Campos  <cgarcia@igalia.com>
172
173         [GTK] Crashes in WebCore::PasteboardHelper::fillSelectionData when source file of drag is unavailable
174         https://bugs.webkit.org/show_bug.cgi?id=174161
175
176         Reviewed by Michael Catanzaro.
177
178         It seems selection data could contain an empty string, in which case gtk_selection_data_get_data() returns a
179         valid pointer, but gtk_selection_data_get_length() returns 0. When this happens we end up trying to split an
180         empty string resulting in an empty vector, but we unconditionally access the first element of the vector.
181
182         * platform/gtk/PasteboardHelper.cpp:
183         (WebCore::selectionDataToUTF8String): Return a null string in case selection data length is 0.
184         (WebCore::PasteboardHelper::fillSelectionData): Return early if selection data length is 0, instead of checking
185         the selection data pointer.
186
187 2017-07-11  Carlos Garcia Campos  <cgarcia@igalia.com>
188
189         [GTK][WPE] Enable FILE_LOCK and implement lockFile and unlockFile
190         https://bugs.webkit.org/show_bug.cgi?id=174357
191
192         Reviewed by Michael Catanzaro.
193
194         Implement lockFile and unlockFile using flock().
195
196         * PlatformWPE.cmake:
197         * platform/glib/FileSystemGlib.cpp:
198         (WebCore::lockFile):
199         (WebCore::unlockFile):
200
201 2017-07-11  Yusuke Suzuki  <utatane.tea@gmail.com>
202
203         Use FastAllocator in STL containers
204         https://bugs.webkit.org/show_bug.cgi?id=174366
205
206         Rubber stamped by Sam Weinig.
207
208         This patch uses FastAllocator for STL containers including std::set and std::map.
209         STL can take a template parameter to be used as allocator for containers.
210         We prepare FastAllocator, which uses fastMalloc for allocation.
211         This allows us to use bmalloc (if supported) for STL containers which offers
212         functionalities that is not supported in WTF containers.
213
214         * Modules/indexeddb/IDBKeyData.h:
215         * Modules/indexeddb/server/IndexValueEntry.cpp:
216         (WebCore::IDBServer::IndexValueEntry::IndexValueEntry):
217         (WebCore::IDBServer::IndexValueEntry::Iterator::Iterator):
218         (WebCore::IDBServer::IndexValueEntry::reverseFind):
219         * Modules/indexeddb/server/IndexValueEntry.h:
220         * Modules/indexeddb/server/IndexValueStore.cpp:
221         (WebCore::IDBServer::IndexValueStore::lowestIteratorInRange):
222         (WebCore::IDBServer::IndexValueStore::highestReverseIteratorInRange):
223         (WebCore::IDBServer::IndexValueStore::Iterator::Iterator):
224         * Modules/indexeddb/server/IndexValueStore.h:
225         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
226         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreCleared):
227         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
228         * Modules/indexeddb/server/MemoryObjectStore.cpp:
229         (WebCore::IDBServer::MemoryObjectStore::replaceKeyValueStore):
230         (WebCore::IDBServer::MemoryObjectStore::addRecord):
231         (WebCore::IDBServer::MemoryObjectStore::updateCursorsForPutRecord):
232         * Modules/indexeddb/server/MemoryObjectStore.h:
233         (WebCore::IDBServer::MemoryObjectStore::orderedKeys):
234         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
235         (WebCore::IDBServer::MemoryObjectStoreCursor::keyAdded):
236         (WebCore::IDBServer::MemoryObjectStoreCursor::setFirstInRemainingRange):
237         (WebCore::IDBServer::MemoryObjectStoreCursor::setForwardIteratorFromRemainingRange):
238         (WebCore::IDBServer::MemoryObjectStoreCursor::setReverseIteratorFromRemainingRange):
239         (WebCore::IDBServer::MemoryObjectStoreCursor::incrementForwardIterator):
240         (WebCore::IDBServer::MemoryObjectStoreCursor::incrementReverseIterator):
241         * Modules/indexeddb/server/MemoryObjectStoreCursor.h:
242         * Modules/mediasource/SampleMap.h:
243         * page/WheelEventTestTrigger.cpp:
244         (WebCore::WheelEventTestTrigger::deferTestsForReason):
245         (WebCore::dumpState):
246         * page/WheelEventTestTrigger.h:
247         * platform/graphics/cv/VideoTextureCopierCV.cpp:
248         (WebCore::enumToStringMap):
249         * rendering/OrderIterator.h:
250
251 2017-07-11  Per Arne Vollan  <pvollan@apple.com>
252
253         [Win] Build error when building WebKit.dll from WebKit.proj project file.
254         https://bugs.webkit.org/show_bug.cgi?id=174410
255
256         Reviewed by Brent Fulgham.
257
258         Copy required header files to forwarding headers folder.
259
260         * PlatformWin.cmake:
261
262 2017-07-11  Dean Jackson  <dino@apple.com>
263
264         Remove NAVIGATOR_HWCONCURRENCY
265         https://bugs.webkit.org/show_bug.cgi?id=174400
266
267         Reviewed by Sam Weinig.
268
269         * Configurations/FeatureDefines.xcconfig:
270         * WebCore.xcodeproj/project.pbxproj:
271         * page/NavigatorBase.cpp:
272         (WebCore::NavigatorBase::hardwareConcurrency): Deleted.
273         * page/NavigatorBase.h:
274         * page/NavigatorConcurrentHardware.idl: Removed.
275
276 2017-07-11  Youenn Fablet  <youenn@apple.com>
277
278         RealtimeOutgoingAudioSource should not push more audio data if the WebRTC thread is not able to process it
279         https://bugs.webkit.org/show_bug.cgi?id=174383
280
281         Reviewed by Eric Carlson.
282
283         This patch adds support to check for pending-processing audio data.
284         If the amount of audio data is bigger than a high water mark of 0.5 seconds,
285         we stop pushing new audio data until buffered audio data is lower than a low water mark of 0.1 seconds.
286         Patch is tested by adding breakpoints to trigger the high water mark, verifying that low water mark is triggered
287         and receiving audio is fine on the other connection endpoint.
288
289         * platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:
290         (WebCore::RealtimeOutgoingAudioSource::isReachingBufferedAudioDataHighLimit):
291         (WebCore::RealtimeOutgoingAudioSource::isReachingBufferedAudioDataLowLimit):
292         (WebCore::RealtimeOutgoingAudioSource::audioSamplesAvailable):
293         * platform/mediastream/mac/RealtimeOutgoingAudioSource.h:
294
295 2017-07-11  Dean Jackson  <dino@apple.com>
296
297         Rolling out r219372.
298
299         * Configurations/FeatureDefines.xcconfig:
300         * WebCore.xcodeproj/project.pbxproj:
301         * page/NavigatorBase.cpp:
302         (WebCore::NavigatorBase::hardwareConcurrency):
303         * page/NavigatorBase.h:
304         * page/NavigatorConcurrentHardware.idl: Added.
305
306 2017-07-11  Dean Jackson  <dino@apple.com>
307
308         Remove NAVIGATOR_HWCONCURRENCY
309         https://bugs.webkit.org/show_bug.cgi?id=174400
310
311         Reviewed by Sam Weinig.
312
313         * Configurations/FeatureDefines.xcconfig:
314         * WebCore.xcodeproj/project.pbxproj:
315         * page/NavigatorBase.cpp:
316         (WebCore::NavigatorBase::hardwareConcurrency): Deleted.
317         * page/NavigatorBase.h:
318         * page/NavigatorConcurrentHardware.idl: Removed.
319
320 2017-07-11  Jiewen Tan  <jiewen_tan@apple.com>
321
322         [WebCrypto] CryptoKeyECMac::Custom OpenSSL tag is actually tagged type [1]
323         https://bugs.webkit.org/show_bug.cgi?id=174382
324         <rdar://problem/33244871>
325
326         Reviewed by Brent Fulgham.
327
328         No change of behaviour.
329
330         * crypto/mac/CryptoKeyECMac.cpp:
331         (WebCore::CryptoKeyEC::platformImportPkcs8):
332         (WebCore::CryptoKeyEC::platformExportPkcs8):
333         Replace CustomECParameters with TaggedType1 according to X.690(08/2015) section 8.14:
334         https://www.itu.int/rec/T-REC-X.690-201508-I/en
335         and RFC 5915 Appendix A:
336         http://www.ietf.org/rfc/rfc5915.txt.
337
338 2017-07-11  Said Abou-Hallawa  <sabouhallawa@apple.com>
339
340         REGRESSION(r219045): The <body> element does not get repainted when its background image finishes decoding
341         https://bugs.webkit.org/show_bug.cgi?id=174376
342
343         Reviewed by Simon Fraser.
344
345         When adding a CachedImageClient to CachedImage::m_pendingImageDrawingClients
346         and the CachedImageClient is not one of the CachedImage::m_clients, we
347         should cancel the repaint optimization in CachedImage::imageFrameAvailable().
348         This can be done by adding all the CachedImage::m_clients to CachedImage::
349         m_pendingImageDrawingClients.
350
351         Test: fast/images/async-image-body-background-image.html
352
353         * loader/cache/CachedImage.cpp:
354         (WebCore::CachedImage::addPendingImageDrawingClient):
355
356 2017-07-11  Chris Dumez  <cdumez@apple.com>
357
358         Unreviewed, fix Windows build after r219355.
359
360         * bindings/js/JSDOMWindowCustom.cpp:
361         (WebCore::addCrossOriginWindowPropertyNames):
362         (WebCore::addCrossOriginWindowOwnPropertyNames):
363         (WebCore::JSDOMWindow::getOwnPropertyNames):
364         (WebCore::addCrossOriginPropertyNames): Deleted.
365         (WebCore::addCrossOriginOwnPropertyNames): Deleted.
366         * bindings/js/JSLocationCustom.cpp:
367         (WebCore::addCrossOriginLocationPropertyNames):
368         (WebCore::addCrossOriginLocationOwnPropertyNames):
369         (WebCore::JSLocation::getOwnPropertyNames):
370         (WebCore::addCrossOriginPropertyNames): Deleted.
371         (WebCore::addCrossOriginOwnPropertyNames): Deleted.
372
373 2017-07-10  Sam Weinig  <sam@webkit.org>
374
375         [WebIDL] Convert MutationCallback to be a normal generate callback
376         https://bugs.webkit.org/show_bug.cgi?id=174140
377
378         Reviewed by Chris Dumez.
379
380         To make this work more nicely, I:
381         - Added the ability to for non-nullable interfaces in sequences to be passed
382           via a Ref<> rather than a RefPtr<> as a parameter to a callback function.
383           (e.g. callback MyCallback = void (sequence<Foo> foos) will now have the 
384           signature, CallbackResult<void> handleEvent(const Vector<Ref<Foo>>&) rather
385           than CallbackResult<void> handleEvent(const Vector<RefPtr<Foo>>&).
386         - Added a new extended attribute for callback functions called [CallbackNeedsCanInvoke]
387           that adds a virtual function called canInvoke() to the generated callback.
388           All it does is forward to ActiveDOMCallback's canInvokeCallback, but it
389           allows the implementation to get to it. We may one day want to move the 
390           inheritance of ActiveDOMCallback from the generated source to the base class.
391         - Added a new extended attribute for callback functions called [CallbackThisObject=Type]
392           which allows you to specify that the callback needs a this object in addition
393           to its arguments. When specified, the first argument of the C++ implementation
394           function will now correspond to the this object, with the remaining arguments
395           shifted over one.
396
397         * DerivedSources.make:
398         Add MutationCallback.
399
400         * WebCore.xcodeproj/project.pbxproj:
401         Remove non-generated JSMutationCallback.cpp, and add generated JSMutationCallback.cpp.
402
403         * Modules/mediastream/MediaDevicesRequest.cpp:
404         (WebCore::MediaDevicesRequest::filterDeviceList):
405         (WebCore::MediaDevicesRequest::start):
406         * Modules/mediastream/MediaDevicesRequest.h:
407         Switch to using Ref.
408
409         * bindings/IDLTypes.h:
410         Add InnerParameterType and NullableInnerParameterType type hooks
411         and specialize wrappers to use Ref for InnerParameterType, and RefPtr
412         for NullableInnerParameterType.
413
414         * bindings/js/JSCallbackData.cpp:
415         * bindings/js/JSCallbackData.h:
416         Add support for passing a this object.
417
418         * bindings/js/JSMutationCallback.cpp: Removed.
419         * bindings/js/JSMutationCallback.h: Removed.
420         Remove custom callback code.
421
422         * bindings/js/JSMutationObserverCustom.cpp:
423         (WebCore::constructJSMutationObserver): Deleted.
424         Remove no longer needed custom constructor.
425
426         * bindings/scripts/CodeGenerator.pm:
427         (ParseType):
428         Add helper to parse a type and cache the result.
429
430         * bindings/scripts/CodeGeneratorJS.pm:
431         (GenerateCallbackHeaderContent):
432         (GenerateCallbackImplementationContent):
433         Add support for [CallbackNeedsCanInvoke] and [CallbackThisObject]. When [CallbackThisObject]
434         is not specified, use jsUndefined() as the this object as specified by WebIDL.
435
436         * bindings/scripts/IDLAttributes.json:
437         Add [CallbackNeedsCanInvoke] and [CallbackThisObject].
438
439         * bindings/scripts/IDLParser.pm:
440         (ParseType):
441         Add entry point to parse a single type.
442
443         * css/FontFaceSet.h:
444         Switch to using Ref.
445
446         * dom/MutationCallback.h:
447         Update signatures.
448
449         * dom/MutationCallback.idl: Added.
450     
451         * dom/MutationObserver.cpp:
452         (WebCore::MutationObserver::canDeliver):
453         (WebCore::MutationObserver::deliver):
454         Switch to new signatures.
455
456         * dom/MutationObserver.idl:
457         Remove CustomConstructor.
458
459         * page/IntersectionObserverCallback.h:
460         Switch to using Ref.
461
462         * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
463         * bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp:
464         * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp: Added.
465         * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h: Added.
466         * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
467         * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
468         * bindings/scripts/test/JS/JSTestCallbackInterface.h:
469         * bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
470         Add / update bindings tests.
471
472 2017-07-11  Said Abou-Hallawa  <sabouhallawa@apple.com>
473
474         RenderImage should not add itself as a RelevantRepaintedObject if its image frame is being decoded
475         https://bugs.webkit.org/show_bug.cgi?id=174336
476
477         Reviewed by Simon Fraser.
478
479         Since nothing will be drawn till the image frame finishes decoding we should
480         treat returning ImageDrawResult::DidRequestDecoding from BitmapImage::draw
481         the same as we do when the image is still loading.
482
483         * rendering/RenderImage.cpp:
484         (WebCore::RenderImage::paintReplaced):
485         (WebCore::RenderImage::paintIntoRect):
486         * rendering/RenderImage.h:
487
488 2017-07-11  Youenn Fablet  <youenn@apple.com>
489
490         [WebRTC] Hanging under LibWebRTCMediaEndpoint::getStats
491         https://bugs.webkit.org/show_bug.cgi?id=174377
492
493         Reviewed by Eric Carlson.
494
495         No change of behavior.
496         Moving calls to libwebrtc getStats in the signalling thread since doing it in the main thread
497         would block the main thread until the signalling thread is ready to handle getStats.
498         Reducing stat logging since this may be too much for some devices.
499
500         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
501         (WebCore::LibWebRTCMediaEndpoint::getStats):
502         (WebCore::LibWebRTCMediaEndpoint::gatherStatsForLogging):
503         (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered):
504         (WebCore::LibWebRTCMediaEndpoint::startLoggingStats):
505
506 2017-07-11  Michael Catanzaro  <mcatanzaro@igalia.com>
507
508         Remove unused OpenGL files
509         https://bugs.webkit.org/show_bug.cgi?id=174371
510
511         Reviewed by Timothy Hatcher.
512
513         * platform/graphics/opengl/GLPlatformContext.cpp: Removed.
514         * platform/graphics/opengl/GLPlatformContext.h: Removed.
515         * platform/graphics/opengl/GLPlatformSurface.h: Removed.
516
517 2017-07-11  Chris Dumez  <cdumez@apple.com>
518
519         Window's [[OwnPropertyKeys]] is wrong for cross origin windows
520         https://bugs.webkit.org/show_bug.cgi?id=174364
521         <rdar://problem/33238056>
522
523         Reviewed by Brent Fulgham.
524
525         Window's [[OwnPropertyKeys]] should not list descendant frame names
526         when the window is cross-origin:
527         - https://github.com/whatwg/html/pull/2777
528
529         This aligns our behavior with Firefox and Chrome.
530
531         No new tests, updated existing test.
532
533         * bindings/js/JSDOMWindowCustom.cpp:
534         (WebCore::addCrossOriginPropertyNames):
535         (WebCore::addCrossOriginOwnPropertyNames):
536         (WebCore::JSDOMWindow::getOwnPropertyNames):
537
538 2017-07-11  Timothy Hatcher  <timothy@hatcher.name>
539
540         Fix broken build when ENABLE_VIDEO is disabled.
541         https://bugs.webkit.org/show_bug.cgi?id=174368
542
543         Reviewed by Alex Christensen.
544
545         * dom/Document.cpp:
546         * html/canvas/WebGLRenderingContextBase.cpp:
547         (WebCore::WebGLRenderingContextBase::texSubImage2D):
548         (WebCore::WebGLRenderingContextBase::texImage2D):
549         * html/canvas/WebGLRenderingContextBase.h:
550         * html/canvas/WebGLRenderingContextBase.idl:
551         * testing/Internals.cpp:
552         (WebCore::Internals::mediaResponseSources):
553         (WebCore::Internals::mediaResponseContentRanges):
554         * testing/Internals.h:
555         * testing/Internals.idl:
556
557 2017-07-11  Ali Juma  <ajuma@chromium.org>
558
559         elementFromPoint() should consider x and y to be in client (layout viewport) coordinates
560         https://bugs.webkit.org/show_bug.cgi?id=172019
561
562         Reviewed by Simon Fraser.
563
564         When visual viewports are enabled, this makes TreeScope::nodeFromPoint consider its
565         input to be in client coordinates, and clips this input to the layout viewport. This change
566         affects the behavior of document.elementFromPoint() and document.caretRangeFromPoint.
567
568         No new tests. Modified an existing test, and made a previously-failing test pass on ios.
569
570         * dom/TreeScope.cpp:
571         (WebCore::TreeScope::nodeFromPoint):
572         * page/FrameView.cpp:
573         (WebCore::FrameView::layoutViewportToAbsoluteRect):
574         (WebCore::FrameView::layoutViewportToAbsolutePoint):
575         (WebCore::FrameView::clientToLayoutViewportPoint):
576         * page/FrameView.h:
577         * rendering/RenderLayer.cpp:
578         (WebCore::RenderLayer::hitTest):
579
580 2017-07-11  Timothy Hatcher  <timothy@hatcher.name>
581
582         Broken build when !USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
583         https://bugs.webkit.org/show_bug.cgi?id=174369
584
585         Reviewed by Alex Christensen.
586
587         * dom/ScriptedAnimationController.h: Include PlatformScreen.h.
588
589 2017-07-11  Wenson Hsieh  <wenson_hsieh@apple.com>
590
591         Address post-review feedback after http://trac.webkit.org/r219310
592         https://bugs.webkit.org/show_bug.cgi?id=174300
593         <rdar://problem/33030639>
594
595         Reviewed by Simon Fraser.
596
597         Removes pan-gesture-related plumbing introduced in r219310 that is no longer necessary.
598
599         * page/scrolling/ScrollingTree.h:
600         (WebCore::ScrollingTree::scrollingTreeNodeWillStartPanGesture):
601         (WebCore::ScrollingTree::scrollingTreeNodeDidEndPanGesture): Deleted.
602
603 2017-07-11  Alex Christensen  <achristensen@webkit.org>
604
605         Reduce URL size
606         https://bugs.webkit.org/show_bug.cgi?id=174319
607
608         Reviewed by Andreas Kling.
609
610         m_fragmentEnd is redundant information. If a URL is valid, then it is always m_string.length().
611         If a URL is not valid, then it is always 0. Rather than storing additional information,
612         deduce the fragment end from the validity of the URL and the String's length.
613
614         No change in behavior.  This reduces sizeof(URL) from 56 to 48 and reduces operations when parsing.
615
616         * platform/URL.cpp:
617         (WebCore::URL::invalidate):
618         (WebCore::URL::fragmentIdentifier):
619         (WebCore::URL::hasFragmentIdentifier):
620         (WebCore::URL::removeFragmentIdentifier):
621         * platform/URL.h:
622         (WebCore::URL::encode):
623         (WebCore::URL::decode):
624         (WebCore::URL::hasFragment):
625         * platform/URLParser.cpp:
626         (WebCore::URLParser::urlLengthUntilPart):
627         (WebCore::URLParser::copyURLPartsUntil):
628         (WebCore::URLParser::parse):
629         (WebCore::URLParser::allValuesEqual):
630         (WebCore::URLParser::internalValuesConsistent):
631
632 2017-07-11  Alex Christensen  <achristensen@webkit.org>
633
634         SharedBuffer::size should return a size_t
635         https://bugs.webkit.org/show_bug.cgi?id=174328
636
637         Reviewed by Andreas Kling.
638
639         No change in behaviour.
640
641         * html/FTPDirectoryDocument.cpp:
642         (WebCore::createTemplateDocumentData):
643         * loader/ContentFilter.cpp:
644         (WebCore::ContentFilter::handleProvisionalLoadFailure):
645         * loader/ResourceLoader.cpp:
646         (WebCore::ResourceLoader::loadDataURL):
647         * loader/ResourceLoader.h:
648         * loader/appcache/ApplicationCacheStorage.cpp:
649         (WebCore::ApplicationCacheStorage::store):
650         * loader/cache/CachedScript.cpp:
651         (WebCore::CachedScript::script):
652         * platform/SharedBuffer.cpp:
653         (WebCore::SharedBuffer::tryCreateArrayBuffer):
654         * platform/SharedBuffer.h:
655
656 2017-07-11  Per Arne Vollan  <pvollan@apple.com>
657
658         [Win] Build error when building WebCore from WebCore.proj project file.
659         https://bugs.webkit.org/show_bug.cgi?id=174330
660
661         Reviewed by Brent Fulgham.
662
663         The CMake variable PAL_DIR should be set in the project file.
664
665         * WebCore.vcxproj/WebCore.proj:
666
667 2017-05-24  Sergio Villar Senin  <svillar@igalia.com>
668
669         [SVG] Leak in SVGAnimatedListPropertyTearOff
670         https://bugs.webkit.org/show_bug.cgi?id=172545
671
672         Reviewed by Said Abou-Hallawa.
673
674         SVGAnimatedListPropertyTearOff maintains a vector m_wrappers with references to
675         SVGPropertyTraits<PropertyType>::ListItemTearOff. Apart from that SVGPropertyTearOff has a
676         reference to SVGAnimatedProperty.
677
678         When SVGListProperty::getItemValuesAndWrappers() is called, it creates a
679         SVGPropertyTraits<PropertyType>::ListItemTearOff pointing to the same SVGAnimatedProperty (a
680         SVGAnimatedListPropertyTearOff) which stores the m_wrappers vector where the ListItemTearOff
681         is going to be added to. This effectively creates a reference cycle between the
682         SVGAnimatedListPropertyTearOff and all the ListItemTearOff it stores in m_wrappers.
683
684         We should detach those wrappers in propertyWillBeDeleted() in order to break the cycle.
685
686         * svg/properties/SVGAnimatedListPropertyTearOff.h:
687
688 2017-07-11  Carlos Alberto Lopez Perez  <clopez@igalia.com>
689
690         [GTK] Spin buttons on input type number appear over the value itself for small widths
691         https://bugs.webkit.org/show_bug.cgi?id=173572
692
693         Reviewed by Carlos Garcia Campos.
694
695         When drawing the spin buttons, override the width of the input
696         element to increment it with the width of the spin button.
697         This ensures that we don't end up covering the input values with
698         the spin buttons.
699
700         Do this also for user controlled styles, because most web authors
701         won't test how their site renders on WebKitGTK+, and they will
702         assume spin buttons in the order of 13 pixels wide (that is what
703         most browsers use), but the GTK+ spin button is much wider (66 pixels).
704
705         Test: platform/gtk/fast/forms/number/number-size-spinbutton-nocover.html
706
707         * rendering/RenderTheme.cpp:
708         (WebCore::RenderTheme::adjustStyle):
709         * rendering/RenderThemeGtk.cpp:
710         (WebCore::RenderThemeGtk::adjustTextFieldStyle): Call the theme's adjustTextFieldStyle() also for user controlled styles.
711         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
712
713 2017-07-11  Youenn Fablet  <youenn@apple.com>
714
715         We should do ICE candidate filtering at the Document level
716         https://bugs.webkit.org/show_bug.cgi?id=173861
717         <rdar://problem/33122058>
718
719         Reviewed by Eric Carlson.
720
721         Tests: http/tests/webrtc/filtering-ice-candidate-cross-origin-frame.html
722                http/tests/webrtc/filtering-ice-candidate-same-origin-frame.html
723                http/tests/webrtc/filtering-ice-candidate-same-origin-frame2.html
724                webrtc/filtering-ice-candidate-after-reload.html
725
726         Making UserMediaRequest disable the ICE candidate filtering for the page RTCController.
727         All RTCPeerConnection of the page that are created on a document that are same-origin as the top document
728         are now registered to the RTCController.
729         This allows disabling filtering to only these RTCPeerConnection.
730
731         The page keeps the default ICE candidate filtering policy.
732         This policy allows disabling ICE candidate filtering for all RTCPeerConnection.
733
734         When the top document is changing, the RTCController filtering policy is reset
735         and its list of RTCPeerConnection is emptied.
736
737         Internals no longer disables ICE candidate filtering by default.
738         This allows finer grained testing.
739         ICE candidate filtering is disabled for tests including testharnessreport.js
740         to enable web-platform-tests to run without modifications.
741
742         * Modules/mediastream/RTCController.cpp:
743         (WebCore::RTCController::reset):
744         * Modules/mediastream/RTCController.h:
745         * Modules/mediastream/UserMediaRequest.cpp:
746         (WebCore::UserMediaRequest::allow):
747         * page/Frame.cpp:
748         (WebCore::Frame::setDocument):
749         * page/Page.cpp:
750         (WebCore::Page::disableICECandidateFiltering):
751         * page/Page.h:
752         (WebCore::Page::shouldEnableICECandidateFilteringByDefault):
753         (WebCore::Page::disableICECandidateFiltering): Deleted.
754         (WebCore::Page::enableICECandidateFiltering): Deleted.
755         (WebCore::Page::isICECandidateFilteringEnabled): Deleted.
756         * testing/Internals.cpp:
757         (WebCore::Internals::Internals):
758         (WebCore::Internals::setICECandidateFiltering):
759         (WebCore::Internals::setEnumeratingAllNetworkInterfacesEnabled):
760         (WebCore::Internals::isICECandidateFilteringEnabled): Deleted.
761         * testing/Internals.h:
762         * testing/Internals.idl:
763
764 2017-07-11  Sergio Villar Senin  <svillar@igalia.com>
765
766         Unreviewed, rolling out r219325.
767
768         The test is still flaky
769
770         Reverted changeset:
771
772         "[SVG] Leak in SVGAnimatedListPropertyTearOff"
773         https://bugs.webkit.org/show_bug.cgi?id=172545
774         http://trac.webkit.org/changeset/219325
775
776 2017-05-24  Sergio Villar Senin  <svillar@igalia.com>
777
778         [SVG] Leak in SVGAnimatedListPropertyTearOff
779         https://bugs.webkit.org/show_bug.cgi?id=172545
780
781         Reviewed by Said Abou-Hallawa.
782
783         SVGAnimatedListPropertyTearOff maintains a vector m_wrappers with references to
784         SVGPropertyTraits<PropertyType>::ListItemTearOff. Apart from that SVGPropertyTearOff has a
785         reference to SVGAnimatedProperty.
786
787         When SVGListProperty::getItemValuesAndWrappers() is called, it creates a
788         SVGPropertyTraits<PropertyType>::ListItemTearOff pointing to the same SVGAnimatedProperty (a
789         SVGAnimatedListPropertyTearOff) which stores the m_wrappers vector where the ListItemTearOff
790         is going to be added to. This effectively creates a reference cycle between the
791         SVGAnimatedListPropertyTearOff and all the ListItemTearOff it stores in m_wrappers.
792
793         We should detach those wrappers in propertyWillBeDeleted() in order to break the cycle.
794
795         * svg/properties/SVGAnimatedListPropertyTearOff.h:
796
797 2017-07-10  Simon Fraser  <simon.fraser@apple.com>
798
799         [WK2 iOS] REGRESSION (r216803) During momentum scroll, getBoundingClientRect returns wrong coordinates (missing images on pinterest, elle.com and many other sites)
800         https://bugs.webkit.org/show_bug.cgi?id=174286
801         rdar://problem/32864180
802
803         Reviewed by Dean Jackson.
804
805         r216803 made getBoundingClientRects relative to the layout viewport, but when scrolling we
806         only update that on stable viewport updates (at the end of the scroll). This meant that during
807         unstable updates, getBoundingClientRects() used a "frozen" viewport origin so things on-screen
808         would appear to be off-screen, causing sites to fail to dynamically load images etc. when
809         scrolling.
810
811         Fix by pushing an optional "unstable" layout viewport rect onto FrameView, which gets used by
812         FrameView::documentToClientOffset(). This is cleared when we do a stable update.
813
814         This is a short-term solution. Longer term, I would prefer to always call setLayoutViewportOverrideRect(),
815         but fix the scrolling tree logic to work correctly in this case.
816
817         Add a bit more scrolling logging.
818
819         Test: fast/visual-viewport/ios/get-bounding-client-rect-unstable.html
820
821         * page/FrameView.cpp:
822         (WebCore::FrameView::setUnstableLayoutViewportRect):
823         (WebCore::FrameView::documentToClientOffset):
824         * page/FrameView.h:
825         * page/scrolling/AsyncScrollingCoordinator.cpp:
826         (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
827         * page/scrolling/ScrollingStateFixedNode.cpp:
828         (WebCore::ScrollingStateFixedNode::updateConstraints):
829         (WebCore::ScrollingStateFixedNode::reconcileLayerPositionForViewportRect):
830
831 2017-07-10  John Wilander  <wilander@apple.com>
832
833         Resource Load Statistics: Prune statistics in orders of importance
834         https://bugs.webkit.org/show_bug.cgi?id=174215
835         <rdar://problem/33164403>
836
837         Reviewed by Chris Dumez.
838
839         Test: http/tests/loading/resourceLoadStatistics/prune-statistics.html
840
841         * loader/ResourceLoadObserver.cpp:
842         (WebCore::reduceTimeResolution):
843         (WebCore::ResourceLoadObserver::logFrameNavigation):
844         (WebCore::ResourceLoadObserver::logSubresourceLoading):
845         (WebCore::ResourceLoadObserver::logWebSocketLoading):
846         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
847             Now all set the new statistics field lastSeen.
848         * loader/ResourceLoadStatistics.cpp:
849         (WebCore::ResourceLoadStatistics::encode):
850         (WebCore::ResourceLoadStatistics::decode):
851         (WebCore::ResourceLoadStatistics::toString):
852         (WebCore::ResourceLoadStatistics::merge):
853             Handling of the new statistics field lastSeen.
854         * loader/ResourceLoadStatistics.h:
855
856 2017-07-10  Devin Rousso  <drousso@apple.com>
857
858         Web Inspector: Highlight matching CSS canvas clients when hovering contexts in the Resources tab
859         https://bugs.webkit.org/show_bug.cgi?id=174279
860
861         Reviewed by Matt Baker.
862
863         Test: inspector/dom/highlightNodeList.html
864
865         * inspector/InspectorDOMAgent.h:
866         * inspector/InspectorDOMAgent.cpp:
867         (WebCore::InspectorDOMAgent::highlightNodeList):
868
869 2017-07-10  Javier Fernandez  <jfernandez@igalia.com>
870
871         [css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved
872         https://bugs.webkit.org/show_bug.cgi?id=172707
873
874         Reviewed by Antti Koivisto.
875
876         The CSS Box Alignment specification has been changed recently so that
877         now all the propeties have the specificed value as computed value. The
878         rationale of this change are at the associated W3C github issue [1].
879
880         This change implies that we don't need to execute the StyleAdjuter
881         logic we implemented specifically for supporting 'auto' values
882         resolution for computed style. We can live now with resolution at
883         layout time only.
884
885         [1] https://github.com/w3c/csswg-drafts/issues/440
886
887         No new tests, just updating the already defined tests.
888
889         * css/CSSComputedStyleDeclaration.cpp:
890         (WebCore::ComputedStyleExtractor::propertyValue):
891         * css/StyleResolver.cpp:
892         (WebCore::StyleResolver::adjustRenderStyle): Removed
893         * css/StyleResolver.h:
894         * html/shadow/TextControlInnerElements.cpp:
895         (WebCore::TextControlInnerElement::resolveCustomStyle):
896         * rendering/RenderBox.cpp:
897         (WebCore::RenderBox::columnFlexItemHasStretchAlignment):
898         (WebCore::RenderBox::hasStretchedLogicalWidth):
899         * rendering/RenderFlexibleBox.cpp:
900         (WebCore::RenderFlexibleBox::styleDidChange): Added
901         (WebCore::RenderFlexibleBox::alignmentForChild):
902         * rendering/RenderFlexibleBox.h:
903
904 2017-07-10  Wenson Hsieh  <wenson_hsieh@apple.com>
905
906         [WK2] Ignore touch events that interrupt platform-driven momentum scrolling
907         https://bugs.webkit.org/show_bug.cgi?id=174300
908         <rdar://problem/33030639>
909
910         Reviewed by Simon Fraser.
911
912         See Source/WebKit2/ChangeLog for more detail.
913
914         Tests: fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe.html
915                fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-overflow.html
916                fast/events/ios/touch-events-during-scroll-deceleration-in-overflow.html
917
918         * page/scrolling/ScrollingTree.h:
919         (WebCore::ScrollingTree::scrollingTreeNodeDidEndPanGesture):
920
921 2017-07-10  Jeremy Jones  <jeremyj@apple.com>
922
923         Captions and subtitles not showing up in picture-in-picture for MSE content
924         https://bugs.webkit.org/show_bug.cgi?id=174317
925         rdar://problem/33188591
926
927         Reviewed by Eric Carlson.
928
929         Reverts a regression created by r218403.
930
931         * html/shadow/MediaControlElements.cpp:
932         (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation):
933
934 2017-07-10  Per Arne Vollan  <pvollan@apple.com>
935
936         [Win] Link error when building WTF from WTF.proj project file.
937         https://bugs.webkit.org/show_bug.cgi?id=174316
938         <rdar://problem/33178200>
939
940         Reviewed by Brent Fulgham.
941
942         WTF_CPU_X86 cmake variable needs to be set for link libraries directories to be correct.
943
944         * WebCore.vcxproj/WebCore.proj:
945
946 2017-07-10  Jeremy Jones  <jeremyj@apple.com>
947
948         media element handle adding source immediately before src.
949         https://bugs.webkit.org/show_bug.cgi?id=174284
950         rdar://problem/33115439
951
952         Reviewed by David Kilzer.
953
954         Test: media/video-source-before-src.html
955
956         Adding a source causes a selectMediaResource block to be enqueued.
957         If dataLoadingPermitted prevents creating the m_player but sets the srcAttr, then
958         the enqueued selectMediaResource will be in a bad state, with a srcAttr but no m_player.
959
960         This fix prevents selectMediaResource from being called, if data loading is not permitted
961         when adding a source element, to match how it prevents player creation when setting srcAttr.
962
963         This fix also adds a debug assert to catch the problem earlier and adds an early return to
964         prevent the crash in release builds.
965
966         * html/HTMLMediaElement.cpp:
967         (WebCore::HTMLMediaElement::selectMediaResource):
968         (WebCore::HTMLMediaElement::sourceWasAdded):
969
970 2017-07-10  Megan Gardner  <megan_gardner@apple.com>
971
972         Add location to NavigationActionData
973         https://bugs.webkit.org/show_bug.cgi?id=174233
974         <rdar://problem/29165518>
975
976         Reviewed by Simon Fraser.
977         
978         Add the root view location of a tap to a NavigationAction to vend to Safari.
979
980         Test: small enough change to not be tested alone.
981
982         * dom/MouseRelatedEvent.cpp:
983         (WebCore::MouseRelatedEvent::absoluteLocationConvertedToRootView):
984         * dom/MouseRelatedEvent.h:
985
986 2017-07-10  Sam Weinig  <sam@webkit.org>
987
988         [WebIDL] Move plugin object customization into the generator
989         https://bugs.webkit.org/show_bug.cgi?id=174238
990
991         Reviewed by Chris Dumez.
992
993         - Added [Plugin] extended attribute to forward the necessary hooks
994           for get/set/delete to the plugin code.
995         - Removed [CustomNamedSetter] and replaced it's remaining uses
996           [CustomPut] (formally called [CustomPutFunction]).
997         - Renamed [CustomNamedGetterOnPrototype] to [CustomPutOnPrototype]
998           because that is actually what it does.
999         - Removed [CustomGetOwnPropertySlotByIndex] and made 
1000           [CustomGetOwnPropertySlot] imply it, as the other custom hooks
1001           do.
1002         - Renamed [CustomEnumerateProperty] to [CustomGetOwnPropertyNames]
1003           to conform with other attribute names.
1004         - Renamed [CustomCall] to [CustomGetCallData] to conform with other 
1005           attribute names.
1006
1007         * CMakeLists.txt:
1008         * WebCore.xcodeproj/project.pbxproj:
1009         * bindings/js/JSBindingsAllInOne.cpp:
1010         * bindings/js/JSHTMLAppletElementCustom.cpp: Removed.
1011         * bindings/js/JSHTMLEmbedElementCustom.cpp: Removed.
1012         * bindings/js/JSHTMLObjectElementCustom.cpp: Removed.
1013         Remove custom bindings.
1014
1015         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1016         (WebCore::putCommon):
1017         (WebCore::JSCSSStyleDeclaration::put):
1018         (WebCore::JSCSSStyleDeclaration::putByIndex):
1019         (WebCore::JSCSSStyleDeclaration::putDelegate): Deleted.
1020         Use [CustomPut] rather than [CustomNamedSetter] to allow us
1021         to get rid of [CustomNamedSetter]. Reuse put delegate as
1022         common code to share between put and putByIndex.
1023
1024         * bindings/js/JSLocationCustom.cpp:
1025         (WebCore::getOwnPropertySlotCommon):
1026         (WebCore::JSLocation::getOwnPropertySlot):
1027         (WebCore::JSLocation::getOwnPropertySlotByIndex):
1028         Replace [CustomGetOwnPropertySlotAndDescriptor] with [CustomGetOwnPropertySlot]
1029         which is more clear and reduces the number of variants of this hook override
1030         we need.
1031
1032         (WebCore::putCommon):
1033         (WebCore::JSLocation::put):
1034         (WebCore::JSLocation::putByIndex):
1035         Use [CustomPut] rather than [CustomNamedSetter] to allow us
1036         to get rid of [CustomNamedSetter]. Reuse put delegate as
1037         common code to share between put and putByIndex.
1038
1039         (WebCore::JSLocationPrototype::put):
1040         [CustomPutOnPrototype] (which weirdly used incorrectly be called 
1041         [CustomNamedGetterOnPrototype]) now works like [CustomPut] meaning
1042         you need to call Base.
1043
1044         * bindings/js/JSPluginElementFunctions.cpp:
1045         (WebCore::pluginElementPropertyGetter):
1046         (WebCore::pluginElementCustomGetOwnPropertySlot):
1047         (WebCore::pluginElementCustomPut):
1048         * bindings/js/JSPluginElementFunctions.h:
1049         (WebCore::pluginElementCustomGetOwnPropertySlot): Deleted.
1050         Remove templatized pluginElementCustomGetOwnPropertySlot, which was 
1051         completely unnecessary and merge its functionality into the out of
1052         line overload. Remove pluginElementPropertyGetter from the header,
1053         since it is only used in implementation, and unify the naming and
1054         argument position (JSHTMLElement* comes first) of the hooks.
1055
1056         * bindings/scripts/CodeGeneratorJS.pm:
1057         (GenerateIndexedGetter):
1058         (GenerateNamedGetter):
1059         (GenerateGetOwnPropertySlot):
1060         (GenerateGetOwnPropertySlotByIndex):
1061         (GenerateGetOwnPropertyNames):
1062         (GeneratePut):
1063         (GeneratePutByIndex):
1064         (GenerateDeleteProperty):
1065         (GenerateDeletePropertyByIndex):
1066         (GenerateNamedDeleterDefinition):
1067         (InstanceOverridesGetOwnPropertySlot):
1068         (InstanceOverridesGetOwnPropertyNames):
1069         (InstanceOverridesPut):
1070         (InstanceOverridesDeleteProperty):
1071         (GenerateHeader):
1072         (GenerateImplementation):
1073         (GenerateGetCallData):
1074         (GeneratePluginCall):
1075         (GenerateLegacyCallerDefinitions):
1076         (GenerateLegacyCallerDefinition):
1077         (GeneratePrototypeDeclaration):
1078         (InstanceOverridesGetCallData):
1079         (HeaderNeedsPrototypeDeclaration):
1080         - Add support for [Plugin]
1081         - Remove support for [CustomNamedSetter]
1082         - Replace [CustomGetOwnPropertySlotByIndex] with [CustomGetOwnPropertySlot]
1083         - Replace [CustomEnumerateProperty] with [CustomGetOwnPropertyNames]
1084         - Replace [CustomPutFunction] with [CustomPut].
1085         - Make subroutine names more consistent (remove a few Definition suffixes)
1086
1087         * bindings/scripts/IDLAttributes.json:
1088         Update for new / removed attributes.
1089
1090         * bindings/scripts/test/JS/JSTestInterface.cpp:
1091         * bindings/scripts/test/JS/JSTestInterface.h:
1092         * bindings/scripts/test/JS/JSTestPluginInterface.cpp: Added.
1093         * bindings/scripts/test/JS/JSTestPluginInterface.h: Added.
1094         * bindings/scripts/test/TestInterface.idl:
1095         * bindings/scripts/test/TestPluginInterface.idl: Added.
1096         Update / add tests.
1097
1098         * css/CSSStyleDeclaration.idl:
1099         * html/HTMLAppletElement.idl:
1100         * html/HTMLEmbedElement.idl:
1101         * html/HTMLObjectElement.idl:
1102         * page/DOMWindow.idl:
1103         * page/Location.idl:
1104         * storage/Storage.idl:
1105         Update for new / renamed attributes.
1106
1107 2017-07-03  Brian Burg  <bburg@apple.com>
1108
1109         Web Replay: remove some unused code
1110         https://bugs.webkit.org/show_bug.cgi?id=173903
1111
1112         Rubber-stamped by Joseph Pecoraro.
1113
1114         * CMakeLists.txt:
1115         * Configurations/FeatureDefines.xcconfig:
1116         * DerivedSources.make:
1117         * PlatformMac.cmake:
1118         * WebCore.xcodeproj/project.pbxproj:
1119         * dom/Document.cpp:
1120         (WebCore::Document::Document):
1121         (WebCore::Document::lastModified):
1122         (WebCore::Document::inputCursor): Deleted.
1123         (WebCore::Document::setInputCursor): Deleted.
1124         * dom/Document.h:
1125         * inspector/InspectorController.cpp:
1126         (WebCore::InspectorController::InspectorController):
1127         * inspector/InspectorInstrumentation.cpp:
1128         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
1129         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
1130         (WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
1131         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1132         (WebCore::InspectorInstrumentation::sessionCreatedImpl): Deleted.
1133         (WebCore::InspectorInstrumentation::sessionLoadedImpl): Deleted.
1134         (WebCore::InspectorInstrumentation::sessionModifiedImpl): Deleted.
1135         (WebCore::InspectorInstrumentation::segmentCreatedImpl): Deleted.
1136         (WebCore::InspectorInstrumentation::segmentCompletedImpl): Deleted.
1137         (WebCore::InspectorInstrumentation::segmentLoadedImpl): Deleted.
1138         (WebCore::InspectorInstrumentation::segmentUnloadedImpl): Deleted.
1139         (WebCore::InspectorInstrumentation::captureStartedImpl): Deleted.
1140         (WebCore::InspectorInstrumentation::captureStoppedImpl): Deleted.
1141         (WebCore::InspectorInstrumentation::playbackStartedImpl): Deleted.
1142         (WebCore::InspectorInstrumentation::playbackPausedImpl): Deleted.
1143         (WebCore::InspectorInstrumentation::playbackHitPositionImpl): Deleted.
1144         (WebCore::InspectorInstrumentation::playbackFinishedImpl): Deleted.
1145         (WebCore::InspectorInstrumentation::replayAgentEnabled): Deleted.
1146         * inspector/InspectorInstrumentation.h:
1147         (WebCore::InspectorInstrumentation::sessionCreated): Deleted.
1148         (WebCore::InspectorInstrumentation::sessionLoaded): Deleted.
1149         (WebCore::InspectorInstrumentation::sessionModified): Deleted.
1150         (WebCore::InspectorInstrumentation::segmentCreated): Deleted.
1151         (WebCore::InspectorInstrumentation::segmentCompleted): Deleted.
1152         (WebCore::InspectorInstrumentation::segmentLoaded): Deleted.
1153         (WebCore::InspectorInstrumentation::segmentUnloaded): Deleted.
1154         (WebCore::InspectorInstrumentation::captureStarted): Deleted.
1155         (WebCore::InspectorInstrumentation::captureStopped): Deleted.
1156         (WebCore::InspectorInstrumentation::playbackStarted): Deleted.
1157         (WebCore::InspectorInstrumentation::playbackPaused): Deleted.
1158         (WebCore::InspectorInstrumentation::playbackFinished): Deleted.
1159         (WebCore::InspectorInstrumentation::playbackHitPosition): Deleted.
1160         * inspector/InspectorReplayAgent.cpp: Removed.
1161         * inspector/InspectorReplayAgent.h: Removed.
1162         * inspector/InstrumentingAgents.cpp:
1163         (WebCore::InstrumentingAgents::reset):
1164         * inspector/InstrumentingAgents.h:
1165         (WebCore::InstrumentingAgents::inspectorReplayAgent): Deleted.
1166         (WebCore::InstrumentingAgents::setInspectorReplayAgent): Deleted.
1167         * page/EventHandler.h:
1168         * page/Page.cpp:
1169         (WebCore::Page::Page):
1170         * page/Page.h:
1171         (WebCore::Page::replayController): Deleted.
1172         * page/scrolling/ScrollingCoordinator.cpp:
1173         (WebCore::ScrollingCoordinator::synchronousScrollingReasons):
1174         (WebCore::ScrollingCoordinator::replaySessionStateDidChange): Deleted.
1175         * page/scrolling/ScrollingCoordinator.h:
1176         * platform/Logging.h:
1177         * plugins/DOMMimeTypeArray.cpp:
1178         (WebCore::DOMMimeTypeArray::getPluginData):
1179         * plugins/DOMPluginArray.cpp:
1180         (WebCore::DOMPluginArray::pluginData):
1181         * replay/AllReplayInputs.h: Removed.
1182         * replay/CapturingInputCursor.cpp: Removed.
1183         * replay/CapturingInputCursor.h: Removed.
1184         * replay/EventLoopInput.cpp: Removed.
1185         * replay/EventLoopInput.h: Removed.
1186         * replay/EventLoopInputDispatcher.cpp: Removed.
1187         * replay/EventLoopInputDispatcher.h: Removed.
1188         * replay/FunctorInputCursor.h: Removed.
1189         * replay/MemoizedDOMResult.cpp: Removed.
1190         * replay/MemoizedDOMResult.h: Removed.
1191         * replay/ReplayController.cpp: Removed.
1192         * replay/ReplayController.h: Removed.
1193         * replay/ReplayInputCreationMethods.cpp: Removed.
1194         * replay/ReplayInputDispatchMethods.cpp: Removed.
1195         * replay/ReplaySession.cpp: Removed.
1196         * replay/ReplaySession.h: Removed.
1197         * replay/ReplaySessionSegment.cpp: Removed.
1198         * replay/ReplaySessionSegment.h: Removed.
1199         * replay/ReplayingInputCursor.cpp: Removed.
1200         * replay/ReplayingInputCursor.h: Removed.
1201         * replay/SegmentedInputStorage.cpp: Removed.
1202         * replay/SegmentedInputStorage.h: Removed.
1203         * replay/SerializationMethods.cpp: Removed.
1204         * replay/SerializationMethods.h: Removed.
1205         * replay/WebInputs.json: Removed.
1206
1207 2017-07-10  Brady Eidson  <beidson@apple.com>
1208
1209         Cleanup lifetime issues of UniqueIDBDatabase and IDBBackingStore.
1210         <rdar://problem/32908525> and https://bugs.webkit.org/show_bug.cgi?id=174244
1211
1212         Reviewed by David Kilzer and Alex Christensen. 
1213
1214         No targeted test possible, implicitly covered by all IDB tests.
1215
1216         The original idea behind UniqueIDBDatabase lifetime was that they are ThreadSafeRefCounted and
1217         we take protector Refs when any operation that needs it alive is in flight.
1218         
1219         This added variability to their lifetime which made it difficult to enforce a few different 
1220         design invariants, namely:
1221             - UniqueIBDDatabase objects are always created and destroyed only on the main thread.
1222             - IDBBackingStore objects are always created and destroyed only on the database thread.
1223         
1224         This patch removes the ref counting and instead ties UniqueIDBDatabase lifetime to a
1225         std::unique_ptr that is owned by the IDBServer.
1226         
1227         Whenever any operations on the UniqueIDBDatabase are in flight it is kept alive by virtue
1228         of that unique_ptr in the IDBServer. Once a UniqueIDBDatabase is completely done with all of
1229         its work, the following happens:
1230             - On the main thread the IDBServer removes the unique_ptr owning the UniqueIDBDatabase
1231               from its map.
1232             - It hands the unique_ptr to the UniqueIDBDatabase itself, which schedules one final 
1233               database thread task.
1234             - That database thread task is to destroy the IDBBackingStore, kill its message queues,
1235               and then message back to the main thread for one final task.
1236             - That main thread task is to release the unique_ptr, resulting in destruction of the
1237               UniqueIDBDatabase object.
1238         
1239         This is safe, predictable, solves the lifetime issues that r218516 originally tried to solve,
1240         and solves the lifetime issues that r218516 introduced.
1241
1242         (This patch also adds many more assertions to cover various design invariants throughout the
1243         lifecycle of a particular UniqueIDBDatabase)
1244
1245         ASSERT that IDBBackingStores are only ever created and destroyed on the background thread:
1246         * Modules/indexeddb/server/IDBBackingStore.h:
1247         (WebCore::IDBServer::IDBBackingStore::~IDBBackingStore):
1248         (WebCore::IDBServer::IDBBackingStore::IDBBackingStore):
1249         
1250         Transition UniqueIDBDatabase ownership from a RefPtr to a std::unique_ptr:
1251         * Modules/indexeddb/server/IDBServer.cpp:
1252         (WebCore::IDBServer::IDBServer::getOrCreateUniqueIDBDatabase):
1253         (WebCore::IDBServer::IDBServer::closeAndTakeUniqueIDBDatabase):
1254         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
1255         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesForOrigins):
1256         (WebCore::IDBServer::IDBServer::closeUniqueIDBDatabase): Deleted.
1257         * Modules/indexeddb/server/IDBServer.h:
1258         
1259         Make all the other changes mentioned above:
1260         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1261         (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase): Bulk up on ASSERTs
1262         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): 
1263         (WebCore::IDBServer::UniqueIDBDatabase::performUnconditionalDeleteBackingStore):
1264         (WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose):
1265         (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
1266         (WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose):
1267         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
1268         (WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation):
1269         (WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):
1270         (WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):
1271         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
1272         (WebCore::IDBServer::UniqueIDBDatabase::activateTransactionInBackingStore):
1273         (WebCore::IDBServer::UniqueIDBDatabase::transactionCompleted):
1274         (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTask):
1275         (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply):
1276         (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTask):
1277         (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTaskReply):
1278         (WebCore::IDBServer::UniqueIDBDatabase::maybeFinishHardClose):
1279         (WebCore::IDBServer::UniqueIDBDatabase::isDoneWithHardClose):
1280         (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
1281         (WebCore::IDBServer::UniqueIDBDatabase::didPerformUnconditionalDeleteBackingStore): Deleted.
1282         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1283         (WebCore::IDBServer::UniqueIDBDatabase::create): Deleted.
1284
1285 2017-07-10  Chris Dumez  <cdumez@apple.com>
1286
1287         Further WebResourceLoadStatisticsStore / ResourceLoadStatisticsStore clean up
1288         https://bugs.webkit.org/show_bug.cgi?id=174301
1289
1290         Reviewed by Brent Fulgham.
1291
1292         Moved some generic file system utility functions down to platform's FileSystem.h.
1293
1294         * platform/FileSystem.cpp:
1295         (WebCore::openAndLockFile):
1296         (WebCore::unlockAndCloseFile):
1297         * platform/FileSystem.h:
1298
1299 2017-07-10  Andreas Kling  <akling@apple.com>
1300
1301         REGRESSION(r210226): Keyboard-focused element not preserved when navigating back through page cache, causing multiple elements to have focus
1302         https://bugs.webkit.org/show_bug.cgi?id=174302
1303         <rdar://problem/33204273>
1304
1305         Reviewed by Antti Koivisto.
1306
1307         Don't clear the active/hovered/focused elements when destroying the render tree,
1308         since we might need to reconstruct it later, and would like to remember which
1309         elements those were.
1310
1311         Only the focused state actually stuck when going in and out of the page cache,
1312         but this patch removes all the element pointer clearing for consistency.
1313
1314         Test: fast/history/page-cache-element-state-focused.html
1315
1316         * dom/Document.cpp:
1317         (WebCore::Document::destroyRenderTree):
1318
1319 2017-07-10  Daniel Bates  <dabates@apple.com>
1320
1321         REGRESSION (r218616): Cannot build WebCore for macOS 10.12 with macOS 10.13 SDK
1322         https://bugs.webkit.org/show_bug.cgi?id=173939
1323
1324         Reviewed by Dan Bernstein.
1325
1326         (The code in this change was either suggested or written by Dan Bernstein with a very
1327         minor adjustment to get it to build).
1328
1329         Allow WebCore to link even though CTFontCreatePhysicalFontForCharactersWithLanguage() is
1330         undefined when building against the macOS 10.13 SDK targeting macOS 10.12. Let the dynamic
1331         linker resolve the undefined symbol.
1332
1333         For completeness the SPI CTFontCreatePhysicalFontForCharactersWithLanguage() was removed
1334         from the macOS 10.13 SDK.
1335
1336         * Configurations/WebCore.xcconfig: Tell the linker that CTFontCreatePhysicalFontForCharactersWithLanguage()
1337         can be undefined when building against macOS 10.13 or later SDK.
1338         * platform/spi/cocoa/CoreTextSPI.h: Annotate CTFontCreatePhysicalFontForCharactersWithLanguage()
1339         with its availability information.
1340
1341 2017-07-10  Zalan Bujtas  <zalan@apple.com>
1342
1343         Block of text is missing in iBooks sample books.
1344         https://bugs.webkit.org/show_bug.cgi?id=174295
1345         <rdar://problem/32955620>
1346
1347         Reviewed by Antti Koivisto.
1348
1349         In the simple line layout context, translating y coordinate to a line index is
1350         normally just a (y / line height) operation. However in case of strut offsets (pagination)
1351         we need to take these extra paddings into account while resolving the line index.
1352         This patch fixes the boundary checking for a given line by using the font size only
1353         when the font is taller than the line.
1354
1355         * rendering/SimpleLineLayoutResolver.cpp:
1356         (WebCore::SimpleLineLayout::RunResolver::adjustLineIndexForStruts):
1357
1358 2017-07-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1359
1360         [SOUP] SoupCookieJar is never released (resulting in sqlite temp files lying around)
1361         https://bugs.webkit.org/show_bug.cgi?id=166029
1362
1363         Reviewed by Michael Catanzaro.
1364
1365         Add clearSoupNetworkSessionAndCookieStorage() to clear the SoupNetworkSession and cookie storage of the main
1366         network session, ensuring the cookies database is properly closed.
1367
1368         * platform/network/NetworkStorageSession.h:
1369         * platform/network/soup/NetworkStorageSessionSoup.cpp:
1370         (WebCore::NetworkStorageSession::clearSoupNetworkSessionAndCookieStorage):
1371
1372 2017-07-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1373
1374         Move make-js-file-arrays.py from WebCore to JavaScriptCore
1375         https://bugs.webkit.org/show_bug.cgi?id=174024
1376
1377         Reviewed by Michael Catanzaro.
1378
1379         * CMakeLists.txt: Explicitly add files generated by MAKE_JS_FILE_ARRAYS to the build, since the macro no longer
1380         does it.
1381         * DerivedSources.make: Updated to use make-js-file-arrays.py from JavaScriptCore. It's no longer needed to set
1382         PYTHON_PATH to find jsmin.py.
1383
1384 2017-07-10  Charlie Turner  <cturner@igalia.com>
1385
1386         [GTK] http/tests/media/video-redirect.html is failing
1387         https://bugs.webkit.org/show_bug.cgi?id=174260
1388
1389         Reviewed by Carlos Garcia Campos.
1390
1391         Make sure we're testing new URLs within the same security origin.
1392
1393         Covered by existing tests.
1394
1395         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1396         (WebCore::convertToInternalProtocol): Factor out setting our
1397         internal URL schema.
1398         (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL): Use the
1399         refactored helper.
1400         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation): Use
1401         refactored helper to ensure both URLs have the same origin.
1402
1403 2017-07-08  John Wilander  <wilander@apple.com>
1404
1405         Resource Load Statistics: User interaction should always go to top document
1406         https://bugs.webkit.org/show_bug.cgi?id=174120
1407         <rdar://problem/33117899>
1408
1409         Reviewed by Chris Dumez.
1410
1411         Test: http/tests/loading/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame.html
1412
1413         * dom/UserGestureIndicator.cpp:
1414         (WebCore::UserGestureIndicator::UserGestureIndicator):
1415             Now logs user interaction for the top document.
1416         * loader/ResourceLoadObserver.cpp:
1417         (WebCore::ResourceLoadObserver::setThrottledObserverNotifications):
1418             Test infrastructure.
1419         (WebCore::ResourceLoadObserver::setNotificationCallback):
1420             Callback now takes a ResourceLoadObserver::NotificationType.
1421         (WebCore::ResourceLoadObserver::logFrameNavigation):
1422             Submits the configured ResourceLoadObserver::NotificationType.
1423         (WebCore::ResourceLoadObserver::logSubresourceLoading):
1424             Submits the configured ResourceLoadObserver::NotificationType.
1425         (WebCore::ResourceLoadObserver::logWebSocketLoading):
1426             Submits the configured ResourceLoadObserver::NotificationType.
1427         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
1428             Submits the configured ResourceLoadObserver::NotificationType.
1429         * loader/ResourceLoadObserver.h:
1430         * testing/Internals.cpp:
1431         (WebCore::Internals::resetToConsistentState):
1432             Resets to throttled notifications.
1433         (WebCore::Internals::setResourceLoadStatisticsThrottledObserverNotifications):
1434             Test infrastructure.
1435         * testing/Internals.h:
1436         * testing/Internals.idl:
1437             Added internals.setResourceLoadStatisticsThrottledObserverNotifications().
1438
1439 2017-07-09  Brady Eidson  <beidson@apple.com>
1440
1441         Remove some obsolete WebKitVersionChecks.
1442         https://bugs.webkit.org/show_bug.cgi?id=174294
1443
1444         Reviewed by Dan Bernstein.
1445
1446         No new tests (No change to testable behavior)
1447
1448         * dom/ScriptExecutionContext.cpp:
1449         (WebCore::ScriptExecutionContext::dispatchErrorEvent):
1450         
1451         * page/Settings.in:
1452         
1453         * platform/RuntimeApplicationChecks.h:
1454         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
1455         (WebCore::IOSApplication::isOkCupid): Deleted.
1456         (WebCore::IOSApplication::isFacebook): Deleted.
1457         
1458         * rendering/RenderBox.cpp:
1459         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1460
1461 2017-07-08  Brady Eidson  <beidson@apple.com>
1462
1463         Remove some obsolete RuntimeApplicationChecks.
1464         https://bugs.webkit.org/show_bug.cgi?id=174293
1465
1466         Reviewed by Dan Bernstein.
1467
1468         No new tests (No change to testable behavior)
1469
1470         * html/HTMLObjectElement.cpp:
1471         (WebCore::HTMLObjectElement::parametersForPlugin):
1472         (WebCore::shouldNotPerformURLAdjustment): Deleted.
1473
1474         * platform/RuntimeApplicationChecks.h:
1475         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
1476         (WebCore::IOSApplication::isDaijisenDictionary): Deleted.
1477         (WebCore::IOSApplication::isNASAHD): Deleted.
1478         (WebCore::IOSApplication::isTheEconomistOnIphone): Deleted.
1479
1480         * platform/ios/wak/WebCoreThread.h:
1481         * platform/ios/wak/WebCoreThread.mm:
1482         (StartWebThread):
1483         (WebThreadSetDelegateSourceRunLoopMode): Deleted.
1484
1485 2017-07-08  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1486
1487         [Curl] Safe access and life cycle management of bare Curl handle
1488         by wrapping with C++ class
1489         https://bugs.webkit.org/show_bug.cgi?id=174002
1490
1491         Reviewed by Alex Christensen.
1492
1493         * platform/network/ResourceHandle.h:
1494         * platform/network/ResourceHandleInternal.h:
1495         * platform/network/curl/CookieJarCurl.cpp:
1496         (WebCore::setCookiesFromDOM):
1497         (WebCore::cookiesForSession):
1498         * platform/network/curl/CurlContext.cpp:
1499         (WebCore::CurlContext::CurlContext):
1500         (WebCore::CurlContext::~CurlContext):
1501         (WebCore::CurlContext::initCookieSession):
1502         (WebCore::CurlShareHandle::CurlShareHandle):
1503         (WebCore::CurlShareHandle::~CurlShareHandle):
1504         (WebCore::CurlShareHandle::lockCallback):
1505         (WebCore::CurlShareHandle::unlockCallback):
1506         (WebCore::CurlShareHandle::mutexFor):
1507         (WebCore::CurlMultiHandle::CurlMultiHandle):
1508         (WebCore::CurlMultiHandle::~CurlMultiHandle):
1509         (WebCore::CurlMultiHandle::addHandle):
1510         (WebCore::CurlMultiHandle::removeHandle):
1511         (WebCore::CurlMultiHandle::getFdSet):
1512         (WebCore::CurlMultiHandle::perform):
1513         (WebCore::CurlMultiHandle::readInfo):
1514         (WebCore::CurlHandle::CurlHandle):
1515         (WebCore::CurlHandle::~CurlHandle):
1516         (WebCore::CurlHandle::perform):
1517         (WebCore::CurlHandle::pause):
1518         (WebCore::CurlHandle::enableShareHandle):
1519         (WebCore::CurlHandle::setPrivateData):
1520         (WebCore::CurlHandle::setUrl):
1521         (WebCore::CurlHandle::clearUrl):
1522         (WebCore::CurlHandle::clearRequestHeaders):
1523         (WebCore::CurlHandle::appendRequestHeader):
1524         (WebCore::CurlHandle::enableRequestHeaders):
1525         (WebCore::CurlHandle::enableHttpGetRequest):
1526         (WebCore::CurlHandle::enableHttpHeadRequest):
1527         (WebCore::CurlHandle::enableHttpPostRequest):
1528         (WebCore::CurlHandle::setPostFields):
1529         (WebCore::CurlHandle::setPostFieldLarge):
1530         (WebCore::CurlHandle::enableHttpPutRequest):
1531         (WebCore::CurlHandle::setInFileSizeLarge):
1532         (WebCore::CurlHandle::setHttpCustomRequest):
1533         (WebCore::CurlHandle::enableAcceptEncoding):
1534         (WebCore::CurlHandle::enableAllowedProtocols):
1535         (WebCore::CurlHandle::enableFollowLocation):
1536         (WebCore::CurlHandle::enableAutoReferer):
1537         (WebCore::CurlHandle::enableHttpAuthentication):
1538         (WebCore::CurlHandle::setHttpAuthUserPass):
1539         (WebCore::CurlHandle::enableCAInfoIfExists):
1540         (WebCore::CurlHandle::setSslVerifyPeer):
1541         (WebCore::CurlHandle::setSslVerifyHost):
1542         (WebCore::CurlHandle::setSslCert):
1543         (WebCore::CurlHandle::setSslCertType):
1544         (WebCore::CurlHandle::setSslKeyPassword):
1545         (WebCore::CurlHandle::enableCookieJarIfExists):
1546         (WebCore::CurlHandle::setCookieList):
1547         (WebCore::CurlHandle::getCookieList):
1548         (WebCore::CurlHandle::clearCookieList):
1549         (WebCore::CurlHandle::enableProxyIfExists):
1550         (WebCore::CurlHandle::enableTimeout):
1551         (WebCore::CurlHandle::setHeaderCallbackFunction):
1552         (WebCore::CurlHandle::setWriteCallbackFunction):
1553         (WebCore::CurlHandle::setReadCallbackFunction):
1554         (WebCore::CurlHandle::setSslCtxCallbackFunction):
1555         (WebCore::CurlHandle::getEffectiveURL):
1556         (WebCore::CurlHandle::getPrimaryPort):
1557         (WebCore::CurlHandle::getResponseCode):
1558         (WebCore::CurlHandle::getContentLenghtDownload):
1559         (WebCore::CurlHandle::getHttpAuthAvail):
1560         (WebCore::CurlHandle::getTimes):
1561         (WebCore::CurlHandle::maxCurlOffT):
1562         (WebCore::CurlHandle::expectedSizeOfCurlOffT):
1563         (WebCore::CurlHandle::enableVerboseIfUsed):
1564         (WebCore::CurlHandle::enableStdErrIfUsed):
1565         (WebCore::CurlContext::getEffectiveURL): Deleted.
1566         (WebCore::CurlContext::createMultiHandle): Deleted.
1567         (WebCore::CurlContext::mutexFor): Deleted.
1568         (WebCore::CurlContext::lock): Deleted.
1569         (WebCore::CurlContext::unlock): Deleted.
1570         * platform/network/curl/CurlContext.h:
1571         (WebCore::CurlGlobal::CurlGlobal):
1572         (WebCore::CurlGlobal::~CurlGlobal):
1573         (WebCore::CurlShareHandle::handle):
1574         (WebCore::CurlContext::shareHandle):
1575         (WebCore::CurlHandle::handle):
1576         (WebCore::CurlHandle::url):
1577         (WebCore::CurlContext::curlShareHandle): Deleted.
1578         * platform/network/curl/CurlDownload.cpp:
1579         (WebCore::CurlDownload::~CurlDownload):
1580         (WebCore::CurlDownload::init):
1581         (WebCore::CurlDownload::start):
1582         (WebCore::CurlDownload::cancel):
1583         (WebCore::CurlDownload::getUrl):
1584         (WebCore::CurlDownload::addHeaders):
1585         (WebCore::CurlDownload::didReceiveHeader):
1586         (WebCore::CurlDownload::writeCallback):
1587         * platform/network/curl/CurlDownload.h:
1588         * platform/network/curl/CurlJobManager.cpp:
1589         (WebCore::CurlJobManager::CurlJobManager):
1590         (WebCore::CurlJobManager::~CurlJobManager):
1591         (WebCore::CurlJobManager::addToCurl):
1592         (WebCore::CurlJobManager::removeFromCurl):
1593         (WebCore::CurlJobManager::workerThread):
1594         * platform/network/curl/CurlJobManager.h:
1595         (WebCore::CurlJobManager::getMultiHandle): Deleted.
1596         * platform/network/curl/ResourceHandleCurl.cpp:
1597         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1598         (WebCore::ResourceHandle::platformSetDefersLoading):
1599         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
1600         (WebCore::ResourceHandle::receivedCredential):
1601         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
1602         (WebCore::calculateWebTimingInformations):
1603         (WebCore::handleLocalReceiveResponse):
1604         (WebCore::writeCallback):
1605         (WebCore::getProtectionSpace):
1606         (WebCore::headerCallback):
1607         (WebCore::readCallback):
1608         (WebCore::setupFormData):
1609         (WebCore::ResourceHandle::setupPUT):
1610         (WebCore::ResourceHandle::setupPOST):
1611         (WebCore::ResourceHandle::dispatchSynchronousJob):
1612         (WebCore::ResourceHandle::applyAuthentication):
1613         (WebCore::ResourceHandle::initialize):
1614         (WebCore::ResourceHandle::handleCurlMsg):
1615         * platform/network/curl/ResourceHandleManager.cpp:
1616         (WebCore::ResourceHandleManager::ResourceHandleManager):
1617         (WebCore::ResourceHandleManager::~ResourceHandleManager):
1618         (WebCore::ResourceHandleManager::downloadTimerCallback):
1619         (WebCore::ResourceHandleManager::removeFromCurl):
1620         (WebCore::ResourceHandleManager::startJob):
1621         * platform/network/curl/ResourceHandleManager.h:
1622         * platform/network/curl/SSLHandle.cpp:
1623         (WebCore::setSSLClientCertificate):
1624         (WebCore::certVerifyCallback):
1625         (WebCore::setSSLVerifyOptions):
1626
1627 2017-07-08  Antoine Quint  <graouts@apple.com>
1628
1629         REGRESSION: "visibility:hidden" does not hide play button for video elements
1630         https://bugs.webkit.org/show_bug.cgi?id=174258
1631         <rdar://problem/33181452>
1632
1633         Reviewed by Dean Jackson.
1634
1635         In order to not have most styles from the page affect the shadow root, we set "all: initial" on the
1636         media controls container. However, we need to still make the "visibility" property inherit from its
1637         host such that "visibility: hidden" on the host won't be overridden by setting the property back to
1638         its initial value, which is "visible".
1639
1640         Test: media/modern-media-controls/css/visibility-hidden.html
1641
1642         * Modules/modern-media-controls/controls/media-controls.css:
1643         (.media-controls-container):
1644
1645 2017-07-08  Yusuke Suzuki  <utatane.tea@gmail.com>
1646
1647         Drop NOSNIFF compile flag
1648         https://bugs.webkit.org/show_bug.cgi?id=174289
1649
1650         Reviewed by Michael Catanzaro.
1651
1652         * Configurations/FeatureDefines.xcconfig:
1653         * css/StyleSheetContents.cpp:
1654         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
1655         (WebCore::StyleSheetContents::notifyLoadedSheet):
1656         * dom/LoadableClassicScript.cpp:
1657         (WebCore::LoadableClassicScript::notifyFinished):
1658         * loader/cache/CachedCSSStyleSheet.cpp:
1659         (WebCore::CachedCSSStyleSheet::mimeTypeAllowedByNosniff):
1660         (WebCore::CachedCSSStyleSheet::canUseSheet):
1661         * loader/cache/CachedCSSStyleSheet.h:
1662         * platform/network/HTTPParsers.cpp:
1663         (WebCore::parseContentTypeOptionsHeader):
1664         * platform/network/HTTPParsers.h:
1665         * platform/network/ResourceResponseBase.cpp:
1666         (WebCore::isScriptAllowedByNosniff):
1667         * platform/network/ResourceResponseBase.h:
1668         * workers/WorkerScriptLoader.cpp:
1669         (WebCore::WorkerScriptLoader::didReceiveResponse):
1670
1671 2017-07-07  Brent Fulgham  <bfulgham@apple.com>
1672
1673         [WK2] Use a rolling 30-day uptime for processing statistics
1674         https://bugs.webkit.org/show_bug.cgi?id=174235
1675         <rdar://problem/33164381>
1676
1677         Reviewed by Chris Dumez.
1678
1679         Add a KeyedDecoder specialization for Deque.
1680
1681         * platform/KeyedCoding.h:
1682         (WebCore::KeyedDecoder::decodeObjects):
1683
1684 2017-07-07  Daniel Bates  <dabates@apple.com>
1685
1686         [AppCache] Ignore fallback entries whose namespace is not prefixed with manifest path
1687         https://bugs.webkit.org/show_bug.cgi?id=174273
1688         <rdar://problem/33011682>
1689
1690         Reviewed by Brent Fulgham.
1691
1692         As per <https://html.spec.whatwg.org/multipage/offline.html#parsing-cache-manifests> (07/06/2017)
1693         we should ignore fallback entires whose fallback namespace URL is not prefixed with
1694         the manifest path. For now we only apply this policy when the manifest is served with
1695         a non-standard Content-Type to minimize web compatibility risk.
1696
1697         Test: http/tests/appcache/fallback-namespace-outside-manifest-path.html
1698
1699         * loader/appcache/ApplicationCacheGroup.cpp:
1700         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest): Pass the MIME type of the manifest.
1701         * loader/appcache/ManifestParser.cpp:
1702         (WebCore::manifestPath): Computes the manifest path from a manifest URL.
1703         (WebCore::parseManifest): Modified to take the MIME type of the manifest. If the MIME type is
1704         non-standard (i.e. not text/cached-manifest) then skip fallback entries whose namespace is not
1705         prefixed with the manifest path. Otherwise, process fallback entries as we do now. Also cleaned
1706         up the code a bit while I was here, including renaming a local variable to be more descriptive
1707         and using a const character array for the manifest signature to avoid the need to document the
1708         length of the manifest signature in a comment.
1709         * loader/appcache/ManifestParser.h:
1710
1711 2017-07-07  Wenson Hsieh  <wenson_hsieh@apple.com>
1712
1713         [iOS DnD] For cross-app drags, 'drop' event handlers are never invoked if dataTransfer.dropEffect is not set while dragging
1714         https://bugs.webkit.org/show_bug.cgi?id=174219
1715         <rdar://problem/32083177>
1716
1717         Reviewed by Ryosuke Niwa.
1718
1719         Currently, in DragController.cpp, defaultOperationForDrag maps a drag source operation mask of
1720         DragOperationGeneric to DragOperationMove across all platforms. However, on iOS, where cross-app drag moves do
1721         not trigger a drop, this means drop handlers won't fire unless the dropEffect is explicitly set to copy.
1722
1723         To fix this, we introduce DragController::platformGenericDragOperation(), which returns DragOperationCopy on iOS
1724         and DragOperationMove (the existing behavior) elsewhere. defaultOperationForDrag then maps a drag source
1725         operation mask of DragOperationGeneric to platformGenericDragOperation().
1726
1727         Tests:  DataInteractionTests.ExternalSourceHTMLToUploadArea
1728                 DataInteractionTests.ExternalSourceImageAndHTMLToUploadArea
1729                 DataInteractionTests.ExternalSourceMoveOperationNotAllowed
1730
1731         * page/DragController.cpp:
1732         (WebCore::DragController::platformGenericDragOperation):
1733         (WebCore::defaultOperationForDrag):
1734         * page/DragController.h:
1735         * page/mac/DragControllerMac.mm:
1736         (WebCore::DragController::platformGenericDragOperation):
1737
1738 2017-07-07  Devin Rousso  <drousso@apple.com>
1739
1740         Web Inspector: Show all elements currently using a given CSS Canvas
1741         https://bugs.webkit.org/show_bug.cgi?id=173965
1742
1743         Reviewed by Joseph Pecoraro.
1744
1745         Test: inspector/canvas/css-canvas-clients.html
1746
1747         * css/CSSImageGeneratorValue.cpp:
1748         (WebCore::CSSImageGeneratorValue::addClient):
1749         (WebCore::CSSImageGeneratorValue::removeClient):
1750         * css/CSSImageGeneratorValue.h:
1751         (WebCore::CSSImageGeneratorValue::clients):
1752         * html/HTMLCanvasElement.cpp:
1753         (WebCore::HTMLCanvasElement::addObserver):
1754         (WebCore::HTMLCanvasElement::removeObserver):
1755         (WebCore::HTMLCanvasElement::cssCanvasClients):
1756         Each time an observer is added/removed for a given HTMLCanvasElement, send an event to the
1757         inspector frontend that the CSS canvas client nodes have changed. Additionally, anytime a
1758         client/use is added/removed from one of the observing CSSCanvasValue, fire the same event.
1759
1760         * css/CSSCanvasValue.h:
1761         (isType):
1762         * html/HTMLCanvasElement.h:
1763         (WebCore::CanvasObserver::isCSSCanvasValueObserver):
1764         Allows type traits to distinguish CanvasObserver from CSSCanvasValue::CanvasObserverProxy.
1765
1766         * inspector/InspectorCanvasAgent.h:
1767         * inspector/InspectorCanvasAgent.cpp:
1768         (WebCore::InspectorCanvasAgent::requestCSSCanvasClientNodes):
1769         (WebCore::InspectorCanvasAgent::didChangeCSSCanvasClientNodes):
1770         * inspector/InspectorInstrumentation.h:
1771         (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodes):
1772         * inspector/InspectorInstrumentation.cpp:
1773         (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodesImpl):
1774         Notify the frontend that the list of client nodes has changed for the given canvas. Let the
1775         frontend request the actual list of node IDs when it needs, possibly at a later time.
1776
1777 2017-07-07  Jer Noble  <jer.noble@apple.com>
1778
1779         AVPlayer can continue to be active after released by MediaPlayerPrivateAVFoundationObjC.
1780         https://bugs.webkit.org/show_bug.cgi?id=174264
1781
1782         Reviewed by Eric Carlson.
1783
1784         If the AVPlayer is retained (by an autorelease pool, or internally by other objects in
1785         AVFoundation), releasing the AVPlayer is not enough to cancel loading or playback. So before
1786         releasing the AVPlayer, make sure to disassociate the current AVPlayerItem, which should
1787         cancel all activity in the AVPlayer.
1788
1789         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1790         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
1791
1792 2017-07-07  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1793
1794         [Curl] Remove data url handler for async load
1795         https://bugs.webkit.org/show_bug.cgi?id=174263
1796
1797         data url is handled by ResourceLoader. No need for specific handling
1798         in platform dependent layer.
1799
1800         Reviewed by Alex Christensen.
1801
1802         * platform/network/curl/ResourceHandleManager.cpp:
1803         (WebCore::ResourceHandleManager::startJob):
1804
1805 2017-07-07  Matt Lewis  <jlewis3@apple.com>
1806
1807         Unreviewed, rolling out r219257.
1808
1809         The test added in the revision was still extreamly flaky on
1810         all testers.
1811
1812         Reverted changeset:
1813
1814         "[SVG] Leak in SVGAnimatedListPropertyTearOff"
1815         https://bugs.webkit.org/show_bug.cgi?id=172545
1816         http://trac.webkit.org/changeset/219257
1817
1818 2017-07-07  Commit Queue  <commit-queue@webkit.org>
1819
1820         Unreviewed, rolling out r219238, r219239, and r219241.
1821         https://bugs.webkit.org/show_bug.cgi?id=174265
1822
1823         "fast/workers/dedicated-worker-lifecycle.html is flaky"
1824         (Requested by yusukesuzuki on #webkit).
1825
1826         Reverted changesets:
1827
1828         "[WTF] Implement WTF::ThreadGroup"
1829         https://bugs.webkit.org/show_bug.cgi?id=174081
1830         http://trac.webkit.org/changeset/219238
1831
1832         "Unreviewed, build fix after r219238"
1833         https://bugs.webkit.org/show_bug.cgi?id=174081
1834         http://trac.webkit.org/changeset/219239
1835
1836         "Unreviewed, CLoop build fix after r219238"
1837         https://bugs.webkit.org/show_bug.cgi?id=174081
1838         http://trac.webkit.org/changeset/219241
1839
1840 2017-05-24  Sergio Villar Senin  <svillar@igalia.com>
1841
1842         [SVG] Leak in SVGAnimatedListPropertyTearOff
1843         https://bugs.webkit.org/show_bug.cgi?id=172545
1844
1845         Reviewed by Said Abou-Hallawa.
1846
1847         SVGAnimatedListPropertyTearOff maintains a vector m_wrappers with references to
1848         SVGPropertyTraits<PropertyType>::ListItemTearOff. Apart from that SVGPropertyTearOff has a
1849         reference to SVGAnimatedProperty.
1850
1851         When SVGListProperty::getItemValuesAndWrappers() is called, it creates a
1852         SVGPropertyTraits<PropertyType>::ListItemTearOff pointing to the same SVGAnimatedProperty (a
1853         SVGAnimatedListPropertyTearOff) which stores the m_wrappers vector where the ListItemTearOff
1854         is going to be added to. This effectively creates a reference cycle between the
1855         SVGAnimatedListPropertyTearOff and all the ListItemTearOff it stores in m_wrappers.
1856
1857         We should detach those wrappers in propertyWillBeDeleted() in order to break the cycle.
1858
1859         * svg/properties/SVGAnimatedListPropertyTearOff.h:
1860
1861 2017-07-07  Charlie Turner  <cturner@igalia.com>
1862
1863         [GStreamer] vid.me videos do not play
1864         https://bugs.webkit.org/show_bug.cgi?id=172240
1865
1866         Reviewed by Xabier Rodriguez-Calvar.
1867
1868         In r142251, code to hide the WK HTTP source elements from elsewhere in
1869         the pipeline was removed. This has the nasty side-effect of
1870         auto-plugging the WK HTTP source into things it really should not be
1871         used in, especially the adaptive streaming demuxers. The reasons this
1872         is bad are documented in several places on Bugzilla, see the parent
1873         bug report for more details. The high-level issue is that the WK HTTP
1874         source and its use of WebCore is not thread-safe. Although work has
1875         been recently done to improve this situation, it's still not perfect.
1876
1877         Another issue is the interface hlsdemux expects its HTTP source to
1878         implement, specifically seeking in READY.
1879
1880         This does rely on HTTP context sharing being available in GStreamer,
1881         upstream bug is here:
1882         https://bugzilla.gnome.org/show_bug.cgi?id=761099. The failing case
1883         can be demonstrated with
1884         https://github.com/thiagoss/adaptive-test-server but manual testing on
1885         popular video hosting sites, including vid.me, shows that this doesn't
1886         bite us at the moment, just something else to fix in the future.
1887
1888         There are some QoS issues with the adaptive streaming code in
1889         GStreamer, but it seems much better to offer a below par QoS in lieu
1890         of crashing/livelocking when playing certain streams, and issues can be
1891         raised upstream when they arise.
1892
1893         This patch does take us further away from the future goal of having all
1894         networking operations go through the network process, but in return it
1895         solves some nasty crashes and livelocks that have been irritating
1896         users for some time. With the pressure off on this issue, work can be
1897         planned to consider how to make the WK HTTP source a better citizen
1898         inside the GStreamer pipeline when we migrate the netcode to go
1899         through the network process.
1900
1901         A new test is added to check that the single file HLS playlists
1902         (new in version 4) can be played, which was the primary cause of
1903         this bug report.
1904
1905         Test: http/tests/media/hls/range-request.html
1906
1907         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1908         (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL): Perform
1909         some trickery to make sure that we only ever fetch URLs handed to
1910         us by WebCore. Any further URLs discovered inside the pipeline
1911         will not get WKWS auto-plugged, since they'll be plain https?
1912         schemas.
1913         (WebCore::MediaPlayerPrivateGStreamer::load): Refactor to use the
1914         setPlaybinURL helper method.
1915         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation): Ditto.
1916         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add
1917         the setPlaybinURL helper method.
1918         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1919         (webKitWebSrcGetProtocols): Only advertise webkit+https?, this
1920         ensures we won't get auto-plugged by pipeline elements asking for
1921         an element to fetch https? resources (like adaptive demuxers).
1922         (convertPlaybinURI): Undo the trick when another element asks us
1923         for our URI.
1924
1925 2017-07-05  Yusuke Suzuki  <utatane.tea@gmail.com>
1926
1927         [WTF] Implement WTF::ThreadGroup
1928         https://bugs.webkit.org/show_bug.cgi?id=174081
1929
1930         Reviewed by Mark Lam.
1931
1932         * page/ResourceUsageThread.h:
1933
1934 2017-07-06  Yusuke Suzuki  <utatane.tea@gmail.com>
1935
1936         [WTF] Clean up StringStatics.cpp by using LazyNeverDestroyed<> for Atoms
1937         https://bugs.webkit.org/show_bug.cgi?id=174150
1938
1939         Reviewed by Mark Lam.
1940
1941         * Modules/mediacontrols/MediaControlsHost.cpp:
1942         (WebCore::MediaControlsHost::captionDisplayMode):
1943         * Modules/mediastream/RTCDataChannel.cpp:
1944         (WebCore::RTCDataChannel::binaryType):
1945         * accessibility/AXObjectCache.cpp:
1946         (WebCore::createFromRenderer):
1947         * accessibility/AccessibilityMediaControls.cpp:
1948         (WebCore::AccessibilityMediaControl::controlTypeName):
1949         * accessibility/AccessibilityObject.cpp:
1950         (WebCore::AccessibilityObject::language):
1951         (WebCore::AccessibilityObject::defaultLiveRegionStatusForRole):
1952         (WebCore::AccessibilityObject::actionVerb):
1953         (WebCore::AccessibilityObject::getAttribute):
1954         (WebCore::AccessibilityObject::placeholderValue):
1955         * accessibility/AccessibilityObject.h:
1956         (WebCore::AccessibilityObject::accessKey):
1957         (WebCore::AccessibilityObject::ariaLiveRegionRelevant):
1958         * accessibility/AccessibilityRenderObject.cpp:
1959         (WebCore::AccessibilityRenderObject::accessKey):
1960         (WebCore::AccessibilityRenderObject::actionVerb):
1961         * bindings/js/JSCustomElementInterface.cpp:
1962         (WebCore::JSCustomElementInterface::constructElementWithFallback):
1963         * bindings/js/JSCustomElementRegistryCustom.cpp:
1964         (WebCore::JSCustomElementRegistry::define):
1965         * bindings/scripts/CodeGeneratorJS.pm:
1966         (GenerateDefaultValue):
1967         * bindings/scripts/test/JS/JSTestObj.cpp:
1968         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringBody):
1969         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNullBody):
1970         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyStringBody):
1971         * css/CSSPageRule.cpp:
1972         (WebCore::CSSPageRule::selectorText):
1973         * css/CSSPrimitiveValue.cpp:
1974         (WebCore::valueName):
1975         * css/CSSSelector.cpp:
1976         (WebCore::simpleSelectorSpecificityInternal):
1977         (WebCore::CSSSelector::specificityForPage):
1978         (WebCore::CSSSelector::RareData::RareData):
1979         * css/CSSSelector.h:
1980         (WebCore::CSSSelector::argument):
1981         * css/CSSSelectorList.cpp:
1982         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
1983         * css/PageRuleCollector.cpp:
1984         (WebCore::checkPageSelectorComponents):
1985         * css/RuleSet.cpp:
1986         (WebCore::computeMatchBasedOnRuleHash):
1987         (WebCore::RuleSet::addRule):
1988         * css/SelectorChecker.cpp:
1989         (WebCore::tagMatches):
1990         * css/SelectorFilter.cpp:
1991         (WebCore::collectDescendantSelectorIdentifierHashes):
1992         * css/StyleBuilderConverter.h:
1993         (WebCore::StyleBuilderConverter::convertStringOrAuto):
1994         (WebCore::StyleBuilderConverter::convertStringOrNone):
1995         * css/StyleBuilderCustom.h:
1996         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
1997         (WebCore::StyleBuilderCustom::applyValueWebkitTextEmphasisStyle):
1998         (WebCore::StyleBuilderCustom::applyValueContent):
1999         (WebCore::StyleBuilderCustom::applyValueAlt):
2000         * css/StyleSheetContents.cpp:
2001         (WebCore::StyleSheetContents::StyleSheetContents):
2002         (WebCore::StyleSheetContents::namespaceURIFromPrefix):
2003         * css/makeprop.pl:
2004         * css/parser/CSSParserImpl.cpp:
2005         (WebCore::CSSParserImpl::parsePageSelector):
2006         * css/parser/CSSSelectorParser.cpp:
2007         (WebCore::CSSSelectorParser::consumeCompoundSelector):
2008         (WebCore::CSSSelectorParser::consumeName):
2009         (WebCore::CSSSelectorParser::consumeAttribute):
2010         (WebCore::CSSSelectorParser::defaultNamespace):
2011         (WebCore::CSSSelectorParser::determineNamespace):
2012         (WebCore::CSSSelectorParser::prependTypeSelectorIfNeeded):
2013         * cssjit/SelectorCompiler.cpp:
2014         (WebCore::SelectorCompiler::attributeNameTestingRequiresNamespaceRegister):
2015         (WebCore::SelectorCompiler::equalTagNames):
2016         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
2017         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasTagName):
2018         * dom/Attr.cpp:
2019         (WebCore::Attr::setPrefix):
2020         (WebCore::Attr::attachToElement):
2021         * dom/Attribute.h:
2022         (WebCore::Attribute::nameMatchesFilter):
2023         * dom/ConstantPropertyMap.cpp:
2024         (WebCore::ConstantPropertyMap::nameForProperty):
2025         * dom/ContainerNode.cpp:
2026         (WebCore::ContainerNode::getElementsByTagName):
2027         (WebCore::ContainerNode::getElementsByTagNameNS):
2028         * dom/CustomElementReactionQueue.cpp:
2029         (WebCore::CustomElementReactionQueue::enqueuePostUpgradeReactions):
2030         * dom/DatasetDOMStringMap.cpp:
2031         (WebCore::convertPropertyNameToAttributeName):
2032         * dom/Document.cpp:
2033         (WebCore::createUpgradeCandidateElement):
2034         (WebCore::Document::createElementForBindings):
2035         (WebCore::Document::importNode):
2036         (WebCore::Document::hasValidNamespaceForElements):
2037         (WebCore::Document::processBaseElement):
2038         (WebCore::Document::dir):
2039         (WebCore::Document::bgColor):
2040         (WebCore::Document::fgColor):
2041         (WebCore::Document::alinkColor):
2042         (WebCore::Document::linkColorForBindings):
2043         (WebCore::Document::vlinkColor):
2044         * dom/Document.h:
2045         * dom/Element.cpp:
2046         (WebCore::Element::setBooleanAttribute):
2047         (WebCore::Element::synchronizeAttribute):
2048         (WebCore::Element::getAttribute):
2049         (WebCore::Element::getAttributeNS):
2050         (WebCore::Element::setAttribute):
2051         (WebCore::Element::parserSetAttributes):
2052         (WebCore::Element::didMoveToNewDocument):
2053         (WebCore::Element::setPrefix):
2054         (WebCore::Element::insertedInto):
2055         (WebCore::Element::removedFrom):
2056         (WebCore::Element::removeAttributeInternal):
2057         (WebCore::Element::addAttributeInternal):
2058         (WebCore::Element::removeAttributeNS):
2059         (WebCore::Element::getAttributeNodeNS):
2060         (WebCore::Element::hasAttributeNS):
2061         (WebCore::Element::computeInheritedLanguage):
2062         (WebCore::Element::updateNameForDocument):
2063         (WebCore::Element::updateIdForDocument):
2064         (WebCore::Element::didAddAttribute):
2065         (WebCore::Element::didRemoveAttribute):
2066         (WebCore::Element::cloneAttributesFromElement):
2067         * dom/Element.h:
2068         (WebCore::Element::attributeWithoutSynchronization):
2069         (WebCore::Element::idForStyleResolution):
2070         (WebCore::Element::getIdAttribute):
2071         (WebCore::Element::getNameAttribute):
2072         * dom/EventTarget.cpp:
2073         (WebCore::legacyType):
2074         * dom/MutationRecord.h:
2075         (WebCore::MutationRecord::attributeName):
2076         (WebCore::MutationRecord::attributeNamespace):
2077         * dom/NamedNodeMap.cpp:
2078         (WebCore::NamedNodeMap::removeNamedItemNS):
2079         * dom/Node.cpp:
2080         (WebCore::Node::prefix):
2081         (WebCore::Node::localName):
2082         (WebCore::Node::namespaceURI):
2083         (WebCore::Node::checkSetPrefix):
2084         (WebCore::locateDefaultNamespace):
2085         (WebCore::Node::isDefaultNamespace):
2086         (WebCore::Node::lookupNamespaceURI):
2087         (WebCore::locateNamespacePrefix):
2088         (WebCore::Node::lookupPrefix):
2089         * dom/NodeRareData.h:
2090         (WebCore::NodeListsNodeData::addCachedTagCollectionNS):
2091         (WebCore::NodeListsNodeData::addCachedCollection):
2092         (WebCore::NodeListsNodeData::cachedCollection):
2093         (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
2094         (WebCore::NodeListsNodeData::removeCachedTagCollectionNS):
2095         (WebCore::NodeListsNodeData::removeCachedCollection):
2096         * dom/PseudoElement.cpp:
2097         (WebCore::pseudoElementTagName):
2098         * dom/QualifiedName.cpp:
2099         (WebCore::QualifiedName::init):
2100         (WebCore::nullQName):
2101         (WebCore::createQualifiedName):
2102         * dom/QualifiedName.h:
2103         (WebCore::QualifiedName::hasPrefix):
2104         * dom/SelectorQuery.cpp:
2105         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
2106         * dom/SlotAssignment.cpp:
2107         (WebCore::slotNameFromAttributeValue):
2108         * dom/SlotAssignment.h:
2109         (WebCore::SlotAssignment::defaultSlotName):
2110         (WebCore::ShadowRoot::didRemoveAllChildrenOfShadowHost):
2111         (WebCore::ShadowRoot::didChangeDefaultSlot):
2112         * dom/TagCollection.cpp:
2113         (WebCore::TagCollection::TagCollection):
2114         (WebCore::HTMLTagCollection::HTMLTagCollection):
2115         * dom/TagCollection.h:
2116         (WebCore::TagCollectionNS::elementMatches):
2117         * dom/make_names.pl:
2118         (printNamesCppFile):
2119         (printDefinitions):
2120         (printFactoryCppFile):
2121         * editing/CompositeEditCommand.cpp:
2122         (WebCore::CompositeEditCommand::removeNodeAttribute):
2123         * editing/Editing.cpp:
2124         (WebCore::createHTMLElement):
2125         * editing/MarkupAccumulator.cpp:
2126         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
2127         (WebCore::MarkupAccumulator::shouldAddNamespaceElement):
2128         (WebCore::MarkupAccumulator::shouldAddNamespaceAttribute):
2129         (WebCore::MarkupAccumulator::appendNamespace):
2130         (WebCore::MarkupAccumulator::appendOpenTag):
2131         (WebCore::MarkupAccumulator::appendAttribute):
2132         * editing/gtk/EditorGtk.cpp:
2133         (WebCore::elementURL):
2134         * editing/markup.cpp:
2135         (WebCore::AttributeChange::AttributeChange):
2136         * html/Autocapitalize.cpp:
2137         (WebCore::stringForAutocapitalizeType):
2138         * html/Autofill.cpp:
2139         (WebCore::AutofillData::createFromHTMLFormControlElement):
2140         * html/DOMTokenList.h:
2141         (WebCore::DOMTokenList::item):
2142         * html/FormAssociatedElement.cpp:
2143         (WebCore::FormAssociatedElement::name):
2144         * html/HTMLButtonElement.cpp:
2145         (WebCore::HTMLButtonElement::formControlType):
2146         * html/HTMLDetailsElement.cpp:
2147         (WebCore::HTMLDetailsElement::toggleOpen):
2148         * html/HTMLDocument.cpp:
2149         (WebCore::HTMLDocument::isCaseSensitiveAttribute):
2150         * html/HTMLElement.cpp:
2151         (WebCore::HTMLElement::eventNameForEventHandlerAttribute):
2152         (WebCore::toValidDirValue):
2153         * html/HTMLImageElement.cpp:
2154         (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
2155         * html/HTMLInputElement.cpp:
2156         (WebCore::HTMLInputElement::name):
2157         (WebCore::HTMLInputElement::updateType):
2158         * html/HTMLMediaElement.cpp:
2159         (WebCore::HTMLMediaElement::doesHaveAttribute):
2160         * html/HTMLOptionElement.cpp:
2161         (WebCore::HTMLOptionElement::createForJSConstructor):
2162         * html/HTMLParamElement.cpp:
2163         (WebCore::HTMLParamElement::name):
2164         * html/HTMLSelectElement.cpp:
2165         (WebCore::HTMLSelectElement::setMultiple):
2166         * html/HTMLTableCellElement.cpp:
2167         (WebCore::HTMLTableCellElement::scope):
2168         * html/HTMLTrackElement.cpp:
2169         (WebCore::HTMLTrackElement::mediaElementCrossOriginAttribute):
2170         * html/LabelableElement.cpp:
2171         (WebCore::LabelableElement::labels):
2172         * html/LabelsNodeList.cpp:
2173         (WebCore::LabelsNodeList::~LabelsNodeList):
2174         * html/MediaController.cpp:
2175         (MediaController::playbackState):
2176         (eventNameForReadyState):
2177         * html/MediaDocument.cpp:
2178         (WebCore::MediaDocumentParser::createDocumentStructure):
2179         * html/parser/AtomicHTMLToken.h:
2180         (WebCore::AtomicHTMLToken::initializeAttributes):
2181         * html/parser/HTMLConstructionSite.cpp:
2182         (WebCore::HTMLConstructionSite::createElement):
2183         (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
2184         * html/parser/HTMLParserIdioms.cpp:
2185         (WebCore::stripLeadingAndTrailingHTMLSpaces):
2186         (WebCore::parseHTMLHashNameReference):
2187         * html/parser/HTMLTreeBuilder.cpp:
2188         (WebCore::createForeignAttributesMap):
2189         * html/track/InbandTextTrack.cpp:
2190         (WebCore::InbandTextTrack::InbandTextTrack):
2191         * html/track/LoadableTextTrack.cpp:
2192         (WebCore::LoadableTextTrack::id):
2193         * html/track/TextTrack.cpp:
2194         (WebCore::TextTrack::captionMenuOffItem):
2195         (WebCore::TextTrack::captionMenuAutomaticItem):
2196         * html/track/TrackBase.cpp:
2197         (WebCore::MediaTrackBase::setKindInternal):
2198         * html/track/VTTRegion.cpp:
2199         (WebCore::VTTRegion::scroll):
2200         * html/track/WebVTTElement.cpp:
2201         (WebCore::nodeTypeToTagName):
2202         * html/track/WebVTTElement.h:
2203         * html/track/WebVTTToken.h:
2204         (WebCore::WebVTTToken::StartTag):
2205         * loader/FrameLoader.cpp:
2206         (WebCore::FrameLoader::clear):
2207         * loader/FrameLoader.h:
2208         * loader/ImageLoader.cpp:
2209         (WebCore::ImageLoader::clearFailedLoadURL):
2210         * loader/NavigationAction.h:
2211         * loader/PolicyChecker.cpp:
2212         (WebCore::PolicyChecker::checkNavigationPolicy):
2213         * page/DOMWindow.cpp:
2214         (WebCore::DOMWindow::showModalDialog):
2215         * page/EventHandler.cpp:
2216         (WebCore::eventNameForTouchPointState):
2217         * page/FrameTree.cpp:
2218         (WebCore::FrameTree::setName):
2219         (WebCore::FrameTree::clearName):
2220         * page/Page.cpp:
2221         (WebCore::Page::groupName):
2222         * platform/graphics/ComplexTextController.cpp:
2223         (WebCore::ComplexTextController::offsetForPosition):
2224         * platform/graphics/FontCache.cpp:
2225         (WebCore::FontCache::alternateFamilyName):
2226         * platform/graphics/FontDescription.h:
2227         (WebCore::FontCascadeDescription::initialLocale):
2228         * platform/graphics/FontGenericFamilies.cpp:
2229         (WebCore::genericFontFamilyForScript):
2230         * platform/graphics/InbandTextTrackPrivate.h:
2231         (WebCore::InbandTextTrackPrivate::inBandMetadataTrackDispatchType):
2232         * platform/graphics/TrackPrivateBase.h:
2233         (WebCore::TrackPrivateBase::id):
2234         (WebCore::TrackPrivateBase::label):
2235         (WebCore::TrackPrivateBase::language):
2236         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
2237         (WebCore::AVTrackPrivateAVFObjCImpl::id):
2238         (WebCore::AVTrackPrivateAVFObjCImpl::label):
2239         (WebCore::AVTrackPrivateAVFObjCImpl::language):
2240         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
2241         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
2242         (WebCore::InbandTextTrackPrivateAVCF::label):
2243         (WebCore::InbandTextTrackPrivateAVCF::language):
2244         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp:
2245         (WebCore::InbandTextTrackPrivateLegacyAVCF::label):
2246         (WebCore::InbandTextTrackPrivateLegacyAVCF::language):
2247         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
2248         (WebCore::InbandTextTrackPrivateAVFObjC::label):
2249         (WebCore::InbandTextTrackPrivateAVFObjC::language):
2250         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
2251         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::label):
2252         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::language):
2253         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2254         (WebCore::metadataType):
2255         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
2256         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2257         (WebCore::FontCache::platformAlternateFamilyName):
2258         * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
2259         (WebCore::FontCascadeDescription::effectiveFamilyAt):
2260         * platform/graphics/freetype/FontCacheFreeType.cpp:
2261         (WebCore::FontCache::platformAlternateFamilyName):
2262         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
2263         (WebCore::InbandMetadataTextTrackPrivateGStreamer::create):
2264         * platform/graphics/win/FontCacheWin.cpp:
2265         (WebCore::FontCache::platformAlternateFamilyName):
2266         * platform/mediastream/AudioTrackPrivateMediaStream.h:
2267         * platform/mediastream/RealtimeMediaSourceSettings.cpp:
2268         (WebCore::RealtimeMediaSourceSettings::facingMode):
2269         * platform/mediastream/VideoTrackPrivateMediaStream.h:
2270         * rendering/HitTestResult.cpp:
2271         (WebCore::HitTestResult::linkSuggestedFilename):
2272         * rendering/InlineTextBox.cpp:
2273         (WebCore::InlineTextBox::paint):
2274         * rendering/RenderListItem.cpp:
2275         (WebCore::RenderListItem::markerText):
2276         * rendering/RenderText.cpp:
2277         (WebCore::RenderText::previousOffset):
2278         (WebCore::RenderText::nextOffset):
2279         * rendering/RenderTreeAsText.cpp:
2280         (WebCore::RenderTreeAsText::writeRenderObject):
2281         * rendering/TextPainter.cpp:
2282         (WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):
2283         * rendering/style/RenderStyle.cpp:
2284         (WebCore::RenderStyle::textEmphasisMarkString):
2285         * rendering/style/RenderStyle.h:
2286         (WebCore::RenderStyle::initialHyphenationString):
2287         (WebCore::RenderStyle::initialTextEmphasisCustomMark):
2288         (WebCore::RenderStyle::initialContentAltText):
2289         (WebCore::RenderStyle::initialLineGrid):
2290         (WebCore::RenderStyle::initialFlowThread):
2291         (WebCore::RenderStyle::initialRegionThread):
2292         * style/StyleScope.cpp:
2293         (WebCore::Style::Scope::collectActiveStyleSheets):
2294         * svg/SVGElement.cpp:
2295         (WebCore::SVGElement::getPresentationAttribute):
2296         * svg/SVGElement.h:
2297         (WebCore::SVGAttributeHashTranslator::hash):
2298         * svg/SVGUseElement.cpp:
2299         (WebCore::SVGUseElement::transferSizeAttributesToTargetClone):
2300         * svg/animation/SVGSMILElement.cpp:
2301         (WebCore::SVGSMILElement::constructAttributeName):
2302         * testing/MockCDMFactory.cpp:
2303         (WebCore::MockCDMInstance::requestLicense):
2304         * xml/XMLErrors.cpp:
2305         (WebCore::createXHTMLParserErrorHeader):
2306         * xml/XPathStep.cpp:
2307         (WebCore::XPath::nodeMatchesBasicTest):
2308         (WebCore::XPath::Step::nodesInAxis):
2309         * xml/parser/XMLDocumentParserLibxml2.cpp:
2310         (WebCore::XMLDocumentParser::XMLDocumentParser):
2311         (WebCore::handleNamespaceAttributes):
2312         (WebCore::handleElementAttributes):
2313
2314 2017-07-06  Chris Dumez  <cdumez@apple.com>
2315
2316         Drop unnecessary uses of targetStatistics.dataRecordsRemoved in ResourceLoadObserver
2317         https://bugs.webkit.org/show_bug.cgi?id=174234
2318
2319         Reviewed by Brent Fulgham.
2320
2321         Drop unnecessary uses of targetStatistics.dataRecordsRemoved in ResourceLoadObserver. It is
2322         always 0 since this member is only initialized later on, in the UIProcess.
2323
2324         * loader/ResourceLoadObserver.cpp:
2325         (WebCore::ResourceLoadObserver::logFrameNavigation):
2326         (WebCore::ResourceLoadObserver::logSubresourceLoading):
2327         (WebCore::ResourceLoadObserver::logWebSocketLoading):
2328
2329 2017-07-06  Yoav Weiss  <yoav@yoav.ws>
2330
2331         [preload] Avoid reflecting "video" and "audio" when they are not supported `as` value
2332         https://bugs.webkit.org/show_bug.cgi?id=174199
2333
2334         Reviewed by Youenn Fablet.
2335
2336         No new tests as video/audio is supported in tests. I tested this manually.
2337
2338         * html/HTMLLinkElement.cpp:
2339         (WebCore::HTMLLinkElement::as): Make sure "video" and "audio" will not be reflected when they are not supported.
2340
2341 2017-07-06  Chris Dumez  <cdumez@apple.com>
2342
2343         Drop unused ResourceLoadStatistics members
2344         https://bugs.webkit.org/show_bug.cgi?id=174226
2345
2346         Reviewed by Brent Fulgham.
2347
2348         * loader/ResourceLoadObserver.cpp:
2349         (WebCore::ResourceLoadObserver::logFrameNavigation):
2350         (WebCore::ResourceLoadObserver::logSubresourceLoading):
2351         (WebCore::ResourceLoadObserver::logWebSocketLoading):
2352         (WebCore::ResourceLoadObserver::isPrevalentResource): Deleted.
2353         * loader/ResourceLoadObserver.h:
2354         * loader/ResourceLoadStatistics.cpp:
2355         (WebCore::ResourceLoadStatistics::encode):
2356         (WebCore::ResourceLoadStatistics::decode):
2357         (WebCore::ResourceLoadStatistics::toString):
2358         (WebCore::ResourceLoadStatistics::merge):
2359         * loader/ResourceLoadStatistics.h:
2360
2361 2017-07-06  Youenn Fablet  <youenn@apple.com>
2362
2363         Rendering of WebRTC audio in AudioSampleDataSource may trigger crackles
2364         https://bugs.webkit.org/show_bug.cgi?id=174223
2365
2366         Reviewed by Eric Carlson.
2367
2368         We try reading too quickly and need to back off a little bit if we do not enough data.
2369         This only affects real audio and not web audio, hence validated through manual testing only.
2370
2371         * platform/audio/mac/AudioSampleDataSource.mm:
2372         (WebCore::AudioSampleDataSource::pullSamplesInternal):
2373
2374 2017-07-06  Sam Weinig  <sam@webkit.org>
2375
2376         [WebIDL] Remove custom bindings for WebGL code dealing with WebGL extensions
2377         https://bugs.webkit.org/show_bug.cgi?id=174186
2378
2379         Reviewed by Alex Christensen.
2380
2381         * CMakeLists.txt:
2382         * WebCore.xcodeproj/project.pbxproj:
2383         Update files. Categorize some of the remaining custom bindings into groups.
2384
2385         * bindings/IDLTypes.h:
2386         Add a IDLWebGLExtension type, to model the special WebGLExtension type. In
2387         the future, WebGLExtension can probably be replaced by a Variant.
2388         
2389         * bindings/js/JSDOMConvertWebGL.cpp: Added.
2390         Move WebGLAny's convertToJSValue and add a convertToJSValue for WebGLExtension.
2391
2392         * bindings/js/JSDOMConvertWebGL.h:
2393         (WebCore::convertToJSValue):
2394         Since WebGLExtension is a wrapper type, we need both a pointer and reference variant
2395         of the conversion.
2396
2397         (WebCore::JSConverter<IDLWebGLExtension>::convert):
2398         Added.
2399
2400         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
2401         (WebCore::toJS): Deleted.
2402         (WebCore::JSWebGL2RenderingContext::getExtension): Deleted.
2403         Remove custom operation and converter.
2404
2405         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2406         (WebCore::toJS): Deleted.
2407         (WebCore::JSWebGLRenderingContext::getExtension): Deleted.
2408         Remove custom operation and converter.
2409
2410         * bindings/scripts/CodeGeneratorJS.pm:
2411         (AddToIncludesForIDLType):
2412         (NativeToJSValueDOMConvertNeedsState):
2413         (NativeToJSValueDOMConvertNeedsGlobalObject):
2414         Add support for IDLWebGLExtension.
2415
2416         * html/canvas/WebGLAny.cpp: Removed.
2417         * html/canvas/WebGLAny.h:
2418         Moved convertToJSValue to the bindings where it belongs.
2419
2420         * html/canvas/WebGLRenderingContextBase.idl:
2421         Annotate getExtension with [OverrideIDLType=IDLWebGLExtension].
2422
2423 2017-07-06  Joseph Pecoraro  <pecoraro@apple.com>
2424
2425         [Cocoa] CTParagraphStyle leak under WebCore::LinkImageLayout::LinkImageLayout
2426         https://bugs.webkit.org/show_bug.cgi?id=174228
2427
2428         Reviewed by Andreas Kling.
2429
2430         * platform/mac/DragImageMac.mm:
2431         (WebCore::LinkImageLayout::LinkImageLayout):
2432
2433 2017-07-06  Myles C. Maxfield  <mmaxfield@apple.com>
2434
2435         [Cocoa] Improve performance of font lookups
2436         https://bugs.webkit.org/show_bug.cgi?id=173960
2437         <rdar://problem/31996891>
2438
2439         Reviewed by Darin Adler.
2440
2441         Looking up kCTFontPostScriptNameAttribute is faster than kCTFontNameAttribute.
2442
2443         No new tests because there is no behavior change.
2444
2445         * platform/spi/cocoa/CoreTextSPI.h:
2446         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2447         (WebCore::FontDatabase::fontForPostScriptName):
2448
2449 2017-07-06  Myles C. Maxfield  <mmaxfield@apple.com>
2450
2451         REGRESSION(r216944): Font loads can cause Chinese characters to draw as .notdef
2452         https://bugs.webkit.org/show_bug.cgi?id=173962
2453         <rdar://problem/32925318>
2454
2455         Reviewed by Simon Fraser.
2456
2457         Previously, there was no signalling between our font loading code
2458         which determined whether or not a font should be invisible (because
2459         its in the middle of loading) and our system fallback code which
2460         created fonts when we fall off the end of the fallback list. Because
2461         of this, we were doing two things wrong:
2462
2463         1. When we started downloading a font, we would try to use a fallback
2464         font. However, if the fallback font didn't suppor the character we're
2465         trying to render, we would just bail and draw .notdef
2466         2. Even if we continued down the fallback list, and fell of the end,
2467         we wouldn't realize that the system fallback font should also be drawn
2468         as invisible.
2469
2470         This patch solves these two problems by:
2471         1. Performing a search to find the best (local) fallback font with
2472         which to fall systemFallbackFontForCharacter(). This way, if you say
2473         "font-family: 'RemoteFont', 'Helvetica'" we will use Helvetica as
2474         the lookup to ask the system to search for.
2475         2. Give the Font class an accessor which can create a duplicate, but
2476         invisible font. Give FontCascadeFonts::glyphDataForVariant() the
2477         correct tracking to know when to use this invisible duplicate.
2478
2479         Tests: fast/text/font-loading-system-fallback.html
2480                http/tests/webfont/font-loading-system-fallback-visibility.html
2481
2482         * platform/graphics/Font.cpp:
2483         (WebCore::Font::invisibleFont):
2484         * platform/graphics/Font.h:
2485         * platform/graphics/FontCascadeFonts.cpp:
2486         (WebCore::findBestFallbackFont):
2487         (WebCore::FontCascadeFonts::glyphDataForSystemFallback):
2488         (WebCore::FontCascadeFonts::glyphDataForVariant):
2489         * platform/graphics/FontCascadeFonts.h:
2490
2491 2017-07-06  Chris Dumez  <cdumez@apple.com>
2492
2493         FileMonitor should not be ref counted
2494         https://bugs.webkit.org/show_bug.cgi?id=174166
2495
2496         Reviewed by Brent Fulgham.
2497
2498         Update FileMonitor to no longer be refcounted. It was previously easy to leak it
2499         because the object would ref itself in various lambdas. The client would have to
2500         explicitely call FileMonitor::stopMonitoring() which was fragile.
2501
2502         This patch also simplifies the code and API a bit since no longer actually
2503         requires startMonitoring() / stopMonitoring() API.
2504
2505         No new tests, covered by API tests.
2506
2507         * platform/FileMonitor.cpp:
2508         (WebCore::FileMonitor::FileMonitor):
2509         (WebCore::FileMonitor::~FileMonitor):
2510         (WebCore::FileMonitor::create): Deleted.
2511         (WebCore::FileMonitor::startMonitoring): Deleted.
2512         (WebCore::FileMonitor::stopMonitoring): Deleted.
2513         * platform/FileMonitor.h:
2514         * platform/cocoa/FileMonitorCocoa.mm:
2515         (WebCore::FileMonitor::FileMonitor):
2516         (WebCore::FileMonitor::~FileMonitor):
2517         (WebCore::FileMonitor::startMonitoring): Deleted.
2518         (WebCore::FileMonitor::stopMonitoring): Deleted.
2519
2520 2017-07-06  Matt Rajca  <mrajca@apple.com>
2521
2522         Fix build with VIDEO support disabled.
2523         https://bugs.webkit.org/show_bug.cgi?id=174217
2524
2525         Unreviewed build fix.
2526
2527         * page/Page.cpp:
2528
2529 2017-07-06  Matt Lewis  <jlewis3@apple.com>
2530
2531         Unreviewed, rolling out r219193.
2532
2533         The tests added with this revision were extreamly flaky on all
2534         platforms.
2535
2536         Reverted changeset:
2537
2538         "[SVG] Leak in SVGAnimatedListPropertyTearOff"
2539         https://bugs.webkit.org/show_bug.cgi?id=172545
2540         http://trac.webkit.org/changeset/219193
2541
2542 2017-07-06  Zalan Bujtas  <zalan@apple.com>
2543
2544         Use WTFLogAlways for debug logging so that it shows up in device system logs
2545         https://bugs.webkit.org/show_bug.cgi?id=173450
2546
2547         Reviewed by Simon Fraser.
2548
2549         If you want to showRenderTree() on-device, the result doesn't show in system log so you can't see it.
2550         Switch to WTFLogAlways to fix this, for showRenderTree and its dependencies.
2551         
2552         * platform/text/TextStream.cpp:
2553         (WebCore::writeIndent):
2554         * rendering/InlineBox.cpp:
2555         (WebCore::InlineBox::showLineTreeAndMark):
2556         (WebCore::InlineBox::showLineBox):
2557         * rendering/InlineBox.h:
2558         * rendering/InlineFlowBox.cpp:
2559         (WebCore::InlineFlowBox::showLineTreeAndMark):
2560         * rendering/InlineFlowBox.h:
2561         * rendering/InlineTextBox.cpp:
2562         (WebCore::InlineTextBox::showLineBox):
2563         * rendering/InlineTextBox.h:
2564         * rendering/RenderBlockFlow.cpp:
2565         (WebCore::RenderBlockFlow::showLineTreeAndMark):
2566         * rendering/RenderBlockFlow.h:
2567         * rendering/RenderObject.cpp:
2568         (WebCore::showRenderTreeLegend):
2569         (WebCore::RenderObject::showRenderTreeForThis):
2570         (WebCore::RenderObject::showLineTreeForThis):
2571         (WebCore::RenderObject::showRegionsInformation):
2572         (WebCore::RenderObject::showRenderObject):
2573         (WebCore::RenderObject::showRenderSubTreeAndMark):
2574         * rendering/RenderObject.h:
2575         * rendering/SimpleLineLayoutFunctions.cpp:
2576         (WebCore::SimpleLineLayout::printPrefix):
2577         (WebCore::SimpleLineLayout::showLineLayoutForFlow):
2578         * rendering/SimpleLineLayoutFunctions.h:
2579
2580 2017-07-06  Myles C. Maxfield  <mmaxfield@apple.com>
2581
2582         Unify FontCascadeFonts::glyphDataForVariant() and FontCascadeFonts::glyphDataForNormalVariant()
2583         https://bugs.webkit.org/show_bug.cgi?id=174213
2584
2585         Reviewed by Zalan Bujtas.
2586
2587         They have almost identical code. This is in preparation for https://bugs.webkit.org/show_bug.cgi?id=173962
2588
2589         No new tests because there is no behavior change.
2590
2591         * platform/graphics/FontCascadeFonts.cpp:
2592         (WebCore::FontCascadeFonts::glyphDataForVariant):
2593         (WebCore::FontCascadeFonts::glyphDataForCharacter):
2594         (WebCore::FontCascadeFonts::glyphDataForNormalVariant): Deleted.
2595         * platform/graphics/FontCascadeFonts.h:
2596
2597 2017-07-06  Don Olmstead  <don.olmstead@sony.com>
2598
2599         [PAL] Move KillRing into PAL
2600         https://bugs.webkit.org/show_bug.cgi?id=173900
2601
2602         Reviewed by Myles C. Maxfield.
2603
2604         No new tests. No change in functionality.
2605
2606         * Configurations/WebCore.xcconfig:
2607         * PlatformGTK.cmake:
2608         * PlatformMac.cmake:
2609         * PlatformWPE.cmake:
2610         * PlatformWin.cmake:
2611         * WebCore.xcodeproj/project.pbxproj:
2612         * editing/Editor.cpp:
2613         (WebCore::Editor::Editor):
2614         * editing/Editor.h:
2615         (WebCore::Editor::killRing):
2616         * editing/EditorCommand.cpp:
2617
2618 2017-07-06  Devin Rousso  <drousso@apple.com>
2619
2620         Web Inspector: Support getting the content of WebGL/WebGL2 contexts
2621         https://bugs.webkit.org/show_bug.cgi?id=173569
2622         <rdar://problem/33112420>
2623
2624         Reviewed by Joseph Pecoraro.
2625
2626         Tests: inspector/canvas/requestContent-2d.html
2627                inspector/canvas/requestContent-webgl.html
2628                inspector/canvas/requestContent-webgl2.html
2629
2630         * html/canvas/WebGLRenderingContextBase.cpp:
2631         (WebCore::WebGLRenderingContextBase::clearIfComposited):
2632         * html/canvas/WebGLRenderingContextBase.h:
2633         (WebCore::WebGLRenderingContextBase::preventBufferClearForInspector):
2634         (WebCore::WebGLRenderingContextBase::setPreventBufferClearForInspector):
2635         Add a flag that will prevent the context buffer from being cleared, allowing it to be copied
2636         within a toDataURL call. This is currently only used by InspectorCanvasAgent::requestContent.
2637
2638         * inspector/InspectorCanvasAgent.cpp:
2639         (WebCore::InspectorCanvasAgent::requestContent):
2640         Since toDataURL attempts to force the canvas to redraw, we can preserve the buffer after it
2641         finishes drawing so that it can be copied, instead of it normally being swapped out.
2642
2643 2017-07-06  Chris Dumez  <cdumez@apple.com>
2644
2645         Move ResourceLoadObserver notification throttling logic from WebProcess class to ResourceLoadObserver
2646         https://bugs.webkit.org/show_bug.cgi?id=174194
2647
2648         Reviewed by Brent Fulgham.
2649
2650         Move ResourceLoadObserver notification throttling logic from WebProcess class to
2651         ResourceLoadObserver. This makes more sense and decreases the complexity of the
2652         WebProcess class.
2653
2654         * loader/ResourceLoadObserver.cpp:
2655         (WebCore::ResourceLoadObserver::setNotificationCallback):
2656         (WebCore::ResourceLoadObserver::ResourceLoadObserver):
2657         (WebCore::ResourceLoadObserver::logFrameNavigation):
2658         (WebCore::ResourceLoadObserver::logSubresourceLoading):
2659         (WebCore::ResourceLoadObserver::logWebSocketLoading):
2660         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
2661         (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded):
2662         (WebCore::ResourceLoadObserver::notificationTimerFired):
2663         * loader/ResourceLoadObserver.h:
2664
2665 2017-07-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
2666
2667         REGRESSION(r208511): RenderImageResourceStyleImage should not assume image() won't return null if its m_cachedImage is valid
2668         https://bugs.webkit.org/show_bug.cgi?id=174168
2669
2670         Reviewed by Simon Fraser.
2671
2672         RenderImageResourceStyleImage::image() may return a null pointer even if
2673         its m_cachedImage is not null. The revision r208511, changed the function
2674         RenderImageResourceStyleImage::shutdown() so it calls Image::stopAnimation().
2675         But this change assumes that if m_cachedImage is not null then image() will
2676         return a valid pointer. This is not true because StyleCachedImage::isPending()
2677         can return true and hence, RenderImageResourceStyleImage::image() will return
2678         a null pointer.
2679
2680         * rendering/RenderImageResourceStyleImage.cpp:
2681         (WebCore::RenderImageResourceStyleImage::image): Like what RenderImageResource
2682         does, return Image::nullImage() if m_styleImage->isPending().
2683
2684 2017-07-06  Commit Queue  <commit-queue@webkit.org>
2685
2686         Unreviewed, rolling out r219201.
2687         https://bugs.webkit.org/show_bug.cgi?id=174211
2688
2689         "Causes crashes on Release builds and API tests" (Requested by
2690         ddkilzer on #webkit).
2691
2692         Reverted changeset:
2693
2694         "Add release assert to explore crash for
2695         <rdar://problem/32908525>"
2696         http://trac.webkit.org/changeset/219201
2697
2698 2017-07-06  Commit Queue  <commit-queue@webkit.org>
2699
2700         Unreviewed, rolling out r219194.
2701         https://bugs.webkit.org/show_bug.cgi?id=174207
2702
2703         it broke some layout tests (Requested by clopez on #webkit).
2704
2705         Reverted changeset:
2706
2707         "[GStreamer] vid.me videos do not play"
2708         https://bugs.webkit.org/show_bug.cgi?id=172240
2709         http://trac.webkit.org/changeset/219194
2710
2711 2017-07-06  David Kilzer  <ddkilzer@apple.com>
2712
2713         Add release assert to explore crash for <rdar://problem/32908525>
2714
2715         Reviewed by Brady Eidson.
2716
2717         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2718         (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase): Add
2719         release assert to catch cases when the IDBBackingStore is not
2720         deleted before the UniqueIDBDatabase is destroyed.  The
2721         IDBBackingStore should always be released on the database
2722         thread.
2723
2724 2017-07-06  Matt Lewis  <jlewis3@apple.com>
2725
2726         Unreviewed, rolling out r219178.
2727
2728         This caused a consistent failure with the API test
2729         StringBuilderTest.ToAtomicStringOnEmpty on all Debug testers.
2730
2731         Reverted changeset:
2732
2733         "[WTF] Clean up StringStatics.cpp by using
2734         LazyNeverDestroyed<> for Atoms"
2735         https://bugs.webkit.org/show_bug.cgi?id=174150
2736         http://trac.webkit.org/changeset/219178
2737
2738 2017-07-06  Charlie Turner  <cturner@igalia.com>
2739
2740         [GStreamer] vid.me videos do not play
2741         https://bugs.webkit.org/show_bug.cgi?id=172240
2742
2743         Reviewed by Xabier Rodriguez-Calvar.
2744
2745         In r142251, code to hide the WK HTTP source elements from elsewhere in
2746         the pipeline was removed. This has the nasty side-effect of
2747         auto-plugging the WK HTTP source into things it really should not be
2748         used in, especially the adaptive streaming demuxers. The reasons this
2749         is bad are documented in several places on Bugzilla, see the parent
2750         bug report for more details. The high-level issue is that the WK HTTP
2751         source and its use of WebCore is not thread-safe. Although work has
2752         been recently done to improve this situation, it's still not perfect.
2753
2754         Another issue is the interface hlsdemux expects its HTTP source to
2755         implement, specifically seeking in READY.
2756
2757         This does rely on HTTP context sharing being available in GStreamer,
2758         upstream bug is here:
2759         https://bugzilla.gnome.org/show_bug.cgi?id=761099. The failing case
2760         can be demonstrated with
2761         https://github.com/thiagoss/adaptive-test-server but manual testing on
2762         popular video hosting sites, including vid.me, shows that this doesn't
2763         bite us at the moment, just something else to fix in the future.
2764
2765         There are some QoS issues with the adaptive streaming code in
2766         GStreamer, but it seems much better to offer a below par QoS in lieu
2767         of crashing/livelocking when playing certain streams, and issues can be
2768         raised upstream when they arise.
2769
2770         This patch does take us further away from the future goal of having all
2771         networking operations go through the network process, but in return it
2772         solves some nasty crashes and livelocks that have been irritating
2773         users for some time. With the pressure off on this issue, work can be
2774         planned to consider how to make the WK HTTP source a better citizen
2775         inside the GStreamer pipeline when we migrate the netcode to go
2776         through the network process.
2777
2778         A new test is added to check that the single file HLS playlists
2779         (new in version 4) can be played, which was the primary cause of
2780         this bug report.
2781
2782         Test: http/tests/media/hls/range-request.html
2783
2784         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2785         (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL): Perform
2786         some trickery to make sure that we only ever fetch URLs handed to
2787         us by WebCore. Any further URLs discovered inside the pipeline
2788         will not get WKWS auto-plugged, since they'll be plain https?
2789         schemas.
2790         (WebCore::MediaPlayerPrivateGStreamer::load): Refactor to use the
2791         setPlaybinURL helper method.
2792         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation): Ditto.
2793         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add
2794         the setPlaybinURL helper method.
2795         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2796         (webKitWebSrcGetProtocols): Only advertise webkit+https?, this
2797         ensures we won't get auto-plugged by pipeline elements asking for
2798         an element to fetch https? resources (like adaptive demuxers).
2799         (convertPlaybinURI): Undo the trick when another element asks us
2800         for our URI.
2801
2802 2017-05-24  Sergio Villar Senin  <svillar@igalia.com>
2803
2804         [SVG] Leak in SVGAnimatedListPropertyTearOff
2805         https://bugs.webkit.org/show_bug.cgi?id=172545
2806
2807         Reviewed by Said Abou-Hallawa.
2808
2809         SVGAnimatedListPropertyTearOff maintains a vector m_wrappers with references to
2810         SVGPropertyTraits<PropertyType>::ListItemTearOff. Apart from that SVGPropertyTearOff has a
2811         reference to SVGAnimatedProperty.
2812
2813         When SVGListProperty::getItemValuesAndWrappers() is called, it creates a
2814         SVGPropertyTraits<PropertyType>::ListItemTearOff pointing to the same SVGAnimatedProperty (a
2815         SVGAnimatedListPropertyTearOff) which stores the m_wrappers vector where the ListItemTearOff
2816         is going to be added to. This effectively creates a reference cycle between the
2817         SVGAnimatedListPropertyTearOff and all the ListItemTearOff it stores in m_wrappers.
2818
2819         We should detach those wrappers in propertyWillBeDeleted() in order to break the cycle.
2820
2821         * svg/properties/SVGAnimatedListPropertyTearOff.h:
2822
2823 2017-07-05  Don Olmstead  <don.olmstead@sony.com>
2824
2825         [WTF] Move SoftLinking.h into WTF
2826         https://bugs.webkit.org/show_bug.cgi?id=174000
2827
2828         Reviewed by Alex Christensen.
2829
2830         No new tests. No change in functionality
2831
2832         * Modules/applepay/PaymentRequest.cpp:
2833         * Modules/applepay/cocoa/PaymentContactCocoa.mm:
2834         * Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm:
2835         * Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.cpp:
2836         * WebCore.xcodeproj/project.pbxproj:
2837         * editing/cocoa/EditorCocoa.mm:
2838         * editing/cocoa/HTMLConverter.mm:
2839         * editing/ios/EditorIOS.mm:
2840         * page/CaptionUserPreferencesMediaAF.cpp:
2841         * page/cocoa/SettingsCocoa.mm:
2842         * page/ios/UserAgentIOS.mm:
2843         * page/mac/ServicesOverlayController.mm:
2844         * platform/audio/ios/AudioDestinationIOS.cpp:
2845         * platform/audio/ios/AudioFileReaderIOS.cpp:
2846         * platform/audio/ios/AudioSessionIOS.mm:
2847         * platform/audio/ios/MediaSessionManagerIOS.mm:
2848         * platform/cf/CoreMediaSoftLink.cpp:
2849         * platform/cf/CoreMediaSoftLink.h:
2850         * platform/cf/MediaAccessibilitySoftLink.cpp:
2851         * platform/cf/MediaAccessibilitySoftLink.h:
2852         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
2853         * platform/cocoa/CoreVideoSoftLink.cpp:
2854         * platform/cocoa/CoreVideoSoftLink.h:
2855         * platform/cocoa/DataDetectorsCoreSoftLink.h:
2856         * platform/cocoa/NetworkExtensionContentFilter.mm:
2857         * platform/cocoa/ParentalControlsContentFilter.mm:
2858         * platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
2859         * platform/cocoa/VideoToolboxSoftLink.cpp:
2860         * platform/cocoa/VideoToolboxSoftLink.h:
2861         * platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
2862         * platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
2863         * platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
2864         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
2865         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
2866         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2867         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
2868         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
2869         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
2870         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
2871         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp:
2872         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
2873         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
2874         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
2875         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
2876         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
2877         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
2878         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2879         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2880         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2881         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
2882         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2883         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
2884         * platform/graphics/cocoa/FontCascadeCocoa.mm:
2885         * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
2886         * platform/graphics/cv/PixelBufferConformerCV.cpp:
2887         * platform/graphics/ios/FontCacheIOS.mm:
2888         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2889         * platform/graphics/mac/FontCacheMac.mm:
2890         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2891         * platform/graphics/mac/MediaTimeQTKit.mm:
2892         * platform/graphics/mac/PDFDocumentImageMac.mm:
2893         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2894         * platform/ios/DragImageIOS.mm:
2895         * platform/ios/PlatformPasteboardIOS.mm:
2896         * platform/ios/PlatformScreenIOS.mm:
2897         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
2898         * platform/ios/QuickLookSoftLink.h:
2899         * platform/ios/QuickLookSoftLink.mm:
2900         * platform/ios/RemoteCommandListenerIOS.mm:
2901         * platform/ios/ThemeIOS.mm:
2902         * platform/ios/ValidationBubbleIOS.mm:
2903         * platform/ios/WebCoreMotionManager.mm:
2904         * platform/ios/WebItemProviderPasteboard.mm:
2905         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2906         * platform/mac/DragImageMac.mm:
2907         * platform/mac/MediaRemoteSoftLink.cpp:
2908         * platform/mac/MediaRemoteSoftLink.h:
2909         * platform/mac/SerializedPlatformRepresentationMac.mm:
2910         * platform/mac/WebPlaybackControlsManager.mm:
2911         * platform/mac/WebVideoFullscreenController.mm:
2912         * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
2913         * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
2914         * platform/mediastream/libwebrtc/H264VideoToolBoxEncoder.mm:
2915         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2916         * platform/network/cf/CookieJarCFNet.cpp:
2917         * platform/network/ios/NetworkStateNotifierIOS.mm:
2918         * platform/network/ios/PreviewConverter.mm:
2919         * platform/network/mac/BlobDataFileReferenceMac.mm:
2920         * platform/spi/cocoa/AVKitSPI.h:
2921         (-[AVTouchBarPlaybackControlsControlling NS_ENUM]): Deleted.
2922         * platform/spi/cocoa/NSAttributedStringSPI.h:
2923         * platform/spi/ios/DataDetectorsUISPI.h:
2924         * platform/spi/mac/AVFoundationSPI.h:
2925         * platform/spi/mac/DataDetectorsSPI.h:
2926         * platform/spi/mac/LookupSPI.h:
2927         * platform/spi/mac/TUCallSPI.h:
2928         * platform/win/ScrollbarThemeWin.cpp:
2929         * rendering/RenderThemeCocoa.mm:
2930         * rendering/RenderThemeIOS.mm:
2931         * rendering/RenderThemeWin.cpp:
2932         * testing/Internals.mm:
2933         * xml/XSLStyleSheetLibxslt.cpp:
2934         * xml/XSLTExtensions.cpp:
2935         * xml/XSLTProcessorLibxslt.cpp:
2936         * xml/XSLTUnicodeSort.cpp:
2937
2938 2017-07-05  Zalan Bujtas  <zalan@apple.com>
2939
2940         REGRESSION: Stack overflow in RenderBlockFlow::layoutBlock after increasing the font size to max in some RTL vertical books.
2941         https://bugs.webkit.org/show_bug.cgi?id=174144
2942         <rdar://problem/32781038>
2943
2944         Reviewed by Simon Fraser.
2945
2946         We set the start/end margin on the ruby renderer to support overhanging content. The margins ensure that
2947         adjacent boxes on the line are placed properly respecting the overhanging content.
2948         The line breaking algorithm also takes this value into account as it affects the line's available width.
2949         We need to reset this value before laying out the lines, otherwise we might end up using this value on the line twice;
2950         first as the renderer's margins (as the result of the previous layout) and second as the renderer's overhanging value.
2951         Since this is not strictly part of the renderer's layout context (i.e. we set them during the line layout and not at
2952         RenderRubyRun::layout) we can't rely on the ruby's layout logic to reset them.
2953
2954         Test: fast/ruby/ruby-overhang-margin-crash.html
2955
2956         * rendering/RenderBlockLineLayout.cpp:
2957         (WebCore::RenderBlockFlow::layoutLineBoxes):
2958
2959 2017-07-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2960
2961         Upgrade GCC baseline
2962         https://bugs.webkit.org/show_bug.cgi?id=174155
2963
2964         Reviewed by Michael Catanzaro.
2965
2966         Remove workaround for old GCC.
2967
2968         * CMakeLists.txt:
2969
2970 2017-07-05  Chris Dumez  <cdumez@apple.com>
2971
2972         Unreviewed attempt to fix iOS build after r219177.
2973
2974         * page/ios/UserAgentIOS.mm:
2975         * platform/spi/ios/UIKitSPI.h:
2976
2977 2017-07-05  Chris Dumez  <cdumez@apple.com>
2978
2979         Unreviewed attempt to fix iOS build after r219177.
2980
2981         * page/ios/UserAgentIOS.mm:
2982         * platform/spi/ios/UIKitSPI.h:
2983
2984 2017-07-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2985
2986         Use std::lock_guard instead of std::unique_lock if move semantics and try_lock is not necessary
2987         https://bugs.webkit.org/show_bug.cgi?id=174148
2988
2989         Reviewed by Mark Lam.
2990
2991         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2992         (WebCore::AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC):
2993
2994 2017-07-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2995
2996         [WTF] Clean up StringStatics.cpp by using LazyNeverDestroyed<> for Atoms
2997         https://bugs.webkit.org/show_bug.cgi?id=174150
2998
2999         Reviewed by Mark Lam.
3000
3001         * Modules/mediacontrols/MediaControlsHost.cpp:
3002         (WebCore::MediaControlsHost::captionDisplayMode):
3003         * Modules/mediastream/RTCDataChannel.cpp:
3004         (WebCore::RTCDataChannel::binaryType):
3005         * accessibility/AXObjectCache.cpp:
3006         (WebCore::createFromRenderer):
3007         * accessibility/AccessibilityMediaControls.cpp:
3008         (WebCore::AccessibilityMediaControl::controlTypeName):
3009         * accessibility/AccessibilityObject.cpp:
3010         (WebCore::AccessibilityObject::language):
3011         (WebCore::AccessibilityObject::defaultLiveRegionStatusForRole):
3012         (WebCore::AccessibilityObject::actionVerb):
3013         (WebCore::AccessibilityObject::getAttribute):
3014         (WebCore::AccessibilityObject::placeholderValue):
3015         * accessibility/AccessibilityObject.h:
3016         (WebCore::AccessibilityObject::accessKey):
3017         (WebCore::AccessibilityObject::ariaLiveRegionRelevant):
3018         * accessibility/AccessibilityRenderObject.cpp:
3019         (WebCore::AccessibilityRenderObject::accessKey):
3020         (WebCore::AccessibilityRenderObject::actionVerb):
3021         * bindings/js/JSCustomElementInterface.cpp:
3022         (WebCore::JSCustomElementInterface::constructElementWithFallback):
3023         * bindings/js/JSCustomElementRegistryCustom.cpp:
3024         (WebCore::JSCustomElementRegistry::define):
3025         * bindings/scripts/CodeGeneratorJS.pm:
3026         (GenerateDefaultValue):
3027         * bindings/scripts/test/JS/JSTestObj.cpp:
3028         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringBody):
3029         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNullBody):
3030         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyStringBody):
3031         * css/CSSPageRule.cpp:
3032         (WebCore::CSSPageRule::selectorText):
3033         * css/CSSPrimitiveValue.cpp:
3034         (WebCore::valueName):
3035         * css/CSSSelector.cpp:
3036         (WebCore::simpleSelectorSpecificityInternal):
3037         (WebCore::CSSSelector::specificityForPage):
3038         (WebCore::CSSSelector::RareData::RareData):
3039         * css/CSSSelector.h:
3040         (WebCore::CSSSelector::argument):
3041         * css/CSSSelectorList.cpp:
3042         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
3043         * css/PageRuleCollector.cpp:
3044         (WebCore::checkPageSelectorComponents):
3045         * css/RuleSet.cpp:
3046         (WebCore::computeMatchBasedOnRuleHash):
3047         (WebCore::RuleSet::addRule):
3048         * css/SelectorChecker.cpp:
3049         (WebCore::tagMatches):
3050         * css/SelectorFilter.cpp:
3051         (WebCore::collectDescendantSelectorIdentifierHashes):
3052         * css/StyleBuilderConverter.h:
3053         (WebCore::StyleBuilderConverter::convertStringOrAuto):
3054         (WebCore::StyleBuilderConverter::convertStringOrNone):
3055         * css/StyleBuilderCustom.h:
3056         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
3057         (WebCore::StyleBuilderCustom::applyValueWebkitTextEmphasisStyle):
3058         (WebCore::StyleBuilderCustom::applyValueContent):
3059         (WebCore::StyleBuilderCustom::applyValueAlt):
3060         * css/StyleSheetContents.cpp:
3061         (WebCore::StyleSheetContents::StyleSheetContents):
3062         (WebCore::StyleSheetContents::namespaceURIFromPrefix):
3063         * css/makeprop.pl:
3064         * css/parser/CSSParserImpl.cpp:
3065         (WebCore::CSSParserImpl::parsePageSelector):
3066         * css/parser/CSSSelectorParser.cpp:
3067         (WebCore::CSSSelectorParser::consumeCompoundSelector):
3068         (WebCore::CSSSelectorParser::consumeName):
3069         (WebCore::CSSSelectorParser::consumeAttribute):
3070         (WebCore::CSSSelectorParser::defaultNamespace):
3071         (WebCore::CSSSelectorParser::determineNamespace):
3072         (WebCore::CSSSelectorParser::prependTypeSelectorIfNeeded):
3073         * cssjit/SelectorCompiler.cpp:
3074         (WebCore::SelectorCompiler::attributeNameTestingRequiresNamespaceRegister):
3075         (WebCore::SelectorCompiler::equalTagNames):
3076         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
3077         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasTagName):
3078         * dom/Attr.cpp:
3079         (WebCore::Attr::setPrefix):
3080         (WebCore::Attr::attachToElement):
3081         * dom/Attribute.h:
3082         (WebCore::Attribute::nameMatchesFilter):
3083         * dom/ConstantPropertyMap.cpp:
3084         (WebCore::ConstantPropertyMap::nameForProperty):
3085         * dom/ContainerNode.cpp:
3086         (WebCore::ContainerNode::getElementsByTagName):
3087         (WebCore::ContainerNode::getElementsByTagNameNS):
3088         * dom/CustomElementReactionQueue.cpp:
3089         (WebCore::CustomElementReactionQueue::enqueuePostUpgradeReactions):
3090         * dom/DatasetDOMStringMap.cpp:
3091         (WebCore::convertPropertyNameToAttributeName):
3092         * dom/Document.cpp:
3093         (WebCore::createUpgradeCandidateElement):
3094         (WebCore::Document::createElementForBindings):
3095         (WebCore::Document::importNode):
3096         (WebCore::Document::hasValidNamespaceForElements):
3097         (WebCore::Document::processBaseElement):
3098         (WebCore::Document::dir):
3099         (WebCore::Document::bgColor):
3100         (WebCore::Document::fgColor):
3101         (WebCore::Document::alinkColor):
3102         (WebCore::Document::linkColorForBindings):
3103         (WebCore::Document::vlinkColor):
3104         * dom/Document.h:
3105         * dom/Element.cpp:
3106         (WebCore::Element::setBooleanAttribute):
3107         (WebCore::Element::synchronizeAttribute):
3108         (WebCore::Element::getAttribute):
3109         (WebCore::Element::getAttributeNS):
3110         (WebCore::Element::setAttribute):
3111         (WebCore::Element::parserSetAttributes):
3112         (WebCore::Element::didMoveToNewDocument):
3113         (WebCore::Element::setPrefix):
3114         (WebCore::Element::insertedInto):
3115         (WebCore::Element::removedFrom):
3116         (WebCore::Element::removeAttributeInternal):
3117         (WebCore::Element::addAttributeInternal):
3118         (WebCore::Element::removeAttributeNS):
3119         (WebCore::Element::getAttributeNodeNS):
3120         (WebCore::Element::hasAttributeNS):
3121         (WebCore::Element::computeInheritedLanguage):
3122         (WebCore::Element::updateNameForDocument):
3123         (WebCore::Element::updateIdForDocument):
3124         (WebCore::Element::didAddAttribute):
3125         (WebCore::Element::didRemoveAttribute):
3126         (WebCore::Element::cloneAttributesFromElement):
3127         * dom/Element.h:
3128         (WebCore::Element::attributeWithoutSynchronization):
3129         (WebCore::Element::idForStyleResolution):
3130         (WebCore::Element::getIdAttribute):
3131         (WebCore::Element::getNameAttribute):
3132         * dom/EventTarget.cpp:
3133         (WebCore::legacyType):
3134         * dom/MutationRecord.h:
3135         (WebCore::MutationRecord::attributeName):
3136         (WebCore::MutationRecord::attributeNamespace):
3137         * dom/NamedNodeMap.cpp:
3138         (WebCore::NamedNodeMap::removeNamedItemNS):
3139         * dom/Node.cpp:
3140         (WebCore::Node::prefix):
3141         (WebCore::Node::localName):
3142         (WebCore::Node::namespaceURI):
3143         (WebCore::Node::checkSetPrefix):
3144         (WebCore::locateDefaultNamespace):
3145         (WebCore::Node::isDefaultNamespace):
3146         (WebCore::Node::lookupNamespaceURI):
3147         (WebCore::locateNamespacePrefix):
3148         (WebCore::Node::lookupPrefix):
3149         * dom/NodeRareData.h:
3150         (WebCore::NodeListsNodeData::addCachedTagCollectionNS):
3151         (WebCore::NodeListsNodeData::addCachedCollection):
3152         (WebCore::NodeListsNodeData::cachedCollection):
3153         (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
3154         (WebCore::NodeListsNodeData::removeCachedTagCollectionNS):
3155         (WebCore::NodeListsNodeData::removeCachedCollection):
3156         * dom/PseudoElement.cpp:
3157         (WebCore::pseudoElementTagName):
3158         * dom/QualifiedName.cpp:
3159         (WebCore::QualifiedName::init):
3160         (WebCore::nullQName):
3161         (WebCore::createQualifiedName):
3162         * dom/QualifiedName.h:
3163         (WebCore::QualifiedName::hasPrefix):
3164         * dom/SelectorQuery.cpp:
3165         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
3166         * dom/SlotAssignment.cpp:
3167         (WebCore::slotNameFromAttributeValue):
3168         * dom/SlotAssignment.h:
3169         (WebCore::SlotAssignment::defaultSlotName):
3170         (WebCore::ShadowRoot::didRemoveAllChildrenOfShadowHost):
3171         (WebCore::ShadowRoot::didChangeDefaultSlot):
3172         * dom/TagCollection.cpp:
3173         (WebCore::TagCollection::TagCollection):
3174         (WebCore::HTMLTagCollection::HTMLTagCollection):
3175         * dom/TagCollection.h:
3176         (WebCore::TagCollectionNS::elementMatches):
3177         * dom/make_names.pl:
3178         (printNamesCppFile):
3179         (printDefinitions):
3180         (printFactoryCppFile):
3181         * editing/CompositeEditCommand.cpp:
3182         (WebCore::CompositeEditCommand::removeNodeAttribute):
3183         * editing/Editing.cpp:
3184         (WebCore::createHTMLElement):
3185         * editing/MarkupAccumulator.cpp:
3186         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
3187         (WebCore::MarkupAccumulator::shouldAddNamespaceElement):
3188         (WebCore::MarkupAccumulator::shouldAddNamespaceAttribute):
3189         (WebCore::MarkupAccumulator::appendNamespace):
3190         (WebCore::MarkupAccumulator::appendOpenTag):
3191         (WebCore::MarkupAccumulator::appendAttribute):
3192         * editing/gtk/EditorGtk.cpp:
3193         (WebCore::elementURL):
3194         * editing/markup.cpp:
3195         (WebCore::AttributeChange::AttributeChange):
3196         * html/Autocapitalize.cpp:
3197         (WebCore::stringForAutocapitalizeType):
3198         * html/Autofill.cpp:
3199         (WebCore::AutofillData::createFromHTMLFormControlElement):
3200         * html/DOMTokenList.h:
3201         (WebCore::DOMTokenList::item):
3202         * html/FormAssociatedElement.cpp:
3203         (WebCore::FormAssociatedElement::name):
3204         * html/HTMLButtonElement.cpp:
3205         (WebCore::HTMLButtonElement::formControlType):
3206         * html/HTMLDetailsElement.cpp:
3207         (WebCore::HTMLDetailsElement::toggleOpen):
3208         * html/HTMLDocument.cpp:
3209         (WebCore::HTMLDocument::isCaseSensitiveAttribute):
3210         * html/HTMLElement.cpp:
3211         (WebCore::HTMLElement::eventNameForEventHandlerAttribute):
3212         (WebCore::toValidDirValue):
3213         * html/HTMLImageElement.cpp:
3214         (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
3215         * html/HTMLInputElement.cpp:
3216         (WebCore::HTMLInputElement::name):
3217         (WebCore::HTMLInputElement::updateType):
3218         * html/HTMLMediaElement.cpp:
3219         (WebCore::HTMLMediaElement::doesHaveAttribute):
3220         * html/HTMLOptionElement.cpp:
3221         (WebCore::HTMLOptionElement::createForJSConstructor):
3222         * html/HTMLParamElement.cpp:
3223         (WebCore::HTMLParamElement::name):
3224         * html/HTMLSelectElement.cpp:
3225         (WebCore::HTMLSelectElement::setMultiple):
3226         * html/HTMLTableCellElement.cpp:
3227         (WebCore::HTMLTableCellElement::scope):
3228         * html/HTMLTrackElement.cpp:
3229         (WebCore::HTMLTrackElement::mediaElementCrossOriginAttribute):
3230         * html/LabelableElement.cpp:
3231         (WebCore::LabelableElement::labels):
3232         * html/LabelsNodeList.cpp:
3233         (WebCore::LabelsNodeList::~LabelsNodeList):
3234         * html/MediaController.cpp:
3235         (MediaController::playbackState):
3236         (eventNameForReadyState):
3237         * html/MediaDocument.cpp:
3238         (WebCore::MediaDocumentParser::createDocumentStructure):
3239         * html/parser/AtomicHTMLToken.h:
3240         (WebCore::AtomicHTMLToken::initializeAttributes):
3241         * html/parser/HTMLConstructionSite.cpp:
3242         (WebCore::HTMLConstructionSite::createElement):
3243         (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
3244         * html/parser/HTMLParserIdioms.cpp:
3245         (WebCore::stripLeadingAndTrailingHTMLSpaces):
3246         (WebCore::parseHTMLHashNameReference):
3247         * html/parser/HTMLTreeBuilder.cpp:
3248         (WebCore::createForeignAttributesMap):
3249         * html/track/InbandTextTrack.cpp:
3250         (WebCore::InbandTextTrack::InbandTextTrack):
3251         * html/track/LoadableTextTrack.cpp:
3252         (WebCore::LoadableTextTrack::id):
3253         * html/track/TextTrack.cpp:
3254         (WebCore::TextTrack::captionMenuOffItem):
3255         (WebCore::TextTrack::captionMenuAutomaticItem):
3256         * html/track/TrackBase.cpp:
3257         (WebCore::MediaTrackBase::setKindInternal):
3258         * html/track/VTTRegion.cpp:
3259         (WebCore::VTTRegion::scroll):
3260         * html/track/WebVTTElement.cpp:
3261         (WebCore::nodeTypeToTagName):
3262         * html/track/WebVTTElement.h:
3263         * html/track/WebVTTToken.h:
3264         (WebCore::WebVTTToken::StartTag):
3265         * loader/FrameLoader.cpp:
3266         (WebCore::FrameLoader::clear):
3267         * loader/FrameLoader.h:
3268         * loader/ImageLoader.cpp:
3269         (WebCore::ImageLoader::clearFailedLoadURL):
3270         * loader/NavigationAction.h:
3271         * loader/PolicyChecker.cpp:
3272         (WebCore::PolicyChecker::checkNavigationPolicy):
3273         * page/DOMWindow.cpp:
3274         (WebCore::DOMWindow::showModalDialog):
3275         * page/EventHandler.cpp:
3276         (WebCore::eventNameForTouchPointState):
3277         * page/FrameTree.cpp:
3278         (WebCore::FrameTree::setName):
3279         (WebCore::FrameTree::clearName):
3280         * page/Page.cpp:
3281         (WebCore::Page::groupName):
3282         * platform/graphics/ComplexTextController.cpp:
3283         (WebCore::ComplexTextController::offsetForPosition):
3284         * platform/graphics/FontCache.cpp:
3285         (WebCore::FontCache::alternateFamilyName):
3286         * platform/graphics/FontDescription.h:
3287         (WebCore::FontCascadeDescription::initialLocale):
3288         * platform/graphics/FontGenericFamilies.cpp:
3289         (WebCore::genericFontFamilyForScript):
3290         * platform/graphics/InbandTextTrackPrivate.h:
3291         (WebCore::InbandTextTrackPrivate::inBandMetadataTrackDispatchType):
3292         * platform/graphics/TrackPrivateBase.h:
3293         (WebCore::TrackPrivateBase::id):
3294         (WebCore::TrackPrivateBase::label):
3295         (WebCore::TrackPrivateBase::language):
3296         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
3297         (WebCore::AVTrackPrivateAVFObjCImpl::id):
3298         (WebCore::AVTrackPrivateAVFObjCImpl::label):
3299         (WebCore::AVTrackPrivateAVFObjCImpl::language):
3300         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
3301         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
3302         (WebCore::InbandTextTrackPrivateAVCF::label):
3303         (WebCore::InbandTextTrackPrivateAVCF::language):
3304         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp:
3305         (WebCore::InbandTextTrackPrivateLegacyAVCF::label):
3306         (WebCore::InbandTextTrackPrivateLegacyAVCF::language):
3307         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
3308         (WebCore::InbandTextTrackPrivateAVFObjC::label):
3309         (WebCore::InbandTextTrackPrivateAVFObjC::language):
3310         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
3311         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::label):
3312         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::language):
3313         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3314         (WebCore::metadataType):
3315         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
3316         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3317         (WebCore::FontCache::platformAlternateFamilyName):
3318         * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
3319         (WebCore::FontCascadeDescription::effectiveFamilyAt):
3320         * platform/graphics/freetype/FontCacheFreeType.cpp:
3321         (WebCore::FontCache::platformAlternateFamilyName):
3322         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
3323         (WebCore::InbandMetadataTextTrackPrivateGStreamer::create):
3324         * platform/graphics/win/FontCacheWin.cpp:
3325         (WebCore::FontCache::platformAlternateFamilyName):
3326         * platform/mediastream/AudioTrackPrivateMediaStream.h:
3327         * platform/mediastream/RealtimeMediaSourceSettings.cpp:
3328         (WebCore::RealtimeMediaSourceSettings::facingMode):
3329         * platform/mediastream/VideoTrackPrivateMediaStream.h:
3330         * rendering/HitTestResult.cpp:
3331         (WebCore::HitTestResult::linkSuggestedFilename):
3332         * rendering/InlineTextBox.cpp:
3333         (WebCore::InlineTextBox::paint):
3334         * rendering/RenderListItem.cpp:
3335         (WebCore::RenderListItem::markerText):
3336         * rendering/RenderText.cpp:
3337         (WebCore::RenderText::previousOffset):
3338         (WebCore::RenderText::nextOffset):
3339         * rendering/RenderTreeAsText.cpp:
3340         (WebCore::RenderTreeAsText::writeRenderObject):
3341         * rendering/TextPainter.cpp:
3342         (WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):
3343         * rendering/style/RenderStyle.cpp:
3344         (WebCore::RenderStyle::textEmphasisMarkString):
3345         * rendering/style/RenderStyle.h:
3346         (WebCore::RenderStyle::initialHyphenationString):
3347         (WebCore::RenderStyle::initialTextEmphasisCustomMark):
3348         (WebCore::RenderStyle::initialContentAltText):
3349         (WebCore::RenderStyle::initialLineGrid):
3350         (WebCore::RenderStyle::initialFlowThread):
3351         (WebCore::RenderStyle::initialRegionThread):
3352         * style/StyleScope.cpp:
3353         (WebCore::Style::Scope::collectActiveStyleSheets):
3354         * svg/SVGElement.cpp:
3355         (WebCore::SVGElement::getPresentationAttribute):
3356         * svg/SVGElement.h:
3357         (WebCore::SVGAttributeHashTranslator::hash):
3358         * svg/SVGUseElement.cpp:
3359         (WebCore::SVGUseElement::transferSizeAttributesToTargetClone):
3360         * svg/animation/SVGSMILElement.cpp:
3361         (WebCore::SVGSMILElement::constructAttributeName):
3362         * testing/MockCDMFactory.cpp:
3363         (WebCore::MockCDMInstance::requestLicense):
3364         * xml/XMLErrors.cpp:
3365         (WebCore::createXHTMLParserErrorHeader):
3366         * xml/XPathStep.cpp:
3367         (WebCore::XPath::nodeMatchesBasicTest):
3368         (WebCore::XPath::Step::nodesInAxis):
3369         * xml/parser/XMLDocumentParserLibxml2.cpp:
3370         (WebCore::XMLDocumentParser::XMLDocumentParser):
3371         (WebCore::handleNamespaceAttributes):
3372         (WebCore::handleElementAttributes):
3373
3374 2017-07-05  Chris Dumez  <cdumez@apple.com>
3375
3376         [iOS] User agent string incorrectly says "iPhone" instead of "iPad" on newer iPads
3377         https://bugs.webkit.org/show_bug.cgi?id=174182
3378         <rdar://problem/32868369>
3379
3380         Reviewed by Tim Horton.
3381
3382         In deviceNameForUserAgent() on iOS, we were forcefully returning "iPhone" if
3383         [UIApplication _isClassic] returns true. Update check to return "iPad" if
3384         [UIApplication _isClassic] returns true but [UIApplication _classMode] returns
3385         UIApplicationSceneClassicModeOriginalPad.
3386
3387         * page/ios/UserAgentIOS.mm:
3388         (WebCore::isClassicPad):
3389         (WebCore::isClassicPhone):
3390         (WebCore::osNameForUserAgent):
3391         (WebCore::deviceNameForUserAgent):
3392         * platform/spi/ios/UIKitSPI.h:
3393
3394 2017-07-05  Yusuke Suzuki  <utatane.tea@gmail.com>
3395
3396         WTF::Thread should have the threads stack bounds.
3397         https://bugs.webkit.org/show_bug.cgi?id=173975
3398
3399         Reviewed by Keith Miller.
3400
3401         When creating WebThread, we first allocate WebCore::ThreadGlobalData in UI thread
3402         and share it with WebThread.
3403         The problem is that WebCore::ThreadGlobalData has CachedResourceRequestInitiators.
3404         It allocates AtomicString, which requires WTFThreadData.
3405
3406         Before this patch, it was OK because WTFThreadData does not touch threading related
3407         things except for ThreadSpecific<>. However, after this patch, it touches
3408         WTF::Thread::current() which requires WTF::initializeThreading().
3409
3410         In this patch, we call WTF::initializeThreading() before allocating WebCore::ThreadGlobalData.
3411         And we also call AtomicString::init() before calling WebCore::ThreadGlobalData since
3412         WebCore::ThreadGlobalData allocates AtomicString.
3413
3414         This fixes crashes in the iOS web threading environment (UIWebView).
3415
3416         * platform/ios/wak/WebCoreThread.mm:
3417         (StartWebThread):
3418
3419 2017-07-05  Myles C. Maxfield  <mmaxfield@apple.com>
3420
3421         CSSFontStyleValue::isItalic seems a bit bogus.
3422         https://bugs.webkit.org/show_bug.cgi?id=174149
3423
3424         Reviewed by Tim Horton.
3425
3426         Simple typo.
3427
3428         Test: editing/execCommand/italicizeByCharacter-normal.html
3429
3430         * css/CSSFontStyleValue.h:
3431
3432 2017-07-05  Brady Eidson  <beidson@apple.com>
3433
3434         Allow navigations in subframes to get a ShouldOpenExternalURLsPolicy of "ShouldAllow".
3435         <rdar://problem/22485589> and https://bugs.webkit.org/show_bug.cgi?id=174178
3436
3437         Reviewed by Alex Christensen.
3438
3439         Test: loader/navigation-policy/should-open-external-urls/subframe-navigated-programatically-by-main-frame.html
3440
3441         This patch introduces a new flag to FrameLoadRequest to track when it is known with certainty that a 
3442         FrameLoadRequest originates from the main frame.
3443         
3444         Later, when calculating the final ShouldOpenExternalURLsPolicy, main frames navigating iframes get to propagate
3445         their permissions to the iframe.
3446         
3447         * bindings/js/CommonVM.cpp:
3448         (WebCore::lexicalFrameFromCommonVM): Helper to grab the current frame associated with the current JS callstack.
3449         * bindings/js/CommonVM.h:
3450
3451         * inspector/InspectorFrontendClientLocal.cpp:
3452         (WebCore::InspectorFrontendClientLocal::openInNewTab):
3453
3454         * inspector/InspectorPageAgent.cpp:
3455         (WebCore::InspectorPageAgent::navigate):
3456
3457         Add the new flag to FrameLoadRequest (and force almost everybody to explicitly include the flag):
3458         * loader/FrameLoadRequest.cpp:
3459         (WebCore::FrameLoadRequest::FrameLoadRequest):
3460         * loader/FrameLoadRequest.h:
3461         (WebCore::FrameLoadRequest::FrameLoadRequest):
3462         (WebCore::FrameLoadRequest::navigationInitiatedByMainFrame):
3463
3464         * loader/FrameLoader.cpp:
3465         (WebCore::FrameLoader::urlSelected):
3466         (WebCore::FrameLoader::loadURLIntoChildFrame):
3467         (WebCore::shouldOpenExternalURLsPolicyToApply): Helper that takes the new flag into account when deciding
3468           what the final ShouldOpenExternalURLsPolicy will be.
3469         (WebCore::applyShouldOpenExternalURLsPolicyToNewDocumentLoader):
3470         (WebCore::FrameLoader::loadURL):
3471         (WebCore::FrameLoader::load):
3472         (WebCore::FrameLoader::loadWithNavigationAction):
3473         (WebCore::FrameLoader::reloadWithOverrideEncoding):
3474         (WebCore::FrameLoader::reload):
3475         (WebCore::FrameLoader::loadPostRequest):
3476         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
3477         (WebCore::FrameLoader::loadDifferentDocumentItem):
3478         (WebCore::createWindow):
3479         (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader): Deleted.
3480         * loader/FrameLoader.h:
3481
3482         * loader/FrameLoaderTypes.h:
3483
3484         * loader/NavigationAction.h:
3485         (WebCore::NavigationAction::navigationInitiatedByMainFrame):
3486         * loader/NavigationScheduler.cpp:
3487         (WebCore::ScheduledNavigation::ScheduledNavigation): Grab the "initiating frame" at the time the 
3488           ScheduledNavigation is created, as it dictates the policy we decide later.
3489         (WebCore::ScheduledNavigation::navigationInitiatedByMainFrame):
3490         (WebCore::NavigationScheduler::scheduleLocationChange):
3491
3492         * page/ContextMenuController.cpp:
3493         (WebCore::openNewWindow):
3494         (WebCore::ContextMenuController::contextMenuItemSelected):
3495
3496         * page/DOMWindow.cpp:
3497         (WebCore::DOMWindow::createWindow):
3498
3499 2017-07-05  Simon Fraser  <simon.fraser@apple.com>
3500
3501         Another build fix, for Mac.
3502
3503         * platform/graphics/cocoa/IOSurface.mm:
3504         (WebCore::IOSurface::surfaceID):
3505
3506 2017-07-05  Simon Fraser  <simon.fraser@apple.com>
3507
3508         Further attempts to fix the iOS public SDK build.
3509
3510         * platform/graphics/cocoa/IOSurface.mm:
3511         (WebCore::IOSurface::surfaceID):
3512         * platform/spi/cocoa/IOSurfaceSPI.h:
3513
3514 2017-07-05  Don Olmstead  <don.olmstead@sony.com>
3515
3516         [WinCairo] Consolidate CMake code related to CURL
3517         https://bugs.webkit.org/show_bug.cgi?id=170860
3518
3519         Reviewed by Alex Christensen.
3520
3521         No new tests. No change in functionality.
3522
3523         * PlatformWinCairo.cmake:
3524         * platform/Curl.cmake: Added.
3525
3526 2017-07-03  Myles C. Maxfield  <mmaxfield@apple.com>
3527
3528         Remove copy of ICU headers from WebKit
3529         https://bugs.webkit.org/show_bug.cgi?id=116407
3530
3531         Reviewed by Alex Christensen.
3532
3533         Use WTF's copy of ICU headers.
3534
3535         No new tests because there is no behavior change.
3536
3537         * Configurations/WebCore.xcconfig:
3538         * icu/unicode/bytestream.h: Removed.
3539         * icu/unicode/localpointer.h: Removed.
3540         * icu/unicode/parseerr.h: Removed.
3541         * icu/unicode/platform.h: Removed.
3542         * icu/unicode/ptypes.h: Removed.
3543         * icu/unicode/putil.h: Removed.
3544         * icu/unicode/rep.h: Removed.
3545         * icu/unicode/std_string.h: Removed.
3546         * icu/unicode/strenum.h: Removed.
3547         * icu/unicode/stringpiece.h: Removed.
3548         * icu/unicode/ubrk.h: Removed.
3549         * icu/unicode/uchar.h: Removed.
3550         * icu/unicode/ucnv.h: Removed.
3551         * icu/unicode/ucnv_err.h: Removed.
3552         * icu/unicode/ucol.h: Removed.
3553         * icu/unicode/uconfig.h: Removed.
3554         * icu/unicode/ucurr.h: Removed.
3555         * icu/unicode/uenum.h: Removed.
3556         * icu/unicode/uiter.h: Removed.
3557         * icu/unicode/uloc.h: Removed.
3558         * icu/unicode/umachine.h: Removed.
3559         * icu/unicode/unistr.h: Removed.
3560         * icu/unicode/unorm.h: Removed.
3561         * icu/unicode/unorm2.h: Removed.
3562         * icu/unicode/uobject.h: Removed.
3563         * icu/unicode/urename.h: Removed.
3564         * icu/unicode/uscript.h: Removed.
3565         * icu/unicode/uset.h: Removed.
3566         * icu/unicode/ustring.h: Removed.
3567         * icu/unicode/utext.h: Removed.
3568         * icu/unicode/utf.h: Removed.
3569         * icu/unicode/utf16.h: Removed.
3570         * icu/unicode/utf8.h: Removed.
3571         * icu/unicode/utf_old.h: Removed.
3572         * icu/unicode/utypes.h: Removed.
3573         * icu/unicode/uvernum.h: Removed.
3574         * icu/unicode/uversion.h: Removed.
3575         * platform/graphics/FontCache.h:
3576         (WebCore::FontDescriptionKey::makeFlagsKey):
3577
3578 2017-07-05  Wenson Hsieh  <wenson_hsieh@apple.com>
3579
3580         When dragging a selection, clearing the selection in dragstart should not crash the web process
3581         https://bugs.webkit.org/show_bug.cgi?id=174142
3582         <rdar://problem/33067501>
3583
3584         Reviewed by Tim Horton.
3585
3586         Currenly, if the page clears the current selection after dragging starts on selected content, the web process
3587         will crash while attempting to write pasteboard data for a nonexistent selection. This patch adds a trivial
3588         check for this case, bailing if no DHTML dragging data was specified by the page during a selection drag and the
3589         selection has been cleared.
3590
3591         Also removes some unused code for estimating the bounds of the current selection. On iOS, dragging was actually
3592         crashing earlier, in this codepath. However, this information isn't even used anymore, since the drag anchor
3593         point is no longer necessary on iOS.
3594
3595         Test: DataInteractionTests.DoNotCrashWhenSelectionIsClearedInDragStart
3596
3597         * page/DragController.cpp:
3598         (WebCore::DragController::startDrag):
3599
3600 2017-07-05  Simon Fraser  <simon.fraser@apple.com>
3601
3602         Try to fix iOS 10.3 public SDK builds.
3603
3604         * platform/spi/cocoa/IOSurfaceSPI.h:
3605
3606 2017-07-05  Zalan Bujtas  <zalan@apple.com>
3607
3608         REGRESSION (r217522): "Show My Relationship" link in familysearch.org does not work.
3609         https://bugs.webkit.org/show_bug.cgi?id=174070
3610         <rdar://problem/32940653>
3611
3612         Reviewed by Simon Fraser.
3613
3614         Decouple in- and out-of-flow computed position values. Now we match blink's implementation on
3615         in-flow values.
3616         This also fixes the flickering content while scrolling on hbr.org.  
3617
3618         Covered by existing test cases.
3619
3620         * css/CSSComputedStyleDeclaration.cpp:
3621         (WebCore::positionOffsetValue):
3622
3623 2017-07-05  Devin Rousso  <drousso@apple.com>
3624
3625         Web Inspector: Allow users to log any tracked canvas context
3626         https://bugs.webkit.org/show_bug.cgi?id=173397
3627         <rdar://problem/33111581>
3628
3629         Reviewed by Joseph Pecoraro.
3630
3631         Tests: inspector/canvas/resolveCanvasContext-2d.html
3632                inspector/canvas/resolveCanvasContext-webgl.html
3633                inspector/canvas/resolveCanvasContext-webgl2.html
3634                inspector/canvas/resolveCanvasContext-webgpu.html
3635
3636         * inspector/InspectorCanvasAgent.h:
3637         * inspector/InspectorCanvasAgent.cpp:
3638         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
3639         (WebCore::contextAsScriptValue):
3640         (WebCore::InspectorCanvasAgent::resolveCanvasContext):
3641
3642 2017-07-05  Emilio Cobos Álvarez  <ecobos@igalia.com>
3643
3644         Style sharing check for fullscreen element seems bogus.
3645         https://bugs.webkit.org/show_bug.cgi?id=160196
3646
3647         Reviewed by Antti Koivisto.
3648
3649         No new tests (no easy way to test this reliably).
3650
3651         * style/StyleSharingResolver.cpp:
3652         (WebCore::Style::SharingResolver::canShareStyleWithElement):
3653
3654 2017-07-05  Simon Fraser  <simon.fraser@apple.com>
3655
3656         Add a logging channel for IOSurface allocations
3657         https://bugs.webkit.org/show_bug.cgi?id=174167
3658
3659         Reviewed by Tim Horton.
3660
3661         Add an "IOSurface" log channel, make IOSurface TextStream-loggable, and log cached
3662         and new IOSurface allocations. Do some namespace-related cleanup.
3663
3664         * platform/Logging.h:
3665         * platform/graphics/cocoa/IOSurface.h:
3666         * platform/graphics/cocoa/IOSurface.mm:
3667         (WebCore::WebCore::IOSurface::create):
3668         (WebCore::WebCore::IOSurface::surfaceID):
3669         (WebCore::operator<<):
3670
3671 2017-07-05  Antti Koivisto  <antti@apple.com>
3672
3673         Low memory notification shouldn't cause style recalc
3674         https://bugs.webkit.org/show_bug.cgi?id=173574
3675         <rdar://problem/32616997>
3676
3677         Reviewed by Andreas Kling.
3678
3679         Patch mostly by Myles.
3680
3681         When we receive a low memory warning, we clear the style resolver. Previously, we were using
3682         this as an opportunity to also purge the CSSFontSelector. However, purging the font selector
3683         is wasteful, since the exact same set of CSSFontFace objects will be recreated as soon as the
3684         CSSFontSelector is recreated. It's also harmful because this purge operation causes fonts to
3685         be removed from the document's working set, and therefore triggers a relayout. Instead, this
3686         call should be softened to only delete any transitory caches the CSSFontSelector owns.
3687
3688         We can simply delay the rebuild of the CSSFontSelector to
3689         StyleResolver::appendAuthorStyleSheets(), when it's really needed. This way, we can sidestep
3690         this whole problem.
3691
3692         There's also an added benefit: Now, buildStarted() doesn't have to be idempotent, so we can
3693         enforce a stricter calling sequence with ASSERT()s.
3694
3695         * css/CSSFontFaceSet.cpp:
3696         (WebCore::CSSFontFaceSet::emptyCaches):
3697         * css/CSSFontFaceSet.h:
3698         * css/CSSFontSelector.cpp:
3699         (WebCore::CSSFontSelector::emptyCaches):
3700
3701             Add a separate function to clear font selector caches.
3702
3703         (WebCore::CSSFontSelector::buildStarted):
3704         (WebCore::CSSFontSelector::buildCompleted):
3705         (WebCore::CSSFontSelector::addFontFaceRule):
3706         (WebCore::CSSFontSelector::fontModified):
3707
3708             No need to invalidate while building.
3709
3710         (WebCore::CSSFontSelector::fontRangesForFamily):
3711         * css/CSSFontSelector.h:
3712         * css/StyleResolver.cpp:
3713         (WebCore::StyleResolver::StyleResolver):
3714         (WebCore::StyleResolver::addCurrentSVGFontFaceRules):
3715
3716             Factor into a function from the constructor.
3717
3718         (WebCore::StyleResolver::appendAuthorStyleSheets):
3719
3720             Font selector build is now started and finished by StyleScope.
3721
3722         * css/StyleResolver.h:
3723         * dom/Document.cpp:
3724         (WebCore::Document::resolveStyle):
3725
3726             Call FrameView::styleDidChange() to update any custom scrollbars.
3727             This bug was hidden by spurious style recalcs, tested by fast/css/scrollbar-dynamic-style-change.html
3728
3729         (WebCore::Document::userAgentShadowTreeStyleResolver):
3730         (WebCore::Document::didClearStyleResolver):
3731
3732             Don't start the font selector rebuild after clearing the resolver. It would cause style recalc trashing.
3733             Instead the build starts when the new resolver is constructed.
3734
3735         * page/MemoryRelease.cpp:
3736         (WebCore::releaseCriticalMemory):
3737
3738             Release font selector caches.
3739
3740         * style/StyleScope.cpp:
3741         (WebCore::Style::Scope::resolver):
3742
3743 2017-07-05  Brent Fulgham  <bfulgham@apple.com>
3744
3745         [WK2] Prevent ResourceLoadStatistics from triggering a cascade of read/write events
3746         https://bugs.webkit.org/show_bug.cgi?id=174062\
3747         <rdar://problem/33086744>
3748
3749         Reviewed by Chris Dumez.
3750
3751         Treat DISPATCH_VNODE_DELETE, DISPATCH_VNODE_RENAME, and DISPATCH_VNODE_REVOKE as equivalent
3752         "file is unavailable" events, and act as though the file was deleted. Don't listen for
3753         DISPATCH_VNODE_EXTEND, since we always get a DISPATCH_VNODE_WRITE as well, and we only
3754         want to read once.
3755
3756         Finally, add some logging to support future investigations.
3757
3758         * platform/FileMonitor.h:
3759         (WebCore::FileMonitor::platformMonitor): Expose dispatch_source_t for logging purposes.
3760         * platform/cocoa/FileMonitorCocoa.mm:
3761         (WebCore::FileMonitor::startMonitoring): Add logging.
3762         (WebCore::FileMonitor::stopMonitoring): Ditto.
3763
3764 2017-07-05  Jonathan Bedard  <jbedard@apple.com>
3765
3766         Add WebKitPrivateFrameworkStubs for iOS 11
3767         https://bugs.webkit.org/show_bug.cgi?id=173988
3768
3769         Reviewed by David Kilzer.
3770
3771         * Configurations/WebCore.xcconfig: iphoneos and iphonesimulator should use the
3772         same directory for private framework stubs.
3773
3774 2017-07-05  Emilio Cobos Álvarez  <ecobos@igalia.com>
3775
3776         Don't resolve an extra computed style for getComputedStyle in a display: none subtree.
3777         https://bugs.webkit.org/show_bug.cgi?id=174145
3778
3779         Before this, we were also resolving the first ancestor's style as
3780         inheriting from itself, which felt pretty wrong (though I think it's
3781         not observable).
3782
3783         Reviewed by Antti Koivisto.
3784
3785         No new tests (non-observable behavior).
3786
3787         * dom/Element.cpp:
3788         (WebCore::Element::resolveComputedStyle):
3789
3790 2017-07-05  Frederic Wang  <fwang@igalia.com>
3791
3792         Move ScrolledContentsLayer property to ScrollingStateScrollingNode
3793         https://bugs.webkit.org/show_bug.cgi?id=174134
3794
3795         Reviewed by Simon Fraser.
3796
3797         ScrollingStateFrameScrollingNode and ScrollingStateOverflowScrollingNode both use a
3798         ScrolledContentsLayer property for the same purpose. This commit moves that property into
3799         their parent class ScrollingStateScrollingNode, so that more code is shared between the two
3800         classes. This will also help the refactoring in bug 174130.
3801
3802         No new tests, only dumped tree may change a bit.
3803
3804         * page/scrolling/ScrollingStateFrameScrollingNode.cpp: Remove scrolled contents layer.
3805         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
3806         (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
3807         (WebCore::ScrollingStateFrameScrollingNode::setScrolledContentsLayer): Deleted.
3808         * page/scrolling/ScrollingStateFrameScrollingNode.h: Ditto.
3809         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp: Ditto.
3810         (WebCore::ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode):
3811         (WebCore::ScrollingStateOverflowScrollingNode::dumpProperties):
3812         (WebCore::ScrollingStateOverflowScrollingNode::setScrolledContentsLayer): Deleted.
3813         * page/scrolling/ScrollingStateOverflowScrollingNode.h: Ditto.
3814         (): Deleted.
3815         (WebCore::ScrollingStateOverflowScrollingNode::scrolledContentsLayer): Deleted.
3816         * page/scrolling/ScrollingStateScrollingNode.cpp: Add scrolled contents layer.
3817         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
3818         (WebCore::ScrollingStateScrollingNode::setScrolledContentsLayer):
3819         (WebCore::ScrollingStateScrollingNode::dumpProperties): Use the label from the overflow class
3820         which is different from the frame class. The dumping order may change a bit too.
3821         * page/scrolling/ScrollingStateScrollingNode.h: Add ScrolledContentsLayer to the enum and
3822         scrolled contents layer.
3823         (WebCore::ScrollingStateScrollingNode::scrolledContentsLayer):
3824         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3825         (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren): Adjust enum value
3826         to use ScrollingStateScrollingNode::ScrolledContentsLayer.
3827
3828 2017-07-05  Emilio Cobos Álvarez  <ecobos@igalia.com>
3829
3830         ProcessingInstruction::clearExistingCachedSheet doesn't really exist.
3831         https://bugs.webkit.org/show_bug.cgi?id=174146
3832
3833         Reviewed by Chris Dumez.
3834
3835         No new tests (no functionality change).
3836
3837         * dom/ProcessingInstruction.h: Remove dead declaration.
3838
3839 2017-07-05  Matt Lewis  <jlewis3@apple.com>
3840
3841         Unreviewed, rolling out r219128.
3842
3843         Spoke with engineer who originally submitted, Patch for APi
3844         test to follow.
3845
3846         Reverted changeset:
3847
3848         "Unreviewed, rolling out r219070."
3849         https://bugs.webkit.org/show_bug.cgi?id=174082
3850         http://trac.webkit.org/changeset/219128
3851
3852 2017-07-05  Matt Lewis  <jlewis3@apple.com>
3853
3854         Unreviewed, rolling out r219070.
3855
3856         This revision caused consistent failures of the API test
3857         UIPasteboardTests.DoNotPastePlainTextAsURL on iOS.
3858
3859         Reverted changeset:
3860
3861         "Pasting single words copied to UIPasteboard inserts URLs in
3862         editable areas"
3863         https://bugs.webkit.org/show_bug.cgi?id=174082
3864         http://trac.webkit.org/changeset/219070
3865
3866 2017-07-05  Youenn Fablet  <youenn@apple.com>
3867
3868         Receiving tracks should be ended when peer connection is being closed
3869         https://bugs.webkit.org/show_bug.cgi?id=174109
3870
3871         Reviewed by Eric Carlson.
3872
3873         Test: webrtc/peer-connection-track-end.html
3874
3875         As per https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close, tracks should be ended when peer connection is closed.
3876         Also updating transceiver stopped state.
3877
3878         * Modules/mediastream/RTCPeerConnection.cpp:
3879         (WebCore::RTCPeerConnection::doClose):
3880         * Modules/mediastream/RTCRtpReceiver.cpp:
3881         (WebCore::RTCRtpReceiver::stop):
3882         * Modules/mediastream/RTCRtpReceiver.h:
3883
3884 2017-07-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
3885
3886         Unreviewed, review follow-up after r218961
3887
3888         * platform/graphics/BitmapImage.cpp:
3889         (WebCore::BitmapImage::updateFromSettings):
3890
3891 2017-07-04  Antti Koivisto  <antti@apple.com>
3892
3893         RenderThemeCocoa::mediaControlsFormattedStringForDuration is leaking NSDateComponentsFormatters
3894         https://bugs.webkit.org/show_bug.cgi?id=174138
3895
3896         Reviewed by Ryosuke Niwa.
3897
3898         Saw a random spin here during media playback. Looks like we are leaking.
3899
3900         * rendering/RenderThemeCocoa.h:
3901         * rendering/RenderThemeCocoa.mm:
3902         (WebCore::RenderThemeCocoa::mediaControlsFormattedStringForDuration):
3903
3904             Reuse NSDateComponentsFormatter.
3905
3906 2017-07-04  Antti Koivisto  <antti@apple.com>
3907
3908         FrameView should not set RenderView::logicalWidth directly for printing
3909         https://bugs.webkit.org/show_bug.cgi?id=174135
3910
3911         Reviewed by Zalan Bujtas.
3912
3913         Renderer logicalWidth should be set by layout. Direct override by RenderView when printing means
3914         that we don't layout children in all cases when the width changes. This is currently mostly hidden
3915         by spurious layouts but causes problems when trying to fix other things that reduces those.
3916
3917         * page/FrameView.cpp:
3918         (WebCore::FrameView::forceLayoutForPagination):
3919
3920             Instead of calling setLogicalWidth directly call the new setPageLogicalSize that sets both the width
3921             and the height uniformly.
3922
3923         * rendering/RenderView.cpp:
3924         (WebCore::RenderView::updateLogicalWidth):
3925
3926             Use pageLogicalSize->width() in printing state instead of skipping the logical width update entirely.
3927             This ensures that the layout will progress to children when the page logical width changes.
3928
3929         (WebCore::RenderView::initializeLayoutState):
3930         (WebCore::RenderView::layout):
3931         (WebCore::RenderView::pageOrViewLogicalHeight):
3932         (WebCore::RenderView::setPageLogicalSize):
3933         * rendering/RenderView.h:
3934
3935             Replace the existing m_pageLogicalHeight with std::optional m_pageLogicalSize.
3936
3937 2017-07-04  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3938
3939         [EME] Solve a couple of compiler warnings
3940         https://bugs.webkit.org/show_bug.cgi?id=174020
3941
3942         Reviewed by Michael Catanzaro.
3943
3944         * Modules/encryptedmedia/CDM.cpp:
3945         (WebCore::CDM::isPersistentType): Added default return and
3946         assertion.
3947         * Modules/encryptedmedia/MediaKeySession.cpp:
3948         (WebCore::MediaKeySession::updateKeyStatuses): This warning was
3949         already solved but I think adding an assertion for the default
3950         case can help catch errors in the future.
3951
3952 2017-07-04  Joseph Pecoraro  <pecoraro@apple.com>
3953
3954         Cleanup some StringBuilder use
3955         https://bugs.webkit.org/show_bug.cgi?id=174118
3956
3957         Reviewed by Andreas Kling.
3958
3959         * Modules/mediastream/PeerConnectionBackend.cpp:
3960         (WebCore::filterICECandidate):
3961         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
3962         * contentextensions/ContentExtension.cpp:
3963         (WebCore::ContentExtensions::ContentExtension::compileGlobalDisplayNoneStyleSheet):
3964         * css/CSSFontStyleRangeValue.cpp:
3965         (WebCore::CSSFontStyleRangeValue::customCSSText):
3966         * css/CSSFontStyleValue.cpp:
3967         (WebCore::CSSFontStyleValue::customCSSText):
3968         * css/CSSGridAutoRepeatValue.cpp:
3969         (WebCore::CSSGridAutoRepeatValue::customCSSText):
3970         * css/parser/CSSParser.cpp:
3971         (WebCore::CSSParser::parseFontFaceDescriptor):
3972         * dom/Attr.cpp:
3973         * html/canvas/WebGPURenderingContext.cpp:
3974         * html/parser/HTMLParserIdioms.cpp:
3975         * platform/network/ParsedContentType.cpp:
3976         * platform/network/cocoa/CookieCocoa.mm:
3977         * platform/text/mac/LocaleMac.mm:
3978         * xml/XMLHttpRequest.cpp:
3979         (WebCore::XMLHttpRequest::getAllResponseHeaders):
3980
3981 2017-07-03  Andreas Kling  <akling@apple.com>
3982
3983         Null RenderLayer* deref in FrameView::adjustTiledBackingCoverage()
3984         https://bugs.webkit.org/show_bug.cgi?id=174106
3985         <rdar://problem/33085838>
3986
3987         Reviewed by Tim Horton.
3988
3989         I haven't been able to reproduce this crash locally, but I have seen
3990         video of someone who can, so here's a null check for the RenderView::layer()
3991         which could be null if we're called between RenderView construction
3992         and the first callback to RenderLayerModelObject::styleDidChange().
3993
3994         * page/FrameView.cpp:
3995         (WebCore::FrameView::adjustTiledBackingCoverage):
3996
3997 2017-07-03  Matt Rajca  <mrajca@apple.com>
3998
3999         Add/remove appropriate media element behavior restrictions when updateWebsitePolicies is called
4000         https://bugs.webkit.org/show_bug.cgi?id=174103
4001
4002         Reviewed by Alex Christensen.
4003
4004         Test: Added API test.
4005
4006         Added support for updating rate change behavior restrictions on media elements that have already
4007         been created.
4008
4009         * html/HTMLMediaElement.cpp:
4010         (WebCore::HTMLMediaElement::updateRateChangeRestrictions):
4011         * html/HTMLMediaElement.h:
4012         * page/Page.cpp:
4013         (WebCore::Page::updateMediaElementRateChangeRestrictions):
4014         * page/Page.h:
4015
4016 2017-07-03  Matt Lewis  <jl