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