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