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