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