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