[Content Extensions] Remove memory page reporting
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-07-06  Alex Christensen  <achristensen@webkit.org>
2
3         [Content Extensions] Remove memory page reporting
4         https://bugs.webkit.org/show_bug.cgi?id=146659
5
6         Reviewed by Benjamin Poulain.
7
8         * contentextensions/CompiledContentExtension.cpp:
9         (WebCore::ContentExtensions::CompiledContentExtension::~CompiledContentExtension):
10         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
11         * contentextensions/CompiledContentExtension.h:
12         * contentextensions/ContentExtension.cpp:
13         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
14         * contentextensions/ContentExtension.h:
15         (WebCore::ContentExtensions::ContentExtension::compiledExtension):
16         * contentextensions/ContentExtensionsBackend.cpp:
17         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
18         * contentextensions/DFABytecodeInterpreter.cpp:
19         (WebCore::ContentExtensions::getBits):
20         (WebCore::ContentExtensions::getInstruction):
21         (WebCore::ContentExtensions::jumpSizeInBytes):
22         (WebCore::ContentExtensions::getJumpSize):
23         (WebCore::ContentExtensions::getJumpDistance):
24         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
25         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
26         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
27         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
28         * contentextensions/DFABytecodeInterpreter.h:
29         Don't keep track of memory page usage.  It wasn't even correct anyways.
30
31 2015-07-06  Alex Christensen  <achristensen@webkit.org>
32
33         [Content Extensions] Increase maxNFASize
34         https://bugs.webkit.org/show_bug.cgi?id=146656
35
36         Reviewed by Benjamin Poulain.
37
38         Because of memory improvements in r186375, r186374, and r186079,
39         we can now increase the maximum number of NFA nodes in order to avoid
40         long compile times of some large, complicated content blockers.
41         This also improves the interpreting time of content blockers.
42
43         * contentextensions/ContentExtensionCompiler.cpp:
44         (WebCore::ContentExtensions::compileRuleList):
45         Increase maxNFASize to 75000 to avoid long compile times.
46
47 2015-07-06  Dean Jackson  <dino@apple.com>
48
49         Memory corruption in WebGLRenderingContext::simulateVertexAttrib0
50         https://bugs.webkit.org/show_bug.cgi?id=146652
51         <rdar://problem/21567767>
52
53         Reviewed by Brent Fulgham.
54
55         The expression "(numVertex + 1) * 4 * sizeof(GC3Dfloat)" could potentially
56         overflow. Make it use checked arithmetic.
57
58         I couldn't make a test case that reliably exercised this.
59
60         * html/canvas/WebGLRenderingContextBase.cpp:
61         (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0): Used Checked<GC3Dsizeiptr>
62         for calculating the size of the buffer.
63
64 2015-07-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
65
66         [Mac] REGRESSION: (r181403) Enter/Exit full screen on 1x secondary display plugged into 2x Mac displays WebView as 1/4 size during transition
67         https://bugs.webkit.org/show_bug.cgi?id=146651
68
69         Reviewed by Simon Fraser.
70
71         * platform/mac/WebCoreFullScreenPlaceholderView.mm: set layerContentsPlacement
72         to NSViewLayerContentsPlacementScaleProportionallyToFit so AppKit resizes the
73         content CALayer to fit in the WebView.
74
75 2015-07-06  Benjamin Poulain  <benjamin@webkit.org>
76
77         Reduce the memory usage of the prefix tree
78         https://bugs.webkit.org/show_bug.cgi?id=146615
79
80         Reviewed by Sam Weinig.
81
82         This patch introduces two little changes that reduces the size
83         of the prefix tree by about 40%.
84
85         First, the Terms are interned. The new class CombinedFiltersAlphabet
86         takes care of keeping a unique version of each term for use
87         by the CombinedURLFilters.
88
89         Since each Term is fairly big but we have a small number of
90         unique term, we significantly reduce the edge size.
91
92         Second, the actions are no longer stored on each Vertex.
93         They are now stored on the side, in a HashMap indexed by
94         their Vertex.
95
96         This works well because the Actions are sparse over the tree.
97         Typically, only the leaves have actions. Internal vertices
98         sometime get actions but that's uncommon.
99
100         ---
101
102         The next step to reduce the memory footprint would be to
103         make PrefixTreeVertex into a custom packed structure instead
104         of using a Vector.
105
106         Such change is very invasive and more error prone so I decided
107         against it for this patch.
108
109         * WebCore.xcodeproj/project.pbxproj:
110         * contentextensions/CombinedFiltersAlphabet.cpp: Copied from Source/WebCore/contentextensions/CombinedURLFilters.h.
111         (WebCore::ContentExtensions::TermCreatorTranslator::hash):
112         (WebCore::ContentExtensions::TermCreatorTranslator::equal):
113         (WebCore::ContentExtensions::TermCreatorTranslator::translate):
114         (WebCore::ContentExtensions::CombinedFiltersAlphabet::interned):
115         (WebCore::ContentExtensions::CombinedFiltersAlphabet::memoryUsed):
116         * contentextensions/CombinedFiltersAlphabet.h: Copied from Source/WebCore/contentextensions/CombinedURLFilters.h.
117         (WebCore::ContentExtensions::CombinedFiltersAlphabet::TermPointerHash::hash):
118         (WebCore::ContentExtensions::CombinedFiltersAlphabet::TermPointerHash::equal):
119         * contentextensions/CombinedURLFilters.cpp:
120         (WebCore::ContentExtensions::recursiveMemoryUsed):
121         (WebCore::ContentExtensions::CombinedURLFilters::memoryUsed):
122         (WebCore::ContentExtensions::prefixTreeVertexToString):
123         (WebCore::ContentExtensions::recursivePrint):
124         (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
125         (WebCore::ContentExtensions::generateNFAForSubtree):
126         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
127         * contentextensions/CombinedURLFilters.h:
128         * contentextensions/ContentExtensionsDebugging.h:
129         * contentextensions/Term.h:
130         (WebCore::ContentExtensions::Term::isValid):
131         (WebCore::ContentExtensions::Term::destroy):
132         (WebCore::ContentExtensions::Term::memoryUsed):
133         (WebCore::ContentExtensions::Term::toString): Deleted.
134         (WebCore::ContentExtensions::TermHash::hash): Deleted.
135         (WebCore::ContentExtensions::TermHash::equal): Deleted.
136         (WebCore::ContentExtensions::Term::Term): Deleted.
137         (WebCore::ContentExtensions::Term::isKnownToMatchAnyString): Deleted.
138         (WebCore::ContentExtensions::Term::hasFixedLength): Deleted.
139         (WebCore::ContentExtensions::Term::operator==): Deleted.
140         (WebCore::ContentExtensions::Term::hash): Deleted.
141         (WebCore::ContentExtensions::Term::isDeletedValue): Deleted.
142         (WebCore::ContentExtensions::Term::isUniversalTransition): Deleted.
143         (WebCore::ContentExtensions::Term::generateSubgraphForAtom): Deleted.
144
145 2015-07-06  Benjamin Poulain  <benjamin@webkit.org>
146
147         [Content Extensions] Make the DFA transitions ranges instead of characters
148         https://bugs.webkit.org/show_bug.cgi?id=146575
149
150         Reviewed by Alex Christensen.
151
152         This patch changes the DFA and code using the DFA to use ranges
153         to represent the transitions between any two nodes.
154
155         This patch builds on top of the tools introduced in r186079.
156
157         The DFA structure is basically the same as ImmutableNFA but without
158         any epsilon transitions.
159
160         This patch introduces a transition iterator to make the DFA
161         compatible with the existing algorithms.
162
163         ---
164
165         The DFA combiner is rebuilt on top of MutableRangeList. Combining the transitions
166         of two nodes is one by merging the range list of each not into a common
167         MutableRangeList.
168         The data converter takes care of creating the signature of the combination.
169
170         The code got simpler since MutableRangeList does most of the work now. It is also
171         much faster.
172
173         ---
174
175         The minimizer is more intersting.
176
177         With the current algorithm, we cannot resolve overlaps between ranges. On the other
178         hand, the minimizer does not care about the symbol of the transitions if we are careful
179         to partition transitions of the same symbol together.
180
181         What I did was to turn the minimizer into a pure transition based one, BUT each
182         "symbol" is actually an unbreakable range.
183
184         The first step is to go over all the transitions of all the nodes and find the largest
185         ranges such that the alphabet of interest is covered but there is not a single intersection
186         between any two nodes (what I called "singular transitions" in the code). 
187
188         This can be done efficiently with MutableRangeList.
189         A little trick there is that I also used the converter to count how many real transition
190         overlaps any singular transition.
191
192         Those singular transitions become the alphabet of our minimizer. The "symbol" of our alphabet
193         is simply the position of the singular transition in the list.
194
195         The partition of transition is created by populating each set with all the transition that
196         overlaps the symbols.
197         Note that since the partition is created on the fly, the Transition structure used for
198         repartitioning only contains the source of the transitions.
199
200         Once our transition parition has been carefuly created, we can completely forget about
201         the symbols and only work with subsets.
202
203         Since the singular transitions have no overlap (unlike fallback transitions), this new minimizer
204         will find the minimial solution for well formed input.
205
206         * WebCore.xcodeproj/project.pbxproj:
207         * contentextensions/DFA.cpp:
208         (WebCore::ContentExtensions::DFA::memoryUsed):
209         (WebCore::ContentExtensions::printTransitions):
210         (WebCore::ContentExtensions::DFANode::actions): Deleted.
211         (WebCore::ContentExtensions::DFANode::transitions): Deleted.
212         (WebCore::ContentExtensions::DFANode::fallbackTransitionDestination): Deleted.
213         (WebCore::ContentExtensions::DFANode::changeFallbackTransition): Deleted.
214         (WebCore::ContentExtensions::DFANode::addFallbackTransition): Deleted.
215         (WebCore::ContentExtensions::DFANode::containsTransition): Deleted.
216         (WebCore::ContentExtensions::DFANode::kill): Deleted.
217         (WebCore::ContentExtensions::DFA::debugPrintDot): Deleted.
218         * contentextensions/DFA.h:
219         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::range):
220         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::target):
221         (WebCore::ContentExtensions::DFANode::RangeIterator::range):
222         (WebCore::ContentExtensions::DFANode::RangeIterator::target):
223         (WebCore::ContentExtensions::DFANode::RangeIterator::resetTarget):
224         * contentextensions/DFABytecodeCompiler.cpp:
225         (WebCore::ContentExtensions::DFABytecodeCompiler::ranges):
226         (WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize):
227         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
228         * contentextensions/DFACombiner.cpp:
229         (WebCore::ContentExtensions::DFAMerger::TargetConverter::convert):
230         (WebCore::ContentExtensions::DFAMerger::TargetConverter::extend):
231         (WebCore::ContentExtensions::DFAMerger::TargetConverter::setHalfSignature):
232         (WebCore::ContentExtensions::DFAMerger::merge):
233         (WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode):
234         (WebCore::ContentExtensions::DFAMerger::setHalfSignature): Deleted.
235         (WebCore::ContentExtensions::DFAMerger::populateTransitions): Deleted.
236         (WebCore::ContentExtensions::DFAMerger::populateFromFallbackTransitions): Deleted.
237         (WebCore::ContentExtensions::DFAMerger::createTransitions): Deleted.
238         (WebCore::ContentExtensions::DFAMerger::createFallbackTransitionIfNeeded): Deleted.
239         * contentextensions/DFAMinimizer.cpp:
240         (WebCore::ContentExtensions::DFAMinimizer::minimize):
241         * contentextensions/DFANode.cpp: Added.
242         (WebCore::ContentExtensions::DFANode::actions):
243         (WebCore::ContentExtensions::DFANode::containsTransition):
244         (WebCore::ContentExtensions::DFANode::kill):
245         (WebCore::ContentExtensions::DFANode::canUseFallbackTransition):
246         (WebCore::ContentExtensions::DFANode::bestFallbackTarget):
247         * contentextensions/DFANode.h:
248         (WebCore::ContentExtensions::CharRange::size):
249         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator*):
250         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator==):
251         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator!=):
252         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator++):
253         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::first):
254         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::last):
255         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::data):
256         (WebCore::ContentExtensions::DFANode::IterableConstRange::begin):
257         (WebCore::ContentExtensions::DFANode::IterableConstRange::end):
258         (WebCore::ContentExtensions::DFANode::transitions):
259         (WebCore::ContentExtensions::DFANode::RangeIterator::operator*):
260         (WebCore::ContentExtensions::DFANode::RangeIterator::operator==):
261         (WebCore::ContentExtensions::DFANode::RangeIterator::operator!=):
262         (WebCore::ContentExtensions::DFANode::RangeIterator::operator++):
263         (WebCore::ContentExtensions::DFANode::RangeIterator::first):
264         (WebCore::ContentExtensions::DFANode::RangeIterator::last):
265         (WebCore::ContentExtensions::DFANode::RangeIterator::data):
266         (WebCore::ContentExtensions::DFANode::IterableRange::begin):
267         (WebCore::ContentExtensions::DFANode::IterableRange::end):
268         (WebCore::ContentExtensions::DFANode::hasFallbackTransition): Deleted.
269         (WebCore::ContentExtensions::DFANode::transitionsLength): Deleted.
270         (WebCore::ContentExtensions::DFANode::transitionsStart): Deleted.
271         (WebCore::ContentExtensions::DFANode::resetTransitions): Deleted.
272         (WebCore::ContentExtensions::DFANode::setHasFallbackTransitionWithoutChangingDFA): Deleted.
273         * contentextensions/ImmutableNFA.h:
274         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::first):
275         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::last):
276         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::data):
277         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::range):
278         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator*): Deleted.
279         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator->): Deleted.
280         * contentextensions/ImmutableNFANodeBuilder.h:
281         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::first):
282         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::last):
283         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator*): Deleted.
284         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator->): Deleted.
285         * contentextensions/MutableRange.h:
286         (WebCore::ContentExtensions::MutableRange::size): Deleted.
287         * contentextensions/MutableRangeList.h:
288         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::first):
289         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::last):
290         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::data):
291         (WebCore::ContentExtensions::MutableRangeList::extend):
292         (WebCore::ContentExtensions::MutableRangeList::size):
293         (WebCore::ContentExtensions::MutableRangeList::initializeFrom):
294         * contentextensions/NFAToDFA.cpp:
295         (WebCore::ContentExtensions::NFAToDFA::convert):
296         (WebCore::ContentExtensions::canUseFallbackTransition): Deleted.
297         (WebCore::ContentExtensions::findBestFallbackTarget): Deleted.
298
299 2015-07-06  Timothy Hatcher  <timothy@apple.com>
300
301         Fix ASSERT causing crashes in Inspector tests on the bots.
302
303         * inspector/InspectorPageAgent.cpp:
304         (WebCore::InspectorPageAgent::enable): Reset stopwatch before starting it.
305
306 2015-07-06  Brady Eidson  <beidson@apple.com>
307
308         Remove unused "m_isPrivate" flag on NetworkStorageSession.
309         https://bugs.webkit.org/show_bug.cgi?id=146648
310
311         Reviewed by Alex Christensen.
312
313         No new tests (No behavior change).
314
315         * platform/network/NetworkStorageSession.h:
316         (WebCore::NetworkStorageSession::isPrivateBrowsingSession): Deleted.
317
318         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
319         (WebCore::NetworkStorageSession::NetworkStorageSession): Deleted.
320         (WebCore::NetworkStorageSession::createPrivateBrowsingSession): Deleted.
321
322         * platform/network/soup/NetworkStorageSessionSoup.cpp:
323         (WebCore::NetworkStorageSession::NetworkStorageSession): Deleted.
324         (WebCore::NetworkStorageSession::createPrivateBrowsingSession): Deleted.
325
326 2015-07-04  Timothy Hatcher  <timothy@apple.com>
327
328         Web Inspector: Add a dedicated Network tab that is always live
329         https://bugs.webkit.org/show_bug.cgi?id=146568
330
331         Make sure the executionStopwatch is always started and never stops so resource loads
332         always get timestamps, even when Timeline is not recording.
333
334         Reviewed by Joseph Pecoraro.
335
336         * inspector/InspectorPageAgent.cpp:
337         (WebCore::InspectorPageAgent::enable): Start executionStopwatch.
338         (WebCore::InspectorPageAgent::frameStartedLoading): Reset and start executionStopwatch.
339         * inspector/InspectorTimelineAgent.cpp:
340         (WebCore::InspectorTimelineAgent::internalStart): Removed executionStopwatch code.
341         (WebCore::InspectorTimelineAgent::internalStop): Ditto.
342
343 2015-07-02  Timothy Hatcher  <timothy@apple.com>
344
345         Update the localized strings file.
346
347         * English.lproj/Localizable.strings: Updated with the script.
348
349 2015-07-06  Zalan Bujtas  <zalan@apple.com>
350
351         Crash: LayoutState root's container is nullptr when the layout root is detached.
352         https://bugs.webkit.org/show_bug.cgi?id=146646
353         rdar://problem/21371544
354
355         Reviewed by Simon Fraser.
356
357         This is a speculative fix to ensure that when the root of the LayoutState is detached
358         we don't try to access its container (nullptr).
359         This is related to trac.webkit.org/r185484.
360
361         Not reproducible.
362
363         * rendering/LayoutState.cpp:
364         (WebCore::LayoutState::LayoutState):
365         * rendering/LayoutState.h:
366         (WebCore::LayoutState::LayoutState): Deleted.
367
368 2015-07-06  Eric Carlson  <eric.carlson@apple.com>
369
370         [Mac] Inactive AirPlay route should automatically timeout
371         https://bugs.webkit.org/show_bug.cgi?id=146642
372         <rdar://problem/21602955>
373
374         Automatically clear a media element's AirPlay connection after it has been paused
375         for 60 minutes, or after 8 minutes if it played to the end before pausing.
376
377         Reviewed by Brent Fulgham.
378
379         * Modules/mediasession/WebMediaSessionManager.cpp:
380         (WebCore::WebMediaSessionManager::WebMediaSessionManager): Initialize m_watchdogTimer.
381         (WebCore::WebMediaSessionManager::clientStateDidChange): Schedule watchdog timer configuration
382           if the client started playing or paused.
383         (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Schedule watchdog timer configuration.
384         (WebCore::WebMediaSessionManager::toString): Print watchdog configuration flag.
385         (WebCore::WebMediaSessionManager::taskTimerFired): Call configureWatchdogTimer.
386         (WebCore::WebMediaSessionManager::configureWatchdogTimer): New, start or stop watchdog timer.
387         (WebCore::WebMediaSessionManager::watchdogTimerFired): Stop monitoring for targets, which 
388           clears the route.
389         * Modules/mediasession/WebMediaSessionManager.h:
390
391         * html/HTMLMediaElement.cpp:
392         (WebCore::HTMLMediaElement::mediaState): Set DidPlayToEnd when appropriate.
393
394         * page/MediaProducer.h: Add DidPlayToEnd.
395
396         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
397         (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Clear m_client, call
398           stopMonitoringPlaybackTargets.
399         (WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Send a neutered 
400           MediaPlaybackTarget when m_outputDeviceMenuController is NULL.
401         (WebCore::MediaPlaybackTargetPickerMac::devicePicker): Add logging.
402         (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets): Clear the menu
403           controller to cancel the route.
404
405 2015-07-06  Zan Dobersek  <zdobersek@igalia.com>
406
407         [GTK] Fix build errors with OpenGL ES
408         https://bugs.webkit.org/show_bug.cgi?id=146626
409
410         Reviewed by Carlos Garcia Campos.
411
412         * platform/graphics/ANGLEWebKitBridge.h: Include <GLES2/gl2.h>
413         when building with OpenGL ES 2 support enabled.
414         (WebCore::ANGLEShaderSymbol::isSampler): Don't test for
415         OpenGL-specific GL_SAMPLER_2D_RECT_ARB value when OpenGL ES 2
416         support is enabled.
417
418 2015-07-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
419
420         [Streams API] Remove ReadableStream custom constructor
421         https://bugs.webkit.org/show_bug.cgi?id=146547
422
423         Reviewed by Darin Adler.
424
425         Removed custom binding.
426         Made use of Dictionary in lieu of JSObject to reduce readable stream constructor parameter parsing.
427         Added support for passing ExecState to construtor within binding generator.
428
429         No change in behavior.
430
431         * Modules/streams/ReadableStream.cpp:
432         (WebCore::ReadableStream::create):
433         * Modules/streams/ReadableStream.h:
434         (WebCore::ReadableStream::create):
435         * Modules/streams/ReadableStream.idl:
436         * bindings/js/JSDictionary.cpp:
437         (WebCore::JSDictionary::convertValue):
438         * bindings/js/JSDictionary.h:
439         * bindings/js/JSReadableStreamCustom.cpp:
440         * bindings/js/ReadableJSStream.cpp:
441         (WebCore::ReadableJSStream::create):
442         (WebCore::ReadableJSStream::ReadableJSStream):
443         * bindings/js/ReadableJSStream.h:
444         * bindings/scripts/CodeGeneratorJS.pm:
445         (GenerateConstructorDefinition):
446         * bindings/scripts/IDLAttributes.txt:
447
448 2015-07-06  Youenn Fablet  <youenn.fablet@crf.canon.fr>
449
450         Promise-returning functions should reject promises if the callee is not of the expected type
451         https://bugs.webkit.org/show_bug.cgi?id=146585
452
453         Reviewed by Darin Adler.
454
455         Updated binding generator to reject promise in case the casting of the thisValue is not working properly
456         (i.e. the callee is not wrapping a DOM object of the expected class.
457
458         Covered by rebased test and binding expectations.
459
460         * bindings/js/JSDOMPromise.h:
461         (WebCore::callPromiseFunction): Removed wrapper class parameter.
462         * bindings/scripts/CodeGeneratorJS.pm:
463         (GenerateImplementation):
464         * bindings/scripts/test/JS/JSTestObj.cpp: Updated binding expectations.
465         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
466         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
467         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
468         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
469         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
470         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
471         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
472         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
473
474 2015-07-05  Chris Dumez  <cdumez@apple.com>
475
476         [WK2] Current page's scroll position is lost when transferring sessionState from one view to another
477         https://bugs.webkit.org/show_bug.cgi?id=146625
478         <rdar://problem/21585268>
479
480         Reviewed by Gavin Barraclough.
481
482         Export HistoryController:saveScrollPositionAndViewStateToItem()
483         so that it can be called from WebKit2.
484
485         * loader/HistoryController.h:
486
487 2015-07-05  Simon Fraser  <simon.fraser@apple.com>
488
489         REGRESSION (r180582): background-attachment: local; does not scroll the background image when scrolling the the element's contents
490         https://bugs.webkit.org/show_bug.cgi?id=146623
491
492         Reviewed by Zalan Bujtas.
493         
494         r180582 erroneously asserted that m_destOrigin in BackgroundImageGeometry was unused.
495         However, it is needed to compute the correct phase when the destination rect is
496         altered by clipping.
497
498         Test: fast/backgrounds/background-attachment-local.html
499
500         * rendering/RenderBoxModelObject.cpp:
501         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
502         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
503         * rendering/RenderBoxModelObject.h:
504         (WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
505         (WebCore::BackgroundImageGeometry::relativePhase):
506         * rendering/svg/RenderSVGResourceMasker.cpp:
507         (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
508
509 2015-07-05  Chris Dumez  <cdumez@apple.com>
510
511         [WK2] WebBackForwardListItems' pageState is not kept up-to-date
512         https://bugs.webkit.org/show_bug.cgi?id=146614
513         <rdar://problem/21585268>
514
515         Reviewed by Gavin Barraclough.
516
517         WebBackForwardListItems' pageState on UIProcess-side were not kept
518         up-to-date when it was updated on WebContent process side. This meant
519         that we were losing the scroll position (among other things) when
520         transferring the session state over from one view to another.
521
522         We now call notifyHistoryItemChanged(item) after saving the scroll
523         position and the view state on the HistoryItem. As a result, the
524         WebBackForwardListProxy will send the updated pageState to the
525         UIProcess.
526
527         * history/HistoryItem.cpp:
528         (WebCore::HistoryItem::notifyChanged):
529         * history/HistoryItem.h:
530         * loader/HistoryController.cpp:
531         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
532
533 2015-07-04  Chris Dumez  <cdumez@apple.com>
534
535         Unreviewed Windows build fix after r186279.
536
537         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
538         (WebCore::AVFWrapper::destroyVideoLayer):
539         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
540         (WebCore::CACFLayerTreeHost::destroyRenderer):
541
542 2015-07-04  Chris Dumez  <cdumez@apple.com>
543
544         Drop RefPtr::clear() method
545         https://bugs.webkit.org/show_bug.cgi?id=146556
546
547         Reviewed by Brady Eidson.
548
549         Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
550
551 2015-07-03  Dan Bernstein  <mitz@apple.com>
552
553         Fixed the iOS 8 build.
554
555         * editing/cocoa/HTMLConverter.mm:
556
557 2015-07-03  Chris Dumez  <cdumez@apple.com>
558
559         REGRESSION (r178097): HTMLSelectElement.add(option, undefined) prepends option to the list of options; should append to the end of the list of options
560         https://bugs.webkit.org/show_bug.cgi?id=146566
561         <rdar://problem/21663919>
562
563         Reviewed by Ryosuke Niwa.
564
565         HTMLSelectElement.add(X, undefined) is supposed to be equivalent to
566         HTMLSelectElement.add(X) which should *append* X. The same is true
567         for HTMLOptionsCollection.add(X, undefined).
568
569         However, due to a bug in our bindings generator for overloaded
570         operations, the actual behavior was not the expected one. The
571         second overload would be chosen: add(X, index) and undefined would
572         be converted as 0-index, which would *prepend* X.
573
574         This patch fixes the bindings generator so that undefined is allowed
575         for optional parameters of an overload operation, when doing the
576         overload resolution.
577
578         Tests:
579         - fast/dom/HTMLSelectElement/add.html
580         - fast/dom/HTMLSelectElement/options-collection-add.html
581         - http/tests/websocket/tests/hybi/undefined-protocol.html
582
583         * bindings/scripts/CodeGeneratorJS.pm:
584         (GenerateParametersCheckExpression):
585         Allow undefined value for optional parameters when doing the overload
586         resolution.
587
588         * bindings/scripts/test/JS/JSTestObj.cpp:
589         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
590         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
591         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
592         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter):
593         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
594         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors):
595         * bindings/scripts/test/TestObj.idl:
596         Add bindings tests coverage and rebaseline.
597
598 2015-07-03  Dan Bernstein  <mitz@apple.com>
599
600         Fixed the Mavericks build after r186236.
601
602         * loader/cache/CachedResource.h:
603         (WebCore::CachedResource::url): Removed the export macro from this inline function.
604
605 2015-07-03  Dan Bernstein  <mitz@apple.com>
606
607         Tried to fix the iOS build.
608
609         * bridge/objc/objc_class.mm:
610         (JSC::Bindings::ObjcClass::fieldNamed):
611
612 2015-07-03  Dan Bernstein  <mitz@apple.com>
613
614         Tried to fix the iOS build.
615
616         * editing/cocoa/HTMLConverter.mm:
617
618 2015-07-03  Dan Bernstein  <mitz@apple.com>
619
620         Tried to fix the iOS build.
621
622         * page/FrameView.cpp:
623         (WebCore::FrameView::calculateExtendedBackgroundMode):
624
625 2015-07-03  Dan Bernstein  <mitz@apple.com>
626
627         [Xcode] Update some build settings as recommended by Xcode 7
628         https://bugs.webkit.org/show_bug.cgi?id=146597
629
630         Reviewed by Sam Weinig.
631
632         * Configurations/Base.xcconfig: Enabled CLANG_WARN_UNREACHABLE_CODE,
633         GCC_WARN_UNDECLARED_SELECTOR, and GCC_NO_COMMON_BLOCKS. Removed GCC_MODEL_TUNING.
634
635         * WebCore.xcodeproj/project.pbxproj: Updated LastUpgradeCheck. Disabled -Wunreachable-code
636         for two bison-generated source files. Updated for rename of WebScriptObject.h.
637
638         * bindings/objc/WebScriptObject.mm:
639         (-[WebUndefined dealloc]): Removed unreachable code and suppressed warning about not calling
640         super.
641         * bridge/objc/WebScriptObject.h: Renamed to WebScriptObjectProtocol.h to enabled inlcuding
642         the other WebScriptObject.h.
643         * bridge/objc/WebScriptObjectProtocol.h: Renamed from WebScriptObject.h.
644
645         * bridge/objc/objc_class.mm: Updated for rename and included WebScriptObject.h because we
646         use selectors declared in that file.
647
648         * bridge/objc/objc_instance.mm: Ditto.
649         (ObjCRuntimeMethod::create): Resolved ambiguity between JSC::JSValue and the Objective-C
650         JSValue class.
651         (ObjCRuntimeMethod::createStructure): Ditto.
652         (ObjcInstance::invokeMethod): Ditto.
653         (ObjcInstance::invokeObjcMethod): Ditto.
654         (ObjcInstance::invokeDefaultMethod): Ditto.
655         (ObjcInstance::setValueOfUndefinedField): Ditto.
656         (ObjcInstance::getValueOfUndefinedField): Ditto.
657         (ObjcInstance::defaultValue): Ditto.
658         (ObjcInstance::stringValue): Ditto.
659         (ObjcInstance::numberValue): Ditto.
660         (ObjcInstance::booleanValue): Ditto.
661         (ObjcInstance::valueOf): Ditto,
662
663         * bridge/objc/objc_runtime.h: Moved definition of isFallbackMethod() from here to the
664         implementation.
665         * bridge/objc/objc_runtime.mm: Updated for rename and included WebScriptObject.h because we
666         use selectors declared in that file.
667         (JSC::Bindings::ObjcMethod::isFallbackMethod): Moved definition from the header to here.
668
669         * bridge/objc/objc_utility.mm: Updated for rename.
670
671         * cssjit/SelectorCompiler.cpp:
672         (WebCore::SelectorCompiler::addScrollbarPseudoClassType): Removed unreachable code.
673
674         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
675         Added declarations to the WebCoreMovieObserver interface.
676         (WebCore::MediaPlayerPrivateQTKit::disableUnsupportedTracks): Suppressed
677         -Wundeclared-selector around invocation of a selector that is not declared anywhere.
678
679 2015-07-03  Kyounga Ra  <kyounga@alticast.com>
680
681         Memory leak for a protected Element having pending events in ImageLoader. 
682         https://bugs.webkit.org/show_bug.cgi?id=146538
683
684         Reviewed by Brady Eidson.
685
686         If ImageLoader is destroyed before an active derefElementTimer is fired, protected element's refCount never be zero..
687
688         * loader/ImageLoader.cpp:
689         (WebCore::ImageLoader::~ImageLoader):
690         (WebCore::ImageLoader::updateFromElement):
691         (WebCore::ImageLoader::updateRenderer):
692         (WebCore::ImageLoader::updatedHasPendingEvent):
693         (WebCore::ImageLoader::timerFired):
694         * loader/ImageLoader.h:
695
696 2015-07-03  Daniel Bates  <dabates@apple.com>
697
698         REGRESSION (r178097): JavaScript TypeError after clicking on compose button in Yahoo Mail
699         https://bugs.webkit.org/show_bug.cgi?id=146515
700         <rdar://problem/21348421>
701
702         Reviewed by Chris Dumez.
703
704         Fixes an issue where extra arguments passed to a Web IDL overloaded function, whose implementation
705         is generated by the bindings generator script, are not ignored as per the note in section "Interface object [[Call]] method"
706         of the Web IDL spec, <http://www.w3.org/TR/2012/CR-WebIDL-20120419/> (19 April 2012).
707
708         Currently for an overloaded function the JavaScript bindings generator script emits code to
709         throw a TypeError when it cannot find a candidate function that takes the same number of
710         arguments as passed by a caller. Prior to the change made in bug #139179 (r178097), the
711         bindings code for HTMLSelectElement.add() was written by hand and ignored extra arguments
712         that were passed to it. Following this change, the bindings code for HTMLSelectElement.add()
713         is generated by the bindings generator script. Therefore, we throw a TypeError when Yahoo Mail
714         calls HTMLSelectElement.add() with extra arguments because the code emitted by the bindings
715         generator script does not ignore them.
716
717         * bindings/scripts/CodeGeneratorJS.pm:
718         (LengthOfLongestFunctionParameterList): Added. Computes the length of longest overload parameter list.
719         (GenerateOverloadedFunction): Emit code that ignores more arguments than LengthOfLongestFunctionParameterList().
720         (GenerateOverloadedConstructorDefinition): Ditto.
721         * bindings/scripts/test/JS/JSTestObj.cpp:
722         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12): Added; expected result for an overloaded
723         function that takes a variadic number of Blob elements.
724         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): Update expected result. The added
725         if-conditional expression for the IDL declaration overloadedMethod(Blob... blobArgs) is empty
726         because we do not support overloading of functions with variadic arguments.
727         (WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
728         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
729         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors5): Added; expected
730         result for an overloaded constructors that takes a variadic number of long arguments.
731         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors): Update expected
732         result. The added if-conditional expression for the IDL declaration Constructor(long... longArgs) is empty
733         because we do not support overloading of constructors with variadic arguments.
734         * bindings/scripts/test/TestObj.idl: Added declaration overloadedMethod(Blob...). Also fixed
735         typo in license block text.
736         * bindings/scripts/test/TestOverloadedConstructors.idl: Added declaration Constructor(long... longArgs).
737         Also fixed typo in license block text.
738
739 2015-07-03  Mario Sanchez Prada  <mario@endlessm.com>
740
741         Crash on xLarge memory allocation using bmalloc on 32bit systems
742         https://bugs.webkit.org/show_bug.cgi?id=146440
743
744         Reviewed by Gustavo Noronha Silva.
745
746         Disable the gcc's -ftree-sra optimization (automatically enabled
747         with -O1 and higher levels) for WebCore and 32bit Intel architectures,
748         as that causes the crash in bmalloc when allocating large amounts of
749         memory from the texture mapper's tiled backing store implementation.
750
751         * CMakeLists.txt: Pass -fno-free-sra to gcc on 32bit Intel architectures.
752
753 2015-07-03  Csaba Osztrogonác  <ossy@webkit.org>
754
755         Fix the !ENABLE(VIDEO) build after r186054
756         https://bugs.webkit.org/show_bug.cgi?id=146592
757
758         Reviewed by Eric Carlson.
759
760         * platform/MemoryPressureHandler.cpp:
761         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
762
763 2015-07-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
764
765         [Streams API] Remove ReadableStream and Reader cancel() custom binding
766         https://bugs.webkit.org/show_bug.cgi?id=146458
767
768         Reviewed by Darin Adler.
769
770         Removed stream and reader cancel custom binding.
771         Updated binding generator to correctly handle promise-based APIs with optional parameters.
772
773         No behavior changes.
774
775         * Modules/streams/ReadableStream.idl: Removed custom
776         * Modules/streams/ReadableStreamReader.idl: Ditto.
777         * bindings/js/JSReadableStreamCustom.cpp:
778         (WebCore::JSReadableStream::cancel): Deleted.
779         * bindings/js/JSReadableStreamReaderCustom.cpp:
780         (WebCore::JSReadableStreamReader::cancel): Deleted.
781         * bindings/scripts/CodeGeneratorJS.pm: Handling of promise parameter in case of optional arguments.
782         (GenerateParametersCheck):
783         (GenerateReturnParameters): Utility function to generate return parameters (exception and promise).
784         * bindings/scripts/test/JS/JSTestObj.cpp:
785         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
786         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
787         * bindings/scripts/test/TestObj.idl:
788
789
790 2015-07-02  Doug Russell  <d_russell@apple.com>
791
792         AX: Selection change as a result of focusing an element should include that 
793         information in the intent
794         https://bugs.webkit.org/show_bug.cgi?id=146533
795
796         Reviewed by Chris Fleizach.
797
798         Added focusChange flag to AXTextStateChangeIntent.
799         Added intent support to selection logic called by Element::updateFocusAppearance().
800         Added NSAccessibilityTextSelectionChangedFocus to mac notifications.
801
802         Test: platform/mac/accessibility/selection-notification-focus-change.html
803
804         * accessibility/AXObjectCache.cpp:
805         (WebCore::AXObjectCache::postTextStateChangeNotification):
806         * accessibility/AXTextStateChangeIntent.h:
807         * accessibility/AccessibilityRenderObject.cpp:
808         (WebCore::setTextSelectionIntent):
809         (WebCore::AccessibilityRenderObject::setFocused):
810         * accessibility/mac/AXObjectCacheMac.mm:
811         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
812         * dom/Element.cpp:
813         (WebCore::Element::updateFocusAppearance):
814         * dom/Element.h:
815         (WebCore::Element::defaultFocusTextStateChangeIntent):
816         * editing/FrameSelection.cpp:
817         (WebCore::FrameSelection::moveWithoutValidationTo):
818         (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
819         (WebCore::FrameSelection::selectAll):
820         * editing/FrameSelection.h:
821         * html/HTMLInputElement.cpp:
822         (WebCore::HTMLInputElement::updateFocusAppearance):
823         * html/HTMLTextAreaElement.cpp:
824         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
825         * html/HTMLTextFormControlElement.cpp:
826         (WebCore::HTMLTextFormControlElement::select):
827         (WebCore::HTMLTextFormControlElement::setSelectionRange):
828         (WebCore::HTMLTextFormControlElement::restoreCachedSelection):
829         * html/HTMLTextFormControlElement.h:
830         * page/EventHandler.cpp:
831         (WebCore::setInitialKeyboardSelection):
832         * page/FocusController.cpp:
833         (WebCore::FocusController::advanceFocusInDocumentOrder):
834
835 2015-07-02  Przemek Piorkowski  <piorkowskiprzemyslaw@gmail.com>
836
837         [EFL] test_ewk2_application_cache_manager has been failed since r185527
838         https://bugs.webkit.org/show_bug.cgi?id=146016
839
840         Reviewed by Gyuyoung Kim.
841
842         In order to handle properly WebApplicationCacheManagerProxy implementation which use
843         WebsiteDataRecord it is necessary to enable PUBLIC_SUFFIX_LIST for EFL. 
844         Implementation of PUBLIC_SUFFIX_LIST already exists for soup so EFL can use it as well.
845
846         * PlatformEfl.cmake: PublicSuffixSoup.cpp added to source files.
847
848 2015-07-02  Commit Queue  <commit-queue@webkit.org>
849
850         Unreviewed, rolling out r186251.
851         https://bugs.webkit.org/show_bug.cgi?id=146573
852
853         caused crashes in webaudio tests (Requested by cdumez on
854         #webkit).
855
856         Reverted changeset:
857
858         "Ensure media playback is stopped during page close"
859         https://bugs.webkit.org/show_bug.cgi?id=146554
860         http://trac.webkit.org/changeset/186251
861
862 2015-07-02  Brent Fulgham  <bfulgham@apple.com>
863
864         Ensure media playback is stopped during page close
865         https://bugs.webkit.org/show_bug.cgi?id=146554
866         <rdar://problem/18033944>
867
868         Reviewed by Zalan Bujtas.
869
870         Add new method to Page class to stop all media playback. It just uses the process
871         MediaSessionManager singleton to inform all hosted in a particular document to stop.
872
873         * Modules/webaudio/AudioContext.h:
874         (WebCore::WebAudio::hostingDocument): Added.
875         * html/HTMLMediaElement.h:
876         (WebCore::HTMLMediaElement::hostingDocument): Added.
877         * dom/Document.cpp:
878         (WebCore::Document::commonTeardown): Call the new PlatformMediaSessionManager::stopAllMediaPlaybackForDocument
879         method on document cleanup.
880         * platform/audio/PlatformMediaSession.h:
881         Made PlatformMediaSessionManager a friend so it can access the protected 'client' accessor.
882         Updated PlatformMediaSessionClient to require clients to have a "hostingDocument" member.
883         * platform/audio/PlatformMediaSessionManager.cpp:
884         (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): Added. Only pauses
885         playback on elements that match the provided document.
886         * platform/audio/PlatformMediaSessionManager.h:
887
888 2015-07-02  Dean Jackson  <dino@apple.com>
889
890         Tapping a video in Safari causes the video to flash gray for a quick moment
891         https://bugs.webkit.org/show_bug.cgi?id=146570
892         <rdar://problem/21325181>
893
894         Reviewed by Brent Fulgham.
895
896         On iOS, video elements should not show the tap highlight.
897
898         * css/html.css:
899         (video):
900
901 2015-07-02  Dean Jackson  <dino@apple.com>
902
903         WebKit should use 80% white background for PiP indicator
904         https://bugs.webkit.org/show_bug.cgi?id=146444
905         <rdar://problem/21555726>
906
907         Reviewed by Brent Fulgham.
908
909         The designers wanted 80% white, not 80% black (r186104).
910         I've also reverted the AirPlay background back to black.
911
912         * Modules/mediacontrols/mediaControlsiOS.css:
913         (audio::-webkit-media-controls-wireless-playback-status):
914         (audio::-webkit-media-controls-wireless-playback-status.small):
915         (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
916
917 2015-07-02  Eric Carlson  <eric.carlson@apple.com>
918
919         [Mac] Clear current AirPlay source before setting another
920         https://bugs.webkit.org/show_bug.cgi?id=145959
921
922         Reviewed by Brent Fulgham.
923
924         * Modules/mediasession/WebMediaSessionManager.cpp:
925         (WebCore::WebMediaSessionManager::clientStateDidChange): Don't make a client begin playing 
926           to the target just because it has paused.
927         (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Always select a client that
928           requrested the picker, and never consider paused clients when choosing a client to begin
929           playing to the targer. Call setShouldPlayToPlaybackTarget(true) after all of the other 
930           clients have been told to stop playing to the target.
931
932 2015-07-02  Beth Dakin  <bdakin@apple.com>
933
934         Allow the UIDelegate to customize an image preview
935         https://bugs.webkit.org/show_bug.cgi?id=146557
936         -and corresponding-
937         rdar://problem/21657424
938
939         Reviewed by Tim Horton.
940
941         Add WEBCORE_EXPORT to use this in WK2.
942         * loader/cache/CachedResource.h:
943         (WebCore::CachedResource::url):
944
945 2015-07-02  Brady Eidson  <beidson@apple.com>
946
947         Add preference to disable all http-equiv.
948         <rdar://problem/9091261> and https://bugs.webkit.org/show_bug.cgi?id=146553
949
950         Reviewed by Sam Weinig.
951
952         No new tests (Covered by existing test)
953
954         * dom/Document.cpp:
955         (WebCore::Document::processHttpEquiv):
956         * page/Settings.in:
957
958 2015-07-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
959
960         [Streams API] Remove ReadableStreamController.enqueue() custom binding
961         https://bugs.webkit.org/show_bug.cgi?id=146455
962
963         Reviewed by Darin Adler.
964
965         Made enqueue not custom. Updated error to use Default=Undefined in IDL.
966
967         No change in behavior.
968
969         * Modules/streams/ReadableStreamController.h:
970         (WebCore::ReadableStreamController::error): Removed unneeded variation of error.
971         (WebCore::ReadableStreamController::enqueue): Calling ReadableJSStream enqueue method.
972         * Modules/streams/ReadableStreamController.idl: Updated error with Default=Undefined and made enqueue not custom.
973         * bindings/js/JSDOMBinding.cpp:
974         (WebCore::createDOMException): Adding support for RangeError exceptions.
975         * bindings/js/JSReadableStreamControllerCustom.cpp:
976         (WebCore::constructJSReadableStreamController): Deleted.
977         * bindings/js/ReadableJSStream.cpp:
978         (WebCore::ReadableJSStream::error): Updated to pass error value as parameter.
979         (WebCore::ReadableJSStream::enqueue): Added exception throwing through ExceptionCode.
980         (WebCore::ReadableJSStream::retrieveChunkSize): Ditto.
981         * bindings/js/ReadableJSStream.h:
982         * dom/ExceptionCode.h: Adding RangeError.
983
984 2015-07-02  Brady Eidson  <beidson@apple.com>
985
986         [Content Extensions] Block synchronous XMLHTTPRequest.
987         <rdar://problem/21573006> and https://bugs.webkit.org/show_bug.cgi?id=146271
988
989         Reviewed by Alex Christensen.
990
991         Test: http/tests/contentextensions/sync-xhr-blocked.html
992
993         * loader/FrameLoader.cpp:
994         (WebCore::FrameLoader::loadResourceSynchronously): If content blocked, set up an error, clear
995           the response, and clear the response data.
996
997 2015-07-01  Joseph Pecoraro  <pecoraro@apple.com>
998
999         Web Inspector: Aggregate profile call information on the backend to drastically reduce profile sizes
1000         https://bugs.webkit.org/show_bug.cgi?id=146536
1001
1002         Reviewed by Timothy Hatcher.
1003
1004         * inspector/TimelineRecordFactory.cpp:
1005         (WebCore::buildAggregateCallInfoInspectorObject):
1006         (WebCore::buildInspectorObject):
1007         Replace the array of Call objects with a single aggregated call info object.
1008
1009 2015-07-01  Brent Fulgham  <bfulgham@apple.com>
1010
1011         [Win] REGRESSION (r185124) CACFLayer handling broken
1012         https://bugs.webkit.org/show_bug.cgi?id=146530
1013         <rdar://problem/21642241>
1014
1015         Reviewed by Tim Horton.
1016
1017         At some point in the past, the set of LayerChange flags
1018         overflowed the default MSVC enum type of 'int'. This caused
1019         Windows rendering code to not receive various update notifications.
1020
1021         Zalan's change moved the DebugIndicatorsChanged flag into that
1022         overflow set, which made it obvious that something was wrong.
1023
1024         The fix is to tell the compiler to use a compatible base type
1025         for the enum.
1026
1027         * platform/graphics/ca/GraphicsLayerCA.h: Prevent overflow.
1028
1029 2015-07-01  Alex Christensen  <achristensen@webkit.org>
1030
1031         Reduce resolution of performance.now.
1032         https://bugs.webkit.org/show_bug.cgi?id=146531
1033         rdar://problem/20116796
1034
1035         Reviewed by Simon Fraser.
1036
1037         Test: http/tests/misc/webtiming-resolution.html
1038
1039         * page/Performance.cpp:
1040         (WebCore::Performance::now):
1041         Floor the time returned by performance.now to the nearest 5 microseconds.
1042
1043 2015-07-01  Eric Carlson  <eric.carlson@apple.com>
1044
1045         [iOS] Build fix
1046
1047         Reviewed by Brent Fulgham.
1048
1049         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1050         (-[WebAVVideoLayer enterPIPModeRedirectingVideoToLayer:]): Renamed from enterOptimizedFullScreenModeRedirectingVideoToLayer.
1051         (-[WebAVVideoLayer leavePIPMode]): Renamed from leaveOptimizedFullScreenMode.
1052         (-[WebAVVideoLayer enterOptimizedFullScreenModeRedirectingVideoToLayer:]): Deleted.
1053         (-[WebAVVideoLayer leaveOptimizedFullScreenMode]): Deleted.
1054
1055 2015-07-01  Myles C. Maxfield  <mmaxfield@apple.com>
1056
1057         [iOS] Support bold and thin italicized system fonts
1058         https://bugs.webkit.org/show_bug.cgi?id=146463
1059         <rdar://problem/20948885>
1060
1061         Reviewed by Darin Adler.
1062
1063         Add the italicized attribute to font descriptors.
1064
1065         Test: fast/text/weighted-italicized-system-font.html
1066
1067         * platform/graphics/ios/FontCacheIOS.mm:
1068         (WebCore::createCTFontWithFamilyNameAndWeight):
1069         * platform/graphics/mac/FontCacheMac.mm:
1070         (WebCore::fontWithFamilySpecialCase):
1071         (WebCore::fontWithFamily):
1072         * platform/spi/cocoa/CoreTextSPI.h:
1073
1074 2015-07-01  Alex Christensen  <achristensen@webkit.org>
1075
1076         Fix ANGLE Windows build after r186169.
1077         https://bugs.webkit.org/show_bug.cgi?id=146532
1078
1079         Reviewed by Brent Fulgham.
1080
1081         * WebCore.vcxproj/WebCore.vcxproj:
1082         * WebCore.vcxproj/WebCore.vcxproj.filters:
1083         Don't compile OpenGLShims.cpp or Extensions3DOpenGL.cpp on Windows 
1084         because Windows uses OpenGLES through ANGLE, not OpenGL.
1085         * platform/graphics/ANGLEWebKitBridge.h:
1086         Use OpenGLESShims.h on Windows instead of OpenGLShims.h.
1087         * platform/graphics/OpenGLESShims.h:
1088         Added needed definitions from OpenGL to compile successfully.
1089         * platform/graphics/win/GL/glext.h: Removed.
1090
1091 2015-07-01  Dean Jackson  <dino@apple.com>
1092
1093         Disable the experimental WebGL2 implementation
1094         https://bugs.webkit.org/show_bug.cgi?id=146526
1095         <rdar://problem/21641235>
1096
1097         Reviewed by Myles Maxfield.
1098
1099         Add (and disable) an ENABLE_WEBGL2 flag. Also protect
1100         anything that is specific to WebGL2.
1101
1102         Covered by running the WebGL 1.0.2 conformance suite
1103         and our LayoutTests.
1104
1105         * Configurations/FeatureDefines.xcconfig:
1106         * bindings/js/JSCanvasRenderingContextCustom.cpp:
1107         (WebCore::toJS):
1108         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
1109         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
1110         (WebCore::toJS):
1111         * html/HTMLCanvasElement.cpp:
1112         (WebCore::HTMLCanvasElement::is3dType):
1113         * html/canvas/WebGL2RenderingContext.cpp:
1114         * html/canvas/WebGL2RenderingContext.h:
1115         * html/canvas/WebGL2RenderingContext.idl:
1116         * html/canvas/WebGLFramebuffer.cpp:
1117         (WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
1118         * html/canvas/WebGLGetInfo.cpp:
1119         * html/canvas/WebGLGetInfo.h:
1120         * html/canvas/WebGLRenderingContextBase.cpp:
1121         (WebCore::WebGLRenderingContextBase::create):
1122         * html/canvas/WebGLVertexArrayObject.cpp:
1123         * html/canvas/WebGLVertexArrayObject.h:
1124         * html/canvas/WebGLVertexArrayObject.idl:
1125
1126 2015-07-01  Chris Dumez  <cdumez@apple.com>
1127
1128         Regression(183998): Disqus comments take a very long time to load
1129         https://bugs.webkit.org/show_bug.cgi?id=146522
1130         <rdar://problem/21590601>
1131
1132         Reviewed by Simon Fraser.
1133
1134         Stop throttling requestAnimationFrame() in iframes that are not visible
1135         due to them being zero-sized or display:none. Those are usually utility
1136         iframes and throttling them is risky.
1137
1138         Se still throttle requestAnimationFrame() in iframes that would be
1139         visible in theory but are currently not noticeable because they are
1140         outside the viewport.
1141
1142         Test:
1143         - fast/animation/request-animation-frame-throttle-subframe.html
1144         - fast/animation/request-animation-frame-throttle-subframe-display-none.html
1145         - fast/animation/request-animation-frame-throttle-subframe-zero-size.html
1146
1147         * page/FrameView.cpp:
1148         (WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):
1149
1150 2015-06-30  Ryosuke Niwa  <rniwa@webkit.org>
1151
1152         REGRESSION (r179168): Characters overlap after resizing the font on the copy-pasted Japanese text
1153         https://bugs.webkit.org/show_bug.cgi?id=146492
1154
1155         Reviewed by Darin Adler.
1156
1157         The bug was caused by WebKit serializing the used line-height size (e.g. 18px) in the copied content
1158         instead of string "normal" and removeStyleFromRulesAndContext failing to strip it down when text with
1159         a font that influences the line height got pasted. This is because the used value of line-height
1160         property of the context and the pasted content doesn't match when the context doesn't use the same font.
1161
1162         Fixed the bug by not considering line-height as a list of editing properties we try to preserve. This is
1163         fine because we don't provide editing operations to directly manipulate line-height.
1164
1165         Test: editing/pasteboard/cjk-line-height.html
1166
1167         * editing/EditingStyle.cpp:
1168         (WebCore::editingProperties): Removed CSSPropertyLineHeight.
1169
1170 2015-06-30  Brent Fulgham  <bfulgham@apple.com>
1171
1172         REGRESSION (r184296): View keeps scrolling upward
1173         https://bugs.webkit.org/show_bug.cgi?id=146497
1174         <rdar://problem/21524942>
1175
1176         Reviewed by Darin Adler.
1177
1178         Avoid improperly triggering the ScrollController wheel event handling
1179         logic when the wheel event deltaX/deltaY are zero. On certain sites,
1180         this caused a programmatic JavaScript scroll to be triggered unexpectedly,
1181         scrolling the page back to some initial state.
1182
1183         This bug was introduced while trying to make sure scrollbars were notified
1184         when the wheel event had come to an end. Revise that change so that we still
1185         follow the right code path for non-stretchable regions. However, make sure
1186         that for zero-delta wheel events we make sure to properly handle the wheel
1187         event phase. 
1188
1189         * platform/mac/ScrollAnimatorMac.h:
1190         * platform/mac/ScrollAnimatorMac.mm:
1191         (WebCore::ScrollAnimatorMac::shouldForwardWheelEventsToParent): New helper function
1192         to reduce the complexity of the logic in handleWheelEvent.
1193         (WebCore::ScrollAnimatorMac::handleWheelEvent): When wheel events should be forwarded
1194         to the parent scroll view, if the event was handled or has no change in position
1195         trigger the 'handleWheelEventPhase' logic so that scrollbars are hidden, etc.
1196
1197 2015-06-30  Dean Jackson  <dino@apple.com>
1198
1199         Hide the inline controls when going into PiP
1200         https://bugs.webkit.org/show_bug.cgi?id=146487
1201         <rdar://problem/19881159>
1202
1203         Reviewed by Eric Carlson.
1204
1205         When the presentation mode is PiP, toggle a class
1206         on the container element so that we can completely
1207         hide the control toolbar. The placard should still
1208         remain visible.
1209
1210         * Modules/mediacontrols/mediaControlsiOS.css:
1211         (video::-webkit-media-controls-panel-container.picture-in-picture): Add
1212         a rule that hides the toolbar when PiP is active.
1213         * Modules/mediacontrols/mediaControlsiOS.js:
1214         (ControllerIOS.prototype.showControls):
1215         (ControllerIOS.prototype.handlePresentationModeChange): Toggle a
1216         class. Also fix a bug I noticed where exiting from PiP was
1217         not auto-hiding the controls until the user tapped.
1218
1219 2015-07-01  Matthew Daiter  <mdaiter@apple.com>
1220
1221         Enable MEDIA_STREAM flag
1222         https://bugs.webkit.org/show_bug.cgi?id=145947
1223         <rdar://problem/21365829>
1224
1225         Reviewed by Eric Carlson.
1226
1227         * Configurations/FeatureDefines.xcconfig: Added MEDIA_STREAM flag
1228         * Modules/mediastream/MediaStreamTrack.h:
1229         * WebCore.xcodeproj/project.pbxproj: Changed project headers to
1230         private headers
1231         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1232         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1233         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1234         * platform/mediastream/RealtimeMediaSource.h:
1235         * platform/mediastream/mac/AVAudioCaptureSource.mm:
1236         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
1237         (WebCore::refreshCaptureDeviceList): Deleted.
1238         * platform/mediastream/mac/AVMediaCaptureSource.mm:
1239         (WebCore::AVMediaCaptureSource::startProducingData):
1240         (WebCore::AVMediaCaptureSource::stopProducingData):
1241
1242 2015-07-01  Brent Fulgham  <bfulgham@apple.com>
1243
1244         REGRESSION (r185016): Intermittent crash in WebCore::TextTrackList::remove
1245         https://bugs.webkit.org/show_bug.cgi?id=146493
1246         <rdar://problem/21511122>
1247
1248         Reviewed by Eric Carlson.
1249
1250         The m_textTracks member is frequently null checked during other operations, but
1251         was not checked during track removal. This needs to be corrected.
1252
1253         * html/HTMLMediaElement.cpp:
1254         (WebCore::HTMLMediaElement::removeTextTrack): Check that m_textTracks is
1255         not null before using it during track removal.
1256
1257 2015-07-01  Antti Koivisto  <antti@apple.com>
1258
1259         PNG mask images are loaded with Accept:image/svg+xml
1260         https://bugs.webkit.org/show_bug.cgi?id=146509
1261         rdar://problem/21584740
1262
1263         Reviewed by Simon Fraser.
1264
1265         For some strange reason MaskImageOperation code loads all mask images, including non-SVG ones
1266         using CachedSVGDocument. Resulting bad accept header may cause server to reject the request.
1267
1268         This is far from ideal but as a quick fix we can override the accept header for mask images to
1269         allow any image type.
1270
1271         Test: http/tests/misc/mask-image-accept.html
1272
1273         * loader/cache/CachedResourceLoader.cpp:
1274         (WebCore::CachedResourceLoader::requestResource):
1275         * loader/cache/CachedResourceRequest.h:
1276         (WebCore::CachedResourceRequest::acceptOverride):
1277         (WebCore::CachedResourceRequest::setAcceptOverride):
1278         * loader/cache/CachedSVGDocumentReference.cpp:
1279         (WebCore::CachedSVGDocumentReference::load):
1280         * loader/cache/CachedSVGDocumentReference.h:
1281         (WebCore::CachedSVGDocumentReference::loadRequested):
1282         (WebCore::CachedSVGDocumentReference::setAcceptsAnyImageType):
1283         (WebCore::CachedSVGDocumentReference::document):
1284         * platform/graphics/MaskImageOperation.cpp:
1285         (WebCore::MaskImageOperation::ensureCachedSVGDocumentReference):
1286
1287 2015-07-01  Jer Noble  <jer.noble@apple.com>
1288
1289         [MSE] Failures on W3C media-source tests regarding MIME types
1290         https://bugs.webkit.org/show_bug.cgi?id=146499
1291
1292         Reviewed by Eric Carlson.
1293
1294         Tests: http/tests/media/media-source/SourceBuffer-abort-readyState.html
1295                http/tests/media/media-source/SourceBuffer-abort-removed.html
1296                http/tests/media/media-source/SourceBuffer-abort-updating.html
1297                http/tests/media/media-source/SourceBuffer-abort.html
1298
1299         Multiple failures in the W3C media-source test suite due to two failures in isTypeSupported MIME type handling:
1300         - MIME types without codec strings were being rejected.
1301         - MIME types with codec strings which are rejected by the system are being reported as supported.
1302
1303         For the first, stop rejecting MIME types with non-existent codec strings. For MIME types which do have non-empty
1304         codec strings, treat a "Maybe" response as unsupported.
1305
1306         * Modules/mediasource/MediaSource.cpp:
1307         (WebCore::MediaSource::isTypeSupported):
1308
1309 2015-06-30  Alex Christensen  <achristensen@webkit.org>
1310
1311         Update ANGLE to b11e2483742db884bd0af41f78f528240577356b.
1312         https://bugs.webkit.org/show_bug.cgi?id=145010
1313
1314         Reviewed by Dean Jackson.
1315
1316         * CMakeLists.txt:
1317         * platform/graphics/ANGLEWebKitBridge.cpp:
1318         (WebCore::appendSymbol):
1319         (WebCore::getStructInfo):
1320         (WebCore::getSymbolInfo):
1321         (WebCore::ANGLEWebKitBridge::cleanupCompilers):
1322         (WebCore::ANGLEWebKitBridge::compileShaderSource):
1323         (WebCore::getValidationResultValue): Deleted.
1324         * platform/graphics/ANGLEWebKitBridge.h:
1325         (WebCore::ANGLEShaderSymbol::isSampler):
1326         * platform/graphics/GraphicsContext3D.h:
1327         (WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo):
1328         * platform/graphics/mac/GraphicsContext3DMac.mm:
1329         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1330         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1331         (WebCore::GraphicsContext3D::checkVaryingsPacking):
1332         (WebCore::GraphicsContext3D::precisionsMatch):
1333         Update WebCore to reflect changes in ANGLE.
1334
1335 2015-06-30  Zalan Bujtas  <zalan@apple.com>
1336
1337         Frame flattening: Hit-testing an iframe could end up destroying the associated inline tree context.
1338         https://bugs.webkit.org/show_bug.cgi?id=146447
1339         rdar://problem/20613501
1340
1341         Reviewed by Simon Fraser.
1342
1343         This patch ensures that the render tree associated with the document on which
1344         the hit-test is initiated does not get laid out, unless it was directly mutated prior to the hittest.
1345
1346         Hit-test requirements:
1347         1. A clean the render tree before hit-testing gets propagated to the renderers.
1348         Document::updateLayout() ensures it by calling both updateStyleIfNeeded() and layout() not only on the current tree, but also
1349         on the ancestors if needed.
1350
1351         2. No render tree mutation while hit-testing the renderers.
1352
1353         When an iframe is being hit-tested, this hit-test could bubble down to the child frame's render view.
1354         In order to ensure #1, we call Document::updateLayout() on the current (subframe) document.
1355         If updateStyleIfNeeded() mutates the render tree, we mark it dirty for layout(). However frame flattening also
1356         marks the parent renderer (RenderIFrame) dirty.
1357         While calling layout() to clean the current render tree, we end up laying out the parent tree too.
1358         Laying out the parent tree could end up destroying the inline tree context from where the
1359         hittest just bubbled down. (InlineFlowBox -> RenderWidget -> RenderView).
1360
1361         This patch protects the render tree from such unintentional inline tree mutation during hittesting.
1362         After the initial layout we set a layout disallow flag on the frame view to defer subsequent layouts.
1363         This patch only changes behavior when frame flattening is enabled, but in future we may always want to enable this.
1364
1365         Test: fast/frames/flattening/hittest-iframe-while-style-changes-crash.html
1366
1367         * page/FrameView.cpp:
1368         (WebCore::FrameView::layout):
1369         (WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded): Deleted. -> Assertion in no longer valid.
1370         * page/FrameView.h:
1371         * rendering/RenderView.cpp:
1372         (WebCore::FrameFlatteningLayoutDisallower::FrameFlatteningLayoutDisallower):
1373         (WebCore::FrameFlatteningLayoutDisallower::~FrameFlatteningLayoutDisallower):
1374         (WebCore::RenderView::hitTest): Protect the render tree from subsequent layouts.
1375
1376 2015-06-30  Andy VanWagoner  <thetalecrafter@gmail.com>
1377
1378         Implement ECMAScript Internationalization API
1379         https://bugs.webkit.org/show_bug.cgi?id=90906
1380
1381         Reviewed by Benjamin Poulain.
1382
1383         Test: js/intl.html
1384
1385         * Configurations/FeatureDefines.xcconfig: add ENABLE_INTL flag
1386
1387 2015-06-30  Wenson Hsieh  <whsieh@berkeley.edu>
1388
1389         scroll-snap-points do not work very well with mechanical scroll wheel events
1390         https://bugs.webkit.org/show_bug.cgi?id=142501
1391         <rdar://problem/20093511>
1392
1393         Reviewed by Brent Fulgham.
1394
1395         Stateless scroll events generated by scrolling with a mechanical mouse wheel now trigger scroll
1396         snapping after a fixed delay.
1397
1398         Test: platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-stateless.html
1399
1400         * platform/cocoa/ScrollController.h: Added member to track stateless scrolling.
1401         * platform/cocoa/ScrollController.mm: Added constant for delay for stateless scroll snapping.
1402         (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Triggers timer upon stateless scroll events.
1403         (WebCore::ScrollController::horizontalScrollSnapTimerFired): Timer now handles stateless scrolling updates.
1404         (WebCore::ScrollController::verticalScrollSnapTimerFired): See above.
1405         (WebCore::ScrollController::beginScrollSnapAnimation): Handles stateless scroll snapping.
1406
1407 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
1408
1409         Try to fix Gtk and EFL builds.
1410
1411         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1412         (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
1413         (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
1414         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1415         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
1416         (WebCore::CompositingCoordinator::flushPendingLayerChanges):
1417         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1418         (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
1419         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
1420         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1421
1422 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
1423
1424         [iOS] Missing tiles inside position:fixed on scrolling
1425         https://bugs.webkit.org/show_bug.cgi?id=146485
1426         rdar://problem/21226861
1427
1428         Reviewed by Tim Horton.
1429
1430         Layer flushing adjusts the coverage rect for tiled layers, but does so at times
1431         when position:fixed layers are moved around by the scrolling tree. The computed
1432         coverage rect then doesn't reflect the layer's on-screen position, causing missing
1433         tiles.
1434
1435         Fix by pushing the notion of being in a "stable state" onto FrameView, and passing
1436         that state into the layer flush. When not in a stable state, flushing doesn't change
1437         the visible and coverage rects for layers that are viewport-constrained.
1438
1439         * page/FrameView.cpp:
1440         (WebCore::FrameView::reset):
1441         * page/FrameView.h: Remove some velocity-related data members that were unused.
1442         * platform/graphics/GraphicsLayer.h:
1443         (WebCore::GraphicsLayer::flushCompositingState):
1444         (WebCore::GraphicsLayer::flushCompositingStateForThisLayerOnly):
1445         * platform/graphics/ca/GraphicsLayerCA.cpp:
1446         (WebCore::GraphicsLayerCA::flushCompositingState):
1447         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
1448         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): If this is a viewport-constrained
1449         layer, and the viewport is not stable, don't touch the rects.
1450         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
1451         * platform/graphics/ca/GraphicsLayerCA.h:
1452         (WebCore::GraphicsLayerCA::CommitState::CommitState):
1453         * rendering/RenderLayerCompositor.cpp:
1454         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1455
1456 2015-06-30  Simon Fraser  <simon.fraser@apple.com>
1457
1458         Rename GraphicsLayer's allowsBackingStoreDetachment to isViewportConstrained
1459         https://bugs.webkit.org/show_bug.cgi?id=146483
1460
1461         Reviewed by Tim Horton.
1462
1463         What GraphicsLayer really needs to know is whether some other thread/process
1464         is moving its platform layers around behind its back, and this is is better
1465         expressed as "isViewportConstrained" rather than "allowsBackingStoreDetachment".
1466         
1467         The sense of the flag is flipped, and boolean logic adjusted accordingly.
1468
1469         * platform/graphics/GraphicsLayer.h:
1470         (WebCore::GraphicsLayer::setIsViewportConstrained):
1471         (WebCore::GraphicsLayer::isViewportConstrained):
1472         (WebCore::GraphicsLayer::setAllowsBackingStoreDetachment): Deleted.
1473         (WebCore::GraphicsLayer::allowsBackingStoreDetachment): Deleted.
1474         * platform/graphics/ca/GraphicsLayerCA.cpp:
1475         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
1476         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
1477         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
1478         * platform/graphics/ca/GraphicsLayerCA.h:
1479         * rendering/RenderLayerBacking.cpp:
1480         (WebCore::RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole):
1481
1482 2015-06-30  Dean Jackson  <dino@apple.com>
1483
1484         CABackdropFilter should set windowServerAware to false
1485         https://bugs.webkit.org/show_bug.cgi?id=146469
1486         <rdar://problem/21618614>
1487
1488         Reviewed by Simon Fraser.
1489
1490         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1491         (PlatformCALayerCocoa::PlatformCALayerCocoa): Set windowServerAware
1492         to false on Mac (it's not available on iOS).
1493
1494 2015-06-30  Chris Dumez  <cdumez@apple.com>
1495
1496         Rolling out r175171
1497         https://bugs.webkit.org/show_bug.cgi?id=146470
1498         <rdar://problem/21349934>
1499
1500         Unreviewed, rolling out <http://trac.webkit.org/changeset/175171>. It
1501         wasn't a huge win and Brady says it caused crash at
1502         <rdar://problem/21349934>.
1503
1504         * platform/network/cf/ResourceRequest.h:
1505         * platform/network/cocoa/ResourceRequestCocoa.mm:
1506         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1507         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
1508
1509 2015-06-30  Matt Baker  <mattbaker@apple.com>
1510
1511         Web Inspector: Reduce rendering frames "Other" time by instrumenting compositing
1512         https://bugs.webkit.org/show_bug.cgi?id=146168
1513
1514         Reviewed by Brian Burg.
1515
1516         Added Inspector instrumentation for measuring CoreAnimation compositing time. We mark the start of a composite
1517         event when the LayerFlushScheduler triggers a scheduled layer flush. InspectorController now exports a function
1518         for marking the end of the composite event, which should be called during the CA transaction post-commit phase
1519         (based on platform support). Lacking platform support, the event is considered complete after CoreAnimation
1520         runloop observers have run.
1521
1522         * inspector/InspectorController.cpp:
1523         (WebCore::InspectorController::didComposite):
1524         * inspector/InspectorController.h:
1525         New export for instrumentation in WebKit2.
1526
1527         * inspector/InspectorInstrumentation.cpp:
1528         (WebCore::InspectorInstrumentation::willCompositeImpl):
1529         (WebCore::InspectorInstrumentation::didCompositeImpl):
1530         * inspector/InspectorInstrumentation.h:
1531         (WebCore::InspectorInstrumentation::willComposite):
1532         (WebCore::InspectorInstrumentation::didComposite):
1533         Plumbing for new instrumentation.
1534
1535         * inspector/InspectorTimelineAgent.cpp:
1536         (WebCore::InspectorTimelineAgent::internalStart):
1537         (WebCore::InspectorTimelineAgent::internalStop):
1538         (WebCore::InspectorTimelineAgent::willComposite):
1539         (WebCore::InspectorTimelineAgent::didComposite):
1540         (WebCore::toProtocol):
1541         * inspector/InspectorTimelineAgent.h:
1542         New Composite event type and instrumentation.
1543
1544         * page/FrameView.cpp:
1545         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
1546         Hook for start of compositing.
1547
1548         * platform/spi/cocoa/QuartzCoreSPI.h:
1549         New header include and interface declaration.
1550
1551 2015-06-30  Beth Dakin  <bdakin@apple.com>
1552
1553         The bounds on InteractionInformationAtPosition should be more precise
1554         https://bugs.webkit.org/show_bug.cgi?id=146468
1555         -and corresponding-
1556         rdar://problem/20739834
1557
1558         Reviewed by Enrica Casucci and Simon Fraser.
1559
1560         Export absoluteContentQuad().
1561         * rendering/RenderBox.h:
1562
1563 2015-06-30  Zalan Bujtas  <zalan@apple.com>
1564
1565         Addressing post-review comments in r185756.
1566
1567         * html/RubyTextElement.cpp:
1568         (WebCore::RubyTextElement::createElementRenderer):
1569
1570 2015-06-30  Zalan Bujtas  <zalan@apple.com>
1571
1572         Addressing post-review comments in r185916
1573
1574         * platform/LayoutUnit.h:
1575         (WebCore::roundToDevicePixel):
1576
1577 2015-06-30  Matt Rajca  <mrajca@apple.com>
1578
1579         MediaSession: Use setSessionInternal to set the default media session in HTMLMediaElement's constructor
1580         https://bugs.webkit.org/show_bug.cgi?id=146465
1581
1582         Reviewed by Eric Carlson.
1583
1584         * html/HTMLMediaElement.cpp:
1585         (WebCore::HTMLMediaElement::HTMLMediaElement):
1586
1587 2015-06-30  Matt Rajca  <mrajca@apple.com>
1588
1589         Media Session: implement algorithm for updating a media element's session (6.1)
1590         https://bugs.webkit.org/show_bug.cgi?id=146460
1591
1592         Reviewed by Darin Adler.
1593
1594         In addition to storing a pointer to the new media session, we now:
1595
1596         - pause the media element if it is 'active' in the current media session
1597         - remove the media element from the current media session
1598         - release the current media session if there are no more active media elements
1599         - set the default media session if the new media session is null
1600         - update the 'kind' attribute to match the kind of the new media session
1601
1602         * Modules/mediasession/MediaSession.cpp:
1603         (WebCore::MediaSession::isMediaElementActive):
1604         (WebCore::MediaSession::hasActiveMediaElements):
1605         * Modules/mediasession/MediaSession.h:
1606         * html/HTMLMediaElement.cpp:
1607         (WebCore::HTMLMediaElement::setSession):
1608         (WebCore::HTMLMediaElement::setSessionInternal):
1609         * html/HTMLMediaElement.h:
1610
1611 2015-06-29  Anders Carlsson  <andersca@apple.com>
1612
1613         Get rid of unused WKSI functions
1614         https://bugs.webkit.org/show_bug.cgi?id=146443
1615
1616         Reviewed by Tim Horton.
1617
1618         * platform/graphics/cg/PathCG.cpp:
1619         (WebCore::Path::platformAddPathForRoundedRect):
1620         Just call CGPathAddRoundedRect directly.
1621
1622         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1623         * platform/mac/WebCoreSystemInterface.h:
1624         * platform/mac/WebCoreSystemInterface.mm:
1625
1626 2015-06-30  Youenn Fablet  <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>
1627
1628         [Streams API] Finish pulling must always be done asynchronously as it is the expected promise behavior (according to the spec)
1629         https://bugs.webkit.org/show_bug.cgi?id=146408
1630
1631         Reviewed by Darin Adler.
1632
1633         Current tests cover the case already.
1634
1635         * Modules/streams/ReadableStream.cpp:
1636         (WebCore::ReadableStream::pull): Call finishPull() in a postTask to delay it and simulate the promise
1637         resolution.
1638
1639 2015-06-30  Youenn Fablet  <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>
1640
1641         [Streams API] Synced bad strategy test with reference implementation
1642         https://bugs.webkit.org/show_bug.cgi?id=146411
1643
1644         Reviewed by Darin Adler.
1645
1646         Current tests cover the case.
1647
1648         * bindings/js/ReadableJSStream.cpp:
1649         (WebCore::ReadableJSStream::retrieveChunkSize): Check for negative size then running the JavaScript function.
1650
1651 2015-06-30  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1652
1653         [Streams API] Remove ReadableStream.getReader() custom binding
1654         https://bugs.webkit.org/show_bug.cgi?id=146404
1655
1656         Reviewed by Darin Adler.
1657
1658         Covered by existing tests.
1659
1660         * Modules/streams/ReadableStream.cpp:
1661         (WebCore::ReadableStream::getReader): Updated to take an exception.
1662         * Modules/streams/ReadableStream.h:
1663         * Modules/streams/ReadableStream.idl: Updated to remove custom binding.
1664         * bindings/js/JSReadableStreamCustom.cpp:
1665         (WebCore::JSReadableStream::getReader): Deleted.
1666         * bindings/js/JSReadableStreamReaderCustom.cpp:
1667         (WebCore::constructJSReadableStreamReader): Updated to pass an exception to getReader.
1668
1669 2015-06-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1670
1671         [Streams API] ReadableStreamReader.closed should use DOMPromise
1672         https://bugs.webkit.org/show_bug.cgi?id=146406
1673
1674         Reviewed by Darin Adler.
1675
1676         Added storage of ClosedPromise as Optional of ReadableStream.
1677         Updated code accordingly.
1678
1679         Covered by existing tests.
1680
1681         * Modules/streams/ReadableStream.cpp:
1682         (WebCore::ReadableStream::clearCallbacks):
1683         (WebCore::ReadableStream::releaseReader):
1684         (WebCore::ReadableStream::changeStateToErrored):
1685         (WebCore::ReadableStream::closed):
1686         * Modules/streams/ReadableStream.h:
1687         * Modules/streams/ReadableStreamReader.cpp:
1688         (WebCore::ReadableStreamReader::closed):
1689         * Modules/streams/ReadableStreamReader.h:
1690         * bindings/js/JSReadableStreamReaderCustom.cpp:
1691         (WebCore::JSReadableStreamReader::closed):
1692
1693 2015-06-29  Simon Fraser  <simon.fraser@apple.com>
1694
1695         [iOS WK2] WKWebViews in Facebook app start off black
1696         https://bugs.webkit.org/show_bug.cgi?id=146445
1697         rdar://problem/21600433
1698
1699         Reviewed by Tim Horton.
1700
1701         If -isOpaque is toggled on a WKWebView, we failed to make the page tiles non-opaque
1702         for a while. After r183775, RenderLayerCompositor::rootBackgroundTransparencyChanged() was called,
1703         but only considered the computed document background color, and not the view transparency.
1704         
1705         Fix by having rootBackgroundTransparencyChanged() simply use viewHasTransparentBackground(),
1706         which checks the FrameView transparency. Now we just need to store a transparency bool rather
1707         than the old color (we only checked its alpha anyway).
1708
1709         * rendering/RenderLayerCompositor.cpp:
1710         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged):
1711
1712 2015-06-29  Dean Jackson  <dino@apple.com>
1713
1714         WebKit should use 80% black background for PiP indicator
1715         https://bugs.webkit.org/show_bug.cgi?id=146444
1716         <rdar://problem/21555726>
1717
1718         Reviewed by Sam Weinig.
1719
1720         Change the black background to a slightly less black background.
1721         This also involved making the placard artwork white, in order
1722         to keep it visible against the new grey.
1723
1724         * Modules/mediacontrols/mediaControlsiOS.css:
1725         (audio::-webkit-media-controls-wireless-playback-status):
1726         (audio::-webkit-media-controls-wireless-playback-status.small):
1727         (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
1728
1729 2015-06-29  Brady Eidson  <beidson@apple.com>
1730
1731         Flag sync XHRs from the network process so they can be handled appropriately.
1732         <rdar://problem/21579162> and https://bugs.webkit.org/show_bug.cgi?id=146441
1733
1734         Reviewed by Darin Adler.
1735
1736         * platform/network/ResourceHandleClient.h:
1737         (WebCore::ResourceHandleClient::loadingSynchronousXHR): Added so clients of asynchronous
1738           loads can signal they should be treated like synchronous loads at the platform level.
1739
1740         * platform/network/cf/ResourceHandleCFNet.cpp:
1741         (WebCore::ResourceHandle::start): Adjust SchedulingBehavior based on the client.
1742
1743         * platform/network/mac/ResourceHandleMac.mm:
1744         (WebCore::ResourceHandle::start): Adjust SchedulingBehavior based on the client.
1745
1746 2015-06-29  Chris Fleizach  <cfleizach@apple.com>
1747
1748         AX: PlatformSpeechSynthesizer code doesn't catch Objective-C exceptions
1749         https://bugs.webkit.org/show_bug.cgi?id=146419
1750
1751         Reviewed by Simon Fraser.
1752
1753         Make sure ObjC exception resulting from calling into the platform cause problems in WebKit.
1754
1755         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
1756         (-[WebSpeechSynthesisWrapper speakUtterance:]):
1757         (-[WebSpeechSynthesisWrapper pause]):
1758         (-[WebSpeechSynthesisWrapper resume]):
1759         (-[WebSpeechSynthesisWrapper cancel]):
1760         (-[WebSpeechSynthesisWrapper speechSynthesizer:didStartSpeechUtterance:]):
1761         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
1762         (WebCore::PlatformSpeechSynthesizer::pause):
1763
1764 2015-06-29  Matt Rajca  <mrajca@apple.com>
1765
1766         Removing an element from a media session should also remove it from the sets of active participating elements
1767         https://bugs.webkit.org/show_bug.cgi?id=146420
1768
1769         Reviewed by Eric Carlson.
1770
1771         * Modules/mediasession/MediaSession.cpp:
1772         (WebCore::MediaSession::removeMediaElement):
1773
1774 2015-06-29  Dean Jackson  <dino@apple.com>
1775
1776         Temporarily disable PICTURE_SIZES
1777         https://bugs.webkit.org/show_bug.cgi?id=146435
1778         <rdar://problem/21087013>
1779
1780         Reviewed by Tim Horton.
1781
1782         Temporarily disable PICTURE_SIZES because it causes problems with out
1783         of date <picture> polyfills.
1784
1785         * Configurations/FeatureDefines.xcconfig:
1786
1787 2015-06-29  Tim Horton  <timothy_horton@apple.com>
1788
1789         Fix the build.
1790
1791         * editing/cocoa/HTMLConverter.mm:
1792         * platform/spi/cocoa/NSAttributedStringSPI.h:
1793
1794 2015-06-29  Tim Horton  <timothy_horton@apple.com>
1795
1796         Fix the build.
1797
1798         * platform/spi/cocoa/NSAttributedStringSPI.h:
1799
1800 2015-06-29  Tim Horton  <timothy_horton@apple.com>
1801
1802         Fix the build.
1803
1804         * platform/spi/cocoa/NSAttributedStringSPI.h:
1805
1806 2015-06-27  Ryosuke Niwa  <rniwa@webkit.org>
1807
1808         Font panel doesn't get updated when bolding text via cmd+b in Mail on OS X
1809         https://bugs.webkit.org/show_bug.cgi?id=146379
1810
1811         Reviewed by Darin Adler.
1812
1813         The bug was caused by WebKit not updating the font panel when the typing style changes.
1814         There was also a bug that WebKit never updated font attributes on OS X.
1815
1816         Fixed the bugs by always updating the font panel after applying style instead of only
1817         when the selection changes and setting the font attributes.
1818
1819         I tried really had to write a WebKit API test but I couldn't get it to work so there are
1820         no new tests :(
1821
1822         * WebCore.xcodeproj/project.pbxproj:
1823         * editing/Editor.cpp:
1824         (WebCore::Editor::applyStyle):
1825         (WebCore::Editor::shouldApplyStyle):
1826         (WebCore::Editor::applyParagraphStyle):
1827         (WebCore::Editor::applyStyleToSelection):
1828         (WebCore::Editor::applyParagraphStyleToSelection):
1829         (WebCore::Editor::selectionStartHasStyle):
1830         (WebCore::Editor::document):
1831         (WebCore::Editor::styleForSelectionStart): Deleted.
1832         * editing/Editor.h:
1833         * editing/cocoa/EditorCocoa.h: Added. Shares the declaration for NSUnderlineStyle in iOS.
1834         * editing/cocoa/EditorCocoa.mm: Added.
1835         (WebCore::Editor::styleForSelectionStart): Moved from Editor.cpp
1836         (WebCore::Editor::getTextDecorationAttributesRespectingTypingStyle): Extracted from iOS's
1837         fontAttributesForSelectionStart implementation.
1838         * editing/cocoa/HTMLConverter.mm:
1839         * editing/ios/EditorIOS.mm:
1840         (WebCore::Editor::fontAttributesForSelectionStart):
1841         * editing/mac/EditorMac.mm:
1842         (WebCore::Editor::fontAttributesForSelectionStart):
1843         * loader/EmptyClients.h:
1844         * page/EditorClient.h:
1845
1846 2015-06-29  Matt Rajca  <mrajca@apple.com>
1847
1848         MediaSession: use a HashSet for the collection of participating elements
1849         https://bugs.webkit.org/show_bug.cgi?id=146421
1850
1851         Reviewed by Eric Carlson.
1852
1853         * Modules/mediasession/MediaSession.cpp:
1854         (WebCore::MediaSession::addMediaElement):
1855         (WebCore::MediaSession::removeMediaElement):
1856         * Modules/mediasession/MediaSession.h:
1857
1858 2015-06-29  Dean Jackson  <dino@apple.com>
1859
1860         Setting to enable/disable media controls sizing on page zoom
1861         https://bugs.webkit.org/show_bug.cgi?id=146423
1862         <rdar://problem/18379634>
1863
1864         Reviewed by Eric Carlson.
1865
1866         Add a new setting "MediaControlsScaleWithPageZoom" that can disable
1867         the behaviour we currently implement on iOS, where the media controls
1868         attempt to remain at a fixed size independent of page zoom.
1869
1870         * html/HTMLMediaElement.cpp:
1871         (WebCore::HTMLMediaElement::setMediaControlsDependOnPageScaleFactor): Do not
1872         set this value to true if the new setting is disabled.
1873         * page/Settings.cpp:
1874         * page/Settings.in: Add the new setting.
1875
1876 2015-06-29  Adam Bergkvist  <adam.bergkvist@ericsson.com>
1877
1878         WebRTC: Update the MediaStream API
1879         https://bugs.webkit.org/show_bug.cgi?id=146313
1880
1881         Reviewed by Eric Carlson.
1882
1883         Update the MediaStream API (MediaStream, MediaStreamTrack and
1884         RealtimeMediaSource) to match the Media Capture and Stream
1885         specification [1]. Notable changes:
1886
1887         Updated event handling to synchronously update corresponding
1888         state/attributes as events are dispatched.
1889
1890         Removed 'new' state from MediaStreamTrack. A track is either 'live' or
1891         'ended'. As a consequence 'started' event is also removed.
1892
1893         MediaStreamTrack always has a source (disconnected source concept was
1894         removed from the spec). Therefore, more state can be kept at the source
1895         without going away.
1896
1897         Calculate MediaStream.active internally, from the track set, instead of
1898         setting it externally.
1899
1900         Updated RealtimeMediaSource Observer interface.
1901
1902         Replaced MediaStream's separate audio and video track lists with a
1903         single track set (more aligned with spec).
1904
1905         Updated MediaStream constructor to adopt instead of clone track
1906         arguments (or tracks from MediaStream argument).
1907
1908         Removed MediaStreamTrack.getSources() and corresponding test (removed
1909         from spec).
1910
1911         Test status: 3 added, 8 existing enabled (some updated) and 1 removed.
1912
1913         [1] http://w3c.github.io/mediacapture-main/archives/20150523/getusermedia.html
1914
1915         Tests: fast/mediastream/MediaStreamTrack-clone.html
1916                fast/mediastream/MediaStreamTrack-kind.html
1917                fast/mediastream/MediaStreamTrack-stop.html
1918
1919         * Modules/mediastream/MediaStream.cpp:
1920         (WebCore::MediaStream::create):
1921         (WebCore::MediaStream::MediaStream):
1922         (WebCore::MediaStream::clone):
1923         (WebCore::MediaStream::addTrack):
1924         (WebCore::MediaStream::removeTrack):
1925         (WebCore::MediaStream::getTrackById):
1926         (WebCore::MediaStream::getAudioTracks):
1927         (WebCore::MediaStream::getVideoTracks):
1928         (WebCore::MediaStream::getTracks):
1929         (WebCore::MediaStream::contextDestroyed):
1930         (WebCore::MediaStream::trackDidEnd):
1931         (WebCore::MediaStream::activeStatusChanged):
1932         (WebCore::MediaStream::didAddTrackToPrivate):
1933         (WebCore::MediaStream::didRemoveTrackFromPrivate):
1934         (WebCore::MediaStream::internalAddTrack):
1935         (WebCore::MediaStream::internalRemoveTrack):
1936         (WebCore::MediaStream::scheduleActiveStateChange):
1937         (WebCore::MediaStream::activityEventTimerFired):
1938         (WebCore::MediaStream::trackVectorForType):
1939         (WebCore::MediaStream::~MediaStream): Deleted.
1940         (WebCore::MediaStream::registry): Deleted.
1941         (WebCore::MediaStream::addObserver): Deleted.
1942         (WebCore::MediaStream::removeObserver): Deleted.
1943         * Modules/mediastream/MediaStream.h:
1944         * Modules/mediastream/MediaStream.idl:
1945         * Modules/mediastream/MediaStreamTrack.cpp:
1946         (WebCore::MediaStreamTrack::MediaStreamTrack):
1947         (WebCore::MediaStreamTrack::~MediaStreamTrack):
1948         (WebCore::MediaStreamTrack::kind):
1949         (WebCore::MediaStreamTrack::id):
1950         (WebCore::MediaStreamTrack::label):
1951         (WebCore::MediaStreamTrack::enabled):
1952         (WebCore::MediaStreamTrack::setEnabled):
1953         (WebCore::MediaStreamTrack::muted):
1954         (WebCore::MediaStreamTrack::readonly):
1955         (WebCore::MediaStreamTrack::remote):
1956         (WebCore::MediaStreamTrack::readyState):
1957         (WebCore::MediaStreamTrack::ended):
1958         (WebCore::MediaStreamTrack::clone):
1959         (WebCore::MediaStreamTrack::stopProducingData):
1960         (WebCore::MediaStreamTrack::states):
1961         (WebCore::MediaStreamTrack::getCapabilities):
1962         (WebCore::MediaStreamTrack::applyConstraints):
1963         (WebCore::MediaStreamTrack::trackEnded):
1964         (WebCore::MediaStreamTrack::trackMutedChanged):
1965         (WebCore::MediaStreamTrack::stop):
1966         (WebCore::MediaStreamTrack::getConstraints): Deleted.
1967         (WebCore::MediaStreamTrack::addObserver): Deleted.
1968         (WebCore::MediaStreamTrack::removeObserver): Deleted.
1969         (WebCore::MediaStreamTrack::configureTrackRendering): Deleted.
1970         (WebCore::MediaStreamTrack::activeDOMObjectName): Deleted.
1971         (WebCore::MediaStreamTrack::canSuspendForPageCache): Deleted.
1972         * Modules/mediastream/MediaStreamTrack.h:
1973         * Modules/mediastream/MediaStreamTrack.idl:
1974         * Modules/mediastream/RTCPeerConnection.cpp:
1975         (WebCore::RTCPeerConnection::didRemoveRemoteStream): Deleted.
1976         * Modules/mediastream/UserMediaRequest.cpp:
1977         (WebCore::UserMediaRequest::didCreateStream):
1978         * platform/mediastream/MediaStreamPrivate.cpp:
1979         (WebCore::MediaStreamPrivate::create):
1980         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
1981         (WebCore::MediaStreamPrivate::tracks):
1982         (WebCore::MediaStreamPrivate::updateActiveState):
1983         (WebCore::MediaStreamPrivate::addTrack):
1984         (WebCore::MediaStreamPrivate::removeTrack):
1985         * platform/mediastream/MediaStreamPrivate.h:
1986         (WebCore::MediaStreamPrivate::active): Deleted.
1987         * platform/mediastream/MediaStreamTrackPrivate.cpp:
1988         (WebCore::MediaStreamTrackPrivate::create):
1989         (WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
1990         (WebCore::MediaStreamTrackPrivate::~MediaStreamTrackPrivate):
1991         (WebCore::MediaStreamTrackPrivate::label):
1992         (WebCore::MediaStreamTrackPrivate::setEnabled):
1993         (WebCore::MediaStreamTrackPrivate::endTrack):
1994         (WebCore::MediaStreamTrackPrivate::clone):
1995         (WebCore::MediaStreamTrackPrivate::type):
1996         (WebCore::MediaStreamTrackPrivate::applyConstraints):
1997         (WebCore::MediaStreamTrackPrivate::sourceStopped):
1998         (WebCore::MediaStreamTrackPrivate::sourceMutedChanged):
1999         (WebCore::MediaStreamTrackPrivate::preventSourceFromStopping):
2000         (WebCore::MediaStreamTrackPrivate::muted): Deleted.
2001         (WebCore::MediaStreamTrackPrivate::readonly): Deleted.
2002         (WebCore::MediaStreamTrackPrivate::remote): Deleted.
2003         (WebCore::MediaStreamTrackPrivate::constraints): Deleted.
2004         (WebCore::MediaStreamTrackPrivate::states): Deleted.
2005         (WebCore::MediaStreamTrackPrivate::capabilities): Deleted.
2006         * platform/mediastream/MediaStreamTrackPrivate.h:
2007         (WebCore::MediaStreamTrackPrivate::id):
2008         (WebCore::MediaStreamTrackPrivate::ended):
2009         (WebCore::MediaStreamTrackPrivate::enabled):
2010         (WebCore::MediaStreamTrackPrivate::setClient):
2011         (WebCore::MediaStreamTrackPrivate::source): Deleted.
2012         (WebCore::MediaStreamTrackPrivate::client): Deleted.
2013         * platform/mediastream/RealtimeMediaSource.cpp:
2014         (WebCore::RealtimeMediaSource::RealtimeMediaSource):
2015         (WebCore::RealtimeMediaSource::reset):
2016         (WebCore::RealtimeMediaSource::setMuted):
2017         (WebCore::RealtimeMediaSource::readonly):
2018         (WebCore::RealtimeMediaSource::stop):
2019         (WebCore::RealtimeMediaSource::requestStop):
2020         (WebCore::RealtimeMediaSource::addObserver): Deleted.
2021         (WebCore::RealtimeMediaSource::removeObserver): Deleted.
2022         * platform/mediastream/RealtimeMediaSource.h:
2023         (WebCore::RealtimeMediaSource::stopped):
2024         (WebCore::RealtimeMediaSource::id): Deleted.
2025         (WebCore::RealtimeMediaSource::muted): Deleted.
2026         (WebCore::RealtimeMediaSource::setReadonly): Deleted.
2027         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
2028         (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Deleted.
2029         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
2030         (WebCore::MockRealtimeMediaSourceCenter::createMediaStream): Deleted.
2031
2032 2015-06-29  Benjamin Poulain  <benjamin@webkit.org>
2033
2034         Make the NFA transitions range-based
2035         https://bugs.webkit.org/show_bug.cgi?id=146338
2036
2037         Reviewed by Alex Christensen.
2038
2039         Change the NFA to use range based transition for any kind of transition.
2040         The fallback transition is also absorbed as ranges.
2041
2042         Previously, the NFA would only have single transitions and a fallback
2043         transition for all cases not covered by single transitions.
2044
2045         The problem with that design was that character ranges (e.g. [a-z]) were
2046         extended as individual transitions. Something like [^a] would cover
2047         most of the alphabet with transitions.
2048         When converting the NFA to DFA, the time is proportional to the number of states
2049         multiplied by the number of transitions. With many individual transitions,
2050         the run time was an order of magnitude higher than what we want.
2051
2052         This patch changes the NFA to only handle ranges of characters. A single transition
2053         becomes a range with the character as first and last character in the range
2054         ('a' becomes 'a' to 'a').
2055         Ranges of characters are handled direclty (e.g. [a-z] becomes a single 'a' to 'z' transition).
2056
2057         In the context of the state machines, ranges have identifies (the target of the transitions).
2058         When two ranges collide, they have to be split such that each part retain its target
2059         except the intersection that gets the union of the targets.
2060
2061         Handling the union of ranges efficiently is critical because we have to do
2062         it for every NFA node in any subset when building the DFA. The helper
2063         class that does that is MutableRange.
2064
2065         The union of ranges is done efficiently because of preconditions on our list of ranges:
2066         -The ranges must be sorted.
2067         -No range in a list can intersect any other range in the same list.
2068
2069         To merge two ranges, we can go over them in order and split them part by part.
2070         It is easy to find what goes where because they are both sorted and we can
2071         compare the characters of each to know how to move forward.
2072         The time to merge 2 range list is proportional to O(n+m) where 'n' and 'm' are
2073         the number of ranges in each list.
2074
2075         Since taking the union of two lists usually create new ranges, we have to allocate
2076         those somewhere efficiently. To do that, MutableRange support an inline capacity,
2077         which is used for the NFAToDFA Convertion.
2078
2079         ---
2080
2081         With ranges, the NFA-to-DFA conversion changes very little:
2082         -Each NFA nodes contains a list of ranges and each range has a list of targets.
2083         -The subset construction select any number of NFA nodes corresponding to
2084          a single deterministic state.
2085         -For the subset, we can use MutableRange to merge the ranges of every
2086          NFA node in the set. The resulting list has rangeis with targets corresponding
2087          to the union of all the transitions.
2088         -We go over all the ranges the same way we used to go over the transitions.
2089          Since the DFA does not support ranges, the ranges are spread as individual
2090          transitions + fallback transition.
2091
2092         ---
2093
2094         With the efficient merging solved, we still need the actual NFA to use ranges
2095         instead of individual transitions.
2096
2097         I could have used MutableRange for that but it is not the most compact
2098         way to represent ranges that do not need merging.
2099
2100         Instead, the NFA uses a custom structure: ImmutableNFA. It is basically
2101         the same thing, but in that one you cannot change a list of range
2102         after creating it.
2103
2104         Consequently, the sorted ranges in ImmutableNFA are also subsequent
2105         in memory, which is really nice to go over them efficiently
2106         when merging ranges in the NFA-to-DFA conversion. :)
2107
2108         When building the NFA, we don't know all the transitions when creating
2109         each node, BUT we know that we have very few node "unfinished" at any
2110         time. Since we build by going depth-first in the prefix-tree, we only
2111         have the max-depth of live nodes in the worst case.
2112
2113         To help building the NFA out of the prefix tree, we have
2114         ImmutableNFANodeBuilder. It keeps all the informations about a NFA node,
2115         but in a non-compact, mutable form. When a ImmutableNFANodeBuilder
2116         is destroyed, it serialize the information into the immutable NFA.
2117
2118         * WebCore.xcodeproj/project.pbxproj:
2119         * contentextensions/CombinedURLFilters.cpp:
2120         (WebCore::ContentExtensions::generateNFAForSubtree):
2121         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
2122         * contentextensions/ContentExtensionCompiler.cpp:
2123         (WebCore::ContentExtensions::compileRuleList):
2124         * contentextensions/DFA.cpp:
2125         (WebCore::ContentExtensions::DFA::empty):
2126         * contentextensions/DFA.h:
2127         * contentextensions/ImmutableNFA.h: Added.
2128         (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator*):
2129         (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator->):
2130         (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator==):
2131         (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator!=):
2132         (WebCore::ContentExtensions::ImmutableNFA::ConstTargetIterator::operator++):
2133         (WebCore::ContentExtensions::ImmutableNFA::IterableConstTargets::begin):
2134         (WebCore::ContentExtensions::ImmutableNFA::IterableConstTargets::end):
2135         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator*):
2136         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator->):
2137         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator==):
2138         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator!=):
2139         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator++):
2140         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::data):
2141         (WebCore::ContentExtensions::ImmutableNFA::IterableConstRange::begin):
2142         (WebCore::ContentExtensions::ImmutableNFA::IterableConstRange::end):
2143         (WebCore::ContentExtensions::ImmutableNFA::IterableConstRange::debugPrint):
2144         (WebCore::ContentExtensions::ImmutableNFA::transitionsForNode):
2145         (WebCore::ContentExtensions::ImmutableNFA::root):
2146         (WebCore::ContentExtensions::ImmutableNFA::finalize):
2147         (WebCore::ContentExtensions::ImmutableNFA::memoryUsed):
2148         * contentextensions/ImmutableNFANodeBuilder.h: Added.
2149         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::ImmutableNFANodeBuilder):
2150         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::~ImmutableNFANodeBuilder):
2151         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::addTransition):
2152         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::addEpsilonTransition):
2153         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::setActions):
2154         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::operator=):
2155         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::finalize):
2156         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::sinkActions):
2157         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::sinkTransitions):
2158         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::sinkEpsilonTransitions):
2159         * contentextensions/MutableRange.h: Added.
2160         (WebCore::ContentExtensions::MutableRange::MutableRange):
2161         (WebCore::ContentExtensions::MutableRange::operator=):
2162         (WebCore::ContentExtensions::MutableRange::size):
2163         * contentextensions/MutableRangeList.h: Added.
2164         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::operator*):
2165         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::operator->):
2166         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::operator==):
2167         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::operator!=):
2168         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::operator++):
2169         (WebCore::ContentExtensions::MutableRangeList::begin):
2170         (WebCore::ContentExtensions::MutableRangeList::end):
2171         (WebCore::ContentExtensions::MutableRangeList::appendRange):
2172         (WebCore::ContentExtensions::MutableRangeList::extend):
2173         (WebCore::ContentExtensions::MutableRangeList::isEmpty):
2174         (WebCore::ContentExtensions::MutableRangeList::clear):
2175         (WebCore::ContentExtensions::MutableRangeList::debugPrint):
2176         (WebCore::ContentExtensions::MutableRangeList::insertBetween):
2177         (WebCore::ContentExtensions::MutableRangeList::initializeFrom):
2178         * contentextensions/NFA.cpp:
2179         (WebCore::ContentExtensions::NFA::debugPrintDot):
2180         (WebCore::ContentExtensions::NFA::NFA): Deleted.
2181         (WebCore::ContentExtensions::NFA::createNode): Deleted.
2182         (WebCore::ContentExtensions::NFA::memoryUsed): Deleted.
2183         (WebCore::ContentExtensions::NFA::addTransition): Deleted.
2184         (WebCore::ContentExtensions::NFA::addEpsilonTransition): Deleted.
2185         (WebCore::ContentExtensions::NFA::addTransitionsOnAnyCharacter): Deleted.
2186         (WebCore::ContentExtensions::NFA::setActions): Deleted.
2187         (WebCore::ContentExtensions::NFA::graphSize): Deleted.
2188         (WebCore::ContentExtensions::NFA::restoreToGraphSize): Deleted.
2189         (WebCore::ContentExtensions::printRange): Deleted.
2190         (WebCore::ContentExtensions::printTransitions): Deleted.
2191         * contentextensions/NFA.h:
2192         (WebCore::ContentExtensions::NFA::root): Deleted.
2193         (WebCore::ContentExtensions::NFA::addRuleId): Deleted.
2194         * contentextensions/NFANode.h:
2195         * contentextensions/NFAToDFA.cpp:
2196         (WebCore::ContentExtensions::epsilonClosureExcludingSelf):
2197         (WebCore::ContentExtensions::resolveEpsilonClosures):
2198         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetSource::NodeIdSetToUniqueNodeIdSetSource):
2199         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
2200         (WebCore::ContentExtensions::DataConverterWithEpsilonClosure::convert):
2201         (WebCore::ContentExtensions::DataConverterWithEpsilonClosure::extend):
2202         (WebCore::ContentExtensions::createCombinedTransition):
2203         (WebCore::ContentExtensions::canUseFallbackTransition):
2204         (WebCore::ContentExtensions::findBestFallbackTarget):
2205         (WebCore::ContentExtensions::getOrCreateDFANode):
2206         (WebCore::ContentExtensions::NFAToDFA::convert):
2207         (WebCore::ContentExtensions::populateTransitions): Deleted.
2208         * contentextensions/NFAToDFA.h:
2209         * contentextensions/Term.h:
2210         (WebCore::ContentExtensions::Term::Term):
2211         (WebCore::ContentExtensions::Term::generateGraph):
2212         (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
2213         (WebCore::ContentExtensions::Term::Term::generateGraph): Deleted.
2214
2215 2015-06-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2216
2217         Binding generator should allow using JSC::Value for "any" parameter in lieu of ScriptValue
2218         https://bugs.webkit.org/show_bug.cgi?id=146403
2219
2220         Reviewed by Darin Adler.
2221
2222         Covered by existing tests.
2223
2224         Enabling new APIs to use JSC::JSValue by using implicit case from ScriptValue to JSC::JSValue.
2225         Updated binding generator to include ScruptValue header in the needed JSXX.cpp files.
2226         Applied approach to ReadableStreamController.error.
2227
2228         * Modules/streams/ReadableStreamController.h:
2229         (WebCore::ReadableStreamController::error):
2230         * Modules/streams/ReadableStreamController.idl:
2231         * bindings/js/JSReadableStreamControllerCustom.cpp:
2232         (WebCore::constructJSReadableStreamController): Deleted.
2233         * bindings/js/ReadableJSStream.cpp:
2234         (WebCore::ReadableJSStream::error):
2235         * bindings/js/ReadableJSStream.h:
2236         * bindings/scripts/CodeGeneratorJS.pm:
2237         (JSValueToNative):
2238         * bindings/scripts/test/JS/JSTestObj.cpp:
2239
2240 2015-06-29  Anders Carlsson  <andersca@apple.com>
2241
2242         Use DISPATCH_SOURCE_TYPE_MEMORYPRESSURE instead of DISPATCH_SOURCE_TYPE_MEMORYSTATUS
2243         https://bugs.webkit.org/show_bug.cgi?id=146413
2244         rdar://problem/21295036
2245
2246         Reviewed by Andreas Kling.
2247
2248         Replace SPI with API.
2249
2250         * WebCore.xcodeproj/project.pbxproj:
2251         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2252         (WebCore::MemoryPressureHandler::install):
2253         * platform/mac/WebCoreSystemInterface.h:
2254         * platform/spi/cocoa/DispatchSPI.h: Removed.
2255
2256 2015-06-29  Andreas Kling  <akling@apple.com>
2257
2258         [iOS] Pausing a media element should discard buffered data immediately if under memory pressure.
2259         <https://webkit.org/b/146410>
2260         <rdar://problem/20366883>
2261
2262         Reviewed by Darin Adler.
2263
2264         When moving a media element into paused state, call purgeBufferedDataIfPossible()
2265         right away if the system is under memory pressure.
2266
2267         This ensures that mediaserverd drops its forward-looking frame queue right
2268         away instead of waiting for a new pressure notification.
2269
2270         * html/HTMLMediaElement.cpp:
2271         (WebCore::HTMLMediaElement::pauseInternal):
2272
2273 2015-06-29  Matt Rajca  <mrajca@apple.com>
2274
2275         Media Session: Media elements should report a null session for Default sessions
2276         https://bugs.webkit.org/show_bug.cgi?id=146373
2277
2278         Reviewed by Eric Carlson.
2279
2280         If a media element's current session is a 'Default' media session, its session property should report null in
2281         the JavaScript API.
2282
2283         * Modules/mediasession/MediaSession.h:
2284         * html/HTMLMediaElement.cpp:
2285         (WebCore::HTMLMediaElement::session):
2286
2287 2015-06-29  Said Abou-Hallawa  <sabouhallawa@apple.com>
2288
2289         [Mac] Disable QTKit by default.
2290         https://bugs.webkit.org/show_bug.cgi?id=146352
2291
2292         Reviewed by Darin Adler.
2293         
2294         Fix the the requirement for enabling QTKit and AVFoundation.
2295
2296         * page/Settings.cpp:
2297         (WebCore::invalidateAfterGenericFamilyChange): Remove the requirement
2298         for enabling QTKit and AVFoundation. The initial state of QTKit should
2299         be disabled on all OS X ports. And the initial state of AVFoundation
2300         should be enabled  on all OS X ports.
2301
2302 2015-06-29  Hyungwook Lee  <hyungwook.lee@navercorp.com>
2303
2304         [EFL] Purge unused favicons from IconDatabase after 30 days.
2305         https://bugs.webkit.org/show_bug.cgi?id=146334
2306
2307         Reviewed by Gyuyoung Kim.
2308
2309         We need purge unused favicons from IconDatabase for database size control.
2310
2311         * loader/icon/IconDatabase.cpp:
2312         (WebCore::IconDatabase::performURLImport):
2313
2314 2015-06-26  Matt Rajca  <mrajca@apple.com>
2315
2316         Add support for 'Default' media session types
2317         https://bugs.webkit.org/show_bug.cgi?id=146355
2318
2319         Reviewed by Darin Adler.
2320
2321         * Modules/mediasession/MediaSession.cpp:
2322         (WebCore::MediaSession::MediaSession): Added a new constructor for creating 'Default' media sessions.
2323         (WebCore::MediaSession::kind): 'Default' media sessions are represented by an empty string.
2324         * Modules/mediasession/MediaSession.h:
2325         * dom/Document.cpp:
2326         (WebCore::Document::defaultMediaSession): Lazily construct the default media session.
2327         * dom/Document.h:
2328         * html/HTMLMediaElement.cpp:
2329         (WebCore::HTMLMediaElement::HTMLMediaElement): New media elements are assigned to the 'Default' media session.
2330
2331 2015-06-28  Andreas Kling  <akling@apple.com>
2332
2333         [iOS] Drop buffered data in paused media elements on memory pressure.
2334         <https://webkit.org/b/146369>
2335         <rdar://problem/20366883>
2336
2337         Reviewed by Eric Carlson.
2338
2339         To avoid getting crushed under mediaserverd memory growth when viewing
2340         a page with multiple media elements, add a step to the memory pressure
2341         handler that drops buffered data from all media elements that are
2342         not currently playing.
2343
2344         On a test page with a bunch of embedded YouTube videos, this pass frees
2345         up ~4MB per paused video when the system memory pressure hits.
2346
2347         * html/HTMLMediaElement.cpp:
2348         (WebCore::HTMLMediaElement::allMediaElements):
2349         (WebCore::HTMLMediaElement::HTMLMediaElement):
2350         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2351         (WebCore::HTMLMediaElement::purgeBufferedDataIfPossible):
2352         * html/HTMLMediaElement.h:
2353         * platform/MemoryPressureHandler.cpp:
2354         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2355
2356 2015-06-28  Chris Dumez  <cdumez@apple.com>
2357
2358         Crash: com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::CachedFrameBase::restore + 333
2359         https://bugs.webkit.org/show_bug.cgi?id=146388
2360         <rdar://problem/21567343>
2361
2362         Reviewed by Darin Adler.
2363
2364         Pages that are currently loading are not supposed to go into the
2365         PageCache. However, PageCache::canCache() only checks if the
2366         FrameLoader's documentLoader is loading. If the subframe is in
2367         provisional load stage, we would fail to detect that the frame is
2368         actually loading because the FrameLoader active documentLoader would
2369         be the provisional documentLoader, not the regular documentLoader.
2370         Therefore, the page would get added to the PageCache and the frame
2371         would keep loading while in the PageCache.
2372
2373         On http://www.audiusa.com/models, this is what was happening. It was
2374         crashing because the subframe would finish loading while in the
2375         PageCache, in which case we would fire the 'load' event and the
2376         content 'load' event handler would then proceed to remove the iframe.
2377         Upon restoring the PageCache entry, we would run into trouble as we
2378         would have a CachedFrame whose Frame has been removed.
2379
2380         The solution proposed is to prevent page-caching if a subframe is in
2381         provisional load stage.
2382
2383         Test: http/tests/navigation/page-cache-iframe-provisional-load.html
2384
2385         * history/PageCache.cpp:
2386         (WebCore::logCanCacheFrameDecision):
2387         (WebCore::PageCache::canCachePageContainingThisFrame):
2388         * page/DiagnosticLoggingKeys.cpp:
2389         (WebCore::DiagnosticLoggingKeys::provisionalLoadKey):
2390         * page/DiagnosticLoggingKeys.h:
2391
2392 2015-06-28  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2393
2394         [Streams API] Add support for chunks with customized sizes
2395         https://bugs.webkit.org/show_bug.cgi?id=146312
2396
2397         Reviewed by Darin Adler.
2398
2399         Covered by rebased tests.
2400
2401         * bindings/js/ReadableJSStream.cpp:
2402         (WebCore::ReadableJSStream::read): Decrement totalQueueSize with the chunk specific size.
2403         (WebCore::ReadableJSStream::enqueue): Calls retrieveSize, enqueue chunk with its size and increment totalQueueSize.
2404         (WebCore::ReadableJSStream::retrieveChunkSize): Calls size JS callback and convert it to double.
2405         * bindings/js/ReadableJSStream.h:
2406
2407 2015-06-28  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2408
2409         [Streams API]Remove ReadableStreamController.close custom binding
2410         https://bugs.webkit.org/show_bug.cgi?id=146380
2411
2412         Reviewed by Darin Adler.
2413
2414         No change in behavior.
2415
2416         * Modules/streams/ReadableStreamController.h:
2417         (WebCore::ReadableStreamController::close): Calling ReadableJSStream close method.
2418         * Modules/streams/ReadableStreamController.idl: Removed Custom.
2419         * bindings/js/JSReadableStreamControllerCustom.cpp:
2420         (WebCore::JSReadableStreamController::close): Deleted.
2421         * bindings/js/ReadableJSStream.cpp:
2422         (WebCore::ReadableJSStream::close): Moved custom binding code here.
2423         * bindings/js/ReadableJSStream.h:
2424
2425 2015-06-27  Chris Fleizach  <cfleizach@apple.com>
2426
2427         AX: implement @aria-roledescription
2428         https://bugs.webkit.org/show_bug.cgi?id=146274
2429
2430         Reviewed by Darin Adler.
2431
2432         Add support for aria-roledescription.
2433
2434         Test: accessibility/aria-roledescription.html
2435
2436         * accessibility/AccessibilityObject.cpp:
2437         (WebCore::AccessibilityObject::hasHighlighting):
2438         (WebCore::AccessibilityObject::roleDescription):
2439         (WebCore::nodeHasPresentationRole):
2440         * accessibility/AccessibilityObject.h:
2441         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2442         (-[WebAccessibilityObjectWrapper _accessibilityMaxValue]):
2443         (-[WebAccessibilityObjectWrapper accessibilityRoleDescription]):
2444         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
2445         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2446         (-[WebAccessibilityObjectWrapper roleDescription]):
2447
2448 2015-06-27  Darin Adler  <darin@apple.com>
2449
2450         Fix the build.
2451
2452         * platform/network/cf/ResourceErrorCF.cpp:
2453         (WebCore::ResourceError::cfError): Take out log statement. Add FIXME comment
2454         that explains part of the reason we may get null here.
2455         * platform/network/mac/ResourceErrorMac.mm:
2456         (WebCore::createNSErrorFromResourceErrorBase): Ditto.
2457
2458 2015-06-27  David Kilzer  <ddkilzer@apple.com>
2459
2460         Crash in WebCore::ResourceError::cfError() after provisional load failed
2461         <http://webkit.org/b/146384>
2462
2463         Reviewed by Darin Adler.
2464
2465         This is a speculative fix based on the crashing stack.
2466
2467         * platform/network/cf/ResourceErrorCF.cpp:
2468         (WebCore::ResourceError::cfError): Add NULL check.
2469         * platform/network/mac/ResourceErrorMac.mm:
2470         (WebCore::createNSErrorFromResourceErrorBase): Add nil check in
2471         case we ever turn off USE(CFNETWORK) for iOS.
2472
2473 2015-06-27  Eric Carlson  <eric.carlson@apple.com>
2474
2475         [Mac] Only flag a video element as eligible for auto-play to AppleTV one time
2476         https://bugs.webkit.org/show_bug.cgi?id=146386
2477
2478         Reviewed by Brent Fulgham.
2479
2480         * Modules/mediasession/WebMediaSessionManager.cpp:
2481         (WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients): Drive-by fix - early 
2482           return when there are no clients.
2483
2484         * html/HTMLMediaElement.cpp:
2485         (WebCore::HTMLMediaElement::pendingActionTimerFired): Set m_failedToPlayToWirelessTarget if the
2486           media engine is still unable to play to the wireless target.
2487         (WebCore::HTMLMediaElement::prepareForLoad): Clear m_failedToPlayToWirelessTarget.
2488         (WebCore::HTMLMediaElement::mediaState): Don't set the ExternalDeviceAutoPlayCandidate flag
2489           if m_failedToPlayToWirelessTarget is true.
2490         * html/HTMLMediaElement.h:
2491
2492 2015-06-27  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2493
2494         [Streams API] Implement ReadableStreamController.desiredSize property
2495         https://bugs.webkit.org/show_bug.cgi?id=146311
2496
2497         Reviewed by Darin Adler.
2498
2499         Covered by rebased tests.
2500
2501         * Modules/streams/ReadableStreamController.h: Adding desiredSize getter.
2502         (WebCore::ReadableStreamController::desiredSize): Ditto.
2503         * Modules/streams/ReadableStreamController.idl: Added desiredSize attribute.
2504
2505 2015-06-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2506
2507         [GTK][SOUP] Implement WebCore::PublicSuffix for soup and enable PUBLIC_SUFFIX_LIST for GTK+
2508         https://bugs.webkit.org/show_bug.cgi?id=146318
2509
2510         Reviewed by Sergio Villar Senin.
2511
2512         This is covered by unit tests.
2513
2514         * PlatformGTK.cmake:
2515         * platform/soup/PublicSuffixSoup.cpp: Added.
2516         (WebCore::isPublicSuffix):
2517         (WebCore::topPrivatelyControlledDomain):
2518
2519 2015-06-26  Myles C. Maxfield  <mmaxfield@apple.com>
2520
2521         [iOS] AppleGothic has been superseded by Apple SD Gothic Neo
2522         https://bugs.webkit.org/show_bug.cgi?id=146372
2523         <rdar://problem/21574004>
2524
2525         Reviewed by Dean Jackson.
2526
2527         Test: fast/text/hangul-generic-font-families.html
2528
2529         * page/mac/SettingsMac.mm:
2530         (WebCore::Settings::initializeDefaultFontFamilies):
2531
2532 2015-06-26  Matt Daiter  <mdaiter@apple.com>
2533
2534         Supporting getStartDate and added tests
2535         https://bugs.webkit.org/show_bug.cgi?id=145676
2536         <rdar://problem/20876076>
2537
2538         Reviewed by Brent Fulgham.
2539
2540         Test: http/tests/media/hls/video-controller-getStartDate.html
2541
2542         * bindings/js/JSDOMBinding.cpp:
2543         (WebCore::jsDateOrNaN):
2544         * bindings/js/JSDOMBinding.h:
2545         * bindings/scripts/CodeGeneratorJS.pm: Added features to return 
2546         NaN for Date
2547         * bindings/scripts/CodeGeneratorGObject.pm: Needed to add
2548         type checking code for GObject (no date)
2549         (NativeToJSValue):
2550         * bindings/scripts/IDLAttributes.txt: 
2551         * html/HTMLMediaElement.cpp: Added getStartDate function
2552         (WebCore::HTMLMediaElement::getStartDate):
2553         * html/HTMLMediaElement.h: Needed to add declarations
2554         * html/HTMLMediaElement.idl: Needed to modify for returning NaN
2555         * platform/graphics/MediaPlayer.cpp:
2556         (WebCore::MediaPlayer::getStartDate):
2557         * platform/graphics/MediaPlayer.h:
2558         * platform/graphics/MediaPlayerPrivate.h: Added in Mac-specific platform
2559         (WebCore::MediaPlayerPrivateInterface::getStartDate):
2560         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2561         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2562         (WebCore::MediaPlayerPrivateAVFoundationObjC::getStartDate):
2563
2564 2015-06-26  Beth Dakin  <bdakin@apple.com>
2565
2566         WebPage::getPositionInformation() should not copy an image that is larger than the  
2567         screen
2568         https://bugs.webkit.org/show_bug.cgi?id=146367
2569
2570         Reviewed by Tim Horton.
2571
2572         Export the rect version of this function too.
2573         * platform/graphics/GraphicsContext.h:
2574
2575 2015-06-26  Eric Carlson  <eric.carlson@apple.com>
2576
2577         [Mac] Muted videos should not automatically play to AppleTV
2578         https://bugs.webkit.org/show_bug.cgi?id=146366
2579
2580         Reviewed by Dean Jackson.
2581
2582         * html/HTMLMediaElement.cpp:
2583         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_initiallyMuted.
2584         (WebCore::HTMLMediaElement::scheduleDelayedAction): Support CheckMediaState.
2585         (WebCore::HTMLMediaElement::setReadyState): Set m_initiallyMuted to true if the element is
2586           muted or the volume is less than 5%.
2587         (WebCore::HTMLMediaElement::setMuted): Update media state asynchronously so multiple state
2588           changes can be coalesced.
2589         (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): Ditto.
2590         (WebCore::HTMLMediaElement::setPlaying): Ditto.
2591         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Ditto.
2592         (WebCore::HTMLMediaElement::removeEventListener): Ditto.
2593         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Ditto.
2594         (WebCore::HTMLMediaElement::updateMediaState): Update after a timer when passed UpdateMediaState::Asynchronously.
2595         (WebCore::HTMLMediaElement::mediaState): Don't set the ExternalDeviceAutoPlayCandidate flag if
2596           m_initiallyMuted is true.
2597         * html/HTMLMediaElement.h:
2598         * html/HTMLMediaElementEnums.h:
2599
2600 2015-06-26  Daniel Bates  <dabates@apple.com>
2601
2602         Rolling out r184660
2603         https://bugs.webkit.org/show_bug.cgi?id=145200
2604
2605         Reverting r184660 because it caused a regression.
2606
2607         * English.lproj/Localizable.strings:
2608         * html/TextFieldInputType.cpp:
2609         (WebCore::TextFieldInputType::createAutoFillButton): Deleted.
2610         * platform/LocalizedStrings.cpp:
2611         (WebCore::AXAutoFillButtonText): Deleted.
2612         * platform/LocalizedStrings.h:
2613         * platform/efl/LocalizedStringsEfl.cpp:
2614         (WebCore::AXAutoFillButtonText): Deleted.
2615         * platform/gtk/LocalizedStringsGtk.cpp:
2616         (WebCore::AXAutoFillButtonText): Deleted.
2617
2618 2015-06-26  Daniel Bates  <dabates@apple.com>
2619
2620         Rolling out r185881
2621         https://bugs.webkit.org/show_bug.cgi?id=146243
2622         And
2623         r185828
2624         https://bugs.webkit.org/show_bug.cgi?id=145241
2625
2626         Reverting r185881 and r185828 because the latter caused a regression.
2627
2628         * accessibility/AccessibilityRenderObject.cpp:
2629         (WebCore::AccessibilityRenderObject::accessibilityTextFieldDecorationHitTest): Deleted.
2630         (WebCore::AccessibilityRenderObject::accessibilityHitTest): Deleted.
2631         * accessibility/AccessibilityRenderObject.h:
2632
2633 2015-06-26  Dean Jackson  <dino@apple.com>
2634
2635         No audio on animated page with the attached fixed layout epub
2636         https://bugs.webkit.org/show_bug.cgi?id=146365
2637
2638         Reviewed by Eric Carlson.
2639
2640         The new restriction RequireUserGestureForAudioRateChange conflicted
2641         with existing clients who expected RequireUserGestureForRateChange
2642         to allow autoplaying audio. Update the logic to ensure that
2643         RequireUserGestureForRateChange covers all media when set to
2644         false.
2645
2646         This may require a revisit once we're using RequireUserGestureForAudioRateChange
2647         in production, because the global setting will trump that, and
2648         most clients have the global setting to false. We'll need to come
2649         up with a way to allow legacy clients to preserve their behaviour.
2650
2651         * html/HTMLMediaElement.cpp:
2652         (WebCore::HTMLMediaElement::HTMLMediaElement): Only restrict audio
2653         if RequireUserGestureForRateChange is also false.
2654
2655 2015-06-25  Anders Carlsson  <andersca@apple.com>
2656
2657         Get rid of ScrollbarThemeClient now that it's unused
2658         https://bugs.webkit.org/show_bug.cgi?id=146327
2659
2660         Reviewed by Beth Dakin.
2661
2662         * WebCore.vcxproj/WebCore.vcxproj:
2663         * WebCore.vcxproj/WebCore.vcxproj.filters:
2664         * WebCore.xcodeproj/project.pbxproj:
2665         * platform/Scrollbar.cpp:
2666         (WebCore::Scrollbar::scrollbarOverlayStyle): Deleted.
2667         (WebCore::Scrollbar::isScrollableAreaActive): Deleted.
2668         (WebCore::Scrollbar::isScrollViewScrollbar): Deleted.
2669         (WebCore::Scrollbar::root): Deleted.
2670         * platform/Scrollbar.h:
2671         (WebCore::Scrollbar::isCustomScrollbar):
2672         (WebCore::Scrollbar::orientation):
2673         (WebCore::Scrollbar::value):
2674         (WebCore::Scrollbar::currentPos):
2675         (WebCore::Scrollbar::visibleSize):
2676         (WebCore::Scrollbar::totalSize):
2677         (WebCore::Scrollbar::maximum):
2678         (WebCore::Scrollbar::controlSize):
2679         (WebCore::Scrollbar::lineStep):
2680         (WebCore::Scrollbar::pageStep):
2681         (WebCore::Scrollbar::pressedPart):
2682         (WebCore::Scrollbar::hoveredPart):
2683         (WebCore::Scrollbar::enabled):
2684         (WebCore::Scrollbar::styleChanged):
2685         (WebCore::Scrollbar::isAlphaLocked):
2686         (WebCore::Scrollbar::setIsAlphaLocked):
2687         * platform/ScrollbarTheme.h:
2688         * platform/ScrollbarThemeClient.h: Removed.
2689         (WebCore::ScrollbarThemeClient::~ScrollbarThemeClient): Deleted.
2690         * platform/mac/ScrollbarThemeMac.mm:
2691         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
2692         * rendering/RenderScrollbarTheme.cpp:
2693
2694 2015-06-26  Chris Dumez  <cdumez@apple.com>
2695
2696         Prevent new loads while in PageCache (or being added to PageCache)
2697         https://bugs.webkit.org/show_bug.cgi?id=146299
2698         <rdar://problem/21523788>
2699
2700         Reviewed by Darin Adler.
2701
2702         Generalize the change in r185337 to prevent new loads while in the
2703         PageCache (or being added to the PageCache), instead of merely
2704         preventing new loads in pagehide event handlers. We should never
2705         have any pages that are still loading inside the PageCache.
2706
2707         The fix in r185337 was apparently insufficient to address the
2708         problem so generalizing the check / policy will hopefully catch
2709         more cases where content is able to start loads while being added
2710         to the PageCache. This patch also removes some of the complexity
2711         added in r185337 as it is no longer needed.
2712
2713         No new tests, already covered by:
2714         http/tests/navigation/image-load-in-pagehide-handler.html
2715         http/tests/navigation/subframe-pagehide-handler-starts-load.html
2716         http/tests/navigation/subframe-pagehide-handler-starts-load2.html
2717
2718         * loader/FrameLoader.cpp:
2719         (WebCore::FrameLoader::stopLoading):
2720         (WebCore::FrameLoader::loadURL):
2721         (WebCore::FrameLoader::loadWithDocumentLoader):
2722         (WebCore::FrameLoader::stopAllLoaders):
2723         (WebCore::FrameLoader::handleBeforeUnloadEvent):
2724         (WebCore::FrameLoader::FrameLoader): Deleted.
2725         * loader/FrameLoader.h:
2726         (WebCore::FrameLoader::pageDismissalEventBeingDispatched):
2727         * loader/ImageLoader.cpp:
2728         (WebCore::pageIsBeingDismissed):
2729         * loader/cache/CachedResource.cpp:
2730         (WebCore::CachedResource::load):
2731         * loader/cache/CachedResourceLoader.cpp:
2732         (WebCore::CachedResourceLoader::requestImage):
2733         * page/Page.cpp:
2734         (WebCore::Page::inPageCache):
2735         * page/Page.h:
2736         (WebCore::Page::group): Deleted.
2737
2738 2015-06-26  Simon Fraser  <simon.fraser@apple.com>
2739
2740         [OS X] Change the layer tiling threshold from 2000 to 2048 pixels
2741         https://bugs.webkit.org/show_bug.cgi?id=146353
2742
2743         Reviewed by Tim Horton.
2744
2745         Programmers love powers of two.
2746
2747         * platform/graphics/ca/GraphicsLayerCA.cpp:
2748
2749 2015-06-26  Myles C. Maxfield  <mmaxfield@apple.com>
2750
2751         [Cocoa] Sans-serif generic font family should map to PingFang
2752         https://bugs.webkit.org/show_bug.cgi?id=146333
2753         <rdar://problem/21521217>
2754
2755         Reviewed by Alexey Proskuryakov.
2756
2757         Also performs a little bit of cleanup.
2758
2759         Test: fast/text/han-generic-font-families.html
2760
2761         * page/mac/SettingsMac.mm:
2762         (WebCore::sansSerifTraditionalHanFontFamily):
2763         (WebCore::sansSerifSimplifiedHanFontFamily):
2764         (WebCore::Settings::initializeDefaultFontFamilies):
2765
2766 2015-06-26  Per Arne Vollan  <peavo@outlook.com>
2767
2768         [Curl] Compile errors; ResourceResponseBase::resourceLoadTiming() has changed return type.
2769         https://bugs.webkit.org/show_bug.cgi?id=146343
2770
2771         Reviewed by Brent Fulgham.
2772
2773         * platform/network/curl/ResourceHandleManager.cpp:
2774         (WebCore::calculateWebTimingInformations):
2775         (WebCore::headerCallback):
2776         (WebCore::ResourceHandleManager::initializeHandle):
2777         (WebCore::ResourceHandleManager::initCookieSession):
2778         (WebCore::sockoptfunction): Deleted.
2779
2780 2015-06-26  Chris Fleizach  <cfleizach@apple.com>
2781
2782         iOS speech synthesizer should expose names
2783         https://bugs.webkit.org/show_bug.cgi?id=146319
2784
2785         Reviewed by Mario Sanchez Prada.
2786
2787         Use newer API to get the name and identifier of each voice asset.
2788
2789         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
2790         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
2791
2792 2015-06-26  Csaba Osztrogonác  <ossy@webkit.org>
2793
2794         [EFL] Remove unnecessary overriden methods from ScrollBarEfl
2795         https://bugs.webkit.org/show_bug.cgi?id=146342
2796
2797         Reviewed by Gyuyoung Kim.
2798
2799         * platform/efl/ScrollbarEfl.cpp:
2800         (WebCore::ScrollbarEfl::setParent): Deleted.
2801         (WebCore::ScrollbarEfl::setFrameRect): Deleted.
2802         (WebCore::ScrollbarEfl::frameRectsChanged): Deleted.
2803         (WebCore::ScrollbarEfl::invalidate): Deleted.
2804         * platform/efl/ScrollbarEfl.h:
2805
2806 2015-06-26  Csaba Osztrogonác  <ossy@webkit.org>
2807
2808         Convert some of WebCore/dom over to range-for loops
2809         https://bugs.webkit.org/show_bug.cgi?id=126250
2810
2811         Reviewed by Darin Adler.
2812
2813         Based on the original patch of Sam Weinig <sam@webkit.org>.
2814
2815         * dom/ContainerNode.cpp:
2816         (WebCore::ContainerNode::replaceChild):
2817         (WebCore::willRemoveChildren):
2818         (WebCore::ContainerNode::appendChild):
2819         * dom/MutationObserver.cpp:
2820         (WebCore::MutationObserver::disconnect):
2821         (WebCore::MutationObserver::getObservedNodes):
2822         (WebCore::MutationObserver::deliver):
2823         * dom/MutationObserverInterestGroup.cpp:
2824         (WebCore::MutationObserverInterestGroup::isOldValueRequested):
2825         (WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
2826         * dom/MutationObserverRegistration.cpp:
2827         (WebCore::MutationObserverRegistration::clearTransientRegistrations):
2828         (WebCore::MutationObserverRegistration::addRegistrationNodesToSet):
2829         * dom/Node.cpp:
2830         (WebCore::Node::dumpStatistics):
2831         (WebCore::collectMatchingObserversForMutation):
2832         (WebCore::Node::notifyMutationObserversNodeWillDetach):
2833
2834 2015-06-25  Lucas Forschler  <lforschler@apple.com>
2835
2836         Unreviewed build fix.
2837         
2838         * platform/audio/VectorMath.cpp:
2839         (WebCore::VectorMath::vsmul):
2840         (WebCore::VectorMath::vadd):
2841         (WebCore::VectorMath::vmul):
2842         (WebCore::VectorMath::zvmul):
2843
2844 2015-06-25  Stephanie Lewis  <slewis@apple.com>
2845
2846         Build fix.
2847
2848         Unreviewed.
2849
2850         * platform/audio/DirectConvolver.cpp:
2851         (WebCore::DirectConvolver::process):
2852
2853 2015-06-25  Chris Fleizach  <cfleizach@apple.com>
2854
2855         AX: improve list heuristics (presentational use versus actual lists)
2856         https://bugs.webkit.org/show_bug.cgi?id=134187
2857
2858         Rolling this change back in. 
2859         It was taken out to allow clients to have time to update their expectations of what is a list vs. a group
2860
2861         Test: accessibility/list-detection2.html
2862
2863         * accessibility/AccessibilityList.cpp:
2864         (WebCore::AccessibilityList::isDescriptionList):
2865         (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):
2866         (WebCore::AccessibilityList::determineAccessibilityRole):
2867         * accessibility/AccessibilityList.h:
2868
2869 2015-06-25  Brent Fulgham  <bfulgham@apple.com>
2870
2871         Unreviewed build fix after r185964.
2872
2873         Correct a few pointers-that-should-be-references-now errors.
2874
2875         * platform/win/PopupMenuWin.cpp:
2876         (WebCore::AccessiblePopupMenu::accLocation):
2877         (WebCore::AccessiblePopupMenu::accHitTest):
2878
2879 2015-06-25  Doug Russell  <d_russell@apple.com>
2880
2881         Bug 146300 AX: AccessibilityObject focus events that don't cause a selection 
2882         change can leave m_isSynchronizingSelection set to true
2883         https://bugs.webkit.org/show_bug.cgi?id=146300
2884
2885         Reviewed by Chris Fleizach.
2886
2887         Added a clearTextSelectionIntent() convenience function to be used after any
2888         event that can, but isn't guaranteed to result in a selection change. Matches
2889         calls to setTextSelectionIntent() convenience function.
2890         Added support for tests listening for focus change notifications.
2891
2892         Test: platform/mac/accessibility/focus-setting-selection-syncronizing-not-clearing.html
2893
2894         * accessibility/AccessibilityRenderObject.cpp:
2895         (WebCore::clearTextSelectionIntent):
2896         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2897         (WebCore::AccessibilityRenderObject::setFocused):
2898         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
2899         * accessibility/mac/AXObjectCacheMac.mm:
2900         (WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
2901
2902 2015-06-25  Alex Christensen  <achristensen@webkit.org>
2903
2904         [Content Extensions] Add a way to match a domain but not subdomains
2905         https://bugs.webkit.org/show_bug.cgi?id=146241
2906         rdar://problem/21557754
2907
2908         Reviewed by Darin Adler.
2909
2910         This patch makes it possible to have a trigger with an if-domain apply to sub2.sub1.webkit.org
2911         but not sub1.webkit.org by making the domains default to only applying to the domain and not subdomains.
2912         To make a domain apply to a domain and any subdomains, the domain must begin with a '*'.
2913
2914         * contentextensions/CombinedURLFilters.cpp:
2915         (WebCore::ContentExtensions::CombinedURLFilters::addDomain):
2916         (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
2917         Make domains apply only to the exact domain unless there is a * at the beginning,
2918         in which case they apply to the domain and any subdomains.
2919
2920 2015-06-25  Simon Fraser  <simon.fraser@apple.com>
2921
2922         [iOS WK2] Swiping back just after scrolling can cause some tiles to disappear
2923         https://bugs.webkit.org/show_bug.cgi?id=146329
2924         rdar://problem/21233010
2925
2926         Reviewed by Tim Horton.
2927
2928         Have the Compositing log channel dump the visible rect used for layer flushing.
2929
2930         * rendering/RenderLayerCompositor.cpp:
2931         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2932
2933 2015-06-25  Brent Fulgham  <bfulgham@apple.com>
2934
2935         [WIN] Enable WEB_TIMING API
2936         https://bugs.webkit.org/show_bug.cgi?id=146330
2937         <rdar://problem/21530765>
2938
2939         Reviewed by Dean Jackson.
2940
2941         Tested by internal HLS tests.
2942
2943         Enable WEB_TIMING features on Windows by activating the feature flag,
2944         and correcting some build errors.
2945
2946         * platform/network/cf/ResourceHandleCFNet.cpp:
2947         (WebCore::ResourceHandle::start): "setCollectionTimingData" is only
2948         defined for PLATFORM(COCOA).
2949         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
2950         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
2951         The 'ResourceHandle::getConnectionTimingData' method is only defined
2952         for PLATFORM(COCOA).
2953
2954 2015-06-25  Dean Jackson  <dino@apple.com>
2955
2956         Inline media controls disappear when returning a video to inline
2957         https://bugs.webkit.org/show_bug.cgi?id=146328
2958         <rdar://problem/21142862>
2959
2960         Reviewed by Tim Horton.
2961
2962         We were getting into a state where the controls were being
2963         hidden via a timer while we were in fullscreen or on
2964         another tab. Meanwhile, we could exit from such
2965         a condition to a point where the controls were
2966         not visible, but not completely removed from the DOM, confusing
2967         the logic that decided whether to show them on tap.
2968
2969         * Modules/mediacontrols/mediaControlsApple.js:
2970         (Controller.prototype.hideControls): If we are in the act of hiding
2971         controls, we can clear any existing timers that are going to try
2972         to hide them again.
2973         (Controller.prototype.resetHideControlsTimer): Make sure we null
2974         out the hideTimer object, since we look at its value often to
2975         decide whether or not a timer exists.
2976         * Modules/mediacontrols/mediaControlsiOS.js:
2977         (ControllerIOS.prototype.handlePlayButtonTouchEnd): If the user
2978         taps play, then we should call showControls, which resets the hide
2979         timers amongst other things. We need to do this due to the next change,
2980         so that a timer started before we pressed play doesn't cause the
2981         controls to instantly disappear as soon as we start playing.
2982         (ControllerIOS.prototype.handleWrapperTouchStart): We can get into
2983         the state where controls are invisible but still in the tree. Since the
2984         controlsAreHidden() logic only looks for the latter, we need to also
2985         look for invisible when the user taps for the controls. Yes, this
2986         naming doesn't make much sense :(
2987
2988 2015-06-25  Joseph Pecoraro  <pecoraro@apple.com>
2989
2990         [Mac] Web Inspector: Window dragging on toolbar should behave more like native window dragging
2991         https://bugs.webkit.org/show_bug.cgi?id=146324
2992
2993         Reviewed by Timothy Hatcher.
2994
2995         * inspector/InspectorFrontendClient.h:
2996         * inspector/InspectorFrontendClientLocal.h:
2997         Do nothing or pass it up to the the frontend client.
2998
2999         * inspector/InspectorFrontendHost.h:
3000         * inspector/InspectorFrontendHost.idl:
3001         * inspector/InspectorFrontendHost.cpp:
3002         (WebCore::InspectorFrontendHost::startWindowDrag):
3003         Add a new host function to get native window dragging behavior.
3004
3005 2015-06-25  Tim Horton  <timothy_horton@apple.com>
3006
3007         Viewport units are wrong when scaled in 2-up mode, cause content to hop around on apple.com/music
3008         https://bugs.webkit.org/show_bug.cgi?id=146322
3009         <rdar://problem/21413884>
3010
3011         Reviewed by Simon Fraser.
3012
3013         * page/FrameView.cpp:
3014         (WebCore::FrameView::viewportSizeForCSSViewportUnits):
3015         Use the fixed layout size, if enabled, instead of the visibleContentRect,
3016         for the viewport unit size. This ensures that viewport units take up the whole
3017         fixed-layout viewport, not just the size of the view scaled by the page scale
3018         (which visibleContentRect provides).
3019
3020 2015-06-25  Eric Carlson  <eric.carlson@apple.com>
3021
3022         [Mac] AirPlay menu button still doesn't always show on page load
3023         https://bugs.webkit.org/show_bug.cgi?id=146325
3024
3025         Reviewed by Dean Jackson.
3026
3027         * html/HTMLMediaElement.cpp:
3028         (WebCore::HTMLMediaElement::mediaState): A player that can't currently play to a wireless 
3029           target does require target monitoring if an availability event listner has been registered,
3030           otherwise we may not register for availability change notifications.
3031
3032 2015-06-25  Anders Carlsson  <andersca@apple.com>
3033
3034         Stop using ScrollbarThemeClient and just use Scrollbar directly
3035         https://bugs.webkit.org/show_bug.cgi?id=146320
3036
3037         Reviewed by Tim Horton.
3038
3039         * page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm:
3040         (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars):
3041         * platform/ScrollableArea.cpp:
3042         (WebCore::ScrollableArea::setScrollbarOverlayStyle):
3043         * platform/Scrollbar.cpp:
3044         (WebCore::Scrollbar::Scrollbar):
3045         (WebCore::Scrollbar::~Scrollbar):
3046         (WebCore::Scrollbar::offsetDidChange):
3047         (WebCore::Scrollbar::updateThumb):
3048         (WebCore::Scrollbar::paint):
3049         (WebCore::thumbUnderMouse):
3050         (WebCore::Scrollbar::autoscrollPressedPart):
3051         (WebCore::Scrollbar::startTimerIfNeeded):
3052         (WebCore::Scrollbar::moveThumb):
3053         (WebCore::Scrollbar::setHoveredPart):
3054         (WebCore::Scrollbar::setPressedPart):
3055         (WebCore::Scrollbar::mouseMoved):
3056         (WebCore::Scrollbar::mouseUp):
3057         (WebCore::Scrollbar::mouseDown):
3058         (WebCore::Scrollbar::setEnabled):
3059         * platform/ScrollbarTheme.h:
3060         (WebCore::ScrollbarTheme::updateEnabledState):
3061         (WebCore::ScrollbarTheme::paint):
3062         (WebCore::ScrollbarTheme::hitTest):
3063         (WebCore::ScrollbarTheme::updateScrollbarOverlayStyle):
3064         (WebCore::ScrollbarTheme::invalidateParts):
3065         (WebCore::ScrollbarTheme::invalidatePart):
3066         (WebCore::ScrollbarTheme::paintTickmarks):
3067         (WebCore::ScrollbarTheme::shouldCenterOnThumb):
3068         (WebCore::ScrollbarTheme::shouldSnapBackToDragOrigin):
3069         (WebCore::ScrollbarTheme::shouldDragDocumentInsteadOfThumb):
3070         (WebCore::ScrollbarTheme::thumbPosition):
3071         (WebCore::ScrollbarTheme::thumbLength):
3072         (WebCore::ScrollbarTheme::trackPosition):
3073         (WebCore::ScrollbarTheme::trackLength):
3074         (WebCore::ScrollbarTheme::registerScrollbar):
3075         (WebCore::ScrollbarTheme::unregisterScrollbar):
3076         * platform/ScrollbarThemeComposite.cpp:
3077         (WebCore::ScrollbarThemeComposite::paint):
3078         (WebCore::ScrollbarThemeComposite::hitTest):
3079         (WebCore::ScrollbarThemeComposite::invalidatePart):
3080         (WebCore::ScrollbarThemeComposite::splitTrack):
3081         (WebCore::usedTotalSize):
3082         (WebCore::ScrollbarThemeComposite::thumbPosition):
3083         (WebCore::ScrollbarThemeComposite::thumbLength):
3084         (WebCore::ScrollbarThemeComposite::minimumThumbLength):
3085         (WebCore::ScrollbarThemeComposite::trackPosition):
3086         (WebCore::ScrollbarThemeComposite::trackLength):
3087         (WebCore::ScrollbarThemeComposite::thumbRect):
3088         * platform/ScrollbarThemeComposite.h:
3089         (WebCore::ScrollbarThemeComposite::willPaintScrollbar):
3090         (WebCore::ScrollbarThemeComposite::didPaintScrollbar):
3091         (WebCore::ScrollbarThemeComposite::paintScrollbarBackground):
3092         (WebCore::ScrollbarThemeComposite::paintTrackBackground):
3093         (WebCore::ScrollbarThemeComposite::paintTrackPiece):
3094         (WebCore::ScrollbarThemeComposite::paintButton):
3095         (WebCore::ScrollbarThemeComposite::paintThumb):
3096         (WebCore::ScrollbarThemeComposite::constrainTrackRectToTrackPieces):
3097         * platform/efl/ScrollbarThemeEfl.h:
3098         * platform/gtk/ScrollbarThemeGtk.cpp:
3099         (WebCore::ScrollbarThemeGtk::hasThumb):
3100         (WebCore::ScrollbarThemeGtk::backButtonRect):
3101         (WebCore::ScrollbarThemeGtk::forwardButtonRect):
3102         (WebCore::ScrollbarThemeGtk::trackRect):
3103         (WebCore::ScrollbarThemeGtk::registerScrollbar):
3104         (WebCore::ScrollbarThemeGtk::unregisterScrollbar):
3105         (WebCore::ScrollbarThemeGtk::updateScrollbarsFrameThickness):
3106         (WebCore::ScrollbarThemeGtk::thumbRect):
3107         (WebCore::ScrollbarThemeGtk::paintTrackBackground):
3108         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
3109         (WebCore::ScrollbarThemeGtk::paintThumb):
3110         (WebCore::ScrollbarThemeGtk::paintButton):
3111         (WebCore::ScrollbarThemeGtk::paint):
3112         (WebCore::ScrollbarThemeGtk::shouldCenterOnThumb):
3113         (WebCore::ScrollbarThemeGtk::buttonSize):
3114         (WebCore::ScrollbarThemeGtk::minimumThumbLength):
3115         * platform/gtk/ScrollbarThemeGtk.h:
3116         (WebCore::ScrollbarThemeGtk::hasButtons):
3117         * platform/ios/ScrollbarThemeIOS.h:
3118         * platform/ios/ScrollbarThemeIOS.mm:
3119         (WebCore::ScrollbarThemeIOS::registerScrollbar):
3120         (WebCore::ScrollbarThemeIOS::unregisterScrollbar):
3121         (WebCore::ScrollbarThemeIOS::hasButtons):
3122         (WebCore::ScrollbarThemeIOS::hasThumb):
3123         (WebCore::ScrollbarThemeIOS::backButtonRect):
3124         (WebCore::ScrollbarThemeIOS::forwardButtonRect):
3125         (WebCore::ScrollbarThemeIOS::trackRect):
3126         (WebCore::ScrollbarThemeIOS::minimumThumbLength):
3127         (WebCore::ScrollbarThemeIOS::shouldCenterOnThumb):
3128         (WebCore::ScrollbarThemeIOS::paint):
3129         * platform/mac/ScrollAnimatorMac.mm:
3130         (scrollbarPainterForScrollbar):
3131         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
3132         (-[WebScrollbarPartAnimation startAnimation]):
3133         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
3134         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
3135         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
3136         (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
3137         (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
3138         (-[WebScrollbarPainterDelegate scrollerImp:animateExpansionTransitionWithDuration:]):
3139         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
3140         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
3141         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
3142         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
3143         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
3144         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
3145         (WebCore::ScrollAnimatorMac::invalidateScrollbarPartLayers):
3146         (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
3147         (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
3148         (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
3149         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
3150         * platform/mac/ScrollbarThemeMac.h:
3151         * platform/mac/ScrollbarThemeMac.mm:
3152         (WebCore::ScrollbarThemeMac::registerScrollbar):
3153         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
3154         (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar):
3155         (WebCore::ScrollbarThemeMac::painterForScrollbar):
3156         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
3157         (WebCore::ScrollbarThemeMac::hasButtons):
3158         (WebCore::ScrollbarThemeMac::hasThumb):
3159         (WebCore::ScrollbarThemeMac::backButtonRect):
3160         (WebCore::ScrollbarThemeMac::forwardButtonRect):
3161         (WebCore::ScrollbarThemeMac::trackRect):
3162         (WebCore::ScrollbarThemeMac::minimumThumbLength):
3163         (WebCore::ScrollbarThemeMac::shouldCenterOnThumb):
3164         (WebCore::ScrollbarThemeMac::shouldDragDocumentInsteadOfThumb):
3165         (WebCore::ScrollbarThemeMac::updateEnabledState):
3166         (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
3167         (WebCore::ScrollbarThemeMac::paint):
3168         * platform/mock/ScrollbarThemeMock.cpp:
3169         (WebCore::ScrollbarThemeMock::trackRect):
3170         (WebCore::ScrollbarThemeMock::paintTrackBackground):
3171         (WebCore::ScrollbarThemeMock::paintThumb):
3172         * platform/mock/ScrollbarThemeMock.h:
3173         (WebCore::ScrollbarThemeMock::hasButtons): Deleted.
3174         (WebCore::ScrollbarThemeMock::hasThumb): Deleted.
3175         (WebCore::ScrollbarThemeMock::backButtonRect): Deleted.
3176         (WebCore::ScrollbarThemeMock::forwardButtonRect): Deleted.
3177         (WebCore::ScrollbarThemeMock::maxOverlapBetweenPages): Deleted.
3178         (WebCore::ScrollbarThemeMock::isMockTheme): Deleted.
3179         * platform/win/ScrollbarThemeSafari.cpp:
3180         (WebCore::ScrollbarThemeSafari::hasButtons):
3181         (WebCore::ScrollbarThemeSafari::hasThumb):
3182         (WebCore::ScrollbarThemeSafari::backButtonRect):
3183         (WebCore::ScrollbarThemeSafari::forwardButtonRect):
3184         (WebCore::ScrollbarThemeSafari::trackRect):
3185         (WebCore::ScrollbarThemeSafari::minimumThumbLength):
3186         (WebCore::ScrollbarThemeSafari::shouldCenterOnThumb):
3187         (WebCore::ScrollbarThemeSafari::paintTrackBackground):
3188         (WebCore::ScrollbarThemeSafari::paintButton):
3189         (WebCore::ScrollbarThemeSafari::paintThumb):
3190         * platform/win/ScrollbarThemeSafari.h:
3191         * platform/win/ScrollbarThemeWin.cpp:
3192         (WebCore::ScrollbarThemeWin::hasThumb):
3193         (WebCore::ScrollbarThemeWin::backButtonRect):
3194         (WebCore::ScrollbarThemeWin::forwardButtonRect):
3195         (WebCore::ScrollbarThemeWin::trackRect):
3196         (WebCore::ScrollbarThemeWin::shouldCenterOnThumb):
3197         (WebCore::ScrollbarThemeWin::shouldSnapBackToDragOrigin):
3198         (WebCore::ScrollbarThemeWin::paintTrackBackground):
3199         (WebCore::ScrollbarThemeWin::paintTrackPiece):
3200         (WebCore::ScrollbarThemeWin::paintButton):
3201         (WebCore::paintGripper):
3202         (WebCore::ScrollbarThemeWin::paintThumb):
3203         * platform/win/ScrollbarThemeWin.h:
3204         * rendering/RenderScrollbar.h:
3205         (isType):
3206         * rendering/RenderScrollbarPart.cpp:
3207         (WebCore::RenderScrollbarPart::styleDidChange):
3208         (WebCore::RenderScrollbarPart::imageChanged):
3209         * rendering/RenderScrollbarTheme.cpp:
3210         (WebCore::RenderScrollbarTheme::buttonSizesAlongTrackAxis):
3211         (WebCore::RenderScrollbarTheme::hasButtons):
3212         (WebCore::RenderScrollbarTheme::hasThumb):
3213         (WebCore::RenderScrollbarTheme::minimumThumbLength):
3214         (WebCore::RenderScrollbarTheme::backButtonRect):
3215         (WebCore::RenderScrollbarTheme::forwardButtonRect):
3216         (WebCore::RenderScrollbarTheme::trackRect):
3217         (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
3218         (WebCore::RenderScrollbarTheme::willPaintScrollbar):
3219         (WebCore::RenderScrollbarTheme::didPaintScrollbar):
3220         (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
3221         (WebCore::RenderScrollbarTheme::paintTrackBackground):
3222         (WebCore::RenderScrollbarTheme::paintTrackPiece):
3223         (WebCore::RenderScrollbarTheme::paintButton):
3224         (WebCore::RenderScrollbarTheme::paintThumb):
3225         (WebCore::RenderScrollbarTheme::paintTickmarks):
3226         * rendering/RenderScrollbarTheme.h:
3227
3228 2015-06-24  Matt Rajca  <mrajca@apple.com>
3229
3230         MediaSession: fall back to "content" kind when an unsupported media session kind is passed in
3231         https://bugs.webkit.org/show_bug.cgi?id=146293
3232
3233         Reviewed by Eric Carlson.
3234
3235         * Modules/mediasession/MediaSession.cpp:
3236         (WebCore::MediaSession::parseKind): Parse the media session kind to one of the four supported types.
3237         (WebCore::MediaSession::MediaSession):
3238         (WebCore::MediaSession::kind): Format the value as a string (which the JS bindings expect).
3239         * Modules/mediasession/MediaSession.h: The media session kind is now stored as an enum rather than a string
3240           since we only support a small, fixed number of values.
3241
3242 2015-06-25  Eric Carlson  <eric.carlson@apple.com>
3243
3244         [Mac] Crash in WebCore::MediaPlayer::canPlayToWirelessPlaybackTarget
3245         https://bugs.webkit.org/show_bug.cgi?id=146317
3246
3247         Reviewed by Brent Fulgham.
3248
3249         * html/HTMLMediaElement.cpp:
3250         (WebCore::HTMLMediaElement::mediaState): NULL-check m_player before using it.
3251
3252 2015-06-25  Commit Queue  <commit-queue@webkit.org>
3253
3254         Unreviewed, rolling out r185956.
3255         https://bugs.webkit.org/show_bug.cgi?id=146321
3256
3257         Causes massive crashes on test bots (Requested by bfulgham on
3258         #webkit).
3259
3260         Reverted changeset:
3261
3262         "Enabling MEDIA_STREAM"
3263         https://bugs.webkit.org/show_bug.cgi?id=145947
3264         http://trac.webkit.org/changeset/185956
3265
3266 2015-06-25  Brent Fulgham  <bfulgham@apple.com>
3267
3268         [Win] Update MediaPlayerPrivateAVFoundationCF::supportsType
3269         https://bugs.webkit.org/show_bug.cgi?id=146302
3270         <rdar://problem/19726553>
3271
3272         Reviewed by Eric Carlson.
3273
3274         Tested by existing media tests.
3275
3276         Update the AVFoundationCF version of 'supportsType' to more closely match the AVFoundation
3277         version. Use this new code when the necessary AVFoundationCF functions are present.
3278
3279         * AVFoundationSupport.py: Check for presence of AVCFURLAssetIsPlayableExtendedMIMEType.
3280         (fileContains): Added helper function.
3281         * WebCore.vcxproj/WebCoreGenerated.vcxproj: Add AVFoundationSupport.py to project file to make
3282         maintenance easier.
3283         * WebCore.vcxproj/WebCoreGenerated.vcxproj.filters: Ditto.
3284         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3285         (WebCore::MediaPlayerPrivateAVFoundation::isUnsupportedMIMEType): Moved from ObjC version.
3286         (WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList): Ditto.
3287         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3288         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add missing declaration.
3289         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3290         (WebCore::avfMIMETypes): Added CF version of AVFoundation code.
3291         (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): Update to use new AVCF
3292         method if it is available.
3293         (WebCore::MediaPlayerPrivateAVFoundationCF::languageOfPrimaryAudioTrack): Handle case of a
3294         null language locale. This is a drive-by fix of a bug found during testing.
3295         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3296         (WebCore::isUnsupportedMIMEType): Deleted.
3297         (WebCore::staticMIMETypeList): Deleted.
3298
3299 2015-06-25  Matthew Daiter  <mdaiter@apple.com>
3300
3301         Enabling MEDIA_STREAM
3302         https://bugs.webkit.org/show_bug.cgi?id=145947
3303         <rdar://problem/21365829>
3304
3305         Reviewed by Brent Fulgham.
3306
3307         * Configurations/FeatureDefines.xcconfig:
3308         * Modules/mediastream/UserMediaClient.h:
3309         * WebCore.xcodeproj/project.pbxproj:
3310         * platform/mediastream/mac/AVAudioCaptureSource.mm:
3311         * platform/mock/UserMediaClientMock.h:
3312
3313 2015-06-25  Zalan Bujtas  <zalan@apple.com>
3314
3315         Do not send touch events to the slider's thumb when it does not have a renderer.
3316         https://bugs.webkit.org/show_bug.cgi?id=146307
3317         rdar://problem/21539399
3318
3319         Reviewed by Simon Fraser.
3320
3321         Bail out early if either the touch target or the renderer() is null.
3322
3323         Test: fast/events/touch/input-range-with-thumb-display-none-crash.html
3324
3325         * html/shadow/SliderThumbElement.cpp:
3326         (WebCore::findTouchWithIdentifier):
3327         (WebCore::SliderThumbElement::handleTouchStart):
3328         (WebCore::SliderThumbElement::handleTouchMove):
3329         (WebCore::SliderThumbElement::handleTouchEndAndCancel):
3330
3331 2015-06-25  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
3332
3333         [Streams API] Implement HighWaterMark
3334         https://bugs.webkit.org/show_bug.cgi?id=146235
3335
3336         Reviewed by Darin Adler.
3337
3338         Retrieval of HighWaterMark parameter from arguments passed to the ReadableStream JS constructor.
3339         Retrieval of size function callback from arguments passed to the ReadableStream JS constructor.
3340         Calling doPull() if buffer size is below HighWaterMark.
3341
3342         Covered by rebased tests.
3343
3344         * Modules/streams/ReadableStream.cpp:
3345         (WebCore::ReadableStream::pull): Adding precise check for HWM.
3346         * Modules/streams/ReadableStream.h: Introducing hasEnoughValues.
3347         * bindings/js/ReadableJSStream.cpp:
3348         (WebCore::getHighWaterMark): Utility routine to get properly HWM value.
3349         (WebCore::ReadableJSStream::create): Retrieval of HWM and size function.
3350         (WebCore::ReadableJSStream::ReadableJSStream):
3351         * bindings/js/ReadableJSStream.h: Adding hasEnoughValues and desiredSize prototypes.
3352
3353 2015-06-25  Tim Horton  <timothy_horton@apple.com>
3354
3355         Try to fix the iOS EWS build.
3356
3357         * platform/spi/cocoa/SecuritySPI.h:
3358
3359 2015-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3360
3361         [GTK] Empty gtk-font-name setting causes WebProcess crash rendering pages
3362         https://bugs.webkit.org/show_bug.cgi?id=146246
3363
3364         Reviewed by Sergio Villar Senin.
3365
3366         Return early if system font is empty.
3367
3368         * rendering/RenderThemeGtk.cpp:
3369         (WebCore::RenderThemeGtk::updateCachedSystemFontDescription):
3370
3371 2015-06-24  Chris Dumez  <cdumez@apple.com>
3372
3373         Unreviewed, EFL build fix after r185940.
3374
3375         Members were initialized in wrong order.
3376
3377         * Modules/mediastream/MediaDeviceInfo.cpp:
3378         (WebCore::MediaDeviceInfo::MediaDeviceInfo):
3379
3380 2015-06-24  Chris Dumez  <cdumez@apple.com>
3381
3382         Unreviewed, Build fix after r185940.
3383
3384         Move implementation inside WebCore namespace.
3385
3386         * Modules/mediastream/MediaDeviceInfo.cpp:
3387
3388 2015-06-24  Chris Dumez  <cdumez@apple.com>
3389
3390         Unreviewed, speculative GTK build fix after 185940.
3391
3392         Add new cpp file to CMakeLists.txt.
3393
3394         * CMakeLists.txt:
3395
3396 2015-06-24  Matt Daiter  <mdaiter@apple.com>
3397
3398         Building MediaDeviceInfo for enumerateDevices
3399         https://bugs.webkit.org/show_bug.cgi?id=146257
3400         <rdar://problem/21513462>
3401
3402         Reviewed by Eric Carlson.
3403
3404         MediaDeviceInfo necessary for enumerateDevices
3405
3406         * CMakeLists.txt: Added MediaDevicesInfo.idl
3407         * DerivedSources.make: Added MediaDevicesInfo.idl
3408         * Modules/mediastream/MediaDeviceInfo.h: Created class for MediaDevicesInfo
3409         (WebCore::MediaDeviceInfo::create): Allocates class
3410         (WebCore::MediaDeviceInfo::MediaDeviceInfo): Creates class for public
3411         (WebCore::MediaDeviceInfo::~MediaDeviceInfo): 
3412         (WebCore::MediaDeviceInfo::label):
3413         (WebCore::MediaDeviceInfo::deviceId):
3414         (WebCore::MediaDeviceInfo::groupId):
3415         (WebCore::MediaDeviceInfo::kind):
3416         * Modules/mediastream/MediaDeviceInfo.idl:
3417         * WebCore.xcodeproj/project.pbxproj:
3418
3419 2015-06-24  Anders Carlsson  <andersca@apple.com>
3420
3421         Detect view services by using the "com.apple.UIKit.vends-view-services" entitlement
3422         https://bugs.webkit.org/show_bug.cgi?id=146301
3423
3424         Reviewed by Tim Horton.
3425
3426         * WebCore.xcodeproj/project.pbxproj:
3427         * platform/spi/cocoa/SecuritySPI.h:
3428
3429 2015-06-24  Said Abou-Hallawa  <sabouhallawa@apple.com>
3430
3431         Add a new color -apple-wireless-playback-target-active
3432         https://bugs.webkit.org/show_bug.cgi?id=146269
3433         <rdar://problem/21465189>
3434
3435         Reviewed by Dean Jackson.
3436
3437         At the moment we use -apple-system-blue to indicate an Airplay route is
3438         active. This might not always be blue, so we need to add another system
3439         color with a name that will allow us to change the underlying color.
3440         Initially -apple-wireless-playback-target-active will be an alias to
3441         -apple-system-blue.
3442
3443         Existing tests are modified to include the new color value.
3444
3445         * Modules/mediacontrols/mediaControlsApple.js:
3446         (Controller.prototype.updateWirelessTargetPickerButton):
3447     &