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