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