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