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