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