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