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