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