26b94899f57415a9df65571a8de9744b4959aa54
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
2
3         Add the same is<RenderBox> test to KeyframeAnimation::computeExtentOfTransformAnimation()
4         that ImplicitAnimation::computeExtentOfTransformAnimation() has, and change the latter
5         to the more canonical is<RenderBox>() form.
6         
7         Fixes an assertion in animations/animation-on-inline-crash.html
8
9         * page/animation/ImplicitAnimation.cpp:
10         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
11         * page/animation/KeyframeAnimation.cpp:
12         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
13
14 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
15
16         And another fix. Thanks to Hunseop Jeong for the fix.
17
18         * html/HTMLInputElement.cpp:
19         (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
20         (WebCore::HTMLInputElement::didMoveToNewDocument):
21
22 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
23
24         Fix the touch-event build.
25
26         * dom/Document.cpp:
27         (WebCore::Document::didAddTouchEventHandler):
28         (WebCore::Document::didRemoveTouchEventHandler):
29
30 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
31
32         Reduce the side-effects of animations turning off overlap testing
33         https://bugs.webkit.org/show_bug.cgi?id=92791
34
35         Reviewed by Dean Jackson.
36         
37         When a layer is running a transition or animation of the transform property,
38         we would simply disable overlap testing for later layers, which had the side-effect
39         of promoting lots of unrelated elements into layers temporarily.
40         
41         Fix by maintaining overlap, but computing an overlap extent that takes the animation
42         into account.
43         
44         Rotations are currently treated as full rotations. If an extent for the overlap is
45         hard to compute (e.g. 3d transforms, or matrix animations with a rotation component),
46         then we fall back to the current behavior.
47
48         Tests: compositing/layer-creation/mismatched-rotated-transform-animation-overlap.html
49                compositing/layer-creation/mismatched-rotated-transform-transition-overlap.html
50                compositing/layer-creation/mismatched-transform-transition-overlap.html
51                compositing/layer-creation/multiple-keyframes-animation-overlap.html
52                compositing/layer-creation/scale-rotation-animation-overlap.html
53                compositing/layer-creation/scale-rotation-transition-overlap.html
54                compositing/layer-creation/translate-animation-overlap.html
55                compositing/layer-creation/translate-scale-animation-overlap.html
56                compositing/layer-creation/translate-scale-transition-overlap.html
57                compositing/layer-creation/translate-transition-overlap.html
58
59         * page/animation/AnimationBase.cpp:
60         (WebCore::containsRotation):
61         (WebCore::AnimationBase::computeTransformedExtentViaTransformList): When we have matched
62         transform lists, we can map a rectangle through the various operations. Transform-origin
63         is used to shift the origin of the box first, and then unshift after. If we encounter
64         a rotation, for now assume it's a full rotation (a future patch could tighten this up).
65         (WebCore::AnimationBase::computeTransformedExtentViaMatrix): If we're using matrix
66         interpolation, we have to decompose the matrix to see if there's any rotation component,
67         and, if there is, fall back to current behavior.
68         * page/animation/AnimationBase.h:
69         * page/animation/AnimationController.cpp:
70         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
71         (WebCore::AnimationController::computeExtentOfAnimation):
72         * page/animation/AnimationController.h:
73         * page/animation/AnimationControllerPrivate.h:
74         * page/animation/CompositeAnimation.cpp:
75         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation): Ask active keyframe
76         animations and transitions to compute the bounds extent.
77         * page/animation/CompositeAnimation.h:
78         * page/animation/ImplicitAnimation.cpp:
79         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation): Compute the extent
80         of the start and end transforms, and union them.
81         * page/animation/ImplicitAnimation.h:
82         * page/animation/KeyframeAnimation.cpp:
83         (WebCore::KeyframeAnimation::animate):
84         (WebCore::KeyframeAnimation::getAnimatedStyle): Some nullptr goodness.
85         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation): Compute an extent
86         for each keyframe, and take their union.
87         * page/animation/KeyframeAnimation.h:
88         * platform/graphics/GeometryUtilities.cpp:
89         (WebCore::euclidianDistance): Use Pythagoras to compute a distance.
90         (WebCore::boundsOfRotatingRect): Given a rect whose location is relative
91         to the rotation origin, compute a bounds for the rotated rect by computing
92         the furthest corner from the origin, and sweeping out a circle.
93         * platform/graphics/GeometryUtilities.h:
94         * platform/graphics/transforms/Matrix3DTransformOperation.h:
95         * platform/graphics/transforms/MatrixTransformOperation.h:
96         * platform/graphics/transforms/PerspectiveTransformOperation.h:
97         * platform/graphics/transforms/RotateTransformOperation.h:
98         * platform/graphics/transforms/ScaleTransformOperation.h:
99         * platform/graphics/transforms/SkewTransformOperation.h:
100         * platform/graphics/transforms/TransformOperation.h:
101         (WebCore::TransformOperation::isAffectedByTransformOrigin):
102         * platform/graphics/transforms/TransformOperations.cpp:
103         (WebCore::TransformOperations::affectedByTransformOrigin): Ask all the operations if
104         they are affected by transform-origin.
105         (WebCore::TransformOperations::blendByMatchingOperations): nullptr.
106         * platform/graphics/transforms/TransformOperations.h:
107         * rendering/RenderBox.cpp:
108         (WebCore::RenderBox::pushMappingToContainer): Comment fix. Only take transforms into account
109         if the geometry map says so (which is most of the time).
110         * rendering/RenderGeometryMap.cpp:
111         (WebCore::RenderGeometryMap::mapToContainer): RenderLayerCompositor is now using the
112         geometry map in a way that is incompatible with this assertion; it deliberately ignores
113         transforms sometimes, so we can't easily verify that the mapping matches mapping through
114         renderers.
115         (WebCore::RenderGeometryMap::pushMappingsToAncestor): Save and restore the UseTransforms
116         bit.
117         * rendering/RenderGeometryMap.h:
118         * rendering/RenderLayer.cpp:
119         (WebCore::RenderLayer::boundingBox): Whitespace.
120         (WebCore::RenderLayer::getOverlapBoundsIncludingChildrenAccountingForTransformAnimations): Helper
121         function to get the bounds of a layer, including descendants, when a transform animation is running.
122         * rendering/RenderLayer.h:
123         * rendering/RenderLayerCompositor.cpp:
124         (WebCore::RenderLayerCompositor::CompositingState::CompositingState): Add a ancestorHasTransformAnimation
125         flag to detect nested animated transforms.
126         (WebCore::RenderLayerCompositor::OverlapExtent::knownToBeHaveExtentUncertainty): This returns true when
127         the layer is animating transform, and the transition/animation is such that we can't easily compute the
128         bounds of the animation.
129         (WebCore::RenderLayerCompositor::computeExtent): const RenderLayer&.
130         Compute the animated bounds if there's a transform animation running.
131         (WebCore::RenderLayerCompositor::addToOverlapMap): const RenderLayer&
132         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive): const RenderLayer&
133         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
134         Delay the call to pushMappingsToAncestor() until knowing if there's a transform animation running, and
135         if there is, push the mapping while ignoring transforms (since the transform is implicitly taken into account
136         for overlap via the computed animated bounds).
137         If this layer is running a transform animation, set the childState.ancestorHasTransformAnimation flag so
138         that descendants will know (nested transform animations fall back to current behavior).
139         The if (.... && isRunningAcceleratedTransformAnimation()) is what previously caused us to turn off overlap
140         testing in the face of animations. That now only happens if we were unable to easily compute the animation bounds.
141         (WebCore::RenderLayerCompositor::isRunningTransformAnimation): This previously tested whether an accelerated animation
142         was running, but that's timing sensitive; AnimationController can start the transform animation, but it's not yet
143         considered accelerated until we get an async callback from GraphicsLayer, yet this code needed to know if the
144         animation was running.
145         Since transform animations are always accelerated, we can just test for a running transform animation.
146         (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation): Deleted.
147         * rendering/RenderLayerCompositor.h:
148         * rendering/style/RenderStyle.cpp:
149         (WebCore::requireTransformOrigin): Some FIXME comments.
150
151 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
152
153         Clean up related to wheelEvent names
154         https://bugs.webkit.org/show_bug.cgi?id=142713
155
156         Reviewed by Anders Carlsson.
157
158         Add EventNames::isWheelEventType() and use it in places that test for the
159         two wheel event names.
160
161         * dom/Document.cpp:
162         (WebCore::Document::didAddWheelEventHandler):
163         (WebCore::Document::didRemoveWheelEventHandler):
164         * dom/Document.h: No need for exports (I grepped). Pass the Node*, which
165         will be used in a later patch.
166         * dom/EventNames.h:
167         (WebCore::EventNames::isWheelEventType):
168         * dom/Node.cpp:
169         (WebCore::Node::didMoveToNewDocument):
170         (WebCore::tryAddEventListener):
171         (WebCore::tryRemoveEventListener):
172         (WebCore::Node::defaultEventHandler):
173         * html/shadow/MediaControlsApple.cpp:
174         (WebCore::MediaControlsAppleEventListener::handleEvent):
175         * page/DOMWindow.cpp:
176         (WebCore::DOMWindow::addEventListener):
177         (WebCore::DOMWindow::removeEventListener):
178         * page/ios/FrameIOS.mm:
179         (WebCore::ancestorRespondingToScrollWheelEvents): Remove dead code.
180
181 2015-03-15  Simon Fraser  <simon.fraser@apple.com>
182
183         Remove a redundant repaint when a layer becomes composited
184         https://bugs.webkit.org/show_bug.cgi?id=142711
185
186         Reviewed by Anders Carlsson.
187
188         RenderLayerCompositor::computeCompositingRequirements() doesn't need to call
189         repaintOnCompositingChange() when a layer is going to become composited,
190         because updateBacking() does exactly the same thing. I used an assertion
191         and ran the tests to ensure this wasn't a behavior change.
192
193         * rendering/RenderLayerCompositor.cpp:
194         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
195
196 2015-03-15  Benjamin Poulain  <bpoulain@apple.com>
197
198         Change the exact attribute matching to be ASCII case-insensitive
199         https://bugs.webkit.org/show_bug.cgi?id=142609
200
201         Reviewed by Darin Adler.
202
203         In CSS, testing attribute values should be ASCII case-insensitive,
204         previously we were using full unicode case conversion.
205
206         Test: fast/selectors/attribute-exact-value-match-is-ascii-case-insensitive.html
207
208         * css/CSSParser.cpp:
209         (WebCore::CSSParser::parseKeyframeSelector):
210         The CSS parser has its own fast version for ASCII case insensitive.
211         This code was using the general equalIgnoringASCIICase() which was causing name conflicts,
212         change that to the normal CSS parser version.
213
214         * css/SelectorCheckerTestFunctions.h:
215         (WebCore::equalIgnoringASCIICase): Deleted.
216         * cssjit/SelectorCompiler.cpp:
217         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
218
219 2015-03-15  Brent Fulgham  <bfulgham@apple.com>
220
221         scroll snap points do not properly account for zoomed pages
222         https://bugs.webkit.org/show_bug.cgi?id=142706
223         <rdar://problem/20165771>
224
225         Reviewed by Anders Carlsson.
226
227         When a WebView is zoomed (such that it has a non-unity pageScaleFactor), we need to account for this
228         scaling value when selecting our correct scroll snap point target, as well as when specifying the
229         pixel location for our animation to target.
230
231         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
232         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
233         (WebCore::ScrollingTreeFrameScrollingNodeMac::pageScaleFactor): Added new delegate method.
234         * platform/cocoa/ScrollController.h:
235         (WebCore::ScrollControllerClient::pageScaleFactor): Added new default delegate.
236         * platform/cocoa/ScrollController.mm:
237         (WebCore::ScrollController::beginScrollSnapAnimation): Calculate the correct scroll target
238         based on the page scale factor.
239
240 2015-03-15  Csaba Osztrogonác  <ossy@webkit.org>
241
242         Fix run-bindings-tests on the WinCairo bot
243         https://bugs.webkit.org/show_bug.cgi?id=142588
244
245         Reviewed by Alex Christensen.
246
247         * bindings/scripts/test/JS/JSFloat64Array.cpp: Added property svn:eol-style.
248         * bindings/scripts/test/JS/JSFloat64Array.h: Added property svn:eol-style.
249         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Added property svn:eol-style.
250         * bindings/scripts/test/JS/JSTestActiveDOMObject.h: Modified property svn:eol-style.
251         * bindings/scripts/test/JS/JSTestCallback.cpp: Modified property svn:eol-style.
252         * bindings/scripts/test/JS/JSTestCallback.h: Modified property svn:eol-style.
253         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Added property svn:eol-style.
254         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h: Modified property svn:eol-style.
255         * bindings/scripts/test/JS/JSTestEventConstructor.cpp: Added property svn:eol-style.
256         * bindings/scripts/test/JS/JSTestEventConstructor.h: Added property svn:eol-style.
257         * bindings/scripts/test/JS/JSTestEventTarget.cpp: Added property svn:eol-style.
258         * bindings/scripts/test/JS/JSTestEventTarget.h: Modified property svn:eol-style.
259         * bindings/scripts/test/JS/JSTestException.cpp: Added property svn:eol-style.
260         * bindings/scripts/test/JS/JSTestException.h: Added property svn:eol-style.
261         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: Added property svn:eol-style.
262         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h: Added property svn:eol-style.
263         * bindings/scripts/test/JS/JSTestImplements.cpp: Added property svn:eol-style.
264         * bindings/scripts/test/JS/JSTestImplements.h: Added property svn:eol-style.
265         * bindings/scripts/test/JS/JSTestInterface.cpp: Modified property svn:eol-style.
266         * bindings/scripts/test/JS/JSTestInterface.h: Modified property svn:eol-style.
267         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Modified property svn:eol-style.
268         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: Modified property svn:eol-style.
269         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Added property svn:eol-style.
270         * bindings/scripts/test/JS/JSTestNamedConstructor.h: Added property svn:eol-style.
271         * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Added property svn:eol-style.
272         * bindings/scripts/test/JS/JSTestNondeterministic.h: Added property svn:eol-style.
273         * bindings/scripts/test/JS/JSTestObj.cpp: Modified property svn:eol-style.
274         * bindings/scripts/test/JS/JSTestObj.h: Modified property svn:eol-style.
275         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Added property svn:eol-style.
276         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h: Added property svn:eol-style.
277         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Modified property svn:eol-style.
278         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: Modified property svn:eol-style.
279         * bindings/scripts/test/JS/JSTestSupplemental.cpp: Added property svn:eol-style.
280         * bindings/scripts/test/JS/JSTestSupplemental.h: Added property svn:eol-style.
281         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Added property svn:eol-style.
282         * bindings/scripts/test/JS/JSTestTypedefs.h: Added property svn:eol-style.
283         * bindings/scripts/test/JS/JSattribute.cpp: Added property svn:eol-style.
284         * bindings/scripts/test/JS/JSattribute.h: Added property svn:eol-style.
285         * bindings/scripts/test/JS/JSreadonly.cpp: Added property svn:eol-style.
286         * bindings/scripts/test/JS/JSreadonly.h: Added property svn:eol-style.
287
288 2015-03-14  Darin Adler  <darin@apple.com>
289
290         More event handler improvements
291         https://bugs.webkit.org/show_bug.cgi?id=142701
292
293         Reviewed by Anders Carlsson.
294
295         These are the improvements:
296
297         - Use EventHandler rather than EventListener as the the type for event handler
298           attributes. This matches the HTML specification, and also makes sense, since
299           EventListener means something else (and we use it to mean that!). Also renamed
300           JSWindowEventListener to WindowEventHandler. Even though this only affects the
301           JavaScript code generated, it's not really a JavaScript-specific flag.
302
303         - Tweak formatting on addEventListener/removeEventListener/dispatchEvent in
304           all the IDL files where the appear. This includes changing the spelling from
305           "evt" to "event". Some day we should fix this so these functions only need to
306           appear in EventTarget.idl.
307
308         - Tweak formatting a bit on the IDL files we had to modify anyway.
309
310         - Use [Conditional] more often and #if less often in IDL files.
311
312         - Added a new [DocumentEventHandler] attribute for the selectionchange event.
313           This involved adding new event handler attribute functions to JSEventListener.h
314           for use by the JavaScript bindings.
315
316         - Removed a little unused code from the JavaScript code bindings generator.
317
318         - Improved the mechanism used by HTMLElement and SVGElement to share the list of
319           content attributes that are event handlers so there is only one map rather than
320           two. Made a similar mechanism so that HTMLBodyElement and HTMLFrameSetElement
321           can share the list of window event handlers.
322
323         - Followed the HTML specification by putting all the event handler support in
324           the HTMLElement class rather than having event handlers apply only a the
325           particular element that uses those events. We already did this for most of
326           our event handlers, but we are now doing it for all of them.
327
328         * Modules/battery/BatteryManager.idl: Use EventHandler instead of EventListener
329         as appropriate. Also reformatted addEventListener/removeEventListener/dispatchEvent.
330         * Modules/encryptedmedia/MediaKeySession.idl: Ditto.
331         * Modules/indexeddb/IDBDatabase.idl: Ditto.
332         * Modules/indexeddb/IDBOpenDBRequest.idl: Ditto.
333         * Modules/indexeddb/IDBRequest.idl: Ditto.
334         * Modules/indexeddb/IDBTransaction.idl: Ditto.
335         * Modules/mediastream/MediaStream.idl: Ditto.
336         * Modules/mediastream/MediaStreamTrack.idl: Ditto.
337         * Modules/mediastream/RTCDTMFSender.idl: Ditto.
338         * Modules/mediastream/RTCDataChannel.idl: Ditto.
339         * Modules/mediastream/RTCPeerConnection.idl: Ditto.
340         * Modules/speech/SpeechSynthesisUtterance.idl: Ditto.
341         * Modules/webaudio/AudioBufferSourceNode.idl: Ditto.
342         * Modules/webaudio/AudioContext.idl: Ditto.
343         * Modules/webaudio/OscillatorNode.idl: Ditto.
344         * Modules/webaudio/ScriptProcessorNode.idl: Ditto.
345         * Modules/websockets/WebSocket.idl: Ditto.
346         * css/FontLoader.idl: Ditto.
347         * dom/EventListener.idl: Ditto.
348         * dom/EventTarget.idl: Ditto.
349         * dom/MessagePort.idl: Ditto.
350         * dom/Node.idl: Ditto.
351         * dom/WebKitNamedFlow.idl: Ditto.
352         * fileapi/FileReader.idl: Ditto.
353         * html/MediaController.idl: Ditto.
354         * html/track/AudioTrackList.idl: Ditto.
355         * html/track/TextTrackCue.idl: Ditto.
356         * html/track/TextTrackList.idl: Ditto.
357         * html/track/VideoTrackList.idl: Ditto.
358         * loader/appcache/DOMApplicationCache.idl: Ditto.
359         * page/EventSource.idl: Ditto.
360         * page/Performance.idl: Ditto.
361         * workers/AbstractWorker.idl: Ditto.
362         * workers/DedicatedWorkerGlobalScope.idl: Ditto.
363         * workers/Worker.idl: Ditto.
364         * workers/WorkerGlobalScope.idl: Ditto.
365         * xml/XMLHttpRequest.idl: Ditto.
366         * xml/XMLHttpRequestUpload.idl: Ditto.
367
368         * Modules/notifications/Notification.idl: Did the above, but also used
369         [Conditional] instead of #if throughout.
370         * html/track/TextTrack.idl: Ditto.
371
372         * Modules/webaudio/AudioNode.idl: Tweaked paragraphing of this file.
373
374         * bindings/js/JSEventListener.cpp:
375         (WebCore::windowEventHandlerAttribute): Renamed to take the word "forwarded"
376         out of this. More closely matches the terminology used in IDL files and the
377         HTML specification.
378         (WebCore::setWindowEventHandlerAttribute): Ditto.
379         (WebCore::documentEventHandlerAttribute): Added.
380         (WebCore::setDocumentEventHandlerAttribute): Added.
381         * bindings/js/JSEventListener.h: Updated for above changes.
382
383         * bindings/objc/PublicDOMInterfaces.h: Renamed argument from "evt" to "event".
384
385         * bindings/scripts/CodeGeneratorGObject.pm:
386         (SkipAttribute): Skip attributes of type "EventHandler" rather than attributes
387         of type "EventListener".
388         * bindings/scripts/CodeGeneratorObjC.pm:
389         (SkipAttribute): Ditto.
390
391         * bindings/scripts/CodeGeneratorJS.pm:
392         (GenerateImplementation): Look for the type EventHandler instead of the type
393         EventListener for event handler attributes. Also added code to handle the new
394         DocumentEventHandler, and use the name WindowEventHandler instead of the name
395         JSWindowEventListener. Removed unneeded preflight check to see if we have
396         writable attributes; it was not doing us any good. (That caused a lot of code
397         to be un-indented and makes the diff hard to read.)
398
399         * bindings/scripts/IDLAttributes.txt: Removed JSWindowEventListener, and added
400         WindowEventHandler and DocumentEventHandler.
401
402         * bindings/scripts/test/TestObj.idl: Use the type EventHandler instead of the
403         type EventListener. The test output is unchanged, though.
404
405         * dom/Document.idl: Got rid of the conditionals and merged all the event handler
406         attributes into a single sorted, unconditional list. Added some that were missing,
407         as detected by the event-handler-attributes.html test.
408
409         * dom/Element.idl: Ditto. This includes moving attributes here that were formerly
410         only in certain element classes. Note that the script event handler attribute
411         support is still here, even though it should be in HTMLElement and SVGElement
412         instead. There's a FIXME about that, but no real urgency in fixing it.
413
414         * html/HTMLAttributeNames.in: Added onmessage. Previously, the support for this
415         was from the script attribute only, not the content attribute.
416
417         * html/HTMLBodyElement.cpp:
418         (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap): Added. This
419         contains the list of all the window event handlers that can be set on a body
420         or frameset element and which are triggered by events on the window.
421         (WebCore::HTMLBodyElement::eventNameForWindowEventHandlerAttribute): Added.
422         This is the function to call to use the map above. Given an attribute, it
423         returns either null if it is not a window event handler attribute, or the
424         event type if it is one.
425         (WebCore::HTMLBodyElement::parseAttribute): Updated to use the new
426         functions above. Handling of these attributes is now unconditional, but
427         also we don't have to keep the nested if statements here up to date, just
428         the list of event handler attributes names in the map create function above.
429
430         * html/HTMLBodyElement.h: Added public eventNameForWindowEventHandlerAttribute
431         and private createWindowEventHandlerNameMap functions.
432
433         * html/HTMLBodyElement.idl: Updated to use WindowEventHandler, DocumentEventHandler,
434         and EventHandler. Also made everything unconditional. Also filled out the list here
435         to match the list handled as content attributes. All covered by the test.
436
437         * html/HTMLElement.cpp:
438         (WebCore::HTMLElement::createEventHandlerNameMap): Added. Replaces the old
439         populate function. Changed the list of event handler attributes to be a bit more
440         complete, and to be entirely unconditional. Also refactored this function to use
441         a new populateEventHandlerNameMap helper, shared with HTMLBodyElement.
442         (WebCore::HTMLElement::populateEventHandlerNameMap): Added. Factors out the code
443         that both this class and HTMLBodyElement use to build event handler name maps.
444         (WebCore::HTMLElement::eventNameForEventHandlerAttribute): Added. This is the
445         function that call to use the map above. Given an attribute it returns either
446         null if it is not an event handler attribute, or the event type if it is one.
447         This is actually two functions. One is a protected function for use by both this
448         class and HTMLBodyElement so they can share things like the optimization to look
449         for the "on" prefix. The other is the public function that we actually use in
450         HTMLElement and SVGElement.
451         (WebCore::HTMLElement::editabilityFromContentEditableAttr): Tweaked and refactored
452         to use lineageOfType. Would have been even simpler if this took an element instead
453         of a node. Unrelated to the event handler changes.
454         (WebCore::HTMLElement::parseAttribute): Removed long-obsolete code that decided
455         whether to call through to the base class. The base class function is empty and
456         never needs to be called, and in any case there is no value in doing work to
457         decide whether to call through to an empty function. Changed the style of the
458         function to use early return instead of else. Worth considering whether we want
459         to return early or call through to base class in this family of functions. It's
460         more efficient to return early, but doesn't work well if both the derived class
461         and base class want to respond to changes to the same attribute. The new logic
462         for event handler attributes is more straightforward than the old, since the
463         eventNameForEventHandlerAttribute has the logic.
464         (WebCore::HTMLElement::textToFragment): Tweaked and refactored a bit, and also
465         changed to return a Ref since this never fails and needs to return null.
466
467         * html/HTMLElement.h: Updated for above changes. This includes a template version
468         of populateEventHandlerNameMap that extracts the array size at compile time and
469         passes it to the non-template function that does the work.
470
471         * html/HTMLFrameElementBase.cpp:
472         (WebCore::HTMLFrameElementBase::parseAttribute): Removed unneeded code to handle
473         event handler attributes handled by HTMLElement.
474         * html/HTMLImageElement.cpp:
475         (WebCore::HTMLImageElement::parseAttribute): Ditto.
476         * html/HTMLLinkElement.cpp:
477         (WebCore::HTMLLinkElement::parseAttribute): Ditto.
478         * html/HTMLObjectElement.cpp:
479         (WebCore::HTMLObjectElement::parseAttribute): Ditto.
480         * html/HTMLScriptElement.cpp:
481         (WebCore::HTMLScriptElement::parseAttribute): Ditto.
482
483         * html/HTMLFrameSetElement.cpp:
484         (WebCore::HTMLFrameSetElement::parseAttribute): Changed function to early return
485         style, and added FIXMEs about the many problems in the attribute handling code.
486         Replaced all the code to handle window event handlers with a new bit of code that
487         calls HTMLBodyElement::eventNameForWindowEventHandlerAttribute.
488
489         * html/HTMLFrameSetElement.idl: Changed to match the list of window event handlers
490         in HTMLBodyElement.idl, although I did not add the document event handler here.
491         As in the various other cases, having some extra event handlers does not seem to
492         do harm and this is covered by the event-handler-attributes.html test.
493
494         * html/HTMLMarqueeElement.idl: Renamed EventListener to EventHandler in comment.
495
496         * page/DOMWindow.idl: As with Element and Document, removed conditionals, and
497         filled out the list of event handlers so all the tests in
498         event-handler-attributes.html will pass.
499
500         * svg/SVGElement.cpp:
501         (WebCore::SVGElement::parseAttribute): Changed code to the early return style,
502         and replaced the event handler attribute code with new much simpler code that
503         uses the new HTMLElement::eventNameForEventHandlerAttribute. Also changed the
504         way we call through to base classes. Just call through to the
505         SVGLangSpace::parseAttribute function unconditionally, and don't try to use
506         early return style to arbitrate among base classes. We should make this
507         simplification throughout the SVG code; there's no need for the complexity
508         that was there before just to cut down slightly on calls through to base
509         class parseAttribute functions.
510
511         * svg/SVGSVGElement.cpp:
512         (WebCore::SVGSVGElement::parseAttribute): Changed some of this code to the
513         early return style and corrected some comments about the window event handler
514         attributes here. These could use some further testing and might later need to be
515         properly supported when the attributes are set in script, not just in content.
516
517         * svg/SVGScriptElement.cpp:
518         (WebCore::SVGScriptElement::isSupportedAttribute): Deleted.
519         (WebCore::SVGScriptElement::parseAttribute): Changed this function to use the
520         early return style and also to call through to all three base classes. This is
521         a pattern we should follow elsewhere in SVG to simplify the code. There is no
522         need for the supportedAttributes sets like the one in this calass, and the code
523         is unnecessarily complex, perhaps in an attempt to optimize performance. I'm
524         pretty sure the old code was slower than this new code will be. No need for the
525         extra hash table lookup every time. Also removed handling of event handler
526         attribute which is taken care of by SVGElement now.
527         (WebCore::SVGScriptElement::svgAttributeChanged): Made similar changes for
528         the same reason as in parseAttribute. This function really needs a new name:
529         It's the same as parseAttribute, except it's also used when implementing
530         changes due to SVG animation.
531
532         * svg/SVGScriptElement.h: Removed isSupportedAttribute.
533
534 2015-03-14  Simon Fraser  <simon.fraser@apple.com>
535
536         Clean up use of flags in localToContainer-type functions
537         https://bugs.webkit.org/show_bug.cgi?id=142704
538
539         Reviewed by Alexey Proskuryakov.
540         
541         RenderObject::localToContainerQuad() had the questionable behavior of always
542         enforcing UseTransforms in the flags. However, a future patch will need to call
543         localToContainerQuad() without this flag.
544         
545         Fix by requiring callers of localToAbsoluteQuad(), localToContainerQuad(), localToContainerPoint(),
546         and absoluteToLocalQuad() to pass the UseTransforms flag in, providing it as a default argument.
547         
548         The default value of the MapCoordinatesFlags parameter to mapLocalToContainer(),
549         a lower-level function, is removed.
550         
551         Sprinkle a few more nullptrs around.
552         
553         No behavior change.
554
555         * rendering/RenderBlock.cpp:
556         (WebCore::RenderBlock::selectionGapRectsForRepaint): call the higher-level localToContainerPoint()
557         instead of mapLocalToContainer().
558         (WebCore::RenderBlock::absoluteQuads): Pass UseTransforms.
559         * rendering/RenderBox.cpp:
560         (WebCore::RenderBox::absoluteQuads): Ditto.
561         * rendering/RenderBox.h:
562         * rendering/RenderFlowThread.h:
563         * rendering/RenderGeometryMap.h:
564         (WebCore::RenderGeometryMap::absolutePoint):
565         (WebCore::RenderGeometryMap::absoluteRect):
566         * rendering/RenderImage.cpp:
567         (WebCore::RenderImage::collectSelectionRects): This function was erroneously passing
568         'false' as flags. Pass UseTransforms instead (but no behavior change since
569         UseTransforms was forced on lower down).
570         * rendering/RenderInline.h:
571         * rendering/RenderLayer.cpp:
572         (WebCore::RenderLayer::scrollRectToVisible): UseTransforms is the parameter default, remove it.
573         * rendering/RenderLineBreak.cpp:
574         (WebCore::RenderLineBreak::absoluteQuads):
575         (WebCore::RenderLineBreak::collectSelectionRects): Another erroneous 'false'.
576         * rendering/RenderNamedFlowFragment.cpp:
577         (WebCore::RenderNamedFlowFragment::absoluteQuadsForBoxInRegion):
578         * rendering/RenderObject.cpp:
579         (WebCore::RenderObject::localToContainerQuad): Here's where we no longer force
580         the UseTransforms bit.
581         (WebCore::RenderObject::localToContainerPoint): Also here.
582         * rendering/RenderObject.h: I prefer bit flags lined up. Makes it easier to spot errors.
583         (WebCore::RenderObject::localToAbsoluteQuad):
584         * rendering/RenderText.cpp:
585         (WebCore::RenderText::collectSelectionRects): Another bad 'false'.
586         * rendering/RenderTextLineBoxes.cpp:
587         (WebCore::RenderTextLineBoxes::absoluteRectsForRange):
588         (WebCore::RenderTextLineBoxes::absoluteQuads):
589         (WebCore::RenderTextLineBoxes::absoluteQuadsForRange):
590         * rendering/RenderView.h:
591         * rendering/SimpleLineLayoutFunctions.cpp:
592         (WebCore::SimpleLineLayout::collectAbsoluteQuads):
593         * rendering/svg/RenderSVGForeignObject.h:
594         * rendering/svg/RenderSVGInline.cpp:
595         (WebCore::RenderSVGInline::absoluteQuads): Another bad 'false'.
596         * rendering/svg/RenderSVGInline.h:
597         * rendering/svg/RenderSVGModelObject.cpp:
598         (WebCore::RenderSVGModelObject::absoluteQuads):
599         * rendering/svg/RenderSVGModelObject.h:
600         * rendering/svg/RenderSVGRoot.h:
601         * rendering/svg/RenderSVGText.cpp:
602         (WebCore::RenderSVGText::absoluteQuads):
603         * rendering/svg/RenderSVGText.h:
604         * rendering/svg/SVGRenderSupport.h:
605
606 2015-03-14  Brent Fulgham  <bfulgham@apple.com>
607
608         [iOS] scroll snap points are animating to the wrong positions...
609         https://bugs.webkit.org/show_bug.cgi?id=142705
610         <rdar://problem/20136946>
611
612         Reviewed by Simon Fraser.
613
614         Avoid adding an extra '0' snap point to our set. We always start with one zero; this
615         extra append just forces us to do more steps in our search for nearest snap point.
616
617         * page/scrolling/AxisScrollSnapOffsets.cpp:
618         (WebCore::updateFromStyle): Remove extra '0' appended to offsets.
619
620 2015-03-14  Dean Jackson  <dino@apple.com>
621
622         Feature flag for Animations Level 2
623         https://bugs.webkit.org/show_bug.cgi?id=142699
624         <rdar://problem/20165097>
625
626         Reviewed by Brent Fulgham.
627
628         Add ENABLE_CSS_ANIMATIONS_LEVEL_2 and a runtime flag animationTriggersEnabled.
629
630         * Configurations/FeatureDefines.xcconfig:
631         * bindings/generic/RuntimeEnabledFeatures.cpp:
632         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
633         * bindings/generic/RuntimeEnabledFeatures.h:
634         (WebCore::RuntimeEnabledFeatures::setAnimationTriggersEnabled):
635         (WebCore::RuntimeEnabledFeatures::animationTriggersEnabled):
636
637 2015-03-14  Adenilson Cavalcanti  <cavalcantii@gmail.com>
638
639         RenderBlock::imageChange() calling const methods on exit
640         https://bugs.webkit.org/show_bug.cgi?id=142648
641
642         Reviewed by Brent Fulgham.
643
644         No new tests, no change on behavior.
645
646         * rendering/RenderBlock.cpp:
647         (WebCore::RenderBlock::imageChanged): Deleted.
648         * rendering/RenderBlock.h:
649
650 2015-03-14  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
651
652         [GStreamer] share GL context in pipeline
653         https://bugs.webkit.org/show_bug.cgi?id=142693
654
655         Reviewed by Philippe Normand.
656
657         GstGL elements in a pipeline need to be aware of the application's
658         display and its GL context. This information is shared through context
659         messages between the pipeline and the browser.
660
661         This patch shares this context through a GStreamer's synchronous
662         message, using the GL information held in the web process.
663
664         This patch is based on the work of Philippe Normand for Bug 138562.
665
666         No new tests because this is platform specific and it depends in the
667         run-time availability and configurations of GstGL elements.
668
669         * PlatformGTK.cmake: appends the GstGL header files in the include
670         directories. Also its library directory is appended.
671         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
672         (WebCore::mediaPlayerPrivateSyncMessageCallback): New callback function.
673         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
674         Initialize the new class attributes.
675         (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): New method
676         for handling synchronous messages from the pipeline. This method
677         currently only handles the GL context sharing.
678         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Configures
679         the pipeline's bus to handle the synchronous messages.
680         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add new
681         class methods and attributes.
682
683 2015-03-13  Alex Christensen  <achristensen@webkit.org>
684
685         Progress towards CMake on Mac.
686         https://bugs.webkit.org/show_bug.cgi?id=142680
687
688         Reviewed by Gyuyoung Kim.
689
690         * PlatformMac.cmake:
691         Added new include directories and removed old source files.
692
693 2015-03-13  Commit Queue  <commit-queue@webkit.org>
694
695         Unreviewed, rolling out r181483.
696         https://bugs.webkit.org/show_bug.cgi?id=142688
697
698         Caused use-after-free on many tests (Requested by ap on
699         #webkit).
700
701         Reverted changeset:
702
703         "Allow clients to selectively disable plug-ins"
704         https://bugs.webkit.org/show_bug.cgi?id=142506
705         http://trac.webkit.org/changeset/181483
706
707 2015-03-13  Antti Koivisto  <antti@apple.com>
708
709         Cache glyph widths to GlyphPages
710         https://bugs.webkit.org/show_bug.cgi?id=142028
711
712         Reviewed by Andreas Kling.
713
714         Currently we have a separate cache in Font for glyph widths. In practice we always need
715         the widths so we can just cache them in GlyphPages. This simplifies the code and removes
716         a per-character hash lookup from WidthIterator.
717
718         * platform/graphics/Font.cpp:
719         (WebCore::Font::Font):
720         (WebCore::Font::initCharWidths):
721         (WebCore::Font::platformGlyphInit):
722         (WebCore::createAndFillGlyphPage):
723         (WebCore::Font::computeWidthForGlyph):
724
725             Rename to make it clear this doesn't cache.
726
727         (WebCore::GlyphPage::setGlyphDataForIndex):
728
729             Initialize the width.
730             This could go to GlyphPage.cpp if we had one.
731
732         * platform/graphics/Font.h:
733         (WebCore::Font::glyphZeroWidth):
734         (WebCore::Font::isZeroWidthSpaceGlyph):
735         (WebCore::Font::zeroGlyph): Deleted.
736         (WebCore::Font::setZeroGlyph): Deleted.
737         (WebCore::Font::widthForGlyph): Deleted.
738         * platform/graphics/FontCascade.cpp:
739         (WebCore::offsetToMiddleOfGlyph):
740         * platform/graphics/FontCascadeFonts.cpp:
741         (WebCore::FontCascadeFonts::glyphDataForCharacter):
742         * platform/graphics/GlyphPage.h:
743         (WebCore::GlyphData::GlyphData):
744
745             Return width too as part of GlyphData.
746
747         (WebCore::GlyphPage::glyphDataForIndex):
748         (WebCore::GlyphPage::setGlyphDataForCharacter):
749         (WebCore::GlyphPage::setGlyphDataForIndex):
750         (WebCore::GlyphPage::GlyphPage):
751         * platform/graphics/WidthIterator.cpp:
752         (WebCore::WidthIterator::advanceInternal):
753
754             No need to lookup width separately now.
755
756         * platform/graphics/mac/ComplexTextController.cpp:
757         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
758         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
759         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
760         * rendering/mathml/RenderMathMLOperator.cpp:
761         (WebCore::RenderMathMLOperator::advanceForGlyph):
762         * rendering/svg/SVGTextRunRenderingContext.cpp:
763         (WebCore::missingGlyphForFont):
764         * svg/SVGFontData.cpp:
765         (WebCore::SVGFontData::initializeFont):
766
767 2015-03-13  Eric Carlson  <eric.carlson@apple.com>
768
769         [Mac] Enable WIRELESS_PLAYBACK_TARGET
770         https://bugs.webkit.org/show_bug.cgi?id=142635
771
772         Reviewed by Darin Adler.
773
774         * Configurations/FeatureDefines.xcconfig:
775
776 2015-03-13  Jeremy Jones  <jeremyj@apple.com>
777
778         Fix typo restoreUserInterfaceForOptimizedFullscreeStopWithCompletionHandler.
779         https://bugs.webkit.org/show_bug.cgi?id=142678
780
781         Reviewed by Eric Carlson.
782
783         Add the missing 'n' in "fullscreen".
784
785         * platform/spi/ios/AVKitSPI.h:
786
787 2015-03-13  Timothy Horton  <timothy_horton@apple.com>
788
789         Sites that use a device-width viewport but don't have enough height to fill the view are scaled up
790         https://bugs.webkit.org/show_bug.cgi?id=142664
791         <rdar://problem/18859470>
792
793         Reviewed by Benjamin Poulain.
794
795         * page/ViewportConfiguration.cpp:
796         (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints):
797         (WebCore::ViewportConfiguration::shouldIgnoreVerticalScalingConstraints):
798         (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraints):
799         Split shouldIgnoreScalingConstraints into one for each dimension.
800
801         (WebCore::ViewportConfiguration::initialScale):
802         (WebCore::ViewportConfiguration::minimumScale):
803         Don't force the initial and minimum scales to cover the whole view if the
804         page claims to want to lay out to device width but then lays out too big.
805         This will allow pages that misbehave in this way to scale down further
806         than they previously could, but will result in a region of empty background
807         color being exposed at the initial/minimum scale.
808
809         (WebCore::ViewportConfiguration::description):
810         Update the logging to show each dimension separately.
811
812         * page/ViewportConfiguration.h:
813
814 2015-03-13  Mark Lam  <mark.lam@apple.com>
815
816         Replace TCSpinLock with a new WTF::SpinLock based on WTF::Atomic.
817         <https://webkit.org/b/142674>
818
819         Reviewed by Filip Pizlo.
820
821         No new tests because there is no new functionality. This is a refactoring effort.
822
823         * bindings/objc/WebScriptObject.mm:
824         * platform/ios/wak/WAKWindow.mm:
825         (-[WAKWindow initWithLayer:]):
826         (-[WAKWindow initWithFrame:]):
827
828 2015-03-13  Doug Russell  <d_russell@apple.com>
829
830         AX: Provide API for assistive tech to ignore DOM key event handlers
831         https://bugs.webkit.org/show_bug.cgi?id=142059
832
833         Reviewed by Beth Dakin.
834
835         Assistive technology applications on the desktop are heavily dependent on keyboard navigation being reliable. This is greatly hindered by sites that handle key events without updating keyboard selection and then consume the event. It is important for assistive technology apps to allow users to decide to ignore these handlers that are incorrect for their purposes.
836
837         This can be fixed by exposing, via a new accessibility attribute, a way to decide, for a given WebCore::Frame, to pre-empt DOM dispatch and instead let accessibility caret browsing take place.
838
839         Test: platform/mac/accessibility/prevent-keyboard-event-dispatch.html
840
841         * accessibility/AccessibilityObject.cpp:
842         (WebCore::AccessibilityObject::preventKeyboardDOMEventDispatch):
843         (WebCore::AccessibilityObject::setPreventKeyboardDOMEventDispatch):
844         * accessibility/AccessibilityObject.h:
845         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
846         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
847         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
848         (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
849         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
850         * dom/Element.cpp:
851         (WebCore::Element::dispatchKeyEvent):
852         * page/EventHandler.cpp:
853         (WebCore::EventHandler::keyEvent):
854         (WebCore::handleKeyboardSelectionMovement):
855         (WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
856         * page/EventHandler.h:
857         * page/Settings.in:
858
859 2015-03-09  Conrad Shultz  <conrad_shultz@apple.com>
860
861         Allow clients to selectively disable plug-ins
862         https://bugs.webkit.org/show_bug.cgi?id=142506
863
864         Reviewed by Anders Carlsson.
865
866         Add new functionality allow clients to declaratively disable individual plug-ins (in a manner that conceals them
867         from the page). As part of this:
868
869         1) Introduce the concept of web-visible plug-ins and related concepts, as distinct from the real underlying
870            set of plug-ins.
871
872         2) Where applicable, plumb additional information about plug-ins (specifically, bundle identification) deeper
873            down the stack.
874
875         3) Add generic functionality to PluginStrategy to support filtering plug-ins for visibility and introduce
876            a concrete implementation thereof in WebPlatformStrategies in WebKit2.
877
878         4) Add messaging infrastructure to allow clients to set and clear plug-in policies.
879
880         While currently only used in a very limited manner, the new declarative plug-in policies are written generically
881         so that they could be easily used in the future to reduce synchronous messaging to the client when loading plug-ins.
882
883         * dom/DOMImplementation.cpp:
884         (WebCore::DOMImplementation::createDocument):
885         Update to reflect function rename.
886
887         * loader/SubframeLoader.cpp:
888         (WebCore::findPluginMIMETypeFromURL):
889         Adopt getWebVisibleMimesAndPluginIndices().
890         (WebCore::logPluginRequest):
891         Update to reflect function rename.
892         (WebCore::SubframeLoader::shouldUsePlugin):
893         Ditto.
894
895         * platform/PlatformStrategies.h:
896         Export platformStrategies(), since it is now used in WebProcess.cpp.
897
898         * plugins/DOMMimeType.cpp:
899         (WebCore::DOMMimeType::type):
900         (WebCore::DOMMimeType::description):
901         (WebCore::DOMMimeType::mimeClassInfo):
902         Adopt getWebVisibleMimesAndPluginIndices().
903         (WebCore::DOMMimeType::enabledPlugin):
904         Ditto.
905
906         * plugins/DOMMimeType.h:
907         Don't return references in a few places where it is no longer safe to do so.
908         (WebCore::DOMMimeType::mimeClassInfo): Deleted.
909
910         * plugins/DOMMimeTypeArray.cpp:
911         (WebCore::DOMMimeTypeArray::length):
912         Adopt getWebVisibleMimesAndPluginIndices().
913         (WebCore::DOMMimeTypeArray::item):
914         Ditto.
915         (WebCore::DOMMimeTypeArray::canGetItemsForName):
916         Ditto.
917         (WebCore::DOMMimeTypeArray::namedItem):
918         Ditto.
919
920         * plugins/DOMPlugin.cpp:
921         (WebCore::DOMPlugin::pluginInfo):
922         Adopt getWebVisiblePlugins().
923         (WebCore::DOMPlugin::item):
924         Adopt getWebVisibleMimesAndPluginIndices().
925         (WebCore::DOMPlugin::canGetItemsForName):
926         Ditto.
927         (WebCore::DOMPlugin::namedItem):
928         Ditto.
929
930         * plugins/DOMPlugin.h:
931         (WebCore::DOMPlugin::pluginInfo): Deleted.
932
933         * plugins/DOMPluginArray.cpp:
934         (WebCore::DOMPluginArray::length):
935         Adopt getWebVisiblePlugins().
936         (WebCore::DOMPluginArray::item):
937         Ditto.
938         (WebCore::DOMPluginArray::canGetItemsForName):
939         Ditto.
940         (WebCore::DOMPluginArray::namedItem):
941         Ditto.
942
943         * plugins/PluginData.cpp:
944         (WebCore::PluginData::PluginData):
945         Stash the passed-in Page and call initPlugins().
946         (WebCore::PluginData::getWebVisiblePlugins):
947         New member function; call through to PluginStrategy::getWebVisiblePluginInfo().
948         (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
949         New member function; build up the mimes and mimePluginIndices vectors in the same manner as before, but
950         limited to the web-visible plug-ins.
951         (WebCore::PluginData::supportsWebVisibleMimeType):
952         Renamed from supportsMimeType(); update to work in terms of web-visible plug-ins.
953         (WebCore::PluginData::pluginInfoForWebVisibleMimeType):
954         Renamed from pluginInfoForMimeType(); ditto.
955         (WebCore::PluginData::pluginNameForWebVisibleMimeType):
956         Renamed from pluginNameForMimeType(); ditto.
957         (WebCore::PluginData::pluginFileForWebVisibleMimeType):
958         Renamed from pluginFileForMimeType(); ditto.
959         (WebCore::PluginData::initPlugins):
960         (WebCore::PluginData::supportsMimeType): Deleted.
961         (WebCore::PluginData::pluginInfoForMimeType): Deleted.
962         (WebCore::PluginData::pluginNameForMimeType): Deleted.
963         (WebCore::PluginData::pluginFileForMimeType): Deleted.
964
965         * plugins/PluginData.h:
966         Add a member variable for the associate Page; declare the PluginLoadClientPolicy enumeration; add
967         new members to PluginInfo for the clientLoadPolicy and bundle information.
968         (WebCore::PluginData::PluginData):
969         Replace some member functions with new ones that will hide plug-ins upon request from the client;
970         (WebCore::PluginData::mimes): Deleted.
971         (WebCore::PluginData::mimePluginIndices): Deleted.
972
973         * plugins/PluginStrategy.h:
974         Declare new member functions for retrieving web-visible plug-ins and setting/clearing plug-in policies.
975
976         * replay/SerializationMethods.cpp:
977         (JSC::EncodingTraits<PluginData>::encodeValue):
978         Remove now-obsolete code for handling MIME types and add a FIXME.
979         (JSC::DeserializedPluginData::DeserializedPluginData):
980         (JSC::EncodingTraits<PluginData>::decodeValue):
981         Ditto.
982         (JSC::EncodingTraits<PluginInfo>::encodeValue):
983         Handle the new members in PluginInfo.
984         (JSC::EncodingTraits<PluginInfo>::decodeValue):
985         Ditto.
986
987         * replay/WebInputs.json:
988         Teach Replay about PluginLoadClientPolicy.
989
990 2015-03-13  Chris Dumez  <cdumez@apple.com>
991
992         XMLHttpRequests should not prevent a page from entering PageCache
993         https://bugs.webkit.org/show_bug.cgi?id=142612
994         <rdar://problem/19923085>
995
996         Reviewed by Alexey Proskuryakov.
997
998         Make XMLHttpRequest ActiveDOMObjects suspendable in most cases to
999         drastically improve the likelihood of pages using them to enter
1000         PageCache. XMLHttpRequest used to be only suspendable when not
1001         loading. After this patch, if the XMLHttpRequest is loading when
1002         navigating away from the page, it will be aborted and the page
1003         will enter the PageCache. Upon restoring the page from PageCache,
1004         the XMLHttpRequests' error handlers will be executed to give them
1005         a chance to reload if they want to.
1006
1007         Test: http/tests/navigation/page-cache-xhr.html
1008
1009         * history/PageCache.cpp:
1010         (WebCore::logCanCacheFrameDecision):
1011         (WebCore::PageCache::canCachePageContainingThisFrame):
1012         Do not prevent a page to enter the page cache ff the main document has
1013         an error that is a cancellation and all remaining subresource loaders
1014         are for XHR. We extend the pre-existing mechanism used on iOS, which
1015         allowed PageCaching if the remaining resource loads are for images.
1016
1017         * loader/DocumentLoader.cpp:
1018         (WebCore::areAllLoadersPageCacheAcceptable):
1019         Mark XHR loaders as PageCache acceptable.
1020
1021         * loader/DocumentThreadableLoader.cpp:
1022         (WebCore::DocumentThreadableLoader::isXMLHttpRequest):
1023         * loader/DocumentThreadableLoader.h:
1024         * loader/ThreadableLoader.h:
1025         * loader/cache/CachedResource.cpp:
1026         (WebCore::CachedResource::areAllClientsXMLHttpRequests):
1027         * loader/cache/CachedResource.h:
1028         * loader/cache/CachedResourceClient.h:
1029         (WebCore::CachedResourceClient::isXMLHttpRequest):
1030         * xml/XMLHttpRequest.cpp:
1031         (WebCore::XMLHttpRequest::XMLHttpRequest):
1032         (WebCore::XMLHttpRequest::createRequest):
1033         (WebCore::XMLHttpRequest::canSuspend):
1034         Report that we can suspend XMLHttpRequests as long as the window load
1035         event has already fired. If the window load event has not fired yet,
1036         it would be unsafe to cancel the load in suspend() as it would
1037         potentially cause arbitrary JS execution while suspending.
1038
1039         (WebCore::XMLHttpRequest::suspend):
1040         If suspending for PageCache and the request is currently loading, abort
1041         the load and mark that we should fire the error event upon restoring
1042         from PageCache.
1043
1044         (WebCore::XMLHttpRequest::resume):
1045         (WebCore::XMLHttpRequest::resumeTimerFired):
1046         Upon resuming, fire the error event in a timer if the load was aborted
1047         for suspending. We need to do this in a timer because we are not allowed
1048         to execute arbitrary JS inside resume().
1049
1050         (WebCore::XMLHttpRequest::stop):
1051         Add a assertion to make sure we are not firing event inside stop() as
1052         this would potentially cause arbitrary JS execution and it would be
1053         unsafe. It seems to me that our code is currently unsafe but the
1054         assertion does not seem to be hit by our current layout tests. I am
1055         adding the assertion as it would make it clear we have a bug and we
1056         need to fix it.
1057
1058         * xml/XMLHttpRequest.h:
1059
1060 2015-03-13  Joonghun Park  <jh718.park@samsung.com>
1061
1062         Fix Debug build error 'comparison is always true due to limited range of data type [-Werror=type-limits]'
1063         https://bugs.webkit.org/show_bug.cgi?id=142652
1064
1065         Reviewed by Csaba Osztrogonác.
1066
1067         No new tests, no behavior changes.
1068
1069         Now CSSPropertyID type is uint16_t, so propertyID >= 0 check is needed no more.
1070
1071         * css/CSSPrimitiveValue.cpp:
1072         (WebCore::propertyName):
1073         * css/makeprop.pl:
1074
1075 2015-03-12  Zan Dobersek  <zdobersek@igalia.com>
1076
1077         Remove DrawingBuffer
1078         https://bugs.webkit.org/show_bug.cgi?id=142641
1079
1080         Reviewed by Darin Adler.
1081
1082         Remove the DrawingBuffer class. Objects of this type were only held in the
1083         WebGLRenderingContext (later renamed to WebGLRenderingContextBase) on the
1084         Chromium port, with the relevant code removed in r147888. Since then, the
1085         m_drawingBuffer member variable has always been null.
1086
1087         * CMakeLists.txt:
1088         * PlatformEfl.cmake:
1089         * PlatformGTK.cmake:
1090         * WebCore.vcxproj/WebCore.vcxproj:
1091         * WebCore.vcxproj/WebCore.vcxproj.filters:
1092         * WebCore.xcodeproj/project.pbxproj:
1093         * html/canvas/WebGL2RenderingContext.cpp:
1094         (WebCore::WebGL2RenderingContext::copyTexImage2D):
1095         * html/canvas/WebGLRenderingContext.cpp:
1096         (WebCore::WebGLRenderingContext::copyTexImage2D):
1097         * html/canvas/WebGLRenderingContextBase.cpp:
1098         (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
1099         (WebCore::WebGLRenderingContextBase::initializeNewContext):
1100         (WebCore::WebGLRenderingContextBase::destroyGraphicsContext3D):
1101         (WebCore::WebGLRenderingContextBase::markContextChanged):
1102         (WebCore::WebGLRenderingContextBase::clearIfComposited):
1103         (WebCore::WebGLRenderingContextBase::paintRenderingResultsToCanvas):
1104         (WebCore::WebGLRenderingContextBase::paintRenderingResultsToImageData):
1105         (WebCore::WebGLRenderingContextBase::reshape):
1106         (WebCore::WebGLRenderingContextBase::drawingBufferWidth):
1107         (WebCore::WebGLRenderingContextBase::drawingBufferHeight):
1108         (WebCore::WebGLRenderingContextBase::activeTexture):
1109         (WebCore::WebGLRenderingContextBase::bindFramebuffer):
1110         (WebCore::WebGLRenderingContextBase::bindTexture):
1111         (WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
1112         (WebCore::WebGLRenderingContextBase::deleteFramebuffer):
1113         (WebCore::WebGLRenderingContextBase::disable):
1114         (WebCore::WebGLRenderingContextBase::enable):
1115         (WebCore::WebGLRenderingContextBase::getContextAttributes):
1116         (WebCore::WebGLRenderingContextBase::readPixels):
1117         (WebCore::WebGLRenderingContextBase::loseContextImpl):
1118         (WebCore::WebGLRenderingContextBase::getBoundFramebufferWidth):
1119         (WebCore::WebGLRenderingContextBase::getBoundFramebufferHeight):
1120         (WebCore::WebGLRenderingContextBase::maybeRestoreContext):
1121         * html/canvas/WebGLRenderingContextBase.h:
1122         (WebCore::ScopedDrawingBufferBinder::ScopedDrawingBufferBinder): Deleted.
1123         (WebCore::ScopedDrawingBufferBinder::~ScopedDrawingBufferBinder): Deleted.
1124         * platform/graphics/GraphicsContext.h:
1125         * platform/graphics/GraphicsContext3D.h:
1126         * platform/graphics/cairo/DrawingBufferCairo.cpp: Removed.
1127         * platform/graphics/gpu/DrawingBuffer.cpp: Removed.
1128         * platform/graphics/gpu/DrawingBuffer.h: Removed.
1129         * platform/graphics/gpu/mac/DrawingBufferMac.mm: Removed.
1130         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1131         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
1132         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
1133
1134 2015-03-12  Ryosuke Niwa  <rniwa@webkit.org>
1135
1136         REGRESSION(r180726): Removing an empty line at the end of textarea clears the entire texture
1137         https://bugs.webkit.org/show_bug.cgi?id=142646
1138
1139         Reviewed by Darin Adler.
1140
1141         The bug was caused by TypingCommand::deleteKeyPressed erroneously determining the editable root to be empty because
1142         Position::atStartOfTree returns true when it's anchored at a BR that is immediately below the root editable element.
1143
1144         Fixed the bug by replacing the use of the deprecated atFirstEditingPositionForNode by a code that understands modern
1145         position types such as PositionIsBeforeAnchor in atStartOfTree and atEndOfTree. These two functions will no longer
1146         return true when anchored before or after BR after this patch.
1147
1148         Test: editing/deleting/delete-empty-line-breaks-at-end-of-textarea.html
1149
1150         * dom/Position.cpp:
1151         (WebCore::Position::atStartOfTree):
1152         (WebCore::Position::atEndOfTree):
1153
1154 2015-03-12  Yusuke Suzuki  <utatane.tea@gmail.com>
1155
1156         Integrate MapData into JSMap and JSSet
1157         https://bugs.webkit.org/show_bug.cgi?id=142556
1158
1159         Reviewed by Filip Pizlo.
1160
1161         Now Set has SetData and it's different from MapData.
1162         And MapData/SetData are completely integrated into JSSet and JSMap.
1163         Structured-cloning algorithm need to be aware of these changes.
1164         And in the case of JSSet, since JSSet doesn't need dummy value for construction,
1165         Structured-cloning only serialize the keys in JSSet.
1166
1167         * ForwardingHeaders/runtime/MapDataInlines.h: Added.
1168         * bindings/js/SerializedScriptValue.cpp:
1169         (WebCore::CloneSerializer::serialize):
1170         (WebCore::CloneDeserializer::consumeCollectionDataTerminationIfPossible):
1171         (WebCore::CloneDeserializer::deserialize):
1172         (WebCore::CloneDeserializer::consumeMapDataTerminationIfPossible): Deleted.
1173
1174 2015-03-12  Dan Bernstein  <mitz@apple.com>
1175
1176         Finish up <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
1177
1178         Added back OS X bits that I couldn’t land initially in r181317 or had to remove in r181327.
1179
1180         * platform/network/mac/CertificateInfoMac.mm:
1181         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
1182         * platform/spi/cocoa/SecuritySPI.h:
1183
1184 2015-03-12  Geoffrey Garen  <ggaren@apple.com>
1185
1186         REGRESSION: Crash under Heap::reportExtraMemoryAllocatedSlowCase for media element
1187         https://bugs.webkit.org/show_bug.cgi?id=142636
1188
1189         Reviewed by Mark Hahnenberg.
1190
1191         This was a pre-existing bug that I made a lot worse in
1192         <https://trac.webkit.org/changeset/181411>.
1193
1194         * html/HTMLMediaElement.cpp:
1195         (WebCore::HTMLMediaElement::parseAttribute): Compare size before
1196         subtracting rather than subtracting and then comparing to zero. The
1197         latter technique is not valid for unsigned integers, which will happily
1198         underflow into giant numbers.
1199
1200         * Modules/mediasource/SourceBuffer.cpp:
1201         (WebCore::SourceBuffer::reportExtraMemoryAllocated): This code was
1202          technically correct, but I took the opportunity to clean it up a bit.
1203          There's no need to do two checks here, and it smells bad to check for
1204          a negative unsigned integer.
1205
1206 2015-03-12  Sebastian Dröge  <sebastian@centricular.com>
1207
1208         Stop using single-include headers that are only available since GStreamer >= 1.2.
1209
1210         https://bugs.webkit.org/show_bug.cgi?id=142537
1211
1212         Reviewed by Philippe Normand.
1213
1214         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
1215         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1216         * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
1217         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1218         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
1219         * platform/graphics/gstreamer/GStreamerUtilities.h:
1220         * platform/graphics/gstreamer/ImageGStreamer.h:
1221         Instead of using single-include headers for the GStreamer libraries,
1222         directly include the headers we need. The single-include headers were
1223         only added in 1.2, and this would be the only reason why we would
1224         depend on 1.2.
1225
1226 2015-03-12  Eric Carlson  <eric.carlson@apple.com>
1227
1228         [Mac] Update AirPlay handling
1229         https://bugs.webkit.org/show_bug.cgi?id=142541
1230
1231         Unreviewed, respond to post-review comments.
1232
1233         * dom/Document.cpp:
1234         (WebCore::Document::didChoosePlaybackTarget):
1235         * page/ChromeClient.h:
1236         * page/Page.cpp:
1237         (WebCore::Page::showPlaybackTargetPicker):
1238         (WebCore::Page::didChoosePlaybackTarget):
1239         (WebCore::Page::configurePlaybackTargetMonitoring):
1240
1241 2015-03-12  Csaba Osztrogonác  <ossy@webkit.org>
1242
1243         Fix the !ENABLE(PICTURE_SIZES) build
1244         https://bugs.webkit.org/show_bug.cgi?id=142617
1245
1246         Reviewed by Darin Adler.
1247
1248         * html/parser/HTMLPreloadScanner.cpp:
1249         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1250
1251 2015-03-11  Joseph Pecoraro  <pecoraro@apple.com>
1252
1253         Unreviewed follow-up fix to r181426. Initialize TextPosition with zeros in case it gets used.
1254
1255         Address ASSERT in LayoutTests/printing/page-format-data.html.
1256
1257         * dom/InlineStyleSheetOwner.cpp:
1258         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
1259         In case the TextPosition gets used because it wasn't created by a parser,
1260         zeros are more realistic values then beforeFirst.
1261
1262 2015-03-11  Roger Fong  <roger_fong@apple.com>
1263
1264         Media element time no longer updates while scrubbing following r181279.
1265         https://bugs.webkit.org/show_bug.cgi?id=142606.
1266         <rdar://problem/20131014>
1267
1268         Reviewed by Eric Carlson.
1269
1270         * Modules/mediacontrols/mediaControlsApple.js:
1271         (Controller.prototype.handleWrapperMouseMove):
1272         Update time as a result of a mouse move if we are scrubbing.
1273
1274 2015-03-11  Joseph Pecoraro  <pecoraro@apple.com>
1275
1276         Web Inspector: CSS parser errors in the console should include column numbers
1277         https://bugs.webkit.org/show_bug.cgi?id=114313
1278
1279         Reviewed by Darin Adler.
1280
1281         Test: inspector-protocol/console/warnings-errors.html
1282
1283         * css/CSSParser.h:
1284         (WebCore::CSSParser::currentCharacterOffset):
1285         Get the current character offset depending on the source type.
1286         Add instance variables to track column position and start
1287         line / column for inline stylesheets.
1288
1289         * css/CSSParser.cpp:
1290         (WebCore::CSSParser::CSSParser):
1291         (WebCore::CSSParser::parseSheet):
1292         Initialize new instance variables.
1293
1294         (WebCore::CSSParser::currentLocation):
1295         Update to include column information for the token. Also, if we are on the
1296         first line we may need to take into account a start column offset as well.
1297
1298         (WebCore::CSSParser::realLex):
1299         Set the token's start column.
1300         When bumping the line number, reset the column offset for the next
1301         line with the next character.
1302
1303         (WebCore::CSSParser::syntaxError):
1304         (WebCore::CSSParser::logError):
1305         Include column information.
1306
1307         * css/StyleSheetContents.cpp:
1308         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
1309         (WebCore::StyleSheetContents::parseString):
1310         (WebCore::StyleSheetContents::parseStringAtPosition):
1311         Include column information.
1312
1313         * css/StyleSheetContents.h:
1314         * dom/InlineStyleSheetOwner.cpp:
1315         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
1316         (WebCore::InlineStyleSheetOwner::createSheet):
1317         Save and use column information later on.
1318
1319         * dom/InlineStyleSheetOwner.h:
1320         * inspector/InspectorStyleSheet.cpp:
1321         (WebCore::InspectorStyleSheet::ensureSourceData):
1322         Updated parser signature needs starting column and no longer has optional parameters.
1323
1324 2015-03-11  Eric Carlson  <eric.carlson@apple.com>
1325
1326         [Mac] Update AirPlay handling
1327         https://bugs.webkit.org/show_bug.cgi?id=142541
1328
1329         Reviewed by Sam Weinig.
1330
1331         * WebCore.xcodeproj/project.pbxproj:
1332         * dom/Document.cpp:
1333         (WebCore::Document::showPlaybackTargetPicker):
1334         (WebCore::Document::addPlaybackTargetPickerClient):
1335         (WebCore::Document::removePlaybackTargetPickerClient):
1336         (WebCore::Document::configurePlaybackTargetMonitoring):
1337         (WebCore::Document::requiresPlaybackTargetRouteMonitoring):
1338         (WebCore::Document::playbackTargetAvailabilityDidChange):
1339         (WebCore::Document::didChoosePlaybackTarget):
1340         * dom/Document.h:
1341         * html/HTMLMediaElement.cpp:
1342         (WebCore::HTMLMediaElement::registerWithDocument):
1343         (WebCore::HTMLMediaElement::unregisterWithDocument):
1344         (WebCore::HTMLMediaElement::parseAttribute):
1345         * html/HTMLMediaElement.h:
1346         * html/HTMLMediaSession.cpp:
1347         (WebCore::HTMLMediaSession::HTMLMediaSession):
1348         (WebCore::HTMLMediaSession::registerWithDocument):
1349         (WebCore::HTMLMediaSession::unregisterWithDocument):
1350         (WebCore::HTMLMediaSession::showPlaybackTargetPicker):
1351         (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
1352         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
1353         (WebCore::HTMLMediaSession::didChoosePlaybackTarget):
1354         (WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange):
1355         (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring):
1356         * html/HTMLMediaSession.h:
1357         * page/ChromeClient.h:
1358         * page/Page.cpp:
1359         (WebCore::Page::didChoosePlaybackTarget):
1360         (WebCore::Page::playbackTargetAvailabilityDidChange):
1361         (WebCore::Page::configurePlaybackTargetMonitoring):
1362         * page/Page.h:
1363         (WebCore::Page::hasWirelessPlaybackTarget):
1364         (WebCore::Page::playbackTarget):
1365         * platform/audio/MediaSession.cpp:
1366         (WebCore::MediaSession::clientDataBufferingTimerFired):
1367         (WebCore::MediaSession::wirelessRoutesAvailableDidChange): Deleted.
1368         * platform/audio/MediaSession.h:
1369         (WebCore::MediaSession::didChoosePlaybackTarget):
1370         (WebCore::MediaSession::externalOutputDeviceAvailableDidChange):
1371         (WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
1372         (WebCore::MediaSessionClient::setWirelessPlaybackTarget):
1373         * platform/audio/MediaSessionManager.cpp:
1374         (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Deleted.
1375         * platform/audio/MediaSessionManager.h:
1376         (WebCore::MediaSessionManager::configureWireLessTargetMonitoring):
1377         * platform/audio/ios/MediaSessionManagerIOS.h:
1378         * platform/audio/ios/MediaSessionManagerIOS.mm:
1379         (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange):
1380         (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
1381         * platform/graphics/AVPlaybackTarget.h: Added.
1382         (WebCore::AVPlaybackTarget::~AVPlaybackTarget):
1383         (WebCore::AVPlaybackTarget::AVPlaybackTarget):
1384         (WebCore::AVPlaybackTarget::setDevicePickerContext):
1385         (WebCore::AVPlaybackTarget::devicePickerContext):
1386         * platform/graphics/AVPlaybackTargetPickerClient.h: Added.
1387         (WebCore::AVPlaybackTargetPickerClient::~AVPlaybackTargetPickerClient):
1388         * platform/graphics/MediaPlayer.cpp:
1389         (WebCore::MediaPlayer::setWirelessPlaybackTarget):
1390         * platform/graphics/MediaPlayer.h:
1391         * platform/graphics/MediaPlayerPrivate.h:
1392         (WebCore::MediaPlayerPrivateInterface::setWirelessPlaybackTarget):
1393         * platform/graphics/avfoundation/AVPlaybackTargetMac.mm: Added.
1394         (WebCore::AVPlaybackTarget::encode):
1395         (WebCore::AVPlaybackTarget::decode):
1396         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1397         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1398         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
1399         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
1400         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
1401         (WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless):
1402         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType):
1403         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled):
1404         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled):
1405         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
1406         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback):
1407         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
1408
1409 2015-03-11  Alex Christensen  <achristensen@webkit.org>
1410
1411         [Content Extensions] Add resource type and load type triggers.
1412         https://bugs.webkit.org/show_bug.cgi?id=142422
1413
1414         Reviewed by Benjamin Poulain.
1415
1416         New API tests.
1417
1418         * WebCore.xcodeproj/project.pbxproj:
1419         * contentextensions/ContentExtensionCompiler.cpp:
1420         (WebCore::ContentExtensions::compileRuleList):
1421         * contentextensions/ContentExtensionParser.cpp:
1422         (WebCore::ContentExtensions::getTypeFlags):
1423         (WebCore::ContentExtensions::loadTrigger):
1424         * contentextensions/ContentExtensionRule.h:
1425         * contentextensions/ContentExtensionsBackend.cpp:
1426         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1427         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL): Deleted.
1428         * contentextensions/ContentExtensionsBackend.h:
1429         * contentextensions/DFABytecode.h:
1430         (WebCore::ContentExtensions::instructionSizeWithArguments):
1431         * contentextensions/DFABytecodeCompiler.cpp:
1432         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendConditionalAction):
1433         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
1434         * contentextensions/DFABytecodeCompiler.h:
1435         * contentextensions/DFABytecodeInterpreter.cpp:
1436         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1437         * contentextensions/DFABytecodeInterpreter.h:
1438         * loader/ResourceLoadInfo.cpp: Added.
1439         (WebCore::toResourceType):
1440         (WebCore::readResourceType):
1441         (WebCore::readLoadType):
1442         (WebCore::ResourceLoadInfo::isThirdParty):
1443         (WebCore::ResourceLoadInfo::getResourceFlags):
1444         * loader/ResourceLoadInfo.h: Added.
1445         * loader/cache/CachedResourceLoader.cpp:
1446         (WebCore::CachedResourceLoader::requestResource):
1447         * page/UserContentController.cpp:
1448         (WebCore::UserContentController::actionsForResourceLoad):
1449         (WebCore::UserContentController::actionsForURL): Deleted.
1450         * page/UserContentController.h:
1451
1452 2015-03-11  Tim Horton  <timothy_horton@apple.com>
1453
1454         Fix the build.
1455
1456         * page/EventHandler.cpp:
1457         (WebCore::EventHandler::selectClosestWordFromHitTestResult):
1458         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
1459         (WebCore::EventHandler::handleMousePressEventTripleClick):
1460         (WebCore::EventHandler::handleMousePressEventSingleClick):
1461
1462 2015-03-11  Timothy Horton  <timothy_horton@apple.com>
1463
1464         <attachment> shouldn't use "user-select: all"
1465         https://bugs.webkit.org/show_bug.cgi?id=142453
1466
1467         Reviewed by Darin Adler.
1468
1469         It turns out that "user-select: all" is rife with bugs; in lieu of fixing them
1470         all (at least for now), let's not use "user-select: all" in the default stylesheet
1471         for <attachment>. It's really overkill anyway, since <attachment> can't have children.
1472         The only "user-select: all" behavior we actually want is select-on-click.
1473         So, we'll implement that in a slightly different way.
1474
1475         Tests: fast/attachment/attachment-select-on-click-inside-user-select-all.html
1476                fast/attachment/attachment-select-on-click.html
1477
1478         * css/html.css:
1479         (attachment):
1480         No more "user-select: all".
1481
1482         (attachment:focus): Deleted.
1483         We stopped using attachment focus a while back and forgot to remove this.
1484
1485         * dom/Node.h:
1486         (WebCore::Node::shouldSelectOnMouseDown):
1487         Add a virtual function that Node subclasses can override to indicate they
1488         should be selected on mouse down.
1489
1490         * html/HTMLAttachmentElement.h:
1491         Override the aforementioned virtual function; <attachment> should always
1492         be selected on mouse down.
1493
1494         * page/EventHandler.cpp:
1495         (WebCore::nodeToSelectOnMouseDownForNode):
1496         Determine which node should be selected when a mousedown hits the given node.
1497         If there's any "user-select: all", we go with the outermost "user-select: all".
1498         Otherwise, we give the node a chance to say that it wants to be selected itself.
1499
1500         (WebCore::expandSelectionToRespectSelectOnMouseDown):
1501         Rename this function, it's not just about "user-select: all" anymore.
1502         Make use of nodeToSelectOnMouseDownForNode.
1503
1504         (WebCore::EventHandler::selectClosestWordFromHitTestResult):
1505         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
1506         (WebCore::EventHandler::handleMousePressEventTripleClick):
1507         (WebCore::EventHandler::handleMousePressEventSingleClick):
1508         (WebCore::expandSelectionToRespectUserSelectAll): Deleted.
1509         Adjust to the new names.
1510
1511 2015-03-11  Geoffrey Garen  <ggaren@apple.com>
1512
1513         Users of Heap::deprecatedReportExtraMemory should switch to reportExtraMemoryAllocated+reportExtraMemoryVisited
1514         https://bugs.webkit.org/show_bug.cgi?id=142595
1515
1516         Reviewed by Andreas Kling.
1517
1518         Fixed this bug for canvas.
1519
1520         * html/HTMLCanvasElement.cpp:
1521         (WebCore::HTMLCanvasElement::memoryCost): Factored out the helper function
1522         required by our IDL generator.
1523
1524         (WebCore::HTMLCanvasElement::createImageBuffer): Use
1525         reportExtraMemoryAllocated.
1526
1527         * html/HTMLCanvasElement.h:
1528
1529         * html/HTMLCanvasElement.idl: Adopt the IDL for reporting cost in the
1530         right way during GC. This will match our reportExtraMemoryAllocated
1531         with a reportExtraMemoryVisited during GC.
1532
1533 2015-03-11  Roger Fong  <roger_fong@apple.com>
1534
1535         A number of minor edits to the media controls on OSX.
1536         https://bugs.webkit.org/show_bug.cgi?id=142551.
1537         <rdar://problem/20114707>
1538
1539         Reviewed by Darin Adler.
1540
1541         This covers a slew of minor edits to the new media controls. They are as follows.
1542         Small vertical placements adjustments to inline control elements.
1543         Make sure buttons have no focus outlines.
1544         Expand height of mute box that triggers the volume panel appearing.
1545         Turn all button colors into an slightly transparent white.
1546         Center status display text in fullscreen mode.
1547         Lower position of captions container in fullscreen mode.
1548         Show the controls on when done loading of the video an status display is hidden.
1549
1550         * Modules/mediacontrols/mediaControlsApple.css:
1551         (audio::-webkit-media-controls-panel):
1552         (audio::-webkit-media-controls-panel button:focus):
1553         (audio::-webkit-media-controls-rewind-button):
1554         (audio::-webkit-media-controls-play-button):
1555         (audio::-webkit-media-controls-play-button.paused):
1556         (audio::-webkit-media-controls-panel .mute-box):
1557         (video::-webkit-media-controls-volume-max-button):
1558         (audio::-webkit-media-controls-panel .volume-box):
1559         (video::-webkit-media-controls-volume-min-button):
1560         (audio::-webkit-media-controls-wireless-playback-picker-button):
1561         (audio::-webkit-media-controls-toggle-closed-captions-button):
1562         (audio::-webkit-media-controls-closed-captions-container li.selected:hover::before):
1563         (audio::-webkit-media-controls-fullscreen-button):
1564         (audio::-webkit-media-controls-fullscreen-button.exit):
1565         (audio::-webkit-media-controls-status-display):
1566         (audio::-webkit-media-controls-time-remaining-display):
1567         (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
1568         (video:-webkit-full-screen::-webkit-media-controls-volume-max-button):
1569         (video:-webkit-full-screen::-webkit-media-controls-volume-min-button):
1570         (video:-webkit-full-screen::-webkit-media-controls-play-button):
1571         (video:-webkit-full-screen::-webkit-media-controls-play-button.paused):
1572         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
1573         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
1574         (video:-webkit-full-screen::-webkit-media-controls-status-display):
1575         (video:-webkit-full-screen::-webkit-media-controls-closed-captions-container):
1576         (audio::-webkit-media-controls-panel button:active): Deleted.
1577         * Modules/mediacontrols/mediaControlsApple.js:
1578         (Controller.prototype.setStatusHidden):
1579
1580 2015-03-11  Commit Queue  <commit-queue@webkit.org>
1581
1582         Unreviewed, rolling out r179340 and r179344.
1583         https://bugs.webkit.org/show_bug.cgi?id=142598
1584
1585         Caused images to stay alive forever when navigating away from
1586         the page before they finish loading. (Requested by kling on
1587         #webkit).
1588
1589         Reverted changesets:
1590
1591         "CachedImage: ensure clients overrides imageChanged instead of
1592         notifyFinished"
1593         https://bugs.webkit.org/show_bug.cgi?id=140722
1594         http://trac.webkit.org/changeset/179340
1595
1596         "HTMLImageLoader: fix build failure on assert condition after
1597         r179340"
1598         https://bugs.webkit.org/show_bug.cgi?id=140722
1599         http://trac.webkit.org/changeset/179344
1600
1601 2015-03-11  Geoffrey Garen  <ggaren@apple.com>
1602
1603         Many users of Heap::reportExtraMemory* are wrong, causing lots of memory growth
1604         https://bugs.webkit.org/show_bug.cgi?id=142593
1605
1606         Reviewed by Andreas Kling.
1607
1608         Adopt deprecatedReportExtraMemory as a short-term fix for runaway
1609         memory growth in these cases where we have not adopted
1610         reportExtraMemoryVisited.
1611
1612         Long-term, we should use reportExtraMemoryAllocated+reportExtraMemoryVisited.
1613         That's tracked by https://bugs.webkit.org/show_bug.cgi?id=142595.
1614
1615         Using IOSDebug, I can see that the canvas stress test @ http://jsfiddle.net/fvyw4ba0/,
1616         which used to keep > 1000 1MB NonVolatile GPU allocations live, now keeps about 10 live.
1617
1618         * Modules/mediasource/SourceBuffer.cpp:
1619         (WebCore::SourceBuffer::reportExtraMemoryAllocated):
1620         * bindings/js/JSDocumentCustom.cpp:
1621         (WebCore::toJS):
1622         * bindings/js/JSImageDataCustom.cpp:
1623         (WebCore::toJS):
1624         * bindings/js/JSNodeListCustom.cpp:
1625         (WebCore::createWrapper):
1626         * dom/CollectionIndexCache.cpp:
1627         (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
1628         * html/HTMLCanvasElement.cpp:
1629         (WebCore::HTMLCanvasElement::createImageBuffer):
1630         * html/HTMLImageLoader.cpp:
1631         (WebCore::HTMLImageLoader::imageChanged):
1632         * html/HTMLMediaElement.cpp:
1633         (WebCore::HTMLMediaElement::parseAttribute):
1634         * xml/XMLHttpRequest.cpp:
1635         (WebCore::XMLHttpRequest::dropProtection):
1636
1637 2015-03-10  Andy Estes  <aestes@apple.com>
1638
1639         REGRESSION (r180985): contentfiltering/block-after-add-data.html crashes with GuardMalloc
1640         https://bugs.webkit.org/show_bug.cgi?id=142526
1641
1642         Reviewed by Darin Adler.
1643
1644         * loader/DocumentLoader.cpp:
1645         (WebCore::DocumentLoader::dataReceived): Don't delete m_contentFilter until after we're done using its replacement data.
1646
1647 2015-03-10  Sam Weinig  <sam@webkit.org>
1648
1649         Allow adding a button in input elements for auto fill related functionality
1650         <rdar://problem/19782066>
1651         https://bugs.webkit.org/show_bug.cgi?id=142564
1652
1653         Reviewed by Anders Carlsson.
1654
1655         Test: fast/forms/input-auto-fill-button.html
1656
1657         - Adds a new button that can be shown in <input> elements - AutoFillButtonElement.
1658         - Makes the spelling of AutoFill consistent throughout WebCore and WebKit (except
1659           where not feasible due to exported API/SPI).
1660
1661         * CMakeLists.txt:
1662         * WebCore.vcxproj/WebCore.vcxproj:
1663         * WebCore.vcxproj/WebCore.vcxproj.filters:
1664         * WebCore.xcodeproj/project.pbxproj:
1665         Add new files.
1666
1667         * css/html.css:
1668         (input::-webkit-auto-fill-button):
1669         (input::-webkit-auto-fill-button:hover):
1670         (input::-webkit-auto-fill-button:active):
1671         Add default style rules for the AutoFill button based on the ones
1672         used for caps lock indicator.
1673
1674         * html/HTMLInputElement.cpp:
1675         (WebCore::HTMLInputElement::HTMLInputElement):
1676         (WebCore::HTMLInputElement::autoFillButtonElement):
1677         (WebCore::HTMLInputElement::reset):
1678         (WebCore::HTMLInputElement::setValueFromRenderer):
1679         (WebCore::HTMLInputElement::setAutoFilled):
1680         (WebCore::HTMLInputElement::setShowAutoFillButton):
1681         (WebCore::HTMLInputElement::setAutofilled): Deleted.
1682         * html/HTMLInputElement.h:
1683         (WebCore::HTMLInputElement::isAutoFilled):
1684         (WebCore::HTMLInputElement::showAutoFillButton):
1685         (WebCore::HTMLInputElement::isAutofilled): Deleted.
1686         Add new bit to represent whether the AutoFill button should be shown
1687         or not. By default it is not shown, and the client must enable it.
1688
1689         * html/InputType.cpp:
1690         (WebCore::InputType::updateAutoFillButton):
1691         * html/InputType.h:
1692         (WebCore::InputType::autoFillButtonElement):
1693         Add new virtual methods for updating and accessing the AutoFill button.
1694
1695         * html/TextFieldInputType.cpp:
1696         (WebCore::TextFieldInputType::createShadowSubtree):
1697         (WebCore::TextFieldInputType::autoFillButtonElement):
1698         (WebCore::TextFieldInputType::destroyShadowSubtree):
1699         (WebCore::TextFieldInputType::updatePlaceholderText):
1700         (WebCore::TextFieldInputType::shouldDrawAutoFillButton):
1701         (WebCore::TextFieldInputType::autoFillButtonElementWasClicked):
1702         (WebCore::TextFieldInputType::createContainer):
1703         (WebCore::TextFieldInputType::createAutoFillButton):
1704         (WebCore::TextFieldInputType::updateAutoFillButton):
1705         * html/TextFieldInputType.h:
1706         Add support for adding the AutoFill to the shadow DOM of textfields. The implementation
1707         is slightly different than for the caps lock indicator, because I didn't want to force
1708         the creation of a container for all <input> elements just in case an AutoFill button was
1709         added. Instead, if an AutoFill button is added, the container is created on the fly and
1710         the existing DOM is updated to move into it. Once a container is created, it is never
1711         removed.
1712
1713         * html/shadow/AutoFillButtonElement.cpp: Added.
1714         (WebCore::AutoFillButtonElement::create):
1715         (WebCore::AutoFillButtonElement::AutoFillButtonElement):
1716         (WebCore::AutoFillButtonElement::defaultEventHandler):
1717         * html/shadow/AutoFillButtonElement.h: Added.
1718         Add div subclass that swallows the click event and forwards it to the ChromeClient.
1719
1720         * page/ChromeClient.h:
1721         Add handleAutoFillButtonClick client function to inform WebKit that the AutoFill
1722         button was clicked.
1723
1724         * testing/Internals.cpp:
1725         (WebCore::Internals::setAutofilled):
1726         (WebCore::Internals::setShowAutoFillButton):
1727         * testing/Internals.h:
1728         * testing/Internals.idl:
1729         Expose a new internals.setShowAutoFillButton() function to allow testing
1730         of the AutoFill button from layout tests.
1731
1732         * accessibility/AccessibilityObject.cpp:
1733         (WebCore::AccessibilityObject::isValueAutofilled):
1734         * css/SelectorCheckerTestFunctions.h:
1735         (WebCore::isAutofilled):
1736         * css/StyleResolver.cpp:
1737         (WebCore::StyleResolver::canShareStyleWithControl):
1738         Update for new spelling of AutoFill.
1739
1740 2015-03-11  Geoffrey Garen  <ggaren@apple.com>
1741
1742         Refactored the JSC::Heap extra cost API for clarity and to make some known bugs more obvious
1743         https://bugs.webkit.org/show_bug.cgi?id=142589
1744
1745         Reviewed by Andreas Kling.
1746
1747         Updated for renames to JSC extra cost APIs.
1748
1749         Added FIXMEs to our 10 use cases that are currently wrong, including
1750         canvas, which is the cause of https://bugs.webkit.org/show_bug.cgi?id=142457.
1751
1752         * Modules/mediasource/SourceBuffer.cpp:
1753         (WebCore::SourceBuffer::appendBufferInternal):
1754         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
1755         (WebCore::SourceBuffer::reportExtraMemoryAllocated):
1756         (WebCore::SourceBuffer::reportExtraMemoryCost): Deleted.
1757         * Modules/mediasource/SourceBuffer.h:
1758         * bindings/js/JSDocumentCustom.cpp:
1759         (WebCore::toJS):
1760         * bindings/js/JSImageDataCustom.cpp:
1761         (WebCore::toJS):
1762         * bindings/js/JSNodeListCustom.cpp:
1763         (WebCore::createWrapper):
1764         * bindings/scripts/CodeGeneratorJS.pm:
1765         (GenerateImplementation):
1766         * dom/CollectionIndexCache.cpp:
1767         (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
1768         (WebCore::reportExtraMemoryCostForCollectionIndexCache): Deleted.
1769         * dom/CollectionIndexCache.h:
1770         (WebCore::Iterator>::computeNodeCountUpdatingListCache):
1771         * html/HTMLCanvasElement.cpp:
1772         (WebCore::HTMLCanvasElement::createImageBuffer):
1773         * html/HTMLCollection.h:
1774         (WebCore::CollectionNamedElementCache::didPopulate):
1775         * html/HTMLImageLoader.cpp:
1776         (WebCore::HTMLImageLoader::imageChanged):
1777         * html/HTMLMediaElement.cpp:
1778         (WebCore::HTMLMediaElement::parseAttribute):
1779         * xml/XMLHttpRequest.cpp:
1780         (WebCore::XMLHttpRequest::dropProtection):
1781
1782 2015-03-11  Benjamin Poulain  <bpoulain@apple.com>
1783
1784         Add basic support for BOL and EOL assertions to the URL Filter parser
1785         https://bugs.webkit.org/show_bug.cgi?id=142568
1786
1787         Reviewed by Alex Christensen.
1788
1789         This patch adds heavily restricted support for BOL and EOL to the URL filter parser.
1790
1791         Both assertions must be the first/last term of their pattern. Any advanced combination
1792         results in a parsing error.
1793
1794         The BOL assertion is easy to represent: currently, any pattern starts at the beginning
1795         of a line and the NFA are generated accordingly.
1796
1797         I had two options to represent the EOL assertion:
1798         1) Add a new special transition on EOL.
1799         2) Add a new vector of actions to the states, conditional to the EOL input.
1800
1801         I picked the first option to avoid growing every state by a vector
1802         that would be empty in the vast majority of cases.
1803
1804
1805         On the matching side, the interpreter was modified to support transitions on '\0'.
1806         DFABytecodeInstruction::CheckValue now stops when running on a character after
1807         the end of the string.
1808
1809         DFABytecodeInstruction::Jump gets two fixes: First we now account for the index
1810         to avoid going past the end of the input. Second, stop on '\0' too... the reason
1811         is that the unconditional jump is only used for fallback edges of the DFA, fallback
1812         edge are not supposed to accept '\0'.
1813
1814         * contentextensions/DFA.cpp:
1815         (WebCore::ContentExtensions::printTransitions):
1816         * contentextensions/DFABytecodeInterpreter.cpp:
1817         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1818         * contentextensions/DFANode.h:
1819         * contentextensions/NFA.cpp:
1820         (WebCore::ContentExtensions::NFA::addTransition):
1821         (WebCore::ContentExtensions::NFA::addEpsilonTransition):
1822         (WebCore::ContentExtensions::printTransitions):
1823         * contentextensions/NFANode.h:
1824         * contentextensions/NFAToDFA.cpp:
1825         (WebCore::ContentExtensions::populateTransitions):
1826         (WebCore::ContentExtensions::NFAToDFA::convert):
1827         * contentextensions/URLFilterParser.cpp:
1828         (WebCore::ContentExtensions::Term::Term):
1829         (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
1830         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
1831         (WebCore::ContentExtensions::GraphBuilder::assertionEOL):
1832         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
1833
1834 2015-03-11  Jer Noble  <jer.noble@apple.com>
1835
1836         [Mac] Update fullscreen placeholder UI to use Vibrancy.
1837         https://bugs.webkit.org/show_bug.cgi?id=142586
1838
1839         Reviewed by Eric Carlson.
1840
1841         Update the fullscreen placeholder with a translucent vibrant appearance
1842         using NSVisualEffectView. Since NSVisuaEffectView is only available for
1843         OS X 10.10 and above, wrap the new implementation in a version check and
1844         retain the old implementation.
1845
1846         Drive-by: Update the strings for the placeholder view with new HI guidance
1847         as well.
1848
1849         * English.lproj/Localizable.strings:
1850         * platform/LocalizedStrings.cpp:
1851         (WebCore::clickToExitFullScreenText):
1852         * platform/mac/WebCoreFullScreenPlaceholderView.h:
1853         * platform/mac/WebCoreFullScreenPlaceholderView.mm:
1854         (-[WebCoreFullScreenPlaceholderView setExitWarningVisible:]):
1855
1856 2015-03-11  Timothy Horton  <timothy_horton@apple.com>
1857
1858         Make it possible to zoom on pages that claim to lay out to device size and then fail to do so
1859         https://bugs.webkit.org/show_bug.cgi?id=142549
1860
1861         Reviewed by Simon Fraser.
1862
1863         * page/ViewportConfiguration.cpp:
1864         (WebCore::ViewportConfiguration::ViewportConfiguration):
1865         Rename m_ignoreScalingConstraints to m_canIgnoreScalingConstraints,
1866         because it being true does not guarantee that we will ignore scaling constraints,
1867         but it being false does guarantee that we won't.
1868
1869         (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraints):
1870         Ignore scaling constraints if the page:
1871             a) claimed to want to lay out to device-width and then laid out too wide
1872             b) claimed to want to lay out to device-height and then laid out too tall
1873             c) claimed to want to lay out with initialScale=1 and then laid out too wide
1874
1875         (WebCore::ViewportConfiguration::initialScale):
1876         (WebCore::ViewportConfiguration::minimumScale):
1877         (WebCore::ViewportConfiguration::allowsUserScaling):
1878         Call shouldIgnoreScalingConstraints() instead of looking at the local, so we can
1879         have some more logic here (as above).
1880
1881         (WebCore::ViewportConfiguration::description):
1882         Dump whether we're ignoring scaling constraints.
1883
1884         (WebCore::ViewportConfiguration::dump):
1885         Use WTFLogAlways so that the output goes to various other logging mechanisms
1886         instead of just stderr.
1887
1888         * page/ViewportConfiguration.h:
1889         (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints):
1890         (WebCore::ViewportConfiguration::setIgnoreScalingConstraints): Deleted.
1891
1892 2015-03-11  Myles C. Maxfield  <mmaxfield@apple.com>
1893
1894         Use out-of-band messaging for RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline()
1895         https://bugs.webkit.org/show_bug.cgi?id=142569
1896
1897         Reviewed by David Hyatt.
1898
1899         Currently, RenderBox::firstLineBaseline() and RenderBox::inlineBlockBaseline() return -1 to mean
1900         that its baseline should be skipped. Instead of using this sentinel value, this patch changes the
1901         return type from int to Optional<int>.
1902
1903         No new tests because there is no behavior change.
1904
1905         * rendering/RenderBlock.cpp:
1906         (WebCore::RenderBlock::baselinePosition):
1907         (WebCore::RenderBlock::firstLineBaseline):
1908         (WebCore::RenderBlock::inlineBlockBaseline):
1909         * rendering/RenderBlock.h:
1910         * rendering/RenderBlockFlow.cpp:
1911         (WebCore::RenderBlockFlow::firstLineBaseline):
1912         (WebCore::RenderBlockFlow::inlineBlockBaseline):
1913         * rendering/RenderBlockFlow.h:
1914         * rendering/RenderBox.h:
1915         (WebCore::RenderBox::firstLineBaseline):
1916         (WebCore::RenderBox::inlineBlockBaseline):
1917         * rendering/RenderDeprecatedFlexibleBox.cpp:
1918         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
1919         * rendering/RenderFlexibleBox.cpp:
1920         (WebCore::RenderFlexibleBox::baselinePosition):
1921         (WebCore::RenderFlexibleBox::firstLineBaseline):
1922         (WebCore::RenderFlexibleBox::inlineBlockBaseline):
1923         (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
1924         * rendering/RenderFlexibleBox.h:
1925         * rendering/RenderMenuList.h:
1926         * rendering/RenderTable.cpp:
1927         (WebCore::RenderTable::cellAbove):
1928         (WebCore::RenderTable::cellBelow):
1929         (WebCore::RenderTable::cellBefore):
1930         (WebCore::RenderTable::cellAfter):
1931         (WebCore::RenderTable::firstLineBlock):
1932         (WebCore::RenderTable::baselinePosition):
1933         (WebCore::RenderTable::inlineBlockBaseline):
1934         (WebCore::RenderTable::firstLineBaseline):
1935         * rendering/RenderTable.h:
1936         * rendering/RenderTableCell.cpp:
1937         (WebCore::RenderTableCell::cellBaselinePosition):
1938         * rendering/RenderTableSection.cpp:
1939         (WebCore::RenderTableSection::firstLineBaseline):
1940         * rendering/RenderTableSection.h:
1941         * rendering/RenderTextControl.h:
1942         * rendering/mathml/RenderMathMLBlock.cpp:
1943         (WebCore::RenderMathMLBlock::baselinePosition):
1944         (WebCore::RenderMathMLTable::firstLineBaseline):
1945         * rendering/mathml/RenderMathMLBlock.h:
1946         * rendering/mathml/RenderMathMLFraction.cpp:
1947         (WebCore::RenderMathMLFraction::firstLineBaseline):
1948         * rendering/mathml/RenderMathMLFraction.h:
1949         * rendering/mathml/RenderMathMLOperator.cpp:
1950         (WebCore::RenderMathMLOperator::firstLineBaseline):
1951         * rendering/mathml/RenderMathMLOperator.h:
1952         * rendering/mathml/RenderMathMLRoot.cpp:
1953         (WebCore::RenderMathMLRoot::firstLineBaseline):
1954         (WebCore::RenderMathMLRoot::layout):
1955         * rendering/mathml/RenderMathMLRoot.h:
1956         * rendering/mathml/RenderMathMLRow.cpp:
1957         (WebCore::RenderMathMLRow::layout):
1958         * rendering/mathml/RenderMathMLScripts.cpp:
1959         (WebCore::RenderMathMLScripts::layout):
1960         (WebCore::RenderMathMLScripts::firstLineBaseline):
1961         * rendering/mathml/RenderMathMLScripts.h:
1962         * rendering/mathml/RenderMathMLSpace.cpp:
1963         (WebCore::RenderMathMLSpace::firstLineBaseline):
1964         * rendering/mathml/RenderMathMLSpace.h:
1965         * rendering/mathml/RenderMathMLUnderOver.cpp:
1966         (WebCore::RenderMathMLUnderOver::firstLineBaseline):
1967         * rendering/mathml/RenderMathMLUnderOver.h:
1968
1969 2015-03-11  Timothy Horton  <timothy_horton@apple.com>
1970
1971         <attachment>s should be created when dropping files onto contentEditable areas
1972         https://bugs.webkit.org/show_bug.cgi?id=142494
1973         <rdar://problem/19982553>
1974
1975         Reviewed by Anders Carlsson.
1976
1977         Covered by existing tests.
1978
1979         * editing/mac/EditorMac.mm:
1980         (WebCore::Editor::WebContentReader::readFilenames):
1981         Instead of inserting the dropped URLs as strings, make an <attachment>
1982         for each.
1983
1984 2015-03-11  David Hyatt  <hyatt@apple.com>
1985
1986         Optimize offsetWidth and offsetHeight to avoid doing layouts.
1987         https://bugs.webkit.org/show_bug.cgi?id=142544
1988
1989         Reviewed by Beth Dakin.
1990
1991         * dom/Document.cpp:
1992         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1993         * dom/Document.h:
1994         Added a new method that only updates layout if it determines that the desired dimensions are out
1995         of date.
1996
1997         * dom/Element.cpp:
1998         (WebCore::Element::offsetWidth):
1999         (WebCore::Element::offsetHeight):
2000         Patch offsetWidth and offsetHeight to call the new method rather than updateLayoutIgnorePendingStylesheets.
2001
2002 2015-03-11  Commit Queue  <commit-queue@webkit.org>
2003
2004         Unreviewed, rolling out r181367.
2005         https://bugs.webkit.org/show_bug.cgi?id=142581
2006
2007         Caused crashes on the debug bots (Requested by cdumez on
2008         #webkit).
2009
2010         Reverted changeset:
2011
2012         "Web Inspector: CSS parser errors in the console should
2013         include column numbers"
2014         https://bugs.webkit.org/show_bug.cgi?id=114313
2015         http://trac.webkit.org/changeset/181367
2016
2017 2015-03-11  Myles C. Maxfield  <mmaxfield@apple.com>
2018
2019         Inline block children do not have correct baselines if their children are also block elements
2020         https://bugs.webkit.org/show_bug.cgi?id=142559
2021
2022         Reviewed by Darin Adler.
2023
2024         Perform the same computation on child block elements as child inline elements.
2025
2026         Test: fast/text/baseline-inline-block-block-children.html
2027
2028         * rendering/RenderBlockFlow.cpp:
2029         (WebCore::RenderBlockFlow::inlineBlockBaseline):
2030
2031 2015-03-11  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2032
2033         [CMake][GStreamer] Building EFL or GTK with ENABLE_VIDEO and without ENABLE_WEB_AUDIO is broken.
2034         https://bugs.webkit.org/show_bug.cgi?id=142577
2035
2036         Reviewed by Carlos Garcia Campos.
2037
2038         No new tests, this is a build fix.
2039
2040         * PlatformEfl.cmake: Include GSTREAMER_AUDIO_LIBRARIES on the link step both for ENABLE_VIDEO and ENABLE_WEB_AUDIO.
2041         * PlatformGTK.cmake: Idem.
2042
2043 2015-03-10  Philippe Normand  <pnormand@igalia.com>
2044
2045         Rename MediaStreamCenter to RealtimeMediaSourceCenter
2046         https://bugs.webkit.org/show_bug.cgi?id=142535
2047
2048         Reviewed by Eric Carlson.
2049
2050         As per bug title, rename MediaStreamCenter to
2051         RealtimeMediaSourceCenter, this class manages
2052         RealtimeMediaSources, not MediaStreams. Some un-needed includes of
2053         the header were also removed.
2054
2055 2015-03-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2056
2057         Remove unnecessary create() factory functions
2058         https://bugs.webkit.org/show_bug.cgi?id=142558
2059
2060         Reviewed by Darin Adler.
2061
2062         create() function which just returns new instance can be replaced with std::make_unique<>.
2063
2064         No new tests, no behavior changes.
2065
2066         * bindings/js/JSCryptoKeySerializationJWK.cpp:
2067         (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence):
2068         * crypto/keys/CryptoKeyAES.cpp:
2069         (WebCore::CryptoKeyAES::exportData):
2070         * crypto/keys/CryptoKeyDataOctetSequence.h:
2071         * crypto/keys/CryptoKeyHMAC.cpp:
2072         (WebCore::CryptoKeyHMAC::exportData):
2073         * crypto/keys/CryptoKeySerializationRaw.cpp:
2074         (WebCore::CryptoKeySerializationRaw::keyData):
2075         * platform/audio/mac/CARingBuffer.cpp:
2076         (WebCore::CARingBuffer::create): Deleted.
2077         * platform/audio/mac/CARingBuffer.h:
2078         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2079         (WebCore::AudioSourceProviderAVFObjC::prepare):
2080         * testing/Internals.cpp:
2081         (WebCore::Internals::queueMicroTask):
2082         * testing/MicroTaskTest.cpp:
2083         (WebCore::MicroTaskTest::create): Deleted.
2084         * testing/MicroTaskTest.h:
2085         (WebCore::MicroTaskTest::MicroTaskTest):
2086
2087 2015-03-10  Joseph Pecoraro  <pecoraro@apple.com>
2088
2089         Web Inspector: CSS parser errors in the console should include column numbers
2090         https://bugs.webkit.org/show_bug.cgi?id=114313
2091
2092         Reviewed by Benjamin Poulain.
2093
2094         Test: inspector-protocol/console/warnings-errors.html
2095
2096         * css/CSSParser.h:
2097         (WebCore::CSSParser::currentCharacterOffset):
2098         Get the current character offset depending on the source type.
2099         Add instance variables to track column position and start
2100         line / column for inline stylesheets.
2101
2102         * css/CSSParser.cpp:
2103         (WebCore::CSSParser::CSSParser):
2104         (WebCore::CSSParser::parseSheet):
2105         Initialize new instance variables.
2106
2107         (WebCore::CSSParser::currentLocation):
2108         Update to include column information. Also, if we are on the first line
2109         we may need to take into account a start column offset as well.
2110
2111         (WebCore::CSSParser::realLex):
2112         When bumping the line number, reset the column offset for the next
2113         line with the next character.
2114
2115         (WebCore::CSSParser::syntaxError):
2116         (WebCore::CSSParser::logError):
2117         Include column information.
2118
2119         * css/StyleSheetContents.cpp:
2120         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
2121         (WebCore::StyleSheetContents::parseString):
2122         (WebCore::StyleSheetContents::parseStringAtLineAndColumn):
2123         Include column information.
2124
2125         * css/StyleSheetContents.h:
2126         * dom/InlineStyleSheetOwner.cpp:
2127         (WebCore::InlineStyleSheetOwner::InlineStyleSheetOwner):
2128         (WebCore::InlineStyleSheetOwner::createSheet):
2129         Save and use column information later on.
2130
2131         * dom/InlineStyleSheetOwner.h:
2132         * inspector/InspectorStyleSheet.cpp:
2133         (WebCore::InspectorStyleSheet::ensureSourceData):
2134         Updated parser signature needs starting column and no longer has optional parameters.
2135
2136 2015-03-10  Darin Adler  <darin@apple.com>
2137
2138         Try to fix the GTK build.
2139
2140         * html/HTMLVideoElement.idl: Work around gobject bindings generator limitation
2141         by putting in a LANGUAGE_GOBJECT conditional.
2142
2143 2015-03-10  Darin Adler  <darin@apple.com>
2144
2145         Some event handler fixes
2146         https://bugs.webkit.org/show_bug.cgi?id=142474
2147
2148         Reviewed by Anders Carlsson.
2149
2150         * bindings/scripts/CodeGenerator.pm:
2151         (GenerateConditionalStringFromAttributeValue): Improved the algorithm here to
2152         handle combinations of & and | in conditional expressions; that's coming up when
2153         combining conditionals for includes in NavigatorContentUtils.idl.
2154
2155         * bindings/scripts/CodeGeneratorJS.pm:
2156         (AddToImplIncludes): Removed the rudimentary attempt to split and merge
2157         conditionals involving | here; instead we rely on the rules in the
2158         GenerateConditionalStringFromAttributeValue to handle this.
2159         (GenerateImplementation): Passed new "conditional" argument to JSValueToNative.
2160         (GenerateParametersCheck): Pass "conditional" argument to AddToImplIncludes and
2161         JSValueToNative.
2162         (JSValueToNative): Changed to take "conditional" as an argument, since getting
2163         it from the signature won't work for a method parameter.
2164         (WriteData): Merge duplicates based on the result of the
2165         GenerateConditionalStringFromAttributeValue function rather than on the values
2166         passed into that function, since that function converts conditionals into a
2167         canonical form and can make two strings equal that don't start out that way.
2168
2169         * bindings/scripts/CodeGeneratorObjC.pm:
2170         (SkipAttribute): Added code to guarantee we won't make Objective-C bindings
2171         for event handlers. We will rename EventListener to EventHandler in a
2172         subsequent patch.
2173
2174         * bindings/scripts/test/JS/JSTestInterface.cpp: Updated for a progression caused
2175         by the better logic for conditional includes.
2176
2177         * bindings/scripts/test/JS/JSTestObj.cpp: Updated for change to the test below.
2178         * bindings/scripts/test/TestObj.idl: Added test of an event handler attribute.
2179
2180         * dom/Document.idl: Removed unneeded language #if around event handler
2181         attributes. Removed all the commented out event handler attributes.
2182         Sorted event handler attributes into a single section rather than separating
2183         "standard" from "extensions". Sorted the conditional event handler attributes
2184         into paragraphs at the bottom. We will probably make them all unconditional
2185         in a subsequent patch.
2186
2187         * dom/Element.idl: Removed unneeded language #if around event handler
2188         attributes. Removed all the commented out event handler attributes.
2189         Moved event handler attributes here from all derived element classes to
2190         match the approach from the HTML standard. Also resorted the attributes
2191         as in Document above.
2192
2193         * html/HTMLBodyElement.idl: Removed unneeded language #if around event handler
2194         attributes. Removed all the commented out event handler attributes.
2195         Sorted event handler attributes into a single section rather than separating
2196         "standard" from "overrides".
2197
2198         * html/HTMLElement.cpp:
2199         (WebCore::HTMLElement::populateEventNameForAttributeLocalNameMap):
2200         Added a few missing attribute names, and re-sorted a bit. Moved any from
2201         element subclasses here.
2202
2203         * html/HTMLFormElement.cpp:
2204         (WebCore::HTMLFormElement::parseAttribute): Moved code to handle
2205         oncomplete and oncompleteerror to Element and HTMLElement.
2206         * html/HTMLFormElement.idl: Ditto.
2207
2208         * html/HTMLFrameSetElement.idl: Removed #if and resorted as above.
2209
2210         * html/HTMLInputElement.cpp:
2211         (WebCore::HTMLInputElement::parseAttribute): Moved code to handle
2212         onsearch to HTMLElement.
2213
2214         * html/HTMLMediaElement.cpp:
2215         (WebCore::HTMLMediaElement::parseAttribute): Moved code to handle
2216         all the event handler attributes to HTMLElement.
2217         (WebCore::HTMLMediaElement::updateCaptionContainer): Removed a redundant
2218         if statement I noticed while auditing all calls to JSC::call.
2219         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Added clearException.
2220         I noticed this was missing because a flawed earlier version of my patch was
2221         causing the script to fail, leaving an exception behind that caused an
2222         assertion later. So I audited all calls to JSC::call looking for this mistake.
2223
2224         * html/HTMLMediaElement.idl: Moved all the event handlers from here to
2225         Element. Also changed everything possible to use Conditional instead of #if.
2226
2227         * html/HTMLPlugInImageElement.cpp:
2228         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Added
2229         clearException. Noticed it was missing while auditing all calls to JSC::call.
2230
2231         * html/HTMLVideoElement.cpp:
2232         (WebCore::HTMLVideoElement::parseAttribute): Moved event handler code to
2233         HTMLElement.
2234
2235         * html/HTMLVideoElement.idl: Moved event handler to Element.idl and use
2236         Conditional instead of #if.
2237
2238         * page/DOMWindow.idl: Use Conditional instead of #if and tidy up the event
2239         handlers section.
2240
2241         * svg/svgattrs.in: Remove six unused attribute names. Presumably used in
2242         some older scheme to implement event handlers but no longer used at all.
2243
2244 2015-03-10  Brent Fulgham  <bfulgham@apple.com>
2245
2246         CSS scroll-snap-destination and scroll-snap-coordinate are not honoring position values
2247         https://bugs.webkit.org/show_bug.cgi?id=142411
2248
2249         Reviewed by Simon Fraser.
2250
2251         Tested by css3/scroll-snap/scroll-snap-position-values.html.
2252
2253         Revise the CSSParser to recognize that scroll-snap-coordinates and scroll-snap-destination
2254         may be specified as positions, therefore allowing 'top', 'bottom', and 'center' for the Y axis,
2255         and 'left', 'right', and 'center' for the X axis.
2256
2257         Correct implementation to support calculated values for Scroll Snap Point markup. This required the
2258         Scroll Snap Point-specific LengthRepeat class to change its internal representation from a CSSPrimitiveValue
2259         to a regular CSSValue.
2260
2261         Add tests that these position labels, as well as combinations with percentages and pixel offsets
2262         are parsed properly.
2263
2264         * css/CSSComputedStyleDeclaration.cpp:
2265         (WebCore::scrollSnapDestination): Switch from 'percentageOrZoomAdjustedValue' to 'zoomAdjustedPixelValueForLength'
2266         when working with Length values. This is necessary to allow calculated results to be based on the proper default
2267         page dimensions.
2268         (WebCore::scrollSnapPoints): Ditto.
2269         (WebCore::scrollSnapCoordinates): Ditto.
2270         * css/CSSParser.cpp:
2271         (WebCore::CSSParser::parseScrollSnapPositions): Consolidated code for dealing with snap point
2272         positions.
2273         (WebCore::CSSParser::parseScrollSnapDestination): Revise to call new helper function.
2274         (WebCore::CSSParser::parseScrollSnapCoordinate): Ditto.
2275         (WebCore::CSSParser::parseFillPositionX): Rename as parsePositionX.
2276         (WebCore::CSSParser::parseFillPositionY): Rename as parsePositionY.
2277         (WebCore::CSSParser::parseFillProperty): Update to call renamed parsePosition{X|Y} methods.
2278         (WebCore::CSSParser::parseTransformOrigin): Ditto.
2279         (WebCore::CSSParser::parsePerspectiveOrigin): Ditto.
2280         * css/CSSParser.h:
2281         * css/LengthRepeat.h: Revise class to use a CSSValue, rather than a CSSPrimitiveValue, so that we can represent
2282         repeat values as calculations.
2283
2284 2015-03-10  Enrica Casucci  <enrica@apple.com>
2285
2286         Add support for more emoji with variation.
2287         https://bugs.webkit.org/show_bug.cgi?id=142548
2288         rdar://problem/20105008
2289
2290         Reviewed by Tim Horton.
2291
2292         Update ICU rules to support new emoji with variation.
2293
2294         Test: editing/selection/extend-by-character-007.html
2295
2296         * platform/text/TextBreakIterator.cpp:
2297         (WebCore::cursorMovementIterator):
2298
2299 2015-03-10  Alex Christensen  <achristensen@webkit.org>
2300
2301         Use unsigned for HashSet size.
2302         https://bugs.webkit.org/show_bug.cgi?id=142518
2303
2304         Reviewed by Benjamin Poulain.
2305
2306         * Modules/websockets/WebSocketDeflateFramer.cpp:
2307         (WebCore::WebSocketExtensionDeflateFrame::processResponse):
2308         * bindings/js/SerializedScriptValue.cpp:
2309         (WebCore::CloneSerializer::checkForDuplicate):
2310         (WebCore::CloneSerializer::writeConstantPoolIndex):
2311         * dom/ScriptRunner.cpp:
2312         (WebCore::ScriptRunner::~ScriptRunner):
2313         * loader/ResourceLoadScheduler.h:
2314         * platform/graphics/Font.cpp:
2315         (WebCore::Font::systemFallbackFontForCharacter):
2316         * platform/graphics/FontCache.cpp:
2317         (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
2318         (WebCore::FontCache::purgeInactiveFontData):
2319         * platform/graphics/FontCache.h:
2320         * platform/graphics/freetype/FontCacheFreeType.cpp:
2321         (WebCore::FontCache::systemFallbackForCharacters):
2322         * platform/graphics/ios/FontCacheIOS.mm:
2323         (WebCore::FontCache::getSystemFontFallbackForCharacters):
2324         (WebCore::FontCache::systemFallbackForCharacters):
2325         (WebCore::FontCache::similarFont):
2326         * platform/graphics/mac/FontCacheMac.mm:
2327         (WebCore::shouldAutoActivateFontIfNeeded):
2328         (WebCore::FontCache::systemFallbackForCharacters):
2329         (WebCore::FontCache::similarFont):
2330         * platform/graphics/win/FontCacheWin.cpp:
2331         (WebCore::FontCache::systemFallbackForCharacters):
2332         * rendering/RenderDeprecatedFlexibleBox.cpp:
2333         (WebCore::FlexBoxIterator::next):
2334         * rendering/RenderTableSection.cpp:
2335         (WebCore::RenderTableSection::computeOverflowFromCells):
2336
2337 2015-03-10  Eric Carlson  <eric.carlson@apple.com>
2338
2339         [Mac] Refactor media controls code
2340         https://bugs.webkit.org/show_bug.cgi?id=142455
2341
2342         Reviewed by Dean Jackson.
2343
2344         No new tests, updated tests/media/hls/video-controls-live-stream-expected.txt.
2345
2346         * Modules/mediacontrols/mediaControlsApple.js:
2347         (Controller):
2348         (Controller.prototype.addVideoListeners):
2349         (Controller.prototype.removeVideoListeners):
2350         (Controller.prototype.createControls):
2351         (Controller.prototype.setControlsType):
2352         (Controller.prototype.configureInlineControls):
2353         (Controller.prototype.updateStatusDisplay):
2354         (Controller.prototype.handlePanelMouseDown):
2355         (Controller.prototype.showControls):
2356         (Controller.prototype.hideControls):
2357         (Controller.prototype.handleOptimizedFullscreenButtonClicked):
2358         (Controller.prototype.currentPlaybackTargetIsWireless):
2359         (Controller.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent):
2360         (Controller.prototype.updateWirelessPlaybackStatus):
2361         (Controller.prototype.updateWirelessTargetAvailable):
2362         (Controller.prototype.handleWirelessPickerButtonClicked):
2363         (Controller.prototype.handleWirelessPlaybackChange):
2364         (Controller.prototype.handleWirelessTargetAvailableChange):
2365         (Controller.prototype.setShouldListenForPlaybackTargetAvailabilityEvent):
2366         * Modules/mediacontrols/mediaControlsiOS.js:
2367         (ControllerIOS):
2368         (ControllerIOS.prototype.addVideoListeners):
2369         (ControllerIOS.prototype.removeVideoListeners):
2370         (ControllerIOS.prototype.createControls):
2371         (ControllerIOS.prototype.setControlsType):
2372         (ControllerIOS.prototype.configureInlineControls):
2373         (ControllerIOS.prototype.showControls):
2374         (ControllerIOS.prototype.handleWirelessPickerButtonTouchEnd):
2375         (ControllerIOS.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent):
2376         (ControllerIOS.prototype.updateStatusDisplay):
2377         (ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent):
2378         (ControllerIOS.prototype.currentPlaybackTargetIsWireless): Deleted.
2379         (ControllerIOS.prototype.updateWirelessPlaybackStatus): Deleted.
2380         (ControllerIOS.prototype.updateWirelessTargetAvailable): Deleted.
2381         (ControllerIOS.prototype.hideControls): Deleted.
2382         (ControllerIOS.prototype.handleWirelessPlaybackChange): Deleted.
2383         (ControllerIOS.prototype.handleWirelessTargetAvailableChange): Deleted.
2384
2385 2015-03-10  Said Abou-Hallawa  <sabouhallawa@apple.com>
2386
2387         Remove PassRefPtr from svg/properties classes.
2388         https://bugs.webkit.org/show_bug.cgi?id=142063.
2389
2390         Reviewed by Darin Adler.
2391         
2392         Remove PassRefPtr from svg/properties classes. All the return types and
2393         the local variables should be RefPtr. If we are sure the pointer can't
2394         be null, we use Ref instead.
2395
2396         * svg/SVGMarkerElement.cpp:
2397         (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper):
2398         (WebCore::SVGMarkerElement::orientTypeAnimated):
2399         * svg/SVGMarkerElement.h:
2400         * svg/SVGPathElement.cpp:
2401         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
2402         (WebCore::SVGPathElement::pathSegList):
2403         (WebCore::SVGPathElement::animatedPathSegList):
2404         * svg/SVGPathElement.h:
2405         * svg/SVGPolyElement.cpp:
2406         (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
2407         (WebCore::SVGPolyElement::points):
2408         (WebCore::SVGPolyElement::animatedPoints):
2409         * svg/SVGPolyElement.h:
2410         * svg/SVGTextContentElement.cpp:
2411         (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
2412         (WebCore::SVGTextContentElement::textLengthAnimated):
2413         * svg/SVGTextContentElement.h:
2414         * svg/SVGViewSpec.cpp:
2415         (WebCore::SVGViewSpec::transform):
2416         (WebCore::SVGViewSpec::viewBoxAnimated):
2417         (WebCore::SVGViewSpec::preserveAspectRatioAnimated):
2418         (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
2419         (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
2420         (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
2421         * svg/SVGViewSpec.h:
2422         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
2423         (WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
2424         * svg/properties/SVGAnimatedListPropertyTearOff.h:
2425         (WebCore::SVGAnimatedListPropertyTearOff::create):
2426         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
2427         (WebCore::SVGAnimatedPathSegListPropertyTearOff::create):
2428         * svg/properties/SVGAnimatedProperty.h:
2429         (WebCore::SVGAnimatedProperty::lookupOrCreateWrapper):
2430         * svg/properties/SVGAnimatedPropertyMacros.h:
2431         * svg/properties/SVGAnimatedPropertyTearOff.h:
2432         (WebCore::SVGAnimatedPropertyTearOff::create):
2433         * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
2434         (WebCore::SVGAnimatedStaticPropertyTearOff::create):
2435         * svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
2436         (WebCore::SVGAnimatedTransformListPropertyTearOff::create):
2437         * svg/properties/SVGListProperty.h:
2438         (WebCore::SVGListProperty::initializeValuesAndWrappers):
2439         (WebCore::SVGListProperty::getItemValuesAndWrappers):
2440         (WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
2441         (WebCore::SVGListProperty::replaceItemValuesAndWrappers):
2442         (WebCore::SVGListProperty::removeItemValuesAndWrappers):
2443         (WebCore::SVGListProperty::appendItemValuesAndWrappers):
2444         * svg/properties/SVGListPropertyTearOff.h:
2445         (WebCore::SVGListPropertyTearOff::create):
2446         (WebCore::SVGListPropertyTearOff::initialize):
2447         (WebCore::SVGListPropertyTearOff::getItem):
2448         (WebCore::SVGListPropertyTearOff::insertItemBefore):
2449         (WebCore::SVGListPropertyTearOff::replaceItem):
2450         (WebCore::SVGListPropertyTearOff::removeItem):
2451         (WebCore::SVGListPropertyTearOff::appendItem):
2452         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
2453         (WebCore::SVGPathSegListPropertyTearOff::getItem):
2454         (WebCore::SVGPathSegListPropertyTearOff::replaceItem):
2455         (WebCore::SVGPathSegListPropertyTearOff::removeItem):
2456         * svg/properties/SVGPathSegListPropertyTearOff.h:
2457         (WebCore::SVGPathSegListPropertyTearOff::create):
2458         (WebCore::SVGPathSegListPropertyTearOff::initialize):
2459         (WebCore::SVGPathSegListPropertyTearOff::insertItemBefore):
2460         (WebCore::SVGPathSegListPropertyTearOff::appendItem):
2461         * svg/properties/SVGPropertyInfo.h:
2462         * svg/properties/SVGStaticListPropertyTearOff.h:
2463         (WebCore::SVGStaticListPropertyTearOff::create):
2464         * svg/properties/SVGStaticPropertyTearOff.h:
2465         (WebCore::SVGStaticPropertyTearOff::create):
2466         * svg/properties/SVGTransformListPropertyTearOff.h:
2467         (WebCore::SVGTransformListPropertyTearOff::create):
2468         (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
2469         (WebCore::SVGTransformListPropertyTearOff::consolidate):
2470
2471 2015-03-10  Timothy Horton  <timothy_horton@apple.com>
2472
2473         Fix the build
2474
2475         * platform/network/cf/ResourceHandleCFNet.cpp:
2476         (WebCore::ResourceHandle::createCFURLConnection):
2477
2478 2015-03-10  Benjamin Poulain  <bpoulain@apple.com>
2479
2480         Extend URL filter's Term definition to support groups/subpatterns
2481         https://bugs.webkit.org/show_bug.cgi?id=142519
2482
2483         Reviewed by Alex Christensen.
2484
2485         Pretty simple extension: Term is extended to support holding
2486         a Vector of Term. The quantifier of the Term applies to its
2487         Vector of term as a whole.
2488
2489         To avoid exposing too much internal in the API of Term, I moved
2490         graph generation from GraphBuilder to Term.
2491
2492         Sinking a CharacterSet works as usual. Sinking a Group is done
2493         by sinking each of its Terms one by one and then apply the quantifier
2494         on the whole subgraph. This is done by recursively calling into
2495         Term::generateGraph().
2496
2497         Since groups could be nested, the groups make a stack with the latest
2498         open group on top.
2499         When sinking a floating Term, it is sunk to the latest open group. If there is no open
2500         group, we use the prefix tree and sink the whole subpattern to the graph.
2501
2502         * contentextensions/URLFilterParser.cpp:
2503         (WebCore::ContentExtensions::Term::Term):
2504         (WebCore::ContentExtensions::Term::extendGroupSubpattern):
2505         (WebCore::ContentExtensions::Term::generateGraph):
2506         (WebCore::ContentExtensions::Term::operator==):
2507         (WebCore::ContentExtensions::Term::hash):
2508         (WebCore::ContentExtensions::Term::isUniversalTransition):
2509         (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
2510         (WebCore::ContentExtensions::Term::destroy):
2511         (WebCore::ContentExtensions::Term::Group::operator==):
2512         (WebCore::ContentExtensions::Term::Group::hash):
2513         (WebCore::ContentExtensions::GraphBuilder::finalize):
2514         (WebCore::ContentExtensions::GraphBuilder::atomParenthesesSubpatternBegin):
2515         (WebCore::ContentExtensions::GraphBuilder::atomParenthesesEnd):
2516         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
2517         (WebCore::ContentExtensions::Term::quantifier): Deleted.
2518         (WebCore::ContentExtensions::Term::visitSimpleTransitions): Deleted.
2519         (WebCore::ContentExtensions::GraphBuilder::addTransitions): Deleted.
2520         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTerm): Deleted.
2521
2522 2015-03-10  Roger Fong  <roger_fong@apple.com>
2523
2524         Adjustments to media control fonts.
2525         https://bugs.webkit.org/show_bug.cgi?id=142509.
2526         <rdar://problem/20085228>
2527
2528         Reviewed by Darin Adler.
2529
2530         Use system font for controls. Adjust surrounding divs accordingly.
2531         Apply subpixel antialiasing to all media control text.
2532         * Modules/mediacontrols/mediaControlsApple.css:
2533         (::-webkit-media-controls):
2534         (audio::-webkit-media-controls-closed-captions-container .list):
2535         (audio::-webkit-media-controls-status-display):
2536         (audio::-webkit-media-controls-time-remaining-display):
2537         (audio::-webkit-media-controls-current-time-display):
2538         (audio::-webkit-media-controls-time-remaining-display.five-digit-time):
2539         (audio::-webkit-media-controls-current-time-display.five-digit-time):
2540         (audio::-webkit-media-controls-time-remaining-display.six-digit-time):
2541         (audio::-webkit-media-controls-current-time-display.six-digit-time):
2542
2543 2015-03-10  Dan Bernstein  <mitz@apple.com>
2544
2545         Fixed a crash in CertificateInfo::containsNonRootSHA1SignedCertificate when loading a non-HTTPS webapge.
2546
2547         Reviewed by Anders Carlsson.
2548
2549         * platform/network/mac/CertificateInfoMac.mm:
2550         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Null-check the certificate chain.
2551
2552 2015-03-10  Dan Bernstein  <mitz@apple.com>
2553
2554         Fixed the build.
2555
2556         * platform/spi/cocoa/SecuritySPI.h:
2557
2558 2015-03-10  Zalan Bujtas  <zalan@apple.com>
2559
2560         Simple line layout: Merge TextFragmentIterator::findNextBreakablePosition() and TextFragmentIterator::findNextNonWhitespacePosition().
2561         https://bugs.webkit.org/show_bug.cgi?id=142344
2562
2563         Reviewed by Antti Koivisto.
2564
2565         This patch merges findNextBreakablePosition() and findNextNonWhitespacePosition() so that
2566         the segment looping and position handling logic are no longer duplicated. It also unifies
2567         the static next*() functions' signature.
2568
2569         No change in functionality.
2570
2571         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2572         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
2573         (WebCore::SimpleLineLayout::nextBreakablePosition):
2574         (WebCore::SimpleLineLayout::nextNonWhitespacePosition):
2575         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
2576         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextBreakablePosition): Deleted.
2577         (WebCore::SimpleLineLayout::findNextNonWhitespace): Deleted.
2578         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextNonWhitespacePosition): Deleted.
2579         * rendering/SimpleLineLayoutTextFragmentIterator.h:
2580
2581 2015-03-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2582
2583         [GTK] GL_MAX_VARYING_FLOATS is not defined in OpenGL ES 2
2584         https://bugs.webkit.org/show_bug.cgi?id=142529
2585
2586         Reviewed by Žan Doberšek.
2587
2588         Do not use GL_MAX_VARYING_FLOATS when platform is GTK+ and using
2589         OpenGL ES 2.
2590
2591         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2592         (WebCore::GraphicsContext3D::checkVaryingsPacking):
2593
2594 2015-03-10  José Dapena Paz  <jdapena@igalia.com>
2595
2596         Unreviewed. Fix GTK+ build with OpenGL ES 2 enabled.
2597
2598         Remove USE(OPENGL) ifdef from GLContext.cpp, since there's nothing
2599         specific to OpenGL in that file, and everything depending on
2600         configure options is already protected by USE(GLX) and USE(EGL)
2601         ifdefs. This is causing linking issues when building with OpenGL
2602         ES 2, because the header doesn't have the ifdef, and the cpp file
2603         is not compiled leaving all the interface undefined.
2604
2605         Rubber-stamped by Carlos Garcia Campos.
2606
2607         * platform/graphics/GLContext.cpp:
2608
2609 2015-03-10  Carlos Garcia Campos  <cgarcia@igalia.com> and José Dapena Paz  <jdapena@igalia.com>
2610
2611         [GTK] Add a configure option to build with OpenGL ES 2
2612         https://bugs.webkit.org/show_bug.cgi?id=142498
2613
2614         Reviewed by Martin Robinson.
2615
2616         Build GLES or GL specific files depending on the build options.
2617
2618         * PlatformGTK.cmake:
2619
2620 2015-03-10  Zan Dobersek  <zdobersek@igalia.com>
2621
2622         Shrink the CSSPropertyID enum type
2623         https://bugs.webkit.org/show_bug.cgi?id=142456
2624
2625         Reviewed by Sam Weinig.
2626
2627         Specify uint16_t as the base type for the CSSPropertyID enum.
2628         This is enough to cover all of the CSS properties (429 at this moment,
2629         with static_assert covering future changes). It halves the enum type size,
2630         from 4 bytes to 2, reducing the size of various CSSPropertyID containers.
2631
2632         No new tests -- no change in behavior.
2633
2634         * css/CSSPrimitiveValue.cpp:
2635         (WebCore::propertyName): Remove the unnecessary propertyID < 0 check.
2636         * css/makeprop.pl:
2637
2638 2015-03-10  Dan Bernstein  <mitz@apple.com>
2639
2640         WebCore part of <rdar://problem/20086546> [Cocoa] Add an option to treat certificate chains with SHA1-signed certificates as insecure
2641         https://bugs.webkit.org/show_bug.cgi?id=142461
2642
2643         Reviewed by Sam Weinig.
2644
2645         * WebCore.xcodeproj/project.pbxproj: Added reference to SecuritySPI.h and sorted the
2646         spi/cocoa group.
2647
2648         * platform/network/cf/CertificateInfo.h: Declared new member function
2649         containsNonRootSHA1SignedCertificate.
2650
2651         * platform/network/mac/CertificateInfoMac.mm:
2652         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Added. Checks if any but
2653         the last certificate in the chain uses SHA-1 as its signature hash algorithm.
2654
2655         * platform/network/curl/CertificateInfo.h:
2656         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Added notImplemented
2657         implementation.
2658
2659         * platform/network/soup/CertificateInfo.h:
2660         (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate): Ditto.
2661
2662         * platform/spi/cocoa/SecuritySPI.h: Added.
2663
2664 2015-03-09  Chris Dumez  <cdumez@apple.com>
2665
2666         [iOS] Sweep all collected objects on critical memory pressure
2667         https://bugs.webkit.org/show_bug.cgi?id=142457
2668         <rdar://problem/20044440>
2669
2670         Reviewed by Geoffrey Garen.
2671
2672         Do a full sweep of objects marked for destruction on critical memory
2673         pressure to free up memory.
2674
2675         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2676         (WebCore::MemoryPressureHandler::platformReleaseMemory):
2677
2678 2015-03-09  Andy Estes  <aestes@apple.com>
2679
2680         [Content Filtering] Give ContentFilter subclasses private constructors, and make them fast-allocated and non-copyable
2681         https://bugs.webkit.org/show_bug.cgi?id=142515
2682
2683         Reviewed by Andreas Kling.
2684
2685         * platform/cocoa/NetworkExtensionContentFilter.h:
2686         * platform/cocoa/ParentalControlsContentFilter.h:
2687         * testing/MockContentFilter.h:
2688
2689 2015-03-09  Chris Dumez  <cdumez@apple.com>
2690
2691         [CG] Have Canvas use the IOSurfacePool
2692         https://bugs.webkit.org/show_bug.cgi?id=142417
2693         <rdar://problem/20044440>
2694
2695         Reviewed by Darin Adler.
2696
2697         Have ImageBufferDataCG use the IOSurfacePool so that Canvas can
2698         benefit from it. I see a ~75% progression on Canvas/reuse.html
2699         performance test on my Macbook Pro with 1000 different canvas
2700         sizes and ~110% progression with 100 different canvas sizes.
2701
2702         I also see a ~65% cache hit rate on the mobile version of
2703         cnn.com.
2704
2705         Note that ImageData calls CGContextClearRect() after calling
2706         IOSurface::create() so recycling IOSurfaces in this case should
2707         be safe.
2708
2709         Performance test: Canvas/reuse.html
2710
2711         * platform/graphics/ImageBuffer.h:
2712         (WebCore::ImageBuffer::baseTransform):
2713         * platform/graphics/cg/ImageBufferCG.cpp:
2714         (WebCore::ImageBuffer::ImageBuffer):
2715         (WebCore::ImageBuffer::context):
2716         (WebCore::ImageBuffer::copyImage):
2717         (WebCore::ImageBuffer::copyNativeImage):
2718         (WebCore::ImageBuffer::draw):
2719         (WebCore::ImageBuffer::clip):
2720         (WebCore::ImageBuffer::putByteArray):
2721         (WebCore::ImageBuffer::toDataURL):
2722         * platform/graphics/cg/ImageBufferDataCG.cpp:
2723         (WebCore::ImageBufferData::~ImageBufferData):
2724         (WebCore::ImageBufferData::getData):
2725         (WebCore::ImageBufferData::putData):
2726         (WebCore::ImageBufferData::ImageBufferData): Deleted.
2727         * platform/graphics/cg/ImageBufferDataCG.h:
2728         * platform/graphics/cocoa/IOSurface.h:
2729         * platform/graphics/cocoa/IOSurface.mm:
2730         (IOSurface::surfaceFromPool):
2731         (IOSurface::create):
2732         (IOSurface::createFromSendRight):
2733         (IOSurface::createFromImage):
2734         (IOSurface::setContextSize):
2735
2736 2015-03-09  Brent Fulgham  <bfulgham@apple.com>
2737
2738         Assertion in ScrollController::processWheelEventForScrollSnapOnAxis when scrolling with mechanical wheel mouse
2739         https://bugs.webkit.org/show_bug.cgi?id=142517
2740
2741         Reviewed by Simon Fraser.
2742
2743         * platform/cocoa/ScrollController.mm:
2744         (WebCore::toWheelEventStatus): Recognize stateless mechanical wheel events.
2745         (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): If a mechanical wheel event is processed while
2746         considering scroll snap logic, end any snap animations and clean up.
2747         (WebCore::ScrollController::updateScrollSnapPoints): Don't begin tracking scroll snap state if there is not
2748         scroll snap point defined in the markup.
2749
2750 2015-03-09  Myles C. Maxfield  <mmaxfield@apple.com>
2751
2752         REGRESSION(r176978): Inline-blocks with overflowing contents have ascents that are too large
2753         https://bugs.webkit.org/show_bug.cgi?id=141783
2754
2755         Reviewed by David Hyatt.
2756
2757         When we have an inline-block element, and we want to find its baseline (to lay out other
2758         elements on the same line) we loop through the element's children and ask them what their
2759         baselines are. The children use the location of the top of their last line to compute this
2760         value. However, if the child has overflow-y, this might not be the correct calculation.
2761
2762         This behavior is in the spec: "The baseline of an 'inline-block' is the baseline of its last
2763         line box in the normal flow, unless it has either no in-flow line boxes or if its 'overflow'
2764         property has a computed value other than 'visible', in which case the baseline is the bottom
2765         margin edge."
2766             -- http://www.w3.org/TR/CSS21/visudet.html#leading
2767
2768         However, we believe that a better policy is, when overflow is not "visible," to place the
2769         baseline at the bottom of the block if the contents overflowed in the Y direction, and to place
2770         it at the bottom of the last line if the contents did not overflow in the Y direction. This is
2771         partially consistent with previous behavior, and isn't too far from the spec to cause too many
2772         breakages.
2773
2774         Test: fast/css/inline-block-tricky-baselines.html
2775               fast/text/baseline-inline-block.html
2776
2777         * rendering/RenderBlockFlow.cpp:
2778         (WebCore::RenderBlockFlow::inlineBlockBaseline):
2779
2780 2015-03-09  Andy Estes  <aestes@apple.com>
2781
2782         [Content Filtering] Add tests
2783         https://bugs.webkit.org/show_bug.cgi?id=142475
2784
2785         Reviewed by Andreas Kling.
2786
2787         Added a mock content filter that can be configured by window.internals. A test can control whether the filter
2788         is enabled, what to display when a page is blocked, at what point the allow/block decision is made, and what
2789         decision to make.
2790
2791         Added tests to cover allowing and blocking content at each decision point.
2792
2793         Tests: contentfiltering/allow-after-add-data.html
2794                contentfiltering/allow-after-finished-adding-data.html
2795                contentfiltering/allow-after-response.html
2796                contentfiltering/block-after-add-data.html
2797                contentfiltering/block-after-finished-adding-data.html
2798                contentfiltering/block-after-response.html
2799
2800         * DerivedSources.make: Added MockContentFilterSettings.idl.
2801         * WebCore.xcodeproj/project.pbxproj:
2802         * bindings/js/JSMockContentFilterSettingsCustom.cpp: Added.
2803         (WebCore::JSMockContentFilterSettings::decisionPoint): Returned the decision point's JSValue.
2804         (WebCore::JSMockContentFilterSettings::setDecisionPoint): Set the decision point; threw an exception for invalid values.
2805         (WebCore::JSMockContentFilterSettings::decision): Returned the decision's JSValue.
2806         (WebCore::JSMockContentFilterSettings::setDecision): Set the decision; threw an exception for invalid values.
2807         * platform/ContentFilter.cpp:
2808         (WebCore::ContentFilter::types): Renamed from contentFilterTypes.
2809         (WebCore::ContentFilter::createIfNeeded):
2810         (WebCore::contentFilterType): Deleted.
2811         (WebCore::contentFilterTypes): Deleted.
2812         * platform/ContentFilter.h:
2813         (WebCore::ContentFilter::addType): Used to register a new content filter type.
2814         (WebCore::ContentFilter::type): Renamed from contentFilterType.
2815         * platform/cocoa/NetworkExtensionContentFilter.h: Moved definition of HAVE_NE_FILTER_SOURCE to here.
2816         * testing/Internals.cpp:
2817         (WebCore::Internals::resetToConsistentState): Called MockContentFilterSettings::reset().
2818         (WebCore::Internals::Internals): Called MockContentFilter::ensureInstalled().
2819         (WebCore::Internals::mockContentFilterSettings): Returned a reference to MockContentFilterSettings::singleton().
2820         * testing/Internals.h:
2821         * testing/Internals.idl: Added attribute mockContentFilterSettings.
2822         * testing/MockContentFilter.cpp: Added.
2823         (WebCore::MockContentFilter::ensureInstalled): Called MockContentFilter::addType().
2824         (WebCore::MockContentFilter::canHandleResponse): Returned whether MockContentFilterSettings is enabled.
2825         (WebCore::MockContentFilter::create): Returned a new MockContentFilter.
2826         (WebCore::MockContentFilter::MockContentFilter): Called maybeDetermineStatus().
2827         (WebCore::MockContentFilter::addData): Copied data into m_replacementData and called maybeDetermineStatus().
2828         (WebCore::MockContentFilter::finishedAddingData): Called maybeDetermineStatus().
2829         (WebCore::MockContentFilter::needsMoreData): Returned whether m_status equals NeedsMoreData.
2830         (WebCore::MockContentFilter::didBlockData): Returned whether m_status equals Blocked.
2831         (WebCore::MockContentFilter::getReplacementData): Returned a pointer to the start of m_replacementData.
2832         (WebCore::MockContentFilter::unblockHandler): Returned an empty ContentFilterUnblockHandler.
2833         (WebCore::MockContentFilter::maybeDetermineStatus): If m_status is NeedsMoreData and the current decision point
2834         equals MockContentFilterSettings's decision point, set m_status according to MockContentFilterSettings's
2835         decision. If m_status becomes Blocked, clear the original page data from m_replacementData and copy
2836         MockContentFilterSettings's blocked string instead.
2837         * testing/MockContentFilter.h: Copied from Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h.
2838         * testing/MockContentFilterSettings.cpp: Copied from Source/WebCore/platform/ContentFilter.h.
2839         (WebCore::MockContentFilterSettings::singleton):
2840         (WebCore::MockContentFilterSettings::reset): Reset settings to their initial values.
2841         (WebCore::MockContentFilterSettings::MockContentFilterSettings):
2842         * testing/MockContentFilterSettings.h: Copied from Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h.
2843         (WebCore::MockContentFilterSettings::ref): Added an empty implementation to make the bindings think this is RefCounted.
2844         (WebCore::MockContentFilterSettings::deref): Ditto.
2845         (WebCore::MockContentFilterSettings::enabled):
2846         (WebCore::MockContentFilterSettings::setEnabled):
2847         (WebCore::MockContentFilterSettings::blockedString):
2848         (WebCore::MockContentFilterSettings::setBlockedString):
2849         (WebCore::MockContentFilterSettings::decisionPoint):
2850         (WebCore::MockContentFilterSettings::setDecisionPoint):
2851         (WebCore::MockContentFilterSettings::decision):
2852         (WebCore::MockContentFilterSettings::setDecision):
2853         * testing/MockContentFilterSettings.idl: Copied from Source/WebCore/platform/ContentFilter.h.
2854
2855 2015-03-09  Zalan Bujtas  <zalan@apple.com>
2856
2857         Simple line layout should not be limited to RenderText.
2858         https://bugs.webkit.org/show_bug.cgi?id=142504
2859
2860         Reviewed by Antti Koivisto.
2861
2862         This is in transition to support br element.
2863
2864         No change in functionality.
2865
2866         * rendering/RenderText.cpp:
2867         (WebCore::RenderText::absoluteRects):
2868         (WebCore::RenderText::absoluteQuadsClippedToEllipsis):
2869         (WebCore::RenderText::absoluteQuads):
2870         (WebCore::RenderText::firstRunLocation):
2871         (WebCore::RenderText::linesBoundingBox):
2872         (WebCore::RenderText::caretMinOffset):
2873         (WebCore::RenderText::caretMaxOffset):
2874         (WebCore::RenderText::containsCaretOffset):
2875         * rendering/SimpleLineLayoutFlowContents.cpp:
2876         (WebCore::SimpleLineLayout::FlowContents::segmentForRenderer):
2877         * rendering/SimpleLineLayoutFlowContents.h:
2878         * rendering/SimpleLineLayoutFunctions.cpp:
2879         (WebCore::SimpleLineLayout::computeBoundingBox):
2880         (WebCore::SimpleLineLayout::computeFirstRunLocation):
2881         (WebCore::SimpleLineLayout::collectAbsoluteRects):
2882         (WebCore::SimpleLineLayout::collectAbsoluteQuads):
2883         (WebCore::SimpleLineLayout::computeTextBoundingBox): Deleted.
2884         (WebCore::SimpleLineLayout::computeTextFirstRunLocation): Deleted.
2885         (WebCore::SimpleLineLayout::collectTextAbsoluteRects): Deleted.
2886         (WebCore::SimpleLineLayout::collectTextAbsoluteQuads): Deleted.
2887         * rendering/SimpleLineLayoutFunctions.h:
2888         (WebCore::SimpleLineLayout::findCaretMinimumOffset):
2889         (WebCore::SimpleLineLayout::findCaretMaximumOffset):
2890         (WebCore::SimpleLineLayout::containsCaretOffset):
2891         (WebCore::SimpleLineLayout::findTextCaretMinimumOffset): Deleted.
2892         (WebCore::SimpleLineLayout::findTextCaretMaximumOffset): Deleted.
2893         (WebCore::SimpleLineLayout::containsTextCaretOffset): Deleted.
2894         * rendering/SimpleLineLayoutResolver.cpp:
2895         (WebCore::SimpleLineLayout::RunResolver::Run::text):
2896         (WebCore::SimpleLineLayout::RunResolver::rangeForRenderer):
2897         * rendering/SimpleLineLayoutResolver.h:
2898         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2899         (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
2900
2901 2015-03-09  Myles C. Maxfield  <mmaxfield@apple.com>
2902
2903         svg/custom/svg-fonts-without-missing-glyph.xhtml fails after fonts/font-fallback-prefers-pictographs.html
2904         https://bugs.webkit.org/show_bug.cgi?id=142470
2905
2906         Reviewed by Anders Carlsson.
2907
2908         After each test, reset all internal settings.
2909
2910         Covered by svg/custom/svg-fonts-without-missing-glyph.xhtml
2911
2912         * testing/InternalSettings.cpp:
2913         (WebCore::InternalSettings::Backup::Backup):
2914         (WebCore::InternalSettings::Backup::restoreTo):
2915         * testing/InternalSettings.h:
2916
2917 2015-03-09  Commit Queue  <commit-queue@webkit.org>
2918
2919         Unreviewed, rolling out r181268.
2920         https://bugs.webkit.org/show_bug.cgi?id=142508
2921
2922         Broke tests (Requested by ap on #webkit).
2923
2924         Reverted changeset:
2925
2926         "Simple line layout: Merge
2927         TextFragmentIterator::findNextBreakablePosition() and
2928         TextFragmentIterator::findNextNonWhitespacePosition()."
2929         https://bugs.webkit.org/show_bug.cgi?id=142344
2930         http://trac.webkit.org/changeset/181268
2931
2932 2015-03-09  Benjamin Poulain  <benjamin@webkit.org>
2933
2934         CSS JIT: add aliases between :nth-child()/:nth-last-child() and :first-child/:last-child
2935         https://bugs.webkit.org/show_bug.cgi?id=142472
2936
2937         Reviewed by Andreas Kling.
2938
2939         The pseudo class :first-child has weaker tree marking than :nth-child(1).
2940         This patch aliases :nth-child(1) to :first-child in the CSS JIT to take
2941         advantage of that.
2942
2943         The strength of :last-child and :nth-last-child(1) are pretty much identical
2944         but :last-child is a bit simpler so I changed it too. It is also easier
2945         to handle both the same.
2946
2947         Tests: fast/selectors/nth-child-matching-first-on-root.html
2948                fast/selectors/nth-child-matching-first.html
2949                fast/selectors/nth-last-child-matching-first-on-root.html
2950                fast/selectors/nth-last-child-matching-first.html
2951
2952         * cssjit/SelectorCompiler.cpp:
2953         (WebCore::SelectorCompiler::addNthChildType):
2954         (WebCore::SelectorCompiler::addPseudoClassType):
2955
2956 2015-03-09  Benjamin Poulain  <bpoulain@apple.com>
2957
2958         Merge TrivialAtom and CharacterSet into a Term abstraction, prepare Term for composition
2959         https://bugs.webkit.org/show_bug.cgi?id=142429
2960
2961         Reviewed by Darin Adler.
2962
2963         This patch merges CharacterSet and Trivial atom into a new class: Term. A Term is
2964         a combination of an Atom and one Quantifier.
2965
2966         With term being the basic block, we can use the PrefixTree for any construct,
2967         greatly reducing the size of the NFA graph.
2968
2969         Term is built on top of an union holding the Atom storage. This is done in preparation
2970         for more complicated Atoms like a disjunction.
2971
2972         Everything else is pretty much the same. BuildMode is gone since we use the prefix
2973         tree for everything. FloatingAtomType is gone, a TrivialAtom is now represented
2974         by a single character CharacterSet (or two for case insensitive).
2975
2976         * contentextensions/ContentExtensionParser.cpp:
2977         (WebCore::ContentExtensions::parseRuleList):
2978         * contentextensions/NFA.cpp:
2979         (WebCore::ContentExtensions::NFA::addRuleId):
2980         * contentextensions/URLFilterParser.cpp:
2981         (WebCore::ContentExtensions::Term::Term):
2982         (WebCore::ContentExtensions::Term::~Term):
2983         (WebCore::ContentExtensions::Term::isValid):
2984         (WebCore::ContentExtensions::Term::addCharacter):
2985         (WebCore::ContentExtensions::Term::quantify):
2986         (WebCore::ContentExtensions::Term::quantifier):
2987         (WebCore::ContentExtensions::Term::isUniversalTransition):
2988         (WebCore::ContentExtensions::Term::visitSimpleTransitions):
2989         (WebCore::ContentExtensions::Term::operator=):
2990         (WebCore::ContentExtensions::Term::operator==):
2991         (WebCore::ContentExtensions::Term::hash):
2992         (WebCore::ContentExtensions::Term::isEmptyValue):
2993         (WebCore::ContentExtensions::Term::isDeletedValue):
2994         (WebCore::ContentExtensions::Term::destroy):
2995         (WebCore::ContentExtensions::Term::CharacterSet::operator==):
2996         (WebCore::ContentExtensions::Term::CharacterSet::hash):
2997         (WebCore::ContentExtensions::TermHash::hash):
2998         (WebCore::ContentExtensions::TermHash::equal):
2999         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
3000         (WebCore::ContentExtensions::GraphBuilder::finalize):
3001         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
3002         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
3003         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
3004         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBegin):
3005         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
3006         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
3007         (WebCore::ContentExtensions::GraphBuilder::addTransitions):
3008         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTerm):
3009         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
3010         (WebCore::ContentExtensions::URLFilterParser::URLFilterParser):
3011         (WebCore::ContentExtensions::URLFilterParser::~URLFilterParser):
3012         (WebCore::ContentExtensions::URLFilterParser::addPattern):
3013         (WebCore::ContentExtensions::trivialAtomFromASCIICharacter): Deleted.
3014         (WebCore::ContentExtensions::quantifyTrivialAtom): Deleted.
3015         (WebCore::ContentExtensions::trivialAtomQuantifier): Deleted.
3016         (WebCore::ContentExtensions::trivialAtomForNewlineClassIDBuiltin): Deleted.
3017         (WebCore::ContentExtensions::GraphBuilder::sinkAtom): Deleted.
3018         (WebCore::ContentExtensions::GraphBuilder::generateTransition): Deleted.
3019         (WebCore::ContentExtensions::GraphBuilder::sinkTrivialAtom): Deleted.
3020         (WebCore::ContentExtensions::GraphBuilder::sinkCharacterSet): Deleted.
3021         (WebCore::ContentExtensions::GraphBuilder::sinkPendingAtomIfNecessary): Deleted.
3022         * contentextensions/URLFilterParser.h:
3023
3024 2015-03-09  Csaba Osztrogonác  <ossy@webkit.org>
3025
3026         Fix the !ENABLE(WEBGL) build after r180609
3027         https://bugs.webkit.org/show_bug.cgi?id=142057
3028
3029         Reviewed by Darin Adler.
3030
3031         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3032         (WebCore::GraphicsContext3D::forceContextLost):
3033
3034 2015-03-09  Myles C. Maxfield  <mmaxfield@apple.com>
3035
3036         Work around a Cocoa font parsing bug
3037         https://bugs.webkit.org/show_bug.cgi?id=142446
3038         <rdar://problem/20086223>
3039
3040         Reviewed by Simon Fraser.
3041
3042         Work around a bug in Cocoa regarding font parsing.
3043
3044         * svg/SVGToOTFFontConversion.cpp:
3045
3046 2015-03-09  Csaba Osztrogonác  <ossy@webkit.org>
3047
3048         Fix the build after r181153
3049         https://bugs.webkit.org/show_bug.cgi?id=142497
3050
3051         Reviewed by Philippe Normand.
3052
3053         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3054         (WebCore::MediaPlayerPrivateGStreamer::load):
3055
3056 2015-03-09  Roger Fong  <roger_fong@apple.com>
3057
3058         Only call showControls if controls are hidden.
3059         https://bugs.webkit.org/show_bug.cgi?id=142496.
3060         <rdar://problem/20083732>
3061
3062         Reviewed by Dean Jackson.
3063
3064         * Modules/mediacontrols/mediaControlsApple.js:
3065         (Controller.prototype.handleWrapperMouseMove):
3066         (Controller.prototype.controlsAreHidden):
3067         Controls are hidden if the ‘show’ class name is not present,
3068         not if the ‘hidden’ class name is.
3069
3070 2015-03-09  Roger Fong  <roger_fong@apple.com>
3071
3072         Unreviewed. Re-add CSS property that was unintentionally removed in r180893
3073         <rdar://problem/20083715>
3074
3075         * Modules/mediacontrols/mediaControlsApple.css:
3076         (audio::-webkit-media-controls-panel):
3077
3078 2015-03-09  Zalan Bujtas  <zalan@apple.com>
3079
3080         Simple line layout: Merge TextFragmentIterator::findNextBreakablePosition() and TextFragmentIterator::findNextNonWhitespacePosition().
3081         https://bugs.webkit.org/show_bug.cgi?id=142344
3082
3083         Reviewed by Antti Koivisto.
3084
3085         This patch merges findNextBreakablePosition() and findNextNonWhitespacePosition() so that
3086         the segment looping and position handling logic are no longer duplicated. It also unifies
3087         the static next*() functions' signature.
3088
3089         No change in functionality.
3090
3091         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3092         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
3093         (WebCore::SimpleLineLayout::nextBreakablePosition):
3094         (WebCore::SimpleLineLayout::nextNonWhitespacePosition):
3095         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
3096         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextBreakablePosition): Deleted.
3097         (WebCore::SimpleLineLayout::findNextNonWhitespace): Deleted.
3098         (WebCore::SimpleLineLayout::TextFragmentIterator::findNextNonWhitespacePosition): Deleted.
3099         * rendering/SimpleLineLayoutTextFragmentIterator.h:
3100
3101 2015-03-09  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
3102
3103         ReadableStreamJSSource should use JSC::Strong UnspecifiedBoolType operator
3104         https://bugs.webkit.org/show_bug.cgi?id=142397
3105
3106         Reviewed by Benjamin Poulain.
3107
3108         No behavior change. Current tests cover the changes.
3109
3110         * bindings/js/ReadableStreamJSSource.cpp:
3111         * bindings/js/ReadableStreamJSSource.h:
3112
3113 2015-03-09  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
3114
3115         ReadableStream does not not need to pass itself as callback parameter
3116         https://bugs.webkit.org/show_bug.cgi?id=142399
3117
3118         Reviewed by Darin Adler.
3119
3120         No change in behavior.
3121
3122         * Modules/streams/ReadableStream.h: Remove ReadableStream parameter from SuccessCallback definition.
3123         * bindings/js/JSReadableStreamCustom.cpp:
3124         (WebCore::JSReadableStream::ready): Capture JSReadableStream instance instead.
3125         (WebCore::JSReadableStream::closed): Capture JSReadableStream instance instead.
3126
3127 2015-03-08  Dean Jackson  <dino@apple.com>
3128
3129         [iOS Media] Video buffer progress missing on iPhones
3130         https://bugs.webkit.org/show_bug.cgi?id=142462
3131
3132         Reviewed by Eric Carlson.
3133
3134         The fullscreen controller on the iPhone idiom was using
3135         the media duration as its maximum loaded time, meaning the
3136         download progress was missing (it looked like everything
3137         was already downloaded). The fix is to calculate
3138         what the maximum buffered time is from the HTMLMediaElement,
3139         and send that to the fullscreen controller.
3140
3141         * Modules/mediacontrols/mediaControlsiOS.js:
3142         (ControllerIOS.prototype.drawTimelineBackground): While implementing
3143         the native function I noticed that the JS controls forgot that
3144         the buffered time ranges are ordered, and thus they don't need
3145         to search through the array. The last range will be the highest.
3146
3147         * html/HTMLMediaElement.cpp:
3148         (WebCore::HTMLMediaElement::maxBufferedTime): New helper function
3149         to calculate the highest buffered time in the media source.
3150         * html/HTMLMediaElement.h:
3151
3152         * platform/ios/WebVideoFullscreenInterface.h: New setBufferedTime method.
3153         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
3154
3155         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3156         (WebVideoFullscreenInterfaceAVKit::setDuration): No longer set
3157         the loadedTimeRanges.
3158         (WebVideoFullscreenInterfaceAVKit::setBufferedTime): Calculate a normalized
3159         value of the maximum loaded/buffered time, and tell the platform controller
3160         to show that range.
3161
3162         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
3163         (WebVideoFullscreenModelVideoElement::updateForEventName): Send the maximum
3164         buffered time.
3165
3166 2015-03-08  Chris Dumez  <cdumez@apple.com>
3167
3168         Crash in WebCore::NotificationCenter::stop()
3169         https://bugs.webkit.org/show_bug.cgi?id=142444
3170         <rdar://problem/20082520>
3171
3172         Reviewed by Darin Adler.
3173
3174         Rework the patch in r181219 so that we do not need a Ref<NotificationCenter> protector
3175         in NotificationCenter::stop(). Instead, we put the client in a local variable and null
3176         out m_client *before* calling NotificationClient::clearNotifications().
3177
3178         No new tests, already covered by:
3179         http/tests/notifications/event-listener-crash.html
3180
3181         * Modules/notifications/NotificationCenter.cpp:
3182         (WebCore::NotificationCenter::stop):
3183
3184 2015-03-08  Simon Fraser  <simon.fraser@apple.com>
3185
3186         Don't call RenderLayerCompositor::needsToBeComposited() so many times
3187         https://bugs.webkit.org/show_bug.cgi?id=142441
3188
3189         Reviewed by Brent Fulgham.
3190
3191         Save one call to needsToBeComposited() per RenderLayer while rebuilding compositing
3192         layers, and a call to isRunningAcceleratedTransformAnimation() in some cases.
3193         
3194         computeCompositingRequirements() already knows if the layer will be composited, so
3195         pass that to updateBacking() in the form of a "yes/no/don't" know enum. However,
3196         since updateBacking() no longer calls needsToBeComposited(), we need to call 
3197         requiresCompositingForPosition() to get the viewportConstrainedNotCompositedReason flags.
3198         
3199         isRunningAcceleratedTransformAnimation() will only be true for a layer which has a
3200         direct compositing reason, so only call isRunningAcceleratedTransformAnimation()
3201         in that case.
3202         
3203         * rendering/RenderLayerCompositor.cpp:
3204         (WebCore::rendererForCompositingTests):
3205         (WebCore::RenderLayerCompositor::updateBacking):
3206         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3207         (WebCore::RenderLayerCompositor::requiresCompositingLayer): Use references.
3208         (WebCore::RenderLayerCompositor::reasonsForCompositing): Use references.
3209         * rendering/RenderLayerCompositor.h:
3210
3211 2015-03-08  Simon Fraser  <simon.fraser@apple.com>
3212
3213         In RenderLayerCompositor, track layer bounds and the haveComputedBounds flag together in a struct
3214         https://bugs.webkit.org/show_bug.cgi?id=142449
3215
3216         Reviewed by Brent Fulgham.
3217         
3218         Rather than tracking 'layerBounds' and 'haveComputedBounds' separately, group them together
3219         in an OverlapExtent struct and add a function to compute the bounds, which removes
3220         a copy of this code. OverlapExtent will be extended in a future patch.
3221
3222         No behavior change.
3223
3224         * rendering/RenderLayerCompositor.cpp:
3225         (WebCore::RenderLayerCompositor::OverlapMap::geometryMap): Allow const access to
3226         the geometryMap, used by computeExtent().
3227         (WebCore::RenderLayerCompositor::computeExtent):
3228         (WebCore::RenderLayerCompositor::addToOverlapMap):
3229         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
3230         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3231         * rendering/RenderLayerCompositor.h:
3232
3233 2015-03-07  Chris Dumez  <cdumez@apple.com>
3234
3235         Crash in WebCore::NotificationCenter::stop()
3236         https://bugs.webkit.org/show_bug.cgi?id=142444
3237         <rdar://problem/20082520>
3238
3239         Reviewed by Andreas Kling.
3240
3241         A use-after-free would sometimes cause us to crash in NotificationCenter::stop().
3242         After investigation, it turns out that NotificationCenter::stop() calls
3243         NotificationClient::clearNotifications() which will destroy the Notification
3244         objects, all of which hold a strong reference to the NotificationCenter. If at
3245         this point, only Notifications are ref'ing the NotificationCenter, this means
3246         that the NotificationCenter will get destroyed right after the call to
3247         NotificationClient::clearNotifications(). However, we reset m_client to null
3248         after calling clearNotifications() and it causes us to crash in this case.
3249
3250         The issue is addressed by adding a Ref<NotificationCenter> protector in
3251         NotificationCenter::stop() so that we make sure the NotificationCenter lives
3252         at least until the end of the method execution.
3253
3254         I was able to consistently reproduce the crash by doing:
3255         Tools/Scripts/run-webkit-tests -1 --debug --repeat-each=30 -g http/tests/notifications/event-listener-crash.html
3256
3257         No new tests, already covered by:
3258         http/tests/notifications/event-listener-crash.html
3259
3260         * Modules/notifications/NotificationCenter.cpp:
3261         (WebCore::NotificationCenter::stop):
3262
3263 2015-03-07  Simon Fraser  <simon.fraser@apple.com>
3264
3265         Tidy up RenderLayerCompositor's CompositingState
3266         https://bugs.webkit.org/show_bug.cgi?id=142445
3267
3268         Reviewed by Dan Bernstein.
3269         
3270         Make CompositingState a private struct in RenderLayerCompositor.
3271         Since it's a struct, remove the m_ prefix from its data members.
3272
3273         No behavior change.
3274
3275         * rendering/RenderLayerCompositor.cpp:
3276         (WebCore::RenderLayerCompositor::CompositingState::CompositingState):
3277         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3278         (WebCore::CompositingState::CompositingState): Deleted.
3279         * rendering/RenderLayerCompositor.h:
3280
3281 2015-03-07  Darin Adler  <darin@apple.com>
3282
3283         Unindent EventTarget, EventListener, JSEventLister.h files
3284         https://bugs.webkit.org/show_bug.cgi?id=142440
3285
3286         Reviewed by Alexey Proskuryakov.
3287
3288         * bindings/js/JSEventListener.h:
3289         * dom/EventListener.h:
3290         * dom/EventTarget.h:
3291         Change indentation to match coding style rules.
3292
3293 2015-03-07  Geoffrey Garen  <ggaren@apple.com>
3294
3295         Use FastMalloc (bmalloc) instead of BlockAllocator for GC pages
3296         https://bugs.webkit.org/show_bug.cgi?id=140900
3297
3298         Reviewed by Mark Hahnenberg.
3299
3300         Re-landing just the removal of BlockAllocator, which is now unused.
3301
3302         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3303         (WebCore::MemoryPressureHandler::install):
3304
3305 2015-03-07  Commit Queue  <commit-queue@webkit.org>
3306
3307         Unreviewed, rolling out r181010.
3308         https://bugs.webkit.org/show_bug.cgi?id=142442
3309
3310         Broke media/video-src-invalid-poster.html (Requested by kling
3311         on #webkit).
3312
3313         Reverted changeset:
3314
3315         "Stale entries in WeakGCMaps are keeping tons of WeakBlocks
3316         alive unnecessarily."
3317         https://bugs.webkit.org/show_bug.cgi?id=142115
3318         http://trac.webkit.org/changeset/181010
3319
3320 2015-03-07  Darin Adler  <darin@apple.com>
3321
3322         Do a bit of EventNames tidying
3323         https://bugs.webkit.org/show_bug.cgi?id=142438
3324
3325         Reviewed by Anders Carlsson.
3326
3327         * dom/EventNames.h: Sorted the event names into a single list instead of
3328         the rudimentary attempts at organizing the list that simply made it hard
3329         to see what is and is not in the list. Removed two unused event names.
3330         I'm sure there are more. Reorganized the EventName class, now a struct,
3331         into a more conventional "public first" order. Got the function bodies
3332         out of the struct so we can see more clearly what is in the struct.
3333         Made more things const.
3334         (WebCore::EventNames::touchEventNames): Changed the return value to a
3335         std::array of reference wrappers rather than a vector of atomic strings.
3336         This should eliminate unnecessary memory allocation and reference count churn.
3337
3338         * dom/EventNames.cpp: Changed initialization based on the above.
3339
3340         * dom/EventTarget.cpp:
3341         (WebCore::EventTarget::getEventListeners): Use NeverDestroyed instead of
3342         DEPRECATED_DEFINE_LOCAL and also just tightened up the function a bit.
3343
3344         * dom/Node.cpp:
3345         (WebCore::Node::didMoveToNewDocument): Streamlined this function with
3346         modern for loops, auto, and also tried to make what it does a bit clearer,
3347         by making loops that are just based on numbers of event listeners look a
3348         bit less like code that actually iterates a vector of listeners. Also used
3349         the type unsigned instead of size_t.
3350
3351         * platform/ThreadGlobalData.h: Updated since it's a struct instead of class now.
3352         (Why is this file in platform!?)
3353
3354 2015-03-07  Brent Fulgham  <bfulgham@apple.com>
3355
3356         [Win] Increase TestWebKitAPI Test Coverage
3357         https://bugs.webkit.org/show_bug.cgi?id=142433
3358
3359         Reviewed by Darin Adler.
3360
3361         Correct some build deficiencies that prevent TestWebKitAPI
3362         from executing certain tests on Windows.
3363
3364         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy the interpreter
3365         headers.
3366         * css/CSSParser.h: Export necessary symbols
3367         * css/CSSParserMode.h: Ditto.
3368         * css/StyleProperties.h: Ditto.
3369
3370 2015-03-07  David Kilzer  <ddkilzer@apple.com>
3371
3372         Rename SOFT_LINK_FRAMEWORK_{HEADER,SOURCE} to SOFT_LINK_FRAMEWORK_FOR_{HEADER,SOURCE}
3373         <http://webkit.org/b/142434>
3374
3375         Reviewed by Darin Adler.
3376
3377         * platform/cf/CoreMediaSoftLink.cpp:
3378         * platform/cf/CoreMediaSoftLink.h:
3379         * platform/cf/MediaAccessibilitySoftLink.cpp:
3380         * platform/cf/MediaAccessibilitySoftLink.h:
3381         * platform/mac/SoftLinking.h:
3382         * platform/win/SoftLinking.h:
3383         - Do the rename.
3384
3385 2015-03-06  Sam Weinig  <sam@webkit.org>
3386
3387         [Content Extensions] Move compiling of content extensions to the UIProcess
3388         https://bugs.webkit.org/show_bug.cgi?id=142402
3389
3390         Reviewed by Benjamin Poulain.
3391
3392         * contentextensions/CompiledContentExtension.cpp:
3393         (WebCore::ContentExtensions::CompiledContentExtension::~CompiledContentExtension):
3394         (WebCore::ContentExtensions::CompiledContentExtension::create): Deleted.
3395         (WebCore::ContentExtensions::CompiledContentExtension::CompiledContentExtension): Deleted.
3396         * contentextensions/CompiledContentExtension.h:
3397         (WebCore::ContentExtensions::CompiledContentExtension::bytecode): Deleted.
3398         (WebCore::ContentExtensions::CompiledContentExtension::actions): Deleted.
3399         Convert CompiledContentExtension to be an abstract base class so that we can back it however
3400         we like at the WebKit level. Since it doesn't necessarily use Vectors for its backing store
3401         any more, change the interface to use pointer/length.
3402
3403         * contentextensions/ContentExtensionCompiler.cpp:
3404         (WebCore::ContentExtensions::compileRuleList):
3405         * contentextensions/ContentExtensionCompiler.h:
3406         Change compileRuleList to return compiled result as the raw Vectors rather than as
3407         a CompiledContentExtension, since that class is now abstract. It is up to the caller
3408         to copy the data into its final home.
3409
3410         * contentextensions/ContentExtensionRule.cpp:
3411         (WebCore::ContentExtensions::Action::deserialize):
3412         * contentextensions/ContentExtensionRule.h:
3413         Switch Action::deserialize to take pointer/length rather than a Vector.
3414
3415         * contentextensions/ContentExtensionsBackend.cpp:
3416         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
3417         Pull getting the serialized actions from the compiled extension out of the loop
3418         to avoid calling the virtual function multiple times. Pass the bytecode and actions
3419         as pointer/length pairs rather than Vectors.
3420
3421         * contentextensions/DFABytecodeInterpreter.cpp:
3422         (WebCore::ContentExtensions::getBits):
3423         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
3424         * contentextensions/DFABytecodeInterpreter.h:
3425         (WebCore::ContentExtensions::DFABytecodeInterpreter::DFABytecodeInterpreter):
3426         Switch the interpreter to take pointer/length rather than a Vector.
3427
3428         * page/UserContentController.cpp:
3429         (WebCore::UserContentController::addUserContentExtension):
3430         (WebCore::UserContentController::removeUserContentExtension):
3431         (WebCore::UserContentController::removeAllUserContentExtensions):
3432         (WebCore::UserContentController::addUserContentFilter): Deleted.
3433         (WebCore::UserContentController::removeUserContentFilter): Deleted.
3434         (WebCore::UserContentController::removeAllUserContentFilters): Deleted.
3435         * page/UserContentController.h:
3436         Unify terminology to use the term UserContentExtension rather than UserContentFilter.
3437
3438 2015-03-06  Roger Fong  <roger_fong@apple.com>
3439
3440         Create new buttons for media controls on OSX.
3441         https://bugs.webkit.org/show_bug.cgi?id=142415.
3442         <rdar://problem/20019441>
3443
3444         Reviewed by Eric Carlson.
3445
3446         * Modules/mediacontrols/mediaControlsApple.css:
3447         (audio::-webkit-media-controls-wireless-playback-picker-button):
3448         (audio::-webkit-media-controls-wireless-playback-picker-button.playing):
3449         (audio:-webkit-full-screen::-webkit-media-controls-wireless-playback-picker-button):
3450
3451 2015-03-06  Roger Fong  <roger_fong@apple.com>
3452
3453         Redraw timeline background when updating media time.
3454         https://bugs.webkit.org/show_bug.cgi?id=142421.
3455         <rdar://problem/20065104>
3456
3457         Reviewed by Brent Fulgham.
3458
3459         * Modules/mediacontrols/mediaControlsApple.js:
3460         (Controller.prototype.handleTimeUpdate):
3461
3462 2015-03-06  Dhi Aurrahman  <diorahman@rockybars.com>
3463
3464         Enable selectors level 4's :lang() by default
3465         https://bugs.webkit.org/show_bug.cgi?id=142302
3466
3467         Reviewed by Benjamin Poulain.
3468
3469         No behavior change.
3470
3471         * css/CSSGrammar.y.in:
3472         * css/CSSParser.cpp:
3473         (WebCore::CSSParser::detectFunctionTypeToken):
3474         * css/CSSParserValues.cpp:
3475         (WebCore::CSSParserSelector::setLangArgumentList):
3476         * css/CSSParserValues.h:
3477         * css/CSSSelector.cpp:
3478         (WebCore::appendLangArgumentList):
3479         (WebCore::CSSSelector::selectorText):
3480         (WebCore::CSSSelector::setLangArgumentList):
3481         * css/CSSSelector.h:
3482         * css/SelectorChecker.cpp:
3483         (WebCore::SelectorChecker::checkOne):
3484         * css/SelectorCheckerTestFunctions.h:
3485         (WebCore::matchesLangPseudoClass):
3486         (WebCore::matchesLangPseudoClassDeprecated): Deleted.
3487         * cssjit/SelectorCompiler.cpp:
3488         (WebCore::SelectorCompiler::addPseudoClassType):
3489         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3490         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
3491
3492 2015-03-06  Brent Fulgham  <bfulgham@apple.com>
3493
3494         Setting scroll-snap-desination to (100% 100%) locks up WebKit
3495         https://bugs.webkit.org/show_bug.cgi?id=142414
3496         <rdar://problem/20077275>
3497
3498         Reviewed by Dean Jackson.
3499
3500         Tested by css3/scroll-snap/scroll-snap-desination-lock-up.html.
3501
3502         Correct an infinite loop that is triggered when you combine a repeating (100%)
3503         scroll-snap-point-{x,y} along with a 100% scroll-snap-destination value.
3504
3505         * page/scrolling/AxisScrollSnapOffsets.cpp:
3506         (WebCore::updateFromStyle): Make sure we break out of the loop properly when
3507         the scroll-snap-point-{x,y} step is the same as the scroll-snap-destination.
3508
3509 2015-03-06  Dean Jackson  <dino@apple.com>
3510
3511         https://bugs.webkit.org/show_bug.cgi?id=142416
3512
3513         Unreviewed build fix.
3514
3515         * platform/spi/cocoa/QuartzCoreSPI.h: Add kCAFilterPlusL.
3516
3517 2015-03-06  Dean Jackson  <dino@apple.com>
3518
3519         Support "plus-lighter" in mix-blend mode
3520         https://bugs.webkit.org/show_bug.cgi?id=142416
3521         <rdar://problem/19993979>
3522
3523         Reviewed by Darin Adler and Sam Weinig.
3524
3525         Support the "plus-lighter" blending mode to CSS.
3526         See my reply to: https://lists.w3.org/Archives/Public/public-fx/2015JanMar/0021.html
3527
3528         Test: css3/blending/svg-blend-plus-lighter.html
3529
3530         * css/CSSParser.cpp:
3531         (WebCore::isValidKeywordPropertyAndValue): mix-blend-mode can now accept the
3532         new keyword.
3533         * css/CSSPrimitiveValueMappings.h: Add the mappings to/from the GraphicsType.
3534         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3535         (WebCore::CSSPrimitiveValue::operator BlendMode):
3536         * css/CSSValueKeywords.in: Add comment to show plus-darker and plus-lighter
3537         are available.
3538         * platform/graphics/GraphicsTypes.cpp: New GraphicsType for PlusLighter.
3539         * platform/graphics/GraphicsTypes.h:
3540         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Map to the CA filter.
3541         (PlatformCAFilters::setBlendingFiltersOnLayer):
3542         * platform/graphics/cg/GraphicsContextCG.cpp:
3543         (WebCore::GraphicsContext::setPlatformCompositeOperation): Map to the CG
3544         blending flag.
3545
3546 2015-03-06  Alex Christensen  <achristensen@webkit.org>
3547
3548         Soft link MediaAccessibility using new macros.
3549         https://bugs.webkit.org/show_bug.cgi?id=142406
3550
3551         Reviewed by David Kilzer.
3552
3553         * Configurations/WebCore.unexp:
3554         * WebCore.vcxproj/WebCore.vcxproj:
3555         * WebCore.vcxproj/WebCore.vcxproj.filters:
3556         * WebCore.xcodeproj/project.pbxproj:
3557         * page/CaptionUserPreferencesMediaAF.cpp:
3558         * platform/cf/MediaAccessibilitySoftLink.cpp: Added.
3559         * platform/cf/MediaAccessibilitySoftLink.h: Added.
3560
3561 2015-03-06  Brent Fulgham  <bfulgham@apple.com>
3562
3563         Add 'initial' keyword support for scroll snap CSS properties
3564         https://bugs.webkit.org/show_bug.cgi?id=136345
3565         <rdar://problem/18162325>
3566
3567         Reviewed by Dean Jackson.
3568
3569         Tested by css3/scroll-snap/scroll-snap-initial.html
3570
3571         The existing implementation already had 'initial' keyword support, but did not fully follow
3572         the CSS specification. In particular, the 'initial' state for the scroll-snap-points-x and
3573         scroll-snap-points-y properties was not handled correctly.
3574
3575         Revise implementation to represent ScrollSnapPoints as a pointer, so that 'none' is a valid
3576         state.
3577
3578         * css/CSSComputedStyleDeclaration.cpp:
3579         (WebCore::scrollSnapPoints): If 'points' is null, return CSSValueNone.
3580         * css/CSSPropertyNames.in: Provide custom initial/inherit handles for snap point x/y sets.
3581         * css/StyleBuilderConverter.h:
3582         (WebCore::StyleBuilderConverter::convertScrollSnapPoints): Update to represent ScrollSnapPoints
3583         as a pointer.
3584         * css/StyleBuilderCustom.h:
3585         (WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsX): Provide custom pointer-based
3586         implementation for ScrollSnapPoints.
3587         (WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsX): Ditto.
3588         (WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsY): Ditto.
3589         (WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsY): Ditto."
3590         * page/scrolling/AxisScrollSnapOffsets.cpp:
3591         (WebCore::updateFromStyle): Handle ScrollSnapPoints as pointers.
3592         (WebCore::updateSnapOffsetsForScrollableArea): Ditto.
3593         * rendering/style/RenderStyle.cpp:
3594         (WebCore::RenderStyle::scrollSnapPointsX): Update to use pointer-based representation of ScrollSnapPoints.
3595         (WebCore::RenderStyle::scrollSnapPointsY): Ditto.
3596         (WebCore::RenderStyle::setScrollSnapPointsX): Ditto.
3597         (WebCore::RenderStyle::setScrollSnapPointsY): Ditto.
3598         (WebCore::RenderStyle::initialScrollSnapPointsX): Deleted.
3599         (WebCore::RenderStyle::initialScrollSnapPointsY): Deleted.
3600         * rendering/style/RenderStyle.h:
3601         * rendering/style/StyleScrollSnapPoints.cpp:
3602         (WebCore::StyleScrollSnapPoints::StyleScrollSnapPoints): Revise constructor to handle pointer argument.
3603         * rendering/style/StyleScrollSnapPoints.h:
3604
3605 2015-03-05  Roger Fong  <roger_fong@apple.com>
3606
3607         Reskin Captions button and container on OSX.
3608         https://bugs.webkit.org/show_bug.cgi?id=142383.
3609         <rdar://problem/20061466>
3610
3611         Reviewed by Eric Carlson.
3612
3613         * Modules/mediacontrols/mediaControlsApple.css:
3614         (audio::-webkit-media-controls-toggle-closed-captions-button): Create new captions button icon.
3615         Update caption container to match rest of media controls better.
3616         (audio::-webkit-media-controls-closed-captions-container):
3617         (audio::-webkit-media-controls-closed-captions-container .list):
3618         (audio::-webkit-media-controls-closed-captions-container h3):
3619         (audio::-webkit-media-controls-closed-captions-container ul):
3620         (audio::-webkit-media-controls-closed-captions-container li):
3621         (audio::-webkit-media-controls-closed-captions-container li:focus):
3622         (audio::-webkit-media-controls-closed-captions-container li:hover):
3623         Fix up some fonts to make fonts between captions, status display and time displays consistent.
3624         (audio::-webkit-media-controls-status-display):
3625         (audio::-webkit-media-controls-time-remaining-display):
3626
3627 2015-03-06  Jer Noble  <jer.noble@apple.com>
3628
3629         [Web Audio] Decoding specific .m4a file crashes tab
3630         https://bugs.webkit.org/show_bug.cgi?id=139545
3631
3632         Reviewed by Eric Carlson.
3633
3634         Test: webaudio/decode-audio-data-too-short.html
3635
3636         Bail out early if CoreAudio reports the number of frames in the file to be negative.
3637
3638         * platform/audio/mac/AudioFileReaderMac.cpp:
3639         (WebCore::AudioFileReader::createBus):
3640
3641 2015-03-06  Jeremy Jones  <jeremyj@apple.com>
3642
3643         Scroll to make the video element visible when exiting fullscreen.
3644         https://bugs.webkit.org/show_bug.cgi?id=141439
3645
3646         Reviewed by Simon Fraser.
3647
3648         This patch will scroll the element so it is visible when exiting fullscreen,
3649         but only if the element is completely scrolled off screen.
3650         Also update the element screen rect so exit animation goes to the correct location.
3651
3652         * dom/Element.cpp:
3653         (WebCore::Element::scrollIntoViewIfNotVisible): Added.
3654         * dom/Element.h: Add declaration for scrollIntoViewIfNotVisible.
3655         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
3656         (-[WebVideoFullscreenController fullscreenMayReturnToInline]):
3657         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
3658         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3659         (-[WebAVPlayerController playerViewController:restoreUserInterfaceForOptimizedFullscreenStopWithCompletionHandler:]):
3660         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]):
3661         (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
3662         (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal):
3663         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
3664         (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):
3665         (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
3666         (WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline):
3667         * rendering/ScrollBehavior.cpp:
3668         * rendering/ScrollBehavior.h:
3669
3670 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
3671
3672         Crash in -[WebCascadeList objectAtIndex:] + 195
3673         https://bugs.webkit.org/show_bug.cgi?id=141274
3674
3675         Reviewed by David Kilzer.
3676
3677         CTFontDescriptorRefs can live forever in caches inside CoreText, which means our
3678         WebCascadeList can too.
3679
3680         Test: platform/mac/fast/text/crash-complextextcontroller-custom-cascade-list.html
3681
3682         * platform/graphics/FontCascade.cpp:
3683         (WebCore::FontCascade::FontCascade): Initialize WeakPtrFactory.
3684         * platform/graphics/FontCascade.h:
3685         (WebCore::FontCascade::createWeakPtr):
3686         * platform/graphics/mac/ComplexTextControllerCoreText.mm: Migrate the raw pointer
3687         to WeakPtr.
3688         (-[WebCascadeList initWithFont:character:]):
3689         (-[WebCascadeList count]):
3690         (-[WebCascadeList objectAtIndex:]):
3691
3692 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
3693
3694         Rename BreakingContextInlineHeaders.h to BreakingContext.h
3695         https://bugs.webkit.org/show_bug.cgi?id=142404
3696
3697         Reviewed by Simon Fraser.
3698
3699         No point naming it "InlineHeaders" when there are no non-inline-headers files.
3700
3701         No new tests because this is just a rename of a file.
3702
3703         * WebCore.vcxproj/WebCore.vcxproj:
3704         * WebCore.vcxproj/WebCore.vcxproj.filters:
3705         * WebCore.xcodeproj/project.pbxproj:
3706         * rendering/RenderBlockLineLayout.cpp:
3707         * rendering/line/BreakingContext.h: Renamed from Source/WebCore/rendering/line/BreakingContextInlineHeaders.h.
3708         (WebCore::WordMeasurement::WordMeasurement):
3709         (WebCore::BreakingContext::BreakingContext):
3710         (WebCore::BreakingContext::currentObject):
3711         (WebCore::BreakingContext::lineBreak):
3712         (WebCore::BreakingContext::lineWidth):
3713         (WebCore::BreakingContext::atEnd):
3714         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
3715         (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
3716         (WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory):
3717         (WebCore::BreakingContext::InlineIteratorHistory::push):
3718         (WebCore::BreakingContext::InlineIteratorHistory::update):
3719         (WebCore::BreakingContext::InlineIteratorHistory::renderer):
3720         (WebCore::BreakingContext::InlineIteratorHistory::offset):
3721         (WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator):
3722         (WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode):
3723         (WebCore::BreakingContext::InlineIteratorHistory::get):
3724         (WebCore::BreakingContext::InlineIteratorHistory::current):
3725         (WebCore::BreakingContext::InlineIteratorHistory::historyLength):
3726         (WebCore::BreakingContext::InlineIteratorHistory::moveTo):
3727         (WebCore::BreakingContext::InlineIteratorHistory::increment):
3728         (WebCore::BreakingContext::InlineIteratorHistory::clear):
3729         (WebCore::BreakingContext::initializeForCurrentObject):
3730         (WebCore::BreakingContext::increment):
3731         (WebCore::BreakingContext::handleBR):
3732         (WebCore::borderPaddingMarginStart):
3733         (WebCore::borderPaddingMarginEnd):
3734         (WebCore::shouldAddBorderPaddingMargin):
3735         (WebCore::previousInFlowSibling):
3736         (WebCore::inlineLogicalWidth):
3737         (WebCore::BreakingContext::handleOutOfFlowPositioned):
3738         (WebCore::BreakingContext::handleFloat):
3739         (WebCore::shouldSkipWhitespaceAfterStartObject):
3740         (WebCore::BreakingContext::handleEmptyInline):
3741         (WebCore::BreakingContext::handleReplaced):
3742         (WebCore::firstPositiveWidth):
3743         (WebCore::iteratorIsBeyondEndOfRenderCombineText):
3744         (WebCore::nextCharacter):
3745         (WebCore::updateCounterIfNeeded):
3746         (WebCore::measureHyphenWidth):
3747         (WebCore::textWidth):
3748         (WebCore::ensureCharacterGetsLineBox):
3749         (WebCore::tryHyphenating):
3750         (WebCore::BreakingContext::handleText):
3751         (WebCore::textBeginsWithBreakablePosition):
3752         (WebCore::BreakingContext::canBreakAtThisPosition):
3753         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
3754         (WebCore::checkMidpoints):
3755         (WebCore::BreakingContext::handleEndOfLine):
3756         (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
3757         * rendering/line/LineBreaker.cpp:
3758
3759 2015-03-06  Dan Bernstein  <mitz@apple.com>
3760
3761         Expose some of the functionality of extract-localizable-strings.pl as a module
3762         https://bugs.webkit.org/show_bug.cgi?id=142038
3763
3764         Reviewed by Sam Weinig.
3765
3766         * LocalizableStrings.pm: Copied from Source/WebCore/extract-localizable-strings.pl.
3767         (setTreatWarningsAsErrors): Added this setter for the variable moved here.
3768         (sawError): Added a getter.
3769         (emitError): Added. Emits the error message and sets $sawError.
3770         (unescapeHexSequence): Moved from extract-localizable-strings.pl and renamed to start with
3771         a lowercase letter.
3772         (keyCollisionCount): Added this getter.
3773         (localizedCount): Added this getter.
3774         (HandleUIString): Moved from extract-localizable-strings.pl and made it increment the
3775         localized string count.
3776         (writeStringsFile): Moved code from extract-localizable-strings.pl into this new subroutine.
3777         (verifyStringsFile): Ditto.
3778
3779         * WebCore.xcodeproj/project.pbxproj: Added LocalizableStrings.pm to the Copy Scripts build
3780         phase.
3781
3782         * extract-localizable-strings.pl:
3783         (emitWarning): Moved to the module.
3784         (UnescapeHexSequence): Ditto.
3785         (HandleUIString): Ditto.
3786
3787 2015-03-06  Darin Adler  <darin@apple.com>
3788
3789         Remove unused C++ DOM event handler attribute functions
3790         https://bugs.webkit.org/show_bug.cgi?id=142398
3791
3792         Reviewed by Anders Carlsson.
3793
3794         * dom/EventTarget.h: Removed now-unneeded macros: DEFINE_ATTRIBUTE_EVENT_LISTENER,
3795         DECLARE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER, DEFINE_VIRTUAL_ATTRIBUTE_EVENT_LISTENER,
3796         DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER, DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER,
3797         DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER, DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER.
3798
3799         * Modules/webaudio/AudioScheduledSourceNode.cpp:
3800         (WebCore::AudioScheduledSourceNode::setOnended): Deleted.
3801         (WebCore::AudioScheduledSourceNode::finish): Rewrote this to use dispatchEvent
3802         instead of one-off event-sending code. Also use a lambda to avoid needing two
3803         additional member functions to implement this.
3804         (WebCore::AudioScheduledSourceNode::notifyEndedDispatch): Deleted.
3805         (WebCore::AudioScheduledSourceNode::notifyEnded): Deleted.
3806         * Modules/webaudio/AudioScheduledSourceNode.h: Updated for above.
3807
3808         * Modules/battery/BatteryManager.h: Removed onxxx and setOnxxx functions,
3809         including ones created with macros from EventTarget.h.
3810         * Modules/encryptedmedia/MediaKeySession.h: Ditto.
3811         * Modules/indexeddb/IDBDatabase.h: Ditto.
3812         * Modules/indexeddb/IDBOpenDBRequest.h: Ditto.
3813         * Modules/indexeddb/IDBRequest.h: Ditto.
3814         * Modules/indexeddb/IDBTransaction.h: Ditto.
3815         * Modules/mediastream/MediaStream.h: Ditto.
3816         * Modules/mediastream/MediaStreamTrack.h: Ditto.
3817         * Modules/mediastream/RTCDTMFSender.h: Ditto.
3818         * Modules/mediastream/RTCDataChannel.h: Ditto.
3819         * Modules/mediastream/RTCPeerConnection.h: Ditto.
3820         * Modules/notifications/Notification.h: Ditto.
3821         * Modules/speech/SpeechSynthesisUtterance.h: Ditto.
3822         * Modules/webaudio/AudioContext.h: Ditto.
3823         * Modules/webaudio/ScriptProcessorNode.cpp: Ditto.
3824         * Modules/webaudio/ScriptProcessorNode.h: Ditto.
3825         * Modules/websockets/WebSocket.h: Ditto.
3826         * css/FontLoader.h: Ditto.
3827         * dom/Document.h: Ditto.
3828         * dom/Element.cpp: Ditto.
3829         * dom/Element.h: Ditto.
3830         * dom/MessagePort.h: Ditto.
3831         * fileapi/FileReader.h: Ditto.
3832         * html/HTMLBodyElement.h: Ditto.
3833         * html/HTMLFormElement.h: Ditto.
3834         * html/HTMLFrameSetElement.h: Ditto.
3835         * html/HTMLInputElement.h: Ditto.
3836         * html/HTMLMediaElement.h: Ditto.
3837         * html/HTMLVideoElement.h: Ditto.
3838         * html/track/TextTrack.h: Ditto.
3839         * html/track/TextTrackCue.h: Ditto.
3840         * html/track/TrackListBase.h: Ditto.
3841         * loader/appcache/DOMApplicationCache.h: Ditto.
3842         * page/DOMWindow.h: Ditto.
3843         * page/EventSource.h: Ditto.
3844         * page/Performance.h: Ditto.
3845         * workers/AbstractWorker.h: Ditto.
3846         * workers/DedicatedWorkerGlobalScope.h: Ditto.
3847         * workers/Worker.h: Ditto.
3848         * workers/WorkerGlobalScope.h: Ditto.
3849         * xml/XMLHttpRequest.h: Ditto.
3850         * xml/XMLHttpRequestUpload.h: Ditto.
3851
3852 2015-03-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
3853
3854         Setting any of the <object> element plugin controlling attributes does not have any affect.
3855         https://bugs.webkit.org/show_bug.cgi?id=141936.
3856
3857         Reviewed by Simon Fraser.
3858         
3859         When setting any of the <object> element plugin controlling attributes
3860         dynamically we need to mark the the element to be dirty by calling
3861         setNeedsStyleRecalc(), so it has to recreate its renderer when needed.
3862
3863         Tests: fast/css/image-object-hover-inherit.html
3864                svg/as-object/svg-in-object-dynamic-attribute-change.html
3865
3866         * dom/Element.h: Delete unimplemented function.
3867         
3868         * html/HTMLObjectElement.cpp:
3869         (WebCore::HTMLObjectElement::parseAttribute): Mark the element dirty by
3870         calling setNeedsStyleRecalc() when one of the plugin controlling attributes
3871         gets changed. We have to clear m_useFallbackContent because the attribute's
3872         new value might fix the object rendering.
3873         
3874         * html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.
3875
3876 2015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
3877
3878         Test horiz-origin-x and horiz-origin-y in SVG fonts
3879         https://bugs.webkit.org/show_bug.cgi?id=142403
3880
3881         Reviewed by Simon Fraser.
3882
3883         Remove incorrect comment.
3884
3885         Test: svg/fonts/svg-font-horiz-origin.html
3886
3887         * svg/SVGToOTFFontConversion.cpp:
3888         (WebCore::CFFBuilder::CFFBuilder):
3889
3890 2015-03-06  Simon Fraser  <simon.fraser@apple.com>
3891
3892         Allow tree dumping functions to be used in release builds by switching a flag
3893         https://bugs.webkit.org/show_bug.cgi?id=142379
3894
3895         Reviewed by Zalan Bujtas.
3896
3897         There are various tree dumping functions that are useful for debugging, and sometimes
3898         you want to be able to use them in release builds. Currently they are surrounded by
3899         #ifndef NDEBUG. Change this to #if ENABLE(TREE_DEBUGGING), which is defined to 0 or 1
3900         in wtf/Platform.h
3901
3902         * dom/DocumentMarkerController.cpp:
3903         * dom/DocumentMarkerController.h:
3904         * dom/Element.cpp:
3905         * dom/Element.h:
3906         * dom/Node.cpp:
3907         * dom/Node.h:
3908         * dom/Position.cpp:
3909         * dom/Position.h:
3910         * dom/Range.cpp:
3911         * dom/Range.h:
3912         * dom/Text.cpp:
3913         * dom/Text.h:
3914         * editing/FrameSelection.cpp:
3915         * editing/FrameSelection.h:
3916         * editing/VisiblePosition.cpp:
3917         * editing/VisiblePosition.h:
3918         * editing/VisibleSelection.cpp:
3919         * editing/VisibleSelection.h:
3920         * html/parser/HTMLElementStack.cpp:
3921         * html/parser/HTMLFormattingElementList.cpp:
3922         * rendering/CounterNode.cpp:
3923         * rendering/CounterNode.h:
3924         * rendering/InlineBox.cpp:
3925         * rendering/InlineBox.h:
3926         * rendering/InlineFlowBox.cpp:
3927         * rendering/InlineFlowBox.h:
3928         * rendering/InlineTextBox.cpp:
3929         * rendering/InlineTextBox.h:
3930         * rendering/RenderBlockFlow.cpp:
3931         * rendering/RenderBlockFlow.h:
3932         * rendering/RenderCounter.cpp:
3933         * rendering/RenderCounter.h:
3934         * rendering/RenderLayer.cpp:
3935         * rendering/RenderLayer.h:
3936         * rendering/RenderLayerBacking.cpp:
3937         (WebCore::RenderLayerBacking::createGraphicsLayer):
3938         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
3939         (WebCore::RenderLayerBacking::updateForegroundLayer):
3940         (WebCore::RenderLayerBacking::updateBackgroundLayer):
3941         * rendering/RenderLayerCompositor.cpp:
3942         (WebCore::CompositingState::CompositingState):
3943         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
3944         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
3945         (WebCore::RenderLayerCompositor::updateLayerForHeader):
3946         (WebCore::RenderLayerCompositor::updateLayerForFooter):
3947         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
3948         (WebCore::RenderLayerCompositor::ensureRootLayer):
3949         * rendering/RenderObject.cpp:
3950         * rendering/RenderObject.h:
3951         * rendering/RootInlineBox.cpp:
3952         * rendering/RootInlineBox.h:
3953         * rendering/SimpleLineLayoutFunctions.cpp:
3954         * rendering/SimpleLineLayoutFunctions.h:
3955         * rendering/svg/SVGResources.cpp:
3956         * rendering/svg/SVGResources.h:
3957
3958 2015-03-06  Said Abou-Hallawa  <sabouhallawa@apple.com>