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