cfa4119b5ac66c1095b4f36906fb9bad9a082dc7
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-07-03  Dan Bernstein  <mitz@apple.com>
2
3         Tried to fix the iOS build.
4
5         * bridge/objc/objc_class.mm:
6         (JSC::Bindings::ObjcClass::fieldNamed):
7
8 2015-07-03  Dan Bernstein  <mitz@apple.com>
9
10         Tried to fix the iOS build.
11
12         * editing/cocoa/HTMLConverter.mm:
13
14 2015-07-03  Dan Bernstein  <mitz@apple.com>
15
16         Tried to fix the iOS build.
17
18         * page/FrameView.cpp:
19         (WebCore::FrameView::calculateExtendedBackgroundMode):
20
21 2015-07-03  Dan Bernstein  <mitz@apple.com>
22
23         [Xcode] Update some build settings as recommended by Xcode 7
24         https://bugs.webkit.org/show_bug.cgi?id=146597
25
26         Reviewed by Sam Weinig.
27
28         * Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE,
29         GCC_WARN_UNDECLARED_SELECTOR, and GCC_NO_COMMON_BLOCKS. Removed GCC_MODEL_TUNING.
30
31         * WebCore.xcodeproj/project.pbxproj: Updated LastUpgradeCheck. Disabled -Wunreachable-code
32         for two bison-generated source files. Updated for rename of WebScriptObject.h.
33
34         * bindings/objc/WebScriptObject.mm:
35         (-[WebUndefined dealloc]): Removed unreachable code and suppressed warning about not calling
36         super.
37         * bridge/objc/WebScriptObject.h: Renamed to WebScriptObjectProtocol.h to enabled inlcuding
38         the other WebScriptObject.h.
39         * bridge/objc/WebScriptObjectProtocol.h: Renamed from WebScriptObject.h.
40
41         * bridge/objc/objc_class.mm: Updated for rename and included WebScriptObject.h because we
42         use selectors declared in that file.
43
44         * bridge/objc/objc_instance.mm: Ditto.
45         (ObjCRuntimeMethod::create): Resolved ambiguity between JSC::JSValue and the Objective-C
46         JSValue class.
47         (ObjCRuntimeMethod::createStructure): Ditto.
48         (ObjcInstance::invokeMethod): Ditto.
49         (ObjcInstance::invokeObjcMethod): Ditto.
50         (ObjcInstance::invokeDefaultMethod): Ditto.
51         (ObjcInstance::setValueOfUndefinedField): Ditto.
52         (ObjcInstance::getValueOfUndefinedField): Ditto.
53         (ObjcInstance::defaultValue): Ditto.
54         (ObjcInstance::stringValue): Ditto.
55         (ObjcInstance::numberValue): Ditto.
56         (ObjcInstance::booleanValue): Ditto.
57         (ObjcInstance::valueOf): Ditto,
58
59         * bridge/objc/objc_runtime.h: Moved definition of isFallbackMethod() from here to the
60         implementation.
61         * bridge/objc/objc_runtime.mm: Updated for rename and included WebScriptObject.h because we
62         use selectors declared in that file.
63         (JSC::Bindings::ObjcMethod::isFallbackMethod): Moved definition from the header to here.
64
65         * bridge/objc/objc_utility.mm: Updated for rename.
66
67         * cssjit/SelectorCompiler.cpp:
68         (WebCore::SelectorCompiler::addScrollbarPseudoClassType): Removed unreachable code.
69
70         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
71         Added declarations to the WebCoreMovieObserver interface.
72         (WebCore::MediaPlayerPrivateQTKit::disableUnsupportedTracks): Suppressed
73         -Wundeclared-selector around invocation of a selector that is not declared anywhere.
74
75 2015-07-03  Kyounga Ra  <kyounga@alticast.com>
76
77         Memory leak for a protected Element having pending events in ImageLoader. 
78         https://bugs.webkit.org/show_bug.cgi?id=146538
79
80         Reviewed by Brady Eidson.
81
82         If ImageLoader is destroyed before an active derefElementTimer is fired, protected element's refCount never be zero..
83
84         * loader/ImageLoader.cpp:
85         (WebCore::ImageLoader::~ImageLoader):
86         (WebCore::ImageLoader::updateFromElement):
87         (WebCore::ImageLoader::updateRenderer):
88         (WebCore::ImageLoader::updatedHasPendingEvent):
89         (WebCore::ImageLoader::timerFired):
90         * loader/ImageLoader.h:
91
92 2015-07-03  Daniel Bates  <dabates@apple.com>
93
94         REGRESSION (r178097): JavaScript TypeError after clicking on compose button in Yahoo Mail
95         https://bugs.webkit.org/show_bug.cgi?id=146515
96         <rdar://problem/21348421>
97
98         Reviewed by Chris Dumez.
99
100         Fixes an issue where extra arguments passed to a Web IDL overloaded function, whose implementation
101         is generated by the bindings generator script, are not ignored as per the note in section "Interface object [[Call]] method"
102         of the Web IDL spec, <http://www.w3.org/TR/2012/CR-WebIDL-20120419/> (19 April 2012).
103
104         Currently for an overloaded function the JavaScript bindings generator script emits code to
105         throw a TypeError when it cannot find a candidate function that takes the same number of
106         arguments as passed by a caller. Prior to the change made in bug #139179 (r178097), the
107         bindings code for HTMLSelectElement.add() was written by hand and ignored extra arguments
108         that were passed to it. Following this change, the bindings code for HTMLSelectElement.add()
109         is generated by the bindings generator script. Therefore, we throw a TypeError when Yahoo Mail
110         calls HTMLSelectElement.add() with extra arguments because the code emitted by the bindings
111         generator script does not ignore them.
112
113         * bindings/scripts/CodeGeneratorJS.pm:
114         (LengthOfLongestFunctionParameterList): Added. Computes the length of longest overload parameter list.
115         (GenerateOverloadedFunction): Emit code that ignores more arguments than LengthOfLongestFunctionParameterList().
116         (GenerateOverloadedConstructorDefinition): Ditto.
117         * bindings/scripts/test/JS/JSTestObj.cpp:
118         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12): Added; expected result for an overloaded
119         function that takes a variadic number of Blob elements.
120         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): Update expected result. The added
121         if-conditional expression for the IDL declaration overloadedMethod(Blob... blobArgs) is empty
122         because we do not support overloading of functions with variadic arguments.
123         (WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
124         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
125         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors5): Added; expected
126         result for an overloaded constructors that takes a variadic number of long arguments.
127         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors): Update expected
128         result. The added if-conditional expression for the IDL declaration Constructor(long... longArgs) is empty
129         because we do not support overloading of constructors with variadic arguments.
130         * bindings/scripts/test/TestObj.idl: Added declaration overloadedMethod(Blob...). Also fixed
131         typo in license block text.
132         * bindings/scripts/test/TestOverloadedConstructors.idl: Added declaration Constructor(long... longArgs).
133         Also fixed typo in license block text.
134
135 2015-07-03  Mario Sanchez Prada  <mario@endlessm.com>
136
137         Crash on xLarge memory allocation using bmalloc on 32bit systems
138         https://bugs.webkit.org/show_bug.cgi?id=146440
139
140         Reviewed by Gustavo Noronha Silva.
141
142         Disable the gcc's -ftree-sra optimization (automatically enabled
143         with -O1 and higher levels) for WebCore and 32bit Intel architectures,
144         as that causes the crash in bmalloc when allocating large amounts of
145         memory from the texture mapper's tiled backing store implementation.
146
147         * CMakeLists.txt: Pass -fno-free-sra to gcc on 32bit Intel architectures.
148
149 2015-07-03  Csaba Osztrogonác  <ossy@webkit.org>
150
151         Fix the !ENABLE(VIDEO) build after r186054
152         https://bugs.webkit.org/show_bug.cgi?id=146592
153
154         Reviewed by Eric Carlson.
155
156         * platform/MemoryPressureHandler.cpp:
157         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
158
159 2015-07-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
160
161         [Streams API] Remove ReadableStream and Reader cancel() custom binding
162         https://bugs.webkit.org/show_bug.cgi?id=146458
163
164         Reviewed by Darin Adler.
165
166         Removed stream and reader cancel custom binding.
167         Updated binding generator to correctly handle promise-based APIs with optional parameters.
168
169         No behavior changes.
170
171         * Modules/streams/ReadableStream.idl: Removed custom
172         * Modules/streams/ReadableStreamReader.idl: Ditto.
173         * bindings/js/JSReadableStreamCustom.cpp:
174         (WebCore::JSReadableStream::cancel): Deleted.
175         * bindings/js/JSReadableStreamReaderCustom.cpp:
176         (WebCore::JSReadableStreamReader::cancel): Deleted.
177         * bindings/scripts/CodeGeneratorJS.pm: Handling of promise parameter in case of optional arguments.
178         (GenerateParametersCheck):
179         (GenerateReturnParameters): Utility function to generate return parameters (exception and promise).
180         * bindings/scripts/test/JS/JSTestObj.cpp:
181         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
182         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
183         * bindings/scripts/test/TestObj.idl:
184
185
186 2015-07-02  Doug Russell  <d_russell@apple.com>
187
188         AX: Selection change as a result of focusing an element should include that 
189         information in the intent
190         https://bugs.webkit.org/show_bug.cgi?id=146533
191
192         Reviewed by Chris Fleizach.
193
194         Added focusChange flag to AXTextStateChangeIntent.
195         Added intent support to selection logic called by Element::updateFocusAppearance().
196         Added NSAccessibilityTextSelectionChangedFocus to mac notifications.
197
198         Test: platform/mac/accessibility/selection-notification-focus-change.html
199
200         * accessibility/AXObjectCache.cpp:
201         (WebCore::AXObjectCache::postTextStateChangeNotification):
202         * accessibility/AXTextStateChangeIntent.h:
203         * accessibility/AccessibilityRenderObject.cpp:
204         (WebCore::setTextSelectionIntent):
205         (WebCore::AccessibilityRenderObject::setFocused):
206         * accessibility/mac/AXObjectCacheMac.mm:
207         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
208         * dom/Element.cpp:
209         (WebCore::Element::updateFocusAppearance):
210         * dom/Element.h:
211         (WebCore::Element::defaultFocusTextStateChangeIntent):
212         * editing/FrameSelection.cpp:
213         (WebCore::FrameSelection::moveWithoutValidationTo):
214         (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
215         (WebCore::FrameSelection::selectAll):
216         * editing/FrameSelection.h:
217         * html/HTMLInputElement.cpp:
218         (WebCore::HTMLInputElement::updateFocusAppearance):
219         * html/HTMLTextAreaElement.cpp:
220         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
221         * html/HTMLTextFormControlElement.cpp:
222         (WebCore::HTMLTextFormControlElement::select):
223         (WebCore::HTMLTextFormControlElement::setSelectionRange):
224         (WebCore::HTMLTextFormControlElement::restoreCachedSelection):
225         * html/HTMLTextFormControlElement.h:
226         * page/EventHandler.cpp:
227         (WebCore::setInitialKeyboardSelection):
228         * page/FocusController.cpp:
229         (WebCore::FocusController::advanceFocusInDocumentOrder):
230
231 2015-07-02  Przemek Piorkowski  <piorkowskiprzemyslaw@gmail.com>
232
233         [EFL] test_ewk2_application_cache_manager has been failed since r185527
234         https://bugs.webkit.org/show_bug.cgi?id=146016
235
236         Reviewed by Gyuyoung Kim.
237
238         In order to handle properly WebApplicationCacheManagerProxy implementation which use
239         WebsiteDataRecord it is necessary to enable PUBLIC_SUFFIX_LIST for EFL. 
240         Implementation of PUBLIC_SUFFIX_LIST already exists for soup so EFL can use it as well.
241
242         * PlatformEfl.cmake: PublicSuffixSoup.cpp added to source files.
243
244 2015-07-02  Commit Queue  <commit-queue@webkit.org>
245
246         Unreviewed, rolling out r186251.
247         https://bugs.webkit.org/show_bug.cgi?id=146573
248
249         caused crashes in webaudio tests (Requested by cdumez on
250         #webkit).
251
252         Reverted changeset:
253
254         "Ensure media playback is stopped during page close"
255         https://bugs.webkit.org/show_bug.cgi?id=146554
256         http://trac.webkit.org/changeset/186251
257
258 2015-07-02  Brent Fulgham  <bfulgham@apple.com>
259
260         Ensure media playback is stopped during page close
261         https://bugs.webkit.org/show_bug.cgi?id=146554
262         <rdar://problem/18033944>
263
264         Reviewed by Zalan Bujtas.
265
266         Add new method to Page class to stop all media playback. It just uses the process
267         MediaSessionManager singleton to inform all hosted in a particular document to stop.
268
269         * Modules/webaudio/AudioContext.h:
270         (WebCore::WebAudio::hostingDocument): Added.
271         * html/HTMLMediaElement.h:
272         (WebCore::HTMLMediaElement::hostingDocument): Added.
273         * dom/Document.cpp:
274         (WebCore::Document::commonTeardown): Call the new PlatformMediaSessionManager::stopAllMediaPlaybackForDocument
275         method on document cleanup.
276         * platform/audio/PlatformMediaSession.h:
277         Made PlatformMediaSessionManager a friend so it can access the protected 'client' accessor.
278         Updated PlatformMediaSessionClient to require clients to have a "hostingDocument" member.
279         * platform/audio/PlatformMediaSessionManager.cpp:
280         (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): Added. Only pauses
281         playback on elements that match the provided document.
282         * platform/audio/PlatformMediaSessionManager.h:
283
284 2015-07-02  Dean Jackson  <dino@apple.com>
285
286         Tapping a video in Safari causes the video to flash gray for a quick moment
287         https://bugs.webkit.org/show_bug.cgi?id=146570
288         <rdar://problem/21325181>
289
290         Reviewed by Brent Fulgham.
291
292         On iOS, video elements should not show the tap highlight.
293
294         * css/html.css:
295         (video):
296
297 2015-07-02  Dean Jackson  <dino@apple.com>
298
299         WebKit should use 80% white background for PiP indicator
300         https://bugs.webkit.org/show_bug.cgi?id=146444
301         <rdar://problem/21555726>
302
303         Reviewed by Brent Fulgham.
304
305         The designers wanted 80% white, not 80% black (r186104).
306         I've also reverted the AirPlay background back to black.
307
308         * Modules/mediacontrols/mediaControlsiOS.css:
309         (audio::-webkit-media-controls-wireless-playback-status):
310         (audio::-webkit-media-controls-wireless-playback-status.small):
311         (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
312
313 2015-07-02  Eric Carlson  <eric.carlson@apple.com>
314
315         [Mac] Clear current AirPlay source before setting another
316         https://bugs.webkit.org/show_bug.cgi?id=145959
317
318         Reviewed by Brent Fulgham.
319
320         * Modules/mediasession/WebMediaSessionManager.cpp:
321         (WebCore::WebMediaSessionManager::clientStateDidChange): Don't make a client begin playing 
322           to the target just because it has paused.
323         (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Always select a client that
324           requrested the picker, and never consider paused clients when choosing a client to begin
325           playing to the targer. Call setShouldPlayToPlaybackTarget(true) after all of the other 
326           clients have been told to stop playing to the target.
327
328 2015-07-02  Beth Dakin  <bdakin@apple.com>
329
330         Allow the UIDelegate to customize an image preview
331         https://bugs.webkit.org/show_bug.cgi?id=146557
332         -and corresponding-
333         rdar://problem/21657424
334
335         Reviewed by Tim Horton.
336
337         Add WEBCORE_EXPORT to use this in WK2.
338         * loader/cache/CachedResource.h:
339         (WebCore::CachedResource::url):
340
341 2015-07-02  Brady Eidson  <beidson@apple.com>
342
343         Add preference to disable all http-equiv.
344         <rdar://problem/9091261> and https://bugs.webkit.org/show_bug.cgi?id=146553
345
346         Reviewed by Sam Weinig.
347
348         No new tests (Covered by existing test)
349
350         * dom/Document.cpp:
351         (WebCore::Document::processHttpEquiv):
352         * page/Settings.in:
353
354 2015-07-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
355
356         [Streams API] Remove ReadableStreamController.enqueue() custom binding
357         https://bugs.webkit.org/show_bug.cgi?id=146455
358
359         Reviewed by Darin Adler.
360
361         Made enqueue not custom. Updated error to use Default=Undefined in IDL.
362
363         No change in behavior.
364
365         * Modules/streams/ReadableStreamController.h:
366         (WebCore::ReadableStreamController::error): Removed unneeded variation of error.
367         (WebCore::ReadableStreamController::enqueue): Calling ReadableJSStream enqueue method.
368         * Modules/streams/ReadableStreamController.idl: Updated error with Default=Undefined and made enqueue not custom.
369         * bindings/js/JSDOMBinding.cpp:
370         (WebCore::createDOMException): Adding support for RangeError exceptions.
371         * bindings/js/JSReadableStreamControllerCustom.cpp:
372         (WebCore::constructJSReadableStreamController): Deleted.
373         * bindings/js/ReadableJSStream.cpp:
374         (WebCore::ReadableJSStream::error): Updated to pass error value as parameter.
375         (WebCore::ReadableJSStream::enqueue): Added exception throwing through ExceptionCode.
376         (WebCore::ReadableJSStream::retrieveChunkSize): Ditto.
377         * bindings/js/ReadableJSStream.h:
378         * dom/ExceptionCode.h: Adding RangeError.
379
380 2015-07-02  Brady Eidson  <beidson@apple.com>
381
382         [Content Extensions] Block synchronous XMLHTTPRequest.
383         <rdar://problem/21573006> and https://bugs.webkit.org/show_bug.cgi?id=146271
384
385         Reviewed by Alex Christensen.
386
387         Test: http/tests/contentextensions/sync-xhr-blocked.html
388
389         * loader/FrameLoader.cpp:
390         (WebCore::FrameLoader::loadResourceSynchronously): If content blocked, set up an error, clear
391           the response, and clear the response data.
392
393 2015-07-01  Joseph Pecoraro  <pecoraro@apple.com>
394
395         Web Inspector: Aggregate profile call information on the backend to drastically reduce profile sizes
396         https://bugs.webkit.org/show_bug.cgi?id=146536
397
398         Reviewed by Timothy Hatcher.
399
400         * inspector/TimelineRecordFactory.cpp:
401         (WebCore::buildAggregateCallInfoInspectorObject):
402         (WebCore::buildInspectorObject):
403         Replace the array of Call objects with a single aggregated call info object.
404
405 2015-07-01  Brent Fulgham  <bfulgham@apple.com>
406
407         [Win] REGRESSION (r185124) CACFLayer handling broken
408         https://bugs.webkit.org/show_bug.cgi?id=146530
409         <rdar://problem/21642241>
410
411         Reviewed by Tim Horton.
412
413         At some point in the past, the set of LayerChange flags
414         overflowed the default MSVC enum type of 'int'. This caused
415         Windows rendering code to not receive various update notifications.
416
417         Zalan's change moved the DebugIndicatorsChanged flag into that
418         overflow set, which made it obvious that something was wrong.
419
420         The fix is to tell the compiler to use a compatible base type
421         for the enum.
422
423         * platform/graphics/ca/GraphicsLayerCA.h: Prevent overflow.
424
425 2015-07-01  Alex Christensen  <achristensen@webkit.org>
426
427         Reduce resolution of performance.now.
428         https://bugs.webkit.org/show_bug.cgi?id=146531
429         rdar://problem/20116796
430
431         Reviewed by Simon Fraser.
432
433         Test: http/tests/misc/webtiming-resolution.html
434
435         * page/Performance.cpp:
436         (WebCore::Performance::now):
437         Floor the time returned by performance.now to the nearest 5 microseconds.
438
439 2015-07-01  Eric Carlson  <eric.carlson@apple.com>
440
441         [iOS] Build fix
442
443         Reviewed by Brent Fulgham.
444
445         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
446         (-[WebAVVideoLayer enterPIPModeRedirectingVideoToLayer:]): Renamed from enterOptimizedFullScreenModeRedirectingVideoToLayer.
447         (-[WebAVVideoLayer leavePIPMode]): Renamed from leaveOptimizedFullScreenMode.
448         (-[WebAVVideoLayer enterOptimizedFullScreenModeRedirectingVideoToLayer:]): Deleted.
449         (-[WebAVVideoLayer leaveOptimizedFullScreenMode]): Deleted.
450
451 2015-07-01  Myles C. Maxfield  <mmaxfield@apple.com>
452
453         [iOS] Support bold and thin italicized system fonts
454         https://bugs.webkit.org/show_bug.cgi?id=146463
455         <rdar://problem/20948885>
456
457         Reviewed by Darin Adler.
458
459         Add the italicized attribute to font descriptors.
460
461         Test: fast/text/weighted-italicized-system-font.html
462
463         * platform/graphics/ios/FontCacheIOS.mm:
464         (WebCore::createCTFontWithFamilyNameAndWeight):
465         * platform/graphics/mac/FontCacheMac.mm:
466         (WebCore::fontWithFamilySpecialCase):
467         (WebCore::fontWithFamily):
468         * platform/spi/cocoa/CoreTextSPI.h:
469
470 2015-07-01  Alex Christensen  <achristensen@webkit.org>
471
472         Fix ANGLE Windows build after r186169.
473         https://bugs.webkit.org/show_bug.cgi?id=146532
474
475         Reviewed by Brent Fulgham.
476
477         * WebCore.vcxproj/WebCore.vcxproj:
478         * WebCore.vcxproj/WebCore.vcxproj.filters:
479         Don't compile OpenGLShims.cpp or Extensions3DOpenGL.cpp on Windows 
480         because Windows uses OpenGLES through ANGLE, not OpenGL.
481         * platform/graphics/ANGLEWebKitBridge.h:
482         Use OpenGLESShims.h on Windows instead of OpenGLShims.h.
483         * platform/graphics/OpenGLESShims.h:
484         Added needed definitions from OpenGL to compile successfully.
485         * platform/graphics/win/GL/glext.h: Removed.
486
487 2015-07-01  Dean Jackson  <dino@apple.com>
488
489         Disable the experimental WebGL2 implementation
490         https://bugs.webkit.org/show_bug.cgi?id=146526
491         <rdar://problem/21641235>
492
493         Reviewed by Myles Maxfield.
494
495         Add (and disable) an ENABLE_WEBGL2 flag. Also protect
496         anything that is specific to WebGL2.
497
498         Covered by running the WebGL 1.0.2 conformance suite
499         and our LayoutTests.
500
501         * Configurations/FeatureDefines.xcconfig:
502         * bindings/js/JSCanvasRenderingContextCustom.cpp:
503         (WebCore::toJS):
504         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
505         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
506         (WebCore::toJS):
507         * html/HTMLCanvasElement.cpp:
508         (WebCore::HTMLCanvasElement::is3dType):
509         * html/canvas/WebGL2RenderingContext.cpp:
510         * html/canvas/WebGL2RenderingContext.h:
511         * html/canvas/WebGL2RenderingContext.idl:
512         * html/canvas/WebGLFramebuffer.cpp:
513         (WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
514         * html/canvas/WebGLGetInfo.cpp:
515         * html/canvas/WebGLGetInfo.h:
516         * html/canvas/WebGLRenderingContextBase.cpp:
517         (WebCore::WebGLRenderingContextBase::create):
518         * html/canvas/WebGLVertexArrayObject.cpp:
519         * html/canvas/WebGLVertexArrayObject.h:
520         * html/canvas/WebGLVertexArrayObject.idl:
521
522 2015-07-01  Chris Dumez  <cdumez@apple.com>
523
524         Regression(183998): Disqus comments take a very long time to load
525         https://bugs.webkit.org/show_bug.cgi?id=146522
526         <rdar://problem/21590601>
527
528         Reviewed by Simon Fraser.
529
530         Stop throttling requestAnimationFrame() in iframes that are not visible
531         due to them being zero-sized or display:none. Those are usually utility
532         iframes and throttling them is risky.
533
534         Se still throttle requestAnimationFrame() in iframes that would be
535         visible in theory but are currently not noticeable because they are
536         outside the viewport.
537
538         Test:
539         - fast/animation/request-animation-frame-throttle-subframe.html
540         - fast/animation/request-animation-frame-throttle-subframe-display-none.html
541         - fast/animation/request-animation-frame-throttle-subframe-zero-size.html
542
543         * page/FrameView.cpp:
544         (WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):
545
546 2015-06-30  Ryosuke Niwa  <rniwa@webkit.org>
547
548         REGRESSION (r179168): Characters overlap after resizing the font on the copy-pasted Japanese text
549         https://bugs.webkit.org/show_bug.cgi?id=146492
550
551         Reviewed by Darin Adler.
552
553         The bug was caused by WebKit serializing the used line-height size (e.g. 18px) in the copied content
554         instead of string "normal" and removeStyleFromRulesAndContext failing to strip it down when text with
555         a font that influences the line height got pasted. This is because the used value of line-height
556         property of the context and the pasted content doesn't match when the context doesn't use the same font.
557
558         Fixed the bug by not considering line-height as a list of editing properties we try to preserve. This is
559         fine because we don't provide editing operations to directly manipulate line-height.
560
561         Test: editing/pasteboard/cjk-line-height.html
562
563         * editing/EditingStyle.cpp:
564         (WebCore::editingProperties): Removed CSSPropertyLineHeight.
565
566 2015-06-30  Brent Fulgham  <bfulgham@apple.com>
567
568         REGRESSION (r184296): View keeps scrolling upward
569         https://bugs.webkit.org/show_bug.cgi?id=146497
570         <rdar://problem/21524942>
571
572         Reviewed by Darin Adler.
573
574         Avoid improperly triggering the ScrollController wheel event handling
575         logic when the wheel event deltaX/deltaY are zero. On certain sites,
576         this caused a programmatic JavaScript scroll to be triggered unexpectedly,
577         scrolling the page back to some initial state.
578
579         This bug was introduced while trying to make sure scrollbars were notified
580         when the wheel event had come to an end. Revise that change so that we still
581         follow the right code path for non-stretchable regions. However, make sure
582         that for zero-delta wheel events we make sure to properly handle the wheel
583         event phase. 
584
585         * platform/mac/ScrollAnimatorMac.h:
586         * platform/mac/ScrollAnimatorMac.mm:
587         (WebCore::ScrollAnimatorMac::shouldForwardWheelEventsToParent): New helper function
588         to reduce the complexity of the logic in handleWheelEvent.
589         (WebCore::ScrollAnimatorMac::handleWheelEvent): When wheel events should be forwarded
590         to the parent scroll view, if the event was handled or has no change in position
591         trigger the 'handleWheelEventPhase' logic so that scrollbars are hidden, etc.
592
593 2015-06-30  Dean Jackson  <dino@apple.com>
594
595         Hide the inline controls when going into PiP
596         https://bugs.webkit.org/show_bug.cgi?id=146487
597         <rdar://problem/19881159>
598
599         Reviewed by Eric Carlson.
600
601         When the presentation mode is PiP, toggle a class
602         on the container element so that we can completely
603         hide the control toolbar. The placard should still
604         remain visible.
605
606         * Modules/mediacontrols/mediaControlsiOS.css:
607         (video::-webkit-media-controls-panel-container.picture-in-picture): Add
608         a rule that hides the toolbar when PiP is active.
609         * Modules/mediacontrols/mediaControlsiOS.js:
610         (ControllerIOS.prototype.showControls):
611         (ControllerIOS.prototype.handlePresentationModeChange): Toggle a
612         class. Also fix a bug I noticed where exiting from PiP was
613         not auto-hiding the controls until the user tapped.
614
615 2015-07-01  Matthew Daiter  <mdaiter@apple.com>
616
617         Enable MEDIA_STREAM flag
618         https://bugs.webkit.org/show_bug.cgi?id=145947
619         <rdar://problem/21365829>
620
621         Reviewed by Eric Carlson.
622
623         * Configurations/FeatureDefines.xcconfig: Added MEDIA_STREAM flag
624         * Modules/mediastream/MediaStreamTrack.h:
625         * WebCore.xcodeproj/project.pbxproj: Changed project headers to
626         private headers
627         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
628         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
629         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
630         * platform/mediastream/RealtimeMediaSource.h:
631         * platform/mediastream/mac/AVAudioCaptureSource.mm:
632         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
633         (WebCore::refreshCaptureDeviceList): Deleted.
634         * platform/mediastream/mac/AVMediaCaptureSource.mm:
635         (WebCore::AVMediaCaptureSource::startProducingData):
636         (WebCore::AVMediaCaptureSource::stopProducingData):
637
638 2015-07-01  Brent Fulgham  <bfulgham@apple.com>
639
640         REGRESSION (r185016): Intermittent crash in WebCore::TextTrackList::remove
641         https://bugs.webkit.org/show_bug.cgi?id=146493
642         <rdar://problem/21511122>
643
644         Reviewed by Eric Carlson.
645
646         The m_textTracks member is frequently null checked during other operations, but
647         was not checked during track removal. This needs to be corrected.
648
649         * html/HTMLMediaElement.cpp:
650         (WebCore::HTMLMediaElement::removeTextTrack): Check that m_textTracks is
651         not null before using it during track removal.
652
653 2015-07-01  Antti Koivisto  <antti@apple.com>
654
655         PNG mask images are loaded with Accept:image/svg+xml
656         https://bugs.webkit.org/show_bug.cgi?id=146509
657         rdar://problem/21584740
658
659         Reviewed by Simon Fraser.
660
661         For some strange reason MaskImageOperation code loads all mask images, including non-SVG ones
662         using CachedSVGDocument. Resulting bad accept header may cause server to reject the request.
663
664         This is far from ideal but as a quick fix we can override the accept header for mask images to
665         allow any image type.
666
667         Test: http/tests/misc/mask-image-accept.html
668
669         * loader/cache/CachedResourceLoader.cpp:
670         (WebCore::CachedResourceLoader::requestResource):
671         * loader/cache/CachedResourceRequest.h:
672         (WebCore::CachedResourceRequest::acceptOverride):
673         (WebCore::CachedResourceRequest::setAcceptOverride):
674         * loader/cache/CachedSVGDocumentReference.cpp:
675         (WebCore::CachedSVGDocumentReference::load):
676         * loader/cache/CachedSVGDocumentReference.h:
677         (WebCore::CachedSVGDocumentReference::loadRequested):
678         (WebCore::CachedSVGDocumentReference::setAcceptsAnyImageType):
679         (WebCore::CachedSVGDocumentReference::document):
680         * platform/graphics/MaskImageOperation.cpp:
681         (WebCore::MaskImageOperation::ensureCachedSVGDocumentReference):
682
683 2015-07-01  Jer Noble  <jer.noble@apple.com>
684
685         [MSE] Failures on W3C media-source tests regarding MIME types
686         https://bugs.webkit.org/show_bug.cgi?id=146499
687
688         Reviewed by Eric Carlson.
689
690         Tests: http/tests/media/media-source/SourceBuffer-abort-readyState.html
691                http/tests/media/media-source/SourceBuffer-abort-removed.html
692                http/tests/media/media-source/SourceBuffer-abort-updating.html
693                http/tests/media/media-source/SourceBuffer-abort.html
694
695         Multiple failures in the W3C media-source test suite due to two failures in isTypeSupported MIME type handling:
696         - MIME types without codec strings were being rejected.
697         - MIME types with codec strings which are rejected by the system are being reported as supported.
698
699         For the first, stop rejecting MIME types with non-existent codec strings. For MIME types which do have non-empty
700         codec strings, treat a "Maybe" response as unsupported.
701
702         * Modules/mediasource/MediaSource.cpp:
703         (WebCore::MediaSource::isTypeSupported):
704
705 2015-06-30  Alex Christensen  <achristensen@webkit.org>
706
707         Update ANGLE to b11e2483742db884bd0af41f78f528240577356b.
708         https://bugs.webkit.org/show_bug.cgi?id=145010
709
710         Reviewed by Dean Jackson.
711
712         * CMakeLists.txt:
713         * platform/graphics/ANGLEWebKitBridge.cpp:
714         (WebCore::appendSymbol):
715         (WebCore::getStructInfo):
716         (WebCore::getSymbolInfo):
717         (WebCore::ANGLEWebKitBridge::cleanupCompilers):
718         (WebCore::ANGLEWebKitBridge::compileShaderSource):
719         (WebCore::getValidationResultValue): Deleted.
720         * platform/graphics/ANGLEWebKitBridge.h:
721         (WebCore::ANGLEShaderSymbol::isSampler):
722         * platform/graphics/GraphicsContext3D.h:
723         (WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo):
724         * platform/graphics/mac/GraphicsContext3DMac.mm:
725         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
726         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
727         (WebCore::GraphicsContext3D::checkVaryingsPacking):
728         (WebCore::GraphicsContext3D::precisionsMatch):
729         Update WebCore to reflect changes in ANGLE.
730
731 2015-06-30  Zalan Bujtas  <zalan@apple.com>
732
733         Frame flattening: Hit-testing an iframe could end up destroying the associated inline tree context.
734         https://bugs.webkit.org/show_bug.cgi?id=146447
735         rdar://problem/20613501
736
737         Reviewed by Simon Fraser.
738
739         This patch ensures that the render tree associated with the document on which
740         the hit-test is initiated does not get laid out, unless it was directly mutated prior to the hittest.
741
742         Hit-test requirements:
743         1. A clean the render tree before hit-testing gets propagated to the renderers.
744         Document::updateLayout() ensures it by calling both updateStyleIfNeeded() and layout() not only on the current tree, but also
745         on the ancestors if needed.
746
747         2. No render tree mutation while hit-testing the renderers.
748
749         When an iframe is being hit-tested, this hit-test could bubble down to the child frame's render view.
750         In order to ensure #1, we call Document::updateLayout() on the current (subframe) document.
751         If updateStyleIfNeeded() mutates the render tree, we mark it dirty for layout(). However frame flattening also
752         marks the parent renderer (RenderIFrame) dirty.
753         While calling layout() to clean the current render tree, we end up laying out the parent tree too.
754         Laying out the parent tree could end up destroying the inline tree context from where the
755         hittest just bubbled down. (InlineFlowBox -> RenderWidget -> RenderView).
756
757         This patch protects the render tree from such unintentional inline tree mutation during hittesting.
758         After the initial layout we set a layout disallow flag on the frame view to defer subsequent layouts.
759         This patch only changes behavior when frame flattening is enabled, but in future we may always want to enable this.
760
761         Test: fast/frames/flattening/hittest-iframe-while-style-changes-crash.html
762
763         * page/FrameView.cpp:
764         (WebCore::FrameView::layout):
765         (WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded): Deleted. -> Assertion in no longer valid.
766         * page/FrameView.h:
767         * rendering/RenderView.cpp:
768         (WebCore::FrameFlatteningLayoutDisallower::FrameFlatteningLayoutDisallower):
769         (WebCore::FrameFlatteningLayoutDisallower::~FrameFlatteningLayoutDisallower):
770         (WebCore::RenderView::hitTest): Protect the render tree from subsequent layouts.
771
772 2015-06-30  Andy VanWagoner  <thetalecrafter@gmail.com>
773
774         Implement ECMAScript Internationalization API
775         https://bugs.webkit.org/show_bug.cgi?id=90906
776
777         Reviewed by Benjamin Poulain.
778
779         Test: js/intl.html
780
781         * Configurations/FeatureDefines.xcconfig: add ENABLE_INTL flag
782
783 2015-06-30  Wenson Hsieh  <whsieh@berkeley.edu>
784
785         scroll-snap-points do not work very well with mechanical scroll wheel events
786         https://bugs.webkit.org/show_bug.cgi?id=142501
787         <rdar://problem/20093511>
788
789         Reviewed by Brent Fulgham.
790
791         Stateless scroll events generated by scrolling with a mechanical mouse wheel now trigger scroll
792         snapping after a fixed delay.
793
794         Test: platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html
795
796         * platform/cocoa/ScrollController.h: Added member to track stateless scrolling.
797         * platform/cocoa/ScrollController.mm: Added constant for delay for stateless scroll snapping.
798         (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Triggers timer upon stateless scroll events.
799         (WebCore::ScrollController::horizontalScrollSnapTimerFired): Timer now handles stateless scrolling updates.
800         (WebCore::ScrollController::verticalScrollSnapTimerFired): See above.
801         (WebCore::ScrollController::beginScrollSnapAnimation): Handles stateless scroll snapping.
802
803 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
804
805         Try to fix Gtk and EFL builds.
806
807         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
808         (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
809         (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
810         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
811         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
812         (WebCore::CompositingCoordinator::flushPendingLayerChanges):
813         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
814         (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
815         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
816         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
817
818 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
819
820         [iOS] Missing tiles inside position:fixed on scrolling
821         https://bugs.webkit.org/show_bug.cgi?id=146485
822         rdar://problem/21226861
823
824         Reviewed by Tim Horton.
825
826         Layer flushing adjusts the coverage rect for tiled layers, but does so at times
827         when position:fixed layers are moved around by the scrolling tree. The computed
828         coverage rect then doesn't reflect the layer's on-screen position, causing missing
829         tiles.
830
831         Fix by pushing the notion of being in a "stable state" onto FrameView, and passing
832         that state into the layer flush. When not in a stable state, flushing doesn't change
833         the visible and coverage rects for layers that are viewport-constrained.
834
835         * page/FrameView.cpp:
836         (WebCore::FrameView::reset):
837         * page/FrameView.h: Remove some velocity-related data members that were unused.
838         * platform/graphics/GraphicsLayer.h:
839         (WebCore::GraphicsLayer::flushCompositingState):
840         (WebCore::GraphicsLayer::flushCompositingStateForThisLayerOnly):
841         * platform/graphics/ca/GraphicsLayerCA.cpp:
842         (WebCore::GraphicsLayerCA::flushCompositingState):
843         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
844         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): If this is a viewport-constrained
845         layer, and the viewport is not stable, don't touch the rects.
846         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
847         * platform/graphics/ca/GraphicsLayerCA.h:
848         (WebCore::GraphicsLayerCA::CommitState::CommitState):
849         * rendering/RenderLayerCompositor.cpp:
850         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
851
852 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
853
854         Rename GraphicsLayer's allowsBackingStoreDetachment to isViewportConstrained
855         https://bugs.webkit.org/show_bug.cgi?id=146483
856
857         Reviewed by Tim Horton.
858
859         What GraphicsLayer really needs to know is whether some other thread/process
860         is moving its platform layers around behind its back, and this is is better
861         expressed as "isViewportConstrained" rather than "allowsBackingStoreDetachment".
862         
863         The sense of the flag is flipped, and boolean logic adjusted accordingly.
864
865         * platform/graphics/GraphicsLayer.h:
866         (WebCore::GraphicsLayer::setIsViewportConstrained):
867         (WebCore::GraphicsLayer::isViewportConstrained):
868         (WebCore::GraphicsLayer::setAllowsBackingStoreDetachment): Deleted.
869         (WebCore::GraphicsLayer::allowsBackingStoreDetachment): Deleted.
870         * platform/graphics/ca/GraphicsLayerCA.cpp:
871         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
872         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
873         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
874         * platform/graphics/ca/GraphicsLayerCA.h:
875         * rendering/RenderLayerBacking.cpp:
876         (WebCore::RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole):
877
878 2015-06-30  Dean Jackson  <dino@apple.com>
879
880         CABackdropFilter should set windowServerAware to false
881         https://bugs.webkit.org/show_bug.cgi?id=146469
882         <rdar://problem/21618614>
883
884         Reviewed by Simon Fraser.
885
886         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
887         (PlatformCALayerCocoa::PlatformCALayerCocoa): Set windowServerAware
888         to false on Mac (it's not available on iOS).
889
890 2015-06-30  Chris Dumez  <cdumez@apple.com>
891
892         Rolling out r175171
893         https://bugs.webkit.org/show_bug.cgi?id=146470
894         <rdar://problem/21349934>
895
896         Unreviewed, rolling out <http://trac.webkit.org/changeset/175171>. It
897         wasn't a huge win and Brady says it caused crash at
898         <rdar://problem/21349934>.
899
900         * platform/network/cf/ResourceRequest.h:
901         * platform/network/cocoa/ResourceRequestCocoa.mm:
902         (WebCore::ResourceRequest::doUpdatePlatformRequest):
903         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
904
905 2015-06-30  Matt Baker  <mattbaker@apple.com>
906
907         Web Inspector: Reduce rendering frames "Other" time by instrumenting compositing
908         https://bugs.webkit.org/show_bug.cgi?id=146168
909
910         Reviewed by Brian Burg.
911
912         Added Inspector instrumentation for measuring CoreAnimation compositing time. We mark the start of a composite
913         event when the LayerFlushScheduler triggers a scheduled layer flush. InspectorController now exports a function
914         for marking the end of the composite event, which should be called during the CA transaction post-commit phase
915         (based on platform support). Lacking platform support, the event is considered complete after CoreAnimation
916         runloop observers have run.
917
918         * inspector/InspectorController.cpp:
919         (WebCore::InspectorController::didComposite):
920         * inspector/InspectorController.h:
921         New export for instrumentation in WebKit2.
922
923         * inspector/InspectorInstrumentation.cpp:
924         (WebCore::InspectorInstrumentation::willCompositeImpl):
925         (WebCore::InspectorInstrumentation::didCompositeImpl):
926         * inspector/InspectorInstrumentation.h:
927         (WebCore::InspectorInstrumentation::willComposite):
928         (WebCore::InspectorInstrumentation::didComposite):
929         Plumbing for new instrumentation.
930
931         * inspector/InspectorTimelineAgent.cpp:
932         (WebCore::InspectorTimelineAgent::internalStart):
933         (WebCore::InspectorTimelineAgent::internalStop):
934         (WebCore::InspectorTimelineAgent::willComposite):
935         (WebCore::InspectorTimelineAgent::didComposite):
936         (WebCore::toProtocol):
937         * inspector/InspectorTimelineAgent.h:
938         New Composite event type and instrumentation.
939
940         * page/FrameView.cpp:
941         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
942         Hook for start of compositing.
943
944         * platform/spi/cocoa/QuartzCoreSPI.h:
945         New header include and interface declaration.
946
947 2015-06-30  Beth Dakin  <bdakin@apple.com>
948
949         The bounds on InteractionInformationAtPosition should be more precise
950         https://bugs.webkit.org/show_bug.cgi?id=146468
951         -and corresponding-
952         rdar://problem/20739834
953
954         Reviewed by Enrica Casucci and Simon Fraser.
955
956         Export absoluteContentQuad().
957         * rendering/RenderBox.h:
958
959 2015-06-30  Zalan Bujtas  <zalan@apple.com>
960
961         Addressing post-review comments in r185756.
962
963         * html/RubyTextElement.cpp:
964         (WebCore::RubyTextElement::createElementRenderer):
965
966 2015-06-30  Zalan Bujtas  <zalan@apple.com>
967
968         Addressing post-review comments in r185916
969
970         * platform/LayoutUnit.h:
971         (WebCore::roundToDevicePixel):
972
973 2015-06-30  Matt Rajca  <mrajca@apple.com>
974
975         MediaSession: Use setSessionInternal to set the default media session in HTMLMediaElement's constructor
976         https://bugs.webkit.org/show_bug.cgi?id=146465
977
978         Reviewed by Eric Carlson.
979
980         * html/HTMLMediaElement.cpp:
981         (WebCore::HTMLMediaElement::HTMLMediaElement):
982
983 2015-06-30  Matt Rajca  <mrajca@apple.com>
984
985         Media Session: implement algorithm for updating a media element's session (6.1)
986         https://bugs.webkit.org/show_bug.cgi?id=146460
987
988         Reviewed by Darin Adler.
989
990         In addition to storing a pointer to the new media session, we now:
991
992         - pause the media element if it is 'active' in the current media session
993         - remove the media element from the current media session
994         - release the current media session if there are no more active media elements
995         - set the default media session if the new media session is null
996         - update the 'kind' attribute to match the kind of the new media session
997
998         * Modules/mediasession/MediaSession.cpp:
999         (WebCore::MediaSession::isMediaElementActive):
1000         (WebCore::MediaSession::hasActiveMediaElements):
1001         * Modules/mediasession/MediaSession.h:
1002         * html/HTMLMediaElement.cpp:
1003         (WebCore::HTMLMediaElement::setSession):
1004         (WebCore::HTMLMediaElement::setSessionInternal):
1005         * html/HTMLMediaElement.h:
1006
1007 2015-06-29  Anders Carlsson  <andersca@apple.com>
1008
1009         Get rid of unused WKSI functions
1010         https://bugs.webkit.org/show_bug.cgi?id=146443
1011
1012         Reviewed by Tim Horton.
1013
1014         * platform/graphics/cg/PathCG.cpp:
1015         (WebCore::Path::platformAddPathForRoundedRect):
1016         Just call CGPathAddRoundedRect directly.
1017
1018         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1019         * platform/mac/WebCoreSystemInterface.h:
1020         * platform/mac/WebCoreSystemInterface.mm:
1021
1022 2015-06-30  Youenn Fablet  <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>
1023
1024         [Streams API] Finish pulling must always be done asynchronously as it is the expected promise behavior (according to the spec)
1025         https://bugs.webkit.org/show_bug.cgi?id=146408
1026
1027         Reviewed by Darin Adler.
1028
1029         Current tests cover the case already.
1030
1031         * Modules/streams/ReadableStream.cpp:
1032         (WebCore::ReadableStream::pull): Call finishPull() in a postTask to delay it and simulate the promise
1033         resolution.
1034
1035 2015-06-30  Youenn Fablet  <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>
1036
1037         [Streams API] Synced bad strategy test with reference implementation
1038         https://bugs.webkit.org/show_bug.cgi?id=146411
1039
1040         Reviewed by Darin Adler.
1041
1042         Current tests cover the case.
1043
1044         * bindings/js/ReadableJSStream.cpp:
1045         (WebCore::ReadableJSStream::retrieveChunkSize): Check for negative size then running the JavaScript function.
1046
1047 2015-06-30  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1048
1049         [Streams API] Remove ReadableStream.getReader() custom binding
1050         https://bugs.webkit.org/show_bug.cgi?id=146404
1051
1052         Reviewed by Darin Adler.
1053
1054         Covered by existing tests.
1055
1056         * Modules/streams/ReadableStream.cpp:
1057         (WebCore::ReadableStream::getReader): Updated to take an exception.
1058         * Modules/streams/ReadableStream.h:
1059         * Modules/streams/ReadableStream.idl: Updated to remove custom binding.
1060         * bindings/js/JSReadableStreamCustom.cpp:
1061         (WebCore::JSReadableStream::getReader): Deleted.
1062         * bindings/js/JSReadableStreamReaderCustom.cpp:
1063         (WebCore::constructJSReadableStreamReader): Updated to pass an exception to getReader.
1064
1065 2015-06-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1066
1067         [Streams API] ReadableStreamReader.closed should use DOMPromise
1068         https://bugs.webkit.org/show_bug.cgi?id=146406
1069
1070         Reviewed by Darin Adler.
1071
1072         Added storage of ClosedPromise as Optional of ReadableStream.
1073         Updated code accordingly.
1074
1075         Covered by existing tests.
1076
1077         * Modules/streams/ReadableStream.cpp:
1078         (WebCore::ReadableStream::clearCallbacks):
1079         (WebCore::ReadableStream::releaseReader):
1080         (WebCore::ReadableStream::changeStateToErrored):
1081         (WebCore::ReadableStream::closed):
1082         * Modules/streams/ReadableStream.h:
1083         * Modules/streams/ReadableStreamReader.cpp:
1084         (WebCore::ReadableStreamReader::closed):
1085         * Modules/streams/ReadableStreamReader.h:
1086         * bindings/js/JSReadableStreamReaderCustom.cpp:
1087         (WebCore::JSReadableStreamReader::closed):
1088
1089 2015-06-29  Simon Fraser  <simon.fraser@apple.com>
1090
1091         [iOS WK2] WKWebViews in Facebook app start off black
1092         https://bugs.webkit.org/show_bug.cgi?id=146445
1093         rdar://problem/21600433
1094
1095         Reviewed by Tim Horton.
1096
1097         If -isOpaque is toggled on a WKWebView, we failed to make the page tiles non-opaque
1098         for a while. After r183775, RenderLayerCompositor::rootBackgroundTransparencyChanged() was called,
1099         but only considered the computed document background color, and not the view transparency.
1100         
1101         Fix by having rootBackgroundTransparencyChanged() simply use viewHasTransparentBackground(),
1102         which checks the FrameView transparency. Now we just need to store a transparency bool rather
1103         than the old color (we only checked its alpha anyway).
1104
1105         * rendering/RenderLayerCompositor.cpp:
1106         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged):
1107
1108 2015-06-29  Dean Jackson  <dino@apple.com>
1109
1110         WebKit should use 80% black background for PiP indicator
1111         https://bugs.webkit.org/show_bug.cgi?id=146444
1112         <rdar://problem/21555726>
1113
1114         Reviewed by Sam Weinig.
1115
1116         Change the black background to a slightly less black background.
1117         This also involved making the placard artwork white, in order
1118         to keep it visible against the new grey.
1119
1120         * Modules/mediacontrols/mediaControlsiOS.css:
1121         (audio::-webkit-media-controls-wireless-playback-status):
1122         (audio::-webkit-media-controls-wireless-playback-status.small):
1123         (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
1124
1125 2015-06-29  Brady Eidson  <beidson@apple.com>
1126
1127         Flag sync XHRs from the network process so they can be handled appropriately.
1128         <rdar://problem/21579162> and https://bugs.webkit.org/show_bug.cgi?id=146441
1129
1130         Reviewed by Darin Adler.
1131
1132         * platform/network/ResourceHandleClient.h:
1133         (WebCore::ResourceHandleClient::loadingSynchronousXHR): Added so clients of asynchronous
1134           loads can signal they should be treated like synchronous loads at the platform level.
1135
1136         * platform/network/cf/ResourceHandleCFNet.cpp:
1137         (WebCore::ResourceHandle::start): Adjust SchedulingBehavior based on the client.
1138
1139         * platform/network/mac/ResourceHandleMac.mm:
1140         (WebCore::ResourceHandle::start): Adjust SchedulingBehavior based on the client.
1141
1142 2015-06-29  Chris Fleizach  <cfleizach@apple.com>
1143
1144         AX: PlatformSpeechSynthesizer code doesn't catch Objective-C exceptions
1145         https://bugs.webkit.org/show_bug.cgi?id=146419
1146
1147         Reviewed by Simon Fraser.
1148
1149         Make sure ObjC exception resulting from calling into the platform cause problems in WebKit.
1150
1151         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
1152         (-[WebSpeechSynthesisWrapper speakUtterance:]):
1153         (-[WebSpeechSynthesisWrapper pause]):
1154         (-[WebSpeechSynthesisWrapper resume]):
1155         (-[WebSpeechSynthesisWrapper cancel]):
1156         (-[WebSpeechSynthesisWrapper speechSynthesizer:didStartSpeechUtterance:]):
1157         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
1158         (WebCore::PlatformSpeechSynthesizer::pause):
1159
1160 2015-06-29  Matt Rajca  <mrajca@apple.com>
1161
1162         Removing an element from a media session should also remove it from the sets of active participating elements
1163         https://bugs.webkit.org/show_bug.cgi?id=146420
1164
1165         Reviewed by Eric Carlson.
1166
1167         * Modules/mediasession/MediaSession.cpp:
1168         (WebCore::MediaSession::removeMediaElement):
1169
1170 2015-06-29  Dean Jackson  <dino@apple.com>
1171
1172         Temporarily disable PICTURE_SIZES
1173         https://bugs.webkit.org/show_bug.cgi?id=146435
1174         <rdar://problem/21087013>
1175
1176         Reviewed by Tim Horton.
1177
1178         Temporarily disable PICTURE_SIZES because it causes problems with out
1179         of date <picture> polyfills.
1180
1181         * Configurations/FeatureDefines.xcconfig:
1182
1183 2015-06-29  Tim Horton  <timothy_horton@apple.com>
1184
1185         Fix the build.
1186
1187         * editing/cocoa/HTMLConverter.mm:
1188         * platform/spi/cocoa/NSAttributedStringSPI.h:
1189
1190 2015-06-29  Tim Horton  <timothy_horton@apple.com>
1191
1192         Fix the build.
1193
1194         * platform/spi/cocoa/NSAttributedStringSPI.h:
1195
1196 2015-06-29  Tim Horton  <timothy_horton@apple.com>
1197
1198         Fix the build.
1199
1200         * platform/spi/cocoa/NSAttributedStringSPI.h:
1201
1202 2015-06-27  Ryosuke Niwa  <rniwa@webkit.org>
1203
1204         Font panel doesn't get updated when bolding text via cmd+b in Mail on OS X
1205         https://bugs.webkit.org/show_bug.cgi?id=146379
1206
1207         Reviewed by Darin Adler.
1208
1209         The bug was caused by WebKit not updating the font panel when the typing style changes.
1210         There was also a bug that WebKit never updated font attributes on OS X.
1211
1212         Fixed the bugs by always updating the font panel after applying style instead of only
1213         when the selection changes and setting the font attributes.
1214
1215         I tried really had to write a WebKit API test but I couldn't get it to work so there are
1216         no new tests :(
1217
1218         * WebCore.xcodeproj/project.pbxproj:
1219         * editing/Editor.cpp:
1220         (WebCore::Editor::applyStyle):
1221         (WebCore::Editor::shouldApplyStyle):
1222         (WebCore::Editor::applyParagraphStyle):
1223         (WebCore::Editor::applyStyleToSelection):
1224         (WebCore::Editor::applyParagraphStyleToSelection):
1225         (WebCore::Editor::selectionStartHasStyle):
1226         (WebCore::Editor::document):
1227         (WebCore::Editor::styleForSelectionStart): Deleted.
1228         * editing/Editor.h:
1229         * editing/cocoa/EditorCocoa.h: Added. Shares the declaration for NSUnderlineStyle in iOS.
1230         * editing/cocoa/EditorCocoa.mm: Added.
1231         (WebCore::Editor::styleForSelectionStart): Moved from Editor.cpp
1232         (WebCore::Editor::getTextDecorationAttributesRespectingTypingStyle): Extracted from iOS's
1233         fontAttributesForSelectionStart implementation.
1234         * editing/cocoa/HTMLConverter.mm:
1235         * editing/ios/EditorIOS.mm:
1236         (WebCore::Editor::fontAttributesForSelectionStart):
1237         * editing/mac/EditorMac.mm:
1238         (WebCore::Editor::fontAttributesForSelectionStart):
1239         * loader/EmptyClients.h:
1240         * page/EditorClient.h:
1241
1242 2015-06-29  Matt Rajca  <mrajca@apple.com>
1243
1244         MediaSession: use a HashSet for the collection of participating elements
1245         https://bugs.webkit.org/show_bug.cgi?id=146421
1246
1247         Reviewed by Eric Carlson.
1248
1249         * Modules/mediasession/MediaSession.cpp:
1250         (WebCore::MediaSession::addMediaElement):
1251         (WebCore::MediaSession::removeMediaElement):
1252         * Modules/mediasession/MediaSession.h:
1253
1254 2015-06-29  Dean Jackson  <dino@apple.com>
1255
1256         Setting to enable/disable media controls sizing on page zoom
1257         https://bugs.webkit.org/show_bug.cgi?id=146423
1258         <rdar://problem/18379634>
1259
1260         Reviewed by Eric Carlson.
1261
1262         Add a new setting "MediaControlsScaleWithPageZoom" that can disable
1263         the behaviour we currently implement on iOS, where the media controls
1264         attempt to remain at a fixed size independent of page zoom.
1265
1266         * html/HTMLMediaElement.cpp:
1267         (WebCore::HTMLMediaElement::setMediaControlsDependOnPageScaleFactor): Do not
1268         set this value to true if the new setting is disabled.
1269         * page/Settings.cpp:
1270         * page/Settings.in: Add the new setting.
1271
1272 2015-06-29  Adam Bergkvist  <adam.bergkvist@ericsson.com>
1273
1274         WebRTC: Update the MediaStream API
1275         https://bugs.webkit.org/show_bug.cgi?id=146313
1276
1277         Reviewed by Eric Carlson.
1278
1279         Update the MediaStream API (MediaStream, MediaStreamTrack and
1280         RealtimeMediaSource) to match the Media Capture and Stream
1281         specification [1]. Notable changes:
1282
1283         Updated event handling to synchronously update corresponding
1284         state/attributes as events are dispatched.
1285
1286         Removed 'new' state from MediaStreamTrack. A track is either 'live' or
1287         'ended'. As a consequence 'started' event is also removed.
1288
1289         MediaStreamTrack always has a source (disconnected source concept was
1290         removed from the spec). Therefore, more state can be kept at the source
1291         without going away.
1292
1293         Calculate MediaStream.active internally, from the track set, instead of
1294         setting it externally.
1295
1296         Updated RealtimeMediaSource Observer interface.
1297
1298         Replaced MediaStream's separate audio and video track lists with a
1299         single track set (more aligned with spec).
1300
1301         Updated MediaStream constructor to adopt instead of clone track
1302         arguments (or tracks from MediaStream argument).
1303
1304         Removed MediaStreamTrack.getSources() and corresponding test (removed
1305         from spec).
1306
1307         Test status: 3 added, 8 existing enabled (some updated) and 1 removed.
1308
1309         [1] http://w3c.github.io/mediacapture-main/archives/20150523/getusermedia.html
1310
1311         Tests: fast/mediastream/MediaStreamTrack-clone.html
1312                fast/mediastream/MediaStreamTrack-kind.html
1313                fast/mediastream/MediaStreamTrack-stop.html
1314
1315         * Modules/mediastream/MediaStream.cpp:
1316         (WebCore::MediaStream::create):
1317         (WebCore::MediaStream::MediaStream):
1318         (WebCore::MediaStream::clone):
1319         (WebCore::MediaStream::addTrack):
1320         (WebCore::MediaStream::removeTrack):
1321         (WebCore::MediaStream::getTrackById):
1322         (WebCore::MediaStream::getAudioTracks):
1323         (WebCore::MediaStream::getVideoTracks):
1324         (WebCore::MediaStream::getTracks):
1325         (WebCore::MediaStream::contextDestroyed):
1326         (WebCore::MediaStream::trackDidEnd):
1327         (WebCore::MediaStream::activeStatusChanged):
1328         (WebCore::MediaStream::didAddTrackToPrivate):
1329         (WebCore::MediaStream::didRemoveTrackFromPrivate):
1330         (WebCore::MediaStream::internalAddTrack):
1331         (WebCore::MediaStream::internalRemoveTrack):
1332         (WebCore::MediaStream::scheduleActiveStateChange):
1333         (WebCore::MediaStream::activityEventTimerFired):
1334         (WebCore::MediaStream::trackVectorForType):
1335         (WebCore::MediaStream::~MediaStream): Deleted.
1336         (WebCore::MediaStream::registry): Deleted.
1337         (WebCore::MediaStream::addObserver): Deleted.
1338         (WebCore::MediaStream::removeObserver): Deleted.
1339         * Modules/mediastream/MediaStream.h:
1340         * Modules/mediastream/MediaStream.idl:
1341         * Modules/mediastream/MediaStreamTrack.cpp:
1342         (WebCore::MediaStreamTrack::MediaStreamTrack):
1343         (WebCore::MediaStreamTrack::~MediaStreamTrack):
1344         (WebCore::MediaStreamTrack::kind):
1345         (WebCore::MediaStreamTrack::id):
1346         (WebCore::MediaStreamTrack::label):
1347         (WebCore::MediaStreamTrack::enabled):
1348         (WebCore::MediaStreamTrack::setEnabled):
1349         (WebCore::MediaStreamTrack::muted):
1350         (WebCore::MediaStreamTrack::readonly):
1351         (WebCore::MediaStreamTrack::remote):
1352         (WebCore::MediaStreamTrack::readyState):
1353         (WebCore::MediaStreamTrack::ended):
1354         (WebCore::MediaStreamTrack::clone):
1355         (WebCore::MediaStreamTrack::stopProducingData):
1356         (WebCore::MediaStreamTrack::states):
1357         (WebCore::MediaStreamTrack::getCapabilities):
1358         (WebCore::MediaStreamTrack::applyConstraints):
1359         (WebCore::MediaStreamTrack::trackEnded):
1360         (WebCore::MediaStreamTrack::trackMutedChanged):
1361         (WebCore::MediaStreamTrack::stop):
1362         (WebCore::MediaStreamTrack::getConstraints): Deleted.
1363         (WebCore::MediaStreamTrack::addObserver): Deleted.
1364         (WebCore::MediaStreamTrack::removeObserver): Deleted.
1365         (WebCore::MediaStreamTrack::configureTrackRendering): Deleted.
1366         (WebCore::MediaStreamTrack::activeDOMObjectName): Deleted.
1367         (WebCore::MediaStreamTrack::canSuspendForPageCache): Deleted.
1368         * Modules/mediastream/MediaStreamTrack.h:
1369         * Modules/mediastream/MediaStreamTrack.idl:
1370         * Modules/mediastream/RTCPeerConnection.cpp:
1371         (WebCore::RTCPeerConnection::didRemoveRemoteStream): Deleted.
1372         * Modules/mediastream/UserMediaRequest.cpp:
1373         (WebCore::UserMediaRequest::didCreateStream):
1374         * platform/mediastream/MediaStreamPrivate.cpp:
1375         (WebCore::MediaStreamPrivate::create):
1376         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
1377         (WebCore::MediaStreamPrivate::tracks):
1378         (WebCore::MediaStreamPrivate::updateActiveState):
1379         (WebCore::MediaStreamPrivate::addTrack):
1380         (WebCore::MediaStreamPrivate::removeTrack):
1381         * platform/mediastream/MediaStreamPrivate.h:
1382         (WebCore::MediaStreamPrivate::active): Deleted.
1383         * platform/mediastream/MediaStreamTrackPrivate.cpp:
1384         (WebCore::MediaStreamTrackPrivate::create):
1385         (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
1386         (WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate):
1387         (WebCore::MediaStreamTrackPrivate::label):
1388         (WebCore::MediaStreamTrackPrivate::setEnabled):
1389         (WebCore::MediaStreamTrackPrivate::endTrack):
1390         (WebCore::MediaStreamTrackPrivate::clone):
1391         (WebCore::MediaStreamTrackPrivate::type):
1392         (WebCore::MediaStreamTrackPrivate::applyConstraints):
1393         (WebCore::MediaStreamTrackPrivate::sourceStopped):
1394         (WebCore::MediaStreamTrackPrivate::sourceMutedChanged):
1395         (WebCore::MediaStreamTrackPrivate::preventSourceFromStopping):
1396         (WebCore::MediaStreamTrackPrivate::muted): Deleted.
1397         (WebCore::MediaStreamTrackPrivate::readonly): Deleted.
1398         (WebCore::MediaStreamTrackPrivate::remote): Deleted.
1399         (WebCore::MediaStreamTrackPrivate::constraints): Deleted.
1400         (WebCore::MediaStreamTrackPrivate::states): Deleted.
1401         (WebCore::MediaStreamTrackPrivate::capabilities): Deleted.
1402         * platform/mediastream/MediaStreamTrackPrivate.h:
1403         (WebCore::MediaStreamTrackPrivate::id):
1404         (WebCore::MediaStreamTrackPrivate::ended):
1405         (WebCore::MediaStreamTrackPrivate::enabled):
1406         (WebCore::MediaStreamTrackPrivate::setClient):
1407         (WebCore::MediaStreamTrackPrivate::source): Deleted.
1408         (WebCore::MediaStreamTrackPrivate::client): Deleted.
1409         * platform/mediastream/RealtimeMediaSource.cpp:
1410         (WebCore::RealtimeMediaSource::RealtimeMediaSource):
1411         (WebCore::RealtimeMediaSource::reset):
1412         (WebCore::RealtimeMediaSource::setMuted):
1413         (WebCore::RealtimeMediaSource::readonly):
1414         (WebCore::RealtimeMediaSource::stop):
1415         (WebCore::RealtimeMediaSource::requestStop):
1416         (WebCore::RealtimeMediaSource::addObserver): Deleted.
1417         (WebCore::RealtimeMediaSource::removeObserver): Deleted.
1418         * platform/mediastream/RealtimeMediaSource.h:
1419         (WebCore::RealtimeMediaSource::stopped):
1420         (WebCore::RealtimeMediaSource::id): Deleted.
1421         (WebCore::RealtimeMediaSource::muted): Deleted.
1422         (WebCore::RealtimeMediaSource::setReadonly): Deleted.
1423         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
1424         (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Deleted.
1425         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
1426         (WebCore::MockRealtimeMediaSourceCenter::createMediaStream): Deleted.
1427
1428 2015-06-29  Benjamin Poulain  <benjamin@webkit.org>
1429
1430         Make the NFA transitions range-based
1431         https://bugs.webkit.org/show_bug.cgi?id=146338
1432
1433         Reviewed by Alex Christensen.
1434
1435         Change the NFA to use range based transition for any kind of transition.
1436         The fallback transition is also absorbed as ranges.
1437
1438         Previously, the NFA would only have single transitions and a fallback
1439         transition for all cases not covered by single transitions.
1440
1441         The problem with that design was that character ranges (e.g. [a-z]) were
1442         extended as individual transitions. Something like [^a] would cover
1443         most of the alphabet with transitions.
1444         When converting the NFA to DFA, the time is proportional to the number of states
1445         multiplied by the number of transitions. With many individual transitions,
1446         the run time was an order of magnitude higher than what we want.
1447
1448         This patch changes the NFA to only handle ranges of characters. A single transition
1449         becomes a range with the character as first and last character in the range
1450         ('a' becomes 'a' to 'a').
1451         Ranges of characters are handled direclty (e.g. [a-z] becomes a single 'a' to 'z' transition).
1452
1453         In the context of the state machines, ranges have identifies (the target of the transitions).
1454         When two ranges collide, they have to be split such that each part retain its target
1455         except the intersection that gets the union of the targets.
1456
1457         Handling the union of ranges efficiently is critical because we have to do
1458         it for every NFA node in any subset when building the DFA. The helper
1459         class that does that is MutableRange.
1460
1461         The union of ranges is done efficiently because of preconditions on our list of ranges:
1462         -The ranges must be sorted.
1463         -No range in a list can intersect any other range in the same list.
1464
1465         To merge two ranges, we can go over them in order and split them part by part.
1466         It is easy to find what goes where because they are both sorted and we can
1467         compare the characters of each to know how to move forward.
1468         The time to merge 2 range list is proportional to O(n+m) where 'n' and 'm' are
1469         the number of ranges in each list.
1470
1471         Since taking the union of two lists usually create new ranges, we have to allocate
1472         those somewhere efficiently. To do that, MutableRange support an inline capacity,
1473         which is used for the NFAToDFA Convertion.
1474
1475         ---
1476
1477         With ranges, the NFA-to-DFA conversion changes very little:
1478         -Each NFA nodes contains a list of ranges and each range has a list of targets.
1479         -The subset construction select any number of NFA nodes corresponding to
1480          a single deterministic state.
1481         -For the subset, we can use MutableRange to merge the ranges of every
1482          NFA node in the set. The resulting list has rangeis with targets corresponding
1483          to the union of all the transitions.
1484         -We go over all the ranges the same way we used to go over the transitions.
1485          Since the DFA does not support ranges, the ranges are spread as individual
1486          transitions + fallback transition.
1487
1488         ---
1489
1490         With the efficient merging solved, we still need the actual NFA to use ranges
1491         instead of individual transitions.
1492
1493         I could have used MutableRange for that but it is not the most compact
1494         way to represent ranges that do not need merging.
1495
1496         Instead, the NFA uses a custom structure: ImmutableNFA. It is basically
1497         the same thing, but in that one you cannot change a list of range
1498         after creating it.
1499
1500         Consequently, the sorted ranges in ImmutableNFA are also subsequent
1501         in memory, which is really nice to go over them efficiently
1502         when merging ranges in the NFA-to-DFA conversion. :)
1503
1504         When building the NFA, we don't know all the transitions when creating
1505         each node, BUT we know that we have very few node "unfinished" at any
1506         time. Since we build by going depth-first in the prefix-tree, we only
1507         have the max-depth of live nodes in the worst case.
1508
1509         To help building the NFA out of the prefix tree, we have
1510         ImmutableNFANodeBuilder. It keeps all the informations about a NFA node,
1511         but in a non-compact, mutable form. When a ImmutableNFANodeBuilder
1512         is destroyed, it serialize the information into the immutable NFA.
1513
1514         * WebCore.xcodeproj/project.pbxproj:
1515         * contentextensions/CombinedURLFilters.cpp:
1516         (WebCore::ContentExtensions::generateNFAForSubtree):
1517         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
1518         * contentextensions/ContentExtensionCompiler.cpp:
1519         (WebCore::ContentExtensions::compileRuleList):
1520         * contentextensions/DFA.cpp:
1521         (WebCore::ContentExtensions::DFA::empty):
1522         * contentextensions/DFA.h:
1523         * contentextensions/ImmutableNFA.h: Added.
1524         (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator*):
1525         (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator->):
1526         (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator==):
1527         (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator!=):
1528         (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator++):
1529         (WebCore::ContentExtensions::ImmutableNFA::IterableConstTargets::begin):
1530         (WebCore::ContentExtensions::ImmutableNFA::IterableConstTargets::end):
1531         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator*):
1532         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator->):
1533         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator==):
1534         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator!=):
1535         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator++):
1536         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::data):
1537         (WebCore::ContentExtensions::ImmutableNFA::IterableConstRange::begin):
1538         (WebCore::ContentExtensions::ImmutableNFA::IterableConstRange::end):
1539         (WebCore::ContentExtensions::ImmutableNFA::IterableConstRange::debugPrint):
1540         (WebCore::ContentExtensions::ImmutableNFA::transitionsForNode):
1541         (WebCore::ContentExtensions::ImmutableNFA::root):
1542         (WebCore::ContentExtensions::ImmutableNFA::finalize):
1543         (WebCore::ContentExtensions::ImmutableNFA::memoryUsed):
1544         * contentextensions/ImmutableNFANodeBuilder.h: Added.
1545         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::ImmutableNFANodeBuilder):
1546         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::~ImmutableNFANodeBuilder):
1547         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::addTransition):
1548         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::addEpsilonTransition):
1549         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::setActions):
1550         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::operator=):
1551         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::finalize):
1552         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::sinkActions):
1553         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::sinkTransitions):
1554         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::sinkEpsilonTransitions):
1555         * contentextensions/MutableRange.h: Added.
1556         (WebCore::ContentExtensions::MutableRange::MutableRange):
1557         (WebCore::ContentExtensions::MutableRange::operator=):
1558         (WebCore::ContentExtensions::MutableRange::size):
1559         * contentextensions/MutableRangeList.h: Added.
1560         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::operator*):
1561         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::operator->):
1562         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::operator==):
1563         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::operator!=):
1564         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::operator++):
1565         (WebCore::ContentExtensions::MutableRangeList::begin):
1566         (WebCore::ContentExtensions::MutableRangeList::end):
1567         (WebCore::ContentExtensions::MutableRangeList::appendRange):
1568         (WebCore::ContentExtensions::MutableRangeList::extend):
1569         (WebCore::ContentExtensions::MutableRangeList::isEmpty):
1570         (WebCore::ContentExtensions::MutableRangeList::clear):
1571         (WebCore::ContentExtensions::MutableRangeList::debugPrint):
1572         (WebCore::ContentExtensions::MutableRangeList::insertBetween):
1573         (WebCore::ContentExtensions::MutableRangeList::initializeFrom):
1574         * contentextensions/NFA.cpp:
1575         (WebCore::ContentExtensions::NFA::debugPrintDot):
1576         (WebCore::ContentExtensions::NFA::NFA): Deleted.
1577         (WebCore::ContentExtensions::NFA::createNode): Deleted.
1578         (WebCore::ContentExtensions::NFA::memoryUsed): Deleted.
1579         (WebCore::ContentExtensions::NFA::addTransition): Deleted.
1580         (WebCore::ContentExtensions::NFA::addEpsilonTransition): Deleted.
1581         (WebCore::ContentExtensions::NFA::addTransitionsOnAnyCharacter): Deleted.
1582         (WebCore::ContentExtensions::NFA::setActions): Deleted.
1583         (WebCore::ContentExtensions::NFA::graphSize): Deleted.
1584         (WebCore::ContentExtensions::NFA::restoreToGraphSize): Deleted.
1585         (WebCore::ContentExtensions::printRange): Deleted.
1586         (WebCore::ContentExtensions::printTransitions): Deleted.
1587         * contentextensions/NFA.h:
1588         (WebCore::ContentExtensions::NFA::root): Deleted.
1589         (WebCore::ContentExtensions::NFA::addRuleId): Deleted.
1590         * contentextensions/NFANode.h:
1591         * contentextensions/NFAToDFA.cpp:
1592         (WebCore::ContentExtensions::epsilonClosureExcludingSelf):
1593         (WebCore::ContentExtensions::resolveEpsilonClosures):
1594         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetSource::NodeIdSetToUniqueNodeIdSetSource):
1595         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
1596         (WebCore::ContentExtensions::DataConverterWithEpsilonClosure::convert):
1597         (WebCore::ContentExtensions::DataConverterWithEpsilonClosure::extend):
1598         (WebCore::ContentExtensions::createCombinedTransition):
1599         (WebCore::ContentExtensions::canUseFallbackTransition):
1600         (WebCore::ContentExtensions::findBestFallbackTarget):
1601         (WebCore::ContentExtensions::getOrCreateDFANode):
1602         (WebCore::ContentExtensions::NFAToDFA::convert):
1603         (WebCore::ContentExtensions::populateTransitions): Deleted.
1604         * contentextensions/NFAToDFA.h:
1605         * contentextensions/Term.h:
1606         (WebCore::ContentExtensions::Term::Term):
1607         (WebCore::ContentExtensions::Term::generateGraph):
1608         (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
1609         (WebCore::ContentExtensions::Term::Term::generateGraph): Deleted.
1610
1611 2015-06-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1612
1613         Binding generator should allow using JSC::Value for "any" parameter in lieu of ScriptValue
1614         https://bugs.webkit.org/show_bug.cgi?id=146403
1615
1616         Reviewed by Darin Adler.
1617
1618         Covered by existing tests.
1619
1620         Enabling new APIs to use JSC::JSValue by using implicit case from ScriptValue to JSC::JSValue.
1621         Updated binding generator to include ScruptValue header in the needed JSXX.cpp files.
1622         Applied approach to ReadableStreamController.error.
1623
1624         * Modules/streams/ReadableStreamController.h:
1625         (WebCore::ReadableStreamController::error):
1626         * Modules/streams/ReadableStreamController.idl:
1627         * bindings/js/JSReadableStreamControllerCustom.cpp:
1628         (WebCore::constructJSReadableStreamController): Deleted.
1629         * bindings/js/ReadableJSStream.cpp:
1630         (WebCore::ReadableJSStream::error):
1631         * bindings/js/ReadableJSStream.h:
1632         * bindings/scripts/CodeGeneratorJS.pm:
1633         (JSValueToNative):
1634         * bindings/scripts/test/JS/JSTestObj.cpp:
1635
1636 2015-06-29  Anders Carlsson  <andersca@apple.com>
1637
1638         Use DISPATCH_SOURCE_TYPE_MEMORYPRESSURE instead of DISPATCH_SOURCE_TYPE_MEMORYSTATUS
1639         https://bugs.webkit.org/show_bug.cgi?id=146413
1640         rdar://problem/21295036
1641
1642         Reviewed by Andreas Kling.
1643
1644         Replace SPI with API.
1645
1646         * WebCore.xcodeproj/project.pbxproj:
1647         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1648         (WebCore::MemoryPressureHandler::install):
1649         * platform/mac/WebCoreSystemInterface.h:
1650         * platform/spi/cocoa/DispatchSPI.h: Removed.
1651
1652 2015-06-29  Andreas Kling  <akling@apple.com>
1653
1654         [iOS] Pausing a media element should discard buffered data immediately if under memory pressure.
1655         <https://webkit.org/b/146410>
1656         <rdar://problem/20366883>
1657
1658         Reviewed by Darin Adler.
1659
1660         When moving a media element into paused state, call purgeBufferedDataIfPossible()
1661         right away if the system is under memory pressure.
1662
1663         This ensures that mediaserverd drops its forward-looking frame queue right
1664         away instead of waiting for a new pressure notification.
1665
1666         * html/HTMLMediaElement.cpp:
1667         (WebCore::HTMLMediaElement::pauseInternal):
1668
1669 2015-06-29  Matt Rajca  <mrajca@apple.com>
1670
1671         Media Session: Media elements should report a null session for Default sessions
1672         https://bugs.webkit.org/show_bug.cgi?id=146373
1673
1674         Reviewed by Eric Carlson.
1675
1676         If a media element's current session is a 'Default' media session, its session property should report null in
1677         the JavaScript API.
1678
1679         * Modules/mediasession/MediaSession.h:
1680         * html/HTMLMediaElement.cpp:
1681         (WebCore::HTMLMediaElement::session):
1682
1683 2015-06-29  Said Abou-Hallawa  <sabouhallawa@apple.com>
1684
1685         [Mac] Disable QTKit by default.
1686         https://bugs.webkit.org/show_bug.cgi?id=146352
1687
1688         Reviewed by Darin Adler.
1689         
1690         Fix the the requirement for enabling QTKit and AVFoundation.
1691
1692         * page/Settings.cpp:
1693         (WebCore::invalidateAfterGenericFamilyChange): Remove the requirement
1694         for enabling QTKit and AVFoundation. The initial state of QTKit should
1695         be disabled on all OS X ports. And the initial state of AVFoundation
1696         should be enabled  on all OS X ports.
1697
1698 2015-06-29  Hyungwook Lee  <hyungwook.lee@navercorp.com>
1699
1700         [EFL] Purge unused favicons from IconDatabase after 30 days.
1701         https://bugs.webkit.org/show_bug.cgi?id=146334
1702
1703         Reviewed by Gyuyoung Kim.
1704
1705         We need purge unused favicons from IconDatabase for database size control.
1706
1707         * loader/icon/IconDatabase.cpp:
1708         (WebCore::IconDatabase::performURLImport):
1709
1710 2015-06-26  Matt Rajca  <mrajca@apple.com>
1711
1712         Add support for 'Default' media session types
1713         https://bugs.webkit.org/show_bug.cgi?id=146355
1714
1715         Reviewed by Darin Adler.
1716
1717         * Modules/mediasession/MediaSession.cpp:
1718         (WebCore::MediaSession::MediaSession): Added a new constructor for creating 'Default' media sessions.
1719         (WebCore::MediaSession::kind): 'Default' media sessions are represented by an empty string.
1720         * Modules/mediasession/MediaSession.h:
1721         * dom/Document.cpp:
1722         (WebCore::Document::defaultMediaSession): Lazily construct the default media session.
1723         * dom/Document.h:
1724         * html/HTMLMediaElement.cpp:
1725         (WebCore::HTMLMediaElement::HTMLMediaElement): New media elements are assigned to the 'Default' media session.
1726
1727 2015-06-28  Andreas Kling  <akling@apple.com>
1728
1729         [iOS] Drop buffered data in paused media elements on memory pressure.
1730         <https://webkit.org/b/146369>
1731         <rdar://problem/20366883>
1732
1733         Reviewed by Eric Carlson.
1734
1735         To avoid getting crushed under mediaserverd memory growth when viewing
1736         a page with multiple media elements, add a step to the memory pressure
1737         handler that drops buffered data from all media elements that are
1738         not currently playing.
1739
1740         On a test page with a bunch of embedded YouTube videos, this pass frees
1741         up ~4MB per paused video when the system memory pressure hits.
1742
1743         * html/HTMLMediaElement.cpp:
1744         (WebCore::HTMLMediaElement::allMediaElements):
1745         (WebCore::HTMLMediaElement::HTMLMediaElement):
1746         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1747         (WebCore::HTMLMediaElement::purgeBufferedDataIfPossible):
1748         * html/HTMLMediaElement.h:
1749         * platform/MemoryPressureHandler.cpp:
1750         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
1751
1752 2015-06-28  Chris Dumez  <cdumez@apple.com>
1753
1754         Crash: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::CachedFrameBase::restore + 333
1755         https://bugs.webkit.org/show_bug.cgi?id=146388
1756         <rdar://problem/21567343>
1757
1758         Reviewed by Darin Adler.
1759
1760         Pages that are currently loading are not supposed to go into the
1761         PageCache. However, PageCache::canCache() only checks if the
1762         FrameLoader's documentLoader is loading. If the subframe is in
1763         provisional load stage, we would fail to detect that the frame is
1764         actually loading because the FrameLoader active documentLoader would
1765         be the provisional documentLoader, not the regular documentLoader.
1766         Therefore, the page would get added to the PageCache and the frame
1767         would keep loading while in the PageCache.
1768
1769         On http://www.audiusa.com/models, this is what was happening. It was
1770         crashing because the subframe would finish loading while in the
1771         PageCache, in which case we would fire the 'load' event and the
1772         content 'load' event handler would then proceed to remove the iframe.
1773         Upon restoring the PageCache entry, we would run into trouble as we
1774         would have a CachedFrame whose Frame has been removed.
1775
1776         The solution proposed is to prevent page-caching if a subframe is in
1777         provisional load stage.
1778
1779         Test: http/tests/navigation/page-cache-iframe-provisional-load.html
1780
1781         * history/PageCache.cpp:
1782         (WebCore::logCanCacheFrameDecision):
1783         (WebCore::PageCache::canCachePageContainingThisFrame):
1784         * page/DiagnosticLoggingKeys.cpp:
1785         (WebCore::DiagnosticLoggingKeys::provisionalLoadKey):
1786         * page/DiagnosticLoggingKeys.h:
1787
1788 2015-06-28  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1789
1790         [Streams API] Add support for chunks with customized sizes
1791         https://bugs.webkit.org/show_bug.cgi?id=146312
1792
1793         Reviewed by Darin Adler.
1794
1795         Covered by rebased tests.
1796
1797         * bindings/js/ReadableJSStream.cpp:
1798         (WebCore::ReadableJSStream::read): Decrement totalQueueSize with the chunk specific size.
1799         (WebCore::ReadableJSStream::enqueue): Calls retrieveSize, enqueue chunk with its size and increment totalQueueSize.
1800         (WebCore::ReadableJSStream::retrieveChunkSize): Calls size JS callback and convert it to double.
1801         * bindings/js/ReadableJSStream.h:
1802
1803 2015-06-28  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1804
1805         [Streams API]Remove ReadableStreamController.close custom binding
1806         https://bugs.webkit.org/show_bug.cgi?id=146380
1807
1808         Reviewed by Darin Adler.
1809
1810         No change in behavior.
1811
1812         * Modules/streams/ReadableStreamController.h:
1813         (WebCore::ReadableStreamController::close): Calling ReadableJSStream close method.
1814         * Modules/streams/ReadableStreamController.idl: Removed Custom.
1815         * bindings/js/JSReadableStreamControllerCustom.cpp:
1816         (WebCore::JSReadableStreamController::close): Deleted.
1817         * bindings/js/ReadableJSStream.cpp:
1818         (WebCore::ReadableJSStream::close): Moved custom binding code here.
1819         * bindings/js/ReadableJSStream.h:
1820
1821 2015-06-27  Chris Fleizach  <cfleizach@apple.com>
1822
1823         AX: implement @aria-roledescription
1824         https://bugs.webkit.org/show_bug.cgi?id=146274
1825
1826         Reviewed by Darin Adler.
1827
1828         Add support for aria-roledescription.
1829
1830         Test: accessibility/aria-roledescription.html
1831
1832         * accessibility/AccessibilityObject.cpp:
1833         (WebCore::AccessibilityObject::hasHighlighting):
1834         (WebCore::AccessibilityObject::roleDescription):
1835         (WebCore::nodeHasPresentationRole):
1836         * accessibility/AccessibilityObject.h:
1837         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1838         (-[WebAccessibilityObjectWrapper _accessibilityMaxValue]):
1839         (-[WebAccessibilityObjectWrapper accessibilityRoleDescription]):
1840         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
1841         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1842         (-[WebAccessibilityObjectWrapper roleDescription]):
1843
1844 2015-06-27  Darin Adler  <darin@apple.com>
1845
1846         Fix the build.
1847
1848         * platform/network/cf/ResourceErrorCF.cpp:
1849         (WebCore::ResourceError::cfError): Take out log statement. Add FIXME comment
1850         that explains part of the reason we may get null here.
1851         * platform/network/mac/ResourceErrorMac.mm:
1852         (WebCore::createNSErrorFromResourceErrorBase): Ditto.
1853
1854 2015-06-27  David Kilzer  <ddkilzer@apple.com>
1855
1856         Crash in WebCore::ResourceError::cfError() after provisional load failed
1857         <http://webkit.org/b/146384>
1858
1859         Reviewed by Darin Adler.
1860
1861         This is a speculative fix based on the crashing stack.
1862
1863         * platform/network/cf/ResourceErrorCF.cpp:
1864         (WebCore::ResourceError::cfError): Add NULL check.
1865         * platform/network/mac/ResourceErrorMac.mm:
1866         (WebCore::createNSErrorFromResourceErrorBase): Add nil check in
1867         case we ever turn off USE(CFNETWORK) for iOS.
1868
1869 2015-06-27  Eric Carlson  <eric.carlson@apple.com>
1870
1871         [Mac] Only flag a video element as eligible for auto-play to AppleTV one time
1872         https://bugs.webkit.org/show_bug.cgi?id=146386
1873
1874         Reviewed by Brent Fulgham.
1875
1876         * Modules/mediasession/WebMediaSessionManager.cpp:
1877         (WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients): Drive-by fix - early 
1878           return when there are no clients.
1879
1880         * html/HTMLMediaElement.cpp:
1881         (WebCore::HTMLMediaElement::pendingActionTimerFired): Set m_failedToPlayToWirelessTarget if the
1882           media engine is still unable to play to the wireless target.
1883         (WebCore::HTMLMediaElement::prepareForLoad): Clear m_failedToPlayToWirelessTarget.
1884         (WebCore::HTMLMediaElement::mediaState): Don't set the ExternalDeviceAutoPlayCandidate flag
1885           if m_failedToPlayToWirelessTarget is true.
1886         * html/HTMLMediaElement.h:
1887
1888 2015-06-27  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1889
1890         [Streams API] Implement ReadableStreamController.desiredSize property
1891         https://bugs.webkit.org/show_bug.cgi?id=146311
1892
1893         Reviewed by Darin Adler.
1894
1895         Covered by rebased tests.
1896
1897         * Modules/streams/ReadableStreamController.h: Adding desiredSize getter.
1898         (WebCore::ReadableStreamController::desiredSize): Ditto.
1899         * Modules/streams/ReadableStreamController.idl: Added desiredSize attribute.
1900
1901 2015-06-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1902
1903         [GTK][SOUP] Implement WebCore::PublicSuffix for soup and enable PUBLIC_SUFFIX_LIST for GTK+
1904         https://bugs.webkit.org/show_bug.cgi?id=146318
1905
1906         Reviewed by Sergio Villar Senin.
1907
1908         This is covered by unit tests.
1909
1910         * PlatformGTK.cmake:
1911         * platform/soup/PublicSuffixSoup.cpp: Added.
1912         (WebCore::isPublicSuffix):
1913         (WebCore::topPrivatelyControlledDomain):
1914
1915 2015-06-26  Myles C. Maxfield  <mmaxfield@apple.com>
1916
1917         [iOS] AppleGothic has been superseded by Apple SD Gothic Neo
1918         https://bugs.webkit.org/show_bug.cgi?id=146372
1919         <rdar://problem/21574004>
1920
1921         Reviewed by Dean Jackson.
1922
1923         Test: fast/text/hangul-generic-font-families.html
1924
1925         * page/mac/SettingsMac.mm:
1926         (WebCore::Settings::initializeDefaultFontFamilies):
1927
1928 2015-06-26  Matt Daiter  <mdaiter@apple.com>
1929
1930         Supporting getStartDate and added tests
1931         https://bugs.webkit.org/show_bug.cgi?id=145676
1932         <rdar://problem/20876076>
1933
1934         Reviewed by Brent Fulgham.
1935
1936         Test: http/tests/media/hls/video-controller-getStartDate.html
1937
1938         * bindings/js/JSDOMBinding.cpp:
1939         (WebCore::jsDateOrNaN):
1940         * bindings/js/JSDOMBinding.h:
1941         * bindings/scripts/CodeGeneratorJS.pm: Added features to return 
1942         NaN for Date
1943         * bindings/scripts/CodeGeneratorGObject.pm: Needed to add
1944         type checking code for GObject (no date)
1945         (NativeToJSValue):
1946         * bindings/scripts/IDLAttributes.txt: 
1947         * html/HTMLMediaElement.cpp: Added getStartDate function
1948         (WebCore::HTMLMediaElement::getStartDate):
1949         * html/HTMLMediaElement.h: Needed to add declarations
1950         * html/HTMLMediaElement.idl: Needed to modify for returning NaN
1951         * platform/graphics/MediaPlayer.cpp:
1952         (WebCore::MediaPlayer::getStartDate):
1953         * platform/graphics/MediaPlayer.h:
1954         * platform/graphics/MediaPlayerPrivate.h: Added in Mac-specific platform
1955         (WebCore::MediaPlayerPrivateInterface::getStartDate):
1956         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1957         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1958         (WebCore::MediaPlayerPrivateAVFoundationObjC::getStartDate):
1959
1960 2015-06-26  Beth Dakin  <bdakin@apple.com>
1961
1962         WebPage::getPositionInformation() should not copy an image that is larger than the  
1963         screen
1964         https://bugs.webkit.org/show_bug.cgi?id=146367
1965
1966         Reviewed by Tim Horton.
1967
1968         Export the rect version of this function too.
1969         * platform/graphics/GraphicsContext.h:
1970
1971 2015-06-26  Eric Carlson  <eric.carlson@apple.com>
1972
1973         [Mac] Muted videos should not automatically play to AppleTV
1974         https://bugs.webkit.org/show_bug.cgi?id=146366
1975
1976         Reviewed by Dean Jackson.
1977
1978         * html/HTMLMediaElement.cpp:
1979         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_initiallyMuted.
1980         (WebCore::HTMLMediaElement::scheduleDelayedAction): Support CheckMediaState.
1981         (WebCore::HTMLMediaElement::setReadyState): Set m_initiallyMuted to true if the element is
1982           muted or the volume is less than 5%.
1983         (WebCore::HTMLMediaElement::setMuted): Update media state asynchronously so multiple state
1984           changes can be coalesced.
1985         (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): Ditto.
1986         (WebCore::HTMLMediaElement::setPlaying): Ditto.
1987         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Ditto.
1988         (WebCore::HTMLMediaElement::removeEventListener): Ditto.
1989         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Ditto.
1990         (WebCore::HTMLMediaElement::updateMediaState): Update after a timer when passed UpdateMediaState::Asynchronously.
1991         (WebCore::HTMLMediaElement::mediaState): Don't set the ExternalDeviceAutoPlayCandidate flag if
1992           m_initiallyMuted is true.
1993         * html/HTMLMediaElement.h:
1994         * html/HTMLMediaElementEnums.h:
1995
1996 2015-06-26  Daniel Bates  <dabates@apple.com>
1997
1998         Rolling out r184660
1999         https://bugs.webkit.org/show_bug.cgi?id=145200
2000
2001         Reverting r184660 because it caused a regression.
2002
2003         * English.lproj/Localizable.strings:
2004         * html/TextFieldInputType.cpp:
2005         (WebCore::TextFieldInputType::createAutoFillButton): Deleted.
2006         * platform/LocalizedStrings.cpp:
2007         (WebCore::AXAutoFillButtonText): Deleted.
2008         * platform/LocalizedStrings.h:
2009         * platform/efl/LocalizedStringsEfl.cpp:
2010         (WebCore::AXAutoFillButtonText): Deleted.
2011         * platform/gtk/LocalizedStringsGtk.cpp:
2012         (WebCore::AXAutoFillButtonText): Deleted.
2013
2014 2015-06-26  Daniel Bates  <dabates@apple.com>
2015
2016         Rolling out r185881
2017         https://bugs.webkit.org/show_bug.cgi?id=146243
2018         And
2019         r185828
2020         https://bugs.webkit.org/show_bug.cgi?id=145241
2021
2022         Reverting r185881 and r185828 because the latter caused a regression.
2023
2024         * accessibility/AccessibilityRenderObject.cpp:
2025         (WebCore::AccessibilityRenderObject::accessibilityTextFieldDecorationHitTest): Deleted.
2026         (WebCore::AccessibilityRenderObject::accessibilityHitTest): Deleted.
2027         * accessibility/AccessibilityRenderObject.h:
2028
2029 2015-06-26  Dean Jackson  <dino@apple.com>
2030
2031         No audio on animated page with the attached fixed layout epub
2032         https://bugs.webkit.org/show_bug.cgi?id=146365
2033
2034         Reviewed by Eric Carlson.
2035
2036         The new restriction RequireUserGestureForAudioRateChange conflicted
2037         with existing clients who expected RequireUserGestureForRateChange
2038         to allow autoplaying audio. Update the logic to ensure that
2039         RequireUserGestureForRateChange covers all media when set to
2040         false.
2041
2042         This may require a revisit once we're using RequireUserGestureForAudioRateChange
2043         in production, because the global setting will trump that, and
2044         most clients have the global setting to false. We'll need to come
2045         up with a way to allow legacy clients to preserve their behaviour.
2046
2047         * html/HTMLMediaElement.cpp:
2048         (WebCore::HTMLMediaElement::HTMLMediaElement): Only restrict audio
2049         if RequireUserGestureForRateChange is also false.
2050
2051 2015-06-25  Anders Carlsson  <andersca@apple.com>
2052
2053         Get rid of ScrollbarThemeClient now that it's unused
2054         https://bugs.webkit.org/show_bug.cgi?id=146327
2055
2056         Reviewed by Beth Dakin.
2057
2058         * WebCore.vcxproj/WebCore.vcxproj:
2059         * WebCore.vcxproj/WebCore.vcxproj.filters:
2060         * WebCore.xcodeproj/project.pbxproj:
2061         * platform/Scrollbar.cpp:
2062         (WebCore::Scrollbar::scrollbarOverlayStyle): Deleted.
2063         (WebCore::Scrollbar::isScrollableAreaActive): Deleted.
2064         (WebCore::Scrollbar::isScrollViewScrollbar): Deleted.
2065         (WebCore::Scrollbar::root): Deleted.
2066         * platform/Scrollbar.h:
2067         (WebCore::Scrollbar::isCustomScrollbar):
2068         (WebCore::Scrollbar::orientation):
2069         (WebCore::Scrollbar::value):
2070         (WebCore::Scrollbar::currentPos):
2071         (WebCore::Scrollbar::visibleSize):
2072         (WebCore::Scrollbar::totalSize):
2073         (WebCore::Scrollbar::maximum):
2074         (WebCore::Scrollbar::controlSize):
2075         (WebCore::Scrollbar::lineStep):
2076         (WebCore::Scrollbar::pageStep):
2077         (WebCore::Scrollbar::pressedPart):
2078         (WebCore::Scrollbar::hoveredPart):
2079         (WebCore::Scrollbar::enabled):
2080         (WebCore::Scrollbar::styleChanged):
2081         (WebCore::Scrollbar::isAlphaLocked):
2082         (WebCore::Scrollbar::setIsAlphaLocked):
2083         * platform/ScrollbarTheme.h:
2084         * platform/ScrollbarThemeClient.h: Removed.
2085         (WebCore::ScrollbarThemeClient::~ScrollbarThemeClient): Deleted.
2086         * platform/mac/ScrollbarThemeMac.mm:
2087         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
2088         * rendering/RenderScrollbarTheme.cpp:
2089
2090 2015-06-26  Chris Dumez  <cdumez@apple.com>
2091
2092         Prevent new loads while in PageCache (or being added to PageCache)
2093         https://bugs.webkit.org/show_bug.cgi?id=146299
2094         <rdar://problem/21523788>
2095
2096         Reviewed by Darin Adler.
2097
2098         Generalize the change in r185337 to prevent new loads while in the
2099         PageCache (or being added to the PageCache), instead of merely
2100         preventing new loads in pagehide event handlers. We should never
2101         have any pages that are still loading inside the PageCache.
2102
2103         The fix in r185337 was apparently insufficient to address the
2104         problem so generalizing the check / policy will hopefully catch
2105         more cases where content is able to start loads while being added
2106         to the PageCache. This patch also removes some of the complexity
2107         added in r185337 as it is no longer needed.
2108
2109         No new tests, already covered by:
2110         http/tests/navigation/image-load-in-pagehide-handler.html
2111         http/tests/navigation/subframe-pagehide-handler-starts-load.html
2112         http/tests/navigation/subframe-pagehide-handler-starts-load2.html
2113
2114         * loader/FrameLoader.cpp:
2115         (WebCore::FrameLoader::stopLoading):
2116         (WebCore::FrameLoader::loadURL):
2117         (WebCore::FrameLoader::loadWithDocumentLoader):
2118         (WebCore::FrameLoader::stopAllLoaders):
2119         (WebCore::FrameLoader::handleBeforeUnloadEvent):
2120         (WebCore::FrameLoader::FrameLoader): Deleted.
2121         * loader/FrameLoader.h:
2122         (WebCore::FrameLoader::pageDismissalEventBeingDispatched):
2123         * loader/ImageLoader.cpp:
2124         (WebCore::pageIsBeingDismissed):
2125         * loader/cache/CachedResource.cpp:
2126         (WebCore::CachedResource::load):
2127         * loader/cache/CachedResourceLoader.cpp:
2128         (WebCore::CachedResourceLoader::requestImage):
2129         * page/Page.cpp:
2130         (WebCore::Page::inPageCache):
2131         * page/Page.h:
2132         (WebCore::Page::group): Deleted.
2133
2134 2015-06-26  Simon Fraser  <simon.fraser@apple.com>
2135
2136         [OS X] Change the layer tiling threshold from 2000 to 2048 pixels
2137         https://bugs.webkit.org/show_bug.cgi?id=146353
2138
2139         Reviewed by Tim Horton.
2140
2141         Programmers love powers of two.
2142
2143         * platform/graphics/ca/GraphicsLayerCA.cpp:
2144
2145 2015-06-26  Myles C. Maxfield  <mmaxfield@apple.com>
2146
2147         [Cocoa] Sans-serif generic font family should map to PingFang
2148         https://bugs.webkit.org/show_bug.cgi?id=146333
2149         <rdar://problem/21521217>
2150
2151         Reviewed by Alexey Proskuryakov.
2152
2153         Also performs a little bit of cleanup.
2154
2155         Test: fast/text/han-generic-font-families.html
2156
2157         * page/mac/SettingsMac.mm:
2158         (WebCore::sansSerifTraditionalHanFontFamily):
2159         (WebCore::sansSerifSimplifiedHanFontFamily):
2160         (WebCore::Settings::initializeDefaultFontFamilies):
2161
2162 2015-06-26  Per Arne Vollan  <peavo@outlook.com>
2163
2164         [Curl] Compile errors; ResourceResponseBase::resourceLoadTiming() has changed return type.
2165         https://bugs.webkit.org/show_bug.cgi?id=146343
2166
2167         Reviewed by Brent Fulgham.
2168
2169         * platform/network/curl/ResourceHandleManager.cpp:
2170         (WebCore::calculateWebTimingInformations):
2171         (WebCore::headerCallback):
2172         (WebCore::ResourceHandleManager::initializeHandle):
2173         (WebCore::ResourceHandleManager::initCookieSession):
2174         (WebCore::sockoptfunction): Deleted.
2175
2176 2015-06-26  Chris Fleizach  <cfleizach@apple.com>
2177
2178         iOS speech synthesizer should expose names
2179         https://bugs.webkit.org/show_bug.cgi?id=146319
2180
2181         Reviewed by Mario Sanchez Prada.
2182
2183         Use newer API to get the name and identifier of each voice asset.
2184
2185         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
2186         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
2187
2188 2015-06-26  Csaba Osztrogonác  <ossy@webkit.org>
2189
2190         [EFL] Remove unnecessary overriden methods from ScrollBarEfl
2191         https://bugs.webkit.org/show_bug.cgi?id=146342
2192
2193         Reviewed by Gyuyoung Kim.
2194
2195         * platform/efl/ScrollbarEfl.cpp:
2196         (WebCore::ScrollbarEfl::setParent): Deleted.
2197         (WebCore::ScrollbarEfl::setFrameRect): Deleted.
2198         (WebCore::ScrollbarEfl::frameRectsChanged): Deleted.
2199         (WebCore::ScrollbarEfl::invalidate): Deleted.
2200         * platform/efl/ScrollbarEfl.h:
2201
2202 2015-06-26  Csaba Osztrogonác  <ossy@webkit.org>
2203
2204         Convert some of WebCore/dom over to range-for loops
2205         https://bugs.webkit.org/show_bug.cgi?id=126250
2206
2207         Reviewed by Darin Adler.
2208
2209         Based on the original patch of Sam Weinig <sam@webkit.org>.
2210
2211         * dom/ContainerNode.cpp:
2212         (WebCore::ContainerNode::replaceChild):
2213         (WebCore::willRemoveChildren):
2214         (WebCore::ContainerNode::appendChild):
2215         * dom/MutationObserver.cpp:
2216         (WebCore::MutationObserver::disconnect):
2217         (WebCore::MutationObserver::getObservedNodes):
2218         (WebCore::MutationObserver::deliver):
2219         * dom/MutationObserverInterestGroup.cpp:
2220         (WebCore::MutationObserverInterestGroup::isOldValueRequested):
2221         (WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
2222         * dom/MutationObserverRegistration.cpp:
2223         (WebCore::MutationObserverRegistration::clearTransientRegistrations):
2224         (WebCore::MutationObserverRegistration::addRegistrationNodesToSet):
2225         * dom/Node.cpp:
2226         (WebCore::Node::dumpStatistics):
2227         (WebCore::collectMatchingObserversForMutation):
2228         (WebCore::Node::notifyMutationObserversNodeWillDetach):
2229
2230 2015-06-25  Lucas Forschler  <lforschler@apple.com>
2231
2232         Unreviewed build fix.
2233         
2234         * platform/audio/VectorMath.cpp:
2235         (WebCore::VectorMath::vsmul):
2236         (WebCore::VectorMath::vadd):
2237         (WebCore::VectorMath::vmul):
2238         (WebCore::VectorMath::zvmul):
2239
2240 2015-06-25  Stephanie Lewis  <slewis@apple.com>
2241
2242         Build fix.
2243
2244         Unreviewed.
2245
2246         * platform/audio/DirectConvolver.cpp:
2247         (WebCore::DirectConvolver::process):
2248
2249 2015-06-25  Chris Fleizach  <cfleizach@apple.com>
2250
2251         AX: improve list heuristics (presentational use versus actual lists)
2252         https://bugs.webkit.org/show_bug.cgi?id=134187
2253
2254         Rolling this change back in. 
2255         It was taken out to allow clients to have time to update their expectations of what is a list vs. a group
2256
2257         Test: accessibility/list-detection2.html
2258
2259         * accessibility/AccessibilityList.cpp:
2260         (WebCore::AccessibilityList::isDescriptionList):
2261         (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):
2262         (WebCore::AccessibilityList::determineAccessibilityRole):
2263         * accessibility/AccessibilityList.h:
2264
2265 2015-06-25  Brent Fulgham  <bfulgham@apple.com>
2266
2267         Unreviewed build fix after r185964.
2268
2269         Correct a few pointers-that-should-be-references-now errors.
2270
2271         * platform/win/PopupMenuWin.cpp:
2272         (WebCore::AccessiblePopupMenu::accLocation):
2273         (WebCore::AccessiblePopupMenu::accHitTest):
2274
2275 2015-06-25  Doug Russell  <d_russell@apple.com>
2276
2277         Bug 146300 AX: AccessibilityObject focus events that don't cause a selection 
2278         change can leave m_isSynchronizingSelection set to true
2279         https://bugs.webkit.org/show_bug.cgi?id=146300
2280
2281         Reviewed by Chris Fleizach.
2282
2283         Added a clearTextSelectionIntent() convenience function to be used after any
2284         event that can, but isn't guaranteed to result in a selection change. Matches
2285         calls to setTextSelectionIntent() convenience function.
2286         Added support for tests listening for focus change notifications.
2287
2288         Test: platform/mac/accessibility/focus-setting-selection-syncronizing-not-clearing.html
2289
2290         * accessibility/AccessibilityRenderObject.cpp:
2291         (WebCore::clearTextSelectionIntent):
2292         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2293         (WebCore::AccessibilityRenderObject::setFocused):
2294         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
2295         * accessibility/mac/AXObjectCacheMac.mm:
2296         (WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
2297
2298 2015-06-25  Alex Christensen  <achristensen@webkit.org>
2299
2300         [Content Extensions] Add a way to match a domain but not subdomains
2301         https://bugs.webkit.org/show_bug.cgi?id=146241
2302         rdar://problem/21557754
2303
2304         Reviewed by Darin Adler.
2305
2306         This patch makes it possible to have a trigger with an if-domain apply to sub2.sub1.webkit.org
2307         but not sub1.webkit.org by making the domains default to only applying to the domain and not subdomains.
2308         To make a domain apply to a domain and any subdomains, the domain must begin with a '*'.
2309
2310         * contentextensions/CombinedURLFilters.cpp:
2311         (WebCore::ContentExtensions::CombinedURLFilters::addDomain):
2312         (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
2313         Make domains apply only to the exact domain unless there is a * at the beginning,
2314         in which case they apply to the domain and any subdomains.
2315
2316 2015-06-25  Simon Fraser  <simon.fraser@apple.com>
2317
2318         [iOS WK2] Swiping back just after scrolling can cause some tiles to disappear
2319         https://bugs.webkit.org/show_bug.cgi?id=146329
2320         rdar://problem/21233010
2321
2322         Reviewed by Tim Horton.
2323
2324         Have the Compositing log channel dump the visible rect used for layer flushing.
2325
2326         * rendering/RenderLayerCompositor.cpp:
2327         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2328
2329 2015-06-25  Brent Fulgham  <bfulgham@apple.com>
2330
2331         [WIN] Enable WEB_TIMING API
2332         https://bugs.webkit.org/show_bug.cgi?id=146330
2333         <rdar://problem/21530765>
2334
2335         Reviewed by Dean Jackson.
2336
2337         Tested by internal HLS tests.
2338
2339         Enable WEB_TIMING features on Windows by activating the feature flag,
2340         and correcting some build errors.
2341
2342         * platform/network/cf/ResourceHandleCFNet.cpp:
2343         (WebCore::ResourceHandle::start): "setCollectionTimingData" is only
2344         defined for PLATFORM(COCOA).
2345         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
2346         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
2347         The 'ResourceHandle::getConnectionTimingData' method is only defined
2348         for PLATFORM(COCOA).
2349
2350 2015-06-25  Dean Jackson  <dino@apple.com>
2351
2352         Inline media controls disappear when returning a video to inline
2353         https://bugs.webkit.org/show_bug.cgi?id=146328
2354         <rdar://problem/21142862>
2355
2356         Reviewed by Tim Horton.
2357
2358         We were getting into a state where the controls were being
2359         hidden via a timer while we were in fullscreen or on
2360         another tab. Meanwhile, we could exit from such
2361         a condition to a point where the controls were
2362         not visible, but not completely removed from the DOM, confusing
2363         the logic that decided whether to show them on tap.
2364
2365         * Modules/mediacontrols/mediaControlsApple.js:
2366         (Controller.prototype.hideControls): If we are in the act of hiding
2367         controls, we can clear any existing timers that are going to try
2368         to hide them again.
2369         (Controller.prototype.resetHideControlsTimer): Make sure we null
2370         out the hideTimer object, since we look at its value often to
2371         decide whether or not a timer exists.
2372         * Modules/mediacontrols/mediaControlsiOS.js:
2373         (ControllerIOS.prototype.handlePlayButtonTouchEnd): If the user
2374         taps play, then we should call showControls, which resets the hide
2375         timers amongst other things. We need to do this due to the next change,
2376         so that a timer started before we pressed play doesn't cause the
2377         controls to instantly disappear as soon as we start playing.
2378         (ControllerIOS.prototype.handleWrapperTouchStart): We can get into
2379         the state where controls are invisible but still in the tree. Since the
2380         controlsAreHidden() logic only looks for the latter, we need to also
2381         look for invisible when the user taps for the controls. Yes, this
2382         naming doesn't make much sense :(
2383
2384 2015-06-25  Joseph Pecoraro  <pecoraro@apple.com>
2385
2386         [Mac] Web Inspector: Window dragging on toolbar should behave more like native window dragging
2387         https://bugs.webkit.org/show_bug.cgi?id=146324
2388
2389         Reviewed by Timothy Hatcher.
2390
2391         * inspector/InspectorFrontendClient.h:
2392         * inspector/InspectorFrontendClientLocal.h:
2393         Do nothing or pass it up to the the frontend client.
2394
2395         * inspector/InspectorFrontendHost.h:
2396         * inspector/InspectorFrontendHost.idl:
2397         * inspector/InspectorFrontendHost.cpp:
2398         (WebCore::InspectorFrontendHost::startWindowDrag):
2399         Add a new host function to get native window dragging behavior.
2400
2401 2015-06-25  Tim Horton  <timothy_horton@apple.com>
2402
2403         Viewport units are wrong when scaled in 2-up mode, cause content to hop around on apple.com/music
2404         https://bugs.webkit.org/show_bug.cgi?id=146322
2405         <rdar://problem/21413884>
2406
2407         Reviewed by Simon Fraser.
2408
2409         * page/FrameView.cpp:
2410         (WebCore::FrameView::viewportSizeForCSSViewportUnits):
2411         Use the fixed layout size, if enabled, instead of the visibleContentRect,
2412         for the viewport unit size. This ensures that viewport units take up the whole
2413         fixed-layout viewport, not just the size of the view scaled by the page scale
2414         (which visibleContentRect provides).
2415
2416 2015-06-25  Eric Carlson  <eric.carlson@apple.com>
2417
2418         [Mac] AirPlay menu button still doesn't always show on page load
2419         https://bugs.webkit.org/show_bug.cgi?id=146325
2420
2421         Reviewed by Dean Jackson.
2422
2423         * html/HTMLMediaElement.cpp:
2424         (WebCore::HTMLMediaElement::mediaState): A player that can't currently play to a wireless 
2425           target does require target monitoring if an availability event listner has been registered,
2426           otherwise we may not register for availability change notifications.
2427
2428 2015-06-25  Anders Carlsson  <andersca@apple.com>
2429
2430         Stop using ScrollbarThemeClient and just use Scrollbar directly
2431         https://bugs.webkit.org/show_bug.cgi?id=146320
2432
2433         Reviewed by Tim Horton.
2434
2435         * page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm:
2436         (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars):
2437         * platform/ScrollableArea.cpp:
2438         (WebCore::ScrollableArea::setScrollbarOverlayStyle):
2439         * platform/Scrollbar.cpp:
2440         (WebCore::Scrollbar::Scrollbar):
2441         (WebCore::Scrollbar::~Scrollbar):
2442         (WebCore::Scrollbar::offsetDidChange):
2443         (WebCore::Scrollbar::updateThumb):
2444         (WebCore::Scrollbar::paint):
2445         (WebCore::thumbUnderMouse):
2446         (WebCore::Scrollbar::autoscrollPressedPart):
2447         (WebCore::Scrollbar::startTimerIfNeeded):
2448         (WebCore::Scrollbar::moveThumb):
2449         (WebCore::Scrollbar::setHoveredPart):
2450         (WebCore::Scrollbar::setPressedPart):
2451         (WebCore::Scrollbar::mouseMoved):
2452         (WebCore::Scrollbar::mouseUp):
2453         (WebCore::Scrollbar::mouseDown):
2454         (WebCore::Scrollbar::setEnabled):
2455         * platform/ScrollbarTheme.h:
2456         (WebCore::ScrollbarTheme::updateEnabledState):
2457         (WebCore::ScrollbarTheme::paint):
2458         (WebCore::ScrollbarTheme::hitTest):
2459         (WebCore::ScrollbarTheme::updateScrollbarOverlayStyle):
2460         (WebCore::ScrollbarTheme::invalidateParts):
2461         (WebCore::ScrollbarTheme::invalidatePart):
2462         (WebCore::ScrollbarTheme::paintTickmarks):
2463         (WebCore::ScrollbarTheme::shouldCenterOnThumb):
2464         (WebCore::ScrollbarTheme::shouldSnapBackToDragOrigin):
2465         (WebCore::ScrollbarTheme::shouldDragDocumentInsteadOfThumb):
2466         (WebCore::ScrollbarTheme::thumbPosition):
2467         (WebCore::ScrollbarTheme::thumbLength):
2468         (WebCore::ScrollbarTheme::trackPosition):
2469         (WebCore::ScrollbarTheme::trackLength):
2470         (WebCore::ScrollbarTheme::registerScrollbar):
2471         (WebCore::ScrollbarTheme::unregisterScrollbar):
2472         * platform/ScrollbarThemeComposite.cpp:
2473         (WebCore::ScrollbarThemeComposite::paint):
2474         (WebCore::ScrollbarThemeComposite::hitTest):
2475         (WebCore::ScrollbarThemeComposite::invalidatePart):
2476         (WebCore::ScrollbarThemeComposite::splitTrack):
2477         (WebCore::usedTotalSize):
2478         (WebCore::ScrollbarThemeComposite::thumbPosition):
2479         (WebCore::ScrollbarThemeComposite::thumbLength):
2480         (WebCore::ScrollbarThemeComposite::minimumThumbLength):
2481         (WebCore::ScrollbarThemeComposite::trackPosition):
2482         (WebCore::ScrollbarThemeComposite::trackLength):
2483         (WebCore::ScrollbarThemeComposite::thumbRect):
2484         * platform/ScrollbarThemeComposite.h:
2485         (WebCore::ScrollbarThemeComposite::willPaintScrollbar):
2486         (WebCore::ScrollbarThemeComposite::didPaintScrollbar):
2487         (WebCore::ScrollbarThemeComposite::paintScrollbarBackground):
2488         (WebCore::ScrollbarThemeComposite::paintTrackBackground):
2489         (WebCore::ScrollbarThemeComposite::paintTrackPiece):
2490         (WebCore::ScrollbarThemeComposite::paintButton):
2491         (WebCore::ScrollbarThemeComposite::paintThumb):
2492         (WebCore::ScrollbarThemeComposite::constrainTrackRectToTrackPieces):
2493         * platform/efl/ScrollbarThemeEfl.h:
2494         * platform/gtk/ScrollbarThemeGtk.cpp:
2495         (WebCore::ScrollbarThemeGtk::hasThumb):
2496         (WebCore::ScrollbarThemeGtk::backButtonRect):
2497         (WebCore::ScrollbarThemeGtk::forwardButtonRect):
2498         (WebCore::ScrollbarThemeGtk::trackRect):
2499         (WebCore::ScrollbarThemeGtk::registerScrollbar):
2500         (WebCore::ScrollbarThemeGtk::unregisterScrollbar):
2501         (WebCore::ScrollbarThemeGtk::updateScrollbarsFrameThickness):
2502         (WebCore::ScrollbarThemeGtk::thumbRect):
2503         (WebCore::ScrollbarThemeGtk::paintTrackBackground):
2504         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
2505         (WebCore::ScrollbarThemeGtk::paintThumb):
2506         (WebCore::ScrollbarThemeGtk::paintButton):
2507         (WebCore::ScrollbarThemeGtk::paint):
2508         (WebCore::ScrollbarThemeGtk::shouldCenterOnThumb):
2509         (WebCore::ScrollbarThemeGtk::buttonSize):
2510         (WebCore::ScrollbarThemeGtk::minimumThumbLength):
2511         * platform/gtk/ScrollbarThemeGtk.h:
2512         (WebCore::ScrollbarThemeGtk::hasButtons):
2513         * platform/ios/ScrollbarThemeIOS.h:
2514         * platform/ios/ScrollbarThemeIOS.mm:
2515         (WebCore::ScrollbarThemeIOS::registerScrollbar):
2516         (WebCore::ScrollbarThemeIOS::unregisterScrollbar):
2517         (WebCore::ScrollbarThemeIOS::hasButtons):
2518         (WebCore::ScrollbarThemeIOS::hasThumb):
2519         (WebCore::ScrollbarThemeIOS::backButtonRect):
2520         (WebCore::ScrollbarThemeIOS::forwardButtonRect):
2521         (WebCore::ScrollbarThemeIOS::trackRect):
2522         (WebCore::ScrollbarThemeIOS::minimumThumbLength):
2523         (WebCore::ScrollbarThemeIOS::shouldCenterOnThumb):
2524         (WebCore::ScrollbarThemeIOS::paint):
2525         * platform/mac/ScrollAnimatorMac.mm:
2526         (scrollbarPainterForScrollbar):
2527         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
2528         (-[WebScrollbarPartAnimation startAnimation]):
2529         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
2530         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
2531         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
2532         (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
2533         (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
2534         (-[WebScrollbarPainterDelegate scrollerImp:animateExpansionTransitionWithDuration:]):
2535         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
2536         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
2537         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
2538         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
2539         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
2540         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
2541         (WebCore::ScrollAnimatorMac::invalidateScrollbarPartLayers):
2542         (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
2543         (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
2544         (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
2545         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
2546         * platform/mac/ScrollbarThemeMac.h:
2547         * platform/mac/ScrollbarThemeMac.mm:
2548         (WebCore::ScrollbarThemeMac::registerScrollbar):
2549         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
2550         (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar):
2551         (WebCore::ScrollbarThemeMac::painterForScrollbar):
2552         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
2553         (WebCore::ScrollbarThemeMac::hasButtons):
2554         (WebCore::ScrollbarThemeMac::hasThumb):
2555         (WebCore::ScrollbarThemeMac::backButtonRect):
2556         (WebCore::ScrollbarThemeMac::forwardButtonRect):
2557         (WebCore::ScrollbarThemeMac::trackRect):
2558         (WebCore::ScrollbarThemeMac::minimumThumbLength):
2559         (WebCore::ScrollbarThemeMac::shouldCenterOnThumb):
2560         (WebCore::ScrollbarThemeMac::shouldDragDocumentInsteadOfThumb):
2561         (WebCore::ScrollbarThemeMac::updateEnabledState):
2562         (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
2563         (WebCore::ScrollbarThemeMac::paint):
2564         * platform/mock/ScrollbarThemeMock.cpp:
2565         (WebCore::ScrollbarThemeMock::trackRect):
2566         (WebCore::ScrollbarThemeMock::paintTrackBackground):
2567         (WebCore::ScrollbarThemeMock::paintThumb):
2568         * platform/mock/ScrollbarThemeMock.h:
2569         (WebCore::ScrollbarThemeMock::hasButtons): Deleted.
2570         (WebCore::ScrollbarThemeMock::hasThumb): Deleted.
2571         (WebCore::ScrollbarThemeMock::backButtonRect): Deleted.
2572         (WebCore::ScrollbarThemeMock::forwardButtonRect): Deleted.
2573         (WebCore::ScrollbarThemeMock::maxOverlapBetweenPages): Deleted.
2574         (WebCore::ScrollbarThemeMock::isMockTheme): Deleted.
2575         * platform/win/ScrollbarThemeSafari.cpp:
2576         (WebCore::ScrollbarThemeSafari::hasButtons):
2577         (WebCore::ScrollbarThemeSafari::hasThumb):
2578         (WebCore::ScrollbarThemeSafari::backButtonRect):
2579         (WebCore::ScrollbarThemeSafari::forwardButtonRect):
2580         (WebCore::ScrollbarThemeSafari::trackRect):
2581         (WebCore::ScrollbarThemeSafari::minimumThumbLength):
2582         (WebCore::ScrollbarThemeSafari::shouldCenterOnThumb):
2583         (WebCore::ScrollbarThemeSafari::paintTrackBackground):
2584         (WebCore::ScrollbarThemeSafari::paintButton):
2585         (WebCore::ScrollbarThemeSafari::paintThumb):
2586         * platform/win/ScrollbarThemeSafari.h:
2587         * platform/win/ScrollbarThemeWin.cpp:
2588         (WebCore::ScrollbarThemeWin::hasThumb):
2589         (WebCore::ScrollbarThemeWin::backButtonRect):
2590         (WebCore::ScrollbarThemeWin::forwardButtonRect):
2591         (WebCore::ScrollbarThemeWin::trackRect):
2592         (WebCore::ScrollbarThemeWin::shouldCenterOnThumb):
2593         (WebCore::ScrollbarThemeWin::shouldSnapBackToDragOrigin):
2594         (WebCore::ScrollbarThemeWin::paintTrackBackground):
2595         (WebCore::ScrollbarThemeWin::paintTrackPiece):
2596         (WebCore::ScrollbarThemeWin::paintButton):
2597         (WebCore::paintGripper):
2598         (WebCore::ScrollbarThemeWin::paintThumb):
2599         * platform/win/ScrollbarThemeWin.h:
2600         * rendering/RenderScrollbar.h:
2601         (isType):
2602         * rendering/RenderScrollbarPart.cpp:
2603         (WebCore::RenderScrollbarPart::styleDidChange):
2604         (WebCore::RenderScrollbarPart::imageChanged):
2605         * rendering/RenderScrollbarTheme.cpp:
2606         (WebCore::RenderScrollbarTheme::buttonSizesAlongTrackAxis):
2607         (WebCore::RenderScrollbarTheme::hasButtons):
2608         (WebCore::RenderScrollbarTheme::hasThumb):
2609         (WebCore::RenderScrollbarTheme::minimumThumbLength):
2610         (WebCore::RenderScrollbarTheme::backButtonRect):
2611         (WebCore::RenderScrollbarTheme::forwardButtonRect):
2612         (WebCore::RenderScrollbarTheme::trackRect):
2613         (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
2614         (WebCore::RenderScrollbarTheme::willPaintScrollbar):
2615         (WebCore::RenderScrollbarTheme::didPaintScrollbar):
2616         (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
2617         (WebCore::RenderScrollbarTheme::paintTrackBackground):
2618         (WebCore::RenderScrollbarTheme::paintTrackPiece):
2619         (WebCore::RenderScrollbarTheme::paintButton):
2620         (WebCore::RenderScrollbarTheme::paintThumb):
2621         (WebCore::RenderScrollbarTheme::paintTickmarks):
2622         * rendering/RenderScrollbarTheme.h:
2623
2624 2015-06-24  Matt Rajca  <mrajca@apple.com>
2625
2626         MediaSession: fall back to "content" kind when an unsupported media session kind is passed in
2627         https://bugs.webkit.org/show_bug.cgi?id=146293
2628
2629         Reviewed by Eric Carlson.
2630
2631         * Modules/mediasession/MediaSession.cpp:
2632         (WebCore::MediaSession::parseKind): Parse the media session kind to one of the four supported types.
2633         (WebCore::MediaSession::MediaSession):
2634         (WebCore::MediaSession::kind): Format the value as a string (which the JS bindings expect).
2635         * Modules/mediasession/MediaSession.h: The media session kind is now stored as an enum rather than a string
2636           since we only support a small, fixed number of values.
2637
2638 2015-06-25  Eric Carlson  <eric.carlson@apple.com>
2639
2640         [Mac] Crash in WebCore::MediaPlayer::canPlayToWirelessPlaybackTarget
2641         https://bugs.webkit.org/show_bug.cgi?id=146317
2642
2643         Reviewed by Brent Fulgham.
2644
2645         * html/HTMLMediaElement.cpp:
2646         (WebCore::HTMLMediaElement::mediaState): NULL-check m_player before using it.
2647
2648 2015-06-25  Commit Queue  <commit-queue@webkit.org>
2649
2650         Unreviewed, rolling out r185956.
2651         https://bugs.webkit.org/show_bug.cgi?id=146321
2652
2653         Causes massive crashes on test bots (Requested by bfulgham on
2654         #webkit).
2655
2656         Reverted changeset:
2657
2658         "Enabling MEDIA_STREAM"
2659         https://bugs.webkit.org/show_bug.cgi?id=145947
2660         http://trac.webkit.org/changeset/185956
2661
2662 2015-06-25  Brent Fulgham  <bfulgham@apple.com>
2663
2664         [Win] Update MediaPlayerPrivateAVFoundationCF::supportsType
2665         https://bugs.webkit.org/show_bug.cgi?id=146302
2666         <rdar://problem/19726553>
2667
2668         Reviewed by Eric Carlson.
2669
2670         Tested by existing media tests.
2671
2672         Update the AVFoundationCF version of 'supportsType' to more closely match the AVFoundation
2673         version. Use this new code when the necessary AVFoundationCF functions are present.
2674
2675         * AVFoundationSupport.py: Check for presence of AVCFURLAssetIsPlayableExtendedMIMEType.
2676         (fileContains): Added helper function.
2677         * WebCore.vcxproj/WebCoreGenerated.vcxproj: Add AVFoundationSupport.py to project file to make
2678         maintenance easier.
2679         * WebCore.vcxproj/WebCoreGenerated.vcxproj.filters: Ditto.
2680         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2681         (WebCore::MediaPlayerPrivateAVFoundation::isUnsupportedMIMEType): Moved from ObjC version.
2682         (WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList): Ditto.
2683         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2684         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add missing declaration.
2685         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2686         (WebCore::avfMIMETypes): Added CF version of AVFoundation code.
2687         (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): Update to use new AVCF
2688         method if it is available.
2689         (WebCore::MediaPlayerPrivateAVFoundationCF::languageOfPrimaryAudioTrack): Handle case of a
2690         null language locale. This is a drive-by fix of a bug found during testing.
2691         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2692         (WebCore::isUnsupportedMIMEType): Deleted.
2693         (WebCore::staticMIMETypeList): Deleted.
2694
2695 2015-06-25  Matthew Daiter  <mdaiter@apple.com>
2696
2697         Enabling MEDIA_STREAM
2698         https://bugs.webkit.org/show_bug.cgi?id=145947
2699         <rdar://problem/21365829>
2700
2701         Reviewed by Brent Fulgham.
2702
2703         * Configurations/FeatureDefines.xcconfig:
2704         * Modules/mediastream/UserMediaClient.h:
2705         * WebCore.xcodeproj/project.pbxproj:
2706         * platform/mediastream/mac/AVAudioCaptureSource.mm:
2707         * platform/mock/UserMediaClientMock.h:
2708
2709 2015-06-25  Zalan Bujtas  <zalan@apple.com>
2710
2711         Do not send touch events to the slider's thumb when it does not have a renderer.
2712         https://bugs.webkit.org/show_bug.cgi?id=146307
2713         rdar://problem/21539399
2714
2715         Reviewed by Simon Fraser.
2716
2717         Bail out early if either the touch target or the renderer() is null.
2718
2719         Test: fast/events/touch/input-range-with-thumb-display-none-crash.html
2720
2721         * html/shadow/SliderThumbElement.cpp:
2722         (WebCore::findTouchWithIdentifier):
2723         (WebCore::SliderThumbElement::handleTouchStart):
2724         (WebCore::SliderThumbElement::handleTouchMove):
2725         (WebCore::SliderThumbElement::handleTouchEndAndCancel):
2726
2727 2015-06-25  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2728
2729         [Streams API] Implement HighWaterMark
2730         https://bugs.webkit.org/show_bug.cgi?id=146235
2731
2732         Reviewed by Darin Adler.
2733
2734         Retrieval of HighWaterMark parameter from arguments passed to the ReadableStream JS constructor.
2735         Retrieval of size function callback from arguments passed to the ReadableStream JS constructor.
2736         Calling doPull() if buffer size is below HighWaterMark.
2737
2738         Covered by rebased tests.
2739
2740         * Modules/streams/ReadableStream.cpp:
2741         (WebCore::ReadableStream::pull): Adding precise check for HWM.
2742         * Modules/streams/ReadableStream.h: Introducing hasEnoughValues.
2743         * bindings/js/ReadableJSStream.cpp:
2744         (WebCore::getHighWaterMark): Utility routine to get properly HWM value.
2745         (WebCore::ReadableJSStream::create): Retrieval of HWM and size function.
2746         (WebCore::ReadableJSStream::ReadableJSStream):
2747         * bindings/js/ReadableJSStream.h: Adding hasEnoughValues and desiredSize prototypes.
2748
2749 2015-06-25  Tim Horton  <timothy_horton@apple.com>
2750
2751         Try to fix the iOS EWS build.
2752
2753         * platform/spi/cocoa/SecuritySPI.h:
2754
2755 2015-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2756
2757         [GTK] Empty gtk-font-name setting causes WebProcess crash rendering pages
2758         https://bugs.webkit.org/show_bug.cgi?id=146246
2759
2760         Reviewed by Sergio Villar Senin.
2761
2762         Return early if system font is empty.
2763
2764         * rendering/RenderThemeGtk.cpp:
2765         (WebCore::RenderThemeGtk::updateCachedSystemFontDescription):
2766
2767 2015-06-24  Chris Dumez  <cdumez@apple.com>
2768
2769         Unreviewed, EFL build fix after r185940.
2770
2771         Members were initialized in wrong order.
2772
2773         * Modules/mediastream/MediaDeviceInfo.cpp:
2774         (WebCore::MediaDeviceInfo::MediaDeviceInfo):
2775
2776 2015-06-24  Chris Dumez  <cdumez@apple.com>
2777
2778         Unreviewed, Build fix after r185940.
2779
2780         Move implementation inside WebCore namespace.
2781
2782         * Modules/mediastream/MediaDeviceInfo.cpp:
2783
2784 2015-06-24  Chris Dumez  <cdumez@apple.com>
2785
2786         Unreviewed, speculative GTK build fix after 185940.
2787
2788         Add new cpp file to CMakeLists.txt.
2789
2790         * CMakeLists.txt:
2791
2792 2015-06-24  Matt Daiter  <mdaiter@apple.com>
2793
2794         Building MediaDeviceInfo for enumerateDevices
2795         https://bugs.webkit.org/show_bug.cgi?id=146257
2796         <rdar://problem/21513462>
2797
2798         Reviewed by Eric Carlson.
2799
2800         MediaDeviceInfo necessary for enumerateDevices
2801
2802         * CMakeLists.txt: Added MediaDevicesInfo.idl
2803         * DerivedSources.make: Added MediaDevicesInfo.idl
2804         * Modules/mediastream/MediaDeviceInfo.h: Created class for MediaDevicesInfo
2805         (WebCore::MediaDeviceInfo::create): Allocates class
2806         (WebCore::MediaDeviceInfo::MediaDeviceInfo): Creates class for public
2807         (WebCore::MediaDeviceInfo::~MediaDeviceInfo): 
2808         (WebCore::MediaDeviceInfo::label):
2809         (WebCore::MediaDeviceInfo::deviceId):
2810         (WebCore::MediaDeviceInfo::groupId):
2811         (WebCore::MediaDeviceInfo::kind):
2812         * Modules/mediastream/MediaDeviceInfo.idl:
2813         * WebCore.xcodeproj/project.pbxproj:
2814
2815 2015-06-24  Anders Carlsson  <andersca@apple.com>
2816
2817         Detect view services by using the "com.apple.UIKit.vends-view-services" entitlement
2818         https://bugs.webkit.org/show_bug.cgi?id=146301
2819
2820         Reviewed by Tim Horton.
2821
2822         * WebCore.xcodeproj/project.pbxproj:
2823         * platform/spi/cocoa/SecuritySPI.h:
2824
2825 2015-06-24  Said Abou-Hallawa  <sabouhallawa@apple.com>
2826
2827         Add a new color -apple-wireless-playback-target-active
2828         https://bugs.webkit.org/show_bug.cgi?id=146269
2829         <rdar://problem/21465189>
2830
2831         Reviewed by Dean Jackson.
2832
2833         At the moment we use -apple-system-blue to indicate an Airplay route is
2834         active. This might not always be blue, so we need to add another system
2835         color with a name that will allow us to change the underlying color.
2836         Initially -apple-wireless-playback-target-active will be an alias to
2837         -apple-system-blue.
2838
2839         Existing tests are modified to include the new color value.
2840
2841         * Modules/mediacontrols/mediaControlsApple.js:
2842         (Controller.prototype.updateWirelessTargetPickerButton):
2843         * Modules/mediacontrols/mediaControlsiOS.css:
2844         (video::-webkit-media-controls-wireless-playback-picker-button.playing):
2845         Use the new color value in the media controls.
2846         
2847         * css/CSSParser.cpp:
2848         (WebCore::isAppleLegacyCssValueKeyword): Returns true if the value keyword
2849         has an '-apple' prefix which has to be replaced by '-webkit'
2850         
2851         (WebCore::cssValueKeywordID): Call a new function which handles all the
2852         '-apple' legacy keywords.
2853         
2854         * css/CSSValueKeywords.in: Define the new color keyword.
2855         
2856         * rendering/RenderThemeIOS.mm:
2857         (WebCore::RenderThemeIOS::systemColor):
2858         * rendering/RenderThemeMac.mm:
2859         (WebCore::RenderThemeMac::systemColor):
2860         Define the value of the new color keyword to be an alias of systemBlueColor.
2861
2862 2015-06-24  Matt Rajca  <mrajca@apple.com>
2863
2864         MediaSession: propagate MediaSessionMetadata to WebPageProxy
2865         https://bugs.webkit.org/show_bug.cgi?id=146282
2866
2867         Reviewed by Darin Adler and Tim Horton.
2868
2869         * Modules/mediasession/MediaSession.cpp:
2870         (WebCore::MediaSession::setMetadata):
2871
2872 2015-06-24  Chris Dumez  <cdumez@apple.com>
2873
2874         Null dereference in DocumentLoader::areAllLoadersPageCacheAcceptable()
2875         https://bugs.webkit.org/show_bug.cgi?id=146286
2876         <rdar://problem/21523788>
2877
2878         Reviewed by Sam Weinig.
2879
2880         Add null check for the Page in areAllLoadersPageCacheAcceptable()
2881         to fix this top crasher until I can investigate how this can happen.
2882
2883         * loader/DocumentLoader.cpp:
2884         (WebCore::areAllLoadersPageCacheAcceptable):
2885
2886 2015-06-24  Anders Carlsson  <andersca@apple.com>
2887
2888         Move PluginMainThreadScheduler to WebKit/win
2889         https://bugs.webkit.org/show_bug.cgi?id=146289
2890
2891         Reviewed by Tim Horton.
2892
2893         * CMakeLists.txt:
2894         * Configurations/WebCore.xcconfig:
2895         * WebCore.vcxproj/WebCore.vcxproj:
2896         * WebCore.vcxproj/WebCore.vcxproj.filters:
2897         * WebCore.xcodeproj/project.pbxproj:
2898         * plugins/PluginMainThreadScheduler.cpp:
2899         (WebCore::PluginMainThreadScheduler::scheduler): Deleted.
2900         (WebCore::PluginMainThreadScheduler::PluginMainThreadScheduler): Deleted.
2901         (WebCore::PluginMainThreadScheduler::scheduleCall): Deleted.
2902         (WebCore::PluginMainThreadScheduler::registerPlugin): Deleted.
2903         (WebCore::PluginMainThreadScheduler::unregisterPlugin): Deleted.
2904         (WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin): Deleted.
2905         (WebCore::PluginMainThreadScheduler::dispatchCalls): Deleted.
2906         (WebCore::PluginMainThreadScheduler::mainThreadCallback): Deleted.
2907         * plugins/PluginMainThreadScheduler.h:
2908         (WebCore::PluginMainThreadScheduler::Call::Call): Deleted.
2909         (WebCore::PluginMainThreadScheduler::Call::performCall): Deleted.
2910
2911 2015-06-24  Dean Jackson  <dino@apple.com>
2912
2913         Better fix for Element with blur backdrop-filter shows edge duplication and dark edges
2914         https://bugs.webkit.org/show_bug.cgi?id=146287
2915         <rdar://problem/21530437>
2916
2917         Reviewed by Simon Fraser.
2918
2919         There is no need to carry around a bit in FilterOperations indicating what
2920         type of source property the object came from. Whether or not to clip to the
2921         bounds of the filter region is purely a property of the type of CALayer
2922         we are applying the filter to.
2923
2924         This basically reverts r185846.
2925
2926         Covered by the test for the previous commit.
2927
2928         * css/CSSPropertyNames.in:
2929         * css/StyleBuilderConverter.h:
2930         (WebCore::StyleBuilderConverter::convertBackdropFilterOperations): Deleted.
2931         * page/animation/CSSPropertyAnimation.cpp:
2932         (WebCore::blendFilterOperations): Deleted.
2933         * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Set the normalized
2934         edges property if we are a CABackdropLayer.
2935         * platform/graphics/filters/FilterOperations.cpp:
2936         (WebCore::FilterOperations::operator==):
2937         (WebCore::FilterOperations::operationsMatch):
2938         (WebCore::FilterOperations::operator=): Deleted.
2939         * platform/graphics/filters/FilterOperations.h:
2940         (WebCore::FilterOperations::isUsedForBackdropFilters): Deleted.
2941         (WebCore::FilterOperations::setUsedForBackdropFilters): Deleted.
2942
2943 2015-06-24  Doug Russell  <d_russell@apple.com>
2944
2945         Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject 
2946         when posting a selection notification when on the border between two accessibilityObjects
2947         https://bugs.webkit.org/show_bug.cgi?id=146177
2948
2949         Reviewed by Darin Adler.
2950
2951         Add support for position to be passed for selection changes to allow checking.
2952         for boundaries in the case of ignored elements.
2953         Add support for searching for unignored siblings of AccessibilityObjects.
2954         Include AccessibilityObject wrappers in notifications for tests.
2955
2956         Test: platform/mac/accessibility/selection-element-tabbing-to-link.html
2957
2958         * accessibility/AXObjectCache.cpp:
2959         (WebCore::AXObjectCache::postTextStateChangeNotification):
2960         * accessibility/AXObjectCache.h:
2961         * accessibility/AccessibilityObject.cpp:
2962         (WebCore::AccessibilityObject::previousSiblingUnignored):
2963         (WebCore::AccessibilityObject::nextSiblingUnignored):
2964         * accessibility/AccessibilityObject.h:
2965         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
2966         (isValueTypeSupported):
2967         (arrayRemovingNonSupportedTypes):
2968         (dictionaryRemovingNonSupportedTypes):
2969         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
2970         * editing/mac/FrameSelectionMac.mm:
2971         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2972
2973 2015-06-24  Anders Carlsson  <andersca@apple.com>
2974
2975         Enable -Winconsistent-missing-override when building with Xcode
2976         https://bugs.webkit.org/show_bug.cgi?id=146288
2977
2978         Reviewed by Sam Weinig.
2979
2980         * Configurations/Base.xcconfig:
2981         * Modules/encryptedmedia/MediaKeySession.h:
2982         * Modules/webdatabase/DatabaseTask.h:
2983         * html/DateTimeLocalInputType.h:
2984         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
2985         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2986         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2987         (WebCore::MediaPlayerPrivateAVFoundation::platformLayer): Deleted.
2988         (WebCore::MediaPlayerPrivateAVFoundation::supportsScanning): Deleted.
2989         (WebCore::MediaPlayerPrivateAVFoundation::fileSize): Deleted.
2990         (WebCore::MediaPlayerPrivateAVFoundation::engineDescription): Deleted.
2991         (WebCore::MediaPlayerPrivateAVFoundation::platformErrorCode): Deleted.
2992         (WebCore::MediaPlayerPrivateAVFoundation::notifyTrackModeChanged): Deleted.
2993         * platform/graphics/avfoundation/VideoTrackPrivateAVF.h:
2994         (WebCore::VideoTrackPrivateAVF::trackIndex): Deleted.
2995         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
2996         (WebCore::CDMSessionAVFoundationObjC::type): Deleted.
2997         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2998         (WebCore::CDMSessionMediaSourceAVFObjC::type): Deleted.
2999         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3000         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsAcceleratedRendering): Deleted.
3001         (WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayToWirelessPlaybackTarget): Deleted.
3002         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3003         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential): Deleted.
3004         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToContinueWithoutCredential): Deleted.
3005         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCancellation): Deleted.
3006         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToPerformDefaultHandling): Deleted.
3007         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedChallengeRejection): Deleted.
3008         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3009         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Deleted.
3010         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3011         (WebCore::MediaPlayerPrivateQTKit::supportsScanning): Deleted.
3012         (WebCore::MediaPlayerPrivateQTKit::networkState): Deleted.
3013         (WebCore::MediaPlayerPrivateQTKit::readyState): Deleted.
3014         (WebCore::MediaPlayerPrivateQTKit::maximumDurationToCacheMediaTime): Deleted.
3015         (WebCore::MediaPlayerPrivateQTKit::engineDescription): Deleted.
3016         * platform/mac/ScrollAnimatorMac.h:
3017         * platform/mac/SerializedPlatformRepresentationMac.h:
3018         (WebCore::SerializedPlatformRepresentationMac::platformType): Deleted.
3019         * platform/mac/ThemeMac.h:
3020         (WebCore::ThemeMac::controlRequiresPreWhiteSpace): Deleted.
3021         * testing/MockCDM.cpp:
3022         (WebCore::MockCDMSession::setClient): Deleted.
3023
3024 2015-06-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3025
3026         Improve JSDOMPromise callPromiseFunction naming
3027         https://bugs.webkit.org/show_bug.cgi?id=146280
3028
3029         Unreviewed.
3030
3031         No change in behavior.
3032
3033         * bindings/js/JSDOMPromise.h:
3034         (WebCore::callPromiseFunction):
3035
3036 2015-06-24  Tim Horton  <timothy_horton@apple.com>
3037
3038         REGRESSION (r185804): Crash selecting time in the form on https://backup.brighthorizons.com/BackupCareRequest.aspx
3039         <rdar://problem/21525376>
3040
3041         Reviewed by Sam Weinig.
3042
3043         * page/TextIndicator.cpp:
3044         (WebCore::TextIndicator::createWithRange):
3045         Null check.
3046
3047 2015-06-24  Zalan Bujtas  <zalan@apple.com>
3048
3049         Subpixel rendering: roundToDevicePixel() snaps to wrong value.
3050         https://bugs.webkit.org/show_bug.cgi?id=146273
3051         rdar://problem/18509840
3052
3053         Reviewed by Simon Fraser.
3054
3055         Due to the floating point approximate representation, we can't always produce
3056         the correct snap value. This patch addresses the issue by removing redundant kFixedPointDenominator multiplication
3057         and by changing the rounding in roundToDevicePixel() from float to double.
3058
3059         API test is added.
3060
3061         * platform/LayoutUnit.h:
3062         (WebCore::roundToDevicePixel):
3063
3064 2015-06-23  Matt Rajca  <mrajca@apple.com>
3065
3066         MediaSession: Support setting of metadata
3067         https://bugs.webkit.org/show_bug.cgi?id=146253
3068
3069         Reviewed by Eric Carlson.
3070
3071         * Modules/mediasession/MediaSession.cpp:
3072         (WebCore::MediaSession::MediaSession): Store a reference to the document so we can use it in setMetadata.
3073         (WebCore::MediaSession::setMetadata): Implemented as described in the Media Session spec.
3074         * Modules/mediasession/MediaSession.h:
3075         * Modules/mediasession/MediaSession.idl: Added the setMetadata method.
3076         * Modules/mediasession/MediaSessionMetadata.h:
3077         (WebCore::MediaSessionMetadata::MediaSessionMetadata): Added to keep track of media session metadata.
3078         (WebCore::MediaSessionMetadata::title):
3079         (WebCore::MediaSessionMetadata::artist):
3080         (WebCore::MediaSessionMetadata::album):
3081         (WebCore::MediaSessionMetadata::artworkURL):
3082         * WebCore.xcodeproj/project.pbxproj: Added MediaSessionMetadata.h.
3083
3084 2015-06-24  Daniel Bates  <dabates@apple.com>
3085
3086         Content Security Policy error message when frame load is blocked does not read well
3087         https://bugs.webkit.org/show_bug.cgi?id=146279
3088
3089         Reviewed by Csaba Osztrogonác.
3090
3091         Substitute "Refused to load frame" for "Refused to frame" as the prefix of the error message
3092         emitted when the Content Security Policy of the page blocks a frame load.
3093
3094         * page/ContentSecurityPolicy.cpp:
3095         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
3096
3097 2015-06-11  Sergio Villar Senin  <svillar@igalia.com>
3098
3099         intrinsic size keywords don't work for heights
3100         https://bugs.webkit.org/show_bug.cgi?id=113610
3101
3102         Reviewed by Darin Adler.
3103
3104         Based on Blink's r148314 & r150355 by <cbiesinger@chromium.org>.
3105
3106         Adds intrinsic values support to heigh & min/max-height. This involves the
3107         following changes:
3108         - RenderBox needs to pass the content height through to computeLogicalHeight and
3109         related functions, which needs it to resolve max-content, et. al.
3110         - Make the callers pass the content height to this function. Some callers pass
3111         logicalHeight() (adjusted for border/padding) which works because if
3112         logicalHeight is not the content height, then it is the height we ended up using,
3113         so the constrain* functions will just constrain to that value again.
3114         - Parsing code needs to be adjusted to support intrinsic values for heights.
3115
3116         Tests: fast/css-intrinsic-dimensions/height-css-tables-collapsed.html
3117                fast/css-intrinsic-dimensions/height-css-tables.html
3118                fast/css-intrinsic-dimensions/height-flexbox.html
3119                fast/css-intrinsic-dimensions/height-positioned-replaced.html
3120                fast/css-intrinsic-dimensions/height-positioned.html
3121                fast/css-intrinsic-dimensions/height-replaced.html
3122                fast/css-intrinsic-dimensions/height-tables-collapsed.html
3123                fast/css-intrinsic-dimensions/height-tables.html
3124                fast/css-intrinsic-dimensions/height.html
3125
3126         * css/CSSParser.cpp:
3127         (WebCore::CSSParser::isValidSize): Refactored from validateWidth and
3128         validateHeight.
3129         (WebCore::CSSParser::parseValue):
3130         (WebCore::CSSParser::validateWidth): Deleted.
3131         (WebCore::CSSParser::validateHeight): Deleted.
3132         * css/CSSParser.h:
3133         * platform/Length.h:
3134         (WebCore::Length::isFillAvailable):
3135         (WebCore::Length::isFitContent):
3136         * rendering/RenderBox.cpp:
3137         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
3138         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
3139         (WebCore::RenderBox::computeLogicalHeight):
3140         (WebCore::RenderBox::computeLogicalHeightUsing):
3141         (WebCore::RenderBox::computeContentLogicalHeight):
3142         (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
3143         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
3144         (WebCore::RenderBox::computePercentageLogicalHeight):
3145         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
3146         (WebCore::RenderBox::availableLogicalHeight):
3147         (WebCore::RenderBox::availableLogicalHeightUsing):
3148         (WebCore::RenderBox::computePositionedLogicalHeight):
3149         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
3150         * rendering/RenderBox.h:
3151         * rendering/RenderFlexibleBox.cpp:
3152         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
3153         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
3154         * rendering/RenderFlowThread.cpp:
3155         (WebCore::RenderFlowThread::addForcedRegionBreak):
3156         * rendering/RenderGrid.cpp:
3157         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
3158         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
3159         * rendering/RenderMultiColumnSet.cpp:
3160         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
3161         * rendering/RenderReplaced.cpp:
3162         (WebCore::RenderReplaced::hasReplacedLogicalHeight):
3163         * rendering/RenderTable.cpp:
3164         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
3165         (WebCore::RenderTable::layout):
3166
3167 2015-06-24  Commit Queue  <commit-queue@webkit.org>
3168
3169         Unreviewed, rolling out r185906.
3170         https://bugs.webkit.org/show_bug.cgi?id=146276
3171
3172         MSVC doesn't yet provide a const-qualified std::array<T,
3173         N>::size(), failing to compile the static_assert (Requested by
3174         zdobersek on #webkit).
3175
3176         Reverted changeset:
3177
3178         "Improve the source code generated by make_names.pl"
3179         https://bugs.webkit.org/show_bug.cgi?id=146208
3180         http://trac.webkit.org/changeset/185906
3181
3182 2015-06-24  Zan Dobersek  <zdobersek@igalia.com>
3183
3184         Improve the source code generated by make_names.pl
3185         https://bugs.webkit.org/show_bug.cgi?id=146208
3186
3187         Reviewed by Darin Adler.
3188
3189         Clean up and optimize the output that's generated by the make_names.pl script
3190         when generating large sets of DOM names for attributes and tags.
3191
3192         The GenerateStrings() function in the StaticString.pm module is split into
3193         GenerateStringData() and GenerateASCIILiteral() so that the two new functions
3194         can be used independently, with the original function still being called when
3195         generating font names.
3196
3197         Tags and attributes have the corresponding static QualifiedName globals defined
3198         as before. After that, two static const std::array<> objects are defined for
3199         both types -- the first is an ordered array of addresses of the QualifiedName
3200         objects (corresponding to the C array that was defined in getHTMLTags(),
3201         getSVGAttrs() etc.), and the second is an ordered array of StringImpl::StaticASCIILiteral
3202         objects that replaces separately defined StringImpl::StaticASCIILiteral objects
3203         and the additional tables that contained pairs of QualifiedName object addresses
3204         and the corresponding StaticASCIILiteral object references in the init() function.
3205         This is all generated by the printStaticData() function in make_names.pl.
3206
3207         The printQualifiedNameCreation() function generates a static_assert() that ensures
3208         that the corresponding std::array<QualifiedName*> and std::array<StaticASCIILiteral>
3209         objects have the same amount of items, and then sets up a loop that walks through
3210         the two arrays and properly constructs the QualifiedName objects from the static
3211         literal data.
3212
3213         On the GTK port, this shaves off ~54kB from the final stripped shared library
3214         on a 64-bit build, and ~21kB on a 32-bit build.
3215
3216         * bindings/scripts/StaticString.pm:
3217         (GenerateStringData):
3218         (GenerateASCIILiteral):
3219         (GenerateStrings):
3220         * dom/make_names.pl:
3221         (printCppHead):
3222         (printNamesCppFile):
3223         (printStaticData):
3224         (printQualifiedNameCreation):
3225         (printInit): Deleted.
3226         (printDefinitions): Deleted.
3227
3228 2015-06-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3229
3230         Refactor UserMediaRequest to share more codes between MediaDevices.getUserMedia and legacy webkitGetUserMedia
3231         https://bugs.webkit.org/show_bug.cgi?id=146237
3232
3233         Reviewed by Darin Adler.
3234
3235         Covered by existing tests, no change in behavior.
3236
3237         * Modules/mediastream/MediaConstraintsImpl.cpp:
3238         (WebCore::MediaConstraintsImpl::create): Simplified error handling by removing exception code parameter.
3239         * Modules/mediastream/MediaConstraintsImpl.h: Ditto.
3240         * Modules/mediastream/MediaDevices.cpp:
3241         (WebCore::MediaDevices::getUserMedia): Removed code now in UserMediaRequest::start.
3242         * Modules/mediastream/NavigatorUserMedia.cpp:
3243         (WebCore::NavigatorUserMedia::webkitGetUserMedia): Ditto.
3244         * Modules/mediastream/UserMediaRequest.cpp:
3245         (WebCore::parseOptions): Simplified error handling by removing exception code parameter.
3246         (WebCore::UserMediaRequest::start): Renamed create in start and added common code.
3247         * Modules/mediastream/UserMediaRequest.h:
3248
3249 2015-06-23  Andreas Kling  <akling@apple.com>
3250
3251         Should reduce tile coverage for the first paint after a tab switch.
3252         <https://webkit.org/b/146252>
3253         <rdar://problem/19821583>
3254
3255         Reviewed by Darin Adler.
3256
3257         Reduce the number of tiles we need to paint after switching tabs,
3258         to shorten the time it takes before we can flush pixels to screen.
3259
3260         We accomplish this by piggybacking on the "speculative tiling enabled"
3261         mode of FrameView, which was previously only used to throttle painting
3262         and layer flushes during page load.
3263
3264         When a FrameView becomes visible, which is what happens when you
3265         switch to its tab, we revert the speculative tiling optimization to
3266         its initial state, and reset the "scrolled by user" flag.
3267
3268         In practice this means that after switching tabs, we only generate
3269         enough tiles to fill the viewport. Then, after 500ms has passed
3270         or the user scrolls the page, we go back to the usual speculative
3271         tiling mode.
3272
3273         * page/FrameView.cpp:
3274         (WebCore::FrameView::show):
3275
3276 2015-06-23  Anders Carlsson  <andersca@apple.com>
3277
3278         Remove windowResizerRect code, nobody is using it anymore
3279         https://bugs.webkit.org/show_bug.cgi?id=146265
3280
3281         Reviewed by Beth Dakin.
3282
3283         * loader/EmptyClients.h:
3284         * page/Chrome.cpp:
3285         (WebCore::Chrome::windowResizerRect): Deleted.
3286         * page/Chrome.h:
3287         * page/ChromeClient.h:
3288         * page/FrameView.cpp:
3289         (WebCore::FrameView::windowResizerRect): Deleted.
3290         * page/FrameView.h:
3291         * platform/ScrollView.cpp:
3292         (WebCore::ScrollView::ScrollView): Deleted.
3293         (WebCore::ScrollView::windowResizerRectChanged): Deleted.
3294         (WebCore::ScrollView::containsScrollbarsAvoidingResizer): Deleted.
3295         (WebCore::ScrollView::adjustScrollbarsAvoidingResizerCount): Deleted.
3296         (WebCore::ScrollView::setParent): Deleted.
3297         * platform/ScrollView.h:
3298         (WebCore::ScrollView::windowResizerRect): Deleted.
3299         * platform/Scrollbar.cpp:
3300         (WebCore::Scrollbar::Scrollbar): Deleted.
3301         (WebCore::Scrollbar::setFrameRect): Deleted.
3302         (WebCore::Scrollbar::setParent): Deleted.
3303         * platform/Scrollbar.h:
3304
3305 2015-06-23  Dean Jackson  <dino@apple.com>
3306
3307         Media controls are missing the white backdrop in UIWebViews
3308         https://bugs.webkit.org/show_bug.cgi?id=146251
3309         <rdar://problem/20181345>
3310
3311         Reviewed by Simon Fraser.
3312
3313         Implement two new CALayer subclasses that explicitly set
3314         something that resembles the system appearance for
3315         media-controls-dark-bar-background and media-controls-light-bar-background.
3316         This way, WebKit1 clients get a visible result.
3317
3318         Creating the actual system recipes is tracked by:
3319         https://bugs.webkit.org/show_bug.cgi?id=146250
3320
3321         * WebCore.xcodeproj/project.pbxproj: Add new files.
3322         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
3323         (PlatformCALayerCocoa::PlatformCALayerCocoa): Use the new CALayer subclasses for
3324         the appropriate layer types.
3325         * platform/graphics/ca/cocoa/WebSystemBackdropLayer.h: Added.
3326         * platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm: Added.
3327         (-[WebLightSystemBackdropLayer init]):
3328         (-[WebLightSystemBackdropLayer setBackgroundColor:]): Only set to a light grey.
3329         (-[WebDarkSystemBackdropLayer init]):
3330         (-[WebDarkSystemBackdropLayer setBackgroundColor:]): Only set to a dark grey.
3331
3332 2015-06-18  Matt Rajca  <mrajca@apple.com>
3333
3334         Support releasing media sessions
3335         https://bugs.webkit.org/show_bug.cgi?id=146132
3336
3337         Reviewed by Darin Adler.
3338
3339         * Modules/mediasession/MediaSession.cpp: Implemented as described in the Media Session spec.
3340         (WebCore::MediaSession::releaseSession):
3341         (WebCore::MediaSession::releaseInternal):
3342         * Modules/mediasession/MediaSession.h:
3343
3344 2015-06-23  Chris Fleizach  <cfleizach@apple.com>
3345
3346         AX: iOS: VoiceOver and ARIA: has popup property not announced
3347         https://bugs.webkit.org/show_bug.cgi?id=146188
3348
3349         Reviewed by Darin Adler.
3350
3351         Expose the existing "has popup" property to the iOS Accessibility API.
3352
3353         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3354         (-[WebAccessibilityObjectWrapper accessibilityHasPopup]):
3355
3356 2015-06-23  Javier Fernandez  <jfernandez@igalia.com>
3357
3358         [CSS Grid Layout] Performance optimization: avoid computing overflow alignment if not needed
3359         https://bugs.webkit.org/show_bug.cgi?id=146231
3360
3361         Reviewed by Sergio Villar Senin.
3362
3363         We don't need to apply any overflow handling if alignment value don't have a potential
3364         risk of data loss, as it's the case of 'start' value.
3365
3366         This patch avoid computing the overflow in all the cases, since it adds an unneeded
3367         overhead which affects performance.
3368
3369         New code improves performance around 3%-8%, depending on the grid tests.
3370
3371         No new tests, no new funcitonality.
3372
3373         * rendering/RenderGrid.cpp:
3374         (WebCore::RenderGrid::rowPositionForChild):
3375         (WebCore::RenderGrid::columnPositionForChild):
3376
3377 2015-06-23  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3378
3379         MediaDevices.getUserMedia should migrate from callbacks to DOMPromise
3380         https://bugs.webkit.org/show_bug.cgi?id=146200
3381
3382         Reviewed by Darin Adler.
3383
3384         Introduced DOMPromiseWithCallback to resolve/reject promises while allowing promise clients to use a typed callback approach.
3385         Migrated MediaDevices.getUserMedia from callbacks to DOMPromiseWithCallback.
3386         Removed MediaDevices.getUserMedia custom binding.
3387
3388         Covered by existing tests.
3389
3390         * CMakeLists.txt: Removing custom binding.
3391         * Modules/mediastream/MediaDevices.cpp:
3392         (WebCore::MediaDevices::getUserMedia): Moving from callback to promise.
3393         * Modules/mediastream/MediaDevices.h: Ditto.
3394         * Modules/mediastream/MediaDevices.idl: Removing custom binding.
3395         * Modules/mediastream/NavigatorUserMedia.cpp:
3396         (WebCore::NavigatorUserMedia::webkitGetUserMedia): Converting from promise callback to API callbacks.
3397         * Modules/mediastream/UserMediaRequest.cpp:
3398         (WebCore::UserMediaRequest::create): Moving from callback to promise.
3399         (WebCore::UserMediaRequest::UserMediaRequest): Ditto.
3400         (WebCore::UserMediaRequest::didCreateStream): Ditto.
3401         (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Ditto.
3402         (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Ditto.
3403         * Modules/mediastream/UserMediaRequest.h: Ditto.
3404         * bindings/js/JSDOMPromise.h: Introducing DOMPromiseWithCallback and removing crypto specific header.
3405         (WebCore::DOMPromiseWithCallback::DOMPromiseWithCallback):
3406         (WebCore::Error>::resolve):
3407         (WebCore::Error>::reject):
3408         * bindings/js/JSMediaDevicesCustom.cpp: Removed.
3409         * bindings/js/JSSubtleCryptoCustom.cpp: Updating headers.
3410
3411 2015-06-23  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
3412
3413         [Streams API] Implement ReadableStream js source "'cancel" callback
3414         https://bugs.webkit.org/show_bug.cgi?id=146204
3415
3416         Reviewed by Darin Adler.
3417
3418         Calling "cancel" JS function when web app is cancelling a JS readable stream.
3419         Handling of promise returned value in case of async cancel.
3420
3421         Covered by rebased tests.
3422
3423         * bindings/js/ReadableJSStream.cpp:
3424         (WebCore::ReadableJSStream::invoke): Refactoring to pass cancel reason or controller to the JS function.
3425         (WebCore::ReadableJSStream::doStart): Ditto.
3426         (WebCore::startReadableStreamAsync): Renaming readableStream as protectedStream.
3427         (WebCore::createPullResultFulfilledFunction): Ditto.
3428         (WebCore::ReadableJSStream::doPull): Refactoring to pass cancel reason or controller to the JS function.
3429         (WebCore::createCancelResultFulfilledFunction): Cancel promise fullfil callback.
3430         (WebCore::createCancelResultRejectedFunction): Cancel promise reject callback.
3431         (WebCore::ReadableJSStream::doCancel): Calling cancel JS callback and handling promise returned value.
3432         * bindings/js/ReadableJSStream.h: Refactoring to pass cancel reason or controller to the JS function.
3433
3434 2015-06-22  Ryuan Choi  <ryuan.choi@navercorp.com>
3435
3436         [EFL] Hyphenation is not supported
3437         https://bugs.webkit.org/show_bug.cgi?id=89830
3438
3439         Reviewed by Gyuyoung Kim.
3440
3441         Share libHyphen backend of GTK port.
3442
3443         Rebased fast/text/hyphenate-*.html
3444
3445         * PlatformEfl.cmake:
3446         * PlatformGTK.cmake:
3447         * platform/efl/FileSystemEfl.cpp:
3448         (WebCore::listDirectory): Deleted because of lack of functionality.
3449         eina_file_ls returns full directory path so fnmatch fails to check dict file.
3450         This patch reuse Posix implementation instead of EFL port specific function.
3451         * platform/posix/FileSystemPOSIX.cpp: Ditto.
3452         * platform/text/gtk/HyphenationLibHyphen.cpp: Moved to platform/text/hyphen
3453         * platform/text/hyphen/HyphenationLibHyphen.cpp:
3454         Renamed from Source/WebCore/platform/text/gtk/HyphenationLibHyphen.cpp.
3455         (WebCore::scanTestDictionariesDirectoryIfNecessary):
3456         Added PLATFORM guard and EFL implementation for the test directory
3457
3458 2015-06-22  Chris Dumez  <cdumez@apple.com>
3459
3460         [WK1] WebAllowDenyPolicyListener.denyOnlyThisRequest() should not start a new permission request
3461         https://bugs.webkit.org/show_bug.cgi?id=146228
3462         <rdar://problem/15179262>
3463
3464         Reviewed by Daniel Bates.
3465
3466         Add Geolocation::resetIsAllowed() API that merely resets
3467         m_allowGeolocation to Unknown, so that we will request the permission
3468         again the next time a position is requested.
3469
3470         * Modules/geolocation/Geolocation.h:
3471         (WebCore::Geolocation::resetIsAllowed):
3472
3473 2015-06-22  Simon Fraser  <simon.fraser@apple.com>
3474
3475         ASSERT(!m_zOrderListsDirty) when mousing over web view with incremental rendering suppressed
3476         https://bugs.webkit.org/show_bug.cgi?id=146225
3477
3478         Reviewed by Zalan Bujtas.
3479
3480         Update RenderLayer's z-order lists when hit testing. There's no guarantee that they've
3481         been updated; this happens to work most of the time because painting updates them,
3482         but if incremental rendering is suppressed, we may not have painted yet.
3483         
3484         Easy to hit on webkit.org in MiniBrowser, but I wasn't able to make a reduced testcase.
3485
3486         * rendering/RenderLayer.cpp:
3487         (WebCore::RenderLayer::hitTest):
3488         (WebCore::RenderLayer::updateLayerListsIfNeeded): Flip the order of the tests, since checking
3489         dirty bits is cheaper than calling isStackingContext().
3490
3491 2015-06-22  Dean Jackson  <dino@apple.com>
3492
3493         Rename PlatformCA*Mac to PlatformCA*Cocoa
3494         https://bugs.webkit.org/show_bug.cgi?id=146224
3495         <rdar://problem/21497182>
3496
3497         Reviewed by Simon Fraser.
3498
3499         Rename PlatformCALayerMac and related files in platform/graphics/ca/mac
3500         to the more accurate Cocoa suffix.
3501
3502         * WebCore.xcodeproj/project.pbxproj:
3503         * page/mac/ServicesOverlayController.mm:
3504         * platform/graphics/ca/GraphicsLayerCA.cpp:
3505         * platform/graphics/ca/PlatformCAAnimation.h:
3506         * platform/graphics/ca/PlatformCALayer.h:
3507         * platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp: Renamed from Source/WebCore/platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp.
3508         * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h.
3509         * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm.
3510         * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAFiltersMac.mm.
3511         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h.
3512         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm.
3513         * platform/graphics/ca/cocoa/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.h.
3514         * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.mm.
3515         * platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
3516         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
3517         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
3518         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3519         * platform/graphics/ca/mac/WebTiledBackingLayer.mm:
3520
3521 2015-06-22  Alex Christensen  <achristensen@webkit.org>
3522
3523         [cssjit] Disable compiling scrollbar pseudoclass selectors
3524         https://bugs.webkit.org/show_bug.cgi?id=146220
3525
3526         Reviewed by Benjamin Poulain.
3527
3528         * cssjit/SelectorCompiler.cpp:
3529         (WebCore::SelectorCompiler::addScrollbarPseudoClassType):
3530         Don't compile selectors with scrollbar pseudoclasses.
3531
3532 2015-06-22  Simon Fraser  <simon.fraser@apple.com>
3533
3534         -webkit-clip-path clips incorrectly if the element bounds go beyond the top edge of the page
3535         https://bugs.webkit.org/show_bug.cgi?id=146218
3536         rdar://problem/21127840
3537
3538         Reviewed by Zalan Bujtas.
3539
3540         The clip path is computed using the RenderLayer's bounding box, so needs to be offset
3541         by the offsetFromRenderer when set on the mask layer.
3542
3543         Test: compositing/masks/compositing-clip-path-origin.html
3544
3545         * rendering/RenderLayerBacking.cpp:
3546         (WebCore::RenderLayerBacking::updateMaskingLayerGeometry):
3547
3548 2015-06-22  Michael Catanzaro  <mcatanzaro@igalia.com>
3549
3550         Web sockets should be treated as active mixed content
3551         https://bugs.webkit.org/show_bug.cgi?id=140624
3552
3553         Reviewed by Sam Weinig.
3554
3555         Tests: http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html
3556                http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame.html
3557
3558         * Modules/websockets/WebSocket.cpp:
3559         (WebCore::WebSocket::connect): Block ws:// WebSocket connections from https:// pages, and
3560         emit the onerror event after doing so.
3561         * platform/SchemeRegistry.cpp:
3562         (WebCore::secureSchemes): Add wss:// to the list of secure schemes.
3563
3564 2015-06-22  Dean Jackson  <dino@apple.com>
3565
3566         Element with blur backdrop-filter shows edge duplication and dark edges
3567         https://bugs.webkit.org/show_bug.cgi?id=146215
3568         <rdar://problem/20367695>
3569
3570         Reviewed by Tim Horton.
3571
3572         The input images to backdrop filters should duplicate their edge pixels
3573         outwards, rather than using transparent pixels. This is a flag we
3574         set on the Gaussian blur, but means we have to remember if the
3575         FilterOperations list came from a regular filter or a backdrop filter.
3576
3577         Test: css3/filters/backdrop/blur-input-bounds.html
3578
3579         * css/CSSPropertyNames.in: New custom convertor for backdrop-filter.
3580         * css/StyleBuilderConverter.h:
3581         (WebCore::StyleBuilderConverter::convertBackdropFilterOperations): New convertor
3582         that sets the backdrop flag, but is otherwise the same as a normal filter
3583         convertor.
3584         * page/animation/CSSPropertyAnimation.cpp:
3585         (WebCore::blendFilterOperations): Inherit the backdrop flag if either of our
3586         inputs has it.
3587         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Set the inputNormalizeEdges
3588         key on the CAFilter if necessary.
3589         * platform/graphics/filters/FilterOperations.cpp: Add a new flag indicating if
3590         these operations are intended for backdrops.
3591         (WebCore::FilterOperations::operator=):
3592         (WebCore::FilterOperations::operator==):
3593         * platform/graphics/filters/FilterOperations.h:
3594         (WebCore::FilterOperations::isUsedForBackdropFilters):
3595         (WebCore::FilterOperations::setUsedForBackdropFilters):
3596
3597 2015-06-22  Tim Horton  <timothy_horton@apple.com>
3598
3599         [TextIndicator] Text shifts one pixel to the left when I force click to bring up Lookup in Mail messages
3600         https://bugs.webkit.org/show_bug.cgi?id=146214
3601         <rdar://problem/20782970>
3602
3603         Reviewed by Dean Jackson.
3604
3605         * page/mac/TextIndicatorWindow.mm:
3606         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
3607         (WebCore::TextIndicatorWindow::setTextIndicator):
3608         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]): Deleted.
3609         When the WebView is at a nonintegral position, we can end up needing a TextIndicator
3610         with a nonintegral position. We need to round the window position, so we need to apply
3611         the fractional part to the indicator layers inside, not to the window.
3612
3613 2015-06-22  Myles C. Maxfield  <mmaxfield@apple.com>
3614
3615         [iOS] Arabic text styled with Georgia is rendered as boxes
3616         https://bugs.webkit.org/show_bug.cgi?id=145681
3617         <rdar://problem/21169844>
3618
3619         Reviewed by Darin Adler.
3620
3621         Georgia doesn't support Arabic, so we ask CoreText what font does support Arabic. It returns
3622         TimesNewRomanPSMT. However, WebKit explicitly disallows this font on iOS. Therefore, instead
3623         of using TimesNewRomanPSMT, we will simply just use GeezaPro.
3624
3625         Test: fast/text/arabic-times-new-roman.html
3626
3627         * platform/graphics/ios/FontCacheIOS.mm:
3628         (WebCore::FontCache::systemFallbackForCharacters):
3629         * platform/graphics/Font.h: Let FontCacheIOS call fontFamilyShouldNotBeUsedForArabic()
3630         * platform/graphics/cocoa/FontCocoa.mm:
3631         (WebCore::fontFamilyShouldNotBeUsedForArabic):
3632
3633 2015-06-22  Alex Christensen  <achristensen@webkit.org>
3634
3635         Unreviewed non-mac debug build fix after r185840.
3636
3637         * loader/ResourceLoader.cpp:
3638         (WebCore::ResourceLoader::willSendRequest):
3639         Added enable flag around assertion.
3640
3641 2015-06-20  Alex Christensen  <achristensen@webkit.org>
3642
3643         [Content Extensions] Add SPI to reload without content blocking.
3644         https://bugs.webkit.org/show_bug.cgi?id=146128
3645         rdar://problem/20351903
3646
3647         Reviewed by Sam Weinig.
3648
3649         * html/HTMLMediaElement.cpp:
3650         (WebCore::HTMLMediaElement::loadResource):
3651         * loader/ResourceLoader.cpp:
3652         (WebCore::ResourceLoader::willSendRequest):
3653         * loader/cache/CachedResourceLoader.cpp:
3654         (WebCore::CachedResourceLoader::requestResource):
3655         * page/DOMWindow.cpp:
3656         (WebCore::DOMWindow::open):
3657         * page/Page.h:
3658         (WebCore::Page::userContentController):
3659         (WebCore::Page::userContentExtensionsEnabled):
3660         (WebCore::Page::setUserContentExtensionsEnabled):
3661         (WebCore::Page::group):
3662         * page/UserContentController.cpp:
3663         (WebCore::UserContentController::removeAllUserContentExtensions):
3664         (WebCore::UserContentController::processContentExtensionRulesForLoad):
3665         (WebCore::UserContentController::actionsForResourceLoad):
3666         * page/UserContentController.h:
3667
3668 2015-06-22  Zalan Bujtas  <zalan@apple.com>
3669
3670         REGRESSION(r169105) Dangling renderer pointer in SelectionSubtreeRoot::SelectionSubtreeData.
3671         https://bugs.webkit.org/show_bug.cgi?id=146116
3672         rdar://problem/20959369
3673
3674         Reviewed by Brent Fulgham.
3675
3676         This patch ensures that we don't adjust the selection unless the visual selection still matches this subtree root.
3677
3678         When multiple selection roots are present we need to ensure that a RenderObject
3679         only shows up in one of them.
3680         RenderView::splitSelectionBetweenSubtrees(), as the name implies, splits the
3681         selection and sets the selection range (start/end) on each selection root.
3682         However, SelectionSubtreeRoot::adjustForVisibleSelection() later recomputes the range
3683         based on visible selection and that could end up collecting renderers as selection start/end
3684         from another selection subtree.
3685         RenderObject's holds the last selection state (RenderObject::setSelectionState).
3686         If we set a renderer first as "on selection border" and later "inside" using multiple selection roots,
3687         we can't clean up selections properly when this object gets destroyed.
3688         One of the roots ends up with a dangling RenderObject pointer.
3689
3690         Test: fast/regions/crash-when-renderer-is-in-multiple-selection-subtrees.html
3691
3692         * rendering/SelectionSubtreeRoot.cpp:
3693         (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
3694
3695 2015-06-22  Jeremy Jones  <jeremyj@apple.com>
3696
3697         Do not exit fullscreen when starting PiP since this is done automatically.
3698         https://bugs.webkit.org/show_bug.cgi?id=144871
3699
3700         Reviewed by Darin Adler.
3701
3702         Since we don't explicitly exit fullscreen, update state in shouldExitFullscreenWithReason()
3703
3704         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Declare shouldExitFullscreenWithReason().
3705         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3706         (-[WebAVPlayerController playerViewController:shouldExitFullScreenWithReason:]): Forward to WebVideoFullscreenInterfaceAVKit.
3707         (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Added.
3708         (WebVideoFullscreenInterfaceAVKit::willStartPictureInPicture): Remove enter fullscreen code.
3709         * platform/spi/cocoa/AVKitSPI.h: Add missing enums.
3710
3711 2015-06-22  Daniel Bates  <dabates@apple.com>
3712
3713         AX: UI Automation cannot find AutoFill or search cancel buttons
3714         https://bugs.webkit.org/show_bug.cgi?id=145241
3715         <rdar://problem/21051411>
3716
3717         Reviewed by Chris Fleizach.
3718
3719         Add support for hit testing the search cancel button and AutoFill button so that
3720         they can be accessed by UI Automation.
3721
3722         Currently the accessibility hit test machinery ignores nodes in a shadow tree.
3723         So, it neither finds the <input type="search"> cancel button nor the AutoFill button
3724         when it performs a hit test. Therefore these buttons cannot be accessed using
3725         UI Automation.
3726
3727         Tests: accessibility/hit-test-input-auto-fill-button.html
3728                accessibility/hit-test-input-search-cancel-button.html
3729                accessibility/input-search-cancel-button.html
3730
3731         * accessibility/AccessibilityRenderObject.cpp:
3732         (WebCore::AccessibilityRenderObject::accessibilityTextFieldDecorationHitTest): Added; returns
3733         the AccessibilityObject for the search cancel button or AutoFill text field decoration as applicable.
3734         (WebCore::AccessibilityRenderObject::accessibilityHitTest): Check whether the hit node
3735         is a text field decoration.
3736
3737 2015-06-22  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
3738
3739         [Streams API] Implement ReadableStream cancel (abstract part)
3740         https://bugs.webkit.org/show_bug.cgi?id=146111
3741
3742         Reviewed by Darin Adler.
3743
3744         This patch implements ReadableStream and ReadableStreamReader cancel.
3745         The reader delegates cancellation to its stream.
3746
3747         This patch also ensures that controller.close() will not throw in case cancellation is on-going.
3748
3749         A follow-up patch will implement the calling of 'cancel' JS callback for JS sources.
3750
3751         Covered by rebased tests.
3752
3753         * Modules/streams/ReadableStream.cpp:
3754         (WebCore::ReadableStream::cancel): Checks whether locked or not before cancelling.
3755         (WebCore::ReadableStream::cancelNoCheck): Cancel without lock check.
3756         (WebCore::ReadableStream::notifyCancelSucceeded): Async cancel callback.
3757         (WebCore::ReadableStream::notifyCancelFailed): Ditto.
3758         * Modules/streams/ReadableStream.h:
3759         * Modules/streams/ReadableStream.idl: Cleaned up IDL.
3760         * Modules/streams/ReadableStreamReader.cpp:
3761         (WebCore::ReadableStreamReader::cancel):
3762         * Modules/streams/ReadableStreamReader.h:
3763         * Modules/streams/ReadableStreamReader.idl: Cleaned up IDL
3764         * bindings/js/JSReadableStreamControllerCustom.cpp:
3765         (WebCore::JSReadableStreamController::close):
3766         * bindings/js/JSReadableStreamCustom.cpp:
3767         (WebCore::JSReadableStream::cancel):
3768         * bindings/js/JSReadableStreamReaderCustom.cpp:
3769         (WebCore::JSReadableStreamReader::cancel):
3770         * bindings/js/ReadableJSStream.cpp:
3771         (WebCore::ReadableJSStream::doCancel):
3772         * bindings/js/ReadableJSStream.h:
3773
3774 2015-06-22  Adam Bergkvist  <adam.bergkvist@ericsson.com>
3775
3776         WebRTC: Navigator.webkitGetUserMedia() requires three arguments
3777         https://bugs.webkit.org/show_bug.cgi?id=146022
3778
3779         Reviewed by Eric Carlson.
3780
3781         Updated custom binding to make the third error callback argument
3782         mandatory. Updated and unskipped three tests (for the GTK+ port).
3783
3784         * bindings/js/JSNavigatorCustom.cpp:
3785         (WebCore::JSNavigator::webkitGetUserMedia):
3786
3787 2015-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>
3788
3789         Unreviewed. Fix GTK+ build after r185818.
3790
3791         Actually rollout r185320.
3792
3793         * platform/network/soup/DNSSoup.cpp:
3794         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
3795         (WebCore::DNSResolveQueue::platformResolve):
3796         (WebCore::gotProxySettingsCallback): Deleted.
3797         (WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.
3798
3799 2015-06-16  Gavin Barraclough  <barraclough@apple.com>
3800
3801         Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
3802         https://bugs.webkit.org/show_bug.cgi?id=146198
3803
3804         Unreviewed rollout.
3805
3806         * platform/network/DNSResolveQueue.cpp:
3807         (WebCore::DNSResolveQueue::DNSResolveQueue):
3808         (WebCore::DNSResolveQueue::isUsingProxy):
3809         (WebCore::DNSResolveQueue::add):
3810         (WebCore::DNSResolveQueue::timerFired):
3811         * platform/network/DNSResolveQueue.h:
3812         * platform/network/cf/DNSCFNet.cpp:
3813         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
3814         (WebCore::clientCallback):
3815         (WebCore::DNSResolveQueue::platformResolve):
3816         (WebCore::proxyIsEnabledInSystemPreferences): Deleted.
3817         (WebCore::isUsingProxy): Deleted.
3818         (WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.
3819         * platform/network/soup/DNSSoup.cpp:
3820
3821 2015-06-21  Alexey Proskuryakov  <ap@apple.com>
3822
3823         REGRESSION (r172975): navigator.language unable to tell region for Traditional Chinese users
3824         https://bugs.webkit.org/show_bug.cgi?id=146121
3825         rdar://problem/21395180
3826
3827         Reviewed by Darin Adler.
3828
3829         Revert to previous behavior, which is wrong in many ways, but not as wrong as the new one.
3830
3831         * platform/mac/Language.mm:
3832         (WebCore::httpStyleLanguageCode):
3833         (WebCore::platformUserPreferredLanguages):
3834         * platform/spi/cf/CFBundleSPI.h:
3835
3836 2015-06-19  Andy Estes  <aestes@apple.com>
3837
3838         Give Node::didNotifySubtreeInsertions() a better name
3839         https://bugs.webkit.org/show_bug.cgi?id=146170
3840
3841         Reviewed by Darin Adler.
3842
3843         didNotifySubtreeInsertions() is not a good name. It sounds like we are notifying the subtree insertions, which doesn't make sense.
3844
3845         This function is really about notifying the Node that the subtree it's a part of has finished being inserted into the DOM
3846         (i.e. all nodes have received their call to insertedInto()). Change the name to finishedInsertingSubtree() to better reflect this.
3847
3848         * dom/ContainerNode.cpp:
3849         (WebCore::ContainerNode::notifyChildInserted):
3850         * dom/ContainerNodeAlgorithms.h:
3851         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
3852         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
3853         * dom/Element.cpp:
3854         (WebCore::Element::addShadowRoot):
3855         * dom/Node.h:
3856         (WebCore::Node::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
3857         (WebCore::Node::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
3858         * dom/ScriptElement.cpp:
3859         (WebCore::ScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
3860         (WebCore::ScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
3861         * dom/ScriptElement.h:
3862         * html/HTMLFrameElementBase.cpp:
3863         (WebCore::HTMLFrameElementBase::insertedInto):
3864         (WebCore::HTMLFrameElementBase::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
3865         (WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
3866         * html/HTMLFrameElementBase.h:
3867         * html/HTMLScriptElement.cpp:
3868         (WebCore::HTMLScriptElement::insertedInto):
3869         (WebCore::HTMLScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
3870         (WebCore::HTMLScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
3871         * html/HTMLScriptElement.h:
3872         * svg/SVGFEImageElement.cpp:
3873         (WebCore::SVGFEImageElement::insertedInto):
3874         (WebCore::SVGFEImageElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
3875         (WebCore::SVGFEImageElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
3876         * svg/SVGFEImageElement.h:
3877         * svg/SVGMPathElement.cpp:
3878         (WebCore::SVGMPathElement::insertedInto):
3879         (WebCore::SVGMPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
3880         (WebCore::SVGMPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
3881         * svg/SVGMPathElement.h:
3882         * svg/SVGScriptElement.cpp:
3883         (WebCore::SVGScriptElement::insertedInto):
3884         (WebCore::SVGScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
3885         (WebCore::SVGScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
3886         * svg/SVGScriptElement.h:
3887         * svg/SVGTRefElement.cpp:
3888         (WebCore::SVGTRefElement::insertedInto):
3889         (WebCore::SVGTRefElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
3890         (WebCore::SVGTRefElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
3891         * svg/SVGTRefElement.h:
3892         * svg/SVGTextPathElement.cpp:
3893         (WebCore::SVGTextPathElement::insertedInto):
3894         (WebCore::SVGTextPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
3895         (WebCore::SVGTextPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
3896         * svg/SVGTextPathElement.h:
3897         * svg/animation/SVGSMILElement.cpp:
3898         (WebCore::SVGSMILElement::insertedInto):
3899         (WebCore::SVGSMILElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
3900         (WebCore::SVGSMILElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
3901         * svg/animation/SVGSMILElement.h:
3902
3903 2015-06-21  Philip Chimento  <philip.chimento@gmail.com>
3904
3905         libwebkit2gtk fails to link without opengl
3906         https://bugs.webkit.org/show_bug.cgi?id=138332
3907
3908         Reviewed by Carlos Garcia Campos.
3909
3910         * CMakeLists.txt: The third-party ANGLE directories need to be
3911         included even if ENABLE(GRAPHICS_CONTEXT_3D) is false. They must
3912         be included after the OpenGL headers as the comment says.
3913         * platform/graphics/texmap/BitmapTexturePool.cpp: Remove
3914         reference to no longer existent header file.
3915
3916 2015-06-20  Tim Horton  <timothy_horton@apple.com>
3917
3918         Deselection of text causes a noticeable jump on force touch machines
3919         https://bugs.webkit.org/show_bug.cgi?id=146173
3920         <rdar://problem/20992842>
3921
3922         Reviewed by Sam Weinig.
3923
3924         When we have a TextIndicator of type Crossfade, we end up putting
3925         a layer with the blue highlight + text painted into it on top of the
3926         content, and cross-fading that layer to the yellow-highlighted text.
3927
3928         This is necessary for BounceAndCrossfade TextIndicators, because the
3929         blue highlight has to bounce, but is not necessary for Crossfade-only
3930         ones; we can just fade in the yellow highlight on top of the
3931         existing blue page highlight, and all is well.
3932
3933         So, get rid of the Crossfade TextIndicator type and use FadeIn, separately
3934         keeping track of whether or not we can add a margin (we still can't
3935         add a margin to TextIndicators that indicate the page's current selection,
3936         because the blue highlight cannot have the margin applied to it, and we
3937         want the bounds to match exactly).
3938
3939         * page/TextIndicator.cpp:
3940         (WebCore::TextIndicator::createWithRange):
3941         If the range is the same as the selection, turn off the margin.
3942         We were previously doing this based on the presentation transition, but now
3943         there's no difference in presentation transition in this case.
3944
3945         (WebCore::TextIndicator::createWithSelectionInFrame):
3946         (WebCore::TextIndicator::wantsBounce):
3947         (WebCore::TextIndicator::wantsContentCrossfade):
3948         (WebCore::TextIndicator::wantsFadeIn):
3949         (WebCore::TextIndicator::wantsManualAnimation):
3950         * page/TextIndicator.h:
3951         Get rid of TextIndicatorPresentationTransition::Crossfade.
3952
3953         (WebCore::TextIndicator::setWantsMargin):
3954         (WebCore::TextIndicator::wantsMargin):
3955         Keep track of whether we want a margin.
3956
3957         * page/mac/TextIndicatorWindow.mm:
3958         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
3959         Determine if we should use a margin based on wantsMargin instead of the
3960         presentation transition.
3961
3962 2015-06-20  Ryuan Choi  <ryuan.choi@navercorp.com>
3963
3964         [EFL] Do not consider test directories when DEVELOPER_MODE is OFF
3965         https://bugs.webkit.org/show_bug.cgi?id=146171
3966
3967         Reviewed by Gyuyoung Kim.
3968
3969         * platform/efl/EflInspectorUtilities.cpp:
3970         (WebCore::inspectorResourcePath): Only used WEB_INSPECTOR_DIR which CMake decides properly.
3971
3972 2015-06-19  Michael Catanzaro  <mcatanzaro@igalia.com>
3973
3974         Fix absolute value warning in LocalizedStringsGtk.cpp
3975         https://bugs.webkit.org/show_bug.cgi?id=145919
3976
3977         Reviewed by Martin Robinson.
3978
3979         Use abs(static_cast<int>(time)) rather than static_cast<int>(abs(time)) to avoid clang's
3980         warnings about passing a float to abs() instead of std::abs(). Also, because casting an int
3981         to an int is silly.
3982
3983         * platform/gtk/LocalizedStringsGtk.cpp:
3984         (WebCore::localizedMediaTimeDescription):
3985
3986 2015-06-19  Devin Rousso  <drousso@apple.com>
3987
3988         Web Inspector: Highlight currently edited CSS selector
3989         https://bugs.webkit.org/show_bug.cgi?id=145658
3990
3991         Reviewed by Joseph Pecoraro.
3992
3993         Test: inspector/dom/highlight-multiple-shapes.html
3994
3995         * inspector/InspectorController.cpp:
3996         (WebCore::InspectorController::buildObjectForHighlightedNode):
3997         * inspector/InspectorController.h:
3998         * inspector/InspectorDOMAgent.cpp:
3999         (WebCore::InspectorDOMAgent::highlightSelector): Gets a list of all nodes matching a given selector string and highlights each of them.
4000         * inspector/InspectorDOMAgent.h:
4001         * inspector/InspectorOverlay.cpp:
4002         (WebCore::InspectorOverlay::hideHighlight):
4003         (WebCore::InspectorOverlay::highlightNodeList): Loops through a given NodeList to create highlightObjects for each of them.
4004         (WebCore::InspectorOverlay::shouldShowOverlay):
4005         (WebCore::buildObjectForElementData): Don't show flow fragments when highlighting multiple nodes.
4006         (WebCore::InspectorOverlay::buildHighlightObjectForNode):
4007         (WebCore::InspectorOverlay::buildObjectForHighlightedNode): Now returns an array containing the highlightObject for each highligthed node.
4008         (WebCore::InspectorOverlay::drawNodeHighlight): Now sends an array to the InspectorOverlayPage.js to provide support for highlighting multiple nodes.
4009         * inspector/InspectorOverlay.h:
4010         * inspector/InspectorOverlayPage.js: Now expects an array as its parameter and loops through it to highlight each node given.
4011         If the parameter array contains more than one element, do not draw the textbox containing info on that node.
4012         (drawNodeHighlight):
4013
4014 2015-06-19  Joseph Pecoraro  <pecoraro@apple.com>
4015
4016         Crash under WebCore::PageConsoleClient::addMessage attempting to log insecure content message in ImageDocument
4017         https://bugs.webkit.org/show_bug.cgi?id=146096
4018
4019         Reviewed by Timothy Hatcher.
4020
4021         Was able to reproduce this using a user stylesheet with an http css font
4022         on a pdf (ImageDocument) main document loaded over https. Was unable to
4023         create a reliable test for this scenario.
4024
4025         * page/PageConsoleClient.cpp:
4026         (WebCore::getParserLocationForConsoleMessage):