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