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