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