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