3ff8e03381a476a29fe9a2e7aeb3936fcac77fd3
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-06-02  Anders Carlsson  <andersca@apple.com>
2
3         Use UUIDs for WebSQL database filenames instead of a sequential number
4         https://bugs.webkit.org/show_bug.cgi?id=145571
5
6         Reviewed by Dan Bernstein.
7
8         This is a first step towards getting rid of the iOS specific code path where we truncate
9         database files instead of deleting them (in order to avoid file corruption).
10
11         * Modules/webdatabase/DatabaseTracker.cpp:
12         (WebCore::generateDatabaseFileName):
13         (WebCore::DatabaseTracker::fullPathForDatabaseNoLock):
14         * platform/sql/SQLiteFileSystem.cpp:
15         (WebCore::SQLiteFileSystem::getFileNameForNewDatabase): Deleted.
16         * platform/sql/SQLiteFileSystem.h:
17
18 2015-06-02  Dean Jackson  <dino@apple.com>
19
20         Crash in GraphicsContext3D::getInternalFramebufferSize
21         https://bugs.webkit.org/show_bug.cgi?id=145479
22         <rdar://problem/16461048>
23
24         Reviewed by Eric Carlson.
25
26         If we are in an unitialized or lost state, don't try to access the context.
27
28         In order to test this, I added an Internal setting that always
29         forces WebGL into a pending state.
30
31         Test: fast/canvas/webgl/useWhilePending.html
32
33         * html/canvas/WebGLRenderingContextBase.cpp:
34         (WebCore::WebGLRenderingContextBase::create): Check internal settings for
35         a forced pending state.
36         (WebCore::WebGLRenderingContextBase::drawingBufferWidth): Guard against a pending state.
37         (WebCore::WebGLRenderingContextBase::drawingBufferHeight): Ditto.
38         * page/Settings.cpp: New Internal setting for forcing a pending policy.
39         (WebCore::Settings::Settings):
40         (WebCore::Settings::setForcePendingWebGLPolicy):
41         * page/Settings.h:
42         (WebCore::Settings::isForcePendingWebGLPolicy):
43         * testing/InternalSettings.cpp:
44         (WebCore::InternalSettings::Backup::Backup):
45         (WebCore::InternalSettings::Backup::restoreTo):
46         (WebCore::InternalSettings::setForcePendingWebGLPolicy):
47         * testing/InternalSettings.h:
48         * testing/InternalSettings.idl:
49
50 2015-06-02  Matt Rajca  <mrajca@apple.com>
51
52         Added a stub implementation of MediaSession, part of the Media Session spec.
53         https://bugs.webkit.org/show_bug.cgi?id=145530
54
55         Reviewed by Eric Carlson.
56
57         * CMakeLists.txt: Added new MediaSession sources.
58         * DerivedSources.make:
59         * Modules/mediasession/MediaSession.cpp: Added stub implementation.
60         (WebCore::MediaSession::MediaSession): Per the Media Session spec, a Media Remote Controls object should only be
61           set for 'content' sessions; it is null otherwise.
62         (WebCore::MediaSession::~MediaSession):
63         (WebCore::MediaSession::controls):
64         (WebCore::MediaSession::releaseSession):
65         * Modules/mediasession/MediaSession.h: Added basic translation of IDL file.
66         * Modules/mediasession/MediaSession.idl: Added from the Media Session spec.
67         * WebCore.xcodeproj/project.pbxproj: Added new MediaSession sources.
68
69 2015-06-02  Zalan Bujtas  <zalan@apple.com>
70
71         Backdrop filter is pulling in content from behind the window.
72         https://bugs.webkit.org/show_bug.cgi?id=145561
73         rdar://problem/20909309
74
75         Reviewed by Simon Fraser.
76
77         This patch ensures that the backdrop filter layer is positioned and sized properly.
78
79         The backdrop filter layer should take its size and position from its renderer and not
80         directly from the composited layer.
81         In certain cases the composited layer's size is expanded to cover items like box shadow or an absolute positioned descendant.
82         In such cases, we ended up applying the backdrop filter to those areas as well.
83
84         Tests: css3/filters/backdrop/backdrop-filter-does-not-size-properly-absolute.html
85                css3/filters/backdrop/backdrop-filter-does-not-size-properly-border-and-padding.html
86
87         * platform/graphics/GraphicsLayer.h:
88         (WebCore::GraphicsLayer::setBackdropFiltersRect):
89         (WebCore::GraphicsLayer::backdropFiltersRect):
90         * platform/graphics/ca/GraphicsLayerCA.cpp:
91         (WebCore::GraphicsLayerCA::setBackdropFiltersRect):
92         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
93         (WebCore::GraphicsLayerCA::updateBackdropFilters):
94         (WebCore::GraphicsLayerCA::updateBackdropFiltersRect):
95         (WebCore::GraphicsLayerCA::updateContentsRects):
96         (WebCore::GraphicsLayerCA::updateGeometry): Deleted.
97         * platform/graphics/ca/GraphicsLayerCA.h:
98         * rendering/RenderLayerBacking.cpp:
99         (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry):
100         (WebCore::RenderLayerBacking::updateGeometry):
101         * rendering/RenderLayerBacking.h:
102
103 2015-06-02  Eric Carlson  <eric.carlson@apple.com>
104
105         [Mac] occasional crash in Document::playbackTargetAvailabilityDidChange
106         https://bugs.webkit.org/show_bug.cgi?id=145559
107
108         Reviewed by Darin Adler.
109
110         No new tests, covered by existing tests.
111
112         * html/HTMLMediaElement.cpp:
113         (WebCore::HTMLMediaElement::registerWithDocument): Pass document to m_mediaSession->registerWithDocument.
114         (WebCore::HTMLMediaElement::unregisterWithDocument): Pass document to m_mediaSession->unRegisterWithDocument.
115         (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): Ditto.
116         (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): Ditto.
117
118         * html/MediaElementSession.cpp:
119         (WebCore::MediaElementSession::registerWithDocument): Take a document.
120         (WebCore::MediaElementSession::unregisterWithDocument): Ditto.
121         * html/MediaElementSession.h:
122
123 2015-06-02  Chris Dumez  <cdumez@apple.com>
124
125         Calling FrameView::viewportContentsChanged() after style recalcs is too expensive
126         https://bugs.webkit.org/show_bug.cgi?id=145554
127         <rdar://problem/21189478>
128
129         Reviewed by Darin Adler and Simon Fraser.
130
131         Only call FrameView::viewportContentsChanged() after a style recalc if
132         composited layers have been updated (and there is no pending layout).
133
134         We already viewportContentsChanged() after layout so we only need to
135         call viewportContentsChanged() after a style recalc if it did not cause
136         a layout but may have caused an element to become visible. In
137         particular, this can happen in the case of composited animations (e.g.
138         using -webkit-transform to move an element inside the viewport).
139         Therefore, we now only call viewportContentsChanged() after a style
140         recalc if it caused composited layers to be updated. This avoids a lot
141         of unnecessary calls to viewportContentsChanged(), which is expensive.
142
143         No new tests, already covered by:
144         fast/images/animated-gif-webkit-transform.html
145
146         * dom/Document.cpp:
147         (WebCore::Document::recalcStyle):
148         * page/FrameView.cpp:
149         (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
150         * page/FrameView.h:
151         * rendering/RenderLayerCompositor.cpp:
152         (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout):
153         (WebCore::RenderLayerCompositor::updateCompositingLayers):
154         * rendering/RenderLayerCompositor.h:
155
156 2015-06-02  Myles C. Maxfield  <mmaxfield@apple.com>
157
158         Remove use of CTFontSetRenderingParameters()
159         https://bugs.webkit.org/show_bug.cgi?id=145560
160
161         Reviewed by Simon Fraser.
162
163         Instead, always use CTFontSetRenderingStyle().
164
165         No new tests because there is no behavior change.
166
167         * platform/graphics/cocoa/FontCascadeCocoa.mm:
168         (WebCore::RenderingStyleSaver::RenderingStyleSaver): Deleted.
169         (WebCore::RenderingStyleSaver::~RenderingStyleSaver): Deleted.
170
171 2015-06-02  Anders Carlsson  <andersca@apple.com>
172
173         Move WKFontAntialiasingStateSaver to its own file
174         https://bugs.webkit.org/show_bug.cgi?id=145557
175         rdar://problem/21134776
176
177         Reviewed by Dan Bernstein.
178
179         Also rename it to FontAntialiasingStateSaver. Also, change it to use the CoreGraphicsSPI.h header for its
180         CGFontAntialiasingStyle definition instead of using an explicit typedef.
181
182         * WebCore.xcodeproj/project.pbxproj:
183         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
184         (PlatformCALayer::drawLayerContents):
185         * platform/graphics/ios/FontAntialiasingStateSaver.h: Copied from Source/WebCore/platform/ios/wak/WKGraphics.h.
186         (WebCore::FontAntialiasingStateSaver::FontAntialiasingStateSaver):
187         (WebCore::FontAntialiasingStateSaver::setup):
188         (WebCore::FontAntialiasingStateSaver::restore):
189         * platform/ios/LegacyTileCache.mm:
190         (WebCore::LegacyTileCache::drawWindowContent):
191         * platform/ios/wak/WKGraphics.h:
192         (WKFontAntialiasingStateSaver::WKFontAntialiasingStateSaver): Deleted.
193         * platform/ios/wak/WKGraphics.mm:
194         (WKFontAntialiasingStateSaver::setup): Deleted.
195         (WKFontAntialiasingStateSaver::restore): Deleted.
196
197 2015-06-02  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
198
199         [Streams API] Implement ReadableStreamReader read method in closed and errored state
200         https://bugs.webkit.org/show_bug.cgi?id=144790
201
202         Reviewed by Darin Adler.
203
204         Reader delegates read() promise handling to its stream except if reader is no longer locking the stream and stream is readable.
205         Storing of reader read() promise callbacks as a Vector in ReadableStream.
206         Added resolution/rejection of read() promises in case of errored/closed streams.
207
208         Test: streams/readable-stream-reader-read.html
209
210         * ForwardingHeaders/runtime/IteratorOperations.h: Added.
211         * Modules/streams/ReadableStream.cpp:
212         (WebCore::ReadableStream::cleanCallbacks): Clean the read requests.
213         (WebCore::ReadableStream::changeStateToClosed): Run success callbacks with undefined for read requests.
214         (WebCore::ReadableStream::changeStateToErrored): Run failure callbacks with the errors for read requests.
215         (WebCore::ReadableStream::closed): Parameter name changed.
216         (WebCore::ReadableStream::read): Added. Succeeds with empty when closed, fails with error when errored, reads a
217         value if there is one and pushes the callbacks to the queue otherwise.
218         * Modules/streams/ReadableStream.h:
219         (WebCore::ReadableStream::ReadCallbacks::ReadCallbacks): Struct containing success and failure callbacks.
220         * Modules/streams/ReadableStreamReader.cpp:
221         (WebCore::ReadableStreamReader::closed): Parameter name changed.
222         (WebCore::ReadableStreamReader::read): Invoke success with empty if we streams if we don't have the right reader
223         and call the stream otherwise to read.
224         * Modules/streams/ReadableStreamReader.h:
225         * bindings/js/JSReadableStreamReaderCustom.cpp:
226         (WebCore::JSReadableStreamReader::read): Create the callback lambdas and invoke read. Failure rejects the
227         promise and success creates the result from the read value.
228         * bindings/js/ReadableJSStream.cpp:
229         (WebCore::ReadableJSStream::hasValue):
230         (WebCore::ReadableJSStream::read): Not implemented yet.
231         * bindings/js/ReadableJSStream.h:
232
233 2015-06-01  Myles C. Maxfield  <mmaxfield@apple.com>
234
235         [Cocoa] FontPlatformData's equality check should always use reference URLs
236         https://bugs.webkit.org/show_bug.cgi?id=144168
237
238         Reviewed by Tim Horton.
239
240         <rdar://problem/18985642> is not fixed, so we need to continue using the older
241         objectForEqualityCheck().
242
243         No new tests because there is no behavior change.
244
245         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
246         (WebCore::FontPlatformData::objectForEqualityCheck):
247
248 2015-06-02  Andy Estes  <aestes@apple.com>
249
250         [Mac] REGRESSION (r175941): Max.app crashes when adding a sound file to a patch due to removing cursor resources from WebCore.framework
251         https://bugs.webkit.org/show_bug.cgi?id=145555
252
253         Reviewed by Darin Adler.
254
255         Re-added the cursor resources used by Max.app and ran sort-Xcode-project-file.
256
257         * Resources/copyCursor.png: Added.
258         * Resources/moveCursor.png: Added.
259         * Resources/northEastSouthWestResizeCursor.png: Added.
260         * Resources/northSouthResizeCursor.png: Added.
261         * Resources/northWestSouthEastResizeCursor.png: Added.
262         * WebCore.xcodeproj/project.pbxproj:
263
264 2015-06-02  Brady Eidson  <beidson@apple.com>
265
266         WebKit policy delegate should suggest if a navigation should be allowed to open URLs externally.
267         rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145280
268
269         Reviewed by Alex Christensen.
270
271         Tests: loader/navigation-policy/should-open-external-urls/main-frame-click.html
272                loader/navigation-policy/should-open-external-urls/main-frame-navigated-programatically-by-subframe.html
273                loader/navigation-policy/should-open-external-urls/main-frame-with-flag-progamatic.html
274                loader/navigation-policy/should-open-external-urls/main-frame-without-flag-programatic.html
275                loader/navigation-policy/should-open-external-urls/subframe-click-target-self.html
276                loader/navigation-policy/should-open-external-urls/subframe-click-target-top.html
277                loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag-from-subframe.html
278                loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag.html
279                loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag-from-subframe.html
280                loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag.html
281                loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag-from-subframe.html
282                loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag.html
283                loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag-from-subframe.html
284                loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag.html
285                loader/navigation-policy/should-open-external-urls/window-open-with-flag-from-subframe.html
286                loader/navigation-policy/should-open-external-urls/window-open-with-flag.html
287                loader/navigation-policy/should-open-external-urls/window-open-without-flag-from-subframe.html
288                loader/navigation-policy/should-open-external-urls/window-open-without-flag.html
289
290         The "should open external URLs" flag is only for main frames.
291         It doesn't enforce any sort of policy internal to WebKit, but rather is for notifications to the policy delegate.
292         
293         It is set from one of two places:
294         1 - A main frame is navigated by any frame as the result of a user gesture.
295         2 - WebKit2 API explicitly states the flag is true.
296         
297         The flag value propagates when:
298         1 - When a main frame document is navigated to a new main frame document.
299         2 - When a new window is opened from a page whose main frame had the flag set.
300         3 - When a new window is opened as the result of a user gesture.
301         
302         The flag resets to false when:
303         1 - A subframe navigates a main frame without a user gesture.
304         
305         This patch is large, but does little more than the following:
306         1 - Adds a ShouldOpenExternalURLs flag to both FrameLoadRequest and NavigationAction.
307         2 - Makes sure anybody who creates either of those objects sets a sensible for that flag.
308         3 - When FrameLoader creates a new DocumentLoader, it sets its flag based on whether or not the load is in a main frame,
309             whether or not the load is from a user gesture, and based on the initiator's value of the flag. 
310             
311         * dom/Document.cpp:
312         (WebCore::Document::processHttpEquiv):
313         (WebCore::Document::shouldOpenExternalURLsPolicyToPropagate):
314         * dom/Document.h:
315         
316         * html/HTMLAnchorElement.cpp:
317         (WebCore::HTMLAnchorElement::handleClick):
318         
319         * html/HTMLLinkElement.cpp:
320         (WebCore::HTMLLinkElement::handleClick):
321         
322         * html/parser/XSSAuditorDelegate.cpp:
323         (WebCore::XSSAuditorDelegate::didBlockScript):
324         
325         * inspector/InspectorFrontendClientLocal.cpp:
326         (WebCore::InspectorFrontendClientLocal::openInNewTab):
327         
328         * inspector/InspectorPageAgent.cpp:
329         (WebCore::InspectorPageAgent::navigate):
330         
331         * loader/DocumentLoader.cpp:
332         (WebCore::DocumentLoader::setTriggeringAction):
333         (WebCore::DocumentLoader::shouldOpenExternalURLsPolicyToPropagate):
334         * loader/DocumentLoader.h:
335         (WebCore::DocumentLoader::shouldOpenExternalURLsPolicy): Deleted.
336         
337         * loader/FrameLoadRequest.cpp:
338         (WebCore::FrameLoadRequest::FrameLoadRequest):
339         * loader/FrameLoadRequest.h:
340         (WebCore::FrameLoadRequest::FrameLoadRequest):
341         
342         * loader/FrameLoader.cpp:
343         (WebCore::FrameLoader::urlSelected):
344         (WebCore::FrameLoader::receivedFirstData):
345         (WebCore::FrameLoader::loadURLIntoChildFrame):
346         (WebCore::FrameLoader::loadURL):
347         (WebCore::FrameLoader::load):
348         (WebCore::FrameLoader::loadWithNavigationAction):
349         (WebCore::FrameLoader::reloadWithOverrideEncoding):
350         (WebCore::FrameLoader::reload):
351         (WebCore::FrameLoader::loadPostRequest):
352         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
353         (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader):
354         * loader/FrameLoader.h:
355         
356         * loader/NavigationAction.cpp:
357         (WebCore::NavigationAction::NavigationAction):
358         (WebCore::NavigationAction::copyWithShouldOpenExternalURLsPolicy):
359         * loader/NavigationAction.h:
360         (WebCore::NavigationAction::setShouldOpenExternalURLsPolicy): Deleted.
361         
362         * loader/NavigationScheduler.cpp:
363         (WebCore::ScheduledURLNavigation::ScheduledURLNavigation):
364         (WebCore::ScheduledRedirect::ScheduledRedirect):
365         (WebCore::ScheduledLocationChange::ScheduledLocationChange):
366         (WebCore::ScheduledRefresh::ScheduledRefresh):
367         (WebCore::ScheduledFormSubmission::ScheduledFormSubmission):
368         (WebCore::NavigationScheduler::scheduleRedirect):
369         (WebCore::NavigationScheduler::scheduleLocationChange):
370         (WebCore::NavigationScheduler::scheduleRefresh):
371         * loader/NavigationScheduler.h:
372         
373         * loader/PolicyChecker.cpp:
374         (WebCore::PolicyChecker::checkNavigationPolicy):
375         
376         * loader/SubframeLoader.cpp:
377         (WebCore::SubframeLoader::loadOrRedirectSubframe):
378         
379         * loader/appcache/ApplicationCacheGroup.cpp:
380         (WebCore::ApplicationCacheGroup::selectCache):
381         
382         * page/ContextMenuController.cpp:
383         (WebCore::openNewWindow):
384         (WebCore::ContextMenuController::contextMenuItemSelected):
385         
386         * page/DOMWindow.cpp:
387         (WebCore::DOMWindow::setLocation):
388         (WebCore::DOMWindow::createWindow):
389         (WebCore::DOMWindow::open):
390         
391         * page/DragController.cpp:
392         (WebCore::DragController::performDragOperation):
393         
394         * page/Location.cpp:
395         (WebCore::Location::reload):
396         
397         * replay/ReplayInputDispatchMethods.cpp:
398         (WebCore::InitialNavigation::dispatch):
399         
400         * svg/SVGAElement.cpp:
401         (WebCore::SVGAElement::defaultEventHandler):
402
403 2015-06-02  Yusuke Suzuki  <utatane.tea@gmail.com>
404
405         Heap-use-after-free read of size 4 in JavaScriptCore: WTF::StringImpl::isSymbol() (StringImpl.h:496)
406         https://bugs.webkit.org/show_bug.cgi?id=145532
407
408         Reviewed by Geoffrey Garen.
409
410         Hold the ownership of AtomicStringImpl*.
411
412         * bindings/scripts/CodeGeneratorJS.pm:
413         (GenerateParametersCheck):
414         * dom/TreeScope.cpp:
415         (WebCore::TreeScope::getElementById):
416
417 2015-06-02  Youenn Fablet  <youenn.fablet@crf.canon.fr>
418
419         SharedBuffer::copy should return a Ref<SharedBuffer>
420         https://bugs.webkit.org/show_bug.cgi?id=145499
421
422         Reviewed by Andreas Kling.
423
424         Changing SharedBuffer::copy to return a Ref<> and adapting some code accordingly.
425
426         Covered by existing tests.
427
428         * loader/SubresourceLoader.cpp:
429         (WebCore::SubresourceLoader::didReceiveResponse):
430         * loader/appcache/ApplicationCacheResource.cpp:
431         (WebCore::ApplicationCacheResource::deliver):
432         * platform/SharedBuffer.cpp:
433         (WebCore::SharedBuffer::copy):
434         * platform/SharedBuffer.h:
435
436 2015-06-01  Hunseop Jeong  <hs85.jeong@samsung.com>
437
438         Use modern for-loops in WebCore/Modules - 1
439         https://bugs.webkit.org/show_bug.cgi?id=145507
440
441         Reviewed by Darin Adler.
442
443         No new tests, no behavior changes.
444
445         * Modules/battery/BatteryController.cpp:
446         (WebCore::BatteryController::~BatteryController):
447         (WebCore::BatteryController::updateBatteryStatus):
448         (WebCore::BatteryController::didChangeBatteryStatus):
449         * Modules/encryptedmedia/CDM.cpp:
450         (WebCore::CDMFactoryForKeySystem):
451         * Modules/encryptedmedia/MediaKeys.cpp:
452         (WebCore::MediaKeys::~MediaKeys):
453         * Modules/geolocation/Geolocation.cpp:
454         (WebCore::Geolocation::resumeTimerFired):
455         (WebCore::Geolocation::resetAllGeolocationPermission):
456         (WebCore::Geolocation::makeCachedPositionCallbacks):
457         (WebCore::Geolocation::sendError):
458         (WebCore::Geolocation::sendPosition):
459         (WebCore::Geolocation::stopTimer):
460         (WebCore::Geolocation::cancelRequests):
461         (WebCore::Geolocation::extractNotifiersWithCachedPosition):
462         (WebCore::Geolocation::copyToSet):
463         (WebCore::Geolocation::handlePendingPermissionNotifiers):
464         * Modules/geolocation/GeolocationController.cpp:
465         (WebCore::GeolocationController::positionChanged):
466         (WebCore::GeolocationController::errorOccurred):
467         * Modules/indexeddb/IDBDatabase.cpp:
468         (WebCore::IDBDatabase::objectStoreNames):
469         (WebCore::IDBDatabase::transaction):
470         (WebCore::IDBDatabase::forceClose):
471         (WebCore::IDBDatabase::closeConnection):
472         (WebCore::IDBDatabase::findObjectStoreId):
473         * Modules/indexeddb/IDBDatabaseBackend.cpp:
474         (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
475         (WebCore::IDBDatabaseBackend::deleteDatabase):
476         (WebCore::IDBDatabaseBackend::close):
477         * Modules/indexeddb/IDBDatabaseMetadata.cpp:
478         (WebCore::IDBDatabaseMetadata::isolatedCopy):
479         (WebCore::IDBObjectStoreMetadata::isolatedCopy):
480         * Modules/indexeddb/IDBKey.cpp:
481         (WebCore::IDBKey::isValid):
482         * Modules/indexeddb/IDBKey.h:
483         (WebCore::IDBKey::createMultiEntryArray):
484         (WebCore::IDBKey::createArray):
485         * Modules/indexeddb/IDBKeyPath.cpp:
486         (WebCore::IDBKeyPath::IDBKeyPath):
487         (WebCore::IDBKeyPath::isValid):
488         (WebCore::IDBKeyPath::isolatedCopy):
489         * Modules/indexeddb/IDBObjectStore.cpp:
490         (WebCore::IDBObjectStore::indexNames):
491         (WebCore::IDBObjectStore::put):
492         Rename the two 'i's to 'keyData' and 'indexKeyData'.
493         (WebCore::IDBObjectStore::index):
494         (WebCore::IDBObjectStore::findIndexId):
495         * Modules/indexeddb/IDBPendingTransactionMonitor.cpp:
496         (WebCore::IDBPendingTransactionMonitor::deactivateNewTransactions):
497         * Modules/indexeddb/IDBRequest.cpp:
498         (WebCore::IDBRequest::abort):
499         * Modules/indexeddb/IDBTransaction.cpp:
500         (WebCore::IDBTransaction::closeOpenCursors):
501         (WebCore::IDBTransaction::onAbort):
502         (WebCore::IDBTransaction::dispatchEvent):
503         * Modules/indexeddb/IDBTransactionBackend.cpp:
504         (WebCore::IDBTransactionBackend::create):
505         (WebCore::IDBTransactionBackend::closeOpenCursors):
506         * Modules/mediasource/MediaSource.cpp:
507         (WebCore::MediaSource::onReadyStateChange):
508         * Modules/mediastream/MediaConstraintsImpl.cpp:
509         (WebCore::MediaConstraintsImpl::initialize):
510         (WebCore::MediaConstraintsImpl::getMandatoryConstraints):
511         (WebCore::MediaConstraintsImpl::getOptionalConstraintValue):
512         * Modules/mediastream/MediaStream.cpp:
513         (WebCore::MediaStream::create):
514         (WebCore::MediaStream::cloneMediaStreamTrackVector):
515         (WebCore::MediaStream::addTrack):
516         (WebCore::MediaStream::removeTrack):
517         (WebCore::MediaStream::haveTrackWithSource):
518         (WebCore::MediaStream::getTrackById):
519         (WebCore::MediaStream::getTracks):
520         (WebCore::MediaStream::trackDidEnd):
521         (WebCore::MediaStream::scheduledEventTimerFired):
522         * Modules/mediastream/MediaStreamCapabilities.cpp:
523         (WebCore::MediaStreamCapabilities::sourceType):
524         (WebCore::MediaStreamCapabilities::sourceId):
525         (WebCore::MediaStreamCapabilities::facingMode):
526         * Modules/mediastream/MediaStreamTrack.cpp:
527         (WebCore::MediaStreamTrack::trackDidEnd):
528         * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
529         (WebCore::MediaStreamTrackSourcesRequest::didCompleteRequest):
530
531 2015-06-01  Myles C. Maxfield  <mmaxfield@apple.com>
532
533         [SVG -> OTF Converter] Remove unnecessary hacks
534         https://bugs.webkit.org/show_bug.cgi?id=145088
535
536         Reviewed by Simon Fraser.
537
538         Not needed anymore.
539
540         Test: svg/text/offset-square-svg-font.html
541
542         * svg/SVGToOTFFontConversion.cpp:
543         (WebCore::SVGToOTFFontConverter::appendKERNTable):
544         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
545
546 2015-06-01  Andreas Kling  <akling@apple.com>
547
548         CSS animations in filling-forwards state shouldn't force compositing.
549         <https://webkit.org/b/145389>
550         <rdar://problem/17923642>
551
552         Reviewed by Simon Fraser.
553
554         Stop checking if a CSS animation is filling forwards when computing
555         compositing requirements.
556
557         This prevents finished animations from pinning elements in composited
558         state, and frees up a bunch of IOSurface memory on some content.
559
560         * page/animation/AnimationBase.h:
561         (WebCore::AnimationBase::isAnimatingProperty): Deleted.
562         * rendering/RenderLayerBacking.cpp:
563         (WebCore::RenderLayerBacking::updateGeometry):
564         * rendering/RenderLayerCompositor.cpp:
565         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
566
567 2015-06-01  Myles C. Maxfield  <mmaxfield@apple.com>
568
569         Out of bounds read in WebCore::ComplexTextController::adjustGlyphsAndAdvances
570         https://bugs.webkit.org/show_bug.cgi?id=145537
571         <rdar://problem/20959267>
572
573         Reviewed by Darin Adler.
574
575         U16_IS_SURROGATE_LEAD(ch) assumes U16_IS_SURROGATE(ch). In this case, that isn't true.
576
577         Test: fast/text/crash-complex-text-surrogate.html
578
579         * platform/graphics/mac/ComplexTextController.cpp:
580         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
581
582 2015-05-30  Zalan Bujtas  <zalan@apple.com>
583
584         REGRESSION (179771): zooming on facebook images covers image
585         https://bugs.webkit.org/show_bug.cgi?id=145485
586
587         Reviewed by Simon Fraser.
588
589         Scaling an infinite rect should always produce an infinite rect.
590         (Based on Simon Fraser's patch)
591
592         Test: compositing/layer-creation/zoomed-clip-intersection.html
593
594         * platform/graphics/LayoutRect.cpp:
595         (WebCore::LayoutRect::scale):
596
597 2015-06-01  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
598
599         Purge PassRefPtr in WebCore/Modules - 3
600         https://bugs.webkit.org/show_bug.cgi?id=145508
601
602         Reviewed by Darin Adler.
603
604         As a step to purge PassRefPtr, this patch removes PassRefPtr, then use Ref or RefPtr.
605
606         * Modules/indexeddb/IDBCursor.cpp:
607         (WebCore::IDBCursor::create):
608         * Modules/indexeddb/IDBCursor.h:
609         * Modules/indexeddb/IDBCursorBackend.h:
610         (WebCore::IDBCursorBackend::create):
611         * Modules/indexeddb/IDBCursorBackendOperations.h:
612         (WebCore::CursorIterationOperation::create):
613         (WebCore::CursorAdvanceOperation::create):
614         * Modules/indexeddb/IDBDatabase.cpp:
615         (WebCore::IDBDatabase::create):
616         * Modules/indexeddb/IDBDatabase.h:
617         * Modules/indexeddb/IDBDatabaseBackend.cpp:
618         (WebCore::IDBDatabaseBackend::create):
619         * Modules/indexeddb/IDBDatabaseBackend.h:
620         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
621         (WebCore::IDBDatabaseCallbacksImpl::create):
622         * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
623         * Modules/indexeddb/IDBDatabaseError.h:
624         (WebCore::IDBDatabaseError::create):
625         * Modules/indexeddb/IDBIndex.h:
626         (WebCore::IDBIndex::create):
627         * Modules/indexeddb/IDBKey.h:
628         (WebCore::IDBKey::createInvalid):
629         (WebCore::IDBKey::createNumber):
630         (WebCore::IDBKey::createString):
631         (WebCore::IDBKey::createDate):
632         (WebCore::IDBKey::createArray):
633         * Modules/indexeddb/IDBKeyRange.cpp:
634         (WebCore::IDBKeyRange::create):
635         * Modules/indexeddb/IDBKeyRange.h:
636         (WebCore::IDBKeyRange::create):
637         * Modules/indexeddb/IDBObjectStore.cpp:
638         * Modules/indexeddb/IDBObjectStore.h:
639         (WebCore::IDBObjectStore::create):
640         * Modules/indexeddb/IDBOpenDBRequest.cpp:
641         (WebCore::IDBOpenDBRequest::create):
642         * Modules/indexeddb/IDBOpenDBRequest.h:
643         * Modules/indexeddb/IDBRecordIdentifier.h:
644         (WebCore::IDBRecordIdentifier::create):
645         * Modules/indexeddb/IDBRequest.cpp:
646         (WebCore::IDBRequest::create):
647         (WebCore::IDBRequest::getResultCursor):
648         * Modules/indexeddb/IDBRequest.h:
649         * Modules/indexeddb/IDBTransaction.cpp:
650         (WebCore::IDBTransaction::create):
651         * Modules/indexeddb/IDBTransaction.h:
652         * Modules/indexeddb/IDBTransactionBackend.cpp:
653         (WebCore::IDBTransactionBackend::create):
654         * Modules/indexeddb/IDBTransactionBackend.h:
655         * Modules/indexeddb/IDBTransactionBackendOperations.h:
656         (WebCore::CreateObjectStoreOperation::create):
657         (WebCore::DeleteObjectStoreOperation::create):
658         (WebCore::IDBDatabaseBackend::VersionChangeOperation::create):
659         (WebCore::CreateObjectStoreAbortOperation::create):
660         (WebCore::DeleteObjectStoreAbortOperation::create):
661         (WebCore::IDBDatabaseBackend::VersionChangeAbortOperation::create):
662         (WebCore::CreateIndexOperation::create):
663         (WebCore::CreateIndexAbortOperation::create):
664         (WebCore::DeleteIndexOperation::create):
665         (WebCore::DeleteIndexAbortOperation::create):
666         (WebCore::GetOperation::create):
667         (WebCore::PutOperation::create):
668         (WebCore::SetIndexesReadyOperation::create):
669         (WebCore::OpenCursorOperation::create):
670         (WebCore::CountOperation::create):
671         (WebCore::DeleteRangeOperation::create):
672         (WebCore::ClearObjectStoreOperation::create):
673         * Modules/mediasource/VideoPlaybackQuality.cpp:
674         (WebCore::VideoPlaybackQuality::create):
675         * Modules/mediasource/VideoPlaybackQuality.h:
676         * Modules/mediastream/MediaConstraintsImpl.cpp:
677         (WebCore::MediaConstraintsImpl::create):
678         * Modules/mediastream/MediaConstraintsImpl.h:
679         * Modules/mediastream/MediaStream.cpp:
680         (WebCore::MediaStream::create):
681         * Modules/mediastream/MediaStream.h:
682         * Modules/mediastream/RTCDTMFSender.cpp:
683         (WebCore::RTCDTMFSender::create):
684         * Modules/mediastream/RTCDTMFSender.h:
685         * Modules/mediastream/RTCOfferAnswerOptions.cpp:
686         (WebCore::RTCOfferAnswerOptions::create):
687         (WebCore::RTCOfferOptions::create):
688         * Modules/mediastream/RTCOfferAnswerOptions.h:
689         * Modules/mediastream/RTCPeerConnection.cpp:
690         (WebCore::RTCPeerConnection::parseConfiguration):
691         (WebCore::RTCPeerConnection::create):
692         * Modules/mediastream/RTCPeerConnection.h:
693         * Modules/webaudio/AudioContext.cpp:
694         (WebCore::AudioContext::create):
695         * Modules/webdatabase/AbstractDatabaseServer.h:
696         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
697         (WebCore::DOMWindowWebDatabase::openDatabase):
698         * Modules/webdatabase/DOMWindowWebDatabase.h:
699         * Modules/webdatabase/DatabaseManager.cpp:
700         (WebCore::DatabaseManager::existingDatabaseContextFor):
701         (WebCore::DatabaseManager::databaseContextFor):
702         (WebCore::DatabaseManager::openDatabase):
703         * Modules/webdatabase/DatabaseManager.h:
704         * Modules/webdatabase/DatabaseServer.cpp:
705         (WebCore::DatabaseServer::openDatabase):
706         (WebCore::DatabaseServer::createDatabase):
707         * Modules/webdatabase/DatabaseServer.h:
708
709 2015-06-01  Daniel Bates  <dabates@apple.com>
710
711         Notify client that we began editing when text field is focused
712         https://bugs.webkit.org/show_bug.cgi?id=145439
713         <rdar://problem/21142108>
714
715         Reviewed by Anders Carlsson.
716
717         Inform the editor client that we began editing when a text field is focused either
718         by being explicitly focused (programmatically or by user interaction) or implicitly
719         focused when the window became active.
720
721         Currently we only notify the editor client that we began editing a text field when
722         when a person actually changes the value of the field. And we always notify the
723         client that we ended editing when a text field is defocused regardless of whether
724         we executed a began editing callback. Moreover we notify a client that we
725         ended editing when the field is defocused (either explicitly or implicitly when the
726         window becomes inactive). Instead we should always notify the client that we began
727         editing when the field is focused so that this callback is symmetric with the end
728         editing callback.
729
730         * html/SearchInputType.cpp:
731         (WebCore::SearchInputType::didSetValueByUserEdit): Remove parameter for ValueChangeState,
732         which was used to determine whether we should notify the client that we began editing, because
733         we we will notify the client that editing began when the text field is focused as opposed to
734         when the value of text field first changes.
735         * html/SearchInputType.h: Ditto.
736         * html/TextFieldInputType.cpp:
737         (WebCore::TextFieldInputType::forwardEvent): Notify the client that we began editing when
738         the text field is focused.
739         (WebCore::TextFieldInputType::subtreeHasChanged): Update call site of didSetValueByUserEdit()
740         following the removal of its parameter.
741         (WebCore::TextFieldInputType::didSetValueByUserEdit): Ditto.
742         * html/TextFieldInputType.h:
743
744 2015-06-01  Anders Carlsson  <andersca@apple.com>
745
746         WAKScrollView.h cannot be imported standalone
747         https://bugs.webkit.org/show_bug.cgi?id=145529
748
749         Reviewed by Dan Bernstein.
750
751         * page/mac/WebCoreFrameView.h:
752         Remove the __cplusplus #ifdefs since WebCoreFrameView.h is only used by Objective-C++ code.
753         (The different non-C++ method declarations were wrong anyway!)
754
755         * platform/ScrollTypes.h:
756         Remove the #ifdef __cplusplus surrounding the code, add header includes to make the file self-contained,
757         and reformat the enum definitions.
758
759 2015-06-01  Alex Christensen  <achristensen@webkit.org>
760
761         [Content Extensions] resource-type and load-type should be independent.
762         https://bugs.webkit.org/show_bug.cgi?id=145528
763         rdar://problem/21190765
764
765         Reviewed by Benjamin Poulain.
766
767         Covered by existing tests and a new API test.
768         
769         Right now we use the same uint16_t to store all the load-type and resource-type flags,
770         then we just do a bitwise and to check both at the same time. This results in a trigger
771         with load-type and resource-type firing if either condition is met, not both conditions.
772         A trigger with both resource-type and load-type conditions should only fire if both conditions are met.
773
774         * contentextensions/DFABytecodeInterpreter.cpp:
775         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
776         Check and correctly handle rules with both resource-type and load-type flags.
777         * loader/ResourceLoadInfo.h:
778         Add masks to separate flags from resource-type and load-type.
779
780 2015-06-01  Alex Christensen  <achristensen@webkit.org>
781
782         [Content Extensions] Reduce DFA memory usage.
783         https://bugs.webkit.org/show_bug.cgi?id=145526
784
785         Reviewed by Benjamin Poulain.
786
787         * contentextensions/DFA.cpp:
788         (WebCore::ContentExtensions::DFA::memoryUsed):
789         (WebCore::ContentExtensions::DFANode::transitions):
790         (WebCore::ContentExtensions::DFANode::fallbackTransitionDestination):
791         (WebCore::ContentExtensions::DFANode::changeFallbackTransition):
792         (WebCore::ContentExtensions::DFANode::addFallbackTransition):
793         (WebCore::ContentExtensions::DFANode::containsTransition):
794         (WebCore::ContentExtensions::DFANode::kill):
795         * contentextensions/DFA.h:
796         * contentextensions/DFAMinimizer.cpp:
797         (WebCore::ContentExtensions::DFAMinimizer::minimize):
798         * contentextensions/NFAToDFA.cpp:
799         (WebCore::ContentExtensions::NFAToDFA::convert):
800         Use separate Vectors for the transition characters and destinations to avoid wasting memory to padding a std::pair.
801
802 2015-06-01  Matt Rajca  <mrajca@apple.com>
803
804         Implemented the `eventTargetInterface` and `scriptExecutionContext` methods required by EventTarget, as well as
805         some required infrastructure.
806         https://bugs.webkit.org/show_bug.cgi?id=145523
807
808         Reviewed by Eric Carlson.
809
810         * Modules/mediasession/MediaRemoteControls.cpp:
811         (WebCore::MediaRemoteControls::MediaRemoteControls): Initialize all instance variables.
812         * Modules/mediasession/MediaRemoteControls.h: MediaRemoteControl's constructor now takes a script execution
813           context, which we provide to EventTarget. The required eventTargetInterface method has also been implemented.
814         (WebCore::MediaRemoteControls::create):
815         * Modules/mediasession/MediaRemoteControls.idl: Indicate MediaRemoteControls now takes a constructor that is
816           passed in a script execution context. To prevent build errors, event handlers have been removed until they are
817           implemented.
818         * WebCore.xcodeproj/project.pbxproj: We should be building the derived JSMediaRemoteControls class with WebCore.
819         * dom/EventTargetFactory.in: Ensure a MediaRemoteControlsEventTargetInterfaceType is generated.
820
821 2015-06-01  Benjamin Poulain  <bpoulain@apple.com>
822
823         [CSS JIT] Fail to compile when we are out of executable memory
824         https://bugs.webkit.org/show_bug.cgi?id=145483
825         rdar://problem/21166612
826
827         Reviewed by Andreas Kling.
828
829         We should use a soft failure when the Linker fails to allocate
830         executable memory for the CSS JIT. We will just fallback to slow
831         code when that happen, better slow CSS than crashing.
832
833         Credit to Chris for finding this problem.
834
835         * cssjit/SelectorCompiler.cpp:
836         (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
837
838 2015-06-01  Chris Dumez  <cdumez@apple.com>
839
840         ASSERT(revalidatingResource.inCache()) in MemoryCache when reloading tumblr.com
841         https://bugs.webkit.org/show_bug.cgi?id=145518
842         <rdar://problem/21168573>
843
844         Reviewed by Darin Adler.
845
846         There was an assertion in MemoryCache::revalidationSucceeded() making
847         sure that the resource that was revalidated is still in the memory
848         cache. However, nothing prevents this resource from being pruned while
849         it is being revalidated. We do make sure that the resource in question
850         cannot be destroyed though (see CachedResource::canDelete()).
851
852         This patch gets rid of this assertion as it is incorrect. Also, the
853         fact that the resource is no longer in the memory cache is not an
854         issue. We are merely going to call MemoryCache::remove() to remove
855         it from the memory cache before re-adding it and updating its
856         HTTP response. The call to MemoryCache::remove() will simply be a
857         no-op in this case and we will not have any problem adding the
858         resource back to the memory cache because the resource is kept alive.
859
860         Test: http/tests/cache/memory-cache-pruning-during-revalidation.html
861
862         * loader/cache/MemoryCache.cpp:
863         (WebCore::MemoryCache::revalidationSucceeded): Deleted.
864
865 2015-06-01  Matt Rajca  <mrajca@apple.com>
866
867         Add stub implementation of MediaRemoteControls, part of the Media Session spec.
868         https://bugs.webkit.org/show_bug.cgi?id=145462
869
870         Reviewed by Eric Carlson.
871
872         * CMakeLists.txt: Added IDL file as well as the corresponding implementation file.
873         * DerivedSources.make: Included the new IDL file.
874         * Modules/mediasession/MediaRemoteControls.cpp: Added an empty implementation file.
875         (MediaRemoteControls::~MediaRemoteControls):
876         * Modules/mediasession/MediaRemoteControls.h: Added a stubbed header file with accessors for the four attributes declared in the IDL file.
877         (WebCore::MediaRemoteControls::previousTrackEnabled):
878         (WebCore::MediaRemoteControls::setPreviousTrackEnabled):
879         (WebCore::MediaRemoteControls::nextTrackEnabled):
880         (WebCore::MediaRemoteControls::setNextTrackEnabled):
881         (WebCore::MediaRemoteControls::seekForwardEnabled):
882         (WebCore::MediaRemoteControls::setSeekForwardEnabled):
883         (WebCore::MediaRemoteControls::seekBackwardEnabled):
884         (WebCore::MediaRemoteControls::setSeekBackwardEnabled):
885         * Modules/mediasession/MediaRemoteControls.idl: Added from the Media Session spec.
886         * WebCore.xcodeproj/project.pbxproj: Included the new IDL file and MediaRemoteControls.cpp/.h sources.
887
888 2015-06-01  Sergio Villar Senin  <svillar@igalia.com>
889
890         [CSS Grid Layout] Simplify the interface of GridResolvedPosition
891         https://bugs.webkit.org/show_bug.cgi?id=139077
892
893         Reviewed by Darin Adler.
894
895         The interface of GridResolvedPosition is full of static methods
896         that are used only internally, we should not expose them.
897
898         Apart from that resolveGridPositionsFromStyle() do always return
899         a valid GridSpan from now on meaning that the caller has to ensure
900         that the resolution does not require running the auto-placement
901         algorithm. A new class called GridUnresolvedSpan was added for
902         that purpose.
903
904         No new tests as this is a refactoring.
905
906         * rendering/RenderGrid.cpp:
907         (WebCore::RenderGrid::placeItemsOnGrid):
908         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
909         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
910         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
911         * rendering/style/GridPosition.h:
912         * rendering/style/GridResolvedPosition.cpp:
913         (WebCore::gridLinesForSide):
914         (WebCore::implicitNamedGridLineForSide):
915         (WebCore::isNonExistentNamedLineOrArea):
916         (WebCore::GridUnresolvedSpan::requiresAutoPlacement):
917         (WebCore::GridUnresolvedSpan::adjustGridPositionsFromStyle):
918         (WebCore::adjustGridPositionForRowEndColumnEndSide):
919         (WebCore::adjustGridPositionForSide):
920         (WebCore::resolveNamedGridLinePositionFromStyle):
921         (WebCore::firstNamedGridLineBeforePosition):
922         (WebCore::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
923         (WebCore::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
924         (WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
925         (WebCore::resolveGridPositionAgainstOppositePosition):
926         (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
927         (WebCore::resolveGridPositionFromStyle):
928         (WebCore::GridResolvedPosition::GridResolvedPosition):
929         (WebCore::GridResolvedPosition::unresolvedSpanFromStyle):
930         (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
931         (WebCore::GridResolvedPosition::adjustGridPositionsFromStyle): Deleted.
932         (WebCore::GridResolvedPosition::resolveNamedGridLinePositionFromStyle): Deleted.
933         (WebCore::GridResolvedPosition::resolveGridPositionFromStyle): Deleted.
934         (WebCore::GridResolvedPosition::resolveGridPositionAgainstOppositePosition): Deleted.
935         (WebCore::GridResolvedPosition::resolveNamedGridLinePositionAgainstOppositePosition): Deleted.
936         (WebCore::GridResolvedPosition::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition): Deleted.
937         (WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Deleted.
938         * rendering/style/GridResolvedPosition.h:
939         (WebCore::GridUnresolvedSpan::GridUnresolvedSpan): New class.
940         (WebCore::GridUnresolvedSpan::initialPosition):
941         (WebCore::GridUnresolvedSpan::finalPosition):
942         (WebCore::GridUnresolvedSpan::initialPositionSide):
943         (WebCore::GridUnresolvedSpan::finalPositionSide):
944         (WebCore::GridResolvedPosition::adjustGridPositionForRowEndColumnEndSide): Deleted.
945         (WebCore::GridResolvedPosition::adjustGridPositionForSide): Deleted.
946         (WebCore::GridResolvedPosition::GridResolvedPosition): Deleted.
947
948 2015-06-01  Csaba Osztrogonác  <ossy@webkit.org>
949
950         Fix the !ENABLE(VIDEO_TRACK) build after r184799
951         https://bugs.webkit.org/show_bug.cgi?id=145510
952
953         Reviewed by Eric Carlson.
954
955         * testing/Internals.cpp:
956         (WebCore::Internals::userPreferredAudioCharacteristics):
957         (WebCore::Internals::setUserPreferredAudioCharacteristic):
958
959 2015-06-01  Csaba Osztrogonác  <ossy@webkit.org>
960
961         Fix logical-not-parentheses warning in CachedScript.cpp
962         https://bugs.webkit.org/show_bug.cgi?id=145254
963
964         Reviewed by Sam Weinig.
965
966         * loader/cache/CachedScript.cpp:
967         (WebCore::CachedScript::mimeTypeAllowedByNosniff): "!X==Y" should be "X!=Y" here.
968
969 2015-05-31  Dan Bernstein  <mitz@apple.com>
970
971         Remove Panther support
972         https://bugs.webkit.org/show_bug.cgi?id=145506
973
974         Reviewed by Sam Weinig.
975
976         * platform/ios/wak/WAKAppKitStubs.h: Don't check for pre-Tiger SDKs.
977
978 2015-05-31  Carlos Alberto Lopez Perez  <clopez@igalia.com>
979
980         Remove unused variable kZoomTicks.
981         https://bugs.webkit.org/show_bug.cgi?id=145504
982
983         Reviewed by Sam Weinig.
984
985         No new tests, no behavior changes.
986
987         * platform/ScrollAnimatorNone.cpp:
988
989 2015-05-31  Youenn Fablet  <youenn.fablet@crf.canon.fr>
990
991         Async XMLHttpRequest should get access to AppCache resources stored as flat files
992         https://bugs.webkit.org/show_bug.cgi?id=138506
993
994         Reviewed by Darin Adler.
995
996         This patch reads flat file data when DocumentLoader substituteResource delivery timer is fired.
997         Refactoring to remove ApplicationCacheHost/DocumentLoader friend link.
998         Added ResourceLoader::deliverResponseAndData helper function, taking a SharedBuffer as input to remove an unneeded copy for flat files (no change for other files). 
999
1000         Test: http/tests/appcache/simple-video-async.html
1001
1002         * loader/DocumentLoader.cpp:
1003         (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
1004         (WebCore::DocumentLoader::scheduleArchiveLoad):
1005         (WebCore::DocumentLoader::scheduleSubstituteResourceLoad): Helper function to remove ApplicationCacheHost friend link.
1006         * loader/DocumentLoader.h:
1007         * loader/ResourceLoader.cpp:
1008         (WebCore::ResourceLoader::deliverResponseAndData): Helper function, code mostly moved from DocumentLoader::substituteResourceDeliveryTimerFired.
1009         * loader/ResourceLoader.h:
1010         * loader/SubstituteResource.h:
1011         (WebCore::SubstituteResource::deliver): Introduced to be overriden by ApplicationCacheResource to take care of flat file case.
1012         * loader/appcache/ApplicationCacheHost.cpp:
1013         (WebCore::ApplicationCacheHost::maybeLoadResource):
1014         (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
1015         * loader/appcache/ApplicationCacheResource.cpp:
1016         (WebCore::ApplicationCacheResource::deliver): Use SharedBuffer::createWithContentsOfFile to load data stored in flat file.
1017         * loader/appcache/ApplicationCacheResource.h:
1018
1019 2015-05-31  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1020
1021         [Streams API] Implement ReadableStreamController constructor
1022         https://bugs.webkit.org/show_bug.cgi?id=143752
1023
1024         Reviewed by Darin Adler.
1025
1026         Covered by rebased test and expectation.
1027
1028         * Modules/streams/ReadableStreamController.idl: Adding CustomConstructor.
1029         * bindings/js/JSReadableStreamControllerCustom.cpp:
1030         (WebCore::constructJSReadableStreamController): Throws an exception whenever called.
1031
1032 2015-05-30  Brady Eidson  <beidson@apple.com>
1033
1034         Make FrameLoader methods that take PassRefPtr<Event> take raw pointers instead.
1035         https://bugs.webkit.org/show_bug.cgi?id=145495
1036
1037         Reviewed by Alexey Proskuryakov.
1038
1039         No new tests (No change in behavior).
1040
1041         In most cases ownership of the Event is not actually being transferred, and these functions are all rarely called anyways.
1042         
1043         * html/HTMLLinkElement.cpp:
1044         (WebCore::HTMLLinkElement::handleClick):
1045         
1046         * loader/FrameLoader.cpp:
1047         (WebCore::FrameLoader::urlSelected):
1048         (WebCore::FrameLoader::loadFrameRequest):
1049         (WebCore::FrameLoader::loadURL):
1050         (WebCore::FrameLoader::loadPostRequest):
1051         * loader/FrameLoader.h:
1052
1053 2015-05-30  Andreas Kling  <akling@apple.com>
1054
1055         [iOS] Tiling coverage sometimes inflated by outdated scale factor.
1056         <https://webkit.org/b/145494>
1057         <rdar://problem/20989389>
1058
1059         Reviewed by Benjamin Poulain.
1060
1061         Have GraphicsLayerCA plumb the current contents scale through to TileController::adjustCoverageRect()
1062         instead of TileController getting it from TileGrid.
1063
1064         This avoids a situation where adjustCoverageRect() could cause temporarily oversized tiling coverage
1065         if called while TileGrid's content scale is outdated, and we're neither zooming or pinching, following
1066         a pinch zoom that increased the scale factor.
1067
1068         Specifically, if all the velocity data is zero, we pad the coverage rect by a horizontal and vertical
1069         margin computed like so:
1070
1071             margin = defaultTileSize / tileGrid.scale
1072
1073         If the actual scale is 5, but the TileGrid's outdated scale is e.g 0.8, you'll get a much larger
1074         margin than you really wanted. Then the whole thing gets scaled up by 5x later on, and we explode
1075         in a fiery feast of IOSurface allocations.
1076
1077         * platform/graphics/TiledBacking.h:
1078         * platform/graphics/ca/GraphicsLayerCA.cpp:
1079         (WebCore::GraphicsLayerCA::adjustCoverageRect):
1080         * platform/graphics/ca/TileController.cpp:
1081         (WebCore::TileController::computeTileCoverageRect):
1082         * platform/graphics/ca/TileController.h:
1083
1084 2015-05-30  Brady Eidson  <beidson@apple.com>
1085
1086         Fix Windows tests broken by r185007.
1087         https://bugs.webkit.org/show_bug.cgi?id=145472
1088
1089         Unreviewed. Discussed with Alexey Proskuryakov.
1090
1091         No new tests (Fixing the four broken ones should suffice).
1092
1093         The bug was that evaluating arguments in a method/constructor call has no guaranteed sequencing.
1094         
1095         Clang seems to always do LTR, allowing the PassRefPtr to be evaluated as a bool in the call to
1096         navigationType() before it is "consumed" by the PassRefPtr argument.
1097         
1098         In Visual Studio the PassRefPtr consumption happened before the bool evaluation, meaning `false`
1099         was always passed in to navigationType(), breaking the four tests.
1100         
1101         The fix? Using PassRefPtr here was silly in the first place.
1102         No ownership is being transferred.
1103         Raw pointers it is.
1104         
1105         * loader/FrameLoader.cpp:
1106         (WebCore::FrameLoader::loadURL):
1107         (WebCore::FrameLoader::loadPostRequest):
1108         * loader/NavigationAction.cpp:
1109
1110         (WebCore::NavigationAction::NavigationAction):
1111         * loader/NavigationAction.h: Nobody is actually transferring ownership of these Events.
1112           Raw pointers will work just fine, thanks.
1113
1114 2015-05-29  Joseph Pecoraro  <pecoraro@apple.com>
1115
1116         Unreviewed bindings test rebaseline after r185023.
1117
1118         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1119         (WebCore::isObservable): Deleted.
1120         (WebCore::JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots): Deleted.
1121
1122 2015-05-29  Andreas Kling  <akling@apple.com>
1123
1124         [iOS] Reduce tiling coverage when doing a pure pinch zoom with no panning.
1125         <https://webkit.org/b/145481>
1126         <rdar://problem/20989389>
1127
1128         Reviewed by Benjamin Poulain.
1129
1130         When we're zooming in with a pinch gesture but not panning the page
1131         at the same time, make the coverage rect be the visible rect.
1132
1133         This reduces memory pressure during zooming, especially on slower
1134         devices that struggle to keep up with the current viewport.
1135
1136         * platform/graphics/ca/TileController.cpp:
1137         (WebCore::TileController::computeTileCoverageRect):
1138
1139 2015-05-29  Keith Miller  <keith_miller@apple.com>
1140
1141         WeakMap reference w/ DOM element as key does not survive long enough.
1142         https://bugs.webkit.org/show_bug.cgi?id=137651
1143
1144         Reviewed by Geoffrey Garen.
1145
1146         Remove isObservable functions as an "unobservable wrappers"
1147         optimization is invalid with WeakMaps. Performance testing
1148         will be done after the code is commited. If major
1149         performance issues occur the patch will be rolled out.
1150
1151         Test: js/dom/weakmap-gc-unobservable-dom-nodes.html
1152
1153         * bindings/js/JSNodeCustom.cpp:
1154         (WebCore::isReachableFromDOM):
1155         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
1156         (WebCore::JSNode::insertBefore):
1157         (WebCore::isObservable): Deleted.
1158         * bindings/scripts/CodeGeneratorJS.pm:
1159         (GenerateImplementation):
1160
1161 2015-05-29  Anders Carlsson  <andersca@apple.com>
1162
1163         Get rid of WAKViewPrivate.h
1164         https://bugs.webkit.org/show_bug.cgi?id=145482
1165         rdar://problem/21162149
1166
1167         Reviewed by Dan Bernstein.
1168
1169         Merge WAKViewPrivate.h into WAKViewInternal.h and move the NSView sizing enum
1170         to WAKView.h since that was the only thing WebKit used (indirectly) from WAKViewPrivate.h.
1171
1172         * WebCore.xcodeproj/project.pbxproj:
1173         * platform/WAKViewInternal.h:
1174         (WAKViewForWKViewRef):
1175         * platform/ios/ScrollViewIOS.mm:
1176         * platform/ios/wak/WAKResponder.m:
1177         * platform/ios/wak/WAKView.h:
1178         * platform/ios/wak/WAKView.mm:
1179         * platform/ios/wak/WAKViewPrivate.h: Removed.
1180         (WAKViewForWKViewRef): Deleted.
1181         * platform/ios/wak/WAKWindow.mm:
1182         * platform/ios/wak/WKView.h:
1183         * platform/ios/wak/WKView.mm:
1184
1185 2015-05-29  Daniel Bates  <dabates@apple.com>
1186
1187         Clean up logic for updating caps lock indicator state
1188         https://bugs.webkit.org/show_bug.cgi?id=145329
1189
1190         Reviewed by Sam Weinig.
1191
1192         Remove logic to explicitly update the state of the caps lock indicator, which was used
1193         when the caps logic indicator was implemented as part of RenderTextControl. Currently,
1194         the caps logic indicator is implemented as part of a shadow DOM and we have existing
1195         logic to forward DOM focus and blur events to it so that it may update its state.
1196
1197         No change in behavior.
1198
1199         * editing/FrameSelection.cpp:
1200         (WebCore::FrameSelection::focusedOrActiveStateChanged): Deleted.
1201         * editing/FrameSelection.h:
1202         * page/EventHandler.cpp:
1203         (WebCore::EventHandler::keyEvent): Inline the code from EventHandler::capsLockStateMayHaveChanged()
1204         into this function because it is the only caller of EventHandler::capsLockStateMayHaveChanged() after
1205         we removed the call site in FrameSelection::focusedOrActiveStateChanged().
1206         (WebCore::EventHandler::capsLockStateMayHaveChanged): Deleted.
1207         * page/EventHandler.h:
1208
1209 2015-05-29  Zalan Bujtas  <zalan@apple.com>
1210
1211         Text disappears shortly after page load on Nexus 7 site.
1212         https://bugs.webkit.org/show_bug.cgi?id=145467
1213         rdar://problem/18327239
1214
1215         Reviewed by Simon Fraser.
1216
1217         This patch ensures that overlap testing for composited layers works properly when the sibling
1218         layer gets composited through its child.
1219
1220         When a layer gets composited through its child content, the recursive overlap testing should build up the
1221         overlapmap stack so that sibling content is intersected both against the child and its parent bounds.
1222
1223         Tests: compositing/sibling-layer-does-not-get-composited-overflow-hidden-case.html
1224                compositing/sibling-layer-does-not-get-composited-transform-case.html
1225
1226         * rendering/RenderLayerCompositor.cpp:
1227         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
1228         (WebCore::RenderLayerCompositor::OverlapMap::contains): Deleted.
1229
1230 2015-05-29  Brady Eidson  <beidson@apple.com>
1231
1232         Review feedback followup for r185003.
1233         https://bugs.webkit.org/show_bug.cgi?id=145463
1234
1235         Reviewed by Darin Adler.
1236
1237         * platform/sql/SQLiteDatabase.cpp:
1238         (WebCore::SQLiteDatabase::overrideUnauthorizedFunctions): `static const` one thing, c++-style cast another.
1239
1240 2015-05-29  Chris Dumez  <cdumez@apple.com>
1241
1242         WebContent crash in WebCore::Page::sessionID() const + 0 (Page.cpp:1660)
1243         https://bugs.webkit.org/show_bug.cgi?id=145422
1244         <rdar://problem/20613631>
1245
1246         Reviewed by Brady Eidson.
1247
1248         We sometimes crash when destroying a PageCache CachedFrame because its
1249         DocumentLoader is still loading. This should never happen as we are not
1250         supposed to let pages are still have pending loads into the PageCache.
1251
1252         However, we were using DocumentLoader::isLoadingInAPISense() as check
1253         in PageCache::canCachePageContainingThisFrame() which is not exactly
1254         what we want. isLoadingInAPISense() no longer considers subresource
1255         loads once the frame as loaded. This means if the JS triggers a new
1256         load in a subframe after it has been loaded, then isLoadingInAPISense()
1257         will return false, despite the pending load.
1258
1259         This patch replaces the isLoadingInAPISense() check with isLoading()
1260         as this will consider all pending loads, even after the frame is
1261         loaded.
1262
1263         In most cases, using isLoadingInAPISense() was not an issue because
1264         we call DocumentLoader::stopLoading() in all subframes before starting
1265         a provisional load. However, nothing seems to prevent JS from
1266         triggering a new load after that and before the new load gets committed
1267         (which is when we save the page into PageCache).
1268
1269         No new test as we don't have a reliable reproduction case and the
1270         issue is timing related.
1271
1272         * history/PageCache.cpp:
1273         (WebCore::logCanCacheFrameDecision):
1274         (WebCore::PageCache::canCachePageContainingThisFrame):
1275         * page/DiagnosticLoggingKeys.cpp:
1276         (WebCore::DiagnosticLoggingKeys::isLoading):
1277         (WebCore::DiagnosticLoggingKeys::loadingAPISenseKey): Deleted.
1278         * page/DiagnosticLoggingKeys.h:
1279
1280 2015-05-29  Chris Dumez  <cdumez@apple.com>
1281
1282         Consider throttling DOM timers in iframes outside the viewport
1283         https://bugs.webkit.org/show_bug.cgi?id=145465
1284         <rdar://problem/20768957>
1285
1286         Reviewed by Darin Adler.
1287
1288         Throttle DOM timers in iframes that are outside the viewport to decrease
1289         CPU usage, improve performance and reduce power use.
1290
1291         The approach is similar to what we already did for requestAnimationFrame
1292         in r183998.
1293
1294         We already has support for throttling DOM timers at:
1295         - Page level: for backgound pages
1296         - DOM timer level: for timers changing the style of an element outside
1297           the viewport or drawing on a canvas outside the viewport.
1298
1299         This patch adds support for throttling DOM timers at Document level so
1300         we can throttle all timers inside a specific iframe / Document. It relies
1301         on the same timerAlignmentInterval that is used for throttling at Page
1302         level with tweaks so that different Documents inside the same Page can
1303         have a different timerAlignmentInterval.
1304
1305         Test: fast/dom/timer-throttling-subframe.html
1306
1307         * dom/Document.cpp:
1308         (WebCore::Document::setTimerThrottlingEnabled):
1309         (WebCore::Document::timerAlignmentInterval):
1310         * dom/Document.h:
1311         (WebCore::Document::isTimerThrottlingEnabled):
1312         * page/DOMTimer.cpp:
1313         (WebCore::DOMTimer::alignedFireTime):
1314         The previous code was not throttling the timer if its fireTime was in
1315         the past. This was causing some aggressive timers on mashable.com to
1316         not be throttled so I got rid of this behavior. I don't see any reason
1317         why we would not throttle a timer simply because it is supposed to have
1318         fired already.
1319
1320         * page/FrameView.cpp:
1321         (WebCore::FrameView::viewportContentsChanged):
1322         (WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState):
1323         * page/FrameView.h:
1324
1325         * testing/Internals.cpp:
1326         (WebCore::Internals::areTimersThrottled):
1327         * testing/Internals.h:
1328         * testing/Internals.idl:
1329         Add API to facilitate layout testing of this functionality.
1330
1331 2015-05-29  Brady Eidson  <beidson@apple.com>
1332
1333         NavigationAction constructor cleanup.
1334         https://bugs.webkit.org/show_bug.cgi?id=145472
1335
1336         Reviewed by Alex Christensen.
1337
1338         No new tests (Refactor, no change in behavior).
1339
1340         * loader/NavigationAction.cpp:
1341         (WebCore::NavigationAction::NavigationAction): Delegate many of the various constructors
1342           to a single full-featured constructor.
1343         * loader/NavigationAction.h:
1344
1345 2015-05-29  Matt Rajca  <mrajca@apple.com>
1346
1347         Rename MediaSession and MediaSessionClient to PlatformMediaSession and PlatformMediaSessionClient so we can use MediaSession for the formal implementation of the Media Session spec.
1348         https://bugs.webkit.org/show_bug.cgi?id=145447
1349
1350         Reviewed by Eric Carlson.
1351
1352         * Modules/webaudio/AudioContext.cpp:
1353         (WebCore::AudioContext::AudioContext):
1354         (WebCore::AudioContext::suspendPlayback):
1355         * Modules/webaudio/AudioContext.h:
1356         * WebCore.vcxproj/WebCore.vcxproj:
1357         * WebCore.vcxproj/WebCore.vcxproj.filters:
1358         * WebCore.xcodeproj/project.pbxproj:
1359         * html/HTMLAudioElement.h:
1360         * html/HTMLMediaElement.cpp:
1361         (WebCore::HTMLMediaElement::pausedForUserInteraction):
1362         (WebCore::HTMLMediaElement::mediaType):
1363         (WebCore::HTMLMediaElement::presentationType):
1364         (WebCore::HTMLMediaElement::displayType):
1365         (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand):
1366         * html/HTMLMediaElement.h:
1367         * html/HTMLMediaSession.cpp:
1368         (WebCore::HTMLMediaSession::HTMLMediaSession):
1369         (WebCore::HTMLMediaSession::requiresFullscreenForVideoPlayback):
1370         * html/HTMLMediaSession.h:
1371         * html/HTMLVideoElement.h:
1372         * platform/RemoteCommandListener.h:
1373         * platform/audio/MediaSessionManager.cpp:
1374         (WebCore::MediaSessionManager::resetRestrictions):
1375         (WebCore::MediaSessionManager::has):
1376         (WebCore::MediaSessionManager::activeAudioSessionRequired):
1377         (WebCore::MediaSessionManager::count):
1378         (WebCore::MediaSessionManager::beginInterruption):
1379         (WebCore::MediaSessionManager::endInterruption):
1380         (WebCore::MediaSessionManager::addSession):
1381         (WebCore::MediaSessionManager::removeSession):
1382         (WebCore::MediaSessionManager::addRestriction):
1383         (WebCore::MediaSessionManager::removeRestriction):
1384         (WebCore::MediaSessionManager::restrictions):
1385         (WebCore::MediaSessionManager::sessionWillBeginPlayback):
1386         (WebCore::MediaSessionManager::sessionWillEndPlayback):
1387         (WebCore::MediaSessionManager::setCurrentSession):
1388         (WebCore::MediaSessionManager::currentSession):
1389         (WebCore::MediaSessionManager::sessionRestrictsInlineVideoPlayback):
1390         (WebCore::MediaSessionManager::sessionCanLoadMedia):
1391         (WebCore::MediaSessionManager::applicationWillEnterBackground):
1392         (WebCore::MediaSessionManager::applicationWillEnterForeground):
1393         (WebCore::MediaSessionManager::didReceiveRemoteControlCommand):
1394         (WebCore::MediaSessionManager::systemWillSleep):
1395         (WebCore::MediaSessionManager::systemDidWake):
1396         * platform/audio/MediaSessionManager.h:
1397         (WebCore::MediaSessionManager::sessions):
1398         * platform/audio/PlatformMediaSession.cpp: Renamed from Source/WebCore/platform/audio/MediaSession.cpp.
1399         (WebCore::stateName):
1400         (WebCore::PlatformMediaSession::create):
1401         (WebCore::PlatformMediaSession::PlatformMediaSession):
1402         (WebCore::PlatformMediaSession::~PlatformMediaSession):
1403         (WebCore::PlatformMediaSession::setState):
1404         (WebCore::PlatformMediaSession::beginInterruption):
1405         (WebCore::PlatformMediaSession::endInterruption):
1406         (WebCore::PlatformMediaSession::clientWillBeginPlayback):
1407         (WebCore::PlatformMediaSession::clientWillPausePlayback):
1408         (WebCore::PlatformMediaSession::pauseSession):
1409         (WebCore::PlatformMediaSession::mediaType):
1410         (WebCore::PlatformMediaSession::presentationType):
1411         (WebCore::PlatformMediaSession::title):
1412         (WebCore::PlatformMediaSession::duration):
1413         (WebCore::PlatformMediaSession::currentTime):
1414         (WebCore::PlatformMediaSession::canReceiveRemoteControlCommands):
1415         (WebCore::PlatformMediaSession::didReceiveRemoteControlCommand):
1416         (WebCore::PlatformMediaSession::visibilityChanged):
1417         (WebCore::PlatformMediaSession::clientDataBufferingTimerFired):
1418         (WebCore::PlatformMediaSession::updateClientDataBuffering):
1419         (WebCore::PlatformMediaSession::isHidden):
1420         (WebCore::PlatformMediaSession::displayType):
1421         (WebCore::PlatformMediaSessionClient::mediaSessionTitle):
1422         (WebCore::PlatformMediaSessionClient::mediaSessionDuration):
1423         (WebCore::PlatformMediaSessionClient::mediaSessionCurrentTime):
1424         * platform/audio/PlatformMediaSession.h: Renamed from Source/WebCore/platform/audio/MediaSession.h.
1425         (WebCore::PlatformMediaSession::state):
1426         (WebCore::PlatformMediaSession::canPlayToWirelessPlaybackTarget):
1427         (WebCore::PlatformMediaSession::isPlayingToWirelessPlaybackTarget):
1428         (WebCore::PlatformMediaSession::requiresPlaybackTargetRouteMonitoring):
1429         (WebCore::PlatformMediaSession::client):
1430         (WebCore::PlatformMediaSessionClient::PlatformMediaSessionClient):
1431         (WebCore::PlatformMediaSessionClient::displayType):
1432         (WebCore::PlatformMediaSessionClient::setShouldBufferData):
1433         (WebCore::PlatformMediaSessionClient::elementIsHidden):
1434         (WebCore::PlatformMediaSessionClient::wirelessRoutesAvailableDidChange):
1435         (WebCore::PlatformMediaSessionClient::setWirelessPlaybackTarget):
1436         (WebCore::PlatformMediaSessionClient::canPlayToWirelessPlaybackTarget):
1437         (WebCore::PlatformMediaSessionClient::isPlayingToWirelessPlaybackTarget):
1438         (WebCore::PlatformMediaSessionClient::setShouldPlayToPlaybackTarget):
1439         (WebCore::PlatformMediaSessionClient::~PlatformMediaSessionClient):
1440         * platform/audio/ios/MediaSessionManagerIOS.h:
1441         * platform/audio/ios/MediaSessionManagerIOS.mm:
1442         (WebCore::MediaSessionManageriOS::resetRestrictions):
1443         (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback):
1444         (WebCore::MediaSessionManageriOS::sessionWillEndPlayback):
1445         (WebCore::MediaSessionManageriOS::updateNowPlayingInfo):
1446         (WebCore::MediaSessionManageriOS::sessionCanLoadMedia):
1447         (-[WebMediaSessionHelper interruption:]):
1448         * platform/audio/mac/MediaSessionManagerMac.cpp:
1449         (MediaSessionManager::updateSessionState):
1450         * platform/graphics/MediaPlayer.cpp:
1451         (WebCore::MediaPlayer::handlePlaybackCommand):
1452         * platform/graphics/MediaPlayer.h:
1453         (WebCore::MediaPlayerClient::mediaPlayerHandlePlaybackCommand):
1454         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1455         (WebCore::MediaPlayerPrivateAVFoundation::rateChanged):
1456         * platform/ios/RemoteCommandListenerIOS.mm:
1457         (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS):
1458         * testing/Internals.cpp:
1459         (WebCore::Internals::beginMediaSessionInterruption):
1460         (WebCore::Internals::endMediaSessionInterruption):
1461         (WebCore::Internals::setMediaSessionRestrictions):
1462         (WebCore::Internals::postRemoteControlCommand):
1463
1464 2015-05-29  Alex Christensen  <achristensen@webkit.org>
1465
1466         [Content Extensions] Decrease maxNFASize
1467         https://bugs.webkit.org/show_bug.cgi?id=145461
1468
1469         Reviewed by Gavin Barraclough.
1470
1471         * contentextensions/ContentExtensionCompiler.cpp:
1472         (WebCore::ContentExtensions::compileRuleList):
1473         Decrease maxNFASize based on analysis of memory usage and compiling and interpreting time.
1474
1475 2015-05-29  Brady Eidson  <beidson@apple.com>
1476
1477         WebSQL default functions can bypass authorizer.
1478         <rdar://problem/21048994> and https://bugs.webkit.org/show_bug.cgi?id=145463
1479
1480         Reviewed by Sam Weinig and Alexey Proskuryakov.
1481
1482         No new tests yet.
1483
1484         * platform/sql/SQLiteDatabase.cpp:
1485         (WebCore::unauthorizedSQLFunction): Function to install into SQLite to override some built-in functions.
1486         (WebCore::SQLiteDatabase::open):
1487         (WebCore::SQLiteDatabase::overrideUnauthorizedFunctions): Install function overrides for functions that
1488            take arbitrary input that are also meant to be disabled by virtue of them not being whitelisted.
1489         * platform/sql/SQLiteDatabase.h:
1490
1491 2015-05-29  Roger Fong  <roger_fong@apple.com>
1492
1493         Unreviewed. Shift fullscreen controls down 20px.
1494         <rdar://problem/21161523>
1495
1496         * Modules/mediacontrols/mediaControlsApple.css:
1497         (video:-webkit-full-screen::-webkit-media-controls-panel):
1498         Fullscreen control panel is too high and overlaps with caption menu.
1499         Shift it down 20px.
1500
1501 2015-05-28  Simon Fraser  <simon.fraser@apple.com>
1502
1503         Some assertion failures in compositing code after r183820
1504         https://bugs.webkit.org/show_bug.cgi?id=144630
1505
1506         Reviewed by Alexey Proskuryakov.
1507
1508         Reinstate the assertion commented out in r183843. Fixed by having blending no longer
1509         escape the media elements, which was fixed via bug 145420.
1510
1511         * rendering/RenderLayerCompositor.cpp:
1512         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1513
1514 2015-05-29  Hunseop Jeong  <hs85.jeong@samsung.com>
1515
1516         Use modern for-loops in WebCore/plugins, storage, style, testing and workers.
1517         https://bugs.webkit.org/show_bug.cgi?id=145425
1518
1519         Reviewed by Darin Adler.
1520
1521         No new tests, no behavior changes.
1522
1523         * plugins/DOMMimeTypeArray.cpp:
1524         (WebCore::DOMMimeTypeArray::canGetItemsForName):
1525         * plugins/DOMPlugin.cpp:
1526         (WebCore::DOMPlugin::canGetItemsForName):
1527         * plugins/DOMPluginArray.cpp:
1528         (WebCore::DOMPluginArray::canGetItemsForName):
1529         * plugins/PluginData.cpp:
1530         (WebCore::PluginData::getWebVisibleMimesAndPluginIndices):
1531         * plugins/PluginMainThreadScheduler.cpp:
1532         (WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin):
1533         (WebCore::PluginMainThreadScheduler::dispatchCalls):
1534         * storage/StorageEventDispatcher.cpp:
1535         (WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
1536         (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
1537         (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames):
1538         * storage/StorageMap.cpp:
1539         (WebCore::StorageMap::importItems):
1540         * style/StyleResolveTree.cpp:
1541         (WebCore::Style::pseudoStyleCacheIsInvalid):
1542         * testing/Internals.cpp:
1543         (WebCore::Internals::nodesFromRect):
1544         * workers/Worker.cpp:
1545         (WebCore::networkStateChanged):
1546         * workers/WorkerGlobalScope.cpp:
1547         (WebCore::WorkerGlobalScope::importScripts):
1548
1549 2015-05-29  Alex Christensen  <achristensen@webkit.org>
1550
1551         Unreviewed build fix when using content extensions debugging.
1552
1553         * contentextensions/ContentExtensionCompiler.cpp:
1554         (WebCore::ContentExtensions::compileRuleList):
1555         Update variable name.
1556
1557 2015-05-29  Brady Eidson  <beidson@apple.com>
1558
1559         Typo followup to r184987
1560
1561         Unreviewed.
1562
1563         * loader/FrameLoader.cpp:
1564         (WebCore::FrameLoader::loadURLIntoChildFrame): Misplaced brace.
1565
1566 2015-05-29  Brady Eidson  <beidson@apple.com>
1567
1568         Small FrameLoader refactoring.
1569         https://bugs.webkit.org/show_bug.cgi?id=145459
1570
1571         Reviewed by Alex Christensen.
1572
1573         No new tests (No behavior change).
1574
1575         * loader/FrameLoader.cpp:
1576         (WebCore::FrameLoader::loadURLIntoChildFrame):
1577         (WebCore::FrameLoader::loadFrameRequest):
1578         (WebCore::FrameLoader::loadURL):
1579         (WebCore::FrameLoader::loadPostRequest):
1580         * loader/FrameLoader.h:
1581
1582 2015-05-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1583
1584         MediaDevices.getUserMedia should reject promise instead of throwing exceptions
1585         https://bugs.webkit.org/show_bug.cgi?id=145282
1586
1587         Reviewed by Darin Adler.
1588
1589         Ensuring at the custom binding level that all potential errors are used to reject promise.
1590         Cleaned up the wrappers by removing unneeded RefPtr.
1591
1592         Covered by modified test.
1593
1594         * Modules/mediastream/MediaDevices.cpp:
1595         (WebCore::MediaDevices::getUserMedia):
1596         * Modules/mediastream/MediaDevices.h:
1597         * Modules/mediastream/UserMediaRequest.cpp:
1598         (WebCore::UserMediaRequest::create):
1599         * bindings/js/JSMediaDevicesCustom.cpp:
1600         (WebCore::JSMediaDevices::getUserMedia):
1601
1602 2015-05-28  Hunseop Jeong  <hs85.jeong@samsung.com>
1603
1604         Replaced 0 with nullptr in WebCore/accessibility.
1605         https://bugs.webkit.org/show_bug.cgi?id=145309
1606
1607         Reviewed by Chris Fleizach.
1608
1609         No new tests, no behavior change.
1610
1611         * accessibility/AccessibilityRenderObject.cpp:
1612         (WebCore::AccessibilityRenderObject::mathPrescripts):
1613         (WebCore::AccessibilityRenderObject::mathPostscripts):
1614         * accessibility/AccessibilityScrollView.cpp:
1615         (WebCore::AccessibilityScrollView::scrollBar):
1616         * accessibility/atk/AXObjectCacheAtk.cpp:
1617         (WebCore::notifyChildrenSelectionChange):
1618         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
1619         (webkitAccessibleHyperlinkInit):
1620         * accessibility/atk/WebKitAccessibleInterfaceDocument.cpp:
1621         (webkitAccessibleDocumentGetAttributes):
1622         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1623         (getAttributeSetForAccessibilityObject):
1624         (attributeSetDifference):
1625         * accessibility/atk/WebKitAccessibleUtil.h:
1626         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1627         (webkitAccessibleRefChild):
1628         (webkitAccessibleGetAttributes):
1629         (webkitAccessibleGetObjectLocale):
1630         (getInterfaceMaskFromObject):
1631         (objectFocusedAndCaretOffsetUnignored):
1632         (cacheAndReturnAtkProperty):
1633
1634 2015-05-28  Zalan Bujtas  <zalan@apple.com>
1635
1636         Subpixel rendering: Pixel crack in text selection of simple text in <textarea>.
1637         https://bugs.webkit.org/show_bug.cgi?id=145393
1638         rdar://problem/19918941
1639
1640         Reviewed by Darin Adler.
1641
1642         Float to LayoutUnit conversion is lossy. To ensure that selection
1643         painting always lines up (snaps) properly, the calculated width needs to
1644         be adjusted by ceiling the float to the next LayoutUnit value.
1645
1646         Test: fast/text/hidpi-text-selection-gap-between-words.html
1647
1648         * platform/graphics/FontCascade.cpp:
1649         (WebCore::FontCascade::adjustSelectionRectForSimpleText):
1650         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1651         (WebCore::FontCascade::adjustSelectionRectForComplexText):
1652
1653 2015-05-28  Andreas Kling  <akling@apple.com>
1654
1655         GraphicsLayerCA should start out with m_intersectsCoverageRect=false
1656         <https://webkit.org/b/145443>
1657         <rdar://problem/19685798>
1658
1659         Reviewed by Simon Fraser.
1660
1661         Since the coverage rect of a newly-constructed GraphicsLayerCA is always empty,
1662         there's no way that the layer's own bounding box can intersect with it.
1663         Hence the m_intersectsCoverageRect flag should be false after construction.
1664
1665         This fixes an issue where compositing layers in subframes would be marked as
1666         non-volatile, despite being far outside the viewport and coverage rect.
1667
1668         Test: compositing/visible-rect/iframe-with-layers-outside-viewport.html
1669
1670         * platform/graphics/ca/GraphicsLayerCA.cpp:
1671         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
1672
1673 2015-05-28  Commit Queue  <commit-queue@webkit.org>
1674
1675         Unreviewed, rolling out r184796 and r184832.
1676         https://bugs.webkit.org/show_bug.cgi?id=145449
1677
1678         2% performance regression (Requested by litherum on #webkit).
1679
1680         Reverted changesets:
1681
1682         "[Cocoa] Use CTFontDrawGlyphs() instead of
1683         CGContextShowGlyphsWithAdvances()/CGContextShowGlyphsAtPositions()"
1684         https://bugs.webkit.org/show_bug.cgi?id=145234
1685         http://trac.webkit.org/changeset/184796
1686
1687         "Cleanup after r184796"
1688         https://bugs.webkit.org/show_bug.cgi?id=145333
1689         http://trac.webkit.org/changeset/184832
1690
1691 2015-05-28  Matt Rajca  <mrajca@apple.com>
1692
1693         Rename HTMLMediaSession to MediaElementSession to reserve "media session" for the Media Session API.
1694         https://bugs.webkit.org/show_bug.cgi?id=145440
1695
1696         Reviewed by Eric Carlson.
1697
1698         * CMakeLists.txt:
1699         * WebCore.vcxproj/WebCore.vcxproj:
1700         * WebCore.vcxproj/WebCore.vcxproj.filters:
1701         * WebCore.xcodeproj/project.pbxproj:
1702         * html/HTMLMediaElement.cpp:
1703         (WebCore::HTMLMediaElement::HTMLMediaElement):
1704         (WebCore::HTMLMediaElement::loadInternal):
1705         (WebCore::HTMLMediaElement::loadResource):
1706         (WebCore::HTMLMediaElement::suspend):
1707         (WebCore::HTMLMediaElement::resume):
1708         (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture):
1709         (WebCore::HTMLMediaElement::mediaState):
1710         * html/HTMLMediaElement.h:
1711         (WebCore::HTMLMediaElement::mediaSession):
1712         * html/MediaElementSession.cpp: Renamed from Source/WebCore/html/HTMLMediaSession.cpp.
1713         (WebCore::restrictionName):
1714         (WebCore::MediaElementSession::MediaElementSession):
1715         (WebCore::MediaElementSession::registerWithDocument):
1716         (WebCore::MediaElementSession::unregisterWithDocument):
1717         (WebCore::MediaElementSession::addBehaviorRestriction):
1718         (WebCore::MediaElementSession::removeBehaviorRestriction):
1719         (WebCore::MediaElementSession::playbackPermitted):
1720         (WebCore::MediaElementSession::dataLoadingPermitted):
1721         (WebCore::MediaElementSession::fullscreenPermitted):
1722         (WebCore::MediaElementSession::pageAllowsDataLoading):
1723         (WebCore::MediaElementSession::pageAllowsPlaybackAfterResuming):
1724         (WebCore::MediaElementSession::showPlaybackTargetPicker):
1725         (WebCore::MediaElementSession::hasWirelessPlaybackTargets):
1726         (WebCore::MediaElementSession::wirelessVideoPlaybackDisabled):
1727         (WebCore::MediaElementSession::setWirelessVideoPlaybackDisabled):
1728         (WebCore::MediaElementSession::setHasPlaybackTargetAvailabilityListeners):
1729         (WebCore::MediaElementSession::setPlaybackTarget):
1730         (WebCore::MediaElementSession::targetAvailabilityChangedTimerFired):
1731         (WebCore::MediaElementSession::externalOutputDeviceAvailableDidChange):
1732         (WebCore::MediaElementSession::canPlayToWirelessPlaybackTarget):
1733         (WebCore::MediaElementSession::isPlayingToWirelessPlaybackTarget):
1734         (WebCore::MediaElementSession::setShouldPlayToPlaybackTarget):
1735         (WebCore::MediaElementSession::mediaStateDidChange):
1736         (WebCore::MediaElementSession::effectivePreloadForElement):
1737         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
1738         (WebCore::MediaElementSession::mediaEngineUpdated):
1739         (WebCore::MediaElementSession::allowsAlternateFullscreen):
1740         (WebCore::MediaElementSession::maximumMediaSourceBufferSize):
1741         * html/MediaElementSession.h: Renamed from Source/WebCore/html/HTMLMediaSession.h.
1742         * testing/Internals.cpp:
1743         (WebCore::Internals::setMediaElementRestrictions):
1744         (WebCore::Internals::setAudioContextRestrictions):
1745
1746 2015-05-28  Myles C. Maxfield  <mmaxfield@apple.com>
1747
1748         Crash under ICU with ASAN during editing/selection/move-by-word-visually-crash-test-5.html
1749         https://bugs.webkit.org/show_bug.cgi?id=145429
1750         <rdar://problem/20992218>
1751
1752         Reviewed by Alexey Proskuryakov.
1753
1754         WebKit uses some strings which contain the lower 8-bits of UTF-16 (thereby saving space). However,
1755         ICU doesn't understand this encoding. When we want to use ICU functions with strings in this encoding,
1756         we create a UTextProvider which converts our encoded strings to UTF-16 for ICU, one chunk at a time.
1757         This object contains a vtable which we populate to perform the conversion.
1758
1759         The WebKit function which actually returns the UTF-16 chunks has two relevant arguments: an index into
1760         the encoded string which ICU is requesting, and a direction from that index which ICU is interested
1761         in. This function populates a "chunk" which is characterized by a pointer to a buffer, the length of
1762         the populated data in the buffer, and an offset into the chunk which represents the index that the
1763         requested character was put into.
1764
1765         When ICU requests data going backward, we fill in the chunk accordingly, with the requested character
1766         all the way at the end. We then set the offset equal to the length of the buffer. However, this length
1767         value is stale from the previous time the function ran. Therefore, ICU was reading the wrong index in
1768         the chunk when expecting the requested character.
1769
1770         Covered by editing/selection/move-by-word-visually-crash-test-5.html.
1771
1772         * platform/text/icu/UTextProviderLatin1.cpp:
1773         (WebCore::uTextLatin1Access):
1774
1775 2015-05-28  Eric Carlson  <eric.carlson@apple.com>
1776
1777         [iOS] Fix controls bug caused by r184794
1778         https://bugs.webkit.org/show_bug.cgi?id=145445
1779
1780         Reviewed by Dean Jackson.
1781
1782         * Modules/mediacontrols/mediaControlsiOS.js:
1783         (ControllerIOS.prototype.showControls): Check video.controls instead of trying to call
1784         showInlinePlaybackPlaceholderOnly, which doesn't exist.
1785
1786 2015-05-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
1787
1788         Code clean up for extracting information from the mix of WritingMode and TextDirection
1789         https://bugs.webkit.org/show_bug.cgi?id=143399
1790
1791         Reviewed by Darin Adler.
1792         
1793         There should be eight TextFlows. A TextFlow consists of two directions.
1794         The first one controls the inline growing direction and the second one
1795         controls the block growing direction. We are going to use the cardinal
1796         directions to define these combinations.
1797
1798         We need to extract the following information easily from the TextFlow
1799
1800         -- isTextFlowReversed() // RTL
1801         -- isTextFlowFlipped()  // the opposite direction to normal
1802         -- isTextFlowVertical() // The line grows vertically
1803         
1804         Mixing WritingMode and TextDirection into TextFlow and choosing their values
1805         carefully to ease implementing the above functions can make things clearer.
1806
1807         * Modules/notifications/Notification.h:
1808         * platform/graphics/TextRun.h:
1809         * platform/ios/SelectionRect.h:
1810         * platform/text/BidiResolver.h:
1811         * platform/text/StringWithDirection.h:
1812         * platform/text/TextFlags.h:
1813         (WebCore::isLeftToRightDirection): Deleted.
1814         enum TextDirection is moved from TextFlags.h to WritingMode.h. So include
1815         WritingMode.h instead of including TextFlags.h.
1816         
1817         * css/CSSProperty.cpp:
1818         (WebCore::resolveToPhysicalProperty): Instead of handling the eight possible
1819         cases of the text flows one by one, we can map from a LogicalSide to a
1820         PhysicalSide using the TextFlow value.
1821         
1822         * platform/LengthBox.h:
1823         (WebCore::BoxExtent::before):
1824         (WebCore::BoxExtent::after):
1825         (WebCore::BoxExtent::start):
1826         (WebCore::BoxExtent::end):
1827         Use mapLogicalSideToPhysicalSide() to convert from a LogicalSide to a PhysicalSide.
1828         
1829         * platform/text/WritingMode.h:
1830         (WebCore::isLeftToRightDirection): Usually the default enum is defined
1831         first. And usually the default value is equal to zero. Since LTR is the
1832         default for the text direction, it should be defined before RTL.
1833         
1834         (WebCore::makeTextFlow): Returns a TextFlow given a WritingMode and a
1835         TextDirection.
1836         
1837         (WebCore::isReversedTextFlow): Returns true if the text direction is RTL.
1838         
1839         (WebCore::isFlippedTextFlow):
1840         (WebCore::isFlippedWritingMode): Returns true if the block growing direction
1841         is in the opposite direction of normal.
1842         
1843         (WebCore::isVerticalTextFlow):
1844         (WebCore::isVerticalWritingMode): Returns true if the line grows vertically.
1845                
1846         (WebCore::isHorizontalWritingMode):
1847         (WebCore::isFlippedLinesWritingMode): Use isVerticalWritingMode() and 
1848         isFlippedWritingMode() to answer these questions.
1849         
1850         (WebCore::isHorizontalPhysicalSide): 
1851         (WebCore::mirrorPhysicalSide): top <-> bottom and left <-> right conversion.
1852         (WebCore::rotatePhysicalSide): top <-> left and right <-> bottom conversion.
1853         
1854         (WebCore::mapLogicalSideToPhysicalSide): Maps a LogicalSide to a PhysicalSide
1855         using either the TextFlow or the WritingMode.
1856         
1857         (WebCore::isFlippedBlocksWritingMode): Deleted.
1858         * rendering/RenderMultiColumnSet.cpp:
1859         (WebCore::RenderMultiColumnSet::collectLayerFragments):
1860         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
1861         * rendering/shapes/Shape.cpp:
1862         (WebCore::physicalRectToLogical):
1863         (WebCore::physicalPointToLogical):
1864         * rendering/style/RenderStyle.h:
1865         Rename isFlippedBlocksWritingMode() to be isFlippedWritingMode() so we can
1866         be consistent with other WritingMode query functions.
1867
1868 2015-05-28  Matt Rajca  <mrajca@apple.com>
1869
1870         Add ENABLE_MEDIA_SESSION feature flag (which is off by default).
1871         https://bugs.webkit.org/show_bug.cgi?id=145415
1872
1873         Reviewed by Eric Carlson.
1874
1875         * Configurations/FeatureDefines.xcconfig:
1876
1877 2015-05-28  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1878
1879         [Streams API] ReadableStreamReader should not be exposed
1880         https://bugs.webkit.org/show_bug.cgi?id=143564
1881
1882         Reviewed by Darin Adler.
1883
1884         Covered by rebased tests.
1885
1886         * Modules/streams/ReadableStreamReader.idl: Adding NoInterfaceObject to ReadableStreamReader.idl.
1887
1888 2015-05-28  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1889
1890         [CMake] Improve detection and usage of GL/GLES/EGL libraries.
1891         https://bugs.webkit.org/show_bug.cgi?id=145408
1892
1893         Reviewed by Carlos Garcia Campos.
1894
1895         No new tests, no behavior changes.
1896
1897         * CMakeLists.txt: Ensure that we include the libraries and includes
1898         for the GL/GLESv2/EGL libraries before including the ANGLE directories.
1899         Define also any CFLAG that the system GL/GLESv2/EGL libraries may need.
1900         * PlatformEfl.cmake: Remove some includes that are now unneeded,
1901         because we are including now the EGL libraries on CMakeLists.txt
1902         * PlatformGTK.cmake: Remove unneeded include (We are including the EGL
1903         libraries now on CMakeLists.txt)
1904
1905 2015-05-28  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1906
1907         Binding generator should support interfaces with CustomConstructor and NoInterfaceObject
1908         https://bugs.webkit.org/show_bug.cgi?id=145016
1909
1910         Reviewed by Darin Adler.
1911
1912         Updated code generator to generate the necessary declarations (constructor property in the prototype, the constructor class).
1913         In the case of CustomConstructor with NoInterfaceObject, the implementation of the constructor property related JS function is changed as follow:
1914         It creates a constructor object and shadows the constructor property JS function with this object.
1915         This ensures that only one constructor object is created per prototype.
1916         The constructor is not exposed as it is not added to the global object constructor map.
1917
1918         NoInterfaceObject is asking to not make the interface visible, which is contradictory with having a visible constructor of the interface.
1919         The case for having NoInterfaceObject and CustomConstructor is the following:
1920         We do not want to expose the interface but we still want to have a constructor property on the prototype of objects implementing the interface.
1921         One such case is https://streams.spec.whatwg.org/#globals
1922
1923         Added TestCustomConstructorWithNoInterfaceObject.idl to check that case.
1924
1925         * bindings/scripts/CodeGeneratorJS.pm:
1926         (GenerateHeader):
1927         (GenerateAttributesHashTable):
1928         (GenerateImplementation):
1929         (HasConstructorProperty):
1930         * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObject.cpp: Added.
1931         (WebKit::kit):
1932         (WebKit::core):
1933         (WebKit::wrapTestCustomConstructorWithNoInterfaceObject):
1934         (webkit_dom_test_custom_constructor_with_no_interface_object_finalize):
1935         (webkit_dom_test_custom_constructor_with_no_interface_object_constructor):
1936         (webkit_dom_test_custom_constructor_with_no_interface_object_class_init):
1937         (webkit_dom_test_custom_constructor_with_no_interface_object_init):
1938         * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObject.h: Added.
1939         * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObjectPrivate.h: Added.
1940         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: Added.
1941         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::create):
1942         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::createStructure):
1943         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::JSTestCustomConstructorWithNoInterfaceObjectPrototype):
1944         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
1945         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::createStructure):
1946         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor):
1947         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
1948         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
1949         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation):
1950         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
1951         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::createPrototype):
1952         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getPrototype):
1953         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::destroy):
1954         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::~JSTestCustomConstructorWithNoInterfaceObject):
1955         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
1956         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getConstructor):
1957         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::isReachableFromOpaqueRoots):
1958         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::finalize):
1959         (WebCore::toJS):
1960         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped):
1961         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: Added.
1962         (WebCore::wrapperOwner):
1963         (WebCore::toJS):
1964         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.h: Added.
1965         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.mm: Added.
1966         (-[DOMTestCustomConstructorWithNoInterfaceObject dealloc]):
1967         (-[DOMTestCustomConstructorWithNoInterfaceObject finalize]):
1968         (core):
1969         (kit):
1970         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObjectInternal.h: Added.
1971         * bindings/scripts/test/TestCustomConstructor.idl: Added.
1972
1973 2015-05-19  Jon Honeycutt  <jhoneycutt@apple.com>
1974
1975         [iOS] When viewing an MJPEG stream as the main resource, only the first
1976         frame paints
1977
1978         <https://bugs.webkit.org/show_bug.cgi?id=145185>
1979         <rdar://problem/20124694>
1980
1981         This bug is caused by state not being restored between successive loads
1982         of multipart/x-mixed-replace content. Each part of the stream is not
1983         treated as a wholly new load, so if state is cleared as part of the
1984         previous page being destroyed, it may not be restored when loading
1985         the next stream part.
1986
1987         On WK1, tile cache updates are disabled in FrameView::clear(), which is
1988         called as the previous page is destroyed, but were not being
1989         reenabled when loading new replacement content from the stream.
1990
1991         On WK2, the exposed content rect was being reset to an empty rect as
1992         the previous page was destroyed, but it was not being reset by loading
1993         replacement content.
1994
1995         To fix these issues, I added two WebFrameLoaderClient callbacks;
1996         willReplaceMultipartContent() and didReplaceMultipartContent(). These
1997         are used to save and restore state between successive loads.
1998
1999         Reviewed by Darin Adler.
2000
2001         * loader/DocumentLoader.cpp:
2002         Call the new client callbacks.
2003         (WebCore::DocumentLoader::commitLoad):
2004         If replacing content in a multipart/x-mixed-replace stream, call the
2005         WebFrameLoaderClient's didReplaceMultipartContent().
2006
2007         (WebCore::DocumentLoader::setupForReplace):
2008         Call the WebFrameLoaderClient's willReplaceMultipartContent().
2009
2010         * loader/EmptyClients.h:
2011
2012         * loader/FrameLoaderClient.h:
2013
2014         * page/FrameView.cpp:
2015         (WebCore::FrameView::didReplaceMultipartContent):
2016         Re-enable tile cache updates that were disabled in FrameView::clear().
2017         This fixes the issue for WK1.
2018
2019         * page/FrameView.h:
2020         Declare an exported function, didReplaceMultipartContent(), that WebKit
2021         can call.
2022
2023 2015-05-27  Brady Eidson  <beidson@apple.com>
2024
2025         Remove unused ResourceRequest "user initiated" flag.
2026         https://bugs.webkit.org/show_bug.cgi?id=145428
2027
2028         Reviewed by Alexey Proskuryakov.
2029
2030         No new tests (No change in behavior).
2031
2032         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2033         * platform/mac/WebCoreSystemInterface.mm:
2034
2035         * platform/network/ResourceRequestBase.h:
2036         (WebCore::ResourceRequestBase::initiatedByUserGesture): Deleted.
2037         (WebCore::ResourceRequestBase::setInitiatedByUserGesture): Deleted.
2038         (WebCore::ResourceRequestBase::encodeWithoutPlatformData): Deleted.
2039         (WebCore::ResourceRequestBase::decodeWithoutPlatformData): Deleted.
2040
2041         * platform/network/cf/ResourceRequestCFNet.cpp:
2042         (WebCore::ResourceRequest::doUpdatePlatformRequest): Deleted.
2043         (WebCore::ResourceRequest::doUpdateResourceRequest): Deleted.
2044
2045         * platform/network/cocoa/ResourceRequestCocoa.mm:
2046         (WebCore::ResourceRequest::doUpdateResourceRequest): Deleted.
2047         (WebCore::ResourceRequest::doUpdatePlatformRequest): Deleted.
2048
2049 2015-05-27  Brady Eidson  <beidson@apple.com>
2050
2051         Add a "should open urls externally" flag to DocumentLoader.
2052         rdar://problem/21025301 and https://bugs.webkit.org/show_bug.cgi?id=145417
2053
2054         Reviewed by Geoff Garen.
2055
2056         No new tests (No change in behavior, testable at API level with a followup patch)
2057
2058         * loader/DocumentLoader.cpp:
2059         (WebCore::DocumentLoader::setTriggeringAction): Apply the current flag value to the 
2060           new NavigationAction so it can be used later.
2061         * loader/DocumentLoader.h:
2062         (WebCore::DocumentLoader::setShouldOpenExternalURLsPolicy):
2063         (WebCore::DocumentLoader::shouldOpenExternalURLsPolicy):
2064         (WebCore::DocumentLoader::setTriggeringAction): Deleted.
2065
2066         FrameLoadRequest should hold the new flag to pass into FrameLoader machinery:
2067         * loader/FrameLoadRequest.h:
2068         (WebCore::FrameLoadRequest::setShouldOpenExternalURLsPolicy):
2069         (WebCore::FrameLoadRequest::shouldOpenExternalURLsPolicy):
2070
2071         * loader/FrameLoader.cpp:
2072         (WebCore::FrameLoader::load): Set the flag on the newly created DocumentLoader but
2073           only if it is for the main frame.
2074
2075         * loader/FrameLoaderTypes.h: Add a new enum for the flag.
2076
2077         Navigation action should hold the new flag to pass to the policy delegate:
2078         * loader/NavigationAction.cpp:
2079         (WebCore::NavigationAction::NavigationAction):
2080         * loader/NavigationAction.h:
2081         (WebCore::NavigationAction::shouldOpenExternalURLsPolicy):
2082         (WebCore::NavigationAction::setShouldOpenExternalURLsPolicy):
2083
2084         * loader/PolicyChecker.cpp:
2085         (WebCore::PolicyChecker::checkNavigationPolicy): Include the flag from the DocumentLoader
2086           in the NavigationAction.
2087
2088 2015-05-27  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2089
2090         Purge PassRefPtr in WebCore/Modules - 2
2091         https://bugs.webkit.org/show_bug.cgi?id=145304
2092
2093         Reviewed by Darin Adler.
2094
2095         As a step to remove PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr.
2096
2097         No new tests, no behavior changes
2098
2099         * Modules/mediasource/SourceBufferList.h:
2100         * Modules/mediastream/AllAudioCapabilities.h:
2101         (WebCore::AllAudioCapabilities::create):
2102         * Modules/mediastream/AllVideoCapabilities.h:
2103         (WebCore::AllVideoCapabilities::create):
2104         * Modules/mediastream/CapabilityRange.cpp:
2105         (WebCore::CapabilityRange::create):
2106         * Modules/mediastream/CapabilityRange.h:
2107         * Modules/mediastream/MediaSourceStates.cpp:
2108         (WebCore::MediaSourceStates::create):
2109         * Modules/mediastream/MediaStream.cpp:
2110         (WebCore::MediaStream::create):
2111         * Modules/mediastream/MediaStreamTrack.cpp:
2112         (WebCore::MediaStreamTrack::create):
2113         * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
2114         (WebCore::MediaStreamTrackSourcesRequest::create):
2115         * Modules/mediastream/MediaTrackConstraint.cpp:
2116         (WebCore::MediaTrackConstraint::create):
2117         * Modules/mediastream/MediaTrackConstraint.h:
2118         * Modules/mediastream/RTCConfiguration.h:
2119         (WebCore::RTCConfiguration::create):
2120         * Modules/mediastream/RTCIceServer.h:
2121         (WebCore::RTCIceServer::create):
2122         * Modules/mediastream/RTCSessionDescription.cpp:
2123         (WebCore::RTCSessionDescription::create):
2124         * Modules/mediastream/RTCSessionDescription.h:
2125         * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
2126         (WebCore::RTCSessionDescriptionRequestImpl::create):
2127         * Modules/mediastream/RTCStatsReport.cpp:
2128         (WebCore::RTCStatsReport::create):
2129         * Modules/mediastream/RTCStatsReport.h:
2130         * Modules/mediastream/RTCStatsRequestImpl.cpp:
2131         (WebCore::RTCStatsRequestImpl::create):
2132         * Modules/mediastream/RTCStatsRequestImpl.h:
2133         * Modules/mediastream/RTCStatsResponse.cpp:
2134         (WebCore::RTCStatsResponse::create):
2135         * Modules/mediastream/RTCStatsResponse.h:
2136         * Modules/mediastream/RTCVoidRequestImpl.cpp:
2137         (WebCore::RTCVoidRequestImpl::create):
2138         * Modules/mediastream/RTCVoidRequestImpl.h:
2139         * Modules/mediastream/SourceInfo.cpp:
2140         (WebCore::SourceInfo::create):
2141         * Modules/mediastream/SourceInfo.h:
2142         * Modules/mediastream/UserMediaRequest.cpp:
2143         (WebCore::UserMediaRequest::create):
2144         * Modules/mediastream/UserMediaRequest.h:
2145         * Modules/quota/StorageInfo.h:
2146         (WebCore::StorageInfo::create):
2147         * Modules/quota/StorageQuota.h:
2148         (WebCore::StorageQuota::create):
2149         * Modules/speech/SpeechSynthesis.cpp:
2150         (WebCore::SpeechSynthesis::create):
2151         * Modules/speech/SpeechSynthesis.h:
2152         * Modules/speech/SpeechSynthesisUtterance.cpp:
2153         (WebCore::SpeechSynthesisUtterance::create):
2154         * Modules/speech/SpeechSynthesisUtterance.h:
2155         * Modules/speech/SpeechSynthesisVoice.cpp:
2156         (WebCore::SpeechSynthesisVoice::create):
2157         * Modules/speech/SpeechSynthesisVoice.h:
2158         * Modules/webaudio/ChannelMergerNode.cpp:
2159         (WebCore::ChannelMergerNode::create):
2160         * Modules/webaudio/ChannelMergerNode.h:
2161         * Modules/webaudio/ChannelSplitterNode.cpp:
2162         (WebCore::ChannelSplitterNode::create):
2163         * Modules/webaudio/ChannelSplitterNode.h:
2164         * Modules/webaudio/DefaultAudioDestinationNode.h:
2165         (WebCore::DefaultAudioDestinationNode::create):
2166         * Modules/webaudio/GainNode.h:
2167         (WebCore::GainNode::create):
2168         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
2169         (WebCore::MediaElementAudioSourceNode::create):
2170         * Modules/webaudio/MediaElementAudioSourceNode.h:
2171         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
2172         (WebCore::MediaStreamAudioDestinationNode::create):
2173         * Modules/webaudio/MediaStreamAudioDestinationNode.h:
2174         * Modules/webaudio/MediaStreamAudioSource.cpp:
2175         (WebCore::MediaStreamAudioSource::create):
2176         * Modules/webaudio/MediaStreamAudioSource.h:
2177         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
2178         (WebCore::MediaStreamAudioSourceNode::create):
2179         * Modules/webaudio/MediaStreamAudioSourceNode.h:
2180         * Modules/webaudio/OscillatorNode.cpp:
2181         (WebCore::OscillatorNode::setType):
2182         * Modules/webaudio/PannerNode.h:
2183         (WebCore::PannerNode::create):
2184         * Modules/webaudio/PeriodicWave.cpp:
2185         (WebCore::PeriodicWave::create):
2186         (WebCore::PeriodicWave::createSine):
2187         (WebCore::PeriodicWave::createSquare):
2188         (WebCore::PeriodicWave::createSawtooth):
2189         (WebCore::PeriodicWave::createTriangle):
2190         * Modules/webaudio/PeriodicWave.h:
2191         * Modules/webaudio/ScriptProcessorNode.cpp:
2192         (WebCore::ScriptProcessorNode::create):
2193         * Modules/webaudio/ScriptProcessorNode.h:
2194         * Modules/webaudio/WaveShaperNode.h:
2195         (WebCore::WaveShaperNode::create):
2196
2197 2015-05-27  Simon Fraser  <simon.fraser@apple.com>
2198
2199         REGRESSION (r183820): webkit.org/blog/ background painting issue on reload, when the page contains videos
2200         https://bugs.webkit.org/show_bug.cgi?id=145420
2201
2202         Reviewed by Dean Jackson.
2203
2204         After r183820, the media controls no longer had a wrapper that created CSS stacking context.
2205         The media controls on Mac use mix-blend-mode, which causes the compositing code to look for
2206         a stacking context ancestor and make it composited. After this change, it would walk up
2207         to a layer outside of the media element (e.g. the document element's layer), and make
2208         that composited. This triggered bugs with root background painting.
2209
2210         Prevent mix-blend-mode affecting content outside the media elements by having the media element's
2211         layer act as a stacking context.
2212
2213         Test: media/controls-layers.html
2214
2215         * rendering/RenderLayer.cpp:
2216         (WebCore::RenderLayer::RenderLayer):
2217         * rendering/RenderLayer.h:
2218
2219 2015-05-27  Andreas Kling  <akling@apple.com>
2220
2221         [WK2] Local storage areas should get torn down when they have no remaining references.
2222         <https://webkit.org/b/143339>
2223         <rdar://problem/20156436>
2224
2225         Reviewed by Darin Adler.
2226
2227         Add StorageArea::securityOrigin() implementations.
2228
2229         * loader/EmptyClients.cpp:
2230         * storage/StorageArea.h:
2231
2232 2015-05-27  Dean Jackson  <dino@apple.com>
2233
2234         img.currentSrc problem in strict mode with old picturefill
2235         https://bugs.webkit.org/show_bug.cgi?id=144095
2236         <rdar://problem/21087013>
2237
2238         Reviewed by Simon Fraser.
2239
2240         Add a PICTURE_SIZES flag. This allows us to easily remove the currentSrc
2241         attribute on HTMLImageElement, which is causing some issues with
2242         <picture> polyfills.
2243
2244         * Configurations/FeatureDefines.xcconfig:
2245         * html/HTMLImageElement.cpp:
2246         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate): Add guard around use of m_currentSrc.
2247         * html/HTMLImageElement.h:
2248         * html/HTMLImageElement.idl: Guard the currentSrc attribute.
2249         * html/parser/HTMLPreloadScanner.cpp:
2250         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2251         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
2252
2253 2015-05-27  Daniel Bates  <dabates@apple.com>
2254
2255         Attempt to fix internal build following <http://trac.webkit.org/changeset/184760>
2256         (https://bugs.webkit.org/show_bug.cgi?id=145289)
2257
2258         Reviewed by Jer Noble.
2259
2260         * platform/spi/mac/AVFoundationSPI.h:
2261
2262 2015-05-27  Jeremy Jones  <jeremyj@apple.com>
2263
2264         Refactor WebKit1 specific threading code out of WebVideoFullscreen code that is shared with WebKit2.
2265         https://bugs.webkit.org/show_bug.cgi?id=143954
2266
2267         Reviewed by Darin Adler.
2268
2269         WebVideoFullscreenInterfaceAVKit is used in both WebKit1 and WebKit2. In WebKit1, the model runs in the WebThread, while
2270         the interface is on the main thread. So there is code to dispatch between these two thread when communicating between the
2271         interface and the model. In WebKit2, this is handled automatically by the IPC mechanism. As a result, the threading code
2272         in WebVideoFullscreenbInterfaceAVKit and in WebVideoFullscreenModelVideoElement is redundant in WebKit2 and relies on
2273         WebThreadRun being a no-op in WebKit2.
2274
2275         This change clarifies this and simplifies the WebKit2 path by moving the WebKit1 specific threading code into
2276         WebVideoFullscreenControllerContext, which is the WebKit1 specific controller.
2277
2278         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2279         (WebVideoFullscreenControllerContext::WebVideoFullscreenControllerContext):
2280         (WebVideoFullscreenControllerContext::setController):
2281         (WebVideoFullscreenControllerContext::didSetupFullscreen):
2282         (WebVideoFullscreenControllerContext::didExitFullscreen):
2283         (WebVideoFullscreenControllerContext::didCleanupFullscreen):
2284         (WebVideoFullscreenControllerContext::fullscreenMayReturnToInline):
2285         (WebVideoFullscreenControllerContext::resetMediaState):
2286         (WebVideoFullscreenControllerContext::setDuration):
2287         (WebVideoFullscreenControllerContext::setCurrentTime):
2288         (WebVideoFullscreenControllerContext::setBufferedTime):
2289         (WebVideoFullscreenControllerContext::setRate):
2290         (WebVideoFullscreenControllerContext::setVideoDimensions):
2291         (WebVideoFullscreenControllerContext::setSeekableRanges):
2292         (WebVideoFullscreenControllerContext::setCanPlayFastReverse):
2293         (WebVideoFullscreenControllerContext::setAudioMediaSelectionOptions):
2294         (WebVideoFullscreenControllerContext::setLegibleMediaSelectionOptions):
2295         (WebVideoFullscreenControllerContext::setExternalPlayback):
2296         (WebVideoFullscreenControllerContext::play):
2297         (WebVideoFullscreenControllerContext::pause):
2298         (WebVideoFullscreenControllerContext::togglePlayState):
2299         (WebVideoFullscreenControllerContext::beginScrubbing):
2300         (WebVideoFullscreenControllerContext::endScrubbing):
2301         (WebVideoFullscreenControllerContext::seekToTime):
2302         (WebVideoFullscreenControllerContext::fastSeek):
2303         (WebVideoFullscreenControllerContext::beginScanningForward):
2304         (WebVideoFullscreenControllerContext::beginScanningBackward):
2305         (WebVideoFullscreenControllerContext::endScanning):
2306         (WebVideoFullscreenControllerContext::requestExitFullscreen):
2307         (WebVideoFullscreenControllerContext::setVideoLayerFrame):
2308         (WebVideoFullscreenControllerContext::setVideoLayerGravity):
2309         (WebVideoFullscreenControllerContext::selectAudioMediaOption):
2310         (WebVideoFullscreenControllerContext::selectLegibleMediaOption):
2311         (WebVideoFullscreenControllerContext::fullscreenModeChanged):
2312         (WebVideoFullscreenControllerContext::setupFullscreen):
2313         (WebVideoFullscreenControllerContext::exitFullscreen):
2314         (WebVideoFullscreenControllerContext::requestHideAndExitFullscreen):
2315         (-[WebVideoFullscreenController init]):
2316         (-[WebVideoFullscreenController dealloc]):
2317         (-[WebVideoFullscreenController enterFullscreen:mode:]):
2318         (-[WebVideoFullscreenController exitFullscreen]):
2319         (-[WebVideoFullscreenController requestHideAndExitFullscreen]):
2320         (-[WebVideoFullscreenController didFinishFullscreen:]):
2321         (WebVideoFullscreenControllerChangeObserver::setTarget): Deleted.
2322         (-[WebVideoFullscreenController didSetupFullscreen]): Deleted.
2323         (-[WebVideoFullscreenController didEnterFullscreen]): Deleted.
2324         (-[WebVideoFullscreenController didExitFullscreen]): Deleted.
2325         (-[WebVideoFullscreenController didCleanupFullscreen]): Deleted.
2326         (-[WebVideoFullscreenController fullscreenMayReturnToInline]): Deleted.
2327         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2328         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2329         (-[WebAVVideoLayer setBounds:]):
2330         (-[WebAVVideoLayer resolveBounds]):
2331         (WebVideoFullscreenInterfaceAVKit::resetMediaState):
2332         (WebVideoFullscreenInterfaceAVKit::setDuration):
2333         (WebVideoFullscreenInterfaceAVKit::setCurrentTime):
2334         (WebVideoFullscreenInterfaceAVKit::setBufferedTime):
2335         (WebVideoFullscreenInterfaceAVKit::setRate):
2336         (WebVideoFullscreenInterfaceAVKit::setVideoDimensions):
2337         (WebVideoFullscreenInterfaceAVKit::setSeekableRanges):
2338         (WebVideoFullscreenInterfaceAVKit::setCanPlayFastReverse):
2339         (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions):
2340         (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions):
2341         (WebVideoFullscreenInterfaceAVKit::setExternalPlayback):
2342         (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
2343         (WebVideoFullscreenInterfaceAVKit::enterFullscreen):
2344         (WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard):
2345         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
2346         (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):
2347         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen):
2348         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal):
2349         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
2350         (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
2351         (WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen):
2352         (WebVideoFullscreenInterfaceAVKit::didStartOptimizedFullscreen):
2353         (WebVideoFullscreenInterfaceAVKit::willStopOptimizedFullscreen):
2354         (WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen):
2355         (WebVideoFullscreenInterfaceAVKit::willCancelOptimizedFullscreen):
2356         (WebVideoFullscreenInterfaceAVKit::didCancelOptimizedFullscreen):
2357         (WebVideoFullscreenInterfaceAVKit::setVideoLayerFrame):
2358         (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Deleted.
2359         * platform/ios/WebVideoFullscreenModel.h:
2360         * platform/ios/WebVideoFullscreenModelVideoElement.h:
2361         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
2362         (WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer):
2363         (WebVideoFullscreenModelVideoElement::play):
2364         (WebVideoFullscreenModelVideoElement::pause):
2365         (WebVideoFullscreenModelVideoElement::togglePlayState):
2366         (WebVideoFullscreenModelVideoElement::beginScrubbing):
2367         (WebVideoFullscreenModelVideoElement::endScrubbing):
2368         (WebVideoFullscreenModelVideoElement::seekToTime):
2369         (WebVideoFullscreenModelVideoElement::fastSeek):
2370         (WebVideoFullscreenModelVideoElement::beginScanningForward):
2371         (WebVideoFullscreenModelVideoElement::beginScanningBackward):
2372         (WebVideoFullscreenModelVideoElement::endScanning):
2373         (WebVideoFullscreenModelVideoElement::requestExitFullscreen):
2374         (WebVideoFullscreenModelVideoElement::fullscreenModeChanged):
2375         (WebVideoFullscreenModelVideoElement::videoLayerFrame): Deleted.
2376         (WebVideoFullscreenModelVideoElement::videoLayerGravity): Deleted.
2377
2378 2015-05-27  Eric Carlson  <eric.carlson@apple.com>
2379
2380         [Mac] short-circuit MIME type lookup when possible
2381         https://bugs.webkit.org/show_bug.cgi?id=145362
2382
2383         Reviewed by Jer Noble.
2384
2385         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2386         (WebCore::isUnsupportedMIMEType): Renamed from unsupportedMIMEType. Convert type to lower case
2387         once instead of calling equalIgnoringCase many times.
2388         (WebCore::staticMIMETypeList): Renamed from staticMimeTypeCache. Initialize static set in a lambda,
2389         using an array of C strings in a loop.
2390         (WebCore::avfMIMETypes): Renamed from avfMimeTypeCache. Initialize static set in a lambda.
2391         (WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes): avfMimeTypeCache -> avfMIMETypes.
2392         (WebCore::keySystemIsSupported): equalIgnoringCase -> equalIgnoringASCIICase.
2393         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Ditto.
2394         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem): unsupportedMIMEType -> 
2395         isUnsupportedMIMEType, equalIgnoringCase -> equalIgnoringASCIICase, staticMimeTypeCache -> 
2396         staticMIMETypeList, avfMimeTypeCache -> avfMIMETypes.
2397         (WebCore::unsupportedMIMEType): Deleted.
2398         (WebCore::staticMimeTypeCache): Deleted.
2399         (WebCore::avfMimeTypeCache): Deleted.
2400
2401 2015-05-27  Eric Carlson  <eric.carlson@apple.com>
2402
2403         [Mac] short-circuit MIME type lookup when possible
2404         https://bugs.webkit.org/show_bug.cgi?id=145362
2405
2406         Reviewed by Dean Jackson.
2407
2408         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2409         (WebCore::unsupportedMIMEType): New, reject types known to not be supported.
2410         (WebCore::staticMimeTypeCache): Accept MIME types known to be supported.
2411         (WebCore::avfMimeTypeCache): Renamed from mimeTypeCache.
2412         (WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes): mimeTypeCache -> staticMimeTypeCache.
2413         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Return immediately if
2414         unsupportedMIMEType returns true, don't call AVFoundation if staticMimeTypeCache returns true.
2415         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem): Ditto.
2416         (WebCore::mimeTypeCache): Deleted.
2417
2418 2015-05-27  Eric Carlson  <eric.carlson@apple.com>
2419
2420         [Mac] occasional crash in MediaPlayerPrivateAVFoundationObjC::didStopLoadingRequest
2421         https://bugs.webkit.org/show_bug.cgi?id=145409
2422
2423         Reviewed by Dean Jackson.
2424
2425         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
2426         (WebCore::WebCoreAVFResourceLoader::stopLoading): NULL-check m_avRequest.
2427
2428 2015-05-26  Dean Jackson  <dino@apple.com>
2429
2430         Backdrop filters don't animate
2431         https://bugs.webkit.org/show_bug.cgi?id=145386
2432         <rdar://problem/21110037>
2433
2434         Reviewed by Simon Fraser.
2435
2436         Add support for animation of backdrop filters.
2437
2438         Note that, at the moment, we can only animate/transition
2439         backdrop-filter if it is already present on the element. See
2440         https://bugs.webkit.org/show_bug.cgi?id=145107
2441
2442         Test: css3/filters/backdrop/animation.html
2443
2444         * page/animation/AnimationBase.h: Add m_backdropFilterFunctionListsMatch and backdropFilterFunctionListsMatch.
2445         (WebCore::AnimationBase::backdropFilterFunctionListsMatch):
2446
2447         * page/animation/CSSPropertyAnimation.cpp:
2448         (WebCore::blendFunc): backdrop-filter is also supported.
2449         (WebCore::PropertyWrapperAcceleratedBackdropFilter::PropertyWrapperAcceleratedBackdropFilter): Added. Works
2450         similarly to the PropertyWrapperAcceleratedFilter.
2451         (WebCore::PropertyWrapperAcceleratedBackdropFilter::animationIsAccelerated):
2452         (WebCore::PropertyWrapperAcceleratedBackdropFilter::blend):
2453         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Construct the
2454         PropertyWrapperAcceleratedBackdropFilter.
2455
2456         * page/animation/ImplicitAnimation.cpp:
2457         (WebCore::ImplicitAnimation::reset): Call checkForMatchingBackdropFilterFunctionLists.
2458         (WebCore::ImplicitAnimation::validateTransformFunctionList): Fix typo.
2459         (WebCore::ImplicitAnimation::checkForMatchingFilterFunctionLists): Remove whitespace.
2460         (WebCore::ImplicitAnimation::checkForMatchingBackdropFilterFunctionLists): New method that
2461         checks if the individual filters in a filter list match.
2462         * page/animation/ImplicitAnimation.h: Add checkForMatchingBackdropFilterFunctionLists.
2463
2464         * page/animation/KeyframeAnimation.cpp:
2465         (WebCore::KeyframeAnimation::KeyframeAnimation): Call checkForMatchingBackdropFilterFunctionLists.
2466         (WebCore::KeyframeAnimation::checkForMatchingBackdropFilterFunctionLists): Copied from
2467         checkForMatchingFilterFunctionLists, but calls backdropFilter() instead of filter().
2468         (WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists): This was accidentally checking
2469         for backdrop filters as well, but it wouldn't have worked.
2470         * page/animation/KeyframeAnimation.h: Add checkForMatchingBackdropFilterFunctionLists.
2471
2472         * platform/graphics/GraphicsLayer.cpp:
2473         (WebCore::GraphicsLayer::validateFilterOperations): Modify the ASSERT to allow AnimatedPropertyWebkitBackdropFilter.
2474         * platform/graphics/GraphicsLayerClient.h: Add AnimatedPropertyWebkitBackdropFilter to the enum.
2475
2476         * platform/graphics/ca/GraphicsLayerCA.cpp:
2477         (WebCore::propertyIdToString): Support new enum.
2478         (WebCore::GraphicsLayerCA::addAnimation): Support AnimatedPropertyWebkitBackdropFilter.
2479         (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes): Ditto.
2480         (WebCore::GraphicsLayerCA::animatedLayer): Use a switch statement now that we have more than
2481         two options, and handle AnimatedPropertyWebkitBackdropFilter.
2482         (WebCore::GraphicsLayerCA::updateAnimations): Deleted a blank line.
2483
2484         * rendering/RenderLayerBacking.cpp:
2485         (WebCore::RenderLayerBacking::startAnimation): Support animation of backdrop-filter.
2486         (WebCore::RenderLayerBacking::startTransition): Ditto. Copied the code from the filter transition.
2487         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
2488         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
2489         * rendering/RenderLayerCompositor.cpp:
2490         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
2491
2492 2015-05-27  Jeremy Jones  <jeremyj@apple.com>
2493
2494         Handle case where -startOptimizedFullscreen fails.
2495         https://bugs.webkit.org/show_bug.cgi?id=145340
2496
2497         Reviewed by Eric Carlson.
2498
2499         Add new AVPlayerViewController delegate methods and remove old ones.
2500         -startOptimizedFullscreen can either fail silently because it is not allowed or it will call a delegate.
2501         We prevent silent failure by testing preconditions in enterFullscreenOptimized, and add the 
2502         delegate -playerViewControllerFailedToStartOptimizedFullscreen to handle explicitly failure.
2503
2504         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: added/removed method declarations.
2505         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: 
2506         (-[WebAVPlayerController playerViewControllerFailedToStartOptimizedFullscreen:withError:]): Added.
2507         (WebVideoFullscreenInterfaceAVKit::enterFullscreenOptimized): Handle silent failure.
2508         (WebVideoFullscreenInterfaceAVKit::didStartOptimizedFullscreen): Hide window on main thread.
2509         (WebVideoFullscreenInterfaceAVKit::failedToStartOptimizedFullscreen): Added
2510         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscreen:]): Deleted.
2511         (-[WebAVPlayerController playerViewControllerDidCancelOptimizedFullscreen:]): Deleted.
2512         (WebVideoFullscreenInterfaceAVKit::willCancelOptimizedFullscreen): Deleted.
2513         (WebVideoFullscreenInterfaceAVKit::didCancelOptimizedFullscreen): Deleted.
2514         * platform/spi/cocoa/AVKitSPI.h: Remove dead SPI. Add isOptimizedFullscreenPossible.
2515
2516 2015-05-27  Myles C. Maxfield  <mmaxfield@apple.com>
2517
2518         [iOS] Arabic ligatures are broken in Google Maps
2519         https://bugs.webkit.org/show_bug.cgi?id=145336
2520         <rdar://problem/20689607>
2521
2522         Reviewed by Darin Adler.
2523
2524         When we fall off the end of the font fallback list, we ask the platform for which particular font we should use
2525         to display a particular codepoint. When we do this, we supply the font which is first in the fallback list so
2526         that the platform can try to match it as best it can. However, web fonts' FontPlatformData have a null m_font
2527         property, which means that we were passing nullptr to this platform fallback function.
2528
2529         The solution is something I've wanted to do for a while, which is migrate webfonts from using
2530         CGDataProviderCreateWithCFData() to using CTFontManagerCreateFontDescriptorFromData(). This call creates a
2531         CoreText font for an in-memory buffer (the old call was creating a CoreGraphics front from the same thing).
2532         This means that we can use the FontPlatformData constructor which accepts a CoreText font, thereby making web
2533         fonts not have a null m_font property. Note that not all platforms can use this call, which means that this
2534         new codepath is gated to only certain OSes (which is okay because only certain OSes use the
2535         CTFontCreatePhysicalFontDescriptorForCharactersWithLanguage() call inside FontCache). Because web fonts are the
2536         only user of the constructor which just takes a CG font, we can make the constructor private to the
2537         FontPlatformData class (as soon as all platforms can use this new codepath).
2538
2539         Test: platform/ios-simulator/fast/text/arabic-with-no-supporting-webfont.html
2540
2541         * platform/graphics/FontPlatformData.h: Make the FontPlatformData constructor which takes a CGFontRef private.
2542         * platform/graphics/mac/FontCustomPlatformData.cpp:
2543         (WebCore::FontCustomPlatformData::fontPlatformData): Use the CoreText type instead of the CoreGraphics type.
2544         (WebCore::createFontCustomPlatformData): Migrate to CTFontManagerCreateFontDescriptorFromData().
2545         * platform/graphics/mac/FontCustomPlatformData.h:
2546         (WebCore::FontCustomPlatformData::FontCustomPlatformData): Store a CTFontDescriptorRef instead of a CGFontRef.
2547
2548 2015-05-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
2549
2550         An SVG with no intrinsic size does not draw correct slices when used as a border-image for an HTML element.
2551         https://bugs.webkit.org/show_bug.cgi?id=139405
2552
2553         Reviewed by Darin Adler.
2554         
2555         When using a non-intrinsic-sized image as an image-border, all the source
2556         slices have to be extracted from the top-left corner of the source image.
2557         This is because the right and bottom sides of the image can not be known.
2558         Also all the slices should not be stretched. In other words, the sizes of
2559         source slices for a non-intrinsic-sized image should be equal to the sizes
2560         of the destination container slices.
2561
2562         This is not compliant with the css3 w3c specs. I think the specs makes it
2563         harder to predict what exactly will be drawn for the image-border in this
2564         case. See http://www.w3.org/TR/css3-background/#border-image-slice. This
2565         approach is implemented by FireFox. And I think it gives a more predictable 
2566         rendering for image-border in the case of non-intrinsic-sized images.
2567         
2568         Test: fast/borders/border-image-fill-no-intrinsic-size.html
2569
2570         * CMakeLists.txt:
2571         * WebCore.vcxproj/WebCore.vcxproj:
2572         * WebCore.vcxproj/WebCore.vcxproj.filters:
2573         * WebCore.xcodeproj/project.pbxproj:
2574         * platform/LengthBox.cpp: Removed.
2575         * platform/graphics/LayoutBoxExtent.cpp: Removed.
2576         * platform/graphics/LayoutBoxExtent.h: Removed.
2577         * platform/graphics/LayoutRect.h:
2578         Delete LengthBox.cpp and move all the functionalities to LengthBox.h.
2579         Delete LayoutBoxExtent.cpp since it is the same class as LengthBox.
2580         
2581         * css/CSSProperty.cpp:
2582         * platform/text/WritingMode.h:
2583         Move the enums LogicalBoxSide and PhysicalBoxSide
2584         from CSSProperty.cpp to WritingMode.h so it can be used by other classes.
2585         
2586         * css/CSSToStyleMap.cpp:
2587         (WebCore::CSSToStyleMap::mapNinePieceImageSlice):
2588         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
2589         * css/CSSToStyleMap.h:
2590         * inspector/InspectorOverlay.cpp:
2591         (WebCore::buildRendererHighlight):
2592         * rendering/InlineFlowBox.cpp:
2593         (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
2594         * rendering/RenderBox.h:
2595         (WebCore::RenderBox::marginLogicalLeft):
2596         (WebCore::RenderBox::marginLogicalRight):
2597         (WebCore::RenderBox::setMarginBefore):
2598         (WebCore::RenderBox::setMarginAfter):
2599         (WebCore::RenderBox::setMarginStart):
2600         (WebCore::RenderBox::setMarginEnd):
2601         * rendering/style/RenderStyle.cpp:
2602         (WebCore::RenderStyle::setClip):
2603         (WebCore::RenderStyle::noneDashboardRegions):
2604         * rendering/style/RenderStyle.h:
2605         Use the new BoxExtent access methods for getting and settings the sides of
2606         LengthBox and LayoutBoxExtent.
2607         
2608         * platform/LengthBox.h:
2609         (WebCore::BoxExtent::BoxExtent):
2610         (WebCore::BoxExtent::at):
2611         (WebCore::BoxExtent::top):
2612         (WebCore::BoxExtent::right):
2613         (WebCore::BoxExtent::bottom):
2614         (WebCore::BoxExtent::left):
2615         (WebCore::BoxExtent::setAt):
2616         (WebCore::BoxExtent::setTop):
2617         (WebCore::BoxExtent::setRight):
2618         (WebCore::BoxExtent::setBottom):
2619         (WebCore::BoxExtent::setLeft):
2620         (WebCore::BoxExtent::before):
2621         (WebCore::BoxExtent::end):
2622         (WebCore::BoxExtent::after):
2623         (WebCore::BoxExtent::start):
2624         (WebCore::BoxExtent::setBefore):
2625         (WebCore::BoxExtent::setEnd):
2626         (WebCore::BoxExtent::setAfter):
2627         (WebCore::BoxExtent::setStart):
2628         (WebCore::BoxExtent::operator==):
2629         (WebCore::BoxExtent::operator!=):
2630         (WebCore::LengthBox::LengthBox):
2631         (WebCore::LengthBox::isZero):
2632         (WebCore::LengthBox::left): Deleted.
2633         (WebCore::LengthBox::right): Deleted.
2634         (WebCore::LengthBox::top): Deleted.
2635         (WebCore::LengthBox::bottom): Deleted.
2636         (WebCore::LengthBox::operator==): Deleted.
2637         (WebCore::LengthBox::operator!=): Deleted.
2638         (WebCore::LengthBox::nonZero): Deleted.
2639         Define a new template class for 'BoxExtent'. A 'BoxExtent' represents the
2640         extent of four sides of a box. Use this class template to define the exiting 
2641         classes 'LengthBox' and 'LayoutBoxExtent'. Use it also to and define the
2642         new class FloatBoxExtent
2643             
2644         * rendering/RenderBoxModelObject.cpp:
2645         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
2646         * rendering/RenderBoxModelObject.h:
2647         (WebCore::RenderBoxModelObject::calculateFillTileSize):
2648         * rendering/RenderListMarker.cpp:
2649         (WebCore::RenderListMarker::updateContent):
2650         * rendering/shapes/ShapeOutsideInfo.cpp:
2651         (WebCore::ShapeOutsideInfo::createShapeForImage):
2652         Change the return value of calculateImageIntrinsicDimensions() to be a
2653         bool which indicates whether the image has an intrinsic size or not. Add
2654         a new reference argument to this function receive the resolved image size.
2655         
2656         (WebCore::RenderBoxModelObject::paintNinePieceImage): Move all the painting
2657         code of this function to NinePieceImage::paint()
2658         
2659         (WebCore::computeBorderImageSide): Deleted.
2660         Renamed to be NinePieceImage::computeSlice().
2661         
2662         * rendering/style/BorderData.h:
2663         (WebCore::BorderData::borderWidth): Add a new method to return the extents
2664         of the border in a FloatBoxExtent.
2665         
2666         * rendering/style/NinePieceImage.cpp:
2667         (WebCore::NinePieceImage::computeSlice): Moved from NinePieceImage::computeSlice().
2668         
2669         (WebCore::NinePieceImage::computeSlices): The first version of this function
2670         computes the slices given their lengths. The slices have to be clamped to
2671         the container size. The second version of this function computes the slices
2672         given their lengths, their actual extents and their source slices.
2673         
2674         (WebCore::NinePieceImage::scaleSlicesIfNeeded):  Reduce the slices if they
2675         are too large.
2676         
2677         (WebCore::NinePieceImage::isEmptyPieceRect): Returns true if an ImagePiece
2678         should not be drawn.
2679         
2680         (WebCore::NinePieceImage::horizontalTileRules):
2681         (WebCore::NinePieceImage::verticalTileRules):
2682         Fill vectors of tiling rules to be passed to GraphicsContext::drawTiledImage()
2683         
2684         (WebCore::NinePieceImage::computeIntrinsicRects): Computes the nine pieces
2685         rectangles for an intrinsic-sized container.
2686         
2687         (WebCore::NinePieceImage::computeNonIntrinsicRects): Computes the nine
2688         pieces rectangles for an non-intrinsic-sized source image. The computed
2689         rectangles have to start at (0, 0) and their sizes should be equal to
2690         the sizes of the nine pieces rectangles of the destination container.
2691         
2692         (WebCore::NinePieceImage::computeIntrinsicSideTileScale):
2693         (WebCore::NinePieceImage::computeIntrinsicMiddleTileScale):
2694         (WebCore::NinePieceImage::computeIntrinsicTileScales):
2695         (WebCore::NinePieceImage::computeNonIntrinsicTileScales):
2696         Computes the scaling factors for drawing the tiles. For non-intrinsic source
2697         images, there should not be any scaling factors. 
2698         
2699         (WebCore::NinePieceImage::paint): Moved from RenderBoxModelObject::paintNinePieceImage()
2700         but simplified and restructured.
2701         
2702         (WebCore::NinePieceImageData::NinePieceImageData): Use nullptr instead of 0.
2703         
2704         * rendering/style/NinePieceImage.h:
2705         (WebCore::operator++):
2706         (WebCore::isCornerPiece): 
2707         (WebCore::isMiddlePiece):
2708         (WebCore::imagePieceHorizontalSide):
2709         (WebCore::imagePieceVerticalSide):
2710         Add helper functions for the enum ImagePiece.
2711
2712 2015-05-26  Andreas Kling  <akling@apple.com>
2713
2714         <font face> doesn't support plus character in font family names.
2715         <https://webkit.org/b/145400>
2716         <rdar://problem/21097484>
2717
2718         Reviewed by Darin Adler.
2719
2720         Turn CSSParser::parseFontFaceValue() into a fast-path parser for
2721         <font face> attributes.
2722         Going through the full CSS parser was hurting us here, as it would
2723         misunderstand unquoted family names and choke on e.g '+'.
2724
2725         Test: fast/dom/HTMLFontElement/face-attribute.html
2726
2727         * css/CSSParser.cpp:
2728         (WebCore::CSSParser::parseFontFaceValue):
2729
2730 2015-05-26  Chris Fleizach  <cfleizach@apple.com>
2731
2732         AX: display:none content exposed to accessibility when aria-hidden is toggled on ancestor element
2733         https://bugs.webkit.org/show_bug.cgi?id=139142
2734
2735         Reviewed by Darin Adler.
2736      
2737         Amend the code that determines when an invisible, but aria-hidden=false, element is exposed to accessibility.
2738
2739         The new guideline is that you must have aria-hidden=false on every node that is not rendered (except text which inherits)
2740         otherwise the element will not be visible.
2741
2742         Modified existing test: accessibility/aria-hidden-false-works-in-subtrees.html
2743
2744         * accessibility/AXObjectCache.cpp:
2745         (WebCore::isNodeAriaVisible):
2746         (WebCore::AXObjectCache::rootWebArea):
2747
2748 2015-05-26  Roger Fong  <roger_fong@apple.com>
2749
2750         Enable element unsigned index in WebGL2 again.
2751         https://bugs.webkit.org/show_bug.cgi?id=145392
2752         <rdar://problem/21112585>.
2753
2754         Reviewed by Dean Jackson.
2755
2756         * html/canvas/WebGLRenderingContextBase.cpp:
2757         (WebCore::WebGLRenderingContextBase::validateDrawElements):
2758         Fix some incorrect logic that disables the feature for WebGL2.
2759
2760 2015-05-26  Chris Dumez  <cdumez@apple.com>
2761
2762         Add assertions to make sure pages in the PageCache are not loading
2763         https://bugs.webkit.org/show_bug.cgi?id=145397
2764         <rdar://problem/20613631>
2765
2766         Reviewed by Antti Koivisto.
2767
2768         Add assertions to make sure pages in the PageCache are not loading.
2769         These will hopefully help track down why PacheCache entries sometimes
2770         have pending subresource loads when being destroyed.
2771
2772         * history/CachedFrame.cpp:
2773         (WebCore::CachedFrame::CachedFrame):
2774         * loader/DocumentLoader.cpp:
2775         (WebCore::DocumentLoader::stopLoadingSubresources):
2776         (WebCore::DocumentLoader::addSubresourceLoader):
2777
2778 2015-05-26  Commit Queue  <commit-queue@webkit.org>
2779
2780         Unreviewed, rolling out r184872.
2781         https://bugs.webkit.org/show_bug.cgi?id=145396
2782
2783         Bindings tests broken on the bots. (Requested by dethbakin on
2784         #webkit).
2785
2786         Reverted changeset:
2787
2788         "Binding generator should support interfaces with
2789         CustomConstructor and NoInterfaceObject"
2790         https://bugs.webkit.org/show_bug.cgi?id=145016
2791         http://trac.webkit.org/changeset/184872
2792
2793 2015-05-26  Zalan Bujtas  <zalan@apple.com>
2794
2795         Overhanging float sets are not cleaned up properly when floating renderer is destroyed.
2796         https://bugs.webkit.org/show_bug.cgi?id=145323
2797         rdar://problem/20980628
2798
2799         Reviewed by Dave Hyatt.
2800
2801         This patch ensures when an overhanging float renderer is destroyed,
2802         all the sibling containers' floating object set(m_floatingObjects) gets properly cleaned up.
2803
2804         When an overhanging float is present, we cache the renderer on the parent and on the affected
2805         sibling containers too. (RenderBlockFlow::m_floatingObjects) These caches(sets) get cleared and repopulated
2806         during ::layout(). In order to have a float renderer removed from a set, a layout needs to be initiated on the container.
2807         This is normally done through RenderBlockFlow::markSiblingsWithFloatsForLayout() and RenderBlockFlow::markAllDescendantsWithFloatsForLayout().
2808         However, when the float container's parent's writing direction changes (and we promote the children containers to new formatting contexts),
2809         the layout propagation through siblings does not work anymore.
2810
2811         The avoidsFloats() check in RenderBlockFlow::markSiblingsWithFloatsForLayout() has very little performance gain, but it prevents us
2812         from propagating layout to siblings when certain properties of the parent container changes.
2813
2814         Test: fast/block/float/crash-when-floating-object-is-removed.xhtml
2815
2816         * rendering/RenderBlockFlow.cpp:
2817         (WebCore::RenderBlockFlow::markSiblingsWithFloatsForLayout):
2818         * rendering/RenderBox.cpp:
2819         (WebCore::outermostBlockContainingFloatingObject):
2820         (WebCore::RenderBox::removeFloatingOrPositionedChildFromBlockLists):
2821         (WebCore::RenderBox::outermostBlockContainingFloatingObject): Deleted.
2822         * rendering/RenderBox.h:
2823
2824 2015-05-26  Ryuan Choi  <ryuan.choi@navercorp.com>
2825
2826         [EFL][CoordinatedGraphics] Remove CoordinatedTileClient and CoordinatedTileBackend
2827         https://bugs.webkit.org/show_bug.cgi?id=133337
2828
2829         Reviewed by Darin Adler.
2830
2831         This patch simplifies relationship between CoordinatedGraphicsLayer and TiledBackingStore
2832         by removing TiledBackingStoreBackend because TiledBackingStore only support
2833         CoordinatedTileBackend.
2834         And it also moves CoordinatedTileClient interface to TiledBackingStoreClient.
2835
2836         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2837         (WebCore::CoordinatedGraphicsLayer::createBackingStore):
2838         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2839         * platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
2840         (WebCore::CoordinatedTile::create):
2841         (WebCore::CoordinatedTile::CoordinatedTile):
2842         (WebCore::CoordinatedTile::~CoordinatedTile):
2843         (WebCore::CoordinatedTile::updateBackBuffer):
2844         (WebCore::CoordinatedTileBackend::CoordinatedTileBackend): Deleted.
2845         (WebCore::CoordinatedTileBackend::createTile): Deleted.
2846         (WebCore::CoordinatedTileBackend::paintCheckerPattern): Deleted.
2847         * platform/graphics/texmap/coordinated/CoordinatedTile.h:
2848         (WebCore::CoordinatedTile::create): Deleted.
2849         (WebCore::CoordinatedTileClient::~CoordinatedTileClient): Deleted.
2850         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
2851         (WebCore::TiledBackingStore::TiledBackingStore):
2852         (WebCore::TiledBackingStore::createTiles):
2853         * platform/graphics/texmap/coordinated/TiledBackingStore.h:
2854         * platform/graphics/texmap/coordinated/TiledBackingStoreBackend.h: Removed.
2855         (WebCore::TiledBackingStoreBackend::~TiledBackingStoreBackend): Deleted.
2856         * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:
2857
2858 2015-05-26  Daegyu Lee  <daegyu.lee@navercorp.com>
2859
2860         Fullscreen video does not display on platforms without accelerated video rendering
2861         https://bugs.webkit.org/show_bug.cgi?id=145118
2862
2863         In order to paint video contents in fullscreen mode, add supportsAcceleratedRendering condition. 
2864
2865         Reviewed by Simon Fraser.
2866
2867         * rendering/RenderVideo.cpp:
2868         (WebCore::RenderVideo::paintReplaced):
2869
2870 2015-05-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
2871
2872         SVG fragment identifier rendering issue
2873         https://bugs.webkit.org/show_bug.cgi?id=137328
2874
2875         Reviewed by Darin Adler.
2876
2877         This is a follow up for http://trac.webkit.org/changeset/164983. In this
2878         changeset, scrolling to the fragment should have been added before the
2879         the paint to guarantee setting the proper display position for the SVG
2880         fragment.
2881
2882         Test: svg/css/svg-resource-fragment-identifier-order.html
2883
2884         * svg/graphics/SVGImage.cpp:
2885         (WebCore::SVGImage::draw): Move view->scrollToFragment() before calling 
2886         view->paint().
2887
2888 2015-05-26  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2889
2890         Binding generator should support interfaces with CustomConstructor and NoInterfaceObject
2891         https://bugs.webkit.org/show_bug.cgi?id=145016
2892
2893         Reviewed by Darin Adler.
2894
2895         Updated code generator to generate the necessary declarations (constructor property in the prototype, the constructor class).
2896         In the case of CustomConstructor with NoInterfaceObject, the implementation of the constructor property related JS function is changed as follow:
2897         It creates a constructor object and shadows the constructor property JS function with this object.
2898         This ensures that only one constructor object is created per prototype.
2899         The constructor is not exposed as it is not added to the global object constructor map.
2900
2901         NoInterfaceObject is asking to not make the interface visible, which is contradictory with having a visible constructor of the interface.
2902         The case for having NoInterfaceObject and CustomConstructor is the following:
2903         We do not want to expose the interface but we still want to have a constructor property on the prototype of objects implementing the interface.
2904         One such case is https://streams.spec.whatwg.org/#globals
2905
2906         Added TestCustomConstructorWithNoInterfaceObject.idl to check that case.
2907
2908         * bindings/scripts/CodeGeneratorJS.pm:
2909         (GenerateHeader):
2910         (GenerateAttributesHashTable):
2911         (GenerateImplementation):
2912         (HasConstructorProperty):
2913         * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObject.cpp: Added.
2914         (WebKit::kit):
2915         (WebKit::core):
2916         (WebKit::wrapTestCustomConstructorWithNoInterfaceObject):
2917         (webkit_dom_test_custom_constructor_with_no_interface_object_finalize):
2918         (webkit_dom_test_custom_constructor_with_no_interface_object_constructor):
2919         (webkit_dom_test_custom_constructor_with_no_interface_object_class_init):
2920         (webkit_dom_test_custom_constructor_with_no_interface_object_init):
2921         * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObject.h: Added.
2922         * bindings/scripts/test/GObject/WebKitDOMTestCustomConstructorWithNoInterfaceObjectPrivate.h: Added.
2923         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: Added.
2924         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::create):
2925         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::createStructure):
2926         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::JSTestCustomConstructorWithNoInterfaceObjectPrototype):
2927         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
2928         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::createStructure):
2929         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor):
2930         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
2931         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::getConstructData):
2932         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation):
2933         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
2934         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::createPrototype):
2935         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getPrototype):
2936         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::destroy):
2937         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::~JSTestCustomConstructorWithNoInterfaceObject):
2938         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
2939         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::getConstructor):
2940         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::isReachableFromOpaqueRoots):
2941         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectOwner::finalize):
2942         (WebCore::toJS):
2943         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped):
2944         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: Added.
2945         (WebCore::wrapperOwner):
2946         (WebCore::toJS):
2947         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.h: Added.
2948         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.mm: Added.
2949         (-[DOMTestCustomConstructorWithNoInterfaceObject dealloc]):
2950         (-[DOMTestCustomConstructorWithNoInterfaceObject finalize]):
2951         (core):
2952         (kit):
2953         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObjectInternal.h: Added.
2954         * bindings/scripts/test/TestCustomConstructor.idl: Added.
2955
2956 2015-05-26  Joseph Pecoraro  <pecoraro@apple.com>
2957
2958         CSS properties (font-synthesis, column-fill) are missing in getComputedStyles
2959         https://bugs.webkit.org/show_bug.cgi?id=145343
2960
2961         Reviewed by Timothy Hatcher.
2962
2963         * css/CSSComputedStyleDeclaration.cpp:
2964
2965 2015-05-26  Dan Bernstein  <mitz@apple.com>
2966
2967         <rdar://problem/21104551> Update build settings
2968
2969         Reviewed by Anders Carlsson.
2970
2971         * Configurations/DebugRelease.xcconfig:
2972         * Configurations/FeatureDefines.xcconfig:
2973         * Configurations/Version.xcconfig:
2974
2975 2015-05-26  Csaba Osztrogonác  <ossy@webkit.org>
2976
2977         [ARM] Build SVGPathElement.cpp with -O2 due to a GCC bug
2978         https://bugs.webkit.org/show_bug.cgi?id=145377
2979
2980         Reviewed by Carlos Garcia Campos.
2981
2982         * CMakeLists.txt:
2983
2984 2015-05-25  Dan Bernstein  <mitz@apple.com>
2985
2986         Fixed a failing bindings test after r184853.
2987
2988         * bindings/scripts/CodeGeneratorObjC.pm:
2989         (GenerateImplementation): Removed an extraneous semicolon.
2990
2991 2015-05-25  Dan Bernstein  <mitz@apple.com>
2992
2993         ASSERT_MAIN_THREAD and DOM_ASSERT_MAIN_THREAD are unnecessary no-ops
2994         https://bugs.webkit.org/show_bug.cgi?id=145372
2995
2996         Reviewed by Sam Weinig.
2997
2998         * Configurations/Base.xcconfig: Removed DISABLE_THREAD_CHECK from DEBUG_DEFINES.
2999
3000         * bindings/objc/DOMAbstractView.mm:
3001         (-[DOMAbstractView dealloc]): Removed use of DOM_ASSERT_MAIN_THREAD.
3002         (kit): Ditto.
3003
3004         * bindings/objc/ExceptionHandlers.h: Removed definition of DOM_ASSERT_MAIN_THREAD.
3005
3006         * bindings/scripts/CodeGeneratorObjC.pm:
3007         (GenerateImplementation): Don’t emit DOM_ASSERT_MAIN_THREAD.
3008
3009         Updated expected bindings test results:
3010         * bindings/scripts/test/ObjC/DOMFloat64Array.mm:
3011         * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm:
3012         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
3013         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm:
3014         * bindings/scripts/test/ObjC/DOMTestEventConstructor.mm:
3015         * bindings/scripts/test/ObjC/DOMTestEventTarget.mm:
3016         * bindings/scripts/test/ObjC/DOMTestException.mm:
3017         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm:
3018         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
3019         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.mm:
3020         * bindings/scripts/test/ObjC/DOMTestNamedConstructor.mm:
3021         * bindings/scripts/test/ObjC/DOMTestNode.mm:
3022         * bindings/scripts/test/ObjC/DOMTestNondeterministic.mm:
3023         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3024         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.mm:
3025         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
3026         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
3027         * bindings/scripts/test/ObjC/DOMattribute.mm:
3028         * bindings/scripts/test/ObjC/DOMreadonly.mm:
3029
3030 2015-05-25  Hunseop Jeong  <hs85.jeong@samsung.com>
3031
3032         Replaced 0 with nullptr in WebCore/svg.
3033         https://bugs.webkit.org/show_bug.cgi?id=145367
3034
3035         Reviewed by Gyuyoung Kim.
3036
3037         No new tests, no behavior changes.
3038
3039         * svg/PatternAttributes.h:
3040         (WebCore::PatternAttributes::PatternAttributes):
3041         * svg/SVGAnimatedType.h:
3042         * svg/SVGElement.cpp:
3043         (WebCore::SVGElement::cursorElementRemoved):
3044         (WebCore::SVGElement::cursorImageValueRemoved):
3045         (WebCore::SVGElement::getPresentationAttribute):
3046         * svg/SVGException.cpp:
3047         (WebCore::SVGException::initializeDescription):
3048         * svg/SVGFEImageElement.cpp:
3049         (WebCore::SVGFEImageElement::clearResourceReferences):
3050         * svg/SVGFontFaceElement.cpp:
3051         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
3052         (WebCore::SVGFontFaceElement::removedFrom):
3053         * svg/SVGFontFaceUriElement.cpp:
3054         (WebCore::SVGFontFaceUriElement::loadFont):
3055         * svg/SVGLength.h:
3056         (WebCore::SVGLength::blend):
3057         * svg/SVGPathBlender.cpp:
3058         (WebCore::SVGPathBlender::SVGPathBlender):
3059         (WebCore::SVGPathBlender::cleanup):
3060         * svg/SVGPathBuilder.cpp:
3061         (WebCore::SVGPathBuilder::SVGPathBuilder):
3062         * svg/SVGPathBuilder.h:
3063         * svg/SVGPathByteStreamBuilder.cpp:
3064         (WebCore::SVGPathByteStreamBuilder::SVGPathByteStreamBuilder):
3065         * svg/SVGPathByteStreamBuilder.h:
3066         * svg/SVGPathElement.cpp:
3067         (WebCore::SVGPathElement::dPropertyInfo):
3068         * svg/SVGPathParser.cpp:
3069         (WebCore::SVGPathParser::SVGPathParser):
3070         (WebCore::SVGPathParser::cleanup):
3071         * svg/SVGPathSegListBuilder.cpp:
3072         (WebCore::SVGPathSegListBuilder::SVGPathSegListBuilder):
3073         * svg/SVGPathSegListBuilder.h:
3074         * svg/SVGPathTraversalStateBuilder.cpp:
3075         (WebCore::SVGPathTraversalStateBuilder::SVGPathTraversalStateBuilder):
3076         * svg/SVGPathUtilities.cpp:
3077         (WebCore::globalSVGPathBuilder):
3078         (WebCore::globalSVGPathSegListBuilder):
3079         (WebCore::globalSVGPathByteStreamBuilder):
3080         (WebCore::globalSVGPathStringBuilder):
3081         (WebCore::globalSVGPathTraversalStateBuilder):
3082         (WebCore::globalSVGPathParser):
3083         (WebCore::globalSVGPathBlender):
3084         * svg/SVGPolyElement.cpp:
3085         (WebCore::SVGPolyElement::pointsPropertyInfo):
3086         * svg/SVGTRefElement.cpp:
3087         (WebCore::SVGTRefTargetEventListener::cast):
3088         (WebCore::SVGTRefTargetEventListener::SVGTRefTargetEventListener):
3089         * svg/SVGTextContentElement.cpp:
3090         (WebCore::SVGTextContentElement::textLengthPropertyInfo):
3091         * svg/SVGURIReference.h:
3092         * svg/SVGViewSpec.cpp:
3093         (WebCore::SVGViewSpec::viewBoxPropertyInfo):
3094         (WebCore::SVGViewSpec::preserveAspectRatioPropertyInfo):
3095         (WebCore::SVGViewSpec::transformPropertyInfo):
3096         * svg/SVGViewSpec.h:
3097         (WebCore::SVGViewSpec::resetContextElement):
3098         * svg/animation/SMILTimeContainer.cpp:
3099         (WebCore::SMILTimeContainer::updateAnimations):
3100         * svg/animation/SVGSMILElement.cpp:
3101         (WebCore::ConditionEventListener::cast):
3102         (WebCore::ConditionEventListener::disconnectAnimation):
3103         (WebCore::SVGSMILElement::SVGSMILElement):
3104         (WebCore::SVGSMILElement::removedFrom):
3105         * svg/graphics/SVGImage.cpp:
3106         (WebCore::SVGImage::drawForContainer):
3107         * svg/graphics/filters/SVGFEImage.cpp:
3108         (WebCore::FEImage::FEImage):
3109         * svg/graphics/filters/SVGFilterBuilder.cpp:
3110         (WebCore::SVGFilterBuilder::clearEffects):
3111         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
3112         (WebCore::SVGAnimatedPathSegListPropertyTearOff::animationEnded):
3113         (WebCore::SVGAnimatedPathSegListPropertyTearOff::SVGAnimatedPathSegListPropertyTearOff):
3114         * svg/properties/SVGAnimatedPropertyDescription.h:
3115         (WebCore::SVGAnimatedPropertyDescription::SVGAnimatedPropertyDescription):
3116         * svg/properties/SVGAnimatedPropertyTearOff.h:
3117         (WebCore::SVGAnimatedPropertyTearOff::~SVGAnimatedPropertyTearOff):
3118         * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
3119         (WebCore::SVGAnimatedStaticPropertyTearOff::animationEnded):
3120         (WebCore::SVGAnimatedStaticPropertyTearOff::SVGAnimatedStaticPropertyTearOff):
3121         * svg/properties/SVGPropertyTearOff.h:
3122         (WebCore::SVGPropertyTearOff::SVGPropertyTearOff):
3123
3124 2015-05-24  Sam Weinig  <sam@webkit.org>
3125
3126         Crash when using a removed ScriptMessageHandler
3127         <rdar://problem/20888499>
3128         https://bugs.webkit.org/show_bug.cgi?id=145359
3129
3130         Reviewed by Dan Bernstein.
3131
3132         Added tests:
3133             WKUserContentController.ScriptMessageHandlerBasicRemove
3134             WKUserContentController.ScriptMessageHandlerCallRemovedHandler
3135
3136         * page/UserMessageHandler.cpp:
3137         (WebCore::UserMessageHandler::~UserMessageHandler):
3138         (WebCore::UserMessageHandler::postMessage):
3139         (WebCore::UserMessageHandler::name):
3140         * page/UserMessageHandler.h:
3141         (WebCore::UserMessageHandler::create):
3142         * page/UserMessageHandler.idl:
3143         * page/UserMessageHandlerDescriptor.cpp:
3144         (WebCore::UserMessageHandlerDescriptor::UserMessageHandlerDescriptor):
3145         * page/UserMessageHandlerDescriptor.h:
3146         (WebCore::UserMessageHandlerDescriptor::client):
3147         (WebCore::UserMessageHandlerDescriptor::invalidateClient):
3148         Add support for invalidating the descriptor and throw an exception if someone tries
3149         to post a message using an invalidated descriptor.
3150
3151         * page/UserMessageHandlersNamespace.cpp:
3152         (WebCore::UserMessageHandlersNamespace::handler):
3153         Add logic to remove message handlers if their descriptor has been invalidated.
3154
3155 2015-05-23  Dan Bernstein  <mitz@apple.com>
3156
3157         Remove unused definitions of WEBKIT_VERSION_MIN_REQUIRED
3158         https://bugs.webkit.org/show_bug.cgi?id=145345
3159
3160         Reviewed by Sam Weinig.
3161
3162         * Configurations/WebCore.xcconfig: Also changed to use $(inherited).
3163
3164 2015-05-24  Hunseop Jeong  <hs85.jeong@samsung.com>
3165
3166         Use modern for-loops in WebCore/svg.
3167         https://bugs.webkit.org/show_bug.cgi?id=145209
3168
3169         Reviewed by Darin Adler.
3170
3171         No new tests, no behavior changes.
3172
3173         * svg/SVGAnimateElementBase.cpp:
3174         (WebCore::propertyTypesAreConsistent):
3175         * svg/SVGAnimatedPath.cpp:
3176         (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
3177         * svg/SVGAnimatedTypeAnimator.h:
3178         (WebCore::SVGAnimatedTypeAnimator::executeAction):
3179         * svg/SVGAnimationElement.cpp:
3180         (WebCore::SVGAnimationElement::parseAttribute):
3181         * svg/SVGCursorElement.cpp:
3182         (WebCore::SVGCursorElement::~SVGCursorElement):
3183         * svg/SVGDocumentExtensions.cpp:
3184         (WebCore::SVGDocumentExtensions::pauseAnimations):
3185         (WebCore::SVGDocumentExtensions::unpauseAnimations):
3186         (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
3187         (WebCore::SVGDocumentExtensions::isElementWithPendingResources):
3188         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
3189         (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement):
3190         * svg/SVGElement.cpp:
3191         (WebCore::populateAttributeNameToCSSPropertyIDMap):
3192         (WebCore::populateAttributeNameToAnimatedPropertyTypeMap):
3193         (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
3194         (WebCore::hasLoadListener):
3195         * svg/SVGFontData.cpp:
3196         (WebCore::SVGFontData::applySVGGlyphSelection):
3197         * svg/SVGFontElement.cpp:
3198         (WebCore::SVGFontElement::registerLigaturesInGlyphCache):
3199         (WebCore::SVGKerningMap::insert):
3200         (WebCore::stringMatchesUnicodeRange):
3201         * svg/SVGPathByteStream.h:
3202         (WebCore::SVGPathByteStream::append):
3203         * svg/animation/SMILTimeContainer.cpp:
3204         (WebCore::SMILTimeContainer::setElapsed):
3205         (WebCore::SMILTimeContainer::updateAnimations):
3206         * svg/animation/SVGSMILElement.cpp:
3207         (WebCore::SVGSMILElement::parseBeginOrEnd):
3208         (WebCore::SVGSMILElement::connectConditions):
3209         (WebCore::SVGSMILElement::disconnectConditions):
3210         (WebCore::SVGSMILElement::notifyDependentsIntervalChanged):
3211         (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
3212         * svg/graphics/filters/SVGFilterBuilder.cpp:
3213         (WebCore::SVGFilterBuilder::clearResultsRecursive):
3214         * svg/graphics/filters/SVGFilterBuilder.h:
3215         (WebCore::SVGFilterBuilder::addBuiltinEffects):
3216         * svg/properties/SVGAnimatedProperty.cpp:
3217         (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
3218         * svg/properties/SVGListProperty.h:
3219         (WebCore::SVGListProperty::detachListWrappersAndResize):
3220         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
3221         (WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles):
3222
3223 2015-05-24  Jeremy Jones  <jeremyj@apple.com>
3224
3225         Register media MIME types as supported by HTML view in WebKit1.
3226         https://bugs.webkit.org/show_bug.cgi?id=145356
3227
3228         Reviewed by Eric Carlson.
3229
3230         getSupportedMediaMIMETypes is now used in WebKit1.
3231
3232         * platform/MIMETypeRegistry.h: Export getSupportedMediaMIMETypes.
3233
3234 2015-05-23  Antti Koivisto  <antti@apple.com>
3235
3236         Permanent redirects should have long implicit cache lifetime
3237         https://bugs.webkit.org/show_bug.cgi?id=145348
3238         rdar://problem/20680519
3239
3240         Reviewed by Sam Weinig.
3241
3242         301 Moved Permanently response that doesn't specify explicit lifetime should have long implicit lifetime.
3243         This matches other browsers.
3244
3245         * platform/network/CacheValidation.cpp:
3246         (WebCore::computeFreshnessLifetimeForHTTPFamily):
3247
3248             Give 301 Moved Permanently (and similarly semantically permanent 410 Gone) long implicit lifetime.
3249
3250         (WebCore::updateRedirectChainStatus):
3251
3252 2015-05-23  Myles C. Maxfield  <mmaxfield@apple.com>
3253
3254         Cleanup after r184796
3255         https://bugs.webkit.org/show_bug.cgi?id=145333
3256
3257         Reviewed by Alexey Proskuryakov.
3258
3259         No new tests because there is no behavior change.
3260
3261         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3262         (WebCore::RenderingStyleSaver::RenderingStyleSaver): Deleted.
3263         (WebCore::RenderingStyleSaver::~RenderingStyleSaver): Deleted.
3264
3265 2015-05-23  Yusuke Suzuki  <utatane.tea@gmail.com>
3266
3267         Introduce UniquedStringImpl and SymbolImpl to separate symbolic strings from AtomicStringImpl
3268         https://bugs.webkit.org/show_bug.cgi?id=144848
3269
3270         Reviewed by Darin Adler.
3271
3272         Use UniquedStringImpl, SymbolImpl and AtomicStringImpl.
3273
3274         * bindings/js/JSDOMWindowCustom.cpp:
3275         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
3276         * bindings/js/SerializedScriptValue.cpp:
3277         (WebCore::CloneSerializer::write):
3278
3279 2015-05-23  Zalan Bujtas  <zalan@apple.com>
3280
3281         Simple line layout: Ignore -webkit-flow-*content while collecting text content for innerText.
3282         https://bugs.webkit.org/show_bug.cgi?id=145344
3283         rdar://problem/20959522
3284
3285         Reviewed by Antti Koivisto.
3286
3287         This patch ensures that when a -webkit-flow-into content is present in a simple line layout container,
3288         we skip it while collecting the text content for innerText.
3289         It's not always guaranteed that a simple line layout container only contains simple text nodes. In such cases,
3290         we need to ensure that text offset computing only takes the simple text nodes into account.
3291
3292         Test: fast/text/simple-line-layout-inner-text-with-flow-content.html
3293
3294         * editing/TextIterator.cpp:
3295         (WebCore::TextIterator::handleTextNode):
3296         * editing/TextIterator.h:
3297
3298 2015-05-22  Mark Lam  <mark.lam@apple.com>
3299
3300         Document::ensurePlugInsInjectedScript() should evaluate the injected script on its own frame.
3301         https://bugs.webkit.org/show_bug.cgi?id=145328
3302
3303         Reviewed by Jon Lee.
3304
3305         trac.webkit.org/r184329 fixed HTMLPlugInImageElement::didAddUserAgentShadowRoot()
3306         to use the document's frame instead of the page's main frame.  However,
3307         Document::ensurePlugInsInjectedScript() is still evaluating the injected script on
3308         the main frame.
3309
3310         As a result, HTMLPlugInImageElement::didAddUserAgentShadowRoot()'s attempt to get
3311         the injected createOverlay function from the document frame's global object will
3312         fail.  Fixing Document::ensurePlugInsInjectedScript() to evaluating the injected
3313         script on the document's frame fixes the issue.
3314
3315         No new tests.
3316
3317         * dom/Document.cpp:
3318         (WebCore::Document::ensurePlugInsInjectedScript):
3319
3320 2015-05-22  Eric Carlson  <eric.carlson@apple.com>
3321
3322         MediaPlayer doesn't need isPlayingToWirelessPlaybackTarget and isCurrentPlaybackTargetWireless
3323         https://bugs.webkit.org/show_bug.cgi?id=145325
3324
3325         Reviewed by Brent Fulgham.
3326
3327         * html/HTMLMediaElement.cpp:
3328         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless): Call isCurrentPlaybackTargetWireless
3329         directly.
3330         (WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange): Ditto.
3331         (WebCore::HTMLMediaElement::isPlayingToWirelessPlaybackTarget): Ditto.
3332         (WebCore::HTMLMediaElement::mediaState): Ditto.
3333
3334         * html/HTMLMediaSession.cpp:
3335         (WebCore::HTMLMediaSession::currentPlaybackTargetIsWireless): Deleted.
3336         * html/HTMLMediaSession.h:
3337
3338         * platform/graphics/MediaPlayer.cpp:
3339         (WebCore::MediaPlayer::isPlayingToWirelessPlaybackTarget): Deleted.
3340         * platform/graphics/MediaPlayer.h:
3341
3342         * platform/graphics/MediaPlayerPrivate.h:
3343         (WebCore::MediaPlayerPrivateInterface::isPlayingToWirelessPlaybackTarget): Deleted.
3344
3345         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3346         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3347         (WebCore::MediaPlayerPrivateAVFoundationObjC::isPlayingToWirelessPlaybackTarget): Deleted.
3348
3349         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
3350         (WebVideoFullscreenModelVideoElement::updateForEventName): Call webkitCurrentPlaybackTargetIsWireless.
3351
3352 2015-05-22  Jon Lee  <jonlee@apple.com>
3353
3354         Rename MediaPlaybackAllowsInline
3355         https://bugs.webkit.org/show_bug.cgi?id=145315
3356
3357         Reviewed by Eric Carlson.
3358
3359         Our API uses allowsInlineMediaPlayback. Our symbols should reflect the same.
3360
3361         * page/Settings.cpp: Update the static variable name as well as the setting.
3362         * page/Settings.in: Ditto.
3363
3364         * Modules/mediacontrols/MediaControlsHost.idl: Rename to allowsInlineMediaPlayback.
3365         Affects the media controls code.
3366         * Modules/mediacontrols/MediaControlsHost.h:
3367         * Modules/mediacontrols/MediaControlsHost.cpp:
3368         (WebCore::MediaControlsHost::allowsInlineMediaPlayback):
3369         (WebCore::MediaControlsHost::mediaPlaybackAllowsInline): Deleted.
3370
3371         Update to use the new name in the media controls.
3372         * Modules/mediacontrols/mediaControlsApple.js:
3373         (Controller.prototype.shouldHaveControls):
3374         * Modules/mediacontrols/mediaControlsiOS.js:
3375         (ControllerIOS.prototype.shouldHaveStartPlaybackButton):
3376
3377         * css/MediaQueryEvaluator.cpp:
3378         (WebCore::video_playable_inlineMediaFeatureEval):
3379         * html/HTMLMediaSession.cpp:
3380         (WebCore::HTMLMediaSession::requiresFullscreenForVideoPlayback):
3381
3382 2015-05-22  Jon Lee  <jonlee@apple.com>
3383
3384         Rename MediaPlaybackAllowsAirPlay
3385         https://bugs.webkit.org/show_bug.cgi?id=145316
3386
3387         Reviewed by Eric Carlson.
3388
3389         In preparation for an API rename, update internal symbols from mediaPlaybackAllowsAirPlay
3390         to allowsAirPlayForMediaPlayback.
3391
3392         * page/Settings.in: Update the setting name.
3393
3394         * html/HTMLMediaSession.cpp:
3395         (WebCore::HTMLMediaSession::wirelessVideoPlaybackDisabled): Update the call to settings.
3396         * testing/InternalSettings.h: Update the name of the member variable.
3397         * testing/InternalSettings.cpp: Update the names and calls to settings.
3398         (WebCore::InternalSettings::Backup::Backup):
3399         (WebCore::InternalSettings::InternalSettings):
3400         (WebCore::InternalSettings::resetToConsistentState):
3401         (WebCore::InternalSettings::setWirelessPlaybackDisabled):
3402
3403 2015-05-22  Jon Lee  <jonlee@apple.com>
3404
3405         Rename MediaPlaybackRequiresUserGesture
3406         https://bugs.webkit.org/show_bug.cgi?id=145314
3407
3408         Reviewed by Anders Carlsson.
3409
3410         In preparation for an API rename, update internal symbols from mediaPlaybackRequiresUserGesture
3411         to requiresUserGestureForMediaPlayback.
3412
3413         * page/Settings.cpp: update static const default variable name.
3414         * page/Settings.in: update the setting name and static const default variable name.
3415
3416         * Modules/webaudio/AudioContext.cpp:
3417         (WebCore::AudioContext::constructCommon): Update settings call.
3418         * html/HTMLMediaElement.cpp:
3419         (WebCore::HTMLMediaElement::HTMLMediaElement): Ditto.
3420
3421 2015-05-22  Joanmarie Diggs  <jdiggs@igalia.com>
3422
3423         AX: Figure out why list-detection2.html test fails on GTK
3424         https://bugs.webkit.org/show_bug.cgi?id=145273
3425
3426         Reviewed by Chris Fleizach.
3427
3428         Only consider the text under the pseudo element for GTK and EFL.
3429         The other platforms expose rendered text content through their
3430         own accessible objects. This will fix the crash on Windows until
3431         it can be looked into properly.
3432
3433         No new tests. This should stop list-detection2.html to stop crashing on Windows.
3434
3435         * accessibility/AccessibilityList.cpp:
3436         (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):
3437
3438 2015-05-22  Jer Noble  <jer.noble@apple.com>
3439
3440         [Mac] Audio tracks tagged as 'describes-video' are not automatically selected when that system accessibility option is set.
3441         https://bugs.webkit.org/show_bug.cgi?id=145228
3442
3443         Reviewed by Eric Carlson.
3444
3445         Tests: http/tests/media/hls/hls-accessiblity-describes-video.html
3446                media/accessiblity-describes-video.html
3447
3448         Add support to CaptionUserPreferences to return the user's preferred audio characteristics,
3449         including "public.accessibility.describes-video". When the media accessibility options change,
3450         trigger the HTMLMediaElement to update the list of tracks, and chose a new audio track if
3451         appropriate. Manually filter those tracks matching the requested characteristics in
3452         MediaSelectionGroupAVFObjC.  Allow these characteristics to be overrided by Internals for
3453         testing purposes.
3454
3455         * html/HTMLMediaElement.cpp:
3456         (WebCore::HTMLMediaElement::captionPreferencesChanged): Call tracksChanged().
3457         (WebCore::HTMLMediaElement::mediaPlayerPreferredAudioCharacteristics): Pass through to the page's caption preferences.
3458         * html/HTMLMediaElement.h:
3459         * page/CaptionUserPreferences.cpp:
3460         (WebCore::CaptionUserPreferences::setPreferredAudioCharacteristic): Simple setter.
3461         (WebCore::CaptionUserPreferences::preferredAudioCharacteristics): Simple getter.
3462         * page/CaptionUserPreferences.h:
3463         * page/CaptionUserPreferencesMediaAF.cpp:
3464         (WebCore::CaptionUserPreferencesMediaAF::~CaptionUserPreferencesMediaAF): Unregister for audio characteristics change notifications.
3465         (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges): Register for same.
3466         (WebCore::CaptionUserPreferencesMediaAF::setPreferredAudioCharacteristic): If in testing mode, pass to superclass; otherwise no-op.
3467         (WebCore::CaptionUserPreferencesMediaAF::preferredAudioCharacteristics): If in testing mode, pass to superclass;
3468             otherwise, ask the media accessibility framework.
3469         * page/CaptionUserPreferencesMediaAF.h:
3470         * platform/graphics/MediaPlayer.cpp:
3471         (WebCore::MediaPlayer::tracksChanged): Pass through to m_private.
3472         (WebCore::MediaPlayer::preferredAudioCharacteristics): Pass through to HTMLMediaElement.
3473         * platform/graphics/MediaPlayer.h:
3474         (WebCore::MediaPlayerClient::mediaPlayerPreferredAudioCharacteristics): Added; return empty vector by default.
3475         * platform/graphics/MediaPlayerPrivate.h:
3476         (WebCore::MediaPlayerPrivateInterface::tracksChanged): Added; no-op by default.
3477         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3478         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
3479         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
3480         (WebCore::MediaSelectionGroupAVFObjC::create): Added characteristics parameter.
3481         (WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC): Ditto.
3482         (WebCore::MediaSelectionGroupAVFObjC::updateOptions): Add an additional filter against the
3483             passed-in characteristics.
3484         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3485         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3486         (WebCore::determineChangedTracksFromNewTracksAndOldItems): Pass the characteristics to the media selection group.
3487         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Pass in the user's preferred characteristics.
3488         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Pass in an empty vector.
3489         * testing/Internals.cpp:
3490         (WebCore::Internals::userPreferredAudioCharacteristics): Added; return the current setting.
3491         (WebCore::Internals::setUserPreferredAudioCharacteristic): Added; pass through to CaptionUserPreferences.
3492         * testing/Internals.h:
3493         * testing/Internals.idl:
3494
3495         Add soft link macros which account for a possible failure to look up constants.
3496
3497         * platform/cf/MediaAccessibilitySoftLink.cpp:
3498         * platform/cf/MediaAccessibilitySoftLink.h:
3499         * platform/mac/SoftLinking.h:
3500         * platform/win/SoftLinking.h:
3501
3502 2015-05-22  Myles C. Maxfield  <mmaxfield@apple.com>
3503
3504         [Cocoa] Use CTFontDrawGlyphs() instead of CGContextShowGlyphsWithAdvances()/CGContextShowGlyphsAtPositions()
3505         https://bugs.webkit.org/show_bug.cgi?id=145234
3506
3507         Reviewed by Enrica Casucci.
3508
3509         Eventually, we want to migrate entirely off of text-related CoreGraphics calls
3510         and onto CoreText calls (in order to reduce complexity as well as eventually
3511         removing the need for FontPlatformData to hold a CGFontRef). There is an
3512         equivalent call to CGContextShowGlyphsWithAdvances() and
3513         CGContextShowGlyphsAtPositions(), namely, CTFontDrawGlyphs(), which we have
3514         found is as performant as its CoreGraphics counterparts. This patch simply
3515         migrates these two CG calls to its CT counterpart.
3516
3517         Performance was measured on a iPhone 4s as well as a Mid 2010 Mac Pro.
3518
3519         No new tests because there is no behavior change.
3520
3521         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3522         (WebCore::showGlyphsWithAdvances):
3523         (WebCore::FontCascade::drawGlyphs):
3524
3525 2015-05-22  Eric Carlson  <eric.carlson@apple.com>
3526
3527         [Mac] Don't show default controls after playing to wireless target
3528         https://bugs.webkit.org/show_bug.cgi?id=145317
3529
3530         Reviewed by Dean Jackson.
3531
3532         * Modules/mediacontrols/mediaControlsApple.js:
3533         (Controller.prototype.handlePanelTransitionEnd): Don't show controls unless the video
3534         element has the 'controls' attribute.
3535         (Controller.prototype.setPlaying): Check this.video.controls directly because we never want
3536         to show controls unless the attribute is present.
3537         (Controller.prototype.showControls): Ditto.
3538         (Controller.prototype.updateWirelessPlaybackStatus): Call reconnectControls.
3539         (Controller.prototype.handleWirelessPlaybackChange): Don't call reconnectControls, it will
3540         happen in updateWirelessPlaybackStatus.
3541         (Controller.prototype.showInlinePlaybackPlaceholderOnly): Deleted.
3542
3543 2015-05-22  Chris Dumez  <cdumez@apple.com>
3544
3545         [CG] Regression(r78652): Partially decoded images are not properly removed from MemoryCache when pruning
3546         https://bugs.webkit.org/show_bug.cgi?id=145310
3547
3548         Reviewed by Antti Koivisto.
3549
3550         r78652 added partially decoded images to the MemoryCache's list of live
3551         decoded resources so that they can be pruned on memory pressure. This
3552         was needed because CG decodes part of the image to determine its
3553         properties (e.g. its size). On memory pressure, we call
3554         BitmapImage::destroyDecodedData() which clears the ImageSource and
3555         frees up this extra decoded data.
3556
3557         However, we would fail to remove such partially decoded images from the
3558         MemoryCache's list of live resources when pruning. This is because
3559         BitmapImage::destroyMetadataAndNotify() fails to take into account the
3560         decoded properties size when no frame has been cleared. We would thus
3561         fail to detect a decoded size change and not call
3562         CachedImage::decodedSizeChanged(). As a result, the CachedImage's
3563         decoded size is not reset to 0 and we don't remove it from live decoded
3564         resources.
3565
3566         This patch updates BitmapImage::destroyMetadataAndNotify() to account
3567         for m_decodedPropertiesSize even if frameBytesCleared is 0. This way,
3568         images for which we have't decoded any frames yet will correctly report
3569         that we cleared the decoded data used to determine the image properties
3570         and their decoded size will be properly reset to 0. As a result, these
3571         will be removed from the MemoryCache's list of live decoded resources.
3572
3573         * platform/graphics/BitmapImage.cpp:
3574         (WebCore::BitmapImage::destroyDecodedData):
3575         (WebCore::BitmapImage::destroyMetadataAndNotify):
3576         (WebCore::BitmapImage::dataChanged):
3577         * platform/graphics/BitmapImage.h:
3578
3579 2015-05-22  Joseph Pecoraro  <pecoraro@apple.com>
3580
3581         Web Inspector: Unable to get cursor in new Rule section after creating multiple New Rules
3582         https://bugs.webkit.org/show_bug.cgi?id=145294
3583
3584         Reviewed by Timothy Hatcher.
3585
3586         * inspector/InspectorStyleSheet.cpp:
3587         (WebCore::InspectorStyleSheet::ensureParsedDataReady):
3588         Allow stylesheets with mutations for the inspector stylesheet
3589         which we control mutations of.
3590
3591 2015-05-22  Eric Carlson  <eric.carlson@apple.com>
3592
3593         [Mac] Device picker menu should be persistent
3594         https://bugs.webkit.org/show_bug.cgi?id=145311
3595
3596         Reviewed by Brent Fulgham.
3597
3598         * Modules/mediasession/WebMediaSessionManager.cpp:
3599         (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): Add logging.
3600         (WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient): Ditto.
3601         (WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients): Ditto.
3602         (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Ditto.
3603         (WebCore::WebMediaSessionManager::clientStateDidChange): Ditto.
3604         (WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange): Ditto.
3605         (WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring): Ditto.
3606
3607         * html/HTMLMediaElement.cpp:
3608         (WebCore::HTMLMediaElement::mediaState): Don't set ExternalDeviceAutoPlayCandidate unless
3609         there is an event listener.
3610
3611         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
3612         (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Release the menu
3613         controller and remove observers.
3614         (WebCore::MediaPlaybackTargetPickerMac::create): Add logging.
3615         (WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Ditto.
3616         (WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Ditto.
3617         (WebCore::MediaPlaybackTargetPickerMac::devicePicker): Ditto.
3618         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Ditto.
3619         (WebCore::MediaPlaybackTargetPickerMac::addPendingAction): Start the timer after
3620         a brief pause to debounce multiple identical notifications. 
3621         (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Add logging.
3622         (WebCore::MediaPlaybackTargetPickerMac::startingMonitoringPlaybackTargets): Add logging.
3623         (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets): Don't release
3624         the menu controller delegate.
3625         (-[WebAVOutputDeviceMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]): Add logging.
3626
3627         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3628         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget): Update logging.
3629         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Ditto.
3630
3631 2015-05-22  Alexey Proskuryakov  <ap@apple.com>
3632
3633         Build fix. Added a platform ifdef.
3634
3635         * platform/network/cf/ResourceRequestCFNet.cpp:
3636         (WebCore::ResourceRequest::isUserInitiatedKey):
3637
3638 2015-05-22  Tim Horton  <timothy_horton@apple.com>
3639
3640         Remove action menu support
3641         https://bugs.webkit.org/show_bug.cgi?id=145305
3642         <rdar://problem/21070771>
3643
3644         Reviewed by Anders Carlsson.
3645
3646         * WebCore.xcodeproj/project.pbxproj:
3647         * platform/spi/mac/NSMenuSPI.h:
3648         * platform/spi/mac/NSViewSPI.h: Removed.
3649         Remove some SPI.
3650
3651 2015-05-22  Antti Koivisto  <antti@apple.com>
3652
3653         MaskImageOperation code does not manage CachedImageClients correctly
3654         https://bugs.webkit.org/show_bug.cgi?id=145276
3655         rdar://problem/20959822
3656
3657         * rendering/RenderLayerMaskImageInfo.cpp:
3658         (WebCore::RenderLayer::MaskImageInfo::removeMaskImageClients):
3659
3660             Followup fix: clear m_maskImageOperations vector.
3661
3662 2015-05-22  Brady Eidson  <beidson@apple.com>
3663
3664         Rework how the ResourceRequest user initiated property key is used.
3665         Followup to https://bugs.webkit.org/show_bug.cgi?id=145281
3666
3667         Reviewed by Dan Bernstein.
3668
3669         * platform/mac/WebCoreSystemInterface.h:
3670
3671         * platform/network/cf/ResourceRequest.h:
3672         * platform/network/cf/ResourceRequestCFNet.cpp:
3673         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3674         (WebCore::ResourceRequest::doUpdateResourceRequest):
3675         (WebCore::ResourceRequest::isUserInitiatedKey):
3676
3677         * platform/network/cocoa/ResourceRequestCocoa.mm:
3678         (WebCore::ResourceRequest::doUpdateResourceRequest):
3679         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3680
3681 2015-05-22  Zalan Bujtas  <zalan@apple.com>
3682
3683         Unreviewed build fix for ENABLE(TREE_DEBUGGING)
3684
3685         * editing/VisibleSelection.h:
3686         * html/parser/HTMLElementStack.h:
3687         * html/parser/HTMLFormattingElementList.h:
3688
3689 2015-05-22  Joanmarie Diggs  <jdiggs@igalia.com>
3690
3691         AX: Figure out why list-detection2.html test fails on GTK
3692         https://bugs.webkit.org/show_bug.cgi?id=145273
3693
3694         Reviewed by Chris Fleizach.
3695
3696         Platforms which expose rendered text content through the parent element "ignore" the
3697         child renderers. This was causing AccessibilityList::childHasPseudoVisibleListItemMarker
3698         to fail, which in turn caused the list detection heuristic to fail. Therefore add one
3699         final check to this method to look for non-empty, non-whitespace text under the ::before
3700         pseudo element.
3701
3702         No new tests; list-detection2.html now passes on GTK.
3703
3704         * accessibility/AccessibilityList.cpp:
3705         (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):
3706
3707 2015-05-21  Jer Noble  <jer.noble@apple.com>
3708
3709         [iOS] Tell AVPlayerLayer when we enter optimized fullscreen mode.
3710         https://bugs.webkit.org/show_bug.cgi?id=145289
3711
3712         Reviewed by Eric Carlson.
3713
3714         AVFoundation would normally already know that its AVPlayerLayer is in optimized
3715         fullscreen mode, but because of the WebProcess/UIProcess split, they need to be
3716         told explicitly in the WebProcess when the UIProcess enters optimized fullscreen
3717         mode.
3718
3719         * html/HTMLMediaElement.h:
3720         * html/HTMLVideoElement.cpp:
3721         (WebCore::HTMLVideoElement::fullscreenModeChanged): Pass to private().
3722         * platform/graphics/MediaPlayer.cpp:
3723         (WebCore::MediaPlayer::setVideoFullscreenMode): Pass to m_private.
3724         (WebCore::MediaPlayer::fullscreenMode): Pass to m_client.
3725         * platform/graphics/MediaPlayer.h:
3726         (WebCore::MediaPlayerClient::mediaPlayerFullscreenMode): Default implementation returns None.
3727         * platform/graphics/MediaPlayerPrivate.h:
3728         (WebCore::MediaPlayerPrivateInterface::setVideoFullscreenMode): Default implementation is a no-op.
3729         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3730         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3731         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): Get the fullscreen
3732             mode from MediaPlayer and tell the AVPlayerLayer if the mode is optimized.
3733         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode):
3734             Ditto.
3735         * platform/spi/mac/AVFoundationSPI.h:
3736
3737 2015-05-21  Joanmarie Diggs  <jdiggs@igalia.com>
3738
3739         AX: [GTK] Implement computedRoleString in AccessibilityUIElement
3740         https://bugs.webkit.org/show_bug.cgi?id=128420
3741
3742         Reviewed by Chris Fleizach.
3743
3744         Expose all ARIA roles (not just landmark-related roles) via an "xml-roles" AtkObject
3745         attribute as per http://www.w3.org/TR/core-aam-1.1/#roleMappingGeneralRules
3746
3747         Expose non-empty computed role strings via AtkObject attribute named "computed-role".
3748         Currently the computed role and the ARIA role value happen to be the same string, but
3749         that might not always be the case. And AtkObject attributes are cheap.
3750
3751         Test: platform/gtk/accessibility/xml-roles-exposed.html.
3752
3753         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3754         (webkitAccessibleGetAttributes):
3755
3756 2015-05-21  Antti Koivisto  <antti@apple.com>
3757
3758         MaskImageOperation code does not manage CachedImageClients correctly
3759         https://bugs.webkit.org/show_bug.cgi?id=145276
3760         rdar://problem/20959822
3761
3762         Reviewed by Andreas Kling.
3763
3764         Test: css3/masking/mask-image-client-crash.html
3765
3766         * platform/graphics/MaskImageOperation.cpp:
3767         (WebCore::MaskImageOperation::isMaskLoaded):
3768         (WebCore::MaskImageOperation::setImage):
3769
3770             If image changes transfer the clients to the new image.
3771
3772         (WebCore::MaskImageOperation::setRenderLayerImageClient):
3773
3774             Always use setImage.
3775
3776         (WebCore::MaskImageOperation::notifyFinished):
3777         * platform/graphics/MaskImageOperation.h:
3778         * rendering/RenderLayer.cpp:
3779         (WebCore::RenderLayer::calculateClipRects):
3780         * rendering/RenderLayer.h:
3781         * rendering/RenderLayerMaskImageInfo.cpp:
3782         (WebCore::RenderLayer::MaskImageInfo::~MaskImageInfo):
3783         (WebCore::RenderLayer::MaskImageInfo::updateMaskImageClients):
3784
3785             Store the MaskImageOperations where we added clients.
3786
3787         (WebCore::RenderLayer::MaskImageInfo::removeMaskImageClients):
3788
3789             Make sure we remove the clients from the same MaskImageOperations we added them to.
3790
3791         * rendering/RenderLayerMaskImageInfo.h:
3792
3793 2015-05-21  Daniel Bates  <dabates@apple.com>
3794
3795         Update Autofill button icon
3796         https://bugs.webkit.org/show_bug.cgi?id=145191
3797         <rdar://problem/20178942>
3798
3799         Reviewed by Jessie Berlin.
3800
3801         * css/html.css:
3802         (input::-webkit-auto-fill-button):
3803         (input::-webkit-auto-fill-button:active):
3804         (input::-webkit-auto-fill-button:hover):
3805
3806 2015-05-21  Brady Eidson  <beidson@apple.com>
3807
3808         Add an "initiated by user gesture" flag to ResourceRequest.
3809         https://bugs.webkit.org/show_bug.cgi?id=145281
3810
3811         Reviewed by Alex Christensen.
3812
3813         Allow WebKit to tell WebCore what the new property key is:
3814         * platform/ios/WebCoreSystemInterfaceIOS.mm:
3815         * platform/mac/WebCoreSystemInterface.h:
3816         * platform/mac/WebCoreSystemInterface.mm:
3817
3818         Add the flag to ResourceRequest, and make sure it encodes/decodes:
3819         * platform/network/ResourceRequestBase.h:
3820         (WebCore::ResourceRequestBase::initiatedByUserGesture):
3821         (WebCore::ResourceRequestBase::setInitiatedByUserGesture):
3822         (WebCore::ResourceRequestBase::encodeWithoutPlatformData):
3823         (WebCore::ResourceRequestBase::decodeWithoutPlatformData):
3824
3825         Set/get the property on native CFURLRequestRefs:
3826         * platform/network/cf/ResourceRequestCFNet.cpp:
3827         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3828         (WebCore::ResourceRequest::doUpdateResourceRequest):
3829
3830         Set/get the property on native NSURLRequests:
3831         * platform/network/cocoa/ResourceRequestCocoa.mm:
3832         (WebCore::ResourceRequest::doUpdateResourceRequest):
3833         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3834
3835 2015-05-21  Daniel Bates  <dabates@apple.com>
3836
3837         Rollout <http://trac.webkit.org/changeset/183909>
3838         (https://bugs.webkit.org/show_bug.cgi?id=144657)
3839
3840         Revert <http://trac.webkit.org/changeset/183909> since pausing the database
3841         thread prevents in-progress transactions from completing. We need to think
3842         about this change some more.
3843
3844         * Modules/webdatabase/AbstractDatabaseServer.h:
3845         * Modules/webdatabase/DatabaseManager.cpp:
3846         (WebCore::DatabaseManager::setPauseAllDatabases): Deleted.
3847         * Modules/webdatabase/DatabaseManager.h:
3848         * Modules/webdatabase/DatabaseServer.cpp:
3849         (WebCore::DatabaseServer::setPauseAllDatabases): Deleted.
3850         * Modules/webdatabase/DatabaseServer.h:
3851
3852 2015-05-21  Jake Nielsen  <jacob_nielsen@apple.com>
3853
3854         r184718 and r184725 caused four tests to begin crashing
3855
3856         Unreviewed rollback.
3857
3858         Tests that started crashing:
3859
3860         svg/carto.net/textbox.svg svg/custom/tref-clone-crash.html svg/custom/use-animation-in-fill.html svg/custom/use-multiple-on-nested-disallowed-font.html
3861
3862         * svg/SVGAnimateElementBase.cpp:
3863         (WebCore::propertyTypesAreConsistent):
3864         * svg/SVGAnimatedPath.cpp:
3865         (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
3866         * svg/SVGAnimatedTypeAnimator.h:
3867         (WebCore::SVGAnimatedTypeAnimator::executeAction):
3868         * svg/SVGAnimationElement.cpp:
3869         (WebCore::SVGAnimationElement::parseAttribute):
3870         * svg/SVGCursorElement.cpp:
3871         (WebCore::SVGCursorElement::~SVGCursorElement):
3872         (WebCore::SVGCursorElement::isSupportedAttribute):
3873         * svg/SVGDocumentExtensions.cpp:
3874         (WebCore::SVGDocumentExtensions::pauseAnimations):
3875         (WebCore::SVGDocumentExtensions::unpauseAnimations):
3876         (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
3877         (WebCore::SVGDocumentExtensions::isElementWithPendingResources):
3878         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
3879         (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement):
3880         (WebCore::SVGDocumentExtensions::rebuildElements):
3881         * svg/SVGElement.cpp:
3882         (WebCore::populateAttributeNameToCSSPropertyIDMap):
3883         (WebCore::populateAttributeNameToAnimatedPropertyTypeMap):
3884         (WebCore::attributeNameToAnimatedPropertyTypeMap):
3885         (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
3886         (WebCore::cssPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
3887         (WebCore::hasLoadListener):
3888         * svg/SVGFontData.cpp:
3889         (WebCore::SVGFontData::applySVGGlyphSelection):
3890         * svg/SVGFontElement.cpp:
3891         (WebCore::SVGFontElement::registerLigaturesInGlyphCache):
3892         (WebCore::SVGKerningMap::insert):
3893         (WebCore::stringMatchesUnicodeRange):
3894         * svg/SVGPathByteStream.h:
3895         (WebCore::SVGPathByteStream::begin):
3896         (WebCore::SVGPathByteStream::end):
3897         (WebCore::SVGPathByteStream::append):
3898         (WebCore::SVGPathByteStream::clear):
3899         (WebCore::SVGPathByteStream::isEmpty):
3900         * svg/SVGPathUtilities.cpp:
3901         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
3902         * svg/animation/SMILTimeContainer.cpp:
3903         (WebCore::SMILTimeContainer::setElapsed):
3904         (WebCore::SMILTimeContainer::updateAnimations):
3905         * svg/animation/SVGSMILElement.cpp:
3906         (WebCore::SVGSMILElement::parseBeginOrEnd):
3907         (WebCore::SVGSMILElement::connectConditions):
3908         (WebCore::SVGSMILElement::disconnectConditions):
3909         (WebCore::SVGSMILElement::notifyDependentsIntervalChanged):
3910         (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
3911         * svg/graphics/filters/SVGFilterBuilder.cpp:
3912         (WebCore::SVGFilterBuilder::clearResultsRecursive):
3913         * svg/graphics/filters/SVGFilterBuilder.h:
3914         (WebCore::SVGFilterBuilder::addBuiltinEffects):
3915         * svg/properties/SVGAnimatedProperty.cpp:
3916         (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
3917         * svg/properties/SVGListProperty.h:
3918         (WebCore::SVGListProperty::detachListWrappersAndResize):
3919         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
3920         (WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles):
3921
3922 2015-05-21  Brent Fulgham  <bfulgham@apple.com>
3923
3924         Scroll-snap points needs to be updated during programmatic scrolls
3925         https://bugs.webkit.org/show_bug.cgi?id=145216
3926         <rdar://problem/21051039>
3927
3928         Reviewed by Dean Jackson.
3929
3930         Whenever we adjust the current scroll position, make sure we also update the current
3931         active scroll snap offset index (if applicable).
3932
3933         * platform/ScrollAnimator.cpp:
3934         (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation): Call the new 'updateActiveScrollSnapIndexForOffset'
3935         method after moving to a new position.
3936         (WebCore::ScrollAnimator::setCurrentPosition): Ditto.
3937         (WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset): New method. Asks the scroll controller to
3938         identify the closest scroll snap offset index. If it finds something relevant, update the ScrollableArea state
3939         to track these new values.
3940         * platform/ScrollAnimator.h:
3941         * platform/cocoa/ScrollController.h:
3942         (WebCore::ScrollController::activeScrollSnapIndexDidChange):
3943         (WebCore::ScrollController::setScrollSnapIndexDidChange):
3944         * platform/cocoa/ScrollController.mm:
3945         (WebCore::ScrollController::setNearestScrollSnapIndexForAxisAndOffset): Added. Find the closest relevant scroll snap offset
3946         index for the given scroll offset, and update the internal scroll snap state to reflect it.
3947         (WebCore::ScrollController::setActiveScrollSnapIndicesForOffset): Given the x and y offset for a scroll,
3948         set the relevant scroll snap offset indices.
3949         * platform/mac/ScrollAnimatorMac.mm:
3950         (WebCore::ScrollAnimatorMac::immediateScrollTo): Call the new 'updateActiveScrollSnapIndexForOffset' method
3951         after moving to a new position.
3952         (WebCore::ScrollAnimatorMac::immediateScrollBy): Ditto.
3953
3954 2015-05-21  Matt Baker  <mattbaker@apple.com>
3955
3956         Unreviewed build fix.
3957
3958         * svg/SVGAnimateElementBase.cpp:
3959         (WebCore::propertyTypesAreConsistent): should be type.properties, not type.properties().
3960
3961 2015-05-21  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
3962
3963         [Streams API] Remove ReadableStreamReader closed promise internal slot
3964         https://bugs.webkit.org/show_bug.cgi?id=145215
3965
3966         Reviewed by Darin Adler.
3967
3968         Using the new JSPromiseDeferred member generated by binding generator to handle closed promise attribute.
3969         Removed internal slots routines previously used to ensure persistency of the promise.
3970
3971         Existing tests cover the changes.
3972
3973         * bindings/js/JSReadableStreamReaderCustom.cpp:
3974         (WebCore::JSReadableStreamReader::closed):
3975         (WebCore::JSReadableStreamReader::cancel): Deleted.
3976         (WebCore::JSReadableStreamReader::releaseLock): Deleted.