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