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