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