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