[WebIDL] Remove more unnecessary uses of the preprocessor in idl files
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2017-07-03  Sam Weinig  <sam@webkit.org>
2
3         [WebIDL] Remove more unnecessary uses of the preprocessor in idl files
4         https://bugs.webkit.org/show_bug.cgi?id=174083
5
6         Reviewed by Alex Christensen.
7
8         Purge as much preprocessor use as possible.
9
10         * Configurations/FeatureDefines.xcconfig:
11         Add ENABLE_NAVIGATOR_STANDALONE.
12
13         * animation/Animatable.idl:
14         Remove unnecessary check for LANGUAGE_OBJECTIVE_C. We no longer generate those bindings.
15
16         * html/MediaError.idl:
17         Use [Conditional] rather than the preprocessor.
18
19         * page/Navigator.idl:
20         Use [Conditional] rather than the preprocessor with the new ENABLE_NAVIGATOR_STANDALONE.
21
22         * testing/Internals.cpp:
23         * testing/Internals.h:
24         Expose setQuickLookPassword on all platforms, as it doesn't hurt since it is only for testing,
25         but make the implementation do nothing.
26
27         * testing/Internals.idl:
28         Use [Conditional] rather than the preprocessor.
29
30 2017-07-03  Daewoong Jang  <daewoong.jang@navercorp.com>
31
32         [Curl] Fix compilation errors
33         https://bugs.webkit.org/show_bug.cgi?id=174085
34
35         Reviewed by Alex Christensen.
36
37         * platform/network/curl/CurlContext.cpp:
38         (WebCore::CurlContext::initCookieSession):
39         * platform/network/curl/CurlContext.h:
40
41 2017-07-03  Youenn Fablet  <youenn@apple.com>
42
43         WebAudioSourceProviderAVFObjC should not reconfigure for each data call
44         https://bugs.webkit.org/show_bug.cgi?id=174101
45
46         Reviewed by Eric Carlson.
47
48         Covered by manual testing, in particular
49         https://webrtc.github.io/samples/src/content/peerconnection/webaudio-output/
50         and https://webrtc.github.io/samples/src/content/getusermedia/volume/.
51         Also improved LayoutTests web audio peer connection tests to make them more robust.
52
53         Before the patch, reconfiguration of the web audio provider was happening for every audioSamplesAvailable call.
54         It is now happening only when the format of the audio samples is changing.
55         Changed some member fields from uinque_ptr to optional as a minor improvement.
56
57         * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:
58         * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
59         (WebCore::WebAudioSourceProviderAVFObjC::provideInput):
60         (WebCore::WebAudioSourceProviderAVFObjC::prepare):
61         (WebCore::WebAudioSourceProviderAVFObjC::unprepare):
62         (WebCore::WebAudioSourceProviderAVFObjC::audioSamplesAvailable):
63
64 2017-06-30  Alex Christensen  <achristensen@webkit.org>
65
66         Stop using dispatch_async in ResourceHandleCFURLConnectionDelegateWithOperationQueue
67         https://bugs.webkit.org/show_bug.cgi?id=174059
68
69         Reviewed by Andy Estes.
70
71         Use dispatch_async_f and callOnMainThread instead.
72         No change in behavior.
73         This will allow me to use this code on Windows.
74
75         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
76         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
77         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
78         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
79         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
80         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
81         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
82         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
83         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
84         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
85
86 2017-07-03  Andy Estes  <aestes@apple.com>
87
88         [Xcode] Add an experimental setting to build with ccache
89         https://bugs.webkit.org/show_bug.cgi?id=173875
90
91         Reviewed by Tim Horton.
92
93         * Configurations/DebugRelease.xcconfig: Included ccache.xcconfig.
94
95 2017-07-02  Ryosuke Niwa  <rniwa@webkit.org>
96
97         REGRESSION(r218910): Crash inside textMarkerDataForFirstPositionInTextControl
98         https://bugs.webkit.org/show_bug.cgi?id=174077
99         <rdar://problem/33083972>
100
101         Reviewed by Chris Fleizach.
102
103         The bug was caused by textMarkerDataForFirstPositionInTextControl assuming that
104         there is always a root editable element (a.k.a. editing host) in the text control.
105         When the text control is readonly or disabled, this is not the case.
106
107         Fixed the bug by adding an early exit when there is no editing host.
108
109         Test: accessibility/mac/input-type-change-crash.html
110
111         * accessibility/AXObjectCache.cpp:
112         (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):
113
114 2017-07-03  Devin Rousso  <drousso@apple.com>
115
116         Web Inspector: Support listing WebGL2 and WebGPU contexts
117         https://bugs.webkit.org/show_bug.cgi?id=173396
118
119         Reviewed by Joseph Pecoraro.
120
121         Tests: inspector/canvas/create-context-2d.html
122                inspector/canvas/create-context-webgl.html
123                inspector/canvas/create-context-webgl2.html
124                inspector/canvas/create-context-webgpu.html
125
126         Split "inspector/canvas/create-canvas-contexts.html" into a test for each context type.
127
128         * html/HTMLCanvasElement.cpp:
129         (WebCore::HTMLCanvasElement::getContextWebGPU):
130         * inspector/InspectorCanvasAgent.cpp:
131         (WebCore::InspectorCanvasAgent::buildObjectForCanvas):
132
133 2017-07-03  Alex Christensen  <achristensen@webkit.org>
134
135         REGRESSION(r215096) Queries of URLs with non-special schemes should not percent-encode single quotes
136         https://bugs.webkit.org/show_bug.cgi?id=174051
137
138         Reviewed by Tim Horton.
139
140         In r215096 I added ' to the set of characters to be percent-encoded in queries,
141         but for interoperability and compatibility we need to do this only for special schemes, like http.
142
143         Covered by new API tests.
144
145         * platform/URLParser.cpp:
146         (WebCore::isC0Control):
147         (WebCore::shouldPercentEncodeQueryByte):
148         (WebCore::URLParser::utf8QueryEncode):
149         (WebCore::URLParser::encodeQuery):
150
151 2017-07-03  Chris Fleizach  <cfleizach@apple.com>
152
153         AX: role="none" (or presentation) does not work on iframes
154         https://bugs.webkit.org/show_bug.cgi?id=173930
155         <rdar://problem/33034347>
156
157         Reviewed by Ryosuke Niwa.
158
159         Support setting a presentational role on an iframe so that the AXWebArea disappears from the hierarchy.
160         Accomplish this by adding children for attachment and scroll view elements the way other children are added.
161         That is, only add the non-ignored children directly (which means move the addChild logic into AccessibilityObject.)
162
163         Test: accessibility/presentation-role-iframe.html
164
165         * accessibility/AccessibilityNodeObject.cpp:
166         (WebCore::AccessibilityNodeObject::AccessibilityNodeObject):
167         (WebCore::AccessibilityNodeObject::insertChild): Deleted.
168         (WebCore::AccessibilityNodeObject::addChild): Deleted.
169         * accessibility/AccessibilityNodeObject.h:
170         * accessibility/AccessibilityObject.cpp:
171         (WebCore::AccessibilityObject::AccessibilityObject):
172         (WebCore::AccessibilityObject::insertChild):
173         (WebCore::AccessibilityObject::addChild):
174         (WebCore::nodeHasPresentationRole):
175         * accessibility/AccessibilityObject.h:
176         (WebCore::AccessibilityObject::addChild): Deleted.
177         (WebCore::AccessibilityObject::insertChild): Deleted.
178         * accessibility/AccessibilityRenderObject.cpp:
179         (WebCore::webAreaIsPresentational):
180         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
181         (WebCore::AccessibilityRenderObject::addAttachmentChildren):
182         * accessibility/AccessibilityScrollView.cpp:
183         (WebCore::AccessibilityScrollView::addChildren):
184
185 2017-07-03  Matt Lewis  <jlewis3@apple.com>
186
187         Unreviewed, rolling out r219024.
188
189         This patch cause 3 didferent test to fail.
190
191         Reverted changeset:
192
193         "REGRESSION(r215096) Queries of URLs with non-special schemes
194         should not percent-encode single quotes"
195         https://bugs.webkit.org/show_bug.cgi?id=174051
196         http://trac.webkit.org/changeset/219024
197
198 2017-07-03  Wenson Hsieh  <wenson_hsieh@apple.com>
199
200         Pasting single words copied to UIPasteboard inserts URLs in editable areas
201         https://bugs.webkit.org/show_bug.cgi?id=174082
202         <rdar://problem/33046992>
203
204         Reviewed by Tim Horton.
205
206         Currently, our heuristics for coercing plain text to URLs when reading URLs off of the UIPasteboard allows URLs
207         to be created as long as -[UIPasteboard valuesForPasteboardType:inItemSet:] returns a non-null NSURL. However,
208         UIPasteboard automatically coerces any NSString into an NSURL if it initializes an NSURL via +URLWithString:.
209         Thus, single-word strings such as "hello" that are written to the pasteboard as "public.utf8-plain-text" can
210         be read back as NSURLs for "public.url". This currently causes bugs in shipping software: e.g. copying and
211         pasting a single word from an editable input or textarea and pasting into a rich contenteditable area using
212         WebKit1 inserts a link. However, when combined with another change in WebKit that attempts to read "public.url"
213         before "public.text" when reading plain text from the pasteboard, this now also affects pasting in plain text
214         areas, where pasted plain-text strings that are not URLs will paste as URL-encoded strings anyways (for
215         instance, replacing "[hello]" with "%5Bhello%5D").
216
217         To fix this, and existing issues with pasting single words in contenteditables, we make
218         PlatformPasteboard::readString and PlatformPasteboard::readURL only accept a coerced NSURL as an URL if it also
219         parses as a valid URL in WebKit (otherwise, we return an empty string).
220
221         Tests:
222             UIPasteboardTests.DoNotPastePlainTextAsURL
223             UIPasteboardTests.PastePlainTextAsURL
224             UIPasteboardTests.PasteURLWithPlainTextAsURL
225
226         * platform/PlatformPasteboard.h:
227         * platform/ios/AbstractPasteboard.h:
228         * platform/ios/PlatformPasteboardIOS.mm:
229         (WebCore::PlatformPasteboard::allowReadingURLAtIndex):
230
231         Allow an URL to be read if either (1) an URL was explicitly specified in the UIPasteboard, or (2) the "proposed"
232         URL returned from -valuesForPasteboardType: is valid.
233
234         (WebCore::PlatformPasteboard::readString):
235         (WebCore::PlatformPasteboard::readURL):
236
237         Consult allowReadingURLAtIndex here (in the case of ::readString, only if the given pasteboard type is
238         "public.url").
239
240         * platform/ios/WebItemProviderPasteboard.h:
241         * platform/ios/WebItemProviderPasteboard.mm:
242         (-[WebItemProviderPasteboard itemProviders]):
243         (-[WebItemProviderPasteboard setItemProviders:]):
244
245 2017-07-03  Zan Dobersek  <zdobersek@igalia.com>
246
247         [GCrypt] Implement CryptoKeyEC SPKI exports
248         https://bugs.webkit.org/show_bug.cgi?id=173646
249
250         Reviewed by Jiewen Tan.
251
252         No new tests -- affected tests are now passing and are unskipped.
253
254         Implement libgcrypt-based support for SPKI exports of EC keys.
255
256         Initially, the ECParameters structure is created so that it will be later embedded
257         into the SubjectPublicKeyInfo structure. First the root element of this structure
258         is written into, specifying namedCurve as the chosen member (even if other choices
259         are not really available). We then write out the object identifier into this
260         namedCurve member that properly represents this key's curve type.
261
262         The SubjectPublicKeyInfo structure is created next. We write out id-ecPublicKey
263         identifier as the chosen algorithm identifier. Web Crypto specification demands
264         that the id-ecDH identifier is used in case of ECDH keys, but no existing test in
265         the W3C test suite expects this, so this should be revisited later. Data of the
266         previously-constructed ECParameters structure is written out into the
267         AlgorithmIdentifier's parameters member.
268
269         The `q` MPI data is then retrieved. Its size is validated, as well as the first
270         byte of data in order to ensure the MPI represents an uncompressed EC point.
271         The data is then written into the subjectPublicKey member.
272
273         Finally the encoded SubjectPublicKeyInfo structure data is extracted and returned
274         from the platformExportSpki() function, completion the export operation.
275
276         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
277         (WebCore::curveIdentifier):
278         (WebCore::CryptoKeyEC::platformExportSpki):
279
280 2017-07-02  Sam Weinig  <sam@webkit.org>
281
282         [WebIDL] Remove special casing for RegExp which is no longer required by the spec
283         https://bugs.webkit.org/show_bug.cgi?id=174025
284
285         Reviewed by Chris Dumez.
286
287         * bindings/scripts/CodeGeneratorJS.pm:
288         (GenerateDictionaryImplementationContent):
289         (GenerateOverloadDispatcher):
290         Remove special casing.
291
292         * bindings/scripts/IDLParser.pm:
293         (parseNonAnyType):
294         Remove parsing of RegExp.
295
296         * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
297         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
298         * bindings/scripts/test/JS/JSTestObj.cpp:
299         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
300         * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
301         Update test results.
302
303 2017-07-02  Youenn Fablet  <youenn@apple.com>
304
305         RealtimeOutgoingVideoSource should pass frame timestamp
306         https://bugs.webkit.org/show_bug.cgi?id=174055
307
308         Reviewed by Eric Carlson.
309
310         Covered by manual testing since this only affects video encoding quality.
311
312         * platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:
313         (WebCore::RealtimeOutgoingVideoSource::sendFrame):
314
315 2017-07-01  Dan Bernstein  <mitz@apple.com>
316
317         <rdar://problem/33096441> r219055 broke non-iOS builds.
318
319         * platform/graphics/cocoa/FontCacheCoreText.cpp:
320         (WebCore::lookupFallbackFont):
321
322 2017-07-01  Dan Bernstein  <mitz@apple.com>
323
324         [iOS] Remove code only needed when building for iOS 9.x
325         https://bugs.webkit.org/show_bug.cgi?id=174068
326
327         Reviewed by Tim Horton.
328
329         * Configurations/FeatureDefines.xcconfig:
330         * editing/cocoa/DataDetection.mm:
331         (WebCore::DataDetection::isDataDetectorLink):
332         (WebCore::DataDetection::shouldCancelDefaultAction):
333         (WebCore::constructURLStringForResult):
334         (WebCore::DataDetection::detectContentInRange):
335         * page/cocoa/ResourceUsageThreadCocoa.mm:
336         (WebCore::vmPageSize):
337         * platform/cocoa/DataDetectorsCoreSoftLink.h:
338         * platform/cocoa/DataDetectorsCoreSoftLink.mm:
339         * platform/graphics/FontPlatformData.cpp:
340         * platform/graphics/FontPlatformData.h:
341         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
342         (layerContentsFormat):
343         (PlatformCALayerCocoa::updateContentsFormat):
344         (PlatformCALayerCocoa::backingStoreBytesPerPixel):
345         * platform/graphics/cg/GraphicsContextCG.cpp:
346         (WebCore::extendedSRGBColorSpaceRef):
347         * platform/graphics/cg/PDFDocumentImage.cpp:
348         (WebCore::PDFDocumentImage::drawPDFPage):
349         * platform/graphics/cocoa/FontCacheCoreText.cpp:
350         (WebCore::lookupFallbackFont):
351         * platform/graphics/cocoa/FontCocoa.mm:
352         (WebCore::Font::variantCapsSupportsCharacterForSynthesis):
353         (WebCore::Font::platformWidthForGlyph):
354         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
355         (WebCore::FontPlatformData::FontPlatformData):
356         (WebCore::FontPlatformData::ctFont):
357         * platform/graphics/cocoa/IOSurface.mm:
358         (WebCore::IOSurface::sinkIntoImage):
359         * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
360         (WebCore::WebCoreDecompressionSession::setTimebase):
361         * platform/graphics/ios/FontCacheIOS.mm:
362         (WebCore::systemFontModificationAttributes):
363         (WebCore::systemFontDescriptor):
364         * platform/graphics/mac/FontCustomPlatformData.cpp:
365         (WebCore::FontCustomPlatformData::supportsFormat):
366         * platform/ios/LegacyTileGridTile.mm:
367         (WebCore::LegacyTileGridTile::LegacyTileGridTile):
368         * platform/ios/PlatformScreenIOS.mm:
369         (WebCore::screenSupportsExtendedColor):
370         * platform/ios/RemoteCommandListenerIOS.mm:
371         (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS):
372         (WebCore::RemoteCommandListenerIOS::~RemoteCommandListenerIOS):
373         (WebCore::RemoteCommandListenerIOS::updateSupportedCommands):
374         * platform/spi/cf/CFNetworkSPI.h:
375         * platform/spi/cg/CoreGraphicsSPI.h:
376         * platform/spi/cocoa/DataDetectorsCoreSPI.h:
377         * platform/spi/cocoa/QuartzCoreSPI.h:
378         * platform/spi/mac/AVFoundationSPI.h:
379
380 2017-07-01  Myles C. Maxfield  <mmaxfield@apple.com>
381
382         REGRESSION(r218371): Reeder's default font is Times instead of San Francisco
383         https://bugs.webkit.org/show_bug.cgi?id=173617
384         <rdar://problem/32969819>
385
386         Reviewed by Simon Fraser.
387
388         On systems where USE_PLATFORM_SYSTEM_FALLBACK_LIST is set to true, the code in
389         platformFontWithFamilySpecialCase() is still used when @font-face blocks specify
390         src:local(system-ui), which made the assertion erroneously fire.
391
392         Unfortunately, our architecture is such that an @font-face block represents a
393         single entry in the font-family fallback list, which means it would be quite
394         difficult to make local(system-ui) in an @font-face block expand at the level
395         of the font cascade. So, this patch simply reverts to the previous behavior for
396         local(system-ui) (which doesn't include the entire Core Text cascade list).
397         This means that "font-family: system-ui" and "src: local(system-ui)" have
398         different behavior, which is undesirable, but architecturally difficult to
399         solve. I've added some FIXMEs to the code in the relevant places and filed
400         https://bugs.webkit.org/show_bug.cgi?id=174023.
401
402         Test: fast/text/font-face-local-system.html
403
404         * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
405         (WebCore::FontCascadeDescription::effectiveFamilyAt):
406         * platform/graphics/ios/FontCacheIOS.mm:
407         (WebCore::systemFontDescriptor):
408         (WebCore::platformFontWithFamilySpecialCase):
409         * platform/graphics/mac/FontCacheMac.mm:
410         (WebCore::platformFontWithFamilySpecialCase):
411
412 2017-07-01  Ryosuke Niwa  <rniwa@webkit.org>
413
414         Frame.h doesn't need to include FrameLoader.h, IntRect.h, and NavigationScheduler.h
415         https://bugs.webkit.org/show_bug.cgi?id=174004
416
417         Reviewed by Simon Fraser.
418
419         Made FrameLoader and NavigationScheduler UniqueRef in Frame so that we can forward declare them,
420         and forward declared IntPoint and IntRect to avoid including FrameLoader.h, IntRect.h,
421         and NavigationScheduler.h in Frame.h
422
423         * Modules/mediastream/MediaStream.cpp:
424         * Modules/webaudio/AudioContext.cpp:
425         * Modules/websockets/WebSocket.cpp:
426         (WebCore::WebSocket::connect): Avoid calling loader().mixedContentChecker().canRunInsecureContent(~)
427         on a nullptr even though this used to work because we weren't de-referencing it.
428         * bindings/js/ScriptController.cpp:
429         * dom/Document.cpp:
430         * dom/EventDispatcher.cpp:
431         * editing/Editor.cpp:
432         * editing/cocoa/EditorCocoa.mm:
433         * editing/ios/EditorIOS.mm:
434         * editing/mac/EditorMac.mm:
435         * history/CachedPage.cpp:
436         * html/HTMLObjectElement.cpp:
437         * html/parser/HTMLDocumentParser.cpp:
438         (WebCore::DocumentLoader::~DocumentLoader): Check !isLoading() before accessing frameLoader to avoid
439         accessing m_frame->loader() inside ~FrameLoader.
440         * html/parser/XSSAuditor.cpp:
441         * html/parser/XSSAuditorDelegate.cpp:
442         * inspector/InspectorInstrumentation.h:
443         * loader/CrossOriginPreflightChecker.cpp:
444         * loader/FrameLoader.cpp:
445         (WebCore::FrameLoader::setOpener): Avoid accessing this FrameLoader via m_opener->loader() when it's
446         this FrameLoader inside ~FrameLoader since UniqueRef<FrameLoader> is clears itself before calling
447         the destructor of FrameLoader.
448         * loader/ImageLoader.cpp:
449         * loader/LinkLoader.cpp:
450         * loader/SubframeLoader.cpp:
451         * loader/appcache/ApplicationCacheGroup.cpp:
452         * loader/appcache/DOMApplicationCache.cpp:
453         * mathml/MathMLElement.cpp:
454         * page/DOMWindow.cpp:
455         * page/Frame.cpp:
456         (WebCore::Frame::Frame):
457         (WebCore::Frame::init): Moved here from Frame.h
458         (WebCore::Frame::setDocument):
459         * page/Frame.h:
460         (WebCore::Frame::loader):
461         (WebCore::Frame::navigationScheduler):
462         * page/History.cpp:
463         * page/Location.cpp:
464         * page/PerformanceLogging.cpp:
465         * page/PerformanceNavigation.cpp:
466         * page/UserContentProvider.cpp:
467         * page/ios/FrameIOS.mm:
468         (WebCore::Frame::initWithSimpleHTMLDocument):
469         * plugins/PluginInfoProvider.cpp:
470         * replay/ReplayInputCreationMethods.cpp:
471         * replay/UserInputBridge.cpp:
472         * xml/XSLTProcessorLibxslt.cpp:
473         * xml/parser/XMLDocumentParserLibxml2.cpp:
474
475 2017-07-01  Dan Bernstein  <mitz@apple.com>
476
477         [macOS] Remove code only needed when building for OS X Yosemite
478         https://bugs.webkit.org/show_bug.cgi?id=174067
479
480         Reviewed by Tim Horton.
481
482         * Configurations/Base.xcconfig:
483         * Configurations/DebugRelease.xcconfig:
484         * Configurations/FeatureDefines.xcconfig:
485         * Configurations/Version.xcconfig:
486         * accessibility/AXObjectCache.cpp:
487         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility):
488         * html/HTMLCanvasElement.cpp:
489         * page/WheelEventDeltaFilter.cpp:
490         (WebCore::WheelEventDeltaFilter::create):
491         * page/mac/WheelEventDeltaFilterMac.h:
492         * page/mac/WheelEventDeltaFilterMac.mm:
493         * page/scrolling/ScrollingMomentumCalculator.cpp:
494         * page/scrolling/mac/ScrollingMomentumCalculatorMac.h:
495         * page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:
496         * platform/cocoa/NetworkExtensionContentFilter.mm:
497         (replacementDataFromDecisionInfo):
498         (WebCore::NetworkExtensionContentFilter::initialize):
499         (WebCore::NetworkExtensionContentFilter::willSendRequest):
500         (WebCore::NetworkExtensionContentFilter::responseReceived):
501         (WebCore::NetworkExtensionContentFilter::addData):
502         (WebCore::NetworkExtensionContentFilter::finishedAddingData):
503         (WebCore::NetworkExtensionContentFilter::unblockHandler):
504         * platform/graphics/ComplexTextController.h:
505         * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:
506         (PlatformCAAnimationCocoa::setTimingFunction):
507         * platform/graphics/cocoa/FontCacheCoreText.cpp:
508         (WebCore::FontCache::platformAlternateFamilyName):
509         * platform/graphics/cocoa/FontCocoa.mm:
510         (WebCore::Font::platformInit):
511         * platform/graphics/cocoa/IOSurface.mm:
512         (WebCore::IOSurface::sinkIntoImage):
513         * platform/graphics/cocoa/WebGPULayer.mm:
514         (-[WebGPULayer initWithGPUDevice:]):
515         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
516         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
517         * platform/graphics/mac/WebGLLayer.mm:
518         (-[WebGLLayer initWithGraphicsContext3D:]):
519         * platform/mac/BlacklistUpdater.mm:
520         * platform/mac/PlatformScreenMac.mm:
521         (WebCore::screenSupportsExtendedColor):
522         * platform/mac/ValidationBubbleMac.mm:
523         (WebCore::ValidationBubble::ValidationBubble):
524         * platform/mac/WebGLBlacklist.mm:
525         (WebCore::WebGLBlacklist::create):
526         * platform/network/cocoa/WebCoreNSURLSession.h:
527         * platform/network/cocoa/WebCoreNSURLSession.mm:
528         * platform/network/mac/CertificateInfoMac.mm:
529         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
530         * platform/network/mac/CookieJarMac.mm:
531         (WebCore::setCookiesFromDOM):
532         * platform/spi/cf/CFNetworkSPI.h:
533         * platform/spi/cg/CoreGraphicsSPI.h:
534         * platform/spi/cocoa/NEFilterSourceSPI.h:
535         * platform/spi/cocoa/NSURLConnectionSPI.h:
536         * platform/spi/cocoa/QuartzCoreSPI.h:
537         * platform/spi/mac/NSScrollingInputFilterSPI.h:
538         * platform/spi/mac/NSScrollingMomentumCalculatorSPI.h:
539         * platform/spi/mac/TUCallSPI.h:
540         * rendering/RenderThemeMac.mm:
541         (WebCore::RenderThemeMac::levelIndicatorFor):
542         * svg/SVGToOTFFontConversion.cpp:
543         (WebCore::SVGToOTFFontConverter::appendKERNTable):
544         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
545
546 2017-06-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
547
548         If an image appears more than once on a page, decoding for painting one instance repaints them all
549         https://bugs.webkit.org/show_bug.cgi?id=169944
550
551         Reviewed by Simon Fraser.
552
553         Make the Image::draw*() and GraphicsContext::draw*() functions return an
554         ImageDrawResult which indicates whether the image is drawn or has requested
555         an asynchronous image decoding.
556
557         If the image requested an asynchronous image decoding, the issuer of the
558         Image::draw(), which is of type CachedImageClient, will add itself to a
559         set of m_pendingImageDrawingClients, which owned by CachedImage.
560
561         When receiving the imageFrameAvailable() notification for a lrage image 
562         from the decoding thread, CachedImage will loop through the clients that
563         are only in m_pendingImageDrawingClients to ask them to repaint their
564         rectangles.
565
566         Test: fast/images/async-image-multiple-clients-repaint.html
567
568         * loader/cache/CachedImage.cpp:
569         (WebCore::CachedImage::didRemoveClient):
570         (WebCore::CachedImage::addPendingImageDrawingClient):
571         (WebCore::CachedImage::allClientsRemoved):
572         (WebCore::CachedImage::clear):
573         (WebCore::CachedImage::imageFrameAvailable):
574         * loader/cache/CachedImage.h:
575         * platform/graphics/BitmapImage.cpp:
576         (WebCore::BitmapImage::draw):
577         * platform/graphics/BitmapImage.h:
578         * platform/graphics/CrossfadeGeneratedImage.cpp:
579         (WebCore::CrossfadeGeneratedImage::draw):
580         * platform/graphics/CrossfadeGeneratedImage.h:
581         * platform/graphics/GeneratedImage.h:
582         * platform/graphics/GradientImage.cpp:
583         (WebCore::GradientImage::draw):
584         * platform/graphics/GradientImage.h:
585         * platform/graphics/GraphicsContext.cpp:
586         (WebCore::GraphicsContext::drawImage):
587         (WebCore::GraphicsContext::drawTiledImage):
588         * platform/graphics/GraphicsContext.h:
589         * platform/graphics/Image.cpp:
590         (WebCore::Image::drawTiled):
591         * platform/graphics/Image.h:
592         * platform/graphics/ImageTypes.h:
593         * platform/graphics/NamedImageGeneratedImage.cpp:
594         (WebCore::NamedImageGeneratedImage::draw):
595         * platform/graphics/NamedImageGeneratedImage.h:
596         * platform/graphics/cg/PDFDocumentImage.cpp:
597         (WebCore::PDFDocumentImage::draw):
598         * platform/graphics/cg/PDFDocumentImage.h:
599         * rendering/RenderBoxModelObject.cpp:
600         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
601         * rendering/RenderImage.cpp:
602         (WebCore::RenderImage::paintIntoRect):
603         * svg/graphics/SVGImage.cpp:
604         (WebCore::SVGImage::drawForContainer):
605         (WebCore::SVGImage::draw):
606         * svg/graphics/SVGImage.h:
607         * svg/graphics/SVGImageForContainer.cpp:
608         (WebCore::SVGImageForContainer::draw):
609         * svg/graphics/SVGImageForContainer.h:
610
611 2017-06-30  Ryosuke Niwa  <rniwa@webkit.org>
612
613         REGRESSION(r214194): Safari leaves a popup window open opened during before unload
614         https://bugs.webkit.org/show_bug.cgi?id=174016
615
616         Reviewed by Chris Dumez.
617
618         Address Dan's review comments.
619
620         * loader/NavigationDisabler.h:
621         (WebCore::NavigationDisabler::NavigationDisabler):
622         (WebCore::NavigationDisabler::~NavigationDisabler):
623
624 2017-06-30  Wenson Hsieh  <wenson_hsieh@apple.com>
625
626         [iOS DnD] Text indicators for dragged links should always be legible if the link is legible
627         https://bugs.webkit.org/show_bug.cgi?id=173860
628         <rdar://problem/32974385>
629
630         Reviewed by Tim Horton.
631
632         Currently, TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges ensures that links backed by a
633         RenderReplaced element don't render blank text indicators by additionally forcing the
634         TextIndicatorOptionPaintAllContent option in order to capture the RenderReplaced content. If estimated
635         background color is requested, this patch adds an additional path for "upgrading" the text indicator to paint
636         all content: if the text color is not legible against the estimated background color, then it is likely that the
637         background color estimate failed or the link itself was not legible in the first place; in the former case, to
638         ensure that the link is still legible, we upgrade the given TextIndicatorOptions to paint all contents in the
639         range.
640
641         There is currently no way to test this, and also no simple way to introduce infrastructure to test text
642         indicators.
643
644         * page/TextIndicator.cpp:
645         (WebCore::estimatedTextColorsForRange):
646
647         Estimates all text colors that appear in a range by iterating over the text node renderers and consulting their
648         render styles.
649
650         (WebCore::adjustTextIndicatorDataOptionsForEstimatedColorsIfNecessary):
651
652         If foreground text color is deemed not legible, force TextIndicatorOptionPaintAllContent instead of
653         TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges.
654
655         (WebCore::initializeIndicator):
656         * rendering/TextPaintStyle.cpp:
657         (WebCore::textColorIsLegibleAgainstBackgroundColor):
658         (WebCore::adjustColorForVisibilityOnBackground):
659
660         Allow other parts of WebCore to check the legibility of text against a background color.
661
662         * rendering/TextPaintStyle.h:
663
664 2017-06-30  Alex Christensen  <achristensen@webkit.org>
665
666         REGRESSION(r215096) Queries of URLs with non-special schemes should not percent-encode single quotes
667         https://bugs.webkit.org/show_bug.cgi?id=174051
668         <rdar://problem/33002846>
669
670         Reviewed by Tim Horton.
671
672         In r215096 I added ' to the set of characters to be percent-encoded in queries,
673         but for interoperability and compatibility we need to do this only for special schemes, like http.
674
675         Covered by new API tests.
676
677         * platform/URLParser.cpp:
678         (WebCore::isC0Control):
679         (WebCore::shouldPercentEncodeQueryByte):
680         (WebCore::URLParser::utf8QueryEncode):
681         (WebCore::URLParser::encodeQuery):
682
683 2017-06-30  Daniel Bates  <dabates@apple.com>
684
685         Attempt to fix the build following <https://trac.webkit.org/changeset/219019>
686         (https://bugs.webkit.org/show_bug.cgi?id=165160)
687
688         Export the FrameLoadRequest move constructor and move operator so that they
689         can be used from WebKit.
690
691         * loader/FrameLoadRequest.h:
692
693 2017-06-30  Don Olmstead  <don.olmstead@sony.com>
694
695         [WebCore] Update AXObjectCache for !HAVE(ACCESSIBILITY)
696         https://bugs.webkit.org/show_bug.cgi?id=174045
697
698         Reviewed by Konstantin Tokarev.
699
700         No new tests. No change in behavior.
701
702         * accessibility/AXObjectCache.h:
703         (WebCore::AXObjectCache::checkedStateChanged):
704         (WebCore::AXObjectCache::childrenChanged):
705         (WebCore::AXObjectCache::deferRecomputeIsIgnored):
706         (WebCore::AXObjectCache::deferTextChangedIfNeeded):
707         (WebCore::AXObjectCache::focusAriaModalNodeTimerFired):
708         (WebCore::AXObjectCache::handleAriaExpandedChange):
709         (WebCore::AXObjectCache::handleAriaRoleChanged):
710         (WebCore::AXObjectCache::handleAttributeChanged):
711         (WebCore::AXObjectCache::handleScrollbarUpdate):
712         (WebCore::AXObjectCache::liveRegionChangedNotificationPostTimerFired):
713         (WebCore::AXObjectCache::notificationPostTimerFired):
714         (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
715         (WebCore::AXObjectCache::performDeferredCacheUpdate):
716         (WebCore::AXObjectCache::postNotification):
717         (WebCore::AXObjectCache::postPlatformNotification):
718         (WebCore::AXObjectCache::postTextReplacementNotification):
719         (WebCore::AXObjectCache::postTextReplacementNotificationForTextControl):
720         (WebCore::AXObjectCache::postTextStateChangeNotification):
721         (WebCore::AXObjectCache::recomputeIsIgnored):
722         (WebCore::AXObjectCache::textChanged):
723         (WebCore::AXObjectCache::updateCacheAfterNodeIsAttached):
724         (WebCore::AXObjectCache::focusAriaModalNode): Deleted.
725
726 2017-06-30  Daniel Bates  <dabates@apple.com>
727
728         Attempt to fix the Apple Windows build following <https://trac.webkit.org/changeset/219013>
729         (https://bugs.webkit.org/show_bug.cgi?id=165160)
730
731         Make FrameLoadRequest move constructor and move operator out-of-line so that callers
732         do not need to include header SecurityOrigin.h.
733
734         * loader/FrameLoadRequest.cpp:
735         * loader/FrameLoadRequest.h:
736
737 2017-06-30  Alex Christensen  <achristensen@webkit.org>
738
739         Stop soft linking with CFNetwork
740         https://bugs.webkit.org/show_bug.cgi?id=174029
741
742         Reviewed by Jer Noble.
743
744         We link directly with CFNetwork.  There's no reason to soft link, 
745         and it is causing a problem with linking when doing interesting things with CFNetwork.
746
747         * platform/spi/cf/CFNetworkSPI.h:
748
749 2017-06-30  Daniel Bates  <dabates@apple.com>
750
751         API::FrameInfo should know the web page that contains the frame; add API property webView to WKFrameInfo
752         https://bugs.webkit.org/show_bug.cgi?id=165160
753         <rdar://problem/29451999>
754
755         Reviewed by Brady Eidson.
756
757         Pass the document that is requesting the load to the loader.
758
759         * inspector/InspectorFrontendClientLocal.cpp:
760         (WebCore::InspectorFrontendClientLocal::openInNewTab): Pass the document when instantiating the FrameLoadRequest.
761         Also use C++11 brace initialization to instantiate ResourceRequest.
762         * inspector/InspectorPageAgent.cpp:
763         (WebCore::InspectorPageAgent::navigate): Pass the document when instantiating the FrameLoadRequest.
764         * loader/FrameLoadRequest.cpp:
765         (WebCore::FrameLoadRequest::FrameLoadRequest): Moved from FrameLoadRequest.h.
766         (WebCore::FrameLoadRequest::requester): Added.
767         (WebCore::FrameLoadRequest::requesterSecurityOrigin): Added.
768         * loader/FrameLoadRequest.h:
769         (WebCore::FrameLoadRequest::FrameLoadRequest): Marked as WEBCORE_EXPORT and modified to take
770         the document that requested the load.
771         (WebCore::FrameLoadRequest::requester): Deleted; made out-of-line/moved to FrameLoadRequest.cpp.
772         * loader/FrameLoader.cpp:
773         (WebCore::FrameLoader::urlSelected): Pass the document when instantiating the FrameLoadRequest. Also use C++11
774         brace initialization to instantiate ResourceRequest.
775         (WebCore::FrameLoader::loadURLIntoChildFrame): Pass the document when instantiating the FrameLoadRequest.
776         (WebCore::FrameLoader::loadFrameRequest): Substitute FrameLoadRequest::requesterSecurityOrigin() for
777         FrameLoadRequest::requester() as the former replaces the latter.
778         (WebCore::FrameLoader::loadURL): Pass the document when instantiating the NavigationAction.
779         (WebCore::FrameLoader::load): Ditto.
780         (WebCore::FrameLoader::loadWithDocumentLoader): Pass the document when instantiating the NavigationAction.
781         Also use C++11 brace initialization syntax to instantiate the NavigationAction.
782         (WebCore::FrameLoader::reload): Ditto.
783         (WebCore::FrameLoader::loadPostRequest): Ditto.
784         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Pass the document when instantiating the NavigationAction.
785         (WebCore::FrameLoader::loadDifferentDocumentItem): Pass the document when instantiating the NavigationAction.
786         Also use C++11 brace initialization syntax to instantiate the NavigationAction.
787         (WebCore::createWindow): Pass the document when instantiating the NavigationAction.
788         * loader/NavigationAction.cpp:
789         (WebCore::NavigationAction::NavigationAction): Modified to take the source document.
790         * loader/NavigationAction.h:
791         (WebCore::NavigationAction::isEmpty): Consider a NavigationAction empty if does not have a source document
792         or the associated ResourceRequest has an empty URL.
793         (WebCore::NavigationAction::sourceDocument): Added.
794         (WebCore::NavigationAction::NavigationAction): Deleted; made out-of-line/moved to NavigationAction.cpp to
795         avoid the need to include the header Document.h.
796         * loader/NavigationScheduler.cpp:
797         (WebCore::ScheduledURLNavigation::ScheduledURLNavigation): Store the document that scheduled the navigation.
798         Also use C++11 brace initialization to instantiate in the member initialization list.
799         (WebCore::ScheduledURLNavigation::initiatingDocument): Added. Retrieves the document that scheduled the navigation.
800         (WebCore::NavigationScheduler::scheduleLocationChange): Pass the document when instantiating the FrameLoadRequest.
801         * loader/PolicyChecker.cpp:
802         (WebCore::PolicyChecker::checkNavigationPolicy): Pass the document when instantiating the NavigationAction.
803         Also use C++11 brace initialization syntax to instantiate the NavigationAction.
804         * page/ContextMenuController.cpp:
805         (WebCore::openNewWindow):
806         (WebCore::ContextMenuController::contextMenuItemSelected): Pass the document when instantiating the FrameLoadRequest.
807         Also use C++11 brace initialization syntax to instantiate the FrameLoadRequest.
808         * page/DOMWindow.cpp:
809         (WebCore::DOMWindow::createWindow): Pass the document when instantiating the FrameLoadRequest.
810
811 2017-06-29  Jer Noble  <jer.noble@apple.com>
812
813         Make Legacy EME API controlled by RuntimeEnabled setting.
814         https://bugs.webkit.org/show_bug.cgi?id=173994
815
816         Reviewed by Sam Weinig.
817
818         Add a new RuntimeEnabledFeatures setting to control the availability of the WebKit prefixed EME APIs.
819
820         * Configurations/FeatureDefines.xcconfig:
821         * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl:
822         * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl:
823         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl:
824         * Modules/encryptedmedia/legacy/WebKitMediaKeys.idl:
825         * dom/Element.idl:
826         * html/HTMLMediaElement.cpp:
827         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
828         (WebCore::HTMLMediaElement::webkitSetMediaKeys):
829         (WebCore::HTMLMediaElement::keyAdded):
830         * html/HTMLMediaElement.idl:
831         * html/WebKitMediaKeyError.idl:
832         * page/RuntimeEnabledFeatures.h:
833         (WebCore::RuntimeEnabledFeatures::setLegacyEncryptedMediaAPIEnabled):
834         (WebCore::RuntimeEnabledFeatures::legacyEncryptedMediaAPIEnabled):
835
836 2017-06-30  Chris Dumez  <cdumez@apple.com>
837
838         Move ResourceLoadStatisticsStore to WebKit2/UIProcess
839         https://bugs.webkit.org/show_bug.cgi?id=174033
840
841         Reviewed by Brent Fulgham.
842
843         Move ResourceLoadStatisticsStore to WebKit2/UIProcess since it is only
844         used in the WebKit2 UIProcess.
845
846         * CMakeLists.txt:
847         * WebCore.xcodeproj/project.pbxproj:
848         * loader/ResourceLoadObserver.cpp:
849         (WebCore::primaryDomain):
850         * loader/ResourceLoadStatistics.cpp:
851         (WebCore::ResourceLoadStatistics::primaryDomain):
852         * loader/ResourceLoadStatistics.h:
853
854 2017-06-30  Ryosuke Niwa  <rniwa@webkit.org>
855
856         Ran sort-Xcode-project-file.
857
858         * WebCore.xcodeproj/project.pbxproj:
859
860 2017-06-30  Ryosuke Niwa  <rniwa@webkit.org>
861
862         REGRESSION(r214194): Safari leaves a popup window open opened during before unload
863         https://bugs.webkit.org/show_bug.cgi?id=174016
864
865         Reviewed by Chris Dumez.
866
867         The bug was caused by WebKit allowing the opening of a new window via window.open but disallowing
868         the initial navigation within the newly opened window while a beforeunload event is being dispatched.
869
870         Because some websites which opens a window during a beforeunload event relies on the opened page
871         to communicate back in order to close it. This resulted in a newly opened popup window with about:blank
872         being left out on those websites.
873
874         Fixed the bug by allowing the navigation of a new window as well as an existing another window.
875         More concretely, we disallow navigations within the same frame tree as the one in which a beforeunload
876         event is being dispatched, and allow navigations elsewhere (i.e. different window / page).
877         During the destruction of a frame-less document, disallow all the navigations.
878
879         Tests: fast/events/before-unload-navigate-different-window.html
880                fast/events/before-unload-open-window.html
881                fast/events/before-unload-sibling-frame.html
882
883         * WebCore.xcodeproj/project.pbxproj:
884         * dom/Document.cpp:
885         (WebCore::Document::prepareForDestruction):
886         * loader/FrameLoader.cpp:
887         (WebCore::FrameLoader::isNavigationAllowed):
888         (WebCore::FrameLoader::shouldClose):
889         * loader/NavigationDisabler.h: Added. Extracted from NavigationScheduler.h
890         (WebCore::NavigationDisabler::NavigationDisabler): Increment the newly added counter on MainFrame unless
891         the frame is null (during the destruction of a frameless document) in which case we increment the global
892         disable count.
893         (WebCore::NavigationDisabler::~NavigationDisabler): Ditto for decrementation.
894         (WebCore::NavigationDisabler::isNavigationAllowed): Only allow the navigation when there is no frameless
895         document in destruction, and none of the frame in the same frame tree as the one given is currently in
896         the process of dispatching a beforeunload event.
897         * loader/NavigationScheduler.cpp:
898         (WebCore::NavigationScheduler::shouldScheduleNavigation):
899         * loader/NavigationScheduler.h:
900         (WebCore::NavigationDisabler): Moved to NavigationDisabler.h.
901         * page/MainFrame.h:
902         (WebCore::MainFrame): Added s_globalNavigationDisableCount.
903
904 2017-06-30  Sam Weinig  <sam@webkit.org>
905
906         [WebIDL] Add support for conditionally read-write attributes
907         https://bugs.webkit.org/show_bug.cgi?id=173993
908
909         Reviewed by Alex Christensen.
910
911         The MEDIA_SOURCE feature/conditional requires changing a few readonly
912         attributes into read-write attributes. In the past we handled this with
913         custom bindings. This patch adds a new extended attribute, ConditionallyReadWrite
914         which achieves the same result.
915
916         * WebCore.xcodeproj/project.pbxproj:
917         Move a few custom binding to the "GC / Wrapping Only" group.
918
919         * bindings/js/JSAudioTrackCustom.cpp:
920         (WebCore::JSAudioTrack::setKind): Deleted.
921         (WebCore::JSAudioTrack::setLanguage): Deleted.
922         * bindings/js/JSTextTrackCustom.cpp:
923         (WebCore::JSTextTrack::setLanguage): Deleted.
924         * bindings/js/JSVideoTrackCustom.cpp:
925         (WebCore::JSVideoTrack::setKind): Deleted.
926         (WebCore::JSVideoTrack::setLanguage): Deleted.
927         Remove no longer needed custom bindings.
928
929         * bindings/scripts/CodeGeneratorJS.pm:
930         (GeneratePropertiesHashTable):
931         (GenerateImplementation):
932         (GenerateAttributeSetterDefinition):
933         (GenerateCallbackImplementationContent):
934         (GenerateHashTableValueArray):
935         (GenerateHashTable):
936         Pipe ConditionallyReadWrite through the generator.
937
938         * bindings/scripts/IDLAttributes.json:
939         Add ConditionallyReadWrite.
940
941         * bindings/scripts/test/JS/JSTestObj.cpp:
942         * bindings/scripts/test/TestObj.idl:
943         Add tests for ConditionallyReadWrite.
944
945         * html/track/AudioTrack.idl:
946         * html/track/TextTrack.idl:
947         * html/track/VideoTrack.idl:
948         Replace [Custom] with [ConditionallyReadWrite].
949
950 2017-06-30  Chris Dumez  <cdumez@apple.com>
951
952         ResourceLoadObserver does not need a ResourceLoadStatisticsStore
953         https://bugs.webkit.org/show_bug.cgi?id=174013
954
955         Reviewed by Brent Fulgham.
956
957         ResourceLoadObserver does not need a ResourceLoadStatisticsStore. ResourceLoadStatisticsStore is too complicated for its needs.
958         ResourceLoadStatisticsStore can then be moved to WebKit2/UIProcess in a follow-up.
959
960         * Modules/websockets/WebSocket.cpp:
961         (WebCore::WebSocket::connect):
962         * dom/UserGestureIndicator.cpp:
963         (WebCore::UserGestureIndicator::UserGestureIndicator):
964         * loader/DocumentLoader.cpp:
965         (WebCore::DocumentLoader::willSendRequest):
966         * loader/FrameLoader.cpp:
967         (WebCore::FrameLoader::loadResourceSynchronously):
968         * loader/ResourceLoadObserver.cpp:
969         (WebCore::ResourceLoadObserver::shared):
970         (WebCore::ResourceLoadObserver::setNotificationCallback):
971         (WebCore::ResourceLoadObserver::shouldLog):
972         (WebCore::ResourceLoadObserver::logFrameNavigation):
973         (WebCore::ResourceLoadObserver::logSubresourceLoading):
974         (WebCore::ResourceLoadObserver::logWebSocketLoading):
975         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
976         (WebCore::ResourceLoadObserver::ensureResourceStatisticsForPrimaryDomain):
977         (WebCore::ResourceLoadObserver::takeResourceStatisticsForPrimaryDomain):
978         (WebCore::ResourceLoadObserver::isPrevalentResource):
979         (WebCore::ResourceLoadObserver::statisticsForOrigin):
980         (WebCore::ResourceLoadObserver::takeStatistics):
981         * loader/ResourceLoadObserver.h:
982         * loader/ResourceLoadStatisticsStore.cpp:
983         * loader/ResourceLoadStatisticsStore.h:
984         * loader/SubresourceLoader.cpp:
985         (WebCore::SubresourceLoader::willSendRequestInternal):
986         * testing/Internals.cpp:
987         (WebCore::Internals::resourceLoadStatisticsForOrigin):
988
989 2017-06-30  Fujii Hironori  <Hironori.Fujii@sony.com>
990
991         ASSERTION FAILED: !canAnimate() && !m_currentFrame
992         https://bugs.webkit.org/show_bug.cgi?id=173089
993
994         Reviewed by Said Abou-Hallawa.
995
996         WebCore::BitmapImage::draw() has an assertion which ensures
997         m_currentFrame is zero in case of async decoding. But, this
998         assertion failed if an GIF animation image which have finished its
999         animation was repainted. In that time, m_currentFrame was the last
1000         frame index of the image.
1001
1002         Test: fast/images/animated-gif-paint-after-animation.html
1003
1004         * platform/graphics/BitmapImage.cpp:
1005         (WebCore::BitmapImage::draw): Assert m_currentFrame is zero or the animation finished.
1006         Call requestFrameAsyncDecodingAtIndex with m_currentFrame instead of zero.
1007
1008 2017-06-30  Ross Kirsling  <ross.kirsling@sony.com>
1009
1010         [PAL] Move Sound into PAL
1011         https://bugs.webkit.org/show_bug.cgi?id=173999
1012
1013         Reviewed by Alex Christensen.
1014
1015         * Configurations/WebCore.xcconfig:
1016         * PlatformGTK.cmake:
1017         * PlatformMac.cmake:
1018         * PlatformWPE.cmake:
1019         * PlatformWin.cmake:
1020         * WebCore.xcodeproj/project.pbxproj:
1021         * editing/Editor.cpp:
1022         (WebCore::Editor::cut):
1023         (WebCore::Editor::copy):
1024         (WebCore::Editor::performDelete):
1025         * editing/EditorCommand.cpp:
1026         (WebCore::executeSelectToMark):
1027         (WebCore::executeSwapWithMark):
1028         * editing/mac/EditorMac.mm:
1029         (WebCore::Editor::takeFindStringFromSelection):
1030         * inspector/InspectorFrontendHost.cpp:
1031         (WebCore::InspectorFrontendHost::beep):
1032         * platform/Sound.h: Removed.
1033
1034 2017-06-30  Wenson Hsieh  <wenson_hsieh@apple.com>
1035
1036         [iOS DnD] Drag caret rect is incorrectly computed when dropping in editable content in iframes
1037         https://bugs.webkit.org/show_bug.cgi?id=174017
1038         <rdar://problem/32959782>
1039
1040         Reviewed by Simon Fraser.
1041
1042         We're currenly computing the drag caret rect (for the purposes of presentation at the client layers)
1043         incorrectly, in per-frame document coordinates instead of root view coordinates in the mainframe. This means
1044         drag caret geometry from embedded iframes in the document will show up in the content view with a rect in the
1045         coordinate space of the iframe.
1046
1047         To fix this, we need to convert the drag caret rect to root view coordinates. This patch teaches
1048         DragCaretController to do this, and tweaks WebKit/WebKit2 to use caretRectInRootViewCoordinates.
1049
1050         Test: DataInteractionTests.ExternalSourcePlainTextToIFrame
1051
1052         * editing/FrameSelection.cpp:
1053         (WebCore::DragCaretController::caretRectInRootViewCoordinates):
1054         * editing/FrameSelection.h:
1055
1056 2017-06-30  Sam Weinig  <sam@webkit.org>
1057
1058         [WebIDL] Replace use of __is_polymorphic with standard std::is_polymorphic<>::value
1059         https://bugs.webkit.org/show_bug.cgi?id=174012
1060
1061         Reviewed by Alex Christensen.
1062
1063         * bindings/scripts/CodeGeneratorJS.pm:
1064         (GenerateImplementation):
1065         Replace __is_polymorphic with standard std::is_polymorphic<>::value. Remove clang
1066         specific guard now that we are using something other compilers support.
1067
1068         * bindings/scripts/test/JS/JSInterfaceName.cpp:
1069         * bindings/scripts/test/JS/JSMapLike.cpp:
1070         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
1071         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1072         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
1073         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
1074         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
1075         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1076         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1077         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1078         * bindings/scripts/test/JS/JSTestException.cpp:
1079         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1080         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
1081         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
1082         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
1083         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
1084         * bindings/scripts/test/JS/JSTestInterface.cpp:
1085         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
1086         * bindings/scripts/test/JS/JSTestIterable.cpp:
1087         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1088         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
1089         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
1090         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
1091         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1092         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
1093         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
1094         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
1095         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
1096         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
1097         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
1098         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
1099         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
1100         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
1101         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
1102         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
1103         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
1104         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
1105         * bindings/scripts/test/JS/JSTestNode.cpp:
1106         * bindings/scripts/test/JS/JSTestObj.cpp:
1107         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1108         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
1109         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1110         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
1111         * bindings/scripts/test/JS/JSTestSerialization.cpp:
1112         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1113         * bindings/scripts/test/JS/JSTestStringifier.cpp:
1114         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
1115         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
1116         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
1117         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
1118         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
1119         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
1120         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1121         Update test results.
1122
1123 2017-06-30  Youenn Fablet  <youenn@apple.com>
1124
1125        Support PeerConnectionStates::BundlePolicy::MaxBundle when setting rtc configuration
1126        https://bugs.webkit.org/show_bug.cgi?id=169389
1127
1128        Reviewed by Alex Christensen.
1129
1130        Covered by manual testing (appr.tc and https://youennf.github.io/webrtc-tests/src/content/peerconnection/trickle-ice/).
1131        Updated test is showing some more failing but this is due to the fact that we are no longer totally lying on the configuration of the
1132         underlying libwebrtc backend.
1133
1134         Previously, we were creating a libwebrtc peer connection and then setting its configuration.
1135         libwebrtc does not like the configuration to be changed and may refuse to set the configuration.
1136         Instead of doing that, we are now creating the libwebrtc peer connection with the provided configuration.
1137
1138         ICE candidate pool size is disabled as it is creating issues with running tests on bots.
1139
1140         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
1141         (WebCore::MediaEndpointPeerConnection::setConfiguration):
1142         * Modules/mediastream/MediaEndpointPeerConnection.h:
1143         * Modules/mediastream/PeerConnectionBackend.h:
1144         * Modules/mediastream/RTCPeerConnection.cpp:
1145         (WebCore::RTCPeerConnection::initializeWith):
1146         (WebCore::iceServersFromConfiguration):
1147         (WebCore::RTCPeerConnection::initializeConfiguration):
1148         (WebCore::RTCPeerConnection::setConfiguration):
1149         * Modules/mediastream/RTCPeerConnection.h:
1150         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
1151         (WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
1152         (WebCore::LibWebRTCMediaEndpoint::setConfiguration):
1153         (WebCore::LibWebRTCMediaEndpoint::stop):
1154         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
1155         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
1156         (WebCore::configurationFromMediaEndpointConfiguration):
1157         (WebCore::LibWebRTCPeerConnectionBackend::setConfiguration):
1158         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
1159         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
1160         (WebCore::createActualPeerConnection):
1161         (WebCore::LibWebRTCProvider::createPeerConnection):
1162         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
1163
1164
1165 2017-06-30  Antoine Quint  <graouts@apple.com>
1166
1167         Top controls bars should invert with right-to-left user interface layout direction locale
1168         https://bugs.webkit.org/show_bug.cgi?id=173989
1169         <rdar://problem/32863552>
1170
1171         Reviewed by Dean Jackson.
1172
1173         When the user interface layout direction is set by the locale to be right-to-left, we now:
1174
1175             - invert the two top controls bars
1176             - invert the layout order for the fullscreen / PiP controls bar
1177             - orient the volume button the opposite direction when presented in a top controls bar
1178
1179         Test: media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl.html
1180
1181         * Modules/modern-media-controls/controls/icon-service.js: Add new RTL variants for the mute and unmute icons.
1182         * Modules/modern-media-controls/controls/inline-media-controls.css: Invert the position of the two top controls
1183         bars when we switch user interface layout direction.
1184         (.media-controls.inline.uses-ltr-user-interface-layout-direction > .controls-bar.top-left,):
1185         (.media-controls.inline.uses-ltr-user-interface-layout-direction > .controls-bar.top-right,):
1186         (.media-controls.inline > .controls-bar.top-left): Deleted.
1187         (.media-controls.inline > .controls-bar.top-right): Deleted.
1188         * Modules/modern-media-controls/controls/inline-media-controls.js:
1189         (InlineMediaControls.prototype.layout): Default to using the LTR variant for the mute button icon since
1190         it should only use the RTL variant in case the locale requires it *and* we display the mute button in a
1191         top controls bar rather than the bottom controls bar (ie. when width becomes constrained).
1192         (InlineMediaControls.prototype._topLeftContainerButtons): Invert the order of the fullscreen and PiP
1193         buttons based on the user interface layout direction.
1194         (InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren):
1195         (InlineMediaControls):
1196         * Modules/modern-media-controls/controls/media-controls.js:
1197         (MediaControls.prototype.set usesLTRUserInterfaceLayoutDirection): Schedule a layout when the user interface
1198         layout direction changes.
1199         * Modules/modern-media-controls/controls/mute-button.js: Add a new "usesRTLIconVariant" property, false by
1200         default, to indicate we want to use the RTL variant of the button's icon.
1201         (MuteButton):
1202         (MuteButton.prototype.get muted):
1203         (MuteButton.prototype.set muted):
1204         (MuteButton.prototype.set usesRTLIconVariant):
1205         (MuteButton.prototype.layout):
1206         * Modules/modern-media-controls/images/iOS/Mute-RTL.svg: Added.
1207         * Modules/modern-media-controls/images/iOS/VolumeHi-RTL.svg: Added.
1208         * Modules/modern-media-controls/images/macOS/Mute-RTL.svg: Added.
1209         * Modules/modern-media-controls/images/macOS/VolumeHi-RTL.svg: Added.
1210         * Modules/modern-media-controls/media/media-controller.js: Use an ivar to track when it's worth notifying the
1211         media controls that the user interface layout direction has changed. This means we won't need to schedule a
1212         layout in case it's set to the current value.
1213         (MediaController):
1214         (MediaController.prototype.set usesLTRUserInterfaceLayoutDirection):
1215
1216 2017-06-29  Zalan Bujtas  <zalan@apple.com>
1217
1218         BreakingContext::handleReplaced() should use replacedBox instead of m_current.renderer().
1219         https://bugs.webkit.org/show_bug.cgi?id=174011
1220
1221         Reviewed by Simon Fraser.
1222
1223         No change in functionality.
1224
1225         * rendering/line/BreakingContext.h:
1226         (WebCore::BreakingContext::handleReplaced):
1227         * rendering/line/LineWidth.cpp:
1228         (WebCore::LineWidth::applyOverhang):
1229         * rendering/line/LineWidth.h:
1230
1231 2017-06-29  Wenson Hsieh  <wenson_hsieh@apple.com>
1232
1233         [iOS DnD] Web content process crashes when the selection is moved far offscreen in dragstart
1234         https://bugs.webkit.org/show_bug.cgi?id=174010
1235         <rdar://problem/32597802>
1236
1237         Reviewed by Tim Horton.
1238
1239         The TextIndicator snapshot generated in createDragImageForSelection is not guaranteed to succeed; this patch
1240         adds a null check following TextIndicator::createWithSelectionInFrame and bails early if the snapshot was not
1241         successful.
1242
1243         Test: DataInteractionTests.DoNotCrashWhenSelectionMovesOffscreenAfterDragStart
1244
1245         * platform/ios/DragImageIOS.mm:
1246         (WebCore::createDragImageForSelection):
1247
1248 2017-06-29  Chris Fleizach  <cfleizach@apple.com>
1249
1250         AX: Cannot call setValue() on contenteditable or ARIA text controls
1251         https://bugs.webkit.org/show_bug.cgi?id=173520
1252
1253         Reviewed by Ryosuke Niwa.
1254
1255         Add support for changing the value of a contenteditable and any other aria text control in setValue().
1256  
1257         Test: accessibility/mac/set-value-editable-types.html
1258
1259         * accessibility/AccessibilityRenderObject.cpp:
1260         (WebCore::AccessibilityRenderObject::setValue):
1261
1262 2017-06-28  Simon Fraser  <simon.fraser@apple.com>
1263
1264         getBoundingClientRect returns wrong value for combination of page zoom and scroll
1265         https://bugs.webkit.org/show_bug.cgi?id=173841
1266         rdar://problem/32983841
1267
1268         Reviewed by Dean Jackson.
1269
1270         The layout viewport returned by FrameView::layoutViewportRect() is affected by page (Command-+) zooming,
1271         since it's computed using scroll positions, so when we use its origin to convert into client coordinates
1272         (which are zoom-agnostic), we need to account for page zoom, so fix FrameView::documentToClientOffset()
1273         to do this.
1274
1275         Callers of documentToClientOffset() were checked, revealing that event client coordinates were also
1276         wrong with page zoom and are fixed in the same way. It was found that SimulatedClick was using an
1277         entirely wrong rect to compute its location: Element::clientRect() is NOT in client coordinates,
1278         so change this code to use getBoundingClientRect() instead.
1279
1280         Minor refactoring in MouseRelatedEvent to make getting to the FrameView cleaner.
1281
1282         Some geometry types enhanced to have non-mutating scale functions.
1283
1284         Tests: fast/events/simulated-click-zoomed.html
1285                fast/visual-viewport/client-rects-relative-to-layout-viewport-zoomed.html
1286
1287         * dom/MouseRelatedEvent.cpp:
1288         (WebCore::MouseRelatedEvent::init):
1289         (WebCore::MouseRelatedEvent::initCoordinates):
1290         (WebCore::MouseRelatedEvent::frameView):
1291         (WebCore::MouseRelatedEvent::documentToAbsoluteScaleFactor):
1292         (WebCore::MouseRelatedEvent::computePageLocation):
1293         (WebCore::MouseRelatedEvent::computeRelativePosition):
1294         (WebCore::pageZoomFactor): Deleted.
1295         (WebCore::frameScaleFactor): Deleted.
1296         * dom/MouseRelatedEvent.h:
1297         (WebCore::MouseRelatedEvent::absoluteLocation):
1298         (WebCore::MouseRelatedEvent::setAbsoluteLocation): Deleted.
1299         * dom/SimulatedClick.cpp:
1300         * page/FrameView.cpp:
1301         (WebCore::FrameView::layoutViewportRect): baseLayoutViewportSize() is the same as the old code.
1302         (WebCore::FrameView::documentToAbsoluteScaleFactor):
1303         (WebCore::FrameView::absoluteToDocumentScaleFactor):
1304         (WebCore::FrameView::absoluteToDocumentPoint):
1305         (WebCore::FrameView::documentToClientOffset):
1306         * page/FrameView.h:
1307         * platform/graphics/FloatPoint.h:
1308         (WebCore::FloatPoint::scale):
1309         (WebCore::FloatPoint::scaled):
1310         * platform/graphics/FloatSize.h:
1311         (WebCore::FloatSize::scaled):
1312         * platform/graphics/LayoutPoint.h:
1313         (WebCore::LayoutPoint::scaled):
1314
1315 2017-06-29  Megan Gardner  <megan_gardner@apple.com>
1316
1317         Unreviewed, fixing Window's build after r218976
1318
1319         * rendering/ScrollAlignment.cpp:
1320         (WebCore::operator<<):
1321
1322 2017-06-29  Megan Gardner  <megan_gardner@apple.com>
1323
1324         Add TextStream operators for Range, VisiblePosition, VisibleSelection, and ScrollAlignment
1325         https://bugs.webkit.org/show_bug.cgi?id=173997
1326
1327         Reviewed by Simon Fraser.
1328
1329         Adding logging that can be used with TextStream-based LOG_WITH_STREAM.
1330
1331         * dom/Range.cpp:
1332         (WebCore::operator<<):
1333         * dom/Range.h:
1334         * editing/VisiblePosition.h:
1335         * editing/VisibleSelection.cpp:
1336         (WebCore::operator<<):
1337         * editing/VisibleSelection.h:
1338         * rendering/ScrollAlignment.cpp:
1339         (WebCore::operator<<):
1340         * rendering/ScrollAlignment.h:
1341
1342 2017-06-29  Matt Lewis  <jlewis3@apple.com>
1343
1344         Unreviewed, rolling out r218903.
1345
1346         This patch and its fix cause immediate flakiness on all WK2
1347         testers
1348
1349         Reverted changeset:
1350
1351         "Support PeerConnectionStates::BundlePolicy::MaxBundle when
1352         setting rtc configuration"
1353         https://bugs.webkit.org/show_bug.cgi?id=169389
1354         http://trac.webkit.org/changeset/218903
1355
1356 2017-06-29  Matt Lewis  <jlewis3@apple.com>
1357
1358         Unreviewed, rolling out r218963.
1359
1360         This patch and its fix cause immediate flakiness on all WK2
1361         testers
1362
1363         Reverted changeset:
1364
1365         "Support PeerConnectionStates::BundlePolicy::MaxBundle when
1366         setting rtc configuration"
1367         https://bugs.webkit.org/show_bug.cgi?id=169389
1368         http://trac.webkit.org/changeset/218963
1369
1370 2017-06-29  Chris Dumez  <cdumez@apple.com>
1371
1372         Split ResourceLoadObserver into 2 classes: one for WebCore and one for the UIProcess
1373         https://bugs.webkit.org/show_bug.cgi?id=173990
1374
1375         Reviewed by Brent Fulgham.
1376
1377         Split ResourceLoadObserver into 2 classes: one for WebCore and one for the UIProcess.
1378         They really have different API and there is therefore close to no code duplication.
1379
1380         * loader/ResourceLoadObserver.cpp:
1381         (WebCore::primaryDomain):
1382         (WebCore::ResourceLoadObserver::setStatisticsQueue):
1383         (WebCore::ResourceLoadObserver::shouldLog):
1384         * loader/ResourceLoadObserver.h:
1385         * loader/ResourceLoadStatisticsStore.cpp:
1386         (WebCore::ResourceLoadStatisticsStore::primaryDomain):
1387         * loader/ResourceLoadStatisticsStore.h:
1388         * platform/URL.h:
1389
1390 2017-06-29  Sam Weinig  <sam@webkit.org>
1391
1392         [WebIDL] Remove custom binding for UserMessageHandlersNamespace
1393         https://bugs.webkit.org/show_bug.cgi?id=173956
1394
1395         Reviewed by Darin Adler.
1396
1397         * CMakeLists.txt:
1398         * WebCore.xcodeproj/project.pbxproj:
1399         * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp: Removed.
1400         Remove JSUserMessageHandlersNamespaceCustom.cpp
1401
1402         * bindings/scripts/CodeGeneratorJS.pm:
1403         (GenerateNamedGetterLambda):
1404         Add support for calling named getters with additional arguments from [CallWith].
1405
1406         (GenerateAttributeGetterBodyDefinition):
1407         (GenerateAttributeSetterBodyDefinition):
1408         (GenerateCallWithUsingReferences):
1409         (GenerateCallWithUsingPointers):
1410         (GenerateConstructorCallWithUsingPointers):
1411         (GenerateCallWith):
1412         (GenerateParametersCheck):
1413         Update arguments to GenerateCallWith(Using...) to no longer pass an operation,
1414         which was only needed for the no longer used ScriptArguments, pass a thisObject
1415         reference, and optionally pass an indentation.
1416
1417         * bindings/scripts/IDLAttributes.json:
1418         Remove no longer used ScriptArguments and CallStack, add World.
1419
1420         * bindings/scripts/test/JS/JSTestObj.cpp:
1421         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttributeGetter): Deleted.
1422         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute): Deleted.
1423         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttributeSetter): Deleted.
1424         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute): Deleted.
1425         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStackBody): Deleted.
1426         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack): Deleted.
1427         * bindings/scripts/test/TestObj.idl:
1428         Remove tests of ScriptArguments and CallStack.
1429
1430         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: Added.
1431         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h: Added.
1432         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: Added.
1433         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h: Added.
1434         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: Added.
1435         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h: Added.
1436         * bindings/scripts/test/TestNamedGetterCallWith.idl: Added.
1437         * bindings/scripts/test/TestNamedGetterNoIdentifier.idl: Added.
1438         * bindings/scripts/test/TestNamedGetterWithIdentifier.idl: Added.
1439         Add basic named getter tests and a specific test of named getters using CallWith.
1440
1441         * page/UserMessageHandlersNamespace.cpp:
1442         (WebCore::UserMessageHandlersNamespace::supportedPropertyNames):
1443         (WebCore::UserMessageHandlersNamespace::namedItem):
1444         (WebCore::UserMessageHandlersNamespace::handler): Deleted.
1445         * page/UserMessageHandlersNamespace.h:
1446         Rename handler to namedItem, matching convention and the expectations of the
1447         bindings generator and swap the order of the arguments for the same reason.
1448
1449         * page/UserMessageHandlersNamespace.idl:
1450         Remove CustomGetOwnPropertySlotAndDescriptor, and add the anonymous named getter.
1451
1452 2017-06-29  Chris Dumez  <cdumez@apple.com>
1453
1454         Avoid copying ResourceLoadStatistics objects
1455         https://bugs.webkit.org/show_bug.cgi?id=173972
1456
1457         Reviewed by Brent Fulgham.
1458
1459         Avoid copying ResourceLoadStatistics objects given that they are big. Make the type move-only
1460         to avoid such mistakes in the future.
1461
1462         * loader/ResourceLoadObserver.cpp:
1463         (WebCore::ResourceLoadObserver::logFrameNavigation):
1464         * loader/ResourceLoadStatistics.h:
1465         (WebCore::ResourceLoadStatistics::ResourceLoadStatistics):
1466
1467 2017-06-29  John Wilander  <wilander@apple.com>
1468
1469         Fix for intermittent Layout Test fail http/tests/loading/resourceLoadStatistics/telemetry-generation.html
1470         https://bugs.webkit.org/show_bug.cgi?id=173940
1471         <rdar://problem/33018125>
1472
1473         Reviewed by Brent Fulgham.
1474
1475         No new tests. This change enables the exiting test to pass.
1476
1477         * loader/ResourceLoadStatisticsStore.cpp:
1478         (WebCore::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):
1479             Added an assert.
1480
1481 2017-06-29  Youenn Fablet  <youenn@apple.com>
1482
1483         Support PeerConnectionStates::BundlePolicy::MaxBundle when setting rtc configuration
1484         https://bugs.webkit.org/show_bug.cgi?id=169389
1485
1486         Unreviewed.
1487
1488         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
1489         (WebCore::configurationFromMediaEndpointConfiguration): Reactivating CPU overuse detection as it might be the cause of the bots regressions.
1490
1491 2017-06-29  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1492
1493         [Curl] ResourceHandleManager violate the class responsibility of ResourceHandle
1494         https://bugs.webkit.org/show_bug.cgi?id=173630
1495
1496         Reviewed by Alex Christensen.
1497
1498         * platform/network/ResourceHandle.h:
1499         * platform/network/curl/ResourceHandleCurl.cpp:
1500         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
1501         (WebCore::calculateWebTimingInformations):
1502         (WebCore::handleLocalReceiveResponse):
1503         (WebCore::writeCallback):
1504         (WebCore::isHttpInfo):
1505         (WebCore::isHttpRedirect):
1506         (WebCore::isHttpAuthentication):
1507         (WebCore::isHttpNotModified):
1508         (WebCore::isAppendableHeader):
1509         (WebCore::removeLeadingAndTrailingQuotes):
1510         (WebCore::getProtectionSpace):
1511         (WebCore::headerCallback):
1512         (WebCore::readCallback):
1513         (WebCore::getFormElementsCount):
1514         (WebCore::setupFormData):
1515         (WebCore::ResourceHandle::setupPUT):
1516         (WebCore::ResourceHandle::setupPOST):
1517         (WebCore::ResourceHandle::handleDataURL):
1518         (WebCore::ResourceHandle::dispatchSynchronousJob):
1519         (WebCore::ResourceHandle::applyAuthentication):
1520         (WebCore::ResourceHandle::initialize):
1521         (WebCore::ResourceHandle::handleCurlMsg):
1522         * platform/network/curl/ResourceHandleManager.cpp:
1523         (WebCore::ResourceHandleManager::downloadTimerCallback):
1524         (WebCore::ResourceHandleManager::startJob):
1525         (WebCore::calculateWebTimingInformations): Deleted.
1526         (WebCore::isHttpInfo): Deleted.
1527         (WebCore::isHttpRedirect): Deleted.
1528         (WebCore::isHttpAuthentication): Deleted.
1529         (WebCore::isHttpNotModified): Deleted.
1530         (WebCore::handleLocalReceiveResponse): Deleted.
1531         (WebCore::writeCallback): Deleted.
1532         (WebCore::isAppendableHeader): Deleted.
1533         (WebCore::removeLeadingAndTrailingQuotes): Deleted.
1534         (WebCore::getProtectionSpace): Deleted.
1535         (WebCore::headerCallback): Deleted.
1536         (WebCore::readCallback): Deleted.
1537         (WebCore::getFormElementsCount): Deleted.
1538         (WebCore::setupFormData): Deleted.
1539         (WebCore::ResourceHandleManager::setupPUT): Deleted.
1540         (WebCore::ResourceHandleManager::setupPOST): Deleted.
1541         (WebCore::handleDataURL): Deleted.
1542         (WebCore::ResourceHandleManager::dispatchSynchronousJob): Deleted.
1543         (WebCore::ResourceHandleManager::applyAuthenticationToRequest): Deleted.
1544         (WebCore::ResourceHandleManager::initializeHandle): Deleted.
1545         * platform/network/curl/ResourceHandleManager.h:
1546
1547 2017-06-29  Said Abou-Hallawa  <sabouhallawa@apple.com>
1548
1549         Async image decoding should be disabled for iBooks on tvOS
1550         https://bugs.webkit.org/show_bug.cgi?id=173945
1551
1552         Reviewed by Simon Fraser.
1553
1554         The iBooks on tvOS is an AppStore application. We need to disable async
1555         image decoding for iBooks on tvOS permanently through WebKit.
1556
1557         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
1558         (WebCore::IOSApplication::isIBooks):
1559         * platform/graphics/BitmapImage.cpp:
1560         (WebCore::BitmapImage::updateFromSettings):
1561
1562 2017-06-29  Sam Weinig  <sam@webkit.org>
1563
1564         [WebIDL] Add a new extended attribute to model the forced return value optimization used on Node and Crypto
1565         https://bugs.webkit.org/show_bug.cgi?id=173961
1566
1567         Reviewed by Darin Adler.
1568
1569         Node and Crypto were both using custom bindings to implement an optimization
1570         for operations that always returned one one of the arguments passed in. The
1571         optimization directly returns the JSValue argument, avoiding wrapping and 
1572         unwrapping, and all the cache lookups that might entail. This allows that 
1573         optimization to work without custom bindings by adding a new extended attribute
1574         [ReturnValue] that can annotate an argument. When used, the implementation
1575         function is expected to return either void or ExceptionOr<void>.
1576
1577         * CMakeLists.txt:
1578         * WebCore.xcodeproj/project.pbxproj:
1579         * bindings/js/JSBindingsAllInOne.cpp:
1580         * bindings/js/JSCryptoCustom.cpp: Removed.
1581         Remove JSCryptoCustom.cpp.
1582
1583         * bindings/js/JSNodeCustom.cpp:
1584         (WebCore::JSNode::insertBefore): Deleted.
1585         (WebCore::JSNode::replaceChild): Deleted.
1586         (WebCore::JSNode::removeChild): Deleted.
1587         (WebCore::JSNode::appendChild): Deleted.
1588         Remove custom functions.
1589
1590         * bindings/scripts/CodeGeneratorJS.pm:
1591         (OperationHasForcedReturnValue):
1592         Add helper to determine if an operation has [ReturnValue] on any argument.
1593
1594         (NeedsExplicitPropagateExceptionCall):
1595         We must treat operations with a [ReturnValue] argument like we do operations
1596         returning void, and explicitly check for exceptions.
1597
1598         (GenerateParametersCheck):
1599         Pull out the argument in a variable called 'returnValue' if it is annotated
1600         with [ReturnValue].
1601
1602         (GenerateImplementationFunctionCall):
1603         Special case operations with a [ReturnValue] argument to return the previously
1604         set aside 'returnValue' variable.
1605
1606         * bindings/scripts/IDLAttributes.json:
1607         Add [ReturnValue].
1608
1609         * bindings/scripts/test/JS/JSTestObj.cpp:
1610         (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationBody):
1611         (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimization):
1612         (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithExceptionBody):
1613         (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithException):
1614         * bindings/scripts/test/TestObj.idl:
1615         Add tests for [ReturnValue].
1616
1617         * dom/Node.idl:
1618         * page/Crypto.idl:
1619         Add [ReturnValue] annotations and remove [Custom] annotations.
1620
1621 2017-06-29  Chris Dumez  <cdumez@apple.com>
1622
1623         Unreviewed, rolling out r218944.
1624
1625         Optimization is incorrect
1626
1627         Reverted changeset:
1628
1629         "Avoid copying ResourceLoadStatistics objects"
1630         https://bugs.webkit.org/show_bug.cgi?id=173972
1631         http://trac.webkit.org/changeset/218944
1632
1633 2017-06-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1634
1635         REGRESSION(r218896): ASSERT in WebPageProxy::dataCallback
1636         https://bugs.webkit.org/show_bug.cgi?id=173968
1637
1638         Reviewed by Michael Catanzaro.
1639
1640         The problem is that WebPageProxy::getLoadDecisionForIcon() sends 0 as callback ID when the decision is to not
1641         load the icon. Since r218896 we always notify the client even when the decision is to not load the icon, in
1642         which case the UI doesn't really expect a callback. When WebPageProxy::dataCallback is called with a 0 callback ID,
1643         CallbackMap::take() crashes in RELEASE_ASSERT(callbackID).
1644
1645         Fixes several GTK+ unit tests that are crashing.
1646
1647         * loader/DocumentLoader.cpp:
1648         (WebCore::DocumentLoader::didGetLoadDecisionForIcon): Return earlier if decision is false or frame is nullptr.
1649         (WebCore::DocumentLoader::finishedLoadingIcon): Move RELEASE_ASSERT to notifyFinishedLoadingIcon().
1650         (WebCore::DocumentLoader::notifyFinishedLoadingIcon): Assert if callbackIdentifier is 0 or m_frame is nullptr,
1651         since it's no longer expected to happen.
1652
1653 2017-06-29  Chris Dumez  <cdumez@apple.com>
1654
1655         statistics.mostRecentUserInteraction should be of type WallTime
1656         https://bugs.webkit.org/show_bug.cgi?id=173974
1657
1658         Reviewed by Brent Fulgham.
1659
1660         statistics.mostRecentUserInteraction should be of type WallTime for clarity.
1661
1662         * loader/ResourceLoadObserver.cpp:
1663         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
1664         (WebCore::ResourceLoadObserver::logUserInteraction):
1665         (WebCore::ResourceLoadObserver::clearUserInteraction):
1666         * loader/ResourceLoadStatistics.cpp:
1667         (WebCore::ResourceLoadStatistics::encode):
1668         (WebCore::ResourceLoadStatistics::decode):
1669         (WebCore::ResourceLoadStatistics::toString):
1670         (WebCore::ResourceLoadStatistics::merge):
1671         * loader/ResourceLoadStatistics.h:
1672         (WebCore::ResourceLoadStatistics::mostRecentUserInteractionTime): Deleted.
1673         * loader/ResourceLoadStatisticsStore.cpp:
1674         (WebCore::shouldPartitionCookies):
1675         (WebCore::ResourceLoadStatisticsStore::hasHadRecentUserInteraction):
1676         (WebCore::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):
1677
1678 2017-06-29  JF Bastien  <jfbastien@apple.com>
1679
1680         WebAssembly: disable some APIs under CSP
1681         https://bugs.webkit.org/show_bug.cgi?id=173892
1682         <rdar://problem/32914613>
1683
1684         Reviewed by Daniel Bates.
1685
1686         This does the basic separation of eval-blocked and
1687         WebAssembly-blocked, but currently only blocks neither or both. I
1688         think we'll eventually consider allowing one to be blocked but not
1689         the other, so this separation makes sense and means that when we
1690         want to do the change it'll be tiny. At a minimum we want a
1691         different error message, which this patch provides (a lot of the
1692         code ties blocking to the error message).
1693
1694         Tests: http/tests/security/contentSecurityPolicy/WebAssembly-allowed.html
1695                http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-about-blank-iframe.html
1696                http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-external-script.html
1697                http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-subframe.html
1698                http/tests/security/contentSecurityPolicy/WebAssembly-blocked.html
1699
1700         * bindings/js/ScriptController.cpp:
1701         (WebCore::ScriptController::enableWebAssembly):
1702         (WebCore::ScriptController::disableWebAssembly):
1703         * bindings/js/ScriptController.h:
1704         * bindings/js/WorkerScriptController.cpp:
1705         (WebCore::WorkerScriptController::disableWebAssembly):
1706         * bindings/js/WorkerScriptController.h:
1707         * dom/Document.cpp:
1708         (WebCore::Document::disableWebAssembly):
1709         * dom/Document.h:
1710         * dom/ScriptExecutionContext.h:
1711         * page/csp/ContentSecurityPolicy.cpp:
1712         (WebCore::ContentSecurityPolicy::didCreateWindowProxy):
1713         (WebCore::ContentSecurityPolicy::applyPolicyToScriptExecutionContext):
1714         * page/csp/ContentSecurityPolicy.h:
1715         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
1716         (WebCore::ContentSecurityPolicyDirectiveList::create):
1717         * page/csp/ContentSecurityPolicyDirectiveList.h:
1718         (WebCore::ContentSecurityPolicyDirectiveList::webAssemblyDisabledErrorMessage):
1719         (WebCore::ContentSecurityPolicyDirectiveList::setWebAssemblyDisabledErrorMessage):
1720         * workers/WorkerGlobalScope.cpp:
1721         (WebCore::WorkerGlobalScope::disableWebAssembly):
1722         * workers/WorkerGlobalScope.h:
1723
1724 2017-06-29  Zalan Bujtas  <zalan@apple.com>
1725
1726         Make InlineBox::m_topLeft and m_logicalWidth protected.
1727         https://bugs.webkit.org/show_bug.cgi?id=173973
1728
1729         Reviewed by Simon Fraser.
1730
1731         I don't think this reasoning from 10 years ago is valid anymore -> 
1732           "FIXME: Would like to make this protected, but methods are accessing these members over in the part."
1733         (comment was conveniently removed in a later commit).
1734
1735         No change in functionality.
1736
1737         * rendering/InlineBox.h:
1738         (WebCore::InlineBox::InlineBox):
1739
1740 2017-06-29  Wenson Hsieh  <wenson_hsieh@apple.com>
1741
1742         [iOS DnD] Adopt +objectWithItemProviderData: for serializing NSItemProviderReading-conformant objects
1743         https://bugs.webkit.org/show_bug.cgi?id=173971
1744         <rdar://problem/33006605>
1745
1746         Reviewed by Tim Horton.
1747
1748         Moves off of a very-recently-deprecated API, in favor of its replacement. Guarded by a runtime check and staging
1749         declarations. No change in behavior.
1750
1751         * platform/ios/WebItemProviderPasteboard.mm:
1752         (-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):
1753
1754 2017-06-29  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1755
1756         [Curl] Separate global curl settings from ResourceHandleManager as CurlContext class
1757         https://bugs.webkit.org/show_bug.cgi?id=173629
1758
1759         Reviewed by Alex Christensen.
1760
1761         * PlatformWinCairo.cmake:
1762         * platform/network/curl/CookieJarCurl.cpp:
1763         (WebCore::setCookiesFromDOM):
1764         (WebCore::cookiesForSession):
1765         * platform/network/curl/CurlContext.cpp: Added.
1766         (WebCore::certificatePath):
1767         (WebCore::cookieJarPath):
1768         (WebCore::CurlContext::CurlContext):
1769         (WebCore::CurlContext::~CurlContext):
1770         (WebCore::CurlContext::initCookieSession):
1771         (WebCore::CurlContext::ProxyInfo::url):
1772         (WebCore::CurlContext::setProxyInfo):
1773         (WebCore::CurlContext::getEffectiveURL):
1774         (WebCore::CurlContext::createMultiHandle):
1775         (WebCore::CurlContext::mutexFor):
1776         (WebCore::CurlContext::lock):
1777         (WebCore::CurlContext::unlock):
1778         * platform/network/curl/CurlContext.h: Added.
1779         (WebCore::CurlContext::singleton):
1780         (WebCore::CurlContext::curlShareHandle):
1781         (WebCore::CurlContext::getCookieJarFileName):
1782         (WebCore::CurlContext::setCookieJarFileName):
1783         (WebCore::CurlContext::getCertificatePath):
1784         (WebCore::CurlContext::shouldIgnoreSSLErrors):
1785         (WebCore::CurlContext::proxyInfo):
1786         (WebCore::CurlContext::setProxyInfo):
1787         (WebCore::CurlContext::getLogFile):
1788         (WebCore::CurlContext::isVerbose):
1789         * platform/network/curl/CurlDownload.cpp:
1790         (WebCore::CurlDownload::init):
1791         (WebCore::CurlDownload::start):
1792         (WebCore::CurlDownload::cancel):
1793         (WebCore::CurlDownload::didReceiveHeader):
1794         * platform/network/curl/CurlDownload.h:
1795         * platform/network/curl/CurlJobManager.cpp: Renamed from Source/WebCore/platform/network/curl/CurlManager.cpp.
1796         (WebCore::CurlJobManager::CurlJobManager):
1797         (WebCore::CurlJobManager::~CurlJobManager):
1798         (WebCore::CurlJobManager::add):
1799         (WebCore::CurlJobManager::remove):
1800         (WebCore::CurlJobManager::getActiveCount):
1801         (WebCore::CurlJobManager::getPendingCount):
1802         (WebCore::CurlJobManager::startThreadIfNeeded):
1803         (WebCore::CurlJobManager::stopThread):
1804         (WebCore::CurlJobManager::stopThreadIfIdle):
1805         (WebCore::CurlJobManager::updateHandleList):
1806         (WebCore::CurlJobManager::addToCurl):
1807         (WebCore::CurlJobManager::removeFromCurl):
1808         (WebCore::CurlJobManager::workerThread):
1809         * platform/network/curl/CurlJobManager.h: Renamed from Source/WebCore/platform/network/curl/CurlManager.h.
1810         (WebCore::CurlJobManager::singleton):
1811         * platform/network/curl/ResourceHandleManager.cpp:
1812         (WebCore::ResourceHandleManager::ResourceHandleManager):
1813         (WebCore::ResourceHandleManager::~ResourceHandleManager):
1814         (WebCore::handleLocalReceiveResponse):
1815         (WebCore::getProtectionSpace):
1816         (WebCore::headerCallback):
1817         (WebCore::ResourceHandleManager::downloadTimerCallback):
1818         (WebCore::ResourceHandleManager::initializeHandle):
1819         (WebCore::certificatePath): Deleted.
1820         (WebCore::cookieJarPath): Deleted.
1821         (WebCore::ResourceHandleManager::setCookieJarFileName): Deleted.
1822         (WebCore::ResourceHandleManager::getCookieJarFileName): Deleted.
1823         (WebCore::ResourceHandleManager::setProxyInfo): Deleted.
1824         (WebCore::ResourceHandleManager::initCookieSession): Deleted.
1825         * platform/network/curl/ResourceHandleManager.h:
1826         (): Deleted.
1827
1828 2017-06-29  Chris Dumez  <cdumez@apple.com>
1829
1830         Avoid copying ResourceLoadStatistics objects
1831         https://bugs.webkit.org/show_bug.cgi?id=173972
1832
1833         Reviewed by Geoffrey Garen.
1834
1835         Avoid copying ResourceLoadStatistics objects given that they are big. Make the type move-only
1836         to avoid such mistakes in the future.
1837
1838         * loader/ResourceLoadObserver.cpp:
1839         (WebCore::ResourceLoadObserver::logFrameNavigation):
1840         * loader/ResourceLoadStatistics.h:
1841         (WebCore::ResourceLoadStatistics::ResourceLoadStatistics):
1842
1843 2017-06-29  Antoine Quint  <graouts@apple.com>
1844
1845         Full stop shows to the right of the picture-in-picture localised string in Hebrew
1846         https://bugs.webkit.org/show_bug.cgi?id=173966
1847         <rdar://problem/32847376>
1848
1849         Reviewed by Dean Jackson.
1850
1851         We manually set the CSS "direction" property to "rtl" when we're not using an LTR language for a placard.
1852
1853         Test: media/modern-media-controls/placard/placard-ltr.html
1854
1855         * Modules/modern-media-controls/controls/placard.css:
1856         (.media-controls:not(.uses-ltr-user-interface-layout-direction) .placard):
1857
1858 2017-06-29  Brent Fulgham  <bfulgham@apple.com>
1859
1860         Unreviewed Apple CMake build after r218901
1861
1862         I did not add 'cocoa/FileMonitorCocoa.mm' to the PlatformMac.cmake file as part of r218901.):
1863
1864         * PlatformMac.cmake:
1865
1866 2017-06-29  Frederic Wang  <fwang@igalia.com>
1867
1868         Small improvement of calls to RenderLayerBacking members
1869         https://bugs.webkit.org/show_bug.cgi?id=173969
1870
1871         Reviewed by Simon Fraser.
1872
1873         No new tests, behavior unchanged.
1874
1875         * page/FrameView.cpp:
1876         (WebCore::FrameView::tiledBacking): Access the member with RenderLayerBacking::tiledBacking.
1877         (WebCore::FrameView::updateTilesForExtendedBackgroundMode): Ditto.
1878         * rendering/RenderLayer.cpp:
1879         (WebCore::RenderLayer::usesCompositedScrolling): Use RenderLayerBacking::hasScrollingLayer as
1880         it better matches the intention of the check here.
1881
1882 2017-06-29  Romain Bellessort  <romain.bellessort@crf.canon.fr>
1883
1884         [Readable Streams API] Fix ReadableStream "strategy" argument handling
1885         https://bugs.webkit.org/show_bug.cgi?id=172716
1886
1887         Reviewed by Xabier Rodriguez-Calvar.
1888
1889         Aligned default strategy parameter with spec, as defined in [1].
1890         
1891         [1] https://streams.spec.whatwg.org/#rs-constructor
1892
1893         Added new tests and updated some existing ones based on the newly
1894         expected behavior. Also updated expectations for WPT streams tests.
1895
1896         * Modules/streams/ReadableStream.js:
1897         (initializeReadableStream): Fixed initialization of strategy.
1898
1899 2017-06-29  Antti Koivisto  <antti@apple.com>
1900
1901         REGRESSION(r215347): NAS4Free Pop-down menus fail to appear
1902         https://bugs.webkit.org/show_bug.cgi?id=173967
1903         <rdar://problem/32690114>
1904
1905         Reviewed by Andreas Kling.
1906
1907         Menus on this configuration page operate by mutating visibility. We fail to trigger required
1908         compositing updates when visibility changes on non-composited layer. Visibility of a non-composited
1909         descendant may affect geometry of the composited ancestor layer.
1910
1911         Test: compositing/backing/non-composited-visibility-change.html
1912
1913         * rendering/RenderLayerCompositor.cpp:
1914         (WebCore::RenderLayerCompositor::layerStyleChanged):
1915         (WebCore::RenderLayerCompositor::needsCompositingUpdateForStyleChangeOnNonCompositedLayer): Added.
1916
1917             Trigger compositing update for non-composited layers on visibility change.
1918             Factor tests into function.
1919
1920         * rendering/RenderLayerCompositor.h:
1921
1922 2017-06-28  Frederic Wang  <fwang@igalia.com>
1923
1924         Align Document::canNavigate on the HTM5 specification
1925         https://bugs.webkit.org/show_bug.cgi?id=173162
1926
1927         Reviewed by Chris Dumez.
1928
1929         Currently when a frame A with a sandboxed navigation flag tries and navigates another frame B
1930         then Document::canNavigate verifies the cases where we try to navigate A's top frame (in
1931         that case the allow-top-navigation flag is needed) or not (in that case, B must be a
1932         descendant of A). This patch refines that a bit to check the case where B is a popup (in that
1933         case navigation is permitted if A is the opener of B). This change aligns on the HTML5
1934         specification and allows to pass more W3C Web Platform tests.
1935         See https://html.spec.whatwg.org/multipage/browsers.html#allowed-to-navigate
1936
1937         Tests: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html
1938                imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html
1939
1940         * dom/Document.cpp:
1941         (WebCore::Document::canNavigate): This refines the case where the document's frame has the
1942         sandbox navigation flag set in order to handle popup navigation. New comments referring to
1943         the HTML5 specification are also added.
1944
1945 2017-06-28  Myles C. Maxfield  <mmaxfield@apple.com>
1946
1947         Only apply font features for the particular type of font they are being applied to
1948         https://bugs.webkit.org/show_bug.cgi?id=172661
1949         <rdar://problem/31534119>
1950         <rdar://problem/32799624>
1951
1952         Reviewed by Simon Fraser.
1953
1954         There are two types of font formats which support features: AAT and OTF. Each of them has
1955         a different idea about what the identity of a feature is. We were specifying both types
1956         of feature identities to Core Text; however, this is causing Core Text to get confused.
1957         Instead, we should only apply AAT features to AAT fonts and OTF features to OTF fonts.
1958
1959         Test: Un-marking these tests as failure on High Sierra:
1960               css3/font-variant-petite-caps-synthesis-coverage.html
1961               css3/font-variant-small-caps-synthesis-coverage.html
1962
1963         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1964         (WebCore::FontType::FontType):
1965         (WebCore::preparePlatformFont):
1966         (WebCore::variationCapabilitiesForFontDescriptor):
1967         (WebCore::isGXVariableFont): Deleted.
1968
1969 2017-06-28  Chris Dumez  <cdumez@apple.com>
1970
1971         [ResourceLoadStatistics] Simplify PrevalentResourceTelemetry struct
1972         https://bugs.webkit.org/show_bug.cgi?id=173953
1973
1974         Reviewed by Sam Weinig.
1975
1976         * loader/ResourceLoadStatisticsStore.cpp:
1977         (WebCore::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):
1978         * loader/ResourceLoadStatisticsStore.h:
1979         (WebCore::PrevalentResourceTelemetry::PrevalentResourceTelemetry): Deleted.
1980
1981 2017-06-28  Ryosuke Niwa  <rniwa@webkit.org>
1982
1983         Crash in WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange
1984         https://bugs.webkit.org/show_bug.cgi?id=173958
1985
1986         Reviewed by Simon Fraser.
1987
1988         The crashed is most likely caused by updateLayersAfterAncestorChange calling [CALayer setPosition]
1989         with a CGPoint which contains the x coordinate or the y coordinate of NaN.
1990
1991         Simon and I inpected the code but we couldn't figure out how we get there. Detect this case and bail out.
1992         Also log the relevant values and debug assert when this condition is hit to help identifying the root cause.
1993
1994         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1995         (WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):
1996
1997 2017-06-28  Chris Dumez  <cdumez@apple.com>
1998
1999         ResourceLoadObserver clean up
2000         https://bugs.webkit.org/show_bug.cgi?id=173955
2001
2002         Reviewed by Sam Weinig and Brent Fulgham.
2003
2004         ResourceLoadObserver clean up: Modernize code a bit and get rid of unused variables.
2005
2006         * loader/ResourceLoadObserver.cpp:
2007         (WebCore::ResourceLoadObserver::clearInMemoryStore):
2008         (WebCore::ResourceLoadObserver::clearInMemoryAndPersistentStore):
2009         (WebCore::ResourceLoadObserver::shouldLog):
2010         (WebCore::ResourceLoadObserver::logFrameNavigation):
2011         (WebCore::ResourceLoadObserver::logSubresourceLoading):
2012         (WebCore::ResourceLoadObserver::logWebSocketLoading):
2013         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
2014         (WebCore::ResourceLoadObserver::logUserInteraction):
2015         (WebCore::ResourceLoadObserver::setSubframeUnderTopFrameOrigin):
2016         (WebCore::ResourceLoadObserver::setSubresourceUnderTopFrameOrigin):
2017         (WebCore::ResourceLoadObserver::setSubresourceUniqueRedirectTo):
2018         (WebCore::ResourceLoadObserver::fireDataModificationHandler):
2019         (WebCore::ResourceLoadObserver::fireShouldPartitionCookiesHandler):
2020         (WebCore::ResourceLoadObserver::primaryDomain):
2021         (WebCore::ResourceLoadObserver::statisticsForOrigin):
2022
2023 2017-06-28  Zalan Bujtas  <zalan@apple.com>
2024
2025         Move RenderEmbeddedObject::isReplacementObscured to HTMLPlugInElement
2026         https://bugs.webkit.org/show_bug.cgi?id=173802
2027         <rdar://problem/32884389>
2028
2029         Reviewed by Simon Fraser.
2030
2031         Hittesting could potentially destroy "this" renderer so calling it inside RenderEmbeddedObject
2032         could leave the caller with a stale pointer.
2033         This patch protects the plugin element from getting destroyed and checks if the renderer got
2034         deleted during the hittest to avoid nullptr dereference.
2035
2036         Speculative fix.
2037
2038         * html/HTMLPlugInElement.cpp:
2039         (WebCore::HTMLPlugInElement::isReplacementObscured):
2040         * html/HTMLPlugInElement.h:
2041         * rendering/RenderEmbeddedObject.cpp:
2042         (WebCore::RenderEmbeddedObject::isReplacementObscured): Deleted.
2043         * rendering/RenderEmbeddedObject.h:
2044         * testing/Internals.cpp:
2045         (WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
2046
2047 2017-06-28  Chris Dumez  <cdumez@apple.com>
2048
2049         Avoid copying statistics in ResourceLoadStatisticsStore::readDataFromDecoder()
2050         https://bugs.webkit.org/show_bug.cgi?id=173951
2051
2052         Reviewed by Ryosuke Niwa.
2053
2054         * loader/ResourceLoadStatisticsStore.cpp:
2055         (WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):
2056
2057 2017-06-28  Ryosuke Niwa  <rniwa@webkit.org>
2058
2059         Safari's Speedometer score massively regresses when accessibility is enabled
2060         https://bugs.webkit.org/show_bug.cgi?id=173912
2061
2062         Reviewed by Chris Fleizach.
2063
2064         The bug was caused by HTMLTextFormControlElement::setInnerTextValue triggering a synchronous layout
2065         via constructing VisiblePosition when the accessibility tree is present.
2066
2067         Added AXObjectCache::postTextReplacementNotificationForTextControl which avoids the construction of
2068         VisiblePosition and other means of triggering a synchronous layout. This patch also fixes a subtle bug
2069         that HTMLTextFormControlElement was creating TextMarkerData with axID set to that of the text control
2070         element instead of the root editable element inside its shadow tree even though the typing command uses
2071         axID of the root editable element. While I couldn't find any user-visible behavioral change from this
2072         code change, new code is more self-consistent.
2073
2074         Also added LayoutDisallowedScope which asserts that no synchronous layout happens in setInnerTextValue
2075         so that we don't introduce a new performance regression like this in the future.
2076
2077         No new tests. Existing tests in accessibility directory covers this.
2078
2079         * CMakeLists.txt: Added LayoutDisallowedScope.cpp.
2080         * WebCore.xcodeproj/project.pbxproj: Ditto.
2081
2082         * accessibility/AXObjectCache.cpp:
2083         (WebCore::AXObjectCache::postTextReplacementNotificationForTextControl): Added.
2084         (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): Modernized. Returns optional<TextMarkerData>
2085         instead of taking TextMarkerData as an out-argument, and returning with axID of 0.
2086         (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl): Added. This specialized version
2087         constructs TextMarkerData for the first position inside the editable region in a text control without
2088         triggering a synchronous layout.
2089
2090         * accessibility/AXObjectCache.h:
2091         (WebCore::TextMarkerData): Initialize each member automatically.
2092         (WebCore::AXObjectCache::postTextReplacementNotificationForTextControl):
2093
2094         * accessibility/ios/AXObjectCacheIOS.mm:
2095         (WebCore::AXObjectCache::postTextReplacementPlatformNotificationForTextControl): Added.
2096
2097         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2098         (+[WebAccessibilityTextMarker textMarkerWithVisiblePosition:cache:]):
2099
2100         * accessibility/mac/AXObjectCacheMac.mm:
2101         (WebCore::addTextMarkerFor): Extracted from textReplacementChangeDictionary. Added a new variant which
2102         takes a text form control instead.
2103         (WebCore::textReplacementChangeDictionary): Templatized this function to either take VisiblePosition
2104         and call textMarkerForVisiblePosition or take HTMLTextFormControlElement and call
2105         textMarkerForFirstPositionInTextControl.
2106         (WebCore::postUserInfoForChanges): Extracted from postTextReplacementPlatformNotification.
2107         (WebCore::AXObjectCache::postTextReplacementPlatformNotification): 
2108         (WebCore::AXObjectCache::postTextReplacementPlatformNotificationForTextControl): Added.
2109
2110         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
2111         * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
2112
2113         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2114         (textMarkerForVisiblePosition):
2115         (-[WebAccessibilityObjectWrapper textMarkerForFirstPositionInTextControl:]): Added.
2116
2117         * dom/Document.cpp:
2118         (WebCore::Document::updateLayout): Assert that LayoutDisallowedScope is not in the stack frame.
2119
2120         * html/HTMLTextFormControlElement.cpp:
2121         (WebCore::HTMLTextFormControlElement::setInnerTextValue): Call postTextReplacementNotificationForTextControl
2122         to avoid triggering a synchronous layout. Also create LayoutDisallowedScope to avoid a similar performance
2123         regression from being introduced in the future in this function. Finally, made innerText a RefPtr for extra
2124         safety since we're using it after updating the DOM tree.
2125
2126         * rendering/LayoutDisallowedScope.cpp: Added.
2127         * rendering/LayoutDisallowedScope.h: Added.
2128         (WebCore::LayoutDisallowedScope::LayoutDisallowedScope):
2129         (WebCore::LayoutDisallowedScope::~LayoutDisallowedScope):
2130         (WebCore::LayoutDisallowedScope::isLayoutAllowed):
2131
2132 2017-06-27  Myles C. Maxfield  <mmaxfield@apple.com>
2133
2134         [iOS] Cannot italicize or bold text rendered with text styles
2135         https://bugs.webkit.org/show_bug.cgi?id=173634
2136
2137         Reviewed by Darin Adler.
2138
2139         r218616 enabled the new cascade list codepath for "system-ui," but didn't do it for the named
2140         text styles (like "font: -apple-system-tall-body;"). This new codepath is better because it
2141         correctly specifies weights and italics (using kCTFontWeightTrait and kCTFontSlantTrait) instead
2142         of using symbolic traits, and because it correctly handles fonts in the Core Text fallback chain.
2143         This patch migrates the named text styles to this new codepath.
2144
2145         Test: fast/text/ipad/bold-tall-body-text-style.html
2146
2147         * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
2148         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParameters):
2149         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::isHashTableDeletedValue):
2150         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::operator==):
2151         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::hash):
2152         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParametersHash::hash):
2153         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParametersHash::equal):
2154         (WebCore::SystemFontDatabase::systemFontCascadeList):
2155         (WebCore::convertArray):
2156         (WebCore::convertArray):
2157         (WebCore::makeNeverDestroyed):
2158         (WebCore::isUIFontTextStyle):
2159         (WebCore::systemFontParameters):
2160         (WebCore::FontCascadeDescription::effectiveFamilyCount):
2161         (WebCore::FontCascadeDescription::effectiveFamilyAt):
2162         (WebCore::SystemFontDatabase::CoreTextCascadeListParametersHash::hash): Deleted.
2163         (WebCore::SystemFontDatabase::CoreTextCascadeListParametersHash::equal): Deleted.
2164         * platform/graphics/ios/FontCacheIOS.mm:
2165         (WebCore::platformFontWithFamilySpecialCase):
2166
2167 2017-06-28  Devin Rousso  <drousso@apple.com>
2168
2169         Web Inspector: Instrument active pixel memory used by canvases
2170         https://bugs.webkit.org/show_bug.cgi?id=173087
2171         <rdar://problem/32719261>
2172
2173         Reviewed by Joseph Pecoraro.
2174
2175         Test: inspector/canvas/memory.html
2176
2177         * html/HTMLCanvasElement.cpp:
2178         (WebCore::HTMLCanvasElement::setImageBuffer):
2179         * inspector/InspectorCanvasAgent.h:
2180         * inspector/InspectorCanvasAgent.cpp:
2181         (WebCore::InspectorCanvasAgent::didChangeCanvasMemory):
2182         (WebCore::InspectorCanvasAgent::buildObjectForCanvas):
2183         * inspector/InspectorInstrumentation.h:
2184         * inspector/InspectorInstrumentation.cpp:
2185         (WebCore::InspectorInstrumentation::didChangeCanvasMemory):
2186         (WebCore::InspectorInstrumentation::didChangeCanvasMemoryImpl):
2187
2188 2017-06-28  Alex Christensen  <achristensen@webkit.org>
2189
2190         Prevent displaying URLs with small capital letters
2191         https://bugs.webkit.org/show_bug.cgi?id=173949
2192         <rdar://problem/32952058>
2193
2194         Reviewed by Brent Fulgham.
2195
2196         Covered by new API tests.
2197
2198         * platform/mac/WebCoreNSURLExtras.mm:
2199         (WebCore::isLookalikeCharacter):
2200
2201 2017-06-28  Youenn Fablet  <youenn@apple.com>
2202
2203         Support PeerConnectionStates::BundlePolicy::MaxBundle when setting rtc configuration
2204         https://bugs.webkit.org/show_bug.cgi?id=169389
2205
2206         Reviewed by Alex Christensen.
2207
2208         Covered by manual testing (appr.tc and https://youennf.github.io/webrtc-tests/src/content/peerconnection/trickle-ice/).
2209         Previously, we were creating a libwebrtc peer connection and then setting its configuration.
2210         libwebrtc does not like the configuration to be changed and may refuse to set the configuration.
2211         Instead of doing that, we are now creating the libwebrtc peer connection with the provided configuration.
2212
2213         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
2214         (WebCore::MediaEndpointPeerConnection::setConfiguration):
2215         * Modules/mediastream/MediaEndpointPeerConnection.h:
2216         * Modules/mediastream/PeerConnectionBackend.h:
2217         * Modules/mediastream/RTCPeerConnection.cpp:
2218         (WebCore::RTCPeerConnection::initializeWith):
2219         (WebCore::iceServersFromConfiguration):
2220         (WebCore::RTCPeerConnection::initializeConfiguration):
2221         (WebCore::RTCPeerConnection::setConfiguration):
2222         * Modules/mediastream/RTCPeerConnection.h:
2223         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
2224         (WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
2225         (WebCore::LibWebRTCMediaEndpoint::setConfiguration):
2226         (WebCore::LibWebRTCMediaEndpoint::stop):
2227         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
2228         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
2229         (WebCore::configurationFromMediaEndpointConfiguration):
2230         (WebCore::LibWebRTCPeerConnectionBackend::setConfiguration):
2231         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
2232         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
2233         (WebCore::createActualPeerConnection):
2234         (WebCore::LibWebRTCProvider::createPeerConnection):
2235         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
2236
2237 2017-06-28  Brent Fulgham  <bfulgham@apple.com>
2238
2239         Teach ResourceLoadStatistics to recognize changes in the file system
2240         https://bugs.webkit.org/show_bug.cgi?id=173800
2241         <rdar://problem/32937842>
2242
2243         Reviewed by Chris Dumez.
2244
2245         We want to support the case where multiple UI processes choose to share the same
2246         statistics file. To support this, update the ResourceLoadStatistics logic to be aware
2247         that the statistics data file might change underneath it, and to take appropriate
2248         action when it does.
2249
2250         * WebCore.xcodeproj/project.pbxproj: Update for new sources.
2251         * WebCore/CMakeLists.txt: Update for new FileMonitor source file.
2252         * loader/ResourceLoadStatisticsStore.cpp:
2253         (WebCore::ResourceLoadStatisticsStore::clearInMemoryAndPersistent): Use the new deletion
2254         handler for the data file instead of writing out an empty file.
2255         (WebCore::ResourceLoadStatisticsStore::setDeletePersistentStoreCallback): Added.
2256         * loader/ResourceLoadStatisticsStore.h:
2257         * platform/FileMonitor.cpp: Added.
2258         (WebCore::FileMonitor::create):
2259         (WebCore::FileMonitor::FileMonitor): Register handlers and begin monitoring file.
2260         (WebCore::FileMonitor::~FileMonitor): Stop any active file monitoring.
2261         (WebCore::FileMonitor::startMonitoringPath): Stub implementation.
2262         (WebCore::FileMonitor::stopMonitoring): Ditto.
2263         * platform/FileMonitor.h: Added.
2264         * platform/FileSystem.h: Export files needed by WebKit2. Add support for O_EVTONLY
2265         Darwin file handles.
2266         * platform/Logging.h: Add 'ResourceLoadStatistics' category.
2267         * platform/cocoa/FileMonitorCocoa.mm: Added.
2268         (WebCore::FileMonitor::startMonitoringPath): Create a new VNODE type dispatch_source
2269         to receive notifications when the specified file changes.
2270         (WebCore::FileMonitor::stopMonitoring): Cancel the dispatch_source when we are done
2271         monitoring the file.
2272         * platform/posix/FileSystemPOSIX.cpp: Update 'openFile' to understand the O_EVTONLY
2273         mode of file handles (Darwin-only). 
2274
2275 2017-06-28  Brady Eidson  <beidson@apple.com>
2276
2277         DocumentLoader should always notify the client if there are pending icon loads when the load is stopped.
2278         https://bugs.webkit.org/show_bug.cgi?id=173874
2279
2280         Reviewed by Alex Christensen.
2281
2282         Covered by API tests.
2283
2284         Patch started by Carlos Garcia Campos, finished by me.
2285         
2286         * loader/DocumentLoader.cpp:
2287         (WebCore::DocumentLoader::stopLoading): Make all of the callbacks for cancelled IconLoaders.
2288         (WebCore::DocumentLoader::didGetLoadDecisionForIcon): Make the callback even if there's no IconLoader.
2289         (WebCore::DocumentLoader::finishedLoadingIcon):
2290         (WebCore::DocumentLoader::notifyFinishedLoadingIcon):
2291         * loader/DocumentLoader.h:
2292
2293 2017-06-28  Antoine Quint  <graouts@apple.com>
2294
2295         Volume controls should be hidden when AirPlay is active
2296         https://bugs.webkit.org/show_bug.cgi?id=173933
2297         <rdar://problem/33011931>
2298
2299         Reviewed by Dean Jackson.
2300
2301         Ensure we don't show any volume controls during AirPlay. We set the mute button's enabled state to "false"
2302         when AirPlay is active and key off this enabled stated to control the display of all volume-related controls
2303         throughout the UI.
2304
2305         Tests: media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-controls-hidden-when-mute-button-disabled.html
2306                media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-top-right-controls-bar-hidden-when-mute-button-disabled.html
2307
2308         * Modules/modern-media-controls/controls/inline-media-controls.js:
2309         (InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren):
2310         (InlineMediaControls):
2311         * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
2312         (MacOSFullscreenMediaControls.prototype.layout):
2313         * Modules/modern-media-controls/media/airplay-support.js:
2314         (AirplaySupport.prototype.syncControl):
2315         (AirplaySupport):
2316
2317 2017-06-28  Konstantin Tokarev  <annulen@yandex.ru>
2318
2319         Remove excessive includes from WebCore/css sources
2320         https://bugs.webkit.org/show_bug.cgi?id=173919
2321
2322         Reviewed by Simon Fraser.
2323
2324         No new tests needed.
2325
2326         * css/CSSCanvasValue.cpp:
2327         * css/CSSComputedStyleDeclaration.cpp:
2328         * css/CSSContentDistributionValue.cpp:
2329         * css/CSSCrossfadeValue.cpp:
2330         * css/CSSCursorImageValue.cpp:
2331         * css/CSSCustomPropertyValue.cpp:
2332         * css/CSSDefaultStyleSheets.cpp:
2333         * css/CSSFilterImageValue.cpp:
2334         * css/CSSFontFace.cpp:
2335         * css/CSSFontFaceSet.cpp:
2336         * css/CSSFontFaceSource.cpp:
2337         * css/CSSFontFaceSrcValue.cpp:
2338         * css/CSSFontFeatureValue.cpp:
2339         * css/CSSFontSelector.cpp:
2340         * css/CSSFontValue.cpp:
2341         * css/CSSImageGeneratorValue.cpp:
2342         * css/CSSImageSetValue.cpp:
2343         * css/CSSImageValue.cpp:
2344         * css/CSSImportRule.cpp:
2345         * css/CSSKeyframesRule.cpp:
2346         * css/CSSMediaRule.cpp:
2347         * css/CSSNamedImageValue.cpp:
2348         * css/CSSPrimitiveValue.cpp:
2349         * css/CSSProperty.cpp:
2350         * css/CSSPropertySourceData.cpp:
2351         * css/CSSReflectValue.cpp:
2352         * css/CSSRuleList.cpp:
2353         * css/CSSSegmentedFontFace.cpp:
2354         * css/CSSSelector.cpp:
2355         * css/CSSStyleRule.cpp:
2356         * css/CSSStyleSheet.cpp:
2357         * css/CSSSupportsRule.cpp:
2358         * css/CSSToStyleMap.cpp:
2359         * css/CSSValueList.cpp:
2360         * css/CSSValuePool.cpp:
2361         * css/CSSVariableData.cpp:
2362         * css/ElementRuleCollector.cpp:
2363         * css/InspectorCSSOMWrappers.cpp:
2364         * css/MediaList.cpp:
2365         * css/MediaQueryEvaluator.cpp:
2366         * css/MediaQueryExpression.cpp:
2367         * css/PropertySetCSSStyleDeclaration.cpp:
2368         * css/RGBColor.cpp:
2369         * css/SelectorChecker.cpp:
2370         * css/StyleProperties.cpp:
2371         * css/StyleResolver.cpp:
2372         * css/StyleRule.cpp:
2373         * css/StyleSheetContents.cpp:
2374         * css/TransformFunctions.cpp:
2375         * css/ViewportStyleResolver.cpp:
2376         * css/WebKitCSSRegionRule.cpp:
2377         * css/parser/CSSParser.cpp:
2378         * css/parser/CSSParserFastPaths.cpp:
2379         * css/parser/CSSParserIdioms.cpp:
2380         * css/parser/CSSParserSelector.cpp:
2381         * css/parser/CSSParserToken.cpp:
2382         * css/parser/CSSPropertyParser.cpp:
2383         * css/parser/CSSSelectorParser.cpp:
2384         * css/parser/MediaQueryParser.cpp:
2385
2386 2017-06-28  Alex Christensen  <achristensen@webkit.org>
2387
2388         Fix CMake build.
2389
2390         * PlatformMac.cmake:
2391
2392 2017-06-28  Antoine Quint  <graouts@apple.com>
2393
2394         Remove unnecessary `const double` method arguments
2395         https://bugs.webkit.org/show_bug.cgi?id=173925
2396
2397         Reviewed by Dean Jackson.
2398
2399         Addressing post-landing feedback from webkit.org/b/173858.
2400
2401         * Modules/mediacontrols/MediaControlsHost.cpp:
2402         (WebCore::MediaControlsHost::formattedStringForDuration):
2403         * Modules/mediacontrols/MediaControlsHost.h:
2404         * rendering/RenderTheme.h:
2405         (WebCore::RenderTheme::mediaControlsFormattedStringForDuration):
2406         * rendering/RenderThemeCocoa.h:
2407
2408 2017-06-28  Zalan Bujtas  <zalan@apple.com>
2409
2410         Unreviewed, rolling out r218373.
2411
2412         Output is not right
2413
2414         Reverted changeset:
2415
2416         "Use WTFLogAlways for debug logging so that it shows up in
2417         device system logs"
2418         https://bugs.webkit.org/show_bug.cgi?id=173450
2419         http://trac.webkit.org/changeset/218373
2420
2421 2017-06-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2422
2423         [GTK] Some web pages disappear immediately after rendering
2424         https://bugs.webkit.org/show_bug.cgi?id=173768
2425
2426         Reviewed by Xabier Rodriguez-Calvar.
2427
2428         This is happening with websites having a "hidden" class in HTML tag when a media element is added. In the GTK+
2429         port the media controls CSS contains the following code:
2430
2431         .hidden {
2432             display: none !important;
2433         }
2434
2435         That causes the whole HTML document to become display: none. That's why we just render a white page, and also
2436         the reason why it only happens with the GTK+ port and only with some specific websites. We should limit the
2437         scope of the hidden class to the media control elements.
2438
2439         * css/mediaControlsGtk.css:
2440         (audio::-webkit-media-controls-panel.hidden,):
2441         (audio::-webkit-media-controls-panel div.mute-box.hidden,):
2442         (audio::-webkit-media-controls-current-time-display.hidden,):
2443         (audio::-webkit-media-controls-timeline.hidden,):
2444         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
2445         (audio::-webkit-media-controls-toggle-closed-captions-button.hidden,):
2446         (video::-webkit-media-controls-closed-captions-container.hidden):
2447         (audio::-webkit-media-controls-fullscreen-button.hidden,):
2448         (.hidden): Deleted.
2449
2450 2017-06-28  Antoine Quint  <graouts@apple.com>
2451
2452         Media controls volume glyph does not have the correct material
2453         https://bugs.webkit.org/show_bug.cgi?id=173918
2454         <rdar://problem/33012697>
2455
2456         Reviewed by Eric Carlson.
2457
2458         Test: media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-mute-button-in-bottom-or-top-right-controls-bar.html
2459
2460         All buttons were hosted in a ControlsBar save for the MuteButton, so we now host it in a controls bar as well
2461         to ensure compositing is similar to all other buttons.
2462
2463         * Modules/modern-media-controls/controls/inline-media-controls.css:
2464         (.media-controls.inline > .controls-bar.top-right):
2465         (.media-controls.inline > button.mute): Deleted.
2466         * Modules/modern-media-controls/controls/inline-media-controls.js:
2467         (InlineMediaControls):
2468         (InlineMediaControls.prototype.layout):
2469         (InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren):
2470         * Modules/modern-media-controls/controls/macos-inline-media-controls.js:
2471         (MacOSInlineMediaControls.prototype.handleEvent):
2472
2473 2017-06-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2474
2475         REGRESSION(r218799): [GTK][WPE] Critical warning at exit
2476         https://bugs.webkit.org/show_bug.cgi?id=173907
2477
2478         Reviewed by Konstantin Tokarev.
2479
2480         GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
2481
2482         This is now always happening when closing the MeiniBrowser and it's causing a lot of unit tests to fail. In
2483         r218799, GRefPtrGtk.h include was removed from PasteboardHelper.h that contains a GRefPtr<GtkTargetList>. The
2484         targets are destroyed at exit, but now trying to use g_object_unref instead of gtk_target_list_unref(). I've
2485         found two more cases like this in r218799, that removes GUniquePtrSoup.h from ResourceHandleInternal.h and
2486         ResourceRequest.h that have GUniquePtr<SoupBuffer> and GUniquePtr<SoupURI>.
2487
2488         Fixes several GTK+ and WPE unit tests.
2489
2490         * platform/gtk/PasteboardHelper.h: Bring back GRefPtrGtk.h.
2491         * platform/network/ResourceHandleInternal.h: Bring back GUniquePtrSoup.h.
2492         * platform/network/soup/ResourceRequest.h: Ditto.
2493
2494 2017-06-27  Chris Dumez  <cdumez@apple.com>
2495
2496         [ResourceLoadStatistics] Update minimumTimeBetweeenDataRecordsRemoval to 1 hour instead of 1 minute
2497         https://bugs.webkit.org/show_bug.cgi?id=173895
2498         <rdar://problem/32984366>
2499
2500         Reviewed by Brent Fulgham.
2501
2502         Update minimumTimeBetweeenDataRecordsRemoval to 1 hour instead of 1 minute to save battery.
2503         Also port code to modern time types.
2504
2505         * loader/ResourceLoadObserver.cpp:
2506         (WebCore::reduceTimeResolution):
2507         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
2508         (WebCore::ResourceLoadObserver::setTimeToLiveUserInteraction):
2509         (WebCore::ResourceLoadObserver::setTimeToLiveCookiePartitionFree):
2510         (WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval):
2511         (WebCore::ResourceLoadObserver::setReducedTimestampResolution):
2512         (WebCore::ResourceLoadObserver::setGrandfatheringTime):
2513         * loader/ResourceLoadObserver.h:
2514         * loader/ResourceLoadStatistics.h:
2515         (WebCore::ResourceLoadStatistics::mostRecentUserInteractionTime):
2516         * loader/ResourceLoadStatisticsStore.cpp:
2517         (WebCore::ResourceLoadStatisticsStore::createEncoderFromData):
2518         (WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):
2519         (WebCore::shouldPartitionCookies):
2520         (WebCore::ResourceLoadStatisticsStore::setTimeToLiveUserInteraction):
2521         (WebCore::ResourceLoadStatisticsStore::setTimeToLiveCookiePartitionFree):
2522         (WebCore::ResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval):
2523         (WebCore::ResourceLoadStatisticsStore::setGrandfatheringTime):
2524         (WebCore::ResourceLoadStatisticsStore::hasHadRecentUserInteraction):
2525         (WebCore::ResourceLoadStatisticsStore::topPrivatelyControlledDomainsToRemoveWebsiteDataFor):
2526         (WebCore::ResourceLoadStatisticsStore::handleFreshStartWithEmptyOrNoStore):
2527         (WebCore::ResourceLoadStatisticsStore::shouldRemoveDataRecords):
2528         (WebCore::ResourceLoadStatisticsStore::dataRecordsBeingRemoved):
2529         * loader/ResourceLoadStatisticsStore.h:
2530
2531 2017-06-27  Chris Dumez  <cdumez@apple.com>
2532
2533         Port HysteresisActivity to Seconds type
2534         https://bugs.webkit.org/show_bug.cgi?id=173902
2535
2536         Reviewed by Simon Fraser.
2537
2538         * platform/HysteresisActivity.h:
2539         (WebCore::HysteresisActivity::HysteresisActivity):
2540         (WebCore::HysteresisActivity::stop):
2541         * platform/ios/WebSQLiteDatabaseTrackerClient.mm:
2542
2543 2017-06-27  Jeremy Jones  <jeremyj@apple.com>
2544
2545         MediaPlayerPrivate m_private may not yet be created when setPrivateBrowsingMode is called.
2546         https://bugs.webkit.org/show_bug.cgi?id=173893
2547         rdar://problem/32986872
2548         
2549         Reviewed by Ryosuke Niwa.
2550
2551         No new tests because no reproducable case.
2552
2553         setPrivateBrowsingMode can be called on MediaPlayer before the MediaPlayerPrivate is created.
2554         The value should only be pushed down the m_private if it has been created.
2555
2556         * platform/graphics/MediaPlayer.cpp:
2557         (WebCore::MediaPlayer::setPrivateBrowsingMode):
2558
2559 2017-06-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2560
2561         [iOS DnD] Support dragging out of contenteditable areas without a prior selection
2562         https://bugs.webkit.org/show_bug.cgi?id=173854
2563         <rdar://problem/32236827>
2564
2565         Reviewed by Ryosuke Niwa and Tim Horton.
2566
2567         Allows elements to be dragged from contenteditable areas for both WebKit1 and WebKit2 iOS. There are two main
2568         changes in WebCore: move the touch point adjustment code into EventHandler::tryToBeginDataInteractionAtPoint, so
2569         that the clientPosition specified will be adjusted to an appropriate clickable node if needed. This is necessary
2570         because UIWebDocumentView and WKContentView no longer send adjusted points to WebCore when requesting drag
2571         start. See <https://bugs.webkit.org/show_bug.cgi?id=173855> for a followup regarding the globalPosition and
2572         clientPositions passed in to the MouseEvents when performing a drag or synthetic click.
2573
2574         Secondly, image elements in Mail's contenteditable area are not draggable unless the heuristic in
2575         DragController::draggableElement is tweaked to not reject image dragging across the board if the
2576         loadsImagesAutomatically setting is turned off. Instead, even if images are not automatically loaded, allow the
2577         image drag to commence if the image renderer already has a cached image.
2578
2579         Test: DataInteractionTests.DragImageFromContentEditable
2580
2581         * page/DragController.cpp:
2582         (WebCore::imageElementIsDraggable):
2583         (WebCore::DragController::draggableElement):
2584         * page/ios/EventHandlerIOS.mm:
2585         (WebCore::EventHandler::tryToBeginDataInteractionAtPoint):
2586
2587 2017-06-27  Antoine Quint  <graouts@apple.com>
2588
2589         [Modern Media Controls] Accessibility labels should be formatted using NSDateComponentsFormatter
2590         https://bugs.webkit.org/show_bug.cgi?id=173858
2591         <rdar://problem/32643171>
2592
2593         Reviewed by Dean Jackson.
2594
2595         We shouldn't be manually trying to create a formatted string for media controls and instead rely
2596         on NSDateComponentsFormatter to perform this task for us. So we remove the ad-hoc code in the JS
2597         media controls code and instead add a new MediaControlsHost method to format durations which calls
2598         into RenderTheme to provide a formatted duration string relevant to the current platform and locale.
2599
2600         * English.lproj/modern-media-controls-localized-strings.js:
2601         * Modules/mediacontrols/MediaControlsHost.cpp:
2602         (WebCore::MediaControlsHost::formattedStringForDuration):
2603         * Modules/mediacontrols/MediaControlsHost.h:
2604         * Modules/mediacontrols/MediaControlsHost.idl:
2605         * Modules/modern-media-controls/controls/slider.js:
2606         (Slider.prototype.set inputAccessibleLabel):
2607         * Modules/modern-media-controls/controls/time-label.js:
2608         (TimeLabel.prototype.commitProperty):
2609         * Modules/modern-media-controls/main.js:
2610         (createControls):
2611         (formattedStringForDuration):
2612         (formatTimeToString): Deleted.
2613         * rendering/RenderTheme.h:
2614         (WebCore::RenderTheme::mediaControlsFormattedStringForDuration):
2615         * rendering/RenderThemeCocoa.h:
2616         * rendering/RenderThemeCocoa.mm:
2617         (WebCore::RenderThemeCocoa::mediaControlsFormattedStringForDuration):
2618
2619 2017-06-27  Eric Carlson  <eric.carlson@apple.com>
2620
2621         r218647 causes getUserMedia to fail on some machines
2622         https://bugs.webkit.org/show_bug.cgi?id=173894
2623
2624         Reviewed by Youenn Fablet.
2625
2626         * platform/mediastream/mac/AVVideoCaptureSource.mm:
2627         (WebCore::AVVideoCaptureSource::isFrameRateSupported): Change frame rate epsilon from 0.00001
2628         to 0.001.
2629
2630 2017-06-27  Antoine Quint  <graouts@apple.com>
2631
2632         Placard icons act like buttons (can get keyboard focus and shows up in VoiceOver)
2633         https://bugs.webkit.org/show_bug.cgi?id=173891
2634         <rdar://problem/33011855>
2635
2636         Reviewed by Dean Jackson.
2637
2638         Ensure that we disable buttons inside placards as they're only decorative and should
2639         not be interactive.
2640
2641         * Modules/modern-media-controls/controls/placard.js:
2642         (Placard.):
2643
2644 2017-06-27  Jeremy Jones  <jeremyj@apple.com>
2645
2646         Disable m_temporarilyAllowingInlinePlaybackAfterFullscreen on pause
2647         https://bugs.webkit.org/show_bug.cgi?id=173843
2648         rdar://problem/32982431
2649
2650         Reviewed by Eric Carlson.
2651
2652         Test: media/media-fullscreen-pause-inline.html
2653
2654         Some pages may not have a fullscreen button, so disabled m_temporarilyAllowingInlinePlaybackAfterFullscreen on pause.
2655
2656         * html/HTMLMediaElement.cpp:
2657         (WebCore::HTMLMediaElement::pause):
2658
2659 2017-06-27  Chris Dumez  <cdumez@apple.com>
2660
2661         [iOS] Avoid taking / releasing process assertions too quickly due to database activity
2662         https://bugs.webkit.org/show_bug.cgi?id=173879
2663         <rdar://problem/32412701>
2664
2665         Reviewed by Antti Koivisto.
2666
2667         Add HysteresisActivity to WebSQLiteDatabaseTrackerClient to avoid taking / releasing
2668         process assertion too quickly due to database activity.
2669
2670         * platform/ios/WebSQLiteDatabaseTrackerClient.h:
2671         * platform/ios/WebSQLiteDatabaseTrackerClient.mm:
2672         (WebCore::WebSQLiteDatabaseTrackerClient::WebSQLiteDatabaseTrackerClient):
2673         (WebCore::WebSQLiteDatabaseTrackerClient::willBeginFirstTransaction):
2674         (WebCore::WebSQLiteDatabaseTrackerClient::didFinishLastTransaction):
2675         (WebCore::WebSQLiteDatabaseTrackerClient::hysteresisUpdated):
2676
2677 2017-06-27  Youenn Fablet  <youenn@apple.com>
2678
2679         Using public logging for WebRTC release logging
2680         https://bugs.webkit.org/show_bug.cgi?id=173881
2681
2682         Reviewed by Eric Carlson.
2683
2684         No change of behavior.
2685
2686         * Modules/mediastream/PeerConnectionBackend.cpp:
2687         (WebCore::PeerConnectionBackend::createOfferSucceeded):
2688         (WebCore::PeerConnectionBackend::createOfferFailed):
2689         (WebCore::PeerConnectionBackend::createAnswerSucceeded):
2690         (WebCore::PeerConnectionBackend::createAnswerFailed):
2691         (WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
2692         (WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
2693         (WebCore::PeerConnectionBackend::addIceCandidateFailed):
2694         (WebCore::PeerConnectionBackend::newICECandidate):
2695         * Modules/mediastream/RTCPeerConnection.cpp:
2696         (WebCore::RTCPeerConnection::queuedSetLocalDescription):
2697         (WebCore::RTCPeerConnection::queuedSetRemoteDescription):
2698         (WebCore::RTCPeerConnection::queuedAddIceCandidate):
2699         (WebCore::RTCPeerConnection::updateIceGatheringState):
2700         (WebCore::RTCPeerConnection::updateIceConnectionState):
2701         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
2702         (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered):
2703
2704 2017-06-27  Don Olmstead  <don.olmstead@sony.com>
2705
2706         [PAL] Add symbol export macros for PAL
2707         https://bugs.webkit.org/show_bug.cgi?id=171519
2708
2709         Reviewed by Konstantin Tokarev.
2710
2711         No new tests. No change in behavior.
2712
2713         * CMakeLists.txt:
2714         * config.h:
2715         * platform/PlatformExportMacros.h:
2716
2717 2017-06-27  John Wilander  <wilander@apple.com>
2718
2719         Resource Load Statistics: Add telemetry
2720         https://bugs.webkit.org/show_bug.cgi?id=173499
2721         <rdar://problem/32826094>
2722
2723         Reviewed by Brent Fulgham.
2724
2725         Test: http/tests/loading/resourceLoadStatistics/telemetry-generation.html
2726
2727         * loader/ResourceLoadObserver.cpp:
2728         (WebCore::ResourceLoadObserver::fireTelemetryHandler):
2729             Test infrastructure.
2730         * loader/ResourceLoadObserver.h:
2731         * loader/ResourceLoadStatisticsStore.cpp:
2732         (WebCore::ResourceLoadStatisticsStore::setFireTelemetryCallback):
2733         (WebCore::ResourceLoadStatisticsStore::fireTelemetryHandler):
2734             Test infrastructure.
2735         (WebCore::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):
2736             Convenience function for telemetry.
2737         * loader/ResourceLoadStatisticsStore.h:
2738             Added struct WebCore::PrevalentResourceTelemetry.
2739         * page/DiagnosticLoggingKeys.cpp:
2740         (WebCore::DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey):
2741             Added.
2742         * page/DiagnosticLoggingKeys.h:
2743
2744 2017-06-27  Ting-Wei Lan  <lantw44@gmail.com>
2745
2746         Add missing includes to fix compilation error on FreeBSD
2747         https://bugs.webkit.org/show_bug.cgi?id=172919
2748
2749         Reviewed by Mark Lam.
2750
2751         No new tests needed.
2752
2753         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
2754         * platform/audio/ReverbAccumulationBuffer.cpp:
2755
2756 2017-06-27  Zalan Bujtas  <zalan@apple.com>
2757
2758         Add RenderEmbeddedObject::getReplacementTextGeometry helper.
2759         https://bugs.webkit.org/show_bug.cgi?id=173847
2760
2761         Reviewed by Simon Fraser.
2762
2763         ...and remove getReplacementTextGeometry's redundant return value. 
2764
2765         No change in functionality.
2766
2767         * rendering/RenderEmbeddedObject.cpp:
2768         (WebCore::RenderEmbeddedObject::paintReplaced):
2769         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
2770         (WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
2771         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
2772         * rendering/RenderEmbeddedObject.h:
2773
2774 2017-06-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2775
2776         Refactor drag start codepaths to plumb a DragItem to client layers
2777         https://bugs.webkit.org/show_bug.cgi?id=173832
2778         Work towards <rdar://problem/32236827>
2779
2780         Reviewed by Ryosuke Niwa and Tim Horton.
2781
2782         Refactor drag start logic in WebCore to set up a DragItem and propagate it to WebDragClient. No change in behavior.
2783
2784         * loader/EmptyClients.cpp:
2785         * page/DragClient.h:
2786         * page/DragController.cpp:
2787         (WebCore::DragController::startDrag):
2788         (WebCore::DragController::doImageDrag):
2789         (WebCore::DragController::doSystemDrag):
2790
2791         Refactor to pass along a DragItem. Also, remove unused drag image anchor computation.
2792
2793         * page/DragController.h:
2794         * platform/DragImage.h:
2795         * platform/DragItem.h:
2796
2797         Add additional information needed to begin a drag on iOS.
2798
2799         (WebCore::DragItem::encode):
2800         (WebCore::DragItem::decode):
2801
2802         Add IPC serialization/deserialization support for DragItem.
2803
2804         * platform/PasteboardWriterData.cpp:
2805         (WebCore::PasteboardWriterData::isEmpty):
2806         * platform/PasteboardWriterData.h:
2807
2808 2017-06-27  Frederic Wang  <fwang@igalia.com>
2809
2810         Some tests to verify forbidden frame navigation time out
2811         https://bugs.webkit.org/show_bug.cgi?id=173657
2812
2813         Reviewed by Chris Dumez.
2814
2815         Currently some tests try and perform a forbidden frame navigation and verify the
2816         corresponding console error. However, WebKit does not raise any exception for such error so
2817         the tests have to wait until the timeout limit to complete, which makes execution slow.
2818         This patch modifies the setters of window.location for which such error may happen in order
2819         to raise an exception so the tests behave as expected.
2820
2821         No new tests, already covered by existing tests.
2822
2823         * page/Location.cpp: Adjust Location::setLocation to return a security exception and pass it
2824         to the callers.
2825         (WebCore::Location::setHref): Adjust function to possibly return an exception.
2826         (WebCore::Location::setProtocol): Ditto.
2827         (WebCore::Location::setHost): Ditto.
2828         (WebCore::Location::setHostname): Ditto.
2829         (WebCore::Location::setPort): Ditto.
2830         (WebCore::Location::setPathname): Ditto.
2831         (WebCore::Location::setSearch): Ditto.
2832         (WebCore::Location::setHash): Ditto.
2833         (WebCore::Location::assign): Ditto.
2834         (WebCore::Location::setLocation): FrameLoader::findFrameForNavigation is really only used
2835         to verify whether navigating m_frame is permitted so it is more simple and clearer to do it
2836         directly. When navigation is not permitted, this function now raises a security exception.
2837         * page/Location.h: Modify some setters to return an ExceptionOr<void>.
2838         * page/Location.idl: Allow some setters to raise an exception.
2839
2840 2017-06-26  Fujii Hironori  <Hironori.Fujii@sony.com>
2841
2842         [GTK] Layout Test webrtc/video.html issues "stack smashing detected"
2843         https://bugs.webkit.org/show_bug.cgi?id=173862
2844
2845         Reviewed by Carlos Garcia Campos.
2846
2847         Tests: webrtc/video.html
2848
2849         Passing a bool variable to g_object_get causes out-of-bound write.
2850         gboolean should be used, which is 4 bytes while bool is one byte.
2851
2852         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2853         (WebCore::MediaPlayerPrivateGStreamerBase::muted): Use gboolean instead of bool.
2854         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
2855         (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded): Ditto.
2856
2857 2017-06-26  Chris Dumez  <cdumez@apple.com>
2858
2859         WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains() is inefficient
2860         https://bugs.webkit.org/show_bug.cgi?id=173850
2861
2862         Reviewed by Ryosuke Niwa.
2863
2864         * loader/ResourceLoadStatisticsStore.cpp:
2865         (WebCore::ResourceLoadStatisticsStore::updateStatisticsForRemovedDataRecords):
2866         * loader/ResourceLoadStatisticsStore.h:
2867
2868 2017-06-26  Antti Koivisto  <antti@apple.com>
2869
2870         REGRESSION (AsyncImageDecoding): A tab with the WWDC keynote paused is killed for using excessive power (Image thrashing)
2871         https://bugs.webkit.org/show_bug.cgi?id=173804
2872         <rdar://problem/32623745>
2873
2874         Reviewed by Simon Fraser.
2875
2876         When under memory pressure MemoryCache::singleton().pruneLiveResources(true) is called inFrameView::didPaintContents()
2877         after top level paint. We end up decoding and pruning bitmaps repeatedly for each tile, which is not great.
2878
2879         Situation gets worse with async decoding. Painting now doesn’t actually decode the image, it just starts the decoding.
2880         When it completes we trigger another paint to get the bits to the tiles. The paint for the first tile then calls
2881         pruneLiveResources and loses the bitmap and the second tile triggers another round of async decoding. We have code
2882         that prevents pruning of visible images but non-visible images in tiling area can hit this bug easily.
2883
2884         Test: fast/images/low-memory-decode.html
2885
2886         * page/FrameView.cpp:
2887         (WebCore::FrameView::willPaintContents):
2888         (WebCore::FrameView::didPaintContents):
2889
2890             Eliminate synchronous pruning during painting. This is an obsolete mechanism from early iOS times.
2891
2892         * platform/graphics/BitmapImage.cpp:
2893         (WebCore::BitmapImage::imageFrameAvailableAtIndex):
2894         (WebCore::BitmapImage::decodeCountForTesting):
2895
2896             Testing support.
2897
2898         * platform/graphics/BitmapImage.h:
2899         * testing/Internals.cpp:
2900         (WebCore::Internals::imageDecodeCount):
2901         * testing/Internals.h:
2902         * testing/Internals.idl:
2903
2904 2017-06-26  Chris Dumez  <cdumez@apple.com>
2905
2906         ImageFrameCache::startAsyncDecodingQueue() unsafely passes Strings across threads
2907         https://bugs.webkit.org/show_bug.cgi?id=173842
2908
2909         Reviewed by Simon Fraser.
2910
2911         The URL string was passed across thread without isolated copy.
2912
2913         * platform/graphics/ImageFrameCache.cpp:
2914         (WebCore::ImageFrameCache::startAsyncDecodingQueue):
2915
2916 2017-06-26  Jonathan Bedard  <jbedard@apple.com>
2917
2918         Unreviewed, rolling out r218783.
2919
2920         Causing accessibility/mac/setting-attributes-is-
2921         asynchronous.html to crash consistently on mac-wk2 Debug
2922
2923         Reverted changeset:
2924
2925         "AX: Cannot call setValue() on contenteditable or ARIA text
2926         controls"
2927         https://bugs.webkit.org/show_bug.cgi?id=173520
2928         http://trac.webkit.org/changeset/218783
2929
2930 2017-06-26  Yusuke Suzuki  <utatane.tea@gmail.com>
2931
2932         [WTF] Drop Thread::create(obsolete things) API since we can use lambda
2933         https://bugs.webkit.org/show_bug.cgi?id=173825
2934
2935         Reviewed by Saam Barati.
2936
2937         No behavior change.
2938
2939         * Modules/indexeddb/server/IDBServer.cpp:
2940         (WebCore::IDBServer::IDBServer::IDBServer):
2941         (WebCore::IDBServer::IDBServer::databaseThreadEntry): Deleted.
2942         * Modules/indexeddb/server/IDBServer.h:
2943         * Modules/webaudio/AsyncAudioDecoder.cpp:
2944         (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
2945         (WebCore::AsyncAudioDecoder::threadEntry): Deleted.
2946         * Modules/webaudio/AsyncAudioDecoder.h:
2947         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
2948         (WebCore::OfflineAudioDestinationNode::startRendering):
2949         (WebCore::OfflineAudioDestinationNode::offlineRenderEntry): Deleted.
2950         * Modules/webaudio/OfflineAudioDestinationNode.h:
2951         * Modules/webdatabase/DatabaseThread.cpp:
2952         (WebCore::DatabaseThread::start):
2953         (WebCore::DatabaseThread::databaseThreadStart): Deleted.
2954         * Modules/webdatabase/DatabaseThread.h:
2955         * bindings/js/GCController.cpp:
2956         (WebCore::collect):
2957         (WebCore::GCController::gcTimerFired):
2958         (WebCore::GCController::garbageCollectOnAlternateThreadForDebugging):
2959         * loader/icon/IconDatabase.cpp:
2960         (WebCore::IconDatabase::open):
2961         (WebCore::IconDatabase::iconDatabaseSyncThreadStart): Deleted.
2962         * loader/icon/IconDatabase.h:
2963         * page/ResourceUsageThread.cpp:
2964         (WebCore::ResourceUsageThread::createThreadIfNeeded):
2965         (WebCore::ResourceUsageThread::threadCallback): Deleted.
2966         * page/ResourceUsageThread.h:
2967         * page/scrolling/ScrollingThread.cpp:
2968         (WebCore::ScrollingThread::createThreadIfNeeded):
2969         (WebCore::ScrollingThread::threadCallback): Deleted.
2970         (WebCore::ScrollingThread::threadBody): Deleted.
2971         * page/scrolling/ScrollingThread.h:
2972         * platform/audio/HRTFDatabaseLoader.cpp:
2973         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
2974         (WebCore::databaseLoaderEntry): Deleted.
2975         * platform/audio/HRTFDatabaseLoader.h:
2976         * platform/audio/ReverbConvolver.cpp:
2977         (WebCore::ReverbConvolver::ReverbConvolver):
2978         (WebCore::backgroundThreadEntry): Deleted.
2979         * platform/audio/ReverbConvolver.h:
2980         (WebCore::ReverbConvolver::useBackgroundThreads):
2981         * platform/network/cf/LoaderRunLoopCF.cpp:
2982         (WebCore::loaderRunLoop):
2983         (WebCore::runLoaderThread): Deleted.
2984         * platform/network/curl/CurlManager.cpp:
2985         (WebCore::CurlManager::startThreadIfNeeded):
2986         (WebCore::CurlManager::workerThread):
2987         * platform/network/curl/CurlManager.h:
2988         * workers/WorkerThread.cpp:
2989         (WebCore::WorkerThread::start):
2990         (WebCore::WorkerThread::workerThreadStart): Deleted.
2991         * workers/WorkerThread.h:
2992
2993 2017-06-26  Joanmarie Diggs  <jdiggs@igalia.com>
2994
2995         [ATK] Add support for aria-details and aria-errormessage
2996         https://bugs.webkit.org/show_bug.cgi?id=172588
2997
2998         Reviewed by Chris Fleizach.
2999
3000         Add methods to retrieve elements referenced by or referencing the new
3001         aria-details and aria-errormessage attributes. Include aria-details and
3002         aria-errormessage in AccessibilityObject::supportsARIAAttributes() to ensure
3003         elements with these attributes will be included in the accessibility tree.
3004
3005         New test cases added to accessibility/gtk/relation-types.html.
3006
3007         * accessibility/AccessibilityObject.cpp:
3008         (WebCore::AccessibilityObject::supportsARIAAttributes):
3009         (WebCore::AccessibilityObject::ariaDetailsElements):
3010         (WebCore::AccessibilityObject::ariaDetailsReferencingElements):
3011         (WebCore::AccessibilityObject::ariaErrorMessageElements):
3012         (WebCore::AccessibilityObject::ariaErrorMessageReferencingElements):
3013         * accessibility/AccessibilityObject.h:
3014         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3015         (setAtkRelationSetFromCoreObject):
3016         * html/HTMLAttributeNames.in:
3017
3018 2017-06-26  Konstantin Tokarev  <annulen@yandex.ru>
3019
3020         Remove excessive headers from WebCore/{Modules,animation,crypto,domjit}
3021         https://bugs.webkit.org/show_bug.cgi?id=173824
3022
3023         Reviewed by Darin Adler.
3024
3025         No new tests needed.
3026
3027         * Modules/credentials/CredentialCreationOptions.h:
3028         * Modules/credentials/PasswordCredential.h:
3029         * Modules/fetch/FetchBody.h:
3030         * Modules/fetch/FetchBodyOwner.h:
3031         * Modules/gamepad/GamepadManager.h:
3032         * Modules/geolocation/Coordinates.h:
3033         * Modules/geolocation/Geoposition.h:
3034         * Modules/indexeddb/IDBActiveDOMObject.h:
3035         * Modules/indexeddb/IDBCursor.h:
3036         * Modules/indexeddb/IDBDatabase.h:
3037         * Modules/indexeddb/IDBDatabaseIdentifier.h:
3038         * Modules/indexeddb/IDBObjectStore.cpp:
3039         * Modules/indexeddb/IDBObjectStore.h:
3040         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3041         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3042         * Modules/indexeddb/shared/InProcessIDBServer.h:
3043         * Modules/indexeddb/shared/IndexKey.h:
3044         * Modules/mediacontrols/MediaControlsHost.h:
3045         * Modules/mediasession/WebMediaSessionManager.h:
3046         * Modules/mediasource/SourceBufferList.h:
3047         * Modules/mediasource/VideoPlaybackQuality.h:
3048         * Modules/notifications/Notification.h:
3049         * Modules/quota/WorkerNavigatorStorageQuota.h:
3050         * Modules/webaudio/AudioBasicProcessorNode.h:
3051         * Modules/webaudio/AudioContext.h:
3052         * Modules/webaudio/AudioDestinationNode.h:
3053         * Modules/webaudio/AudioParamTimeline.h:
3054         * Modules/webaudio/ConvolverNode.cpp:
3055         * Modules/webaudio/MediaStreamAudioSource.h:
3056         * Modules/webaudio/MediaStreamAudioSourceNode.h:
3057         * Modules/webaudio/PannerNode.h:
3058         * Modules/webaudio/PeriodicWave.h:
3059         * Modules/webaudio/ScriptProcessorNode.h:
3060         * Modules/webdatabase/DatabaseManager.h:
3061         * Modules/webdatabase/DatabaseTask.h:
3062         * Modules/webdatabase/SQLTransaction.h:
3063         * Modules/webdatabase/SQLTransactionBackend.h:
3064         * Modules/webdatabase/SQLTransactionStateMachine.h:
3065         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
3066         * Modules/websockets/WebSocketDeflater.h:
3067         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
3068         * animation/AnimationEffect.h:
3069         * crypto/CryptoKeyPair.h:
3070         * crypto/parameters/CryptoAlgorithmEcdhKeyDeriveParams.h:
3071         * dom/ScriptExecutionContext.h:
3072         * domjit/DOMJITHelpers.h:
3073         * domjit/DOMJITIDLConvert.h:
3074         * domjit/DOMJITIDLType.h:
3075
3076 2017-06-26  Konstantin Tokarev  <annulen@yandex.ru>
3077
3078         [GTK] Unreviewed, added missing includes to fix debug build
3079
3080         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3081
3082 2017-06-25  Konstantin Tokarev  <annulen@yandex.ru>
3083
3084         Remove excessive headers from WebCore/platform
3085         https://bugs.webkit.org/show_bug.cgi?id=173822
3086
3087         Reviewed by Tim Horton.
3088
3089         No new tests needed.
3090
3091         * html/ColorInputType.h:
3092         * html/MediaElementSession.h:
3093         * page/SecurityOriginData.cpp:
3094         * platform/CalculationValue.cpp:
3095         * platform/CalculationValue.h:
3096         * platform/ColorChooserClient.h:
3097         * platform/ContentType.h:
3098         * platform/LogMacros.h:
3099         * platform/PODRedBlackTree.h:
3100         * platform/PasteboardStrategy.h:
3101         * platform/PlatformPasteboard.h:
3102         * platform/PopupMenuStyle.h:
3103         * platform/ScrollAnimator.h:
3104         * platform/Theme.h:
3105         * platform/ThreadGlobalData.h:
3106         * platform/animation/AnimationList.h:
3107         * platform/audio/AudioArray.h:
3108         * platform/audio/AudioChannel.h:
3109         * platform/audio/DynamicsCompressor.h:
3110         * platform/audio/DynamicsCompressorKernel.h:
3111         * platform/audio/FFTFrame.h:
3112         * platform/audio/HRTFDatabaseLoader.cpp:
3113         * platform/audio/HRTFDatabaseLoader.h:
3114         * platform/audio/HRTFElevation.h:
3115         * platform/audio/MultiChannelResampler.h:
3116         * platform/audio/PlatformMediaSession.h:
3117         * platform/audio/ReverbConvolver.h:
3118         * platform/audio/ReverbConvolverStage.cpp:
3119         * platform/graphics/ANGLEWebKitBridge.h:
3120         * platform/graphics/BitmapImage.h:
3121         * platform/graphics/CrossfadeGeneratedImage.h:
3122         * platform/graphics/FloatPolygon.h:
3123         * platform/graphics/FloatSizeHash.h:
3124         * platform/graphics/Font.h:
3125         * platform/graphics/FontMetrics.h:
3126         * platform/graphics/FontPlatformData.h:
3127         * platform/graphics/FontRanges.h:
3128         * platform/graphics/FontTaggedSettings.h:
3129         * platform/graphics/GraphicsContext3D.h:
3130         * platform/graphics/GraphicsContext3DPrivate.h:
3131         * platform/graphics/GraphicsLayerClient.h:
3132         * platform/graphics/Image.cpp:
3133         * platform/graphics/ImageFrame.h:
3134         * platform/graphics/ImageFrameCache.h:
3135         * platform/graphics/ImageSource.h:
3136         * platform/graphics/IntRectHash.h:
3137         * platform/graphics/IntSizeHash.h:
3138         * platform/graphics/MediaPlaybackTargetClient.h:
3139         * platform/graphics/Pattern.h:
3140         * platform/graphics/PlatformTimeRanges.h:
3141         * platform/graphics/TextRun.h:
3142         * platform/graphics/TiledBacking.h:
3143         * platform/graphics/cairo/FontCustomPlatformData.h:
3144         * platform/graphics/filters/FEConvolveMatrix.h:
3145         * platform/graphics/filters/FELighting.h:
3146         * platform/graphics/filters/SourceAlpha.h:
3147         * platform/graphics/gstreamer/GStreamerUtilities.h:
3148         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
3149         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3150         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3151         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
3152         * platform/graphics/harfbuzz/HarfBuzzShaper.h:
3153         * platform/graphics/opengl/Extensions3DOpenGL.h:
3154         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
3155         * platform/graphics/texmap/TextureMapperBackingStore.h:
3156         * platform/graphics/texmap/TextureMapperGL.cpp:
3157         * platform/graphics/texmap/TextureMapperGL.h:
3158         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
3159         * platform/graphics/texmap/TextureMapperTile.h:
3160         * platform/graphics/texmap/coordinated/Tile.h:
3161         * platform/graphics/texmap/coordinated/TiledBackingStore.h:
3162         * platform/graphics/transforms/TransformState.h:
3163         * platform/gtk/PasteboardHelper.h:
3164         * platform/gtk/ScrollbarThemeGtk.h:
3165         * platform/image-decoders/ImageDecoder.h:
3166         * platform/network/BlobData.h:
3167         * platform/network/BlobDataFileReference.h:
3168         * platform/network/ResourceHandle.h:
3169         * platform/network/ResourceHandleInternal.h:
3170         * platform/network/SocketStreamHandleClient.h:
3171         * platform/network/soup/ResourceRequest.h:
3172         * platform/network/soup/SocketStreamHandleImpl.h:
3173         * platform/network/soup/SoupNetworkSession.h:
3174         * platform/sql/SQLiteFileSystem.h:
3175         * platform/text/LocaleICU.h:
3176
3177 2017-06-25  Youenn Fablet  <youenn@apple.com>
3178
3179         Remove use of mock webrtc backend factory at injected bundle reset time
3180         https://bugs.webkit.org/show_bug.cgi?id=173817
3181
3182         Reviewed by Darin Adler.
3183
3184         * testing/Internals.cpp:
3185         (WebCore::Internals::resetToConsistentState): Resetting the peer connection backend.
3186         * testing/MockLibWebRTCPeerConnection.cpp: Doing some clean-up
3187         (WebCore::useRealRTCPeerConnectionFactory):
3188         (WebCore::MockLibWebRTCPeerConnectionFactory::MockLibWebRTCPeerConnectionFactory):
3189         (WebCore::MockLibWebRTCPeerConnectionFactory::CreatePeerConnection):
3190         (WebCore::MockLibWebRTCPeerConnectionFactory::CreateVideoTrack):
3191         (WebCore::MockLibWebRTCPeerConnectionFactory::CreateAudioTrack):
3192         * testing/MockLibWebRTCPeerConnection.h:
3193
3194 2017-06-25  Konstantin Tokarev  <annulen@yandex.ru>
3195
3196         Remove excessive headers from JavaScriptCore
3197         https://bugs.webkit.org/show_bug.cgi?id=173812
3198
3199         Reviewed by Darin Adler.
3200
3201         No new tests needed.
3202
3203         * Modules/indexeddb/IDBObjectStore.cpp:
3204         * bindings/js/JSDOMPromiseDeferred.h:
3205         * bindings/js/JSLazyEventListener.cpp:
3206         * bindings/js/JSMainThreadExecState.h:
3207         * bindings/js/ReadableStreamDefaultController.cpp:
3208         * bindings/js/ScriptGlobalObject.cpp:
3209         * bindings/js/SerializedScriptValue.cpp:
3210         * bridge/NP_jsobject.cpp:
3211         * dom/ScriptExecutionContext.cpp:
3212         * html/HTMLPlugInImageElement.cpp:
3213
3214 2017-06-25  Konstantin Tokarev  <annulen@yandex.ru>
3215
3216         Remove excessive headers from WebCore/{rendering,style,svg}
3217         https://bugs.webkit.org/show_bug.cgi?id=173773
3218
3219         Reviewed by Darin Adler.
3220
3221         No new tests needed.
3222
3223         * css/StyleBuilderConverter.h:
3224         * editing/TextIterator.cpp:
3225         * rendering/CounterNode.h:
3226         * rendering/FlexibleBoxAlgorithm.h:
3227         * rendering/HitTestLocation.h:
3228         * rendering/HitTestResult.h:
3229         * rendering/HitTestingTransformState.h:
3230         * rendering/OrderIterator.h:
3231         * rendering/RenderButton.h:
3232         * rendering/RenderCombineText.h:
3233         * rendering/RenderFlowThread.h:
3234         * rendering/RenderFullScreen.h:
3235         * rendering/RenderGeometryMap.h:
3236         * rendering/RenderListItem.h:
3237         * rendering/RenderMediaControlElements.cpp:
3238         * rendering/RenderMediaControlElements.h:
3239         * rendering/RenderMediaControls.h:
3240         * rendering/RenderMeter.h:
3241         * rendering/RenderMultiColumnSet.cpp:
3242         * rendering/RenderObject.h:
3243         * rendering/RenderRegion.h:
3244         * rendering/RenderRegionSet.cpp:
3245         * rendering/RenderRegionSet.h:
3246         * rendering/RenderTheme.h:
3247         * rendering/RenderVTTCue.cpp:
3248         * rendering/RenderVTTCue.h:
3249         * rendering/SimpleLineLayoutFunctions.h:
3250         * rendering/SimpleLineLayoutResolver.h:
3251         * rendering/line/BreakingContext.h:
3252         * rendering/line/LineBreaker.h:
3253         * rendering/mathml/MathMLStyle.h:
3254         * rendering/mathml/RenderMathMLOperator.h:
3255         * rendering/mathml/RenderMathMLRoot.h:
3256         * rendering/shapes/RectangleShape.h:
3257         * rendering/style/BasicShapes.h:
3258         * rendering/style/BorderData.h:
3259         * rendering/style/CounterDirectives.h:
3260         * rendering/style/GridArea.h:
3261         * rendering/style/KeyframeList.h:
3262         * rendering/style/RenderStyle.h:
3263         * rendering/style/SVGRenderStyle.h:
3264         * rendering/style/ShapeValue.h:
3265         * rendering/style/StyleCachedImage.h:
3266         * rendering/style/StyleMultiColData.h:
3267         * rendering/style/StyleRareNonInheritedData.h:
3268         * rendering/style/WillChangeData.h:
3269         * rendering/svg/RenderSVGBlock.h:
3270         * rendering/svg/RenderSVGRect.h:
3271         * rendering/svg/RenderSVGResource.h:
3272         * rendering/svg/RenderSVGResourceContainer.h:
3273         * rendering/svg/RenderSVGResourceMarker.h:
3274         * rendering/svg/RenderSVGResourceMasker.h:
3275         * rendering/svg/RenderSVGResourcePattern.h:
3276         * rendering/svg/SVGInlineFlowBox.cpp:
3277         * rendering/svg/SVGInlineTextBox.h:
3278         * rendering/svg/SVGRootInlineBox.h:
3279         * rendering/svg/SVGTextChunk.cpp:
3280         * rendering/svg/SVGTextChunk.h:
3281         * rendering/svg/SVGTextChunkBuilder.cpp:
3282         * rendering/svg/SVGTextLayoutEngine.cpp:
3283         * rendering/svg/SVGTextLayoutEngineSpacing.h:
3284         * style/RenderTreePosition.cpp:
3285         * style/RenderTreePosition.h:
3286         * style/RenderTreeUpdater.h:
3287         * style/StyleFontSizeFunctions.h:
3288         * style/StyleInvalidator.h:
3289         * style/StyleResolveForDocument.h:
3290         * style/StyleScope.h:
3291         * style/StyleTreeResolver.cpp:
3292         * style/StyleTreeResolver.h:
3293         * style/StyleUpdate.h:
3294         * svg/SVGAnimationElement.h:
3295         * svg/SVGFEBlendElement.cpp:
3296         * svg/SVGFEBlendElement.h:
3297         * svg/SVGFEComponentTransferElement.h:
3298         * svg/SVGFEFloodElement.cpp:
3299         * svg/SVGFEFloodElement.h:
3300         * svg/SVGFEImageElement.h:
3301         * svg/SVGFEMergeElement.cpp:
3302         * svg/SVGFEMergeElement.h:
3303         * svg/SVGFEOffsetElement.cpp:
3304         * svg/SVGFEOffsetElement.h:
3305         * svg/SVGFETileElement.cpp:
3306         * svg/SVGFETileElement.h:
3307         * svg/SVGParserUtilities.h:
3308         * svg/SVGPathByteStream.h:
3309         * svg/SVGPathElement.cpp:
3310         * svg/SVGPolyElement.cpp:
3311         * svg/SVGSVGElement.cpp:
3312         * svg/SVGTRefElement.cpp:
3313         * svg/SVGTextPathElement.cpp:
3314         * svg/SVGUseElement.cpp:
3315         * svg/animation/SMILTimeContainer.h:
3316         * svg/graphics/SVGImageCache.h:
3317         * svg/graphics/filters/SVGFilter.h:
3318
3319 2017-06-25  Antoine Quint  <graouts@apple.com>
3320
3321         Remove rAf suspension logging
3322         https://bugs.webkit.org/show_bug.cgi?id=173821
3323
3324         Reviewed by Tim Horton.
3325
3326         Now that webkit.org/b/173628 is fixed, we can remove the logging code we added.
3327
3328         * dom/Document.cpp:
3329         (WebCore::Document::requestAnimationFrame):
3330         * dom/ScriptedAnimationController.cpp:
3331         (WebCore::ScriptedAnimationController::suspend):
3332         (WebCore::ScriptedAnimationController::resume):
3333         * page/Page.cpp:
3334         (WebCore::Page::suspendScriptedAnimations):
3335         (WebCore::Page::resumeScriptedAnimations):
3336         (WebCore::Page::setIsVisibleInternal):
3337         * platform/RuntimeApplicationChecks.h:
3338         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
3339         (WebCore::MacApplication::isDumpRenderTree): Deleted.
3340
3341 2017-06-24  Sam Weinig  <sam@webkit.org>
3342
3343         [WebIDL] Add complete support for stringifier
3344         https://bugs.webkit.org/show_bug.cgi?id=173724
3345
3346         Reviewed by Darin Adler.
3347
3348         * bindings/scripts/CodeGeneratorJS.pm:
3349         (AddStringifierOperationIfNeeded):
3350         Update AddStringifierOperationIfNeeded to support stringifier on operations and be more
3351         strict about the allowed types. Also copies over all extended attributes to the synthetic
3352         operation.
3353
3354         * bindings/scripts/IDLParser.pm:
3355         (parseInterfaceMember):
3356         (parseOperationOrReadWriteAttributeOrMaplike):
3357         (parseReadOnlyMember):
3358         (parseStringifier):
3359         (parseStaticMember):
3360         (parseAttributeOrOperationForStringifierOrStatic):
3361         (parseReadWriteAttribute):
3362         (parseAttributeRest):
3363         (parseOperation):
3364         (parseSpecialOperation):
3365         (parseMapLikeProperties):
3366         (parseOperationRest):
3367         (parseAttributeOrOperationOrIterator): Deleted.
3368         (parseQualifier): Deleted.
3369         (parseAttributeOrOperationRest): Deleted.
3370         (parseAttribute): Deleted.
3371         (parseOperationOrIterator): Deleted.
3372         - Update parser to more closely resemble the WebIDL grammar, splitting out parseStringifier and
3373           parseStaticMember into their own subroutines. 
3374         - Move those and parseSerializer, parseStringifier, parseStaticMember, parseIterableRest and a split out
3375           parseReadOnlyMembers up into parseInterfaceMember to make it clearer that they are top level members
3376           and match the grammar.
3377         - Rename parseAttributeOrOperationOrIterator to parseOperationOrReadWriteAttributeOrMaplike to match the
3378           grammar language and make it clear what it does.
3379         - Add parseAttributeOrOperationForStringifierOrStatic which contains most of the logic for parsing stringifiers
3380           and static members, which have almost identical grammars.
3381         - Remove creator special which no longer exists in the spec.
3382
3383         * css/DOMMatrixReadOnly.idl:
3384         * css/WebKitCSSMatrix.idl:
3385         * dom/Range.idl:
3386         * html/URLSearchParams.idl:
3387         Fix FIXMEs by switching to use stringifier.
3388
3389         * bindings/scripts/test/JS/JSTestStringifier.cpp: Added.
3390         * bindings/scripts/test/JS/JSTestStringifier.h: Added.
3391         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: Added.
3392         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.h: Added.
3393         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: Added.
3394         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.h: Added.
3395         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: Added.
3396         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.h: Added.
3397         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: Added.
3398         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.h: Added.
3399         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: Added.
3400         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.h: Added.
3401         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: Added.
3402         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.h: Added.
3403         * bindings/scripts/test/TestStringifier.idl: Added.
3404         * bindings/scripts/test/TestStringifierAnonymousOperation.idl: Added.
3405         * bindings/scripts/test/TestStringifierNamedOperation.idl: Added.
3406         * bindings/scripts/test/TestStringifierOperationImplementedAs.idl: Added.
3407         * bindings/scripts/test/TestStringifierOperationNamedToString.idl: Added.
3408         * bindings/scripts/test/TestStringifierReadOnlyAttribute.idl: Added.
3409         * bindings/scripts/test/TestStringifierReadWriteAttribute.idl: Added.
3410         Add new tests.
3411
3412 2017-06-24  Chris Fleizach  <cfleizach@apple.com>
3413
3414         AX: Cannot call setValue() on contenteditable or ARIA text controls
3415         https://bugs.webkit.org/show_bug.cgi?id=173520
3416
3417         Reviewed by Ryosuke Niwa.
3418
3419         Add support for changing the value of a contenteditable and any other aria text control in setValue().
3420  
3421         Test: accessibility/mac/set-value-editable-types.html
3422
3423         * accessibility/AccessibilityRenderObject.cpp:
3424         (WebCore::AccessibilityRenderObject::setValue):
3425
3426 2017-06-23  Simon Fraser  <simon.fraser@apple.com>
3427
3428         Attempt to fix an internal build after r218755.
3429
3430         * bindings/js/JSMainThreadExecStateInstrumentation.h:
3431
3432 2017-06-23  Chris Dumez  <cdumez@apple.com>