Fix the !ENABLE(WEBGL) build after r180609
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-03-09  Csaba Osztrogonác  <ossy@webkit.org>
2
3         Fix the !ENABLE(WEBGL) build after r180609
4         https://bugs.webkit.org/show_bug.cgi?id=142057
5
6         Reviewed by Darin Adler.
7
8         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
9         (WebCore::GraphicsContext3D::forceContextLost):
10
11 2015-03-09  Myles C. Maxfield  <mmaxfield@apple.com>
12
13         Work around a Cocoa font parsing bug
14         https://bugs.webkit.org/show_bug.cgi?id=142446
15         <rdar://problem/20086223>
16
17         Reviewed by Simon Fraser.
18
19         Work around a bug in Cocoa regarding font parsing.
20
21         * svg/SVGToOTFFontConversion.cpp:
22
23 2015-03-09  Csaba Osztrogonác  <ossy@webkit.org>
24
25         Fix the build after r181153
26         https://bugs.webkit.org/show_bug.cgi?id=142497
27
28         Reviewed by Philippe Normand.
29
30         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
31         (WebCore::MediaPlayerPrivateGStreamer::load):
32
33 2015-03-09  Roger Fong  <roger_fong@apple.com>
34
35         Only call showControls if controls are hidden.
36         https://bugs.webkit.org/show_bug.cgi?id=142496.
37         <rdar://problem/20083732>
38
39         Reviewed by Dean Jackson.
40
41         * Modules/mediacontrols/mediaControlsApple.js:
42         (Controller.prototype.handleWrapperMouseMove):
43         (Controller.prototype.controlsAreHidden):
44         Controls are hidden if the ‘show’ class name is not present,
45         not if the ‘hidden’ class name is.
46
47 2015-03-09  Roger Fong  <roger_fong@apple.com>
48
49         Unreviewed. Re-add CSS property that was unintentionally removed in r180893
50         <rdar://problem/20083715>
51
52         * Modules/mediacontrols/mediaControlsApple.css:
53         (audio::-webkit-media-controls-panel):
54
55 2015-03-09  Zalan Bujtas  <zalan@apple.com>
56
57         Simple line layout: Merge TextFragmentIterator::findNextBreakablePosition() and TextFragmentIterator::findNextNonWhitespacePosition().
58         https://bugs.webkit.org/show_bug.cgi?id=142344
59
60         Reviewed by Antti Koivisto.
61
62         This patch merges findNextBreakablePosition() and findNextNonWhitespacePosition() so that
63         the segment looping and position handling logic are no longer duplicated. It also unifies
64         the static next*() functions' signature.
65
66         No change in functionality.
67
68         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
69         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
70         (WebCore::SimpleLineLayout::nextBreakablePosition):
71         (WebCore::SimpleLineLayout::nextNonWhitespacePosition):
72         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
73         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextBreakablePosition): Deleted.
74         (WebCore::SimpleLineLayout::findNextNonWhitespace): Deleted.
75         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextNonWhitespacePosition): Deleted.
76         * rendering/SimpleLineLayoutTextFragmentIterator.h:
77
78 2015-03-09  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
79
80         ReadableStreamJSSource should use JSC::Strong UnspecifiedBoolType operator
81         https://bugs.webkit.org/show_bug.cgi?id=142397
82
83         Reviewed by Benjamin Poulain.
84
85         No behavior change. Current tests cover the changes.
86
87         * bindings/js/ReadableStreamJSSource.cpp:
88         * bindings/js/ReadableStreamJSSource.h:
89
90 2015-03-09  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
91
92         ReadableStream does not not need to pass itself as callback parameter
93         https://bugs.webkit.org/show_bug.cgi?id=142399
94
95         Reviewed by Darin Adler.
96
97         No change in behavior.
98
99         * Modules/streams/ReadableStream.h: Remove ReadableStream parameter from SuccessCallback definition.
100         * bindings/js/JSReadableStreamCustom.cpp:
101         (WebCore::JSReadableStream::ready): Capture JSReadableStream instance instead.
102         (WebCore::JSReadableStream::closed): Capture JSReadableStream instance instead.
103
104 2015-03-08  Dean Jackson  <dino@apple.com>
105
106         [iOS Media] Video buffer progress missing on iPhones
107         https://bugs.webkit.org/show_bug.cgi?id=142462
108
109         Reviewed by Eric Carlson.
110
111         The fullscreen controller on the iPhone idiom was using
112         the media duration as its maximum loaded time, meaning the
113         download progress was missing (it looked like everything
114         was already downloaded). The fix is to calculate
115         what the maximum buffered time is from the HTMLMediaElement,
116         and send that to the fullscreen controller.
117
118         * Modules/mediacontrols/mediaControlsiOS.js:
119         (ControllerIOS.prototype.drawTimelineBackground): While implementing
120         the native function I noticed that the JS controls forgot that
121         the buffered time ranges are ordered, and thus they don't need
122         to search through the array. The last range will be the highest.
123
124         * html/HTMLMediaElement.cpp:
125         (WebCore::HTMLMediaElement::maxBufferedTime): New helper function
126         to calculate the highest buffered time in the media source.
127         * html/HTMLMediaElement.h:
128
129         * platform/ios/WebVideoFullscreenInterface.h: New setBufferedTime method.
130         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
131
132         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
133         (WebVideoFullscreenInterfaceAVKit::setDuration): No longer set
134         the loadedTimeRanges.
135         (WebVideoFullscreenInterfaceAVKit::setBufferedTime): Calculate a normalized
136         value of the maximum loaded/buffered time, and tell the platform controller
137         to show that range.
138
139         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
140         (WebVideoFullscreenModelVideoElement::updateForEventName): Send the maximum
141         buffered time.
142
143 2015-03-08  Chris Dumez  <cdumez@apple.com>
144
145         Crash in WebCore::NotificationCenter::stop()
146         https://bugs.webkit.org/show_bug.cgi?id=142444
147         <rdar://problem/20082520>
148
149         Reviewed by Darin Adler.
150
151         Rework the patch in r181219 so that we do not need a Ref<NotificationCenter> protector
152         in NotificationCenter::stop(). Instead, we put the client in a local variable and null
153         out m_client *before* calling NotificationClient::clearNotifications().
154
155         No new tests, already covered by:
156         http/tests/notifications/event-listener-crash.html
157
158         * Modules/notifications/NotificationCenter.cpp:
159         (WebCore::NotificationCenter::stop):
160
161 2015-03-08  Simon Fraser  <simon.fraser@apple.com>
162
163         Don't call RenderLayerCompositor::needsToBeComposited() so many times
164         https://bugs.webkit.org/show_bug.cgi?id=142441
165
166         Reviewed by Brent Fulgham.
167
168         Save one call to needsToBeComposited() per RenderLayer while rebuilding compositing
169         layers, and a call to isRunningAcceleratedTransformAnimation() in some cases.
170         
171         computeCompositingRequirements() already knows if the layer will be composited, so
172         pass that to updateBacking() in the form of a "yes/no/don't" know enum. However,
173         since updateBacking() no longer calls needsToBeComposited(), we need to call 
174         requiresCompositingForPosition() to get the viewportConstrainedNotCompositedReason flags.
175         
176         isRunningAcceleratedTransformAnimation() will only be true for a layer which has a
177         direct compositing reason, so only call isRunningAcceleratedTransformAnimation()
178         in that case.
179         
180         * rendering/RenderLayerCompositor.cpp:
181         (WebCore::rendererForCompositingTests):
182         (WebCore::RenderLayerCompositor::updateBacking):
183         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
184         (WebCore::RenderLayerCompositor::requiresCompositingLayer): Use references.
185         (WebCore::RenderLayerCompositor::reasonsForCompositing): Use references.
186         * rendering/RenderLayerCompositor.h:
187
188 2015-03-08  Simon Fraser  <simon.fraser@apple.com>
189
190         In RenderLayerCompositor, track layer bounds and the haveComputedBounds flag together in a struct
191         https://bugs.webkit.org/show_bug.cgi?id=142449
192
193         Reviewed by Brent Fulgham.
194         
195         Rather than tracking 'layerBounds' and 'haveComputedBounds' separately, group them together
196         in an OverlapExtent struct and add a function to compute the bounds, which removes
197         a copy of this code. OverlapExtent will be extended in a future patch.
198
199         No behavior change.
200
201         * rendering/RenderLayerCompositor.cpp:
202         (WebCore::RenderLayerCompositor::OverlapMap::geometryMap): Allow const access to
203         the geometryMap, used by computeExtent().
204         (WebCore::RenderLayerCompositor::computeExtent):
205         (WebCore::RenderLayerCompositor::addToOverlapMap):
206         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
207         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
208         * rendering/RenderLayerCompositor.h:
209
210 2015-03-07  Chris Dumez  <cdumez@apple.com>
211
212         Crash in WebCore::NotificationCenter::stop()
213         https://bugs.webkit.org/show_bug.cgi?id=142444
214         <rdar://problem/20082520>
215
216         Reviewed by Andreas Kling.
217
218         A use-after-free would sometimes cause us to crash in NotificationCenter::stop().
219         After investigation, it turns out that NotificationCenter::stop() calls
220         NotificationClient::clearNotifications() which will destroy the Notification
221         objects, all of which hold a strong reference to the NotificationCenter. If at
222         this point, only Notifications are ref'ing the NotificationCenter, this means
223         that the NotificationCenter will get destroyed right after the call to
224         NotificationClient::clearNotifications(). However, we reset m_client to null
225         after calling clearNotifications() and it causes us to crash in this case.
226
227         The issue is addressed by adding a Ref<NotificationCenter> protector in
228         NotificationCenter::stop() so that we make sure the NotificationCenter lives
229         at least until the end of the method execution.
230
231         I was able to consistently reproduce the crash by doing:
232         Tools/Scripts/run-webkit-tests -1 --debug --repeat-each=30 -g http/tests/notifications/event-listener-crash.html
233
234         No new tests, already covered by:
235         http/tests/notifications/event-listener-crash.html
236
237         * Modules/notifications/NotificationCenter.cpp:
238         (WebCore::NotificationCenter::stop):
239
240 2015-03-07  Simon Fraser  <simon.fraser@apple.com>
241
242         Tidy up RenderLayerCompositor's CompositingState
243         https://bugs.webkit.org/show_bug.cgi?id=142445
244
245         Reviewed by Dan Bernstein.
246         
247         Make CompositingState a private struct in RenderLayerCompositor.
248         Since it's a struct, remove the m_ prefix from its data members.
249
250         No behavior change.
251
252         * rendering/RenderLayerCompositor.cpp:
253         (WebCore::RenderLayerCompositor::CompositingState::CompositingState):
254         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
255         (WebCore::CompositingState::CompositingState): Deleted.
256         * rendering/RenderLayerCompositor.h:
257
258 2015-03-07  Darin Adler  <darin@apple.com>
259
260         Unindent EventTarget, EventListener, JSEventLister.h files
261         https://bugs.webkit.org/show_bug.cgi?id=142440
262
263         Reviewed by Alexey Proskuryakov.
264
265         * bindings/js/JSEventListener.h:
266         * dom/EventListener.h:
267         * dom/EventTarget.h:
268         Change indentation to match coding style rules.
269
270 2015-03-07  Geoffrey Garen  <ggaren@apple.com>
271
272         Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
273         https://bugs.webkit.org/show_bug.cgi?id=140900
274
275         Reviewed by Mark Hahnenberg.
276
277         Re-landing just the removal of BlockAllocator, which is now unused.
278
279         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
280         (WebCore::MemoryPressureHandler::install):
281
282 2015-03-07  Commit Queue  <commit-queue@webkit.org>
283
284         Unreviewed, rolling out r181010.
285         https://bugs.webkit.org/show_bug.cgi?id=142442
286
287         Broke media/video-src-invalid-poster.html (Requested by kling
288         on #webkit).
289
290         Reverted changeset:
291
292         "Stale entries in WeakGCMaps are keeping tons of WeakBlocks
293         alive unnecessarily."
294         https://bugs.webkit.org/show_bug.cgi?id=142115
295         http://trac.webkit.org/changeset/181010
296
297 2015-03-07  Darin Adler  <darin@apple.com>
298
299         Do a bit of EventNames tidying
300         https://bugs.webkit.org/show_bug.cgi?id=142438
301
302         Reviewed by Anders Carlsson.
303
304         * dom/EventNames.h: Sorted the event names into a single list instead of
305         the rudimentary attempts at organizing the list that simply made it hard
306         to see what is and is not in the list. Removed two unused event names.
307         I'm sure there are more. Reorganized the EventName class, now a struct,
308         into a more conventional "public first" order. Got the function bodies
309         out of the struct so we can see more clearly what is in the struct.
310         Made more things const.
311         (WebCore::EventNames::touchEventNames): Changed the return value to a
312         std::array of reference wrappers rather than a vector of atomic strings.
313         This should eliminate unnecessary memory allocation and reference count churn.
314
315         * dom/EventNames.cpp: Changed initialization based on the above.
316
317         * dom/EventTarget.cpp:
318         (WebCore::EventTarget::getEventListeners): Use NeverDestroyed instead of
319         DEPRECATED_DEFINE_LOCAL and also just tightened up the function a bit.
320
321         * dom/Node.cpp:
322         (WebCore::Node::didMoveToNewDocument): Streamlined this function with
323         modern for loops, auto, and also tried to make what it does a bit clearer,
324         by making loops that are just based on numbers of event listeners look a
325         bit less like code that actually iterates a vector of listeners. Also used
326         the type unsigned instead of size_t.
327
328         * platform/ThreadGlobalData.h: Updated since it's a struct instead of class now.
329         (Why is this file in platform!?)
330
331 2015-03-07  Brent Fulgham  <bfulgham@apple.com>
332
333         [Win] Increase TestWebKitAPI Test Coverage
334         https://bugs.webkit.org/show_bug.cgi?id=142433
335
336         Reviewed by Darin Adler.
337
338         Correct some build deficiencies that prevent TestWebKitAPI
339         from executing certain tests on Windows.
340
341         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy the interpreter
342         headers.
343         * css/CSSParser.h: Export necessary symbols
344         * css/CSSParserMode.h: Ditto.
345         * css/StyleProperties.h: Ditto.
346
347 2015-03-07  David Kilzer  <ddkilzer@apple.com>
348
349         Rename SOFT_LINK_FRAMEWORK_{HEADER,SOURCE} to SOFT_LINK_FRAMEWORK_FOR_{HEADER,SOURCE}
350         <http://webkit.org/b/142434>
351
352         Reviewed by Darin Adler.
353
354         * platform/cf/CoreMediaSoftLink.cpp:
355         * platform/cf/CoreMediaSoftLink.h:
356         * platform/cf/MediaAccessibilitySoftLink.cpp:
357         * platform/cf/MediaAccessibilitySoftLink.h:
358         * platform/mac/SoftLinking.h:
359         * platform/win/SoftLinking.h:
360         - Do the rename.
361
362 2015-03-06  Sam Weinig  <sam@webkit.org>
363
364         [Content Extensions] Move compiling of content extensions to the UIProcess
365         https://bugs.webkit.org/show_bug.cgi?id=142402
366
367         Reviewed by Benjamin Poulain.
368
369         * contentextensions/CompiledContentExtension.cpp:
370         (WebCore::ContentExtensions::CompiledContentExtension::~CompiledContentExtension):
371         (WebCore::ContentExtensions::CompiledContentExtension::create): Deleted.
372         (WebCore::ContentExtensions::CompiledContentExtension::CompiledContentExtension): Deleted.
373         * contentextensions/CompiledContentExtension.h:
374         (WebCore::ContentExtensions::CompiledContentExtension::bytecode): Deleted.
375         (WebCore::ContentExtensions::CompiledContentExtension::actions): Deleted.
376         Convert CompiledContentExtension to be an abstract base class so that we can back it however
377         we like at the WebKit level. Since it doesn't necessarily use Vectors for its backing store
378         any more, change the interface to use pointer/length.
379
380         * contentextensions/ContentExtensionCompiler.cpp:
381         (WebCore::ContentExtensions::compileRuleList):
382         * contentextensions/ContentExtensionCompiler.h:
383         Change compileRuleList to return compiled result as the raw Vectors rather than as
384         a CompiledContentExtension, since that class is now abstract. It is up to the caller
385         to copy the data into its final home.
386
387         * contentextensions/ContentExtensionRule.cpp:
388         (WebCore::ContentExtensions::Action::deserialize):
389         * contentextensions/ContentExtensionRule.h:
390         Switch Action::deserialize to take pointer/length rather than a Vector.
391
392         * contentextensions/ContentExtensionsBackend.cpp:
393         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
394         Pull getting the serialized actions from the compiled extension out of the loop
395         to avoid calling the virtual function multiple times. Pass the bytecode and actions
396         as pointer/length pairs rather than Vectors.
397
398         * contentextensions/DFABytecodeInterpreter.cpp:
399         (WebCore::ContentExtensions::getBits):
400         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
401         * contentextensions/DFABytecodeInterpreter.h:
402         (WebCore::ContentExtensions::DFABytecodeInterpreter::DFABytecodeInterpreter):
403         Switch the interpreter to take pointer/length rather than a Vector.
404
405         * page/UserContentController.cpp:
406         (WebCore::UserContentController::addUserContentExtension):
407         (WebCore::UserContentController::removeUserContentExtension):
408         (WebCore::UserContentController::removeAllUserContentExtensions):
409         (WebCore::UserContentController::addUserContentFilter): Deleted.
410         (WebCore::UserContentController::removeUserContentFilter): Deleted.
411         (WebCore::UserContentController::removeAllUserContentFilters): Deleted.
412         * page/UserContentController.h:
413         Unify terminology to use the term UserContentExtension rather than UserContentFilter.
414
415 2015-03-06  Roger Fong  <roger_fong@apple.com>
416
417         Create new buttons for media controls on OSX.
418         https://bugs.webkit.org/show_bug.cgi?id=142415.
419         <rdar://problem/20019441>
420
421         Reviewed by Eric Carlson.
422
423         * Modules/mediacontrols/mediaControlsApple.css:
424         (audio::-webkit-media-controls-wireless-playback-picker-button):
425         (audio::-webkit-media-controls-wireless-playback-picker-button.playing):
426         (audio:-webkit-full-screen::-webkit-media-controls-wireless-playback-picker-button):
427
428 2015-03-06  Roger Fong  <roger_fong@apple.com>
429
430         Redraw timeline background when updating media time.
431         https://bugs.webkit.org/show_bug.cgi?id=142421.
432         <rdar://problem/20065104>
433
434         Reviewed by Brent Fulgham.
435
436         * Modules/mediacontrols/mediaControlsApple.js:
437         (Controller.prototype.handleTimeUpdate):
438
439 2015-03-06  Dhi Aurrahman  <diorahman@rockybars.com>
440
441         Enable selectors level 4's :lang() by default
442         https://bugs.webkit.org/show_bug.cgi?id=142302
443
444         Reviewed by Benjamin Poulain.
445
446         No behavior change.
447
448         * css/CSSGrammar.y.in:
449         * css/CSSParser.cpp:
450         (WebCore::CSSParser::detectFunctionTypeToken):
451         * css/CSSParserValues.cpp:
452         (WebCore::CSSParserSelector::setLangArgumentList):
453         * css/CSSParserValues.h:
454         * css/CSSSelector.cpp:
455         (WebCore::appendLangArgumentList):
456         (WebCore::CSSSelector::selectorText):
457         (WebCore::CSSSelector::setLangArgumentList):
458         * css/CSSSelector.h:
459         * css/SelectorChecker.cpp:
460         (WebCore::SelectorChecker::checkOne):
461         * css/SelectorCheckerTestFunctions.h:
462         (WebCore::matchesLangPseudoClass):
463         (WebCore::matchesLangPseudoClassDeprecated): Deleted.
464         * cssjit/SelectorCompiler.cpp:
465         (WebCore::SelectorCompiler::addPseudoClassType):
466         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
467         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
468
469 2015-03-06  Brent Fulgham  <bfulgham@apple.com>
470
471         Setting scroll-snap-desination to (100% 100%) locks up WebKit
472         https://bugs.webkit.org/show_bug.cgi?id=142414
473         <rdar://problem/20077275>
474
475         Reviewed by Dean Jackson.
476
477         Tested by css3/scroll-snap/scroll-snap-desination-lock-up.html.
478
479         Correct an infinite loop that is triggered when you combine a repeating (100%)
480         scroll-snap-point-{x,y} along with a 100% scroll-snap-destination value.
481
482         * page/scrolling/AxisScrollSnapOffsets.cpp:
483         (WebCore::updateFromStyle): Make sure we break out of the loop properly when
484         the scroll-snap-point-{x,y} step is the same as the scroll-snap-destination.
485
486 2015-03-06  Dean Jackson  <dino@apple.com>
487
488         https://bugs.webkit.org/show_bug.cgi?id=142416
489
490         Unreviewed build fix.
491
492         * platform/spi/cocoa/QuartzCoreSPI.h: Add kCAFilterPlusL.
493
494 2015-03-06  Dean Jackson  <dino@apple.com>
495
496         Support "plus-lighter" in mix-blend mode
497         https://bugs.webkit.org/show_bug.cgi?id=142416
498         <rdar://problem/19993979>
499
500         Reviewed by Darin Adler and Sam Weinig.
501
502         Support the "plus-lighter" blending mode to CSS.
503         See my reply to: https://lists.w3.org/Archives/Public/public-fx/2015JanMar/0021.html
504
505         Test: css3/blending/svg-blend-plus-lighter.html
506
507         * css/CSSParser.cpp:
508         (WebCore::isValidKeywordPropertyAndValue): mix-blend-mode can now accept the
509         new keyword.
510         * css/CSSPrimitiveValueMappings.h: Add the mappings to/from the GraphicsType.
511         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
512         (WebCore::CSSPrimitiveValue::operator BlendMode):
513         * css/CSSValueKeywords.in: Add comment to show plus-darker and plus-lighter
514         are available.
515         * platform/graphics/GraphicsTypes.cpp: New GraphicsType for PlusLighter.
516         * platform/graphics/GraphicsTypes.h:
517         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Map to the CA filter.
518         (PlatformCAFilters::setBlendingFiltersOnLayer):
519         * platform/graphics/cg/GraphicsContextCG.cpp:
520         (WebCore::GraphicsContext::setPlatformCompositeOperation): Map to the CG
521         blending flag.
522
523 2015-03-06  Alex Christensen  <achristensen@webkit.org>
524
525         Soft link MediaAccessibility using new macros.
526         https://bugs.webkit.org/show_bug.cgi?id=142406
527
528         Reviewed by David Kilzer.
529
530         * Configurations/WebCore.unexp:
531         * WebCore.vcxproj/WebCore.vcxproj:
532         * WebCore.vcxproj/WebCore.vcxproj.filters:
533         * WebCore.xcodeproj/project.pbxproj:
534         * page/CaptionUserPreferencesMediaAF.cpp:
535         * platform/cf/MediaAccessibilitySoftLink.cpp: Added.
536         * platform/cf/MediaAccessibilitySoftLink.h: Added.
537
538 2015-03-06  Brent Fulgham  <bfulgham@apple.com>
539
540         Add 'initial' keyword support for scroll snap CSS properties
541         https://bugs.webkit.org/show_bug.cgi?id=136345
542         <rdar://problem/18162325>
543
544         Reviewed by Dean Jackson.
545
546         Tested by css3/scroll-snap/scroll-snap-initial.html
547
548         The existing implementation already had 'initial' keyword support, but did not fully follow
549         the CSS specification. In particular, the 'initial' state for the scroll-snap-points-x and
550         scroll-snap-points-y properties was not handled correctly.
551
552         Revise implementation to represent ScrollSnapPoints as a pointer, so that 'none' is a valid
553         state.
554
555         * css/CSSComputedStyleDeclaration.cpp:
556         (WebCore::scrollSnapPoints): If 'points' is null, return CSSValueNone.
557         * css/CSSPropertyNames.in: Provide custom initial/inherit handles for snap point x/y sets.
558         * css/StyleBuilderConverter.h:
559         (WebCore::StyleBuilderConverter::convertScrollSnapPoints): Update to represent ScrollSnapPoints
560         as a pointer.
561         * css/StyleBuilderCustom.h:
562         (WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsX): Provide custom pointer-based
563         implementation for ScrollSnapPoints.
564         (WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsX): Ditto.
565         (WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsY): Ditto.
566         (WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsY): Ditto."
567         * page/scrolling/AxisScrollSnapOffsets.cpp:
568         (WebCore::updateFromStyle): Handle ScrollSnapPoints as pointers.
569         (WebCore::updateSnapOffsetsForScrollableArea): Ditto.
570         * rendering/style/RenderStyle.cpp:
571         (WebCore::RenderStyle::scrollSnapPointsX): Update to use pointer-based representation of ScrollSnapPoints.
572         (WebCore::RenderStyle::scrollSnapPointsY): Ditto.
573         (WebCore::RenderStyle::setScrollSnapPointsX): Ditto.
574         (WebCore::RenderStyle::setScrollSnapPointsY): Ditto.
575         (WebCore::RenderStyle::initialScrollSnapPointsX): Deleted.
576         (WebCore::RenderStyle::initialScrollSnapPointsY): Deleted.
577         * rendering/style/RenderStyle.h:
578         * rendering/style/StyleScrollSnapPoints.cpp:
579         (WebCore::StyleScrollSnapPoints::StyleScrollSnapPoints): Revise constructor to handle pointer argument.
580         * rendering/style/StyleScrollSnapPoints.h:
581
582 2015-03-05  Roger Fong  <roger_fong@apple.com>
583
584         Reskin Captions button and container on OSX.
585         https://bugs.webkit.org/show_bug.cgi?id=142383.
586         <rdar://problem/20061466>
587
588         Reviewed by Eric Carlson.
589
590         * Modules/mediacontrols/mediaControlsApple.css:
591         (audio::-webkit-media-controls-toggle-closed-captions-button): Create new captions button icon.
592         Update caption container to match rest of media controls better.
593         (audio::-webkit-media-controls-closed-captions-container):
594         (audio::-webkit-media-controls-closed-captions-container .list):
595         (audio::-webkit-media-controls-closed-captions-container h3):
596         (audio::-webkit-media-controls-closed-captions-container ul):
597         (audio::-webkit-media-controls-closed-captions-container li):
598         (audio::-webkit-media-controls-closed-captions-container li:focus):
599         (audio::-webkit-media-controls-closed-captions-container li:hover):
600         Fix up some fonts to make fonts between captions, status display and time displays consistent.
601         (audio::-webkit-media-controls-status-display):
602         (audio::-webkit-media-controls-time-remaining-display):
603
604 2015-03-06  Jer Noble  <jer.noble@apple.com>
605
606         [Web Audio] Decoding specific .m4a file crashes tab
607         https://bugs.webkit.org/show_bug.cgi?id=139545
608
609         Reviewed by Eric Carlson.
610
611         Test: webaudio/decode-audio-data-too-short.html
612
613         Bail out early if CoreAudio reports the number of frames in the file to be negative.
614
615         * platform/audio/mac/AudioFileReaderMac.cpp:
616         (WebCore::AudioFileReader::createBus):
617
618 2015-03-06  Jeremy Jones  <jeremyj@apple.com>
619
620         Scroll to make the video element visible when exiting fullscreen.
621         https://bugs.webkit.org/show_bug.cgi?id=141439
622
623         Reviewed by Simon Fraser.
624
625         This patch will scroll the element so it is visible when exiting fullscreen,
626         but only if the element is completely scrolled off screen.
627         Also update the element screen rect so exit animation goes to the correct location.
628
629         * dom/Element.cpp:
630         (WebCore::Element::scrollIntoViewIfNotVisible): Added.
631         * dom/Element.h: Add declaration for scrollIntoViewIfNotVisible.
632         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
633         (-[WebVideoFullscreenController fullscreenMayReturnToInline]):
634         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
635         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
636         (-[WebAVPlayerController playerViewController:restoreUserInterfaceForOptimizedFullscreenStopWithCompletionHandler:]):
637         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]):
638         (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
639         (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal):
640         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
641         (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):
642         (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
643         (WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline):
644         * rendering/ScrollBehavior.cpp:
645         * rendering/ScrollBehavior.h:
646
647 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
648
649         Crash in -[WebCascadeList objectAtIndex:] + 195
650         https://bugs.webkit.org/show_bug.cgi?id=141274
651
652         Reviewed by David Kilzer.
653
654         CTFontDescriptorRefs can live forever in caches inside CoreText, which means our
655         WebCascadeList can too.
656
657         Test: platform/mac/fast/text/crash-complextextcontroller-custom-cascade-list.html
658
659         * platform/graphics/FontCascade.cpp:
660         (WebCore::FontCascade::FontCascade): Initialize WeakPtrFactory.
661         * platform/graphics/FontCascade.h:
662         (WebCore::FontCascade::createWeakPtr):
663         * platform/graphics/mac/ComplexTextControllerCoreText.mm: Migrate the raw pointer
664         to WeakPtr.
665         (-[WebCascadeList initWithFont:character:]):
666         (-[WebCascadeList count]):
667         (-[WebCascadeList objectAtIndex:]):
668
669 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
670
671         Rename BreakingContextInlineHeaders.h to BreakingContext.h
672         https://bugs.webkit.org/show_bug.cgi?id=142404
673
674         Reviewed by Simon Fraser.
675
676         No point naming it "InlineHeaders" when there are no non-inline-headers files.
677
678         No new tests because this is just a rename of a file.
679
680         * WebCore.vcxproj/WebCore.vcxproj:
681         * WebCore.vcxproj/WebCore.vcxproj.filters:
682         * WebCore.xcodeproj/project.pbxproj:
683         * rendering/RenderBlockLineLayout.cpp:
684         * rendering/line/BreakingContext.h: Renamed from Source/WebCore/rendering/line/BreakingContextInlineHeaders.h.
685         (WebCore::WordMeasurement::WordMeasurement):
686         (WebCore::BreakingContext::BreakingContext):
687         (WebCore::BreakingContext::currentObject):
688         (WebCore::BreakingContext::lineBreak):
689         (WebCore::BreakingContext::lineWidth):
690         (WebCore::BreakingContext::atEnd):
691         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
692         (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
693         (WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory):
694         (WebCore::BreakingContext::InlineIteratorHistory::push):
695         (WebCore::BreakingContext::InlineIteratorHistory::update):
696         (WebCore::BreakingContext::InlineIteratorHistory::renderer):
697         (WebCore::BreakingContext::InlineIteratorHistory::offset):
698         (WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator):
699         (WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode):
700         (WebCore::BreakingContext::InlineIteratorHistory::get):
701         (WebCore::BreakingContext::InlineIteratorHistory::current):
702         (WebCore::BreakingContext::InlineIteratorHistory::historyLength):
703         (WebCore::BreakingContext::InlineIteratorHistory::moveTo):
704         (WebCore::BreakingContext::InlineIteratorHistory::increment):
705         (WebCore::BreakingContext::InlineIteratorHistory::clear):
706         (WebCore::BreakingContext::initializeForCurrentObject):
707         (WebCore::BreakingContext::increment):
708         (WebCore::BreakingContext::handleBR):
709         (WebCore::borderPaddingMarginStart):
710         (WebCore::borderPaddingMarginEnd):
711         (WebCore::shouldAddBorderPaddingMargin):
712         (WebCore::previousInFlowSibling):
713         (WebCore::inlineLogicalWidth):
714         (WebCore::BreakingContext::handleOutOfFlowPositioned):
715         (WebCore::BreakingContext::handleFloat):
716         (WebCore::shouldSkipWhitespaceAfterStartObject):
717         (WebCore::BreakingContext::handleEmptyInline):
718         (WebCore::BreakingContext::handleReplaced):
719         (WebCore::firstPositiveWidth):
720         (WebCore::iteratorIsBeyondEndOfRenderCombineText):
721         (WebCore::nextCharacter):
722         (WebCore::updateCounterIfNeeded):
723         (WebCore::measureHyphenWidth):
724         (WebCore::textWidth):
725         (WebCore::ensureCharacterGetsLineBox):
726         (WebCore::tryHyphenating):
727         (WebCore::BreakingContext::handleText):
728         (WebCore::textBeginsWithBreakablePosition):
729         (WebCore::BreakingContext::canBreakAtThisPosition):
730         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
731         (WebCore::checkMidpoints):
732         (WebCore::BreakingContext::handleEndOfLine):
733         (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
734         * rendering/line/LineBreaker.cpp:
735
736 2015-03-06  Dan Bernstein  <mitz@apple.com>
737
738         Expose some of the functionality of extract-localizable-strings.pl as a module
739         https://bugs.webkit.org/show_bug.cgi?id=142038
740
741         Reviewed by Sam Weinig.
742
743         * LocalizableStrings.pm: Copied from Source/WebCore/extract-localizable-strings.pl.
744         (setTreatWarningsAsErrors): Added this setter for the variable moved here.
745         (sawError): Added a getter.
746         (emitError): Added. Emits the error message and sets $sawError.
747         (unescapeHexSequence): Moved from extract-localizable-strings.pl and renamed to start with
748         a lowercase letter.
749         (keyCollisionCount): Added this getter.
750         (localizedCount): Added this getter.
751         (HandleUIString): Moved from extract-localizable-strings.pl and made it increment the
752         localized string count.
753         (writeStringsFile): Moved code from extract-localizable-strings.pl into this new subroutine.
754         (verifyStringsFile): Ditto.
755
756         * WebCore.xcodeproj/project.pbxproj: Added LocalizableStrings.pm to the Copy Scripts build
757         phase.
758
759         * extract-localizable-strings.pl:
760         (emitWarning): Moved to the module.
761         (UnescapeHexSequence): Ditto.
762         (HandleUIString): Ditto.
763
764 2015-03-06  Darin Adler  <darin@apple.com>
765
766         Remove unused C++ DOM event handler attribute functions
767         https://bugs.webkit.org/show_bug.cgi?id=142398
768
769         Reviewed by Anders Carlsson.
770
771         * dom/EventTarget.h: Removed now-unneeded macros: DEFINE_ATTRIBUTE_EVENT_LISTENER,
772         DECLARE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER, DEFINE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER,
773         DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER, DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER,
774         DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER, DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER.
775
776         * Modules/webaudio/AudioScheduledSourceNode.cpp:
777         (WebCore::AudioScheduledSourceNode::setOnended): Deleted.
778         (WebCore::AudioScheduledSourceNode::finish): Rewrote this to use dispatchEvent
779         instead of one-off event-sending code. Also use a lambda to avoid needing two
780         additional member functions to implement this.
781         (WebCore::AudioScheduledSourceNode::notifyEndedDispatch): Deleted.
782         (WebCore::AudioScheduledSourceNode::notifyEnded): Deleted.
783         * Modules/webaudio/AudioScheduledSourceNode.h: Updated for above.
784
785         * Modules/battery/BatteryManager.h: Removed onxxx and setOnxxx functions,
786         including ones created with macros from EventTarget.h.
787         * Modules/encryptedmedia/MediaKeySession.h: Ditto.
788         * Modules/indexeddb/IDBDatabase.h: Ditto.
789         * Modules/indexeddb/IDBOpenDBRequest.h: Ditto.
790         * Modules/indexeddb/IDBRequest.h: Ditto.
791         * Modules/indexeddb/IDBTransaction.h: Ditto.
792         * Modules/mediastream/MediaStream.h: Ditto.
793         * Modules/mediastream/MediaStreamTrack.h: Ditto.
794         * Modules/mediastream/RTCDTMFSender.h: Ditto.
795         * Modules/mediastream/RTCDataChannel.h: Ditto.
796         * Modules/mediastream/RTCPeerConnection.h: Ditto.
797         * Modules/notifications/Notification.h: Ditto.
798         * Modules/speech/SpeechSynthesisUtterance.h: Ditto.
799         * Modules/webaudio/AudioContext.h: Ditto.
800         * Modules/webaudio/ScriptProcessorNode.cpp: Ditto.
801         * Modules/webaudio/ScriptProcessorNode.h: Ditto.
802         * Modules/websockets/WebSocket.h: Ditto.
803         * css/FontLoader.h: Ditto.
804         * dom/Document.h: Ditto.
805         * dom/Element.cpp: Ditto.
806         * dom/Element.h: Ditto.
807         * dom/MessagePort.h: Ditto.
808         * fileapi/FileReader.h: Ditto.
809         * html/HTMLBodyElement.h: Ditto.
810         * html/HTMLFormElement.h: Ditto.
811         * html/HTMLFrameSetElement.h: Ditto.
812         * html/HTMLInputElement.h: Ditto.
813         * html/HTMLMediaElement.h: Ditto.
814         * html/HTMLVideoElement.h: Ditto.
815         * html/track/TextTrack.h: Ditto.
816         * html/track/TextTrackCue.h: Ditto.
817         * html/track/TrackListBase.h: Ditto.
818         * loader/appcache/DOMApplicationCache.h: Ditto.
819         * page/DOMWindow.h: Ditto.
820         * page/EventSource.h: Ditto.
821         * page/Performance.h: Ditto.
822         * workers/AbstractWorker.h: Ditto.
823         * workers/DedicatedWorkerGlobalScope.h: Ditto.
824         * workers/Worker.h: Ditto.
825         * workers/WorkerGlobalScope.h: Ditto.
826         * xml/XMLHttpRequest.h: Ditto.
827         * xml/XMLHttpRequestUpload.h: Ditto.
828
829 2015-03-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
830
831         Setting any of the <object> element plugin controlling attributes does not have any affect.
832         https://bugs.webkit.org/show_bug.cgi?id=141936.
833
834         Reviewed by Simon Fraser.
835         
836         When setting any of the <object> element plugin controlling attributes
837         dynamically we need to mark the the element to be dirty by calling
838         setNeedsStyleRecalc(), so it has to recreate its renderer when needed.
839
840         Tests: fast/css/image-object-hover-inherit.html
841                svg/as-object/svg-in-object-dynamic-attribute-change.html
842
843         * dom/Element.h: Delete unimplemented function.
844         
845         * html/HTMLObjectElement.cpp:
846         (WebCore::HTMLObjectElement::parseAttribute): Mark the element dirty by
847         calling setNeedsStyleRecalc() when one of the plugin controlling attributes
848         gets changed. We have to clear m_useFallbackContent because the attribute's
849         new value might fix the object rendering.
850         
851         * html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.
852
853 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
854
855         Test horiz-origin-x and horiz-origin-y in SVG fonts
856         https://bugs.webkit.org/show_bug.cgi?id=142403
857
858         Reviewed by Simon Fraser.
859
860         Remove incorrect comment.
861
862         Test: svg/fonts/svg-font-horiz-origin.html
863
864         * svg/SVGToOTFFontConversion.cpp:
865         (WebCore::CFFBuilder::CFFBuilder):
866
867 2015-03-06  Simon Fraser  <simon.fraser@apple.com>
868
869         Allow tree dumping functions to be used in release builds by switching a flag
870         https://bugs.webkit.org/show_bug.cgi?id=142379
871
872         Reviewed by Zalan Bujtas.
873
874         There are various tree dumping functions that are useful for debugging, and sometimes
875         you want to be able to use them in release builds. Currently they are surrounded by
876         #ifndef NDEBUG. Change this to #if ENABLE(TREE_DEBUGGING), which is defined to 0 or 1
877         in wtf/Platform.h
878
879         * dom/DocumentMarkerController.cpp:
880         * dom/DocumentMarkerController.h:
881         * dom/Element.cpp:
882         * dom/Element.h:
883         * dom/Node.cpp:
884         * dom/Node.h:
885         * dom/Position.cpp:
886         * dom/Position.h:
887         * dom/Range.cpp:
888         * dom/Range.h:
889         * dom/Text.cpp:
890         * dom/Text.h:
891         * editing/FrameSelection.cpp:
892         * editing/FrameSelection.h:
893         * editing/VisiblePosition.cpp:
894         * editing/VisiblePosition.h:
895         * editing/VisibleSelection.cpp:
896         * editing/VisibleSelection.h:
897         * html/parser/HTMLElementStack.cpp:
898         * html/parser/HTMLFormattingElementList.cpp:
899         * rendering/CounterNode.cpp:
900         * rendering/CounterNode.h:
901         * rendering/InlineBox.cpp:
902         * rendering/InlineBox.h:
903         * rendering/InlineFlowBox.cpp:
904         * rendering/InlineFlowBox.h:
905         * rendering/InlineTextBox.cpp:
906         * rendering/InlineTextBox.h:
907         * rendering/RenderBlockFlow.cpp:
908         * rendering/RenderBlockFlow.h:
909         * rendering/RenderCounter.cpp:
910         * rendering/RenderCounter.h:
911         * rendering/RenderLayer.cpp:
912         * rendering/RenderLayer.h:
913         * rendering/RenderLayerBacking.cpp:
914         (WebCore::RenderLayerBacking::createGraphicsLayer):
915         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
916         (WebCore::RenderLayerBacking::updateForegroundLayer):
917         (WebCore::RenderLayerBacking::updateBackgroundLayer):
918         * rendering/RenderLayerCompositor.cpp:
919         (WebCore::CompositingState::CompositingState):
920         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
921         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
922         (WebCore::RenderLayerCompositor::updateLayerForHeader):
923         (WebCore::RenderLayerCompositor::updateLayerForFooter):
924         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
925         (WebCore::RenderLayerCompositor::ensureRootLayer):
926         * rendering/RenderObject.cpp:
927         * rendering/RenderObject.h:
928         * rendering/RootInlineBox.cpp:
929         * rendering/RootInlineBox.h:
930         * rendering/SimpleLineLayoutFunctions.cpp:
931         * rendering/SimpleLineLayoutFunctions.h:
932         * rendering/svg/SVGResources.cpp:
933         * rendering/svg/SVGResources.h:
934
935 2015-03-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
936
937         An SVG element without intrinsic size inherits the container size as its viewport instead of inheriting the container viewport.
938         https://bugs.webkit.org/show_bug.cgi?id=141725.
939
940         Reviewed by Darin Adler.
941
942         The current viewport of the <svg> element should be retrieved from its
943         renderer if the renderer is available. If the renderer is not created yet,
944         this means the viewport is needed to calculate the size of the renderer.
945         In this case, we should return the element size if it is intrinsic size.
946         
947         Test: svg/css/svg-css-different-intrinsic-sizes.html
948
949         * svg/SVGSVGElement.cpp:
950         (WebCore::SVGSVGElement::currentViewportSize): Change the order for
951         returning the viewport of the <svg> element. We should consider the case
952         of a valid renderer before considering the case of an intrinsic size.
953
954 2015-03-06  Simon Fraser  <simon.fraser@apple.com>
955
956         Allow composited clip-path to be updated without a layer repaint
957         https://bugs.webkit.org/show_bug.cgi?id=142384
958
959         Reviewed by Zalan Bujtas.
960         
961         When clip-path is mapped to a compositing shape layer mask, we can just
962         push a new shape to the GraphicsLayer to update the clip path, without
963         needing to repaint.
964         
965         Achieve this by adding ContextSensitivePropertyClipPath. When set, and the
966         stars are aligned, issue a StyleDifferenceRecompositeLayer rather than
967         a StyleDifferenceRepaint.
968         
969         We ask RenderLayerCompositor whether the clip path can be composited
970         to hide platform differences related to whether GraphicsLayer supports
971         shape masks.
972
973         Test: compositing/masks/compositing-clip-path-change-no-repaint.html
974
975         * rendering/RenderElement.cpp:
976         (WebCore::RenderElement::adjustStyleDifference): Remove obvious comment
977         about opacity. Handle ContextSensitivePropertyClipPath.
978         * rendering/RenderLayerCompositor.cpp:
979         (WebCore::RenderLayerCompositor::canCompositeClipPath): If we have a mask
980         we have to paint the mask + clip path into the mask layer (mirrors code in
981         RenderLayerBacking::updateMaskingLayer but isn't quite similar enough to share).
982         * rendering/RenderLayerCompositor.h:
983         * rendering/style/RenderStyle.cpp:
984         (WebCore::RenderStyle::changeRequiresRepaint): Set ContextSensitivePropertyClipPath
985         and don't return, as is normal for context-sensitive property handling.
986         * rendering/style/RenderStyleConstants.h: Line things up to avoid future bit
987         fumbles, and remove unnecessary braces.
988
989 2015-03-06  Alex Christensen  <achristensen@webkit.org>
990
991         [Content Extensions] Process all actions when blocking a URL.
992         https://bugs.webkit.org/show_bug.cgi?id=142363
993
994         Reviewed by Darin Adler.
995
996         This can only be tested once we implement css selectors.
997
998         * contentextensions/ContentExtensionsBackend.cpp:
999         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
1000         Do not return early when adding a block action.
1001         * loader/cache/CachedResourceLoader.cpp:
1002         (WebCore::CachedResourceLoader::requestResource):
1003         Process all actions before returning.
1004
1005 2015-03-05  Darin Adler  <darin@apple.com>
1006
1007         Make JavaScript binding get and set legacy event listener attributes directly
1008         https://bugs.webkit.org/show_bug.cgi?id=142282
1009
1010         Reviewed by Antti Koivisto.
1011
1012         Test: fast/dom/legacy-event-handler-attributes.html
1013
1014         This patch changes the JavaScript getters and setters for these attributes
1015         to work directly without requiring any functions in the C++ DOM implementation.
1016         A subsequent patch will remove the now-unused C++ DOM implementation.
1017
1018         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1019         (WebCore::AudioScheduledSourceNode::setOnended): Remove code to set
1020         m_hasEndedListener; this was incorrect since it only detected event listeners
1021         set up with the event handler attribute, not with addEventListener.
1022         (WebCore::AudioScheduledSourceNode::addEventListener): Added code to update
1023         m_hasEndedListener after making changes to the event listeners.
1024         (WebCore::AudioScheduledSourceNode::removeEventListener): Ditto.
1025         (WebCore::AudioScheduledSourceNode::removeAllEventListeners): Ditto.
1026         * Modules/webaudio/AudioScheduledSourceNode.h: Added above overrides.
1027
1028         * Modules/webaudio/ScriptProcessorNode.cpp:
1029         (WebCore::ScriptProcessorNode::setOnaudioprocess): Remove code to set
1030         m_hasAudioProcessListener; this was incorrect since it only detected event listeners
1031         set up with the event handler attribute, not with addEventListener.
1032         (WebCore::ScriptProcessorNode::addEventListener): Added code to update
1033         m_hasAudioProcessListener after making changes to the event listeners.
1034         (WebCore::ScriptProcessorNode::removeEventListener): Ditto.
1035         (WebCore::ScriptProcessorNode::removeAllEventListeners): Ditto.
1036         * Modules/webaudio/ScriptProcessorNode.h: Added above overrides.
1037
1038         * bindings/js/JSEventListener.cpp:
1039         (WebCore::legacyEventListenerAttribute): Added.
1040         (WebCore::createEventListenerForLegacyAttribute): Added.
1041         (WebCore::setLegacyEventListenerAttribute): Added.
1042         (WebCore::legacyWindowEventListenerAttribute): Added.
1043         (WebCore::setLegacyWindowEventListenerAttribute): Added.
1044
1045         * bindings/js/JSEventListener.h:
1046         (WebCore::createJSEventListenerForAttribute): Deleted.
1047
1048         * bindings/scripts/CodeGeneratorJS.pm:
1049         (GenerateAttributeEventListenerCall): Deleted.
1050         (LegacyEventListenerAttributeEventName): Added.
1051         (LegacyEventListenerAttributePrefix): Added.
1052         (GenerateImplementation): Use "auto" in lots of places to simplify the code
1053         generation. Replaced the old inlined code to deal with legacy event listener
1054         attributes with code that simply calls the new functions from JSEventLister.h.
1055         (GenerateCallWith): Use "auto".
1056         (GenerateConstructorDefinition): Ditto.
1057
1058         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Updated expected
1059         results since these now use auto.
1060         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
1061         * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Ditto.
1062         * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
1063         * bindings/scripts/test/JS/JSTestException.cpp: Ditto.
1064         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Ditto.
1065         * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
1066         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
1067         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
1068         * bindings/scripts/test/JS/JSTestNode.cpp: Ditto.
1069         * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Ditto.
1070         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
1071         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
1072         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
1073         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
1074         * bindings/scripts/test/JS/JSattribute.cpp: Ditto.
1075         * bindings/scripts/test/JS/JSreadonly.cpp: Ditto.
1076
1077         * dom/MessagePort.cpp:
1078         (WebCore::MessagePort::addEventListener): Moved logic that calls the start
1079         function in here from setOnmessage, since the latter will no longer be called.
1080         * dom/MessagePort.h: Ditto.
1081
1082 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
1083
1084         [iOS] SVG fonts are garbled
1085         https://bugs.webkit.org/show_bug.cgi?id=142377
1086
1087         Reviewed by Simon Fraser.
1088
1089         The C++ spec says that casting a negative floating point number to
1090         an unsigned integer is undefined. Instead, use clamping.
1091
1092         Covered by existing SVG font tests.
1093
1094         * Configurations/FeatureDefines.xcconfig:
1095         * svg/SVGToOTFFontConversion.cpp:
1096         (WebCore::writeCFFEncodedNumber):
1097
1098 2015-03-06  Commit Queue  <commit-queue@webkit.org>
1099
1100         Unreviewed, rolling out r181139.
1101         https://bugs.webkit.org/show_bug.cgi?id=142394
1102
1103         "Caused many crashes in API tests and layout tests in Debug
1104         builds on bots." (Requested by ddkilzer on #webkit).
1105
1106         Reverted changeset:
1107
1108         "Allow tree dumping functions to be used in release builds by
1109         switching a flag"
1110         https://bugs.webkit.org/show_bug.cgi?id=142379
1111         http://trac.webkit.org/changeset/181139
1112
1113 2015-03-05  Philippe Normand  <pnormand@igalia.com>
1114
1115         [MediaStream] new load method for MediaStreamPrivate objects
1116         https://bugs.webkit.org/show_bug.cgi?id=142346
1117
1118         Reviewed by Eric Carlson.
1119
1120         No new tests, existing mediastream tests cover this use-case.
1121
1122         * html/HTMLMediaElement.cpp:
1123         (WebCore::HTMLMediaElement::loadResource): Use new load method for MediaStreams.
1124         * platform/graphics/MediaPlayer.cpp:
1125         (WebCore::NullMediaPlayerPrivate::load): New stub.
1126         (WebCore::MediaPlayer::load): New load method for
1127         MediaStreamPrivate.
1128         (WebCore::MediaPlayer::nextBestMediaEngine): Set a new boolean on
1129         the MediaEngineSupportParameters to differenciate with MSE and
1130         normal video resources.
1131         (WebCore::MediaPlayer::loadWithNextMediaEngine): Defer loading of
1132         the MediaStream to the MediaPlayerPrivate backend.
1133         * platform/graphics/MediaPlayer.h:
1134         (WebCore::MediaEngineSupportParameters::MediaEngineSupportParameters):
1135         * platform/graphics/MediaPlayerPrivate.h:
1136         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1137         (WebCore::MediaPlayerPrivateAVFoundation::load): New empty load
1138         method for MediaStreamPrivate objects.
1139         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1140         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): Ditto.
1141         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1142         (WebCore::MediaPlayerPrivateGStreamer::load): Ditto.
1143         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1144         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1145         (WebCore::MediaPlayerPrivateQTKit::load): Ditto.
1146         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
1147
1148 2015-03-05  Philippe Normand  <pnormand@igalia.com>
1149
1150         Rename MediaStreamSource to RealtimeMediaSource
1151         https://bugs.webkit.org/show_bug.cgi?id=142330
1152
1153         Reviewed by Eric Carlson.
1154
1155         MediaStreamSource is a misleading name, it's not the source of a
1156         MediaStream.
1157
1158         The chain from high level to low level is: MediaStream -
1159         MediaStreamTrack - MediaStreamTrackPrivate - RealTimeMediaSource
1160         and a MediaStream can contains several MediaStreamTrack objects of
1161         different types.
1162
1163         MediaStreamSourceStates was also renamed to
1164         RealtimeMediaSourceStates, and MediaStreamSourceCapabilities to
1165         RealtimeMediaSourceCapabilities, for consistency.
1166
1167 2015-03-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1168
1169         Unreviewed WinCairo port build fix since r181136.
1170
1171         * platform/network/curl/ResourceRequest.h:
1172         (WebCore::ResourceRequest::doPlatformAdopt): Missing ":" in std::unique_ptr.
1173
1174 2015-03-06  David Kilzer  <ddkilzer@apple.com>
1175
1176         Rename SOFT_LINK_{CONSTANT,FUNCTION}_{HEADER,SOURCE} to SOFT_LINK_{CONSTANT,FUNCTION}_FOR_{HEADER,SOURCE}
1177         <http://webkit.org/b/142177>
1178
1179         Reviewed by Alex Christensen.
1180
1181         * platform/cf/CoreMediaSoftLink.cpp:
1182         - Rename SOFT_LINK_{CONSTANT,FUNCTION}_SOURCE() to
1183           SOFT_LINK_{CONSTANT,FUNCTION}_FOR_SOURCE().
1184         * platform/cf/CoreMediaSoftLink.h:
1185         - Rename SOFT_LINK_{CONSTANT,FUNCTION}_HEADER() to
1186           SOFT_LINK_{CONSTANT,FUNCTION}_FOR_HEADER().
1187
1188         * platform/mac/SoftLinking.h:
1189         * platform/win/SoftLinking.h:
1190         - Rename SOFT_LINK_{CONSTANT,FUNCTION}_{HEADER,SOURCE}() to
1191           SOFT_LINK_{CONSTANT,FUNCTION}_FOR_{HEADER,SOURCE}().
1192
1193 2015-03-06  Sergio Villar Senin  <svillar@igalia.com>
1194
1195         [CSS Grid Layout] ASSERTION FAILED !track.growthLimitIsInfinite() in RenderGrid::computeUsedBreadthOfGridTracks
1196         https://bugs.webkit.org/show_bug.cgi?id=142265
1197
1198         Reviewed by Darin Adler.
1199
1200          The problem is that computeUsedBreadthOfGridTracks() could return
1201         -1 for rows because we're calling computeContentLogicalHeight()
1202         which can indeed return -1. In those cases we should clamp the
1203         value to 0 the same as Flexbox does otherwise we could end up with
1204         a negative value in the min track sizing function.
1205
1206         Test: fast/css-grid-layout/grid-indefinite-calculated-height-crash.html
1207
1208         * rendering/RenderGrid.cpp:
1209         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
1210
1211 2015-03-05  Simon Fraser  <simon.fraser@apple.com>
1212
1213         Allow tree dumping functions to be used in release builds by switching a flag
1214         https://bugs.webkit.org/show_bug.cgi?id=142379
1215
1216         Reviewed by Zalan Bujtas.
1217
1218         There are various tree dumping functions that are useful for debugging, and sometimes
1219         you want to be able to use them in release builds. Currently they are surrounded by
1220         #ifndef NDEBUG. Change this to #if ENABLE(TREE_DEBUGGING), which is defined to 0 or 1
1221         in config.h
1222
1223         * config.h:
1224         * dom/DocumentMarkerController.cpp:
1225         * dom/DocumentMarkerController.h:
1226         * dom/Element.cpp:
1227         * dom/Element.h:
1228         * dom/Node.cpp:
1229         * dom/Node.h:
1230         * dom/Position.cpp: Position::debugPosition(const char* msg) was available in release builds, but this changes
1231         is to respect ENABLE_TREE_DEBUGGING, which I think is correct.
1232         * dom/Position.h:
1233         * dom/Range.cpp:
1234         * dom/Range.h:
1235         * dom/Text.cpp:
1236         * dom/Text.h:
1237         * rendering/CounterNode.cpp:
1238         * rendering/CounterNode.h:
1239         * rendering/InlineBox.cpp:
1240         * rendering/InlineBox.h:
1241         * rendering/InlineFlowBox.cpp:
1242         * rendering/InlineFlowBox.h:
1243         * rendering/InlineTextBox.cpp:
1244         * rendering/InlineTextBox.h:
1245         * rendering/RenderBlockFlow.cpp:
1246         * rendering/RenderBlockFlow.h:
1247         * rendering/RenderCounter.cpp:
1248         * rendering/RenderCounter.h:
1249         * rendering/RenderLayer.cpp:
1250         * rendering/RenderLayer.h:
1251         * rendering/RenderLayerBacking.cpp:
1252         (WebCore::RenderLayerBacking::createGraphicsLayer):
1253         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1254         (WebCore::RenderLayerBacking::updateForegroundLayer):
1255         (WebCore::RenderLayerBacking::updateBackgroundLayer):
1256         * rendering/RenderLayerCompositor.cpp:
1257         (WebCore::CompositingState::CompositingState):
1258         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
1259         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
1260         (WebCore::RenderLayerCompositor::updateLayerForHeader):
1261         (WebCore::RenderLayerCompositor::updateLayerForFooter):
1262         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
1263         (WebCore::RenderLayerCompositor::ensureRootLayer):
1264         * rendering/RenderObject.cpp:
1265         * rendering/RenderObject.h: showTreeCharacterOffset was unused.
1266         * rendering/RootInlineBox.cpp:
1267         * rendering/RootInlineBox.h:
1268         * rendering/SimpleLineLayoutFunctions.cpp:
1269         * rendering/SimpleLineLayoutFunctions.h:
1270         * rendering/svg/SVGResources.cpp:
1271         * rendering/svg/SVGResources.h:
1272
1273 2015-03-05  Brent Fulgham  <bfulgham@apple.com>
1274
1275         [Mac] 'Gliding' phase of scroll snap points is incorrect on desktop
1276         https://bugs.webkit.org/show_bug.cgi?id=142351
1277         <rdar://problem/20058023>
1278
1279         Reviewed by Dean Jackson.
1280
1281         This problem was caused by incorrectly starting a new snapping animation timer when the
1282         "end momentum" phase event had been received. This caused WebKit to recalculate the
1283         animation curve for the remaining distance, resulting in the bad animation behavior.
1284
1285         Removing this incorrect start animation command when entering the momentum ended state
1286         resolves the problem.
1287
1288         * platform/cocoa/ScrollController.mm:
1289         (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Remove the command to
1290         start a new snap animation when entering the "end momentum" state.
1291
1292 2015-03-05  Joonghun Park  <jh718.park@samsung.com>
1293
1294         Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ResourceRequest
1295         https://bugs.webkit.org/show_bug.cgi?id=142349
1296
1297         Reviewed by Darin Adler.
1298
1299         No new tests, no behavior changes.
1300
1301         * loader/WorkerThreadableLoader.cpp:
1302         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
1303         * loader/cache/MemoryCache.cpp:
1304         (WebCore::MemoryCache::removeRequestFromSessionCaches):
1305         * platform/CrossThreadCopier.h:
1306         * platform/network/ResourceRequestBase.cpp:
1307         (WebCore::ResourceRequestBase::adopt):
1308         (WebCore::ResourceRequestBase::copyData):
1309         * platform/network/ResourceRequestBase.h:
1310         * platform/network/cf/ResourceRequest.h:
1311         * platform/network/cf/ResourceRequestCFNet.cpp:
1312         (WebCore::ResourceRequest::doPlatformCopyData):
1313         (WebCore::ResourceRequest::doPlatformAdopt):
1314         * platform/network/curl/ResourceRequest.h:
1315         (WebCore::ResourceRequest::doPlatformCopyData):
1316         (WebCore::ResourceRequest::doPlatformAdopt):
1317         * platform/network/soup/ResourceRequest.h:
1318         (WebCore::ResourceRequest::doPlatformCopyData):
1319         (WebCore::ResourceRequest::doPlatformAdopt):
1320
1321 2015-03-05  Oliver Hunt  <oliver@apple.com>
1322
1323         Block mixed mode content
1324         https://bugs.webkit.org/show_bug.cgi?id=142378
1325
1326         Reviewed by Darin Adler.
1327
1328         Switched to blocking mixed mode content by default,
1329         and modify the blocking rules to allow us to match
1330         the behaviours of other browsers.
1331
1332         * loader/DocumentLoader.cpp:
1333         (WebCore::DocumentLoader::willSendRequest):
1334         * loader/MixedContentChecker.cpp:
1335         (WebCore::MixedContentChecker::canDisplayInsecureContent):
1336         (WebCore::MixedContentChecker::canRunInsecureContent):
1337         (WebCore::MixedContentChecker::logWarning):
1338         * loader/MixedContentChecker.h:
1339         * loader/cache/CachedResourceLoader.cpp:
1340         (WebCore::contentTypeFromResourceType):
1341         (WebCore::CachedResourceLoader::checkInsecureContent):
1342         * page/Settings.in:
1343
1344 2015-03-05  Chris Dumez  <cdumez@apple.com>
1345
1346         Document::recalcStyle() shouldn't call viewportContentsChanged() if there is a pending layout
1347         https://bugs.webkit.org/show_bug.cgi?id=142140
1348
1349         Reviewed by Darin Adler.
1350
1351         Stop calling FrameView::viewportContentsChanged() in Document::recalcStyle()
1352         if there is a layout pending to avoid doing unncessary work. If there is a
1353         layout pending, we don't need to do anything because viewportContentsChanged()
1354         will be called after layout.
1355
1356         We only need to call FrameView::viewportContentsChanged() in
1357         Document::recalcStyle() if a style recalc does not cause a layout. For e.g.
1358         a '-webkit-transform' could make an animated GIF visible without causing a
1359         layout, in which case we need to resume the animated GIF after style recalc.
1360
1361         No new tests, already covered by:
1362         fast/images/animated-gif-webkit-transform.html
1363
1364         * dom/Document.cpp:
1365         (WebCore::Document::recalcStyle):
1366
1367 2015-03-05  Dean Jackson  <dino@apple.com>
1368
1369         [iOS Media] Web video on iPad appears black and missing the AirPlay placard when connected to an AirPlay route
1370         https://bugs.webkit.org/show_bug.cgi?id=142373
1371         <rdar://problem/19866072>
1372
1373         Reviewed by Brent Fulgham.
1374
1375         There was no style for the placard, which meant it had
1376         zero height (and thus was invisible).
1377
1378         * Modules/mediacontrols/mediaControlsiOS.css:
1379         (audio::-webkit-media-controls-wireless-playback-status): Added.
1380         (audio::-webkit-media-controls-wireless-playback-status.hidden):
1381
1382 2015-03-05  Roger Fong  <roger_fong@apple.com>
1383
1384         Adjust volume box to not intersect with rest of inline media controls on OSX.
1385         https://bugs.webkit.org/show_bug.cgi?id=142372.
1386         <rdar://problem/20064327>
1387
1388         Reviewed by Brent Fulgham.
1389
1390         * Modules/mediacontrols/mediaControlsApple.css:
1391         (audio::-webkit-media-controls-panel .volume-box):
1392         (audio::-webkit-media-controls-panel .volume-box:active):
1393
1394 2015-03-05  Timothy Horton  <timothy_horton@apple.com>
1395
1396         <attachment> should allow the title property to override its title
1397         https://bugs.webkit.org/show_bug.cgi?id=142369
1398
1399         Reviewed by Anders Carlsson.
1400
1401         Test: fast/attachment/attachment-title.html
1402
1403         * html/HTMLAttachmentElement.cpp:
1404         (WebCore::HTMLAttachmentElement::parseAttribute):
1405         Invalidate the attachment if the title changes.
1406
1407         (WebCore::HTMLAttachmentElement::attachmentTitle):
1408         Use the title attribute for the title, unless it's empty, in which
1409         case we'll use the file's name.
1410
1411         * html/HTMLAttachmentElement.h:
1412         * rendering/RenderThemeMac.mm:
1413         (WebCore::AttachmentLayout::layOutTitle):
1414         Use attachmentTitle() instead of reaching into the file. Also rename
1415         some things from filename to title.
1416
1417 2015-03-05  Timothy Horton  <timothy_horton@apple.com>
1418
1419         Two text carets result when dragging a file into a contentEditable area that preventDefault()s the "drop" event
1420         https://bugs.webkit.org/show_bug.cgi?id=142362
1421         <rdar://problem/20046434>
1422
1423         Reviewed by Simon Fraser.
1424
1425         * page/DragController.h:
1426         * page/DragController.cpp:
1427         (WebCore::DragController::clearDragCaret):
1428         Rename cancelDrag to clearDragCaret, since that's really what it does.
1429
1430         (WebCore::DragController::tryDocumentDrag):
1431         When updating the drag position, if we're now over a <input type="file">,
1432         clear the drag caret. This avoids leaving a caret behind when dragging
1433         over a <input type="file"> inside a contentEditable area.
1434
1435         (WebCore::DragController::performDragOperation):
1436         When the content preventDefault()s while finishing a drag, we should still
1437         clear the drag caret, because it's possible that the client did not
1438         preventDefault() on dragover/etc., so we would have set a cursor, and
1439         now need to clear it so that it doesn't get left behind.
1440
1441         (WebCore::DragController::mouseMovedIntoDocument):
1442         (WebCore::DragController::dragEnteredOrUpdated):
1443         (WebCore::DragController::concludeEditDrag):
1444         Adjust to renamed clearDragCaret.
1445
1446         (WebCore::DragController::dragEnded):
1447         Make use of clearDragCaret (which is equivalent to this line).
1448
1449 2015-03-05  Timothy Horton  <timothy_horton@apple.com>
1450
1451         <attachment> should support indication of download progress
1452         https://bugs.webkit.org/show_bug.cgi?id=142336
1453         <rdar://problem/19982504>
1454
1455         Reviewed by Anders Carlsson.
1456
1457         * html/HTMLAttachmentElement.cpp:
1458         (WebCore::HTMLAttachmentElement::parseAttribute):
1459         Invalidate the attachment if the progress attribute changes.
1460
1461         * platform/graphics/FloatRoundedRect.h:
1462         (WebCore::FloatRoundedRect::Radii::Radii):
1463         Add a Radii constructor that takes a single argument that is used
1464         as the radius for all corners, for convenience.
1465
1466         * rendering/RenderThemeMac.mm:
1467         (WebCore::attachmentProgressBarBackgroundColor):
1468         (WebCore::attachmentProgressBarFillColor):
1469         (WebCore::attachmentProgressBarBorderColor):
1470         Add a bunch of constants for the progress bar.
1471
1472         (WebCore::paintAttachmentIconBackground):
1473         Make use of fillRoundedRect instead of creating a path.
1474
1475         (WebCore::paintAttachmentProgress):
1476         (WebCore::RenderThemeMac::paintAttachment):
1477         Paint a progress bar if the progress attribute exists and
1478         is a valid floating point number.
1479
1480 2015-03-05  Commit Queue  <commit-queue@webkit.org>
1481
1482         Unreviewed, rolling out r180846.
1483         https://bugs.webkit.org/show_bug.cgi?id=142368
1484
1485         Caused missing image banners in iTunes store pages (Requested
1486         by smfr on #webkit).
1487
1488         Reverted changeset:
1489
1490         "FrameView::layoutTimerFired() should update style if needed
1491         before doing layout"
1492         https://bugs.webkit.org/show_bug.cgi?id=141688
1493         http://trac.webkit.org/changeset/180846
1494
1495 2015-03-05  Sandy Perez  <sperez@indaba.es>
1496
1497         Fix the build when NEON_INTRINSICS is enabled
1498         https://bugs.webkit.org/show_bug.cgi?id=142361
1499
1500         Reviewed by Csaba Osztrogonác.
1501
1502         * platform/graphics/cpu/arm/filters/FEBlendNEON.h:
1503         (WebCore::FEBlend::platformApplySoftware):
1504         * platform/graphics/filters/FEGaussianBlur.cpp:
1505         (WebCore::standardBoxBlur):
1506
1507 2015-03-05  Benjamin Poulain  <bpoulain@apple.com>
1508
1509         Add basic support for character sets to the URL Filter parser
1510         https://bugs.webkit.org/show_bug.cgi?id=142257
1511
1512         Reviewed by Alex Christensen.
1513
1514         This patch is a first step toward making the URL filter parser a bit
1515         more powerful: it adds support for character set atom.
1516
1517         I did not attempt to integrate that into the prefix tree in this patch,
1518         instead, the GraphBuilder gets a two modes of generating the NFA:
1519         PrefixTree and DirectGeneration.
1520
1521         As long as we only see trivial atoms, we use the PrefixTree generation
1522         to minimize the number of nodes we need. As soon as we start a character
1523         class, we switch to DirectGeneration and we generate the NFA from the input
1524         without merging with previously seen patterns.
1525
1526         To differentiate between Trivial atoms and CharacterSet, we also gain
1527         an AtomType state.
1528
1529         The character set themself are very simple: each character is represented by
1530         a bit in a 16bytes bit vector.
1531
1532         * contentextensions/URLFilterParser.cpp:
1533         (WebCore::ContentExtensions::quantifyTrivialAtom):
1534         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
1535         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
1536         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
1537         (WebCore::ContentExtensions::GraphBuilder::atomBackReference):
1538         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBegin):
1539         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
1540         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
1541         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassEnd):
1542         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBuiltIn):
1543         (WebCore::ContentExtensions::GraphBuilder::sinkAtom):
1544         (WebCore::ContentExtensions::GraphBuilder::generateTransition):
1545         (WebCore::ContentExtensions::GraphBuilder::sinkTrivialAtom):
1546         (WebCore::ContentExtensions::GraphBuilder::sinkCharacterSet):
1547         (WebCore::ContentExtensions::GraphBuilder::sinkPendingAtomIfNecessary):
1548
1549 2015-03-05  Roger Fong  <roger_fong@apple.com>
1550
1551         Implement new fullscreen media controls on Mac.
1552         https://bugs.webkit.org/show_bug.cgi?id=142355.
1553         <rdar://problem/16175787>
1554
1555         Reviewed by Dean Jackson.
1556
1557         Adjust sizes and positioning of all fullscreen media control elements.
1558         * Modules/mediacontrols/mediaControlsApple.css:
1559         (audio::-webkit-media-controls-fullscreen-button.exit): Update to match entering fullscreen button.
1560         (video:-webkit-full-screen::-webkit-media-controls-panel):
1561         (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
1562         (video:-webkit-full-screen::-webkit-media-controls-volume-slider):
1563         (video:-webkit-full-screen::-webkit-media-controls-volume-max-button):
1564         (video:-webkit-full-screen::-webkit-media-controls-volume-min-button):
1565         (video:-webkit-full-screen::-webkit-media-controls-play-button):
1566         (video:-webkit-full-screen::-webkit-media-controls-play-button.paused):
1567         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
1568         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
1569         (video:-webkit-full-screen::-webkit-media-controls-timeline-container):
1570         (video:-webkit-full-screen::-webkit-media-controls-current-time-display):
1571         (video:-webkit-full-screen::-webkit-media-controls-time-remaining-display):
1572         (audio:-webkit-full-screen::-webkit-media-controls-toggle-closed-captions-button):
1573         (video:-webkit-full-screen::-webkit-media-controls-volume-slider::-webkit-slider-thumb): Deleted.
1574         (video:-webkit-full-screen::-webkit-media-controls-rewind-button): Deleted. Not used in full screen.
1575
1576 2015-03-05  Roger Fong  <roger_fong@apple.com>
1577
1578         Minor touchups to inline media control icons.
1579         https://bugs.webkit.org/show_bug.cgi?id=142354.
1580         <rdar://problem/20058854>.
1581
1582         Reviewed by Brent Fulgham.
1583
1584         Increase sizes of play/pause and fullscreen buttons slightly.
1585         * Modules/mediacontrols/mediaControlsApple.css:
1586         (audio::-webkit-media-controls-play-button):
1587         (audio::-webkit-media-controls-play-button.paused):
1588         (audio::-webkit-media-controls-fullscreen-button):
1589
1590 2015-03-05  Roger Fong  <roger_fong@apple.com>
1591
1592         Update inline media control icons for OSX.
1593         https://bugs.webkit.org/show_bug.cgi?id=142305.
1594         <rdar://problem/19997484>
1595
1596         Reviewed by Dean Jackson.
1597
1598         Changes include: new volume button, new full screen button, new play/pause button.
1599         Repositioning of 30 second and play buttons.
1600         * Modules/mediacontrols/mediaControlsApple.css:
1601         (audio::-webkit-media-controls-panel button):
1602         (audio::-webkit-media-controls-rewind-button):
1603         (audio::-webkit-media-controls-play-button):
1604         (audio::-webkit-media-controls-play-button.paused):
1605         (audio::-webkit-media-controls-panel .mute-box):
1606         (video::-webkit-media-controls-volume-max-button):
1607         (video::-webkit-media-controls-volume-min-button):
1608         (audio::-webkit-media-controls-toggle-closed-captions-button):
1609         (audio::-webkit-media-controls-fullscreen-button):
1610         (audio::-webkit-media-controls-current-time-display):
1611         * Modules/mediacontrols/mediaControlsApple.js:
1612         (Controller.prototype.configureInlineControls): Swap positions of rewind and play buttons.
1613         (Controller.prototype.handleMuteButtonClicked): Remember to update volume slider when necessary.
1614         (Controller.prototype.updateVolume): Ditto
1615
1616 2015-03-05  David Hyatt  <hyatt@apple.com>
1617
1618         Caps lock indicator in text fields is laying out in the wrong place.
1619         https://bugs.webkit.org/show_bug.cgi?id=142352
1620
1621         Reviewed by Dean Jackson.
1622
1623         * css/html.css:
1624         (input::-webkit-caps-lock-indicator):
1625         Change the CSS to give the SVG image an intrinsic size, and to use align-self:stretch so that
1626         the image always stretches to fill the height of the text box. Get rid of height:100%, as that
1627         just resolves to auto in strict mode and was not ever going to work there.
1628
1629 2015-03-04  Dean Jackson  <dino@apple.com>
1630
1631         [iOS Media] Use a blurry background for media controls
1632         https://bugs.webkit.org/show_bug.cgi?id=142316
1633         <rdar://problem/14911098>
1634
1635         Reviewed by Eric Carlson.
1636
1637         Start using the -webkit-appearance media-controls-light-bar-background
1638         in order to get the blurry background of media controls.
1639
1640         * Modules/mediacontrols/mediaControlsApple.js: Keep the panel and the
1641         panel background in sync when it comes to hiding and showing. It would
1642         be better if this could be done on a container element in the future.
1643         (Controller.prototype.handlePanelTransitionEnd):
1644         (Controller.prototype.setPlaying):
1645         (Controller.prototype.showControls):
1646         (Controller.prototype.hideControls):
1647
1648         * Modules/mediacontrols/mediaControlsiOS.css: New background container
1649         with the special appearance. I also renamed "composited-parent" to
1650         "container", which makes more sense.
1651         (video::-webkit-media-controls-panel-container):
1652         (audio::-webkit-media-controls-panel-container):
1653         (video::-webkit-media-controls-panel-background):
1654         (audio::-webkit-media-controls-panel-background):
1655         (video::-webkit-media-controls-panel-background.paused):
1656         (video::-webkit-media-controls-panel):
1657         (audio::-webkit-media-controls-panel):
1658         (video::-webkit-media-controls-panel.paused):
1659         (audio::-webkit-media-controls-optimized-fullscreen-button):
1660         (audio::-webkit-media-controls-timeline):
1661         (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
1662         (video::-webkit-media-controls-panel-composited-parent): Deleted.
1663         (video::-webkit-media-controls-panel:hover): Deleted.
1664
1665         * Modules/mediacontrols/mediaControlsiOS.js:
1666         (ControllerIOS.prototype.createControls): Create the new background element.
1667         (ControllerIOS.prototype.addControls):
1668         (ControllerIOS.prototype.set pageScaleFactor): Temporarily disable
1669         this because the background disappears when the zoom factor
1670         is too high - we start tiling the background. This will be addressed
1671         by https://bugs.webkit.org/show_bug.cgi?id=142317.
1672
1673 2015-03-05  Myles C. Maxfield  <mmaxfield@apple.com>
1674
1675         Mechanical text-related cleanup
1676         https://bugs.webkit.org/show_bug.cgi?id=142326
1677
1678         Reviewed by Andreas Kling.
1679
1680         Use nullptr instead of 0.
1681         Use references instead of pointers.
1682
1683         No new tests because there is no behavior change.
1684
1685         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1686         (WebCore::FontCascade::adjustSelectionRectForComplexText):
1687         (WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
1688         (WebCore::FontCascade::floatWidthForComplexText):
1689         (WebCore::FontCascade::offsetForPositionForComplexText):
1690         * platform/graphics/mac/ComplexTextController.cpp:
1691         (WebCore::TextLayout::TextLayout):
1692         (WebCore::ComplexTextController::ComplexTextController):
1693         * platform/graphics/mac/ComplexTextController.h:
1694         * rendering/InlineIterator.h:
1695         (WebCore::InlineIterator::InlineIterator):
1696         (WebCore::InlineIterator::clear):
1697         (WebCore::bidiNextShared):
1698         (WebCore::bidiNextSkippingEmptyInlines):
1699         (WebCore::bidiNextIncludingEmptyInlines):
1700         (WebCore::InlineWalker::InlineWalker):
1701         (WebCore::InlineIterator::increment):
1702         * rendering/RenderBlockLineLayout.cpp:
1703         (WebCore::setLogicalWidthForTextRun):
1704         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
1705         * rendering/line/BreakingContextInlineHeaders.h:
1706         (WebCore::measureHyphenWidth):
1707         (WebCore::textWidth):
1708         (WebCore::tryHyphenating):
1709         (WebCore::BreakingContext::handleText):
1710         (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
1711
1712 2015-03-05  Brent Fulgham  <bfulgham@apple.com>
1713
1714         Move AxisScrollSnapAnimator logic to ScrollController
1715         https://bugs.webkit.org/show_bug.cgi?id=142293
1716         <rdar://problem/20039867>
1717
1718         Reviewed by Dean Jackson.
1719
1720         No change in function.
1721
1722         Move the animation logic out of 'AxisScrollSnapAnimator' into 'ScrollController'. Rename the remaining
1723         bits of 'AxisScrollSnapAnimator' as 'ScrollSnapAnimatorState'. Remove a number of delegate methods required
1724         by 'AxisScrollSnapAnimatorClient' that are no longer needed.
1725
1726         Also, break up some of the Scroll Snap Point math to be a little easier to understand.
1727
1728         * WebCore.xcodeproj/project.pbxproj: Rename 'platform/mac/AxisScrollSnapAnimator.{h,mm}' -> 'platform/cocoa/ScrollSnapAnimatorState.h'
1729         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Mark 'scrollOffsetOnAxis' as const.
1730         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1731         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Make 'const'
1732         * platform/ScrollAnimator.cpp:
1733         (WebCore::ScrollAnimator::scrollOffsetOnAxis): Make 'const'
1734         * platform/ScrollAnimator.h:
1735         * platform/cocoa/ScrollController.h: No longer subclass from AxisScrollSnapAnimatorClient.
1736         * platform/cocoa/ScrollController.mm:
1737         (WebCore::ScrollController::scrollSnapPointState): Added accessors (const and non-const) for the individual
1738         Scroll Snap State of each axis.
1739         (WebCore::toWheelEventStatus): Moved from AxisScrollSnapAnimator.
1740         (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Added helper function containing the snap wheel handler code
1741         from AxisScrollSnapAnimator.
1742         (WebCore::ScrollController::shouldOverrideWheelEvent): Moved from AxisScrollSnapAnimator.
1743         (WebCore::ScrollController::processWheelEventForScrollSnap): Update to use new methods moved from AxisScrollSnapAnimator.
1744         (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Update for new ScrollSnapAnimatorState class.
1745         (WebCore::ScrollController::updateScrollSnapPoints): Ditto.
1746         (WebCore::ScrollController::startScrollSnapTimer): Call client (delegate) method.
1747         (WebCore::ScrollController::stopScrollSnapTimer): Ditto.
1748         (WebCore::ScrollController::horizontalScrollSnapTimerFired): Call new 'scrollSnapAnimationUpdate' method passing the
1749         correct axis to animate.
1750         (WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
1751         (WebCore::ScrollController::scrollSnapAnimationUpdate): Moved from AxisScrollSnapAnimator.
1752         (WebCore::projectedInertialScrollDistance): Moved from AxisScrollSnapAnimator.
1753         (WebCore::ScrollController::initializeGlideParameters): Ditto.
1754         (WebCore::ScrollController::beginScrollSnapAnimation): Ditto.
1755         (WebCore::ScrollController::endScrollSnapAnimation): Ditto.
1756         (WebCore::snapProgress): Created a new function for this calculation to make reasoning about the 'computeSnapDelta' and
1757         'computeGlideDelta' easier.
1758         (WebCore::clampedSnapMagnitude): Ditto.
1759         (WebCore::ScrollController::computeSnapDelta): Moved from AxisScrollSnapAnimator.
1760         (WebCore::snapGlide): Created a new function for this calculation to make reasoning about the 'computeGlideDelta' easier.
1761         (WebCore::ScrollController::computeGlideDelta): Moved from AxisScrollSnapAnimator.
1762         (WebCore::ScrollController::scrollOffsetOnAxis): Deleted.
1763         (WebCore::ScrollController::immediateScrollOnAxis): Deleted.
1764         * platform/cocoa/ScrollSnapAnimatorState.h: Copied from platform/mac/AxisScrollSnapAnimator.h.
1765         (WebCore::AxisScrollSnapAnimatorClient::~AxisScrollSnapAnimatorClient): Deleted.
1766         * platform/cocoa/ScrollSnapAnimatorState.mm: Copied from platform/mac/AxisScrollSnapAnimator.mm.
1767         (WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState):
1768         (WebCore::ScrollSnapAnimatorState::pushInitialWheelDelta):
1769         (WebCore::ScrollSnapAnimatorState::averageInitialWheelDelta):
1770         (WebCore::ScrollSnapAnimatorState::clearInitialWheelDeltaWindow):
1771         (WebCore::toWheelEventStatus): Deleted.
1772         (WebCore::projectedInertialScrollDistance): Deleted.
1773         (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator): Deleted.
1774         (WebCore::AxisScrollSnapAnimator::handleWheelEvent): Deleted.
1775         (WebCore::AxisScrollSnapAnimator::shouldOverrideWheelEvent): Deleted.
1776         (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Deleted.
1777         (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Deleted.
1778         (WebCore::AxisScrollSnapAnimator::endScrollSnapAnimation): Deleted.
1779         (WebCore::AxisScrollSnapAnimator::computeSnapDelta): Deleted.
1780         (WebCore::AxisScrollSnapAnimator::computeGlideDelta): Deleted.
1781         (WebCore::AxisScrollSnapAnimator::initializeGlideParameters): Deleted.
1782         (WebCore::AxisScrollSnapAnimator::pushInitialWheelDelta): Deleted.
1783         (WebCore::AxisScrollSnapAnimator::averageInitialWheelDelta): Deleted.
1784         (WebCore::AxisScrollSnapAnimator::clearInitialWheelDeltaWindow): Deleted.
1785         * platform/mac/AxisScrollSnapAnimator.h: Removed.
1786         * platform/mac/AxisScrollSnapAnimator.mm: Removed.
1787         * platform/mac/ScrollAnimatorMac.h:
1788         * platform/mac/ScrollAnimatorMac.mm:
1789         (WebCore::ScrollAnimatorMac::pinnedInDirection): Removed.
1790
1791 2015-03-04  Dean Jackson  <dino@apple.com>
1792
1793         [iOS Media] Small inline controls can clip the time widgets
1794         https://bugs.webkit.org/show_bug.cgi?id=142319
1795
1796         Reviewed by Eric Carlson.
1797
1798         Start counting the number of digits in a duration so that
1799         we can assign classes to the time widgets that specify
1800         a minimum width.
1801
1802         * Modules/mediacontrols/mediaControlsApple.css: Replace the hour-long and ten-hour-long
1803         classes with number of digits.
1804         (audio::-webkit-media-controls-time-remaining-display.five-digit-time):
1805         (audio::-webkit-media-controls-current-time-display.five-digit-time):
1806         (audio::-webkit-media-controls-time-remaining-display.six-digit-time):
1807         (audio::-webkit-media-controls-current-time-display.six-digit-time):
1808         (audio::-webkit-media-controls-time-remaining-display.hour-long-time): Deleted.
1809         (audio::-webkit-media-controls-current-time-display.hour-long-time): Deleted.
1810         (audio::-webkit-media-controls-time-remaining-display.ten-hour-long-time): Deleted.
1811         (audio::-webkit-media-controls-current-time-display.ten-hour-long-time): Deleted.
1812
1813         * Modules/mediacontrols/mediaControlsApple.js: Add some new class names.
1814         (Controller.prototype.updateDuration): Set the class of the time
1815         widgets when we know how long the media runs.
1816
1817         * Modules/mediacontrols/mediaControlsiOS.css: Values for iOS that
1818         are big enough to avoid clipping.
1819         (video::-webkit-media-controls-current-time-display):
1820         (video::-webkit-media-controls-time-remaining-display):
1821         (video::-webkit-media-controls-current-time-display.three-digit-time):
1822         (video::-webkit-media-controls-time-remaining-display.three-digit-time):
1823         (video::-webkit-media-controls-current-time-display.four-digit-time):
1824         (video::-webkit-media-controls-time-remaining-display.four-digit-time):
1825         (video::-webkit-media-controls-current-time-display.five-digit-time):
1826         (video::-webkit-media-controls-time-remaining-display.five-digit-time):
1827         (video::-webkit-media-controls-current-time-display.six-digit-time):
1828         (video::-webkit-media-controls-time-remaining-display.six-digit-time):
1829         (audio::-webkit-media-controls-timeline-container): Deleted.
1830         (video::-webkit-media-text-track-container): Deleted.
1831
1832 2015-03-05  Csaba Osztrogonác  <ossy@webkit.org>
1833
1834         [cmake] Fix the web replay build
1835         https://bugs.webkit.org/show_bug.cgi?id=142331
1836
1837         Reviewed by Gyuyoung Kim.
1838
1839         * CMakeLists.txt:
1840         * inspector/InspectorReplayAgent.cpp:
1841         (WebCore::buildInspectorObjectForSessionState):
1842         (WebCore::buildInspectorObjectForSegmentState):
1843
1844 2015-03-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1845
1846         [SOUP] Check TLS errors as soon as they are set in the SoupMessage
1847         https://bugs.webkit.org/show_bug.cgi?id=142244
1848
1849         Reviewed by Sergio Villar Senin.
1850
1851         Connect to the notify::tls-errors signal of SoupMessage to cancel
1852         the load earlier in case of TLS failure, preventing any private
1853         data from being sent to the server before the TLS errors are checked.
1854
1855         * platform/network/soup/ResourceHandleSoup.cpp:
1856         (WebCore::tlsErrorsChangedCallback):
1857         (WebCore::gotHeadersCallback):
1858         (WebCore::createSoupMessageForHandleAndRequest):
1859
1860 2015-03-05  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1861
1862         TextCheckingParagraph::isEmpty() is sufficient to check whether paragraph is empty
1863         https://bugs.webkit.org/show_bug.cgi?id=142276
1864
1865         Reviewed by Darin Adler.
1866
1867         TextCheckingParagraph::isEmpty() already calls TextCheckingParagraph::isRangeEmpty().
1868         There is no need to call them both at the caller site.
1869
1870         No new tests. No behavior change.
1871
1872         * editing/Editor.cpp:
1873         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1874         Update caller site.
1875
1876         * editing/TextCheckingHelper.cpp:
1877         (WebCore::TextCheckingParagraph::isEmpty):
1878         Avoid using helepers here to get rid of them as they are
1879         no longer needed outside TextCheckingParagraph.
1880
1881         * editing/TextCheckingHelper.h:
1882         (WebCore::TextCheckingParagraph::isTextEmpty): Deleted.
1883         (WebCore::TextCheckingParagraph::isRangeEmpty): Deleted.
1884         Do not expose isTextEmpty() and isRangeEmpty().
1885
1886 2015-03-04  Simon Fraser  <simon.fraser@apple.com>
1887
1888         Clarify RenderElement::adjustStyleDifference()
1889         https://bugs.webkit.org/show_bug.cgi?id=142256
1890
1891         Reviewed by David Hyatt.
1892
1893         Make RenderElement::adjustStyleDifference() clearer in two ways.
1894         
1895         First, replace lots of if (diff < X) diff = X with
1896         diff = std::max(diff, X). I did this even in cases where diff was
1897         being set unconditionally, because it's never correct to change the diff
1898         to a lesser value.
1899         
1900         Second the "set at least SimplifiedLayout, but if we have PositionedMovementOnly
1901         set it to SimplifiedLayoutAndPositionedMovement" was confusingly written.
1902
1903         * rendering/RenderElement.cpp:
1904         (WebCore::RenderElement::adjustStyleDifference):
1905
1906 2015-03-04  David Kilzer  <ddkilzer@apple.com>
1907
1908         Switch new soft-linking debug asserts to release asserts
1909         <http://webkit.org/b/142176>
1910
1911         Reviewed by Alex Christensen.
1912
1913         * platform/mac/SoftLinking.h:
1914         (SOFT_LINK_CONSTANT_SOURCE): Switch to release assert.
1915         (SOFT_LINK_FUNCTION_SOURCE): Ditto.
1916         * platform/win/SoftLinking.h:
1917         (SOFT_LINK_CONSTANT_SOURCE): Ditto.
1918         (SOFT_LINK_FUNCTION_SOURCE): Ditto.  Note that this method is
1919         effectively only called once because the function pointer is
1920         replaced after the first time it's called.
1921
1922 2015-03-04  Alex Christensen  <achristensen@webkit.org>
1923
1924         Optimize content extensions.
1925         https://bugs.webkit.org/show_bug.cgi?id=142295
1926
1927         Reviewed by Benjamin Poulain.
1928
1929         * contentextensions/ContentExtensionCompiler.cpp:
1930         (WebCore::ContentExtensions::serializeActions):
1931         There is no need to add duplicate sequential actions.
1932         * contentextensions/ContentExtensionRule.h:
1933         (WebCore::ContentExtensions::Action::operator==):
1934         Added to compare actions.
1935         * contentextensions/ContentExtensionsBackend.cpp:
1936         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
1937         Return early if a block action is found instead of moving to the next extension.
1938
1939 2015-03-04  Commit Queue  <commit-queue@webkit.org>
1940
1941         Unreviewed, rolling out r181046.
1942         https://bugs.webkit.org/show_bug.cgi?id=142318
1943
1944         Broke two layout tests (Requested by sundiamonde on #webkit).
1945
1946         Reverted changeset:
1947
1948         "Update inline media control icons for OSX."
1949         https://bugs.webkit.org/show_bug.cgi?id=142305
1950         http://trac.webkit.org/changeset/181046
1951
1952 2015-03-04  Timothy Horton  <timothy_horton@apple.com>
1953
1954         <attachment> icons are low-resolution when transformed or under page scale
1955         https://bugs.webkit.org/show_bug.cgi?id=142262
1956         <rdar://problem/20035480>
1957
1958         Reviewed by Dean Jackson.
1959
1960         We should use Icon::createIconForFiles, just like <input type="file"> does,
1961         instead of directly talking to IconServices. This results both in less code
1962         and in NSImage's multiresolution magic making the icons sharp even under
1963         the influence of transforms and page scale.
1964
1965         * WebCore.xcodeproj/project.pbxproj:
1966         * platform/spi/mac/IconServicesSPI.h: Removed.
1967         * platform/spi/mac/LaunchServicesSPI.h: Removed.
1968         Get rid of IconServicesSPI.h and LaunchServicesSPI.h.
1969
1970         * platform/graphics/Icon.h:
1971         Include RetainPtr just once.
1972         paint() should take a GraphicsContext reference (null is not an option)
1973         and a FloatRect (after all, it just turns around and converts to NSRect).
1974
1975         * platform/graphics/ios/IconIOS.mm:
1976         (WebCore::Icon::paint):
1977         * platform/graphics/mac/IconMac.mm:
1978         (WebCore::Icon::createIconForFiles):
1979         (WebCore::Icon::paint):
1980         * platform/graphics/efl/IconEfl.cpp:
1981         (WebCore::Icon::paint):
1982         * platform/graphics/gtk/IconGtk.cpp:
1983         (WebCore::Icon::paint):
1984         * platform/graphics/win/IconWin.cpp:
1985         (WebCore::Icon::paint):
1986         Adapt to the paint() signature changes, fix some style, etc.
1987
1988         * rendering/RenderFileUploadControl.cpp:
1989         (WebCore::RenderFileUploadControl::paintObject):
1990         * rendering/RenderThemeIOS.mm:
1991         (WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
1992         Adapt to the paint() signature changes.
1993
1994         * rendering/RenderThemeMac.mm:
1995         (WebCore::paintAttachmentIcon):
1996         Use Icon::createIconForFiles instead of IconServices.
1997
1998 2015-03-04  Tim Horton  <timothy_horton@apple.com>
1999
2000         <attachment> should not appear selected when the cursor is adjacent to it
2001         https://bugs.webkit.org/show_bug.cgi?id=142311
2002         <rdar://problem/20045862>
2003
2004         Reviewed by Dean Jackson.
2005
2006         * rendering/RenderAttachment.cpp:
2007         (WebCore::RenderAttachment::isSelected): Deleted.
2008         * rendering/RenderAttachment.h:
2009         * rendering/RenderThemeMac.mm:
2010         (WebCore::titleTextColorForAttachment):
2011         (WebCore::RenderThemeMac::paintAttachment):
2012         (WebCore::labelTextColorForAttachment): Deleted.
2013         We were using the wrong (and far too complicated) mechanism to determine
2014         if the attachment is selected (to decide which highlight color to use).
2015         Instead, just check selectionState().
2016
2017 2015-03-04  Timothy Horton  <timothy_horton@apple.com>
2018
2019         <attachment> should show the file size as detail text below the icon
2020         https://bugs.webkit.org/show_bug.cgi?id=142261
2021         <rdar://problem/20009570>
2022
2023         Reviewed by Dean Jackson.
2024
2025         Test: fast/attachment/attachment-subtitle.html
2026
2027         * html/HTMLAttachmentElement.cpp:
2028         (WebCore::HTMLAttachmentElement::setFile):
2029         (WebCore::HTMLAttachmentElement::parseAttribute):
2030         * html/HTMLAttachmentElement.h:
2031         Let RenderAttachment know when the subtitle attribute changes.
2032
2033         * html/HTMLAttributeNames.in:
2034         Add a subtitle attribute.
2035
2036         * rendering/RenderAttachment.cpp:
2037         (WebCore::RenderAttachment::invalidate):
2038         (WebCore::RenderAttachment::representedFileChanged): Deleted.
2039         * rendering/RenderAttachment.h:
2040         Rename representedFileChanged to invalidate; it will cause layout and
2041         repaint of the attachment. Mostly for use from HTMLAttachmentElement,
2042         when properties that affect the display and/or intrinsic size change.
2043
2044         * rendering/RenderThemeMac.mm:
2045         (WebCore::attachmentTitleInactiveBackgroundColor):
2046         (WebCore::attachmentTitleInactiveTextColor):
2047         (WebCore::attachmentSubtitleTextColor):
2048         (WebCore::titleTextColorForAttachment):
2049         (WebCore::AttachmentLayout::addTitleLine):
2050         (WebCore::AttachmentLayout::layOutTitle):
2051         (WebCore::AttachmentLayout::layOutSubtitle):
2052         (WebCore::AttachmentLayout::AttachmentLayout):
2053         (WebCore::addAttachmentTitleBackgroundRightCorner):
2054         (WebCore::addAttachmentTitleBackgroundLeftCorner):
2055         (WebCore::paintAttachmentTitleBackground):
2056         (WebCore::paintAttachmentTitle):
2057         (WebCore::paintAttachmentSubtitle):
2058         (WebCore::RenderThemeMac::paintAttachment):
2059         (WebCore::attachmentLabelInactiveBackgroundColor): Deleted.
2060         (WebCore::attachmentLabelInactiveTextColor): Deleted.
2061         (WebCore::labelTextColorForAttachment): Deleted.
2062         (WebCore::AttachmentLayout::addLine): Deleted.
2063         (WebCore::AttachmentLayout::layOutLabel): Deleted.
2064         (WebCore::addAttachmentLabelBackgroundRightCorner): Deleted.
2065         (WebCore::addAttachmentLabelBackgroundLeftCorner): Deleted.
2066         (WebCore::paintAttachmentLabelBackground): Deleted.
2067         (WebCore::paintAttachmentLabel): Deleted.
2068         Rename everything "label" to "title" (except LabelLine, which is not
2069         specifically about the title). We're going to use "title" for the
2070         main text below the icon, and "subtitle" for the secondary text below that.
2071
2072         Avoid keeping the CTFonts on the AttachmentLayout; there's no need for it.
2073
2074         Add layOutSubtitle and paintAttachmentSubtitle, which orient and paint
2075         the subtitle (below the title, in blue, smaller than the label).
2076
2077 2015-03-04  David Kilzer  <ddkilzer@apple.com>
2078
2079         [Windows] Build fix: Make sure to include <CoreMedia/CoreMedia.h> before redefining CMSampleBuffer
2080
2081         More fallout from:
2082
2083         Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
2084         <http://webkit.org/b/141870>
2085
2086         * platform/cf/CoreMediaSoftLink.cpp:
2087         * platform/cf/CoreMediaSoftLink.h:
2088         - Remove include of <CoreMedia/CoreMedia.h> here.  These already
2089           include CoreMediaSPI.h.
2090         * platform/spi/cf/CoreMediaSPI.h:
2091         - Add include of <CoreMedia/CoreMedia.h> here.
2092         - Remove redundant include of <CoreMedia/CMTime.h> for Windows.
2093
2094 2015-03-04  David Kilzer  <ddkilzer@apple.com>
2095
2096         [iOS] Fix build with newer clang due to duplicate macro definition
2097
2098         Fallout from:
2099
2100         Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
2101         <http://webkit.org/b/141870>
2102
2103         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2104         Remove duplicate kCMTimeIndefinite macro.
2105
2106 2015-03-04  Roger Fong  <roger_fong@apple.com>
2107
2108         Update inline media control icons for OSX.
2109         https://bugs.webkit.org/show_bug.cgi?id=142305.
2110         <rdar://problem/19997484>
2111
2112         Reviewed by Dean Jackson.
2113
2114         Changes include: new volume button, new full screen button, new play/pause button.
2115         Repositioning of 30 second and play buttons.
2116         * Modules/mediacontrols/mediaControlsApple.css:
2117         (audio::-webkit-media-controls-panel button):
2118         (audio::-webkit-media-controls-rewind-button):
2119         (audio::-webkit-media-controls-play-button):
2120         (audio::-webkit-media-controls-play-button.paused):
2121         (audio::-webkit-media-controls-panel .mute-box):
2122         (video::-webkit-media-controls-volume-max-button):
2123         (video::-webkit-media-controls-volume-min-button):
2124         (audio::-webkit-media-controls-toggle-closed-captions-button):
2125         (audio::-webkit-media-controls-fullscreen-button):
2126         (audio::-webkit-media-controls-current-time-display):
2127         * Modules/mediacontrols/mediaControlsApple.js:
2128         (Controller.prototype.configureInlineControls): Swap positions of rewind and play buttons.
2129         (Controller.prototype.handleMuteButtonClicked): Remember to update volume slider when necessary.
2130         (Controller.prototype.updateVolume): Ditto
2131
2132 2015-03-04  Andy Estes  <aestes@apple.com>
2133
2134         [Content Filtering] Rename ContentFilterMac.mm to ContentFilter.cpp
2135         https://bugs.webkit.org/show_bug.cgi?id=142313
2136
2137         Reviewed by Anders Carlsson.
2138
2139         ContentFilterMac.mm no longer contains any Objective-C code, so rename it to ContentFilter.cpp. It is also no longer Mac-specific, so move it up to platform/.
2140
2141         * WebCore.xcodeproj/project.pbxproj:
2142         * platform/ContentFilter.cpp: Renamed from Source/WebCore/platform/mac/ContentFilterMac.mm.
2143         * platform/cocoa/NetworkExtensionContentFilter.h: Replaced NSInteger with long.
2144
2145 2015-03-04  Dean Jackson  <dino@apple.com>
2146
2147         REGRESSION (r179597): Can't see power saver banner for plugins
2148         https://bugs.webkit.org/show_bug.cgi?id=142312
2149         <rdar://problem/20040517>
2150
2151         Reviewed by Brent Fulgham.
2152
2153         We were being a bit too restrictive when deciding a child
2154         should not create a renderer. All shadow root children
2155         of the snapshotted plugin need one.
2156
2157         * html/HTMLPlugInImageElement.cpp:
2158         (WebCore::HTMLPlugInImageElement::childShouldCreateRenderer):
2159         Test if we're part of the shadow tree.
2160
2161 2015-03-03  Andy Estes  <aestes@apple.com>
2162
2163         [Content Filtering] Make it easier to add new content filters
2164         https://bugs.webkit.org/show_bug.cgi?id=142255
2165
2166         Reviewed by Sam Weinig.
2167
2168         ContentFilter was becoming a bit of a mess, with both the WebFilterEvaluator and NEFilterSource implementations
2169         awkwardly living side-by-side. This patch cleans things up by moving these implementations into two separate
2170         classes and turning ContentFilter itself into an abstract interface that each implements. A new class called
2171         ContentFilterCollection, which also inherits from ContentFilter, manages the collection of individual content
2172         filters and is vended to the rest of the system by ContentFilter::createIfNeeded().
2173
2174         This refactoring will make it easier to add a third type of content filter in a follow-on patch, namely a mock
2175         content filter for testing purposes.
2176
2177         * WebCore.xcodeproj/project.pbxproj:
2178         * loader/DocumentLoader.cpp:
2179         (WebCore::DocumentLoader::responseReceived): Called ContentFilter::createIfNeeded() instead of instantiating a ContentFilter directly.
2180         * platform/ContentFilter.h:
2181         (WebCore::ContentFilter::~ContentFilter):
2182         * platform/cocoa/NetworkExtensionContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
2183         * platform/cocoa/NetworkExtensionContentFilter.mm: Added.
2184         (WebCore::NetworkExtensionContentFilter::canHandleResponse): Moved NEFilterSource code from ContentFilterMac.mm to here.
2185         (WebCore::NetworkExtensionContentFilter::create): Ditto.
2186         (WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Ditto.
2187         (WebCore::NetworkExtensionContentFilter::~NetworkExtensionContentFilter): Ditto.
2188         (WebCore::NetworkExtensionContentFilter::addData): Ditto.
2189         (WebCore::NetworkExtensionContentFilter::finishedAddingData): Ditto.
2190         (WebCore::NetworkExtensionContentFilter::needsMoreData): Ditto.
2191         (WebCore::NetworkExtensionContentFilter::didBlockData): Ditto.
2192         (WebCore::NetworkExtensionContentFilter::getReplacementData): Ditto.
2193         (WebCore::NetworkExtensionContentFilter::unblockHandler): Ditto.
2194         * platform/cocoa/ParentalControlsContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
2195         * platform/cocoa/ParentalControlsContentFilter.mm: Added.
2196         (WebCore::ParentalControlsContentFilter::canHandleResponse): Moved WebFilterEvaluator code from ContentFilterMac.mm to here.
2197         (WebCore::ParentalControlsContentFilter::create): Ditto.
2198         (WebCore::ParentalControlsContentFilter::ParentalControlsContentFilter): Ditto.
2199         (WebCore::ParentalControlsContentFilter::addData): Ditto.
2200         (WebCore::ParentalControlsContentFilter::finishedAddingData): Ditto.
2201         (WebCore::ParentalControlsContentFilter::needsMoreData): Ditto.
2202         (WebCore::ParentalControlsContentFilter::didBlockData): Ditto.
2203         (WebCore::ParentalControlsContentFilter::getReplacementData): Ditto.
2204         (WebCore::ParentalControlsContentFilter::unblockHandler): Ditto.
2205         * platform/mac/ContentFilterMac.mm:
2206         (WebCore::contentFilterType): Added a helper function template that creates a new ContentFilterType.
2207         (WebCore::contentFilterTypes): Registered a ContentFilterType for each type of content filter.
2208         (WebCore::ContentFilter::createIfNeeded): Created a ContentFilterCollection containing each content filter that can handle the given response.
2209         (WebCore::ContentFilterCollection::ContentFilterCollection): Constructs a ContentFilterCollection given a Vector of content filters.
2210         (WebCore::ContentFilterCollection::addData): Forwarded the call to each content filter in m_contentFilters.
2211         (WebCore::ContentFilterCollection::finishedAddingData): Ditto.
2212         (WebCore::ContentFilterCollection::needsMoreData): Ditto.
2213         (WebCore::ContentFilterCollection::didBlockData): Ditto.
2214         (WebCore::ContentFilterCollection::getReplacementData): Returned replacement data for the first filter that blocked the load.
2215         If no filter blocked the load, returned the first filter's replacement data.
2216         (WebCore::ContentFilterCollection::unblockHandler): Returned the unblock handler for the first filter that blocked the load.
2217         (WebCore::ContentFilter::ContentFilter): Deleted.
2218         (WebCore::ContentFilter::~ContentFilter): Deleted.
2219         (WebCore::ContentFilter::canHandleResponse): Deleted.
2220         (WebCore::ContentFilter::addData): Deleted.
2221         (WebCore::ContentFilter::finishedAddingData): Deleted.
2222         (WebCore::ContentFilter::needsMoreData): Deleted.
2223         (WebCore::ContentFilter::didBlockData): Deleted.
2224         (WebCore::ContentFilter::getReplacementData): Deleted.
2225         (WebCore::ContentFilter::unblockHandler): Deleted.
2226
2227 2015-03-04  David Kilzer  <ddkilzer@apple.com>
2228
2229         Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
2230         <http://webkit.org/b/141870>
2231
2232         Reviewed by Alex Christensen.
2233
2234         * Configurations/WebCore.unexp:
2235         - Remove all weak symbols for CoreMedia.framework as they should
2236           no longer appear.
2237
2238         * Modules/plugins/QuickTimePluginReplacement.mm:
2239         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
2240         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2241         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2242         - Clean up headers.
2243
2244         * platform/cf/CoreMediaSoftLink.cpp:
2245         * platform/cf/CoreMediaSoftLink.h:
2246         - Add soft-link functions and constants from remaining source
2247           files.
2248
2249         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2250         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2251         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2252         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
2253         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2254         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2255         * platform/mac/PlatformClockCM.mm:
2256         * platform/mediastream/mac/AVMediaCaptureSource.mm:
2257         * platform/mediastream/mac/AVVideoCaptureSource.mm:
2258         - Switch to using CoreMediaSoftLink.h.
2259
2260         * platform/mac/SoftLinking.h:
2261         * platform/win/SoftLinking.h:
2262         - Remove 'const' from SOFT_LINK_CONSTANT_{HEADER,SOURCE}()
2263           macros since it won't work with const structs.
2264
2265         * platform/spi/cf/CoreMediaSPI.h:
2266         - Add SPI declarations for Windows originally from
2267           InbandTextTrackPrivateAVF.cpp.
2268
2269 2015-03-04  Commit Queue  <commit-queue@webkit.org>
2270
2271         Unreviewed, rolling out r181001 and r181003.
2272         https://bugs.webkit.org/show_bug.cgi?id=142307
2273
2274         Broke many tests (Requested by ap on #webkit).
2275
2276         Reverted changesets:
2277
2278         "Make JavaScript binding get and set legacy event listener
2279         attributes directly"
2280         https://bugs.webkit.org/show_bug.cgi?id=142282
2281         http://trac.webkit.org/changeset/181001
2282
2283         "Update bindings tests after r181001."
2284         http://trac.webkit.org/changeset/181003
2285
2286 2015-03-04  Roger Fong  <roger_fong@apple.com>
2287
2288         Update elapsed/remaining time displays on media inline controls on OSX.
2289         https://bugs.webkit.org/show_bug.cgi?id=142264.
2290         <rdar://problem/19997487>
2291
2292         Reviewed by Dean Jackson.
2293
2294         Div surrounding times are set widths. A larger width is used for times that are
2295         an hour or longer. Time elapsed is right justified. Time remaining is left justified.
2296         Times are displayed in 11pt Helvetica Neue.
2297         * Modules/mediacontrols/mediaControlsApple.css:
2298         (audio::-webkit-media-controls-time-remaining-display):
2299         (audio::-webkit-media-controls-current-time-display):
2300         (audio::-webkit-media-controls-time-remaining-display.hour-long-time):
2301         (audio::-webkit-media-controls-current-time-display.hour-long-time):
2302         (audio::-webkit-media-controls-time-remaining-display.ten-hour-long-time):
2303         (audio::-webkit-media-controls-current-time-display.ten-hour-long-time):
2304         * Modules/mediacontrols/mediaControlsApple.js:
2305         (Controller.prototype.updateDuration):
2306
2307 2015-03-04  Myles C. Maxfield  <mmaxfield@apple.com>
2308
2309         Implement -apple-trailing-word: -apple-partially-balanced
2310         https://bugs.webkit.org/show_bug.cgi?id=142253
2311
2312         Reviewed by David Hyatt.
2313
2314         This patch implements a history mechanism for line breaking. In particular, this patch partitions
2315         the updates to the current line breaking location into two kinds: conceptually new breaking locations,
2316         and fixups to existing locations. Then, this patch remembers all the fixed up breaking locations, up
2317         to a maximum number of remembered locations.
2318
2319         The patch then uses this memory to change the line-breaking selection based on the rules of
2320         -apple-trailing-word.
2321
2322         Test: fast/text/trailing-word.html
2323
2324         * rendering/line/BreakingContextInlineHeaders.h:
2325         Use InlineIteratorHistory as a proxy for the current breaking location. Note that all these functions
2326         are inlined, so the overhead should be next to nothing when -apple-trailing-word is not in use.
2327         (WebCore::BreakingContext::BreakingContext): Use InlineIteratorHistory instead of InlineIterator
2328         (WebCore::BreakingContext::lineBreak): Ditto.
2329         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine): Ditto
2330         (WebCore::BreakingContext::commitLineBreakAtCurrentWidth): Ditto
2331         (WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory): Keeps track of historical
2332         breaking locations
2333         (WebCore::BreakingContext::InlineIteratorHistory::push): Remember a new breaking location
2334         (WebCore::BreakingContext::InlineIteratorHistory::update): Update an existing breaking location
2335         (WebCore::BreakingContext::InlineIteratorHistory::renderer): Forwarded to the current breaking location
2336         (WebCore::BreakingContext::InlineIteratorHistory::offset): Ditto
2337         (WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator):  Ditto
2338         (WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode): Ditto
2339         (WebCore::BreakingContext::InlineIteratorHistory::get): Get one of the remembered breaking locations
2340         (WebCore::BreakingContext::InlineIteratorHistory::current): Get the current breaking location
2341         (WebCore::BreakingContext::InlineIteratorHistory::historyLength):
2342         (WebCore::BreakingContext::InlineIteratorHistory::moveTo): Forwarded to the current breaking location.
2343         (WebCore::BreakingContext::InlineIteratorHistory::increment): Ditto
2344         (WebCore::BreakingContext::InlineIteratorHistory::clear): Ditto
2345         (WebCore::BreakingContext::handleBR): Use InlineIteratorHistory instead of InlineIterator
2346         (WebCore::BreakingContext::handleFloat): Ditto
2347         (WebCore::BreakingContext::handleText): Use InlineIteratorHistory instead of InlineIterator
2348         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): Style
2349         (WebCore::checkMidpoints): Use InlineIteratorHistory instead of InlineIterator
2350         (WebCore::BreakingContext::handleEndOfLine): If -apple-trailing-word is in effect, use
2351         optimalLineBreakLocationForTrailingWord().
2352         (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Use the remembered breaking
2353         locations and choose the optimal one.
2354         (WebCore::BreakingContext::lineBreakRef): Deleted.
2355
2356 2015-03-04  Timothy Horton  <timothy_horton@apple.com>
2357
2358         <attachment> title text disappears when dragging
2359         https://bugs.webkit.org/show_bug.cgi?id=142263
2360         <rdar://problem/20035515>
2361
2362         Reviewed by Sam Weinig.
2363
2364         * rendering/RenderThemeMac.mm:
2365         (WebCore::RenderThemeMac::paintAttachment):
2366         We use NSColors with CoreText, which requires that Cocoa knows the current
2367         CGContext out-of-band (through the NSGraphicsContext currentContext mechanism).
2368         Otherwise, sometimes (especially when dragging), it will try to apply the
2369         text foreground color to a null context, complain to the system log, and fail
2370         to render the text.
2371
2372 2015-03-04  Jer Noble  <jer.noble@apple.com>
2373
2374         [Mac] YouTube playback at 1.5x speed has audible distortion
2375         https://bugs.webkit.org/show_bug.cgi?id=142280
2376
2377         Reviewed by Eric Carlson.
2378
2379         Use the high-quality AVAudioTimePitchAlgorithmSpectral algorithm for the 
2380         AVSampleBufferAudioRenderer rather than its default value of 
2381         AVAudioTimePitchAlgorithmTimeDomain.
2382
2383         Drive-by fix:
2384
2385         Might as well add support for MediaPlayer::setPreservesPitch() while we're
2386         changing the audio pitch algorithm. If preservesPitch() is false use the
2387         AVAudioTimePitchAlgorithmVarispeed algorithm in both AVFObjC-based media players
2388         (MediaPlayerPrivateAVFoundationObjC & MediaPlayerPrivateMediaSourceAVFObjC).
2389
2390         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2391         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2392         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
2393         (WebCore::MediaPlayerPrivateAVFoundationObjC::setPreservesPitch):
2394         (WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Deleted.
2395         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2396         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2397         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setPreservesPitch):
2398         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
2399
2400 2015-03-04  Jer Noble  <jer.noble@apple.com>
2401
2402         [MSE][EME][Mac] Calling close on a MediaKeysSession will cause many decoding errors to be emitted
2403         https://bugs.webkit.org/show_bug.cgi?id=142285
2404
2405         Reviewed by Eric Carlson.
2406
2407         When a MediaKeySession (backed by CDMSessionMediaSourceAVFObjC) is closed and the
2408         underlying AVStreamSession is invalidated, the decryption context for in-flight
2409         CMSampleBuffers is also invalidated, and the AVSampleBufferDisplayLayer will issue
2410         one error for each enqueued and un-displayed sample in its image-queue. -flush-ing
2411         the AVSampleBufferDisplayLayer is not enough, as the flush only takes effect
2412         asynchronously the next time the layer needs new samples.
2413
2414         Add a workaround until framework-level support lands to fully flush enqueued and
2415         encrypted frames.
2416
2417         When the CDMSessionMediaSOurceAVFObjC object recieves an error from the layer,
2418         check to see if the session has been stopped. If so, and if the error in question is
2419         one that indicates that the samples decryption context has been invalidated, suppress
2420         the error and instruct the sender to suppress the error as well. This workaround will
2421         be removed once real support for synchronous flushing lands in <rdar://problem/20027434.>
2422
2423         Still, we'll make our best effort to flush undisplayed frames when our CDM session is
2424         invalidated. Move away from std::map and instead use HashMap to store the set of 
2425         AVSampleBufferAudioRenderers. This allows us to use C++11 style loops against just
2426         the HashMap's set of values.
2427
2428         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2429         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2430         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Flush and set m_stopped.
2431         (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): Check m_stopped and the
2432             error code and bail before issuing the error.
2433         (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): Ditto.
2434         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2435         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2436         (-[WebAVSampleBufferErrorListener layerFailedToDecode:]): Drive-by fix. Check whether
2437             the layer is in the set of listened-to layers only back in the main thread; the
2438             listnener may have been unregistered by the time the main thread was called.
2439         (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): std::map -> HashMap.
2440         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Ditto.
2441         (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Ditto.
2442         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
2443         (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): Ditto.
2444         (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): Ditto.
2445         (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Ditto.
2446         (WebCore::SourceBufferPrivateAVFObjC::flush): Added; call -flush on all the display
2447             layers and audio renderers.
2448         (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError): Check if any clients
2449             asked to ignore the error, and if so, bail.
2450         (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError): Ditto.
2451
2452 2015-03-04  Alex Christensen  <achristensen@webkit.org>
2453
2454         Update bindings tests after r181001.
2455
2456         * bindings/scripts/test/JS/*.cpp:
2457         Class names changed to auto.
2458
2459 2015-03-04  Brent Fulgham  <bfulgham@apple.com>
2460
2461         [Win] Missing dependency checking in DerivedSources.make for FeatureDefines.props
2462         https://bugs.webkit.org/show_bug.cgi?id=142284
2463
2464         Reviewed by David Kilzer.
2465
2466         Make DerivedSources.make understand its build dependency on FeatureDefines.props
2467         when building on Windows:
2468         1. Modify DerivedSources.make to declare a default dependency (on Windows)
2469            to $(WEBKIT_LIBRARIES)/tools/vsprops/FeatureDefines.props.
2470         2. Update the Windows script 'build-generated-files.pl' to specify the correct
2471            FeatureDefines{Cairo}.props value to use, depending on build environment.
2472
2473         * DerivedSources.make:
2474         * WebCore.vcxproj/build-generated-files.pl:
2475
2476 2015-03-04  Darin Adler  <darin@apple.com>
2477
2478         Make JavaScript binding get and set legacy event listener attributes directly
2479         https://bugs.webkit.org/show_bug.cgi?id=142282
2480
2481         Reviewed by Sam Weinig.
2482
2483         Test: fast/dom/legacy-event-handler-attributes.html
2484
2485         This patch changes the JavaScript getters and setters for these attributes
2486         to work directly without requiring any functions in the C++ DOM implementation.
2487         A subsequent patch will remove the now-unused C++ DOM implementation.
2488
2489         * bindings/js/JSEventListener.cpp:
2490         (WebCore::legacyEventListenerAttribute): Added.
2491         (WebCore::createEventListenerForLegacyAttribute): Added.
2492         (WebCore::setLegacyEventListenerAttribute): Added.
2493         (WebCore::legacyWindowEventListenerAttribute): Added.
2494         (WebCore::setLegacyWindowEventListenerAttribute): Added.
2495
2496         * bindings/js/JSEventListener.h:
2497         (WebCore::createJSEventListenerForAttribute): Deleted.
2498
2499         * bindings/scripts/CodeGeneratorJS.pm:
2500         (GenerateAttributeEventListenerCall): Deleted.
2501         (LegacyEventListenerAttributeEventName): Added.
2502         (LegacyEventListenerAttributePrefix): Added.
2503         (GenerateImplementation): Use "auto" in lots of places to simplify the code
2504         generation. Replaced the old inlined code to deal with legacy event listener
2505         attributes with code that simply calls the new functions from JSEventLister.h.
2506         (GenerateCallWith): Use "auto".
2507         (GenerateConstructorDefinition): Ditto.
2508
2509 2015-03-03  Sam Weinig  <sam@webkit.org>
2510
2511         [Content Extensions] Split parsing and compiling of content extensions into their own files
2512         https://bugs.webkit.org/show_bug.cgi?id=142259
2513
2514         Reviewed by Anders Carlsson.
2515
2516         Added new unit test:
2517             ContentFilterTest.Basic
2518
2519         * WebCore.xcodeproj/project.pbxproj:
2520         Add new files (CompiledContentExtension.h/cpp, ContentExtensionCompiler.h/cpp, and ContentExtensionParser.h/cpp)
2521
2522         * contentextensions/CompiledContentExtension.cpp: Added.
2523         * contentextensions/CompiledContentExtension.h: Added.
2524         Add new class for holding onto the compiled content extension itself. Make it ThreadSafeRefCounted so it is easy
2525         to move between threads which will be important in a subsequent patch where we enable compilation on a background
2526         thread.
2527
2528         * contentextensions/ContentExtensionCompiler.cpp: Added.
2529         (WebCore::ContentExtensions::serializeActions):
2530         (WebCore::ContentExtensions::compileRuleList):
2531         * contentextensions/ContentExtensionCompiler.h: Added.
2532         Moving compilation to its own file. Was previously in ContentExtensionsBackend. This is necessary because
2533         we will want to be able to compile without the need of a backend.
2534
2535         * contentextensions/ContentExtensionParser.cpp: Copied from contentextensions/ContentExtensionsManager.cpp.
2536         * contentextensions/ContentExtensionParser.h: Copied from contentextensions/ContentExtensionsManager.h.
2537         Renamed ContentExtensionsManager to ContentExtensionParser, since that is all it is doing.
2538
2539         * contentextensions/ContentExtensionsBackend.cpp:
2540         (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
2541         (WebCore::ContentExtensions::ContentExtensionsBackend::removeContentExtension):
2542         (WebCore::ContentExtensions::ContentExtensionsBackend::removeAllContentExtensions):
2543         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
2544         (WebCore::ContentExtensions::ContentExtensionsBackend::serializeActions): Deleted.
2545         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList): Deleted.
2546         (WebCore::ContentExtensions::ContentExtensionsBackend::removeRuleList): Deleted.
2547         (WebCore::ContentExtensions::ContentExtensionsBackend::removeAllRuleLists): Deleted.
2548         * contentextensions/ContentExtensionsBackend.h:
2549         Change the backend to use the new CompiledContentExtension and change the terminology to
2550         reference content extensions, rather than rule lists.
2551
2552         * page/UserContentController.cpp:
2553         (WebCore::UserContentController::addUserContentFilter):
2554         (WebCore::UserContentController::removeUserContentFilter):
2555         (WebCore::UserContentController::removeAllUserContentFilters):
2556         Update for new names and change addUserContentFilter to explicitly compile the JSON
2557         rule list before handing it to the backend. In subsequent changes, addUserContentFilter
2558         should be changed to take the compiled content extension, and it should become the responsibility
2559         of the called (WebKit) to create them.
2560
2561 2015-03-04  Philippe Normand  <pnormand@igalia.com>
2562
2563         [GStreamer] the GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED should be wrapped by a ifdef
2564         https://bugs.webkit.org/show_bug.cgi?id=142274
2565
2566         Reviewed by Carlos Garcia Campos.
2567
2568         Don't handle scheduling queries if building against versions of
2569         GStreamer older than 1.2.0.
2570
2571         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2572         (webKitWebSrcQueryWithParent):
2573
2574 2015-03-03  Yoav Weiss  <yoav@yoav.ws>
2575
2576         Add a microtask abstraction
2577         https://bugs.webkit.org/show_bug.cgi?id=137496
2578
2579         Reviewed by Sam Weinig.
2580
2581         This patch adds a microtask abstraction: https://html.spec.whatwg.org/multipage/webappapis.html#microtask
2582         That abstraction is required in order to enable async loading of images,
2583         which is in turn required to enable support for the picture element, as well as
2584         to make sure that the order of properties set on HTMLImageElement has no implications.
2585
2586         A similar patch was rolled back in r180914. This patch is an improved version.
2587
2588         * WebCore.vcxproj/WebCore.vcxproj: Add MicroTask.{h,cpp} to the project.
2589         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Add MicroTaskTest.{h,cpp} to the project.
2590         * WebCore.vcxproj/WebCore.vcxproj.filters: Add MicroTask.{h,cpp} to the project.
2591         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Add MicroTaskTest.{h,cpp} to the project.
2592         * WebCore.xcodeproj/project.pbxproj: Add MicroTask{,Test}.{h,cpp} to the project.
2593         * dom/Document.h: Add WEBCORE_EXPORT to addConsoleMessage, so it can be used in MicroTaskTest that's in WebCoreTestSupport..
2594         * dom/MicroTask.h: Add a MicroTask interface class. Add a MicroTaskQueue singleton.
2595         (WebCore::MicroTask::~MicroTask):
2596         (WebCore::MicroTask::run): Run the microtask.
2597         * dom/MicroTask.cpp: Implement the MicroTaskQueue singleton.
2598         (WebCore::MicroTaskQueue::singleton): Get a singleton instance of MicroTaskQueue.
2599         (WebCore::MicroTaskQueue::queueMicroTask): Add a microtask to the queue.
2600         (WebCore::MicroTaskQueue::runMicroTasks): Run all the microtasks in the queue and clear it.
2601         * dom/ScriptRunner.cpp: Trigger running of all microtasks in queue.
2602         (WebCore::ScriptRunner::timerFired):
2603         * html/parser/HTMLScriptRunner.cpp: Trigger running of all microtasks in queue.
2604         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
2605         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
2606         (WebCore::HTMLScriptRunner::runScript):
2607         * testing/Internals.cpp: Add a method to queue a test microtask.
2608         (WebCore::Internals::queueMicroTask):
2609         * testing/Internals.h: Add a method to queue a test microtask.
2610         (WebCore::Internals::queueMicroTask):
2611         * testing/Internals.idl: Expose test microtask queueing to test JS.
2612         * testing/MicroTaskTest.cpp: Add a test class that implements a microtask and prints to the console when it runs.
2613         (WebCore::MicroTaskTest::run): Run the microtask
2614         (WebCore::MicroTaskTest::create): Create a test microtask.
2615         * testing/MicroTaskTest.h: Add a test class that implements a microtask.
2616         (WebCore::MicroTaskTest::run):
2617         (WebCore::MicroTaskTest::create):
2618
2619 2015-03-03  Brent Fulgham  <bfulgham@apple.com>
2620
2621         Scroll snap points are not supported on the main frame
2622         https://bugs.webkit.org/show_bug.cgi?id=141973
2623         <rdar://problem/19938393>
2624
2625         Reviewed by Simon Fraser.
2626
2627         No new tests. Tests will be added when the animation behavior is finalized. Manual tests are attached to the bug.
2628
2629         Update the ScrollingTreeFrameScrollingNodeMac class to implement the delegate interface needed by the
2630         ScrollController. This involves the following:
2631         1. Implement scrollOffsetOnAxis: Used by the AxisScrollAnimator to determine the current position of the ScrollableArea.
2632         2. Implement immediateScrollOnAxis: Used by the AxisScrollAnimator to scroll the ScrollableArea
2633
2634         We also need to hold a copy of the snap points vector to send to the scrolling thread.
2635
2636         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2637         (WebCore::convertToLayoutUnits): Added helper function to match Scroll Snap Points API.
2638         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): Recognize and react to changes to
2639         Scroll Snap Points on top-level frames.
2640         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Implement delegate method needed by the ScrollController.
2641         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
2642         * platform/cocoa/ScrollController.h:
2643         * platform/cocoa/ScrollController.mm:
2644         (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Pass snap offsets to AxisScrollSnapAnimator constructor as references.
2645         (WebCore::ScrollController::updateScrollSnapPoints): Added. Used by ScrollingTreeFrameScrollingNodeMac to update scroll snap point
2646         settings in the scrolling thread.
2647         * platform/mac/AxisScrollSnapAnimator.h:
2648         * platform/mac/AxisScrollSnapAnimator.mm:
2649         (WebCore::toWheelEventStatus): Don't ignore the "MayBegin" or "Cancelled" event phases.
2650         (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator): Revise signature to take a reference to the layout units.
2651         (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Handle the case where this method gets called from a thread
2652         when the scrollable area has already reached its final destination.
2653         (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Handle the possibility that the snap offset point vector might be
2654         empty. Update method to account for m_snapOffsets being a value, instead of a pointer.
2655
2656 2015-03-03  Andy Estes  <aestes@apple.com>
2657
2658         [Content Filtering] Separate unblock handling into its own class
2659         https://bugs.webkit.org/show_bug.cgi?id=142251
2660
2661         Reviewed by Andreas Kling.
2662
2663         Unblock handling is currently supported only for one type of content filter (WebFilterEvaluator) on one
2664         platform (iOS). Having its implementation in ContentFilter is making it difficult to support other filters and
2665         platforms, so let's separate unblock handling into its own class called ContentFilterUnblockHandler.
2666
2667         * WebCore.xcodeproj/project.pbxproj:
2668         * loader/DocumentLoader.cpp:
2669         (WebCore::DocumentLoader::finishedLoading): Passed a ContentFilterUnblockHandler to FrameLoaderClient::contentFilterDidBlockLoad.
2670         (WebCore::DocumentLoader::dataReceived): Ditto.
2671         * loader/FrameLoaderClient.h:
2672         * platform/ContentFilter.h:
2673         * platform/ContentFilterUnblockHandler.h: Copied from Source/WebCore/platform/ios/ContentFilterIOS.mm.
2674         (WebCore::ContentFilterUnblockHandler::clear):
2675         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm: Renamed from Source/WebCore/platform/ios/ContentFilterIOS.mm.
2676         (WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler):
2677         (WebCore::ContentFilterUnblockHandler::encode):
2678         (WebCore::ContentFilterUnblockHandler::decode):
2679         (WebCore::scheme):
2680         (WebCore::ContentFilterUnblockHandler::handleUnblockRequestAndDispatchIfSuccessful):
2681         * platform/mac/ContentFilterMac.mm:
2682         (WebCore::ContentFilter::unblockHandler):
2683         (WebCore::ContentFilter::ContentFilter): Deleted.
2684         (WebCore::ContentFilter::encode): Deleted.
2685         (WebCore::ContentFilter::decode): Deleted.
2686
2687 2015-03-03  Alexey Proskuryakov  <ap@apple.com>
2688
2689         [Mac] Track localized name follows locale instead of primary language
2690         https://bugs.webkit.org/show_bug.cgi?id=142242
2691         rdar://problem/20000365
2692
2693         Reviewed by Eric Carlson.
2694
2695         * page/CaptionUserPreferencesMediaAF.cpp: (WebCore::trackDisplayName): Use the
2696         language for localization, as CFBundle does.
2697
2698 2015-03-03  Alex Christensen  <achristensen@webkit.org>
2699
2700         [Win] Unreviewed build fix.
2701
2702         * WebCore.vcxproj/WebCoreIncludeCommon.props:
2703         Include contentextensions subdirectory.
2704
2705 2015-03-03  Alex Christensen  <achristensen@webkit.org>
2706
2707         Prepare to use CSS selectors in content extensions.
2708         https://bugs.webkit.org/show_bug.cgi?id=142227
2709
2710         Reviewed by Benjamin Poulain.
2711
2712         Test: http/tests/usercontentfilter/css-display-none.html
2713
2714         * CMakeLists.txt:
2715         * WebCore.xcodeproj/project.pbxproj:
2716         * contentextensions/ContentExtensionActions.h: Added.
2717         * contentextensions/ContentExtensionRule.cpp:
2718         (WebCore::ContentExtensions::Action::deserialize):
2719         * contentextensions/ContentExtensionRule.h:
2720         (WebCore::ContentExtensions::Action::Action):
2721         (WebCore::ContentExtensions::Action::type):
2722         (WebCore::ContentExtensions::Action::cssSelector):
2723         * contentextensions/ContentExtensionsBackend.cpp:
2724         (WebCore::ContentExtensions::ContentExtensionsBackend::serializeActions):
2725         Put action descriptions into a compact format in a Vector 
2726         to be able to be put into one block of shared read-only memory.
2727         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
2728         Put an index of the beginning of the description into the NFA instead of the index of the rule
2729         because we will be sharing the descriptions of the actions and not the rules.
2730         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
2731         (WebCore::ContentExtensions::ContentExtensionsBackend::actionForURL): Deleted.
2732         Return a vector of actions to be able to do multiple actions for one URL.
2733         * contentextensions/ContentExtensionsBackend.h:
2734         * contentextensions/ContentExtensionsManager.cpp:
2735         (WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
2736         (WebCore::ContentExtensions::ExtensionsManager::loadAction):
2737         Added the css-display-none action type, which requires a selector.
2738         (WebCore::ContentExtensions::ExtensionsManager::loadRule):
2739         * loader/cache/CachedResourceLoader.cpp:
2740         (WebCore::CachedResourceLoader::requestResource):
2741         * page/UserContentController.cpp:
2742         (WebCore::UserContentController::actionsForURL):
2743         (WebCore::UserContentController::actionForURL): Deleted.
2744         * page/UserContentController.h:
2745
2746 2015-03-03  Brent Fulgham  <bfulgham@apple.com>
2747
2748         Move scroll animating functions from ScrollAnimator to ScrollController
2749         https://bugs.webkit.org/show_bug.cgi?id=142102
2750         <rdar://problem/20007161>
2751
2752         Reviewed by Simon Fraser.
2753
2754         Tested by platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html.
2755
2756         Do some refactoring of the various scrolling classes:
2757         1. Consolidate animation times to RunLoop::Timer instead of a combination of WebCore::Timer
2758            and CFRunLoopTimers. Do this for Scroll Snap Point and Rubberband animations.
2759         2. Move ScrollController from platform/mac to platform/cocoa to enable sharing with iOS.
2760         3. Move code from ScrollAnimator{Mac} -> ScrollController.
2761         4. Rename scrollOffsetInAxis -> scrollOffsetOnAxis
2762         5. Rename immediateScrollInAxis -> immediateScrollOnAxis
2763
2764         * WebCore.xcodeproj/project.pbxproj: Move ScrollController to 'platform/cocoa'
2765         * page/mac/EventHandlerMac.mm: Make sure the scroll controller is notified of end-of-scroll
2766         events, just as is done for the "event not handled" case in EventHandler.cpp. 
2767         (WebCore::EventHandler::platformCompleteWheelEvent):
2768         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Remove timer and some delegate
2769         methods, now that ScrollController is controlling this state.
2770         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2771         (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac): We no longer
2772         need to clean up the CFRunLoopTimer.
2773         (WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Make sure scroll
2774         state is updated after rubber band snap.
2775         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Add temporary stub needed
2776         until Bug1973 is completed.).
2777         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
2778         (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer): Deleted.
2779         * platform/ScrollAnimator.cpp:
2780         (WebCore::ScrollAnimator::ScrollAnimator):
2781         (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Just call the ScrollController method.
2782         (WebCore::ScrollAnimator::handleWheelEvent): Ditto.
2783         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Ditto.
2784         (WebCore::ScrollAnimator::scrollOffsetOnAxis): Renamed from scrollOffsetInAxis.
2785         (WebCore::ScrollAnimator::immediateScrollOnAxis): Renamed from immediateScrollInAxis.
2786         (WebCore::ScrollAnimator::scrollOffsetInAxis): Deleted.
2787         (WebCore::ScrollAnimator::immediateScrollInAxis): Deleted.
2788         (WebCore::ScrollAnimator::startScrollSnapTimer): Deleted.
2789         (WebCore::ScrollAnimator::stopScrollSnapTimer): Deleted.
2790         (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): Deleted.
2791         (WebCore::ScrollAnimator::verticalScrollSnapTimerFired): Deleted.
2792         * platform/ScrollAnimator.h:
2793         * platform/cocoa/ScrollController.h: Copied from platform/mac/ScrollController.h.
2794         (WebCore::ScrollControllerClient::startSnapRubberbandTimer):
2795         (WebCore::ScrollControllerClient::stopSnapRubberbandTimer):
2796         (WebCore::ScrollControllerClient::startScrollSnapTimer):
2797         (WebCore::ScrollControllerClient::stopScrollSnapTimer):
2798         * platform/cocoa/ScrollController.mm: Copied from platform/mac/ScrollController.mm.
2799         (WebCore::ScrollController::ScrollController): Update to initialize new timers.
2800         (WebCore::ScrollController::handleWheelEvent): Update to handle Scroll Snap Point events.
2801         (WebCore::ScrollController::startSnapRubberbandTimer): Added.
2802         (WebCore::ScrollController::stopSnapRubberbandTimer): Manage animation timers locally, do not
2803         require client to maintain timers.
2804         (WebCore::ScrollController::snapRubberBand): Ditto.
2805         (WebCore::ScrollController::processWheelEventForScrollSnap): Added. (Moved from ScrollAnimatorMac)
2806         (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Ditto. Also updated to use RunLoop::Timer.
2807         (WebCore::ScrollController::startScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
2808         (WebCore::ScrollController::stopScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
2809         (WebCore::ScrollController::horizontalScrollSnapTimerFired): Ditto.
2810         (WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
2811         (WebCore::ScrollController::scrollOffsetOnAxis): Moved from ScrollAnimatorMac.
2812         (WebCore::ScrollController::immediateScrollOnAxis): Ditto.
2813         * platform/mac/AxisScrollSnapAnimator.h: Rename methods from 'InAxis' to 'OnAxis'
2814         * platform/mac/AxisScrollSnapAnimator.mm:
2815         (WebCore::AxisScrollSnapAnimator::handleWheelEvent): Update for 'InAxis' to 'OnAxis' renaming.
2816         (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Ditto.
2817         (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Ditto.
2818         (WebCore::AxisScrollSnapAnimator::computeSnapDelta): Ditto.
2819         (WebCore::AxisScrollSnapAnimator::computeGlideDelta): Ditto.
2820         * platform/mac/ScrollAnimatorMac.h:
2821         * platform/mac/ScrollAnimatorMac.mm:
2822         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Remove unused Rubberband timers (now that this is
2823         controlled in the ScrollController)
2824         (WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): Deleted.
2825         (WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Deleted.
2826         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): Deleted.
2827         * platform/mac/ScrollController.h: Removed.
2828         * platform/mac/ScrollController.mm: Removed.
2829
2830 2015-03-03  Commit Queue  <commit-queue@webkit.org>
2831
2832         Unreviewed, rolling out r180683.
2833         https://bugs.webkit.org/show_bug.cgi?id=142249
2834
2835         Broke fast/css/acid2-pixel.html (Requested by ap on #webkit).
2836
2837         Reverted changeset:
2838
2839         "Setting any of the <object> element plugin controlling
2840         attributes does not have any affect."
2841         https://bugs.webkit.org/show_bug.cgi?id=141936
2842         http://trac.webkit.org/changeset/180683
2843
2844 2015-03-03  Dean Jackson  <dino@apple.com>
2845
2846         Controls panel should have system blurry background
2847         https://bugs.webkit.org/show_bug.cgi?id=142154
2848         <rdar://problem/20000964>
2849
2850         Reviewed by Simon Fraser.
2851
2852         In order to replicate the system style of media controls
2853         on OS X and iOS, we need to expose a special -webkit-appearance.
2854         This patch adds the new property value, and implements
2855         the iOS part of the appearance, which is a blurry shaded
2856         background.
2857
2858         Test: compositing/media-controls-bar-appearance.html
2859
2860         * css/CSSPrimitiveValueMappings.h:
2861         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Map the new
2862         keywords from ControlParts.
2863
2864         * css/CSSValueKeywords.in: Add media-controls-light-bar-background
2865         and media-controls-dark-bar-background. Darin suggested they
2866         be sorted, so I did this at the same time.
2867         * platform/ThemeTypes.h: New ControlParts for the values, and
2868         sort the values since they need to be in sync with
2869         CSSValueKeywords.in.
2870
2871         * platform/graphics/GraphicsLayer.h: Expose two new custom appearance
2872         values.
2873         * platform/graphics/ca/GraphicsLayerCA.cpp:
2874         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2875         (WebCore::layerTypeForCustomBackdropAppearance): Helper function.
2876         (WebCore::isCustomBackdropLayerType): Ditto.
2877         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Merge setting
2878         a system backdrop layer in with the code that swaps to/from tiled layers.
2879         (WebCore::GraphicsLayerCA::changeLayerTypeTo): New method that does what
2880         swapFromOrToTiledLayer implemented, but also allows us to change to a
2881         system backdrop layer.
2882         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Deleted.
2883         * platform/graphics/ca/GraphicsLayerCA.h:
2884
2885         * platform/graphics/ca/PlatformCALayer.h: New layer types.
2886         * platform/graphics/ca/mac/PlatformCALayerMac.mm: For now expose these
2887         as regular backdrop layers.
2888         (PlatformCALayerMac::PlatformCALayerMac):
2889         (PlatformCALayerMac::updateCustomAppearance):
2890
2891         * rendering/RenderLayerBacking.cpp:
2892         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Make sure to update
2893         custom appearance,
2894         (WebCore::RenderLayerBacking::updateCustomAppearance): New method.
2895         * rendering/RenderLayerBacking.h:
2896
2897 2015-03-03  Chris Dumez  <cdumez@apple.com>
2898
2899         Access ApplicationCacheStorage global instance via singleton() static member function
2900         https://bugs.webkit.org/show_bug.cgi?id=142239
2901
2902         Reviewed by Anders Carlsson.
2903
2904         Access ApplicationCacheStorage global instance via singleton() static
2905         member function as per WebKit coding style.
2906
2907 2015-03-03  Anders Carlsson  <andersca@apple.com>
2908
2909         Try to fix the build.
2910
2911         * platform/spi/cf/CFNetworkSPI.h:
2912
2913 2015-03-03  Timothy Horton  <timothy_horton@apple.com>
2914
2915         <attachment> label can get very wide, doesn't wrap/truncate
2916         https://bugs.webkit.org/show_bug.cgi?id=142214
2917         <rdar://problem/19982499>
2918
2919         Reviewed by Simon Fraser.
2920
2921         Test: fast/attachment/attachment-label-highlight.html
2922
2923         * rendering/RenderThemeMac.h:
2924         * rendering/RenderThemeMac.mm:
2925         (WebCore::labelTextColorForAttachment):
2926         (WebCore::AttachmentLayout::addLine):
2927         (WebCore::AttachmentLayout::layOutText):
2928         (WebCore::AttachmentLayout::AttachmentLayout):
2929         Make it possible to lay out multiple lines of label text.
2930         We lay out the whole string normally, but then only draw N (where N=1 for now,
2931         but is adjustable) of the lines. The remainder of the string is then
2932         merged into a single line, which is middle-truncated with an ellipsis
2933         and drawn in place of the N+1 line.
2934
2935         (WebCore::addAttachmentLabelBackgroundRightCorner):
2936         (WebCore::addAttachmentLabelBackgroundLeftCorner):
2937         (WebCore::paintAttachmentLabelBackground):
2938         Wrap the label background around the multiple lines of text with curved edges.
2939         We run first down the right side of the label, determining whether to use
2940         concave or convex arcs based on the relative widths of adjacent lines.
2941         Then, we run back up the left side of the label doing the same thing.
2942
2943         If the background rects of two lines are very similar (within the rounded rect radius),
2944         they will be expanded to the larger of the two, because otherwise the arcs
2945         look quite wrong.
2946
2947         (WebCore::paintAttachmentLabel):
2948         Draw the label with CoreText directly instead of bothering with WebCore
2949         text layout primitives. There's no need, and it makes wrapping much more complicated.
2950
2951         (WebCore::RenderThemeMac::paintAttachment):
2952         (WebCore::RenderThemeMac::paintAttachmentLabelBackground): Deleted.
2953         (WebCore::RenderThemeMac::paintAttachmentLabel): Deleted.
2954
2955 2015-03-03  Simon Fraser  <simon.fraser@apple.com>
2956
2957         Avoid applying the clip-path when painting, if a layer also has a shape layer mask
2958         https://bugs.webkit.org/show_bug.cgi?id=142212
2959
2960         Reviewed by Zalan Bujtas.
2961
2962         After r180882 we translate clip-path into a composited shape mask when the layer
2963         is composited. However, we were also still applying the clip-path when painting
2964         the layer contents.
2965         
2966         Now, we set the GraphicsLayer bits GraphicsLayerPaintClipPath and GraphicsLayerPaintMask
2967         only for the m_maskLayer's painting. This translate into setting PaintLayerPaintingCompositingMaskPhase
2968         and PaintLayerPaintingCompositingClipPathPhase only when painting that same mask layer,
2969         rather than always. To ensure that masks and clip-path get applied for software paints,
2970         add shouldPaintMask() and shouldApplyClipPath() that return true for non-composited layers,
2971         and when doing a flattening paint.
2972
2973         * rendering/RenderLayer.cpp:
2974         (WebCore::RenderLayer::paintLayerContents): Use shouldApplyClipPath().
2975         Pull three chunks of code under a single "if (shouldPaintContent && !selectionOnly)" condition.
2976         The condition for paintChildClippingMaskForFragments() is changed slightly; we need to call this
2977         only when painting the clip-path/mask layer contents, but also only when there is no mask to fill
2978         the clipped area for us.
2979         (WebCore::RenderLayer::calculateClipRects):
2980         (WebCore::RenderLayer::paintsWithClipPath): Deleted.
2981         * rendering/RenderLayer.h:
2982         * rendering/RenderLayerBacking.cpp:
2983         (WebCore::RenderLayerBacking::updateMaskingLayer): Be sure to set the GraphicsLayerPaintClipPath bit
2984         when having a mask forces us onto the painting path.
2985
2986 2015-03-03  Anders Carlsson  <andersca@apple.com>
2987
2988         Use the correct display name for website data for local files
2989         https://bugs.webkit.org/show_bug.cgi?id=142228
2990
2991         Reviewed by Dan Bernstein.
2992
2993         * English.lproj/Localizable.strings:
2994         Add local file display name.
2995
2996         * platform/spi/cf/CFNetworkSPI.h:
2997         Add kCFHTTPCookieLocalFileDomain declaration.
2998
2999 2015-03-03  Myles C. Maxfield  <mmaxfield@apple.com>
3000
3001         BreakingContext cleanup
3002         https://bugs.webkit.org/show_bug.cgi?id=142146
3003
3004         Reviewed by Dean Jackson.
3005
3006         1. Use commitLineBreakAtCurrentWidth() instead of directly
3007         updating m_width and m_lineBreak, because the name makes the
3008         intent clearer.
3009         2. Remove duplicate function LineBreaker::nextSegmentBreak().
3010         3. lineStyle() takes care of inspecting RenderText's parent's
3011         style.
3012         4. Add FIXME to BreakingContext::initializeForCurrentObject()
3013         because it seems like we are ignoring first-line style for
3014         some properties.
3015
3016         No new tests because there is no behavior change.
3017
3018         * rendering/line/BreakingContextInlineHeaders.h:
3019         (WebCore::BreakingContext::BreakingContext):
3020         (WebCore::BreakingContext::initializeForCurrentObject):
3021         (WebCore::BreakingContext::handleReplaced):
3022         (WebCore::BreakingContext::handleText):
3023         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
3024         (WebCore::BreakingContext::handleEndOfLine):
3025         * rendering/line/LineBreaker.cpp:
3026         (WebCore::LineBreaker::nextLineBreak): Deleted.
3027         (WebCore::LineBreaker::nextSegmentBreak): Deleted.
3028         * rendering/line/LineBreaker.h:
3029         * rendering/line/LineInlineHeaders.h:
3030         (WebCore::lineStyle):
3031
3032 2015-03-03  Chris Dumez  <cdumez@apple.com>
3033
3034         Make AudioContext suspendable when it is not rendering
3035         https://bugs.webkit.org/show_bug.cgi?id=142210
3036         <rdar://problem/19923085>
3037
3038         Reviewed by Eric Carlson.
3039
3040         Make AudioContext suspendable when it is not rendering to increase the
3041         likelihood of entering the PageCache for pages using WebAudio.
3042
3043         This patch adds a state member to AudioContext with 3 possible states:
3044         Suspended / Running / Closed, as defined in the specification:
3045         http://webaudio.github.io/web-audio-api/#widl-AudioContext-state
3046
3047         This state is used to decide if we can suspend the page or not. We
3048         can safely suspend if the AudioContext's state is suspended (did not
3049         start rendering) or closed (Stopped rendering).
3050
3051         Note that this patch does not expose the AudioContext's state to the
3052         Web yet, even though it is exposed in the latest specification.
3053
3054         Tests: fast/history/page-cache-closed-audiocontext.html
3055                fast/history/page-cache-running-audiocontext.html
3056                fast/history/page-cache-suspended-audiocontext.html
3057
3058         * Modules/webaudio/AudioContext.cpp:
3059         (WebCore::AudioContext::AudioContext):
3060         (WebCore::AudioContext::uninitialize):
3061         (WebCore::AudioContext::canSuspend):
3062         (WebCore::AudioContext::startRendering):
3063         (WebCore::AudioContext::fireCompletionEvent):
3064         * Modules/webaudio/AudioContext.h:
3065
3066 2015-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>
3067
3068         [SOUP] Use SoupMessage::starting instead of SoupSession::request-started
3069         https://bugs.webkit.org/show_bug.cgi?id=142164
3070
3071         Reviewed by Sergio Villar Senin.
3072
3073         SoupSession::request-started is deprecated in libsoup 2.50. Both
3074         signals are equivalent, but SoupMessage::starting is also emitted
3075         for resources loaded from the disk cache. This fixes web timing
3076         calculations for cached resources, since we were not initializing
3077         m_requestStart.
3078
3079         * platform/network/soup/ResourceHandleSoup.cpp:
3080         (WebCore::startingCallback):
3081         (WebCore::createSoupMessageForHandleAndRequest):
3082         * platform/network/soup/SoupNetworkSession.cpp:
3083         (WebCore::SoupNetworkSession::SoupNetworkSession):
3084
3085 2015-03-03  Carlos Garcia Campos  <cgarcia@igalia.com>
3086
3087         [SOUP] Synchronous XMLHttpRequests can time out when we reach the max connections limit
3088         https://bugs.webkit.org/show_bug.cgi?id=141508
3089
3090         Reviewed by Sergio Villar Senin.
3091
3092         Use SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS flag when loading a
3093         synchronous message instead of increasing the maximum number of
3094         connections allowed if the soup version is recent enough.
3095         The current solution of increasing/decreasing the limits doesn't
3096         always work, because connections are not marked as IDLE in libsoup
3097         until the message is unqueued, but we don't wait for the message
3098         to be unqueued to finish our loads in WebKit, we finish them as
3099         soon as we have finished reading the stream. This causes that
3100         synchronous loads keep blocked in the nested main loop until the
3101         timeout of 10 seconds is fired and the load fails.
3102         Also marked WebCoreSynchronousLoader class as final, the virtual
3103         methods as override and removed the unsused method isSynchronousClient.
3104
3105         * platform/network/soup/ResourceHandleSoup.cpp:
3106         (WebCore::createSoupMessageForHandleAndRequest):
3107         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
3108         (WebCore::WebCoreSynchronousLoader::isSynchronousClient): Deleted.
3109         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
3110         (WebCore::WebCoreSynchronousLoader::didReceiveData):
3111         (WebCore::WebCoreSynchronousLoader::didReceiveBuffer):
3112         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
3113         (WebCore::WebCoreSynchronousLoader::didFail):
3114         (WebCore::WebCoreSynchronousLoader::didReceiveAuthenticationChallenge):
3115         (WebCore::WebCoreSynchronousLoader::shouldUseCredentialStorage):
3116
3117 2015-03-02  David Kilzer  <ddkilzer@apple.com>
3118
3119         [iOS] Disable -Wdeprecated-declaration warnings in WebVideoFullscreenInterfaceAVKit.mm
3120
3121         Fixing the deprecations is tracked by: <rdar://problem/20018692>
3122
3123         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3124         (WebVideoFullscreenInterfaceAVKit::enterFullscreenOptimized):
3125         Ignore -Wdeprecated-declaration warnings via clang pragmas.
3126
3127 2015-03-02  Commit Queue  <commit-queue@webkit.org>
3128
3129         Unreviewed, rolling out r180902.
3130         https://bugs.webkit.org/show_bug.cgi?id=142205
3131
3132         It broke scrolling in some cases. See bug 142202 for details.
3133         (Requested by bdash on #webkit).
3134
3135         Reverted changeset:
3136
3137         "Move scroll animating functions from ScrollAnimator to
3138         ScrollController"
3139         https://bugs.webkit.org/show_bug.cgi?id=142102
3140         http://trac.webkit.org/changeset/180902
3141
3142 2015-03-02  Commit Queue  <commit-queue@webkit.org>
3143
3144         Unreviewed, rolling out r180911.
3145         https://bugs.webkit.org/show_bug.cgi?id=142204
3146
3147         The tests it added are crashing (Requested by bdash on
3148         #webkit).
3149
3150         Reverted changeset:
3151
3152         "Add a microtask abstraction"
3153         https://bugs.webkit.org/show_bug.cgi?id=137496
3154         http://trac.webkit.org/changeset/180911
3155
3156 2015-03-02  Yoav Weiss  <yoav@yoav.ws>
3157
3158         Add a microtask abstraction
3159         https://bugs.webkit.org/show_bug.cgi?id=137496
3160
3161         Reviewed by Sam Weinig.
3162
3163         This patch adds a microtask abstraction: https://html.spec.whatwg.org/multipage/webappapis.html#microtask
3164         That abstraction is required in order to enable async loading of images,
3165         which is in turn required to enable support for the picture element, as well as
3166         to make sure that the order of properties set on HTMLImageElement has no implications.
3167
3168         * WebCore.vcxproj/WebCore.vcxproj: Add MicroTask.{h,cpp} to the project.
3169         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Add MicroTaskTest.{h,cpp} to the project.
3170         * WebCore.vcxproj/WebCore.vcxproj.filters: Add MicroTask.{h,cpp} to the project.
3171         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Add MicroTaskTest.{h,cpp} to the project.
3172         * WebCore.xcodeproj/project.pbxproj: Add MicroTask{,Test}.{h,cpp} to the project.
3173         * dom/Document.h: Add WEBCORE_EXPORT to addConsoleMessage, so it can be used in MicroTaskTest that's in WebCoreTestSupport..
3174         * dom/MicroTask.h: Add a MicroTask interface class. Add a MicroTaskQueue singleton.
3175         (WebCore::MicroTask::~MicroTask):
3176         (WebCore::MicroTask::run): Run the microtask.
3177         * dom/MicroTask.cpp: Implement the MicroTaskQueue singleton.
3178         (WebCore::MicroTaskQueue::singleton): Get a singleton instance of MicroTaskQueue.
3179         (WebCore::MicroTaskQueue::queueMicroTask): Add a microtask to the queue.
3180         (WebCore::MicroTaskQueue::runMicroTasks): Run all the microtasks in the queue and clear it.
3181         * dom/ScriptRunner.cpp: Trigger running of all microtasks in queue.
3182         (WebCore::ScriptRunner::timerFired):
3183         * html/parser/HTMLScriptRunner.cpp: Trigger running of all microtasks in queue.
3184         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
3185         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
3186         (WebCore::HTMLScriptRunner::runScript):
3187         * testing/Internals.cpp: Add a method to queue a test microtask.
3188         (WebCore::Internals::queueMicroTask):
3189         * testing/Internals.h: Add a method to queue a test microtask.
3190         (WebCore::Internals::queueMicroTask):
3191         * testing/Internals.idl: Expose test microtask queueing to test JS.
3192         * testing/MicroTaskTest.cpp: Add a test class that implements a microtask and prints to the console when it runs.
3193         (WebCore::MicroTaskTest::run): Run the microtask
3194         (WebCore::MicroTaskTest::create): Create a test microtask.
3195         * testing/MicroTaskTest.h: Add a test class that implements a microtask.
3196         (WebCore::MicroTaskTest::run):
3197         (WebCore::MicroTaskTest::create):
3198
3199 2015-03-02  Jeremy Jones  <jeremyj@apple.com>
3200
3201         RenderVideo should not paint the video frame when video is fullscreen.
3202         https://bugs.webkit.org/show_bug.cgi?id=142097
3203
3204         Reviewed by Eric Carlson.
3205
3206         For performance and correctness, RenderVideo should not paint the current video frame
3207         inline when video is fullscreen. This happens when snapshots are taken and can have a
3208         negative performance impact.
3209
3210         * rendering/RenderVideo.cpp:
3211         (WebCore::RenderVideo::paintReplaced):
3212
3213 2015-03-02  Dean Jackson  <dino@apple.com>
3214
3215         [iOS Media] Airplay button should be blue when active
3216         https://bugs.webkit.org/show_bug.cgi?id=142193
3217
3218         Reviewed by Brent Fulgham.
3219
3220         Add a blue form of the Airplay button that is used
3221         when we are actively displaying on another screen.
3222
3223         * Modules/mediacontrols/mediaControlsiOS.css:
3224         (video::-webkit-media-controls-wireless-playback-picker-button):
3225         (video::-webkit-media-controls-wireless-playback-picker-button:active):
3226         (video::-webkit-media-controls-wireless-playback-picker-button.playing):
3227         * Modules/mediacontrols/mediaControlsiOS.js:
3228         (ControllerIOS.prototype.updateWirelessPlaybackStatus):
3229
3230 2015-03-02  Brent Fulgham  <bfulgham@apple.com>
3231
3232         Move scroll animating functions from ScrollAnimator to ScrollController
3233         https://bugs.webkit.org/show_bug.cgi?id=142102
3234         <rdar://problem/20007161>
3235
3236         Reviewed by Simon Fraser.
3237
3238         No change in functionality.
3239         
3240         Do some refactoring of the various scrolling classes:
3241         1. Consolidate animation times to RunLoop::Timer instead of a combination of WebCore::Timer
3242            and CFRunLoopTimers. Do this for Scroll Snap Point and Rubberband animations.
3243         2. Move ScrollController from platform/mac to platform/cocoa to enable sharing with iOS.
3244         3. Move code from ScrollAnimator{Mac} -> ScrollController.
3245         4. Rename scrollOffsetInAxis -> scrollOffsetOnAxis
3246         5. Rename immediateScrollInAxis -> immediateScrollOnAxis
3247
3248         * WebCore.xcodeproj/project.pbxproj: Move ScrollController to 'platform/cocoa'
3249         * page/mac/EventHandlerMac.mm: Make sure the scroll controller is notified of end-of-scroll
3250         events, just as is done for the "event not handled" case in EventHandler.cpp. 
3251         (WebCore::EventHandler::platformCompleteWheelEvent):
3252         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Remove timer and some delegate
3253         methods, now that ScrollController is controlling this state.
3254         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3255         (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac): We no longer
3256         need to clean up the CFRunLoopTimer.
3257         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Add temporary stub needed
3258         until Bug 141973 is completed.).
3259         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
3260         (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer): Deleted.
3261         (WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Deleted.
3262         * platform/ScrollAnimator.cpp:
3263         (WebCore::ScrollAnimator::ScrollAnimator):
3264         (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Just call the ScrollController method.
3265         (WebCore::ScrollAnimator::handleWheelEvent): Ditto.
3266         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Ditto.
3267         (WebCore::ScrollAnimator::scrollOffsetOnAxis): Renamed from scrollOffsetInAxis.
3268         (WebCore::ScrollAnimator::scrollOffsetInAxis): Deleted.
3269         (WebCore::ScrollAnimator::immediateScrollOnAxis): Renamed from immediateScrollInAxis.
3270         (WebCore::ScrollAnimator::immediateScrollInAxis): Deleted.
3271         (WebCore::ScrollAnimator::startScrollSnapTimer): Deleted.
3272         (WebCore::ScrollAnimator::stopScrollSnapTimer): Deleted.
3273         (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): Deleted.
3274         (WebCore::ScrollAnimator::verticalScrollSnapTimerFired): Deleted.
3275         * platform/ScrollAnimator.h:
3276         * platform/cocoa/ScrollController.h: Copied from platform/mac/ScrollController.h.
3277         * platform/cocoa/ScrollController.mm: Copied from platform/mac/ScrollController.mm.
3278         (WebCore::ScrollController::ScrollController): Update to initialize new timers.
3279         (WebCore::ScrollController::handleWheelEvent): Update to handle Scroll Snap Point events.
3280         (WebCore::ScrollController::startSnapRubberbandTimer): Added.
3281         (WebCore::ScrollController::stopSnapRubberbandTimer): Manage animation timers locally, do not
3282         require client to maintain timers.
3283         (WebCore::ScrollController::snapRubberBand): Ditto.
3284         (WebCore::ScrollController::processWheelEventForScrollSnap): Added. (Moved from ScrollAnimatorMac)
3285         (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Ditto. Also updated to use RunLoop::Timer.
3286         (WebCore::ScrollController::startScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
3287         (WebCore::ScrollController::stopScrollSnapTimer):  Ditto. Also updated to use RunLoop::Timer.
3288         (WebCore::ScrollController::horizontalScrollSnapTimerFired): Ditto.
3289         (WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
3290         (WebCore::ScrollController::scrollOffsetOnAxis): Moved from ScrollAnimatorMac.
3291         (WebCore::ScrollController::immediateScrollOnAxis): Ditto.
3292         * platform/mac/AxisScrollSnapAnimator.h: Rename methods from 'InAxis' to 'OnAxis'
3293         * platform/mac/AxisScrollSnapAnimator.mm: Ditto.
3294         * platform/mac/ScrollAnimatorMac.h:
3295         * platform/mac/ScrollAnimatorMac.mm:
3296         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Remove unused Rubberband timers (now that this is
3297         controlled in the ScrollController)
3298         (WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): Deleted.
3299         (WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Deleted.
3300         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): Deleted.
3301         * platform/mac/ScrollController.h: Removed.
3302         * platform/mac/ScrollController.mm: Removed.
3303
3304 2015-03-02  Mark Lam  <mark.lam@apple.com>
3305
3306         The InspectorTimelineAgent should gracefully handle attempts to start more than once.
3307         <https://webkit.org/b/142189>
3308
3309         Reviewed by Joseph Pecoraro.
3310
3311         No new tests.  Unskipped an existing test that already asserts this.
3312
3313         InspectorTimelineAgent::internalStop() already checks for redundant calls to it in
3314         case the InspectorTimelineAgent is already disabled. Similarly,
3315         InspectorTimelineAgent::internalStart() should check if the InspectorTimelineAgent
3316         is already enabled before proceeding to do work to enable it. Though wasteful,
3317         it is legal for clients of the InspectorTimelineAgent to invoke start on it more
3318         than once. Hence, this check is needed.
3319
3320         This check fixes the debug assertion failure when running the
3321         inspector/timeline/debugger-paused-while-recording.html test. The test can now
3322         be unskipped.
3323
3324         * inspector/InspectorTimelineAgent.cpp:
3325         (WebCore::InspectorTimelineAgent::internalStart):
3326
3327 2015-03-02  Roger Fong  <roger_fong@apple.com>
3328
3329         Update backgrounds of sliders for inline media controls on OS X.
3330         https://bugs.webkit.org/show_bug.cgi?id=142188.
3331         <rdar://problem/20012413>
3332
3333         Reviewed by Dean Jackson.
3334
3335         Don’t use CSS to draw volume and timeline slider backgrounds.
3336         * Modules/mediacontrols/mediaControlsApple.css:
3337         (video::-webkit-media-controls-volume-slider):
3338         (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
3339         (audio::-webkit-media-controls-timeline):
3340         (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
3341         (audio::-webkit-media-controls-panel .thumbnail-track):
3342         (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb): Deleted.
3343         (audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,): Deleted.
3344
3345         Draw volume and timeline slider backgrounds using 2d canvases.
3346         * Modules/mediacontrols/mediaControlsApple.js:
3347         (Controller.prototype.createControls):
3348         (Controller.prototype.handleVolumeSliderInput):
3349         (Controller.prototype.addRoundedRect):
3350         (Controller.prototype.drawTimelineBackground):
3351         (Controller.prototype.drawVolumeBackground):
3352         (Controller.prototype.showControls):
3353         * Modules/mediacontrols/mediaControlsiOS.js:
3354         (ControllerIOS.prototype.addRoundedRect): Deleted.
3355
3356 2015-03-01  Roger Fong  <roger_fong@apple.com>
3357
3358         Update inline media element controls appearance Part 1.
3359         https://bugs.webkit.org/show_bug.cgi?id=142138.
3360         <rdar://problem/19997384>
3361
3362         Reviewed by Dean Jackson.
3363
3364         Update positioning, sizes, and background colors media control elements.
3365         Volume and timeline sliders will be drawn in a separate patch via 2d canvases.
3366
3367         * Modules/mediacontrols/mediaControlsApple.css:
3368         (audio::-webkit-media-controls-panel):
3369         (video::-webkit-media-controls-panel):
3370         (audio::-webkit-media-controls-rewind-button):
3371         (audio::-webkit-media-controls-play-button):
3372         (audio::-webkit-media-controls-panel .mute-box):
3373         (video::-webkit-media-controls-volume-max-button):
3374         (audio::-webkit-media-controls-panel .volume-box):
3375         (audio::-webkit-media-controls-panel .volume-box:active):
3376         (video::-webkit-media-controls-volume-slider):
3377         (audio::-webkit-media-controls-toggle-closed-captions-button):
3378         (audio::-webkit-media-controls-fullscreen-button):
3379         (audio::-webkit-media-controls-current-time-display):
3380         (audio::-webkit-media-controls-time-remaining-display):
3381         (audio::-webkit-media-controls-timeline-container .hour-long-time): Deleted.