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