Cleanup ENABLE_CSS3_CONDITIONAL_RULES codes.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-06-25  Dean Jackson  <dino@apple.com>
2
3         Inline media controls disappear when returning a video to inline
4         https://bugs.webkit.org/show_bug.cgi?id=146328
5         <rdar://problem/21142862>
6
7         Reviewed by Tim Horton.
8
9         We were getting into a state where the controls were being
10         hidden via a timer while we were in fullscreen or on
11         another tab. Meanwhile, we could exit from such
12         a condition to a point where the controls were
13         not visible, but not completely removed from the DOM, confusing
14         the logic that decided whether to show them on tap.
15
16         * Modules/mediacontrols/mediaControlsApple.js:
17         (Controller.prototype.hideControls): If we are in the act of hiding
18         controls, we can clear any existing timers that are going to try
19         to hide them again.
20         (Controller.prototype.resetHideControlsTimer): Make sure we null
21         out the hideTimer object, since we look at its value often to
22         decide whether or not a timer exists.
23         * Modules/mediacontrols/mediaControlsiOS.js:
24         (ControllerIOS.prototype.handlePlayButtonTouchEnd): If the user
25         taps play, then we should call showControls, which resets the hide
26         timers amongst other things. We need to do this due to the next change,
27         so that a timer started before we pressed play doesn't cause the
28         controls to instantly disappear as soon as we start playing.
29         (ControllerIOS.prototype.handleWrapperTouchStart): We can get into
30         the state where controls are invisible but still in the tree. Since the
31         controlsAreHidden() logic only looks for the latter, we need to also
32         look for invisible when the user taps for the controls. Yes, this
33         naming doesn't make much sense :(
34
35 2015-06-25  Joseph Pecoraro  <pecoraro@apple.com>
36
37         [Mac] Web Inspector: Window dragging on toolbar should behave more like native window dragging
38         https://bugs.webkit.org/show_bug.cgi?id=146324
39
40         Reviewed by Timothy Hatcher.
41
42         * inspector/InspectorFrontendClient.h:
43         * inspector/InspectorFrontendClientLocal.h:
44         Do nothing or pass it up to the the frontend client.
45
46         * inspector/InspectorFrontendHost.h:
47         * inspector/InspectorFrontendHost.idl:
48         * inspector/InspectorFrontendHost.cpp:
49         (WebCore::InspectorFrontendHost::startWindowDrag):
50         Add a new host function to get native window dragging behavior.
51
52 2015-06-25  Tim Horton  <timothy_horton@apple.com>
53
54         Viewport units are wrong when scaled in 2-up mode, cause content to hop around on apple.com/music
55         https://bugs.webkit.org/show_bug.cgi?id=146322
56         <rdar://problem/21413884>
57
58         Reviewed by Simon Fraser.
59
60         * page/FrameView.cpp:
61         (WebCore::FrameView::viewportSizeForCSSViewportUnits):
62         Use the fixed layout size, if enabled, instead of the visibleContentRect,
63         for the viewport unit size. This ensures that viewport units take up the whole
64         fixed-layout viewport, not just the size of the view scaled by the page scale
65         (which visibleContentRect provides).
66
67 2015-06-25  Eric Carlson  <eric.carlson@apple.com>
68
69         [Mac] AirPlay menu button still doesn't always show on page load
70         https://bugs.webkit.org/show_bug.cgi?id=146325
71
72         Reviewed by Dean Jackson.
73
74         * html/HTMLMediaElement.cpp:
75         (WebCore::HTMLMediaElement::mediaState): A player that can't currently play to a wireless 
76           target does require target monitoring if an availability event listner has been registered,
77           otherwise we may not register for availability change notifications.
78
79 2015-06-25  Anders Carlsson  <andersca@apple.com>
80
81         Stop using ScrollbarThemeClient and just use Scrollbar directly
82         https://bugs.webkit.org/show_bug.cgi?id=146320
83
84         Reviewed by Tim Horton.
85
86         * page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm:
87         (WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars):
88         * platform/ScrollableArea.cpp:
89         (WebCore::ScrollableArea::setScrollbarOverlayStyle):
90         * platform/Scrollbar.cpp:
91         (WebCore::Scrollbar::Scrollbar):
92         (WebCore::Scrollbar::~Scrollbar):
93         (WebCore::Scrollbar::offsetDidChange):
94         (WebCore::Scrollbar::updateThumb):
95         (WebCore::Scrollbar::paint):
96         (WebCore::thumbUnderMouse):
97         (WebCore::Scrollbar::autoscrollPressedPart):
98         (WebCore::Scrollbar::startTimerIfNeeded):
99         (WebCore::Scrollbar::moveThumb):
100         (WebCore::Scrollbar::setHoveredPart):
101         (WebCore::Scrollbar::setPressedPart):
102         (WebCore::Scrollbar::mouseMoved):
103         (WebCore::Scrollbar::mouseUp):
104         (WebCore::Scrollbar::mouseDown):
105         (WebCore::Scrollbar::setEnabled):
106         * platform/ScrollbarTheme.h:
107         (WebCore::ScrollbarTheme::updateEnabledState):
108         (WebCore::ScrollbarTheme::paint):
109         (WebCore::ScrollbarTheme::hitTest):
110         (WebCore::ScrollbarTheme::updateScrollbarOverlayStyle):
111         (WebCore::ScrollbarTheme::invalidateParts):
112         (WebCore::ScrollbarTheme::invalidatePart):
113         (WebCore::ScrollbarTheme::paintTickmarks):
114         (WebCore::ScrollbarTheme::shouldCenterOnThumb):
115         (WebCore::ScrollbarTheme::shouldSnapBackToDragOrigin):
116         (WebCore::ScrollbarTheme::shouldDragDocumentInsteadOfThumb):
117         (WebCore::ScrollbarTheme::thumbPosition):
118         (WebCore::ScrollbarTheme::thumbLength):
119         (WebCore::ScrollbarTheme::trackPosition):
120         (WebCore::ScrollbarTheme::trackLength):
121         (WebCore::ScrollbarTheme::registerScrollbar):
122         (WebCore::ScrollbarTheme::unregisterScrollbar):
123         * platform/ScrollbarThemeComposite.cpp:
124         (WebCore::ScrollbarThemeComposite::paint):
125         (WebCore::ScrollbarThemeComposite::hitTest):
126         (WebCore::ScrollbarThemeComposite::invalidatePart):
127         (WebCore::ScrollbarThemeComposite::splitTrack):
128         (WebCore::usedTotalSize):
129         (WebCore::ScrollbarThemeComposite::thumbPosition):
130         (WebCore::ScrollbarThemeComposite::thumbLength):
131         (WebCore::ScrollbarThemeComposite::minimumThumbLength):
132         (WebCore::ScrollbarThemeComposite::trackPosition):
133         (WebCore::ScrollbarThemeComposite::trackLength):
134         (WebCore::ScrollbarThemeComposite::thumbRect):
135         * platform/ScrollbarThemeComposite.h:
136         (WebCore::ScrollbarThemeComposite::willPaintScrollbar):
137         (WebCore::ScrollbarThemeComposite::didPaintScrollbar):
138         (WebCore::ScrollbarThemeComposite::paintScrollbarBackground):
139         (WebCore::ScrollbarThemeComposite::paintTrackBackground):
140         (WebCore::ScrollbarThemeComposite::paintTrackPiece):
141         (WebCore::ScrollbarThemeComposite::paintButton):
142         (WebCore::ScrollbarThemeComposite::paintThumb):
143         (WebCore::ScrollbarThemeComposite::constrainTrackRectToTrackPieces):
144         * platform/efl/ScrollbarThemeEfl.h:
145         * platform/gtk/ScrollbarThemeGtk.cpp:
146         (WebCore::ScrollbarThemeGtk::hasThumb):
147         (WebCore::ScrollbarThemeGtk::backButtonRect):
148         (WebCore::ScrollbarThemeGtk::forwardButtonRect):
149         (WebCore::ScrollbarThemeGtk::trackRect):
150         (WebCore::ScrollbarThemeGtk::registerScrollbar):
151         (WebCore::ScrollbarThemeGtk::unregisterScrollbar):
152         (WebCore::ScrollbarThemeGtk::updateScrollbarsFrameThickness):
153         (WebCore::ScrollbarThemeGtk::thumbRect):
154         (WebCore::ScrollbarThemeGtk::paintTrackBackground):
155         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
156         (WebCore::ScrollbarThemeGtk::paintThumb):
157         (WebCore::ScrollbarThemeGtk::paintButton):
158         (WebCore::ScrollbarThemeGtk::paint):
159         (WebCore::ScrollbarThemeGtk::shouldCenterOnThumb):
160         (WebCore::ScrollbarThemeGtk::buttonSize):
161         (WebCore::ScrollbarThemeGtk::minimumThumbLength):
162         * platform/gtk/ScrollbarThemeGtk.h:
163         (WebCore::ScrollbarThemeGtk::hasButtons):
164         * platform/ios/ScrollbarThemeIOS.h:
165         * platform/ios/ScrollbarThemeIOS.mm:
166         (WebCore::ScrollbarThemeIOS::registerScrollbar):
167         (WebCore::ScrollbarThemeIOS::unregisterScrollbar):
168         (WebCore::ScrollbarThemeIOS::hasButtons):
169         (WebCore::ScrollbarThemeIOS::hasThumb):
170         (WebCore::ScrollbarThemeIOS::backButtonRect):
171         (WebCore::ScrollbarThemeIOS::forwardButtonRect):
172         (WebCore::ScrollbarThemeIOS::trackRect):
173         (WebCore::ScrollbarThemeIOS::minimumThumbLength):
174         (WebCore::ScrollbarThemeIOS::shouldCenterOnThumb):
175         (WebCore::ScrollbarThemeIOS::paint):
176         * platform/mac/ScrollAnimatorMac.mm:
177         (scrollbarPainterForScrollbar):
178         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
179         (-[WebScrollbarPartAnimation startAnimation]):
180         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
181         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
182         (-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]):
183         (-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]):
184         (-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
185         (-[WebScrollbarPainterDelegate scrollerImp:animateExpansionTransitionWithDuration:]):
186         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
187         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
188         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
189         (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
190         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
191         (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
192         (WebCore::ScrollAnimatorMac::invalidateScrollbarPartLayers):
193         (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
194         (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
195         (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
196         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
197         * platform/mac/ScrollbarThemeMac.h:
198         * platform/mac/ScrollbarThemeMac.mm:
199         (WebCore::ScrollbarThemeMac::registerScrollbar):
200         (WebCore::ScrollbarThemeMac::unregisterScrollbar):
201         (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar):
202         (WebCore::ScrollbarThemeMac::painterForScrollbar):
203         (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
204         (WebCore::ScrollbarThemeMac::hasButtons):
205         (WebCore::ScrollbarThemeMac::hasThumb):
206         (WebCore::ScrollbarThemeMac::backButtonRect):
207         (WebCore::ScrollbarThemeMac::forwardButtonRect):
208         (WebCore::ScrollbarThemeMac::trackRect):
209         (WebCore::ScrollbarThemeMac::minimumThumbLength):
210         (WebCore::ScrollbarThemeMac::shouldCenterOnThumb):
211         (WebCore::ScrollbarThemeMac::shouldDragDocumentInsteadOfThumb):
212         (WebCore::ScrollbarThemeMac::updateEnabledState):
213         (WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
214         (WebCore::ScrollbarThemeMac::paint):
215         * platform/mock/ScrollbarThemeMock.cpp:
216         (WebCore::ScrollbarThemeMock::trackRect):
217         (WebCore::ScrollbarThemeMock::paintTrackBackground):
218         (WebCore::ScrollbarThemeMock::paintThumb):
219         * platform/mock/ScrollbarThemeMock.h:
220         (WebCore::ScrollbarThemeMock::hasButtons): Deleted.
221         (WebCore::ScrollbarThemeMock::hasThumb): Deleted.
222         (WebCore::ScrollbarThemeMock::backButtonRect): Deleted.
223         (WebCore::ScrollbarThemeMock::forwardButtonRect): Deleted.
224         (WebCore::ScrollbarThemeMock::maxOverlapBetweenPages): Deleted.
225         (WebCore::ScrollbarThemeMock::isMockTheme): Deleted.
226         * platform/win/ScrollbarThemeSafari.cpp:
227         (WebCore::ScrollbarThemeSafari::hasButtons):
228         (WebCore::ScrollbarThemeSafari::hasThumb):
229         (WebCore::ScrollbarThemeSafari::backButtonRect):
230         (WebCore::ScrollbarThemeSafari::forwardButtonRect):
231         (WebCore::ScrollbarThemeSafari::trackRect):
232         (WebCore::ScrollbarThemeSafari::minimumThumbLength):
233         (WebCore::ScrollbarThemeSafari::shouldCenterOnThumb):
234         (WebCore::ScrollbarThemeSafari::paintTrackBackground):
235         (WebCore::ScrollbarThemeSafari::paintButton):
236         (WebCore::ScrollbarThemeSafari::paintThumb):
237         * platform/win/ScrollbarThemeSafari.h:
238         * platform/win/ScrollbarThemeWin.cpp:
239         (WebCore::ScrollbarThemeWin::hasThumb):
240         (WebCore::ScrollbarThemeWin::backButtonRect):
241         (WebCore::ScrollbarThemeWin::forwardButtonRect):
242         (WebCore::ScrollbarThemeWin::trackRect):
243         (WebCore::ScrollbarThemeWin::shouldCenterOnThumb):
244         (WebCore::ScrollbarThemeWin::shouldSnapBackToDragOrigin):
245         (WebCore::ScrollbarThemeWin::paintTrackBackground):
246         (WebCore::ScrollbarThemeWin::paintTrackPiece):
247         (WebCore::ScrollbarThemeWin::paintButton):
248         (WebCore::paintGripper):
249         (WebCore::ScrollbarThemeWin::paintThumb):
250         * platform/win/ScrollbarThemeWin.h:
251         * rendering/RenderScrollbar.h:
252         (isType):
253         * rendering/RenderScrollbarPart.cpp:
254         (WebCore::RenderScrollbarPart::styleDidChange):
255         (WebCore::RenderScrollbarPart::imageChanged):
256         * rendering/RenderScrollbarTheme.cpp:
257         (WebCore::RenderScrollbarTheme::buttonSizesAlongTrackAxis):
258         (WebCore::RenderScrollbarTheme::hasButtons):
259         (WebCore::RenderScrollbarTheme::hasThumb):
260         (WebCore::RenderScrollbarTheme::minimumThumbLength):
261         (WebCore::RenderScrollbarTheme::backButtonRect):
262         (WebCore::RenderScrollbarTheme::forwardButtonRect):
263         (WebCore::RenderScrollbarTheme::trackRect):
264         (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
265         (WebCore::RenderScrollbarTheme::willPaintScrollbar):
266         (WebCore::RenderScrollbarTheme::didPaintScrollbar):
267         (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
268         (WebCore::RenderScrollbarTheme::paintTrackBackground):
269         (WebCore::RenderScrollbarTheme::paintTrackPiece):
270         (WebCore::RenderScrollbarTheme::paintButton):
271         (WebCore::RenderScrollbarTheme::paintThumb):
272         (WebCore::RenderScrollbarTheme::paintTickmarks):
273         * rendering/RenderScrollbarTheme.h:
274
275 2015-06-24  Matt Rajca  <mrajca@apple.com>
276
277         MediaSession: fall back to "content" kind when an unsupported media session kind is passed in
278         https://bugs.webkit.org/show_bug.cgi?id=146293
279
280         Reviewed by Eric Carlson.
281
282         * Modules/mediasession/MediaSession.cpp:
283         (WebCore::MediaSession::parseKind): Parse the media session kind to one of the four supported types.
284         (WebCore::MediaSession::MediaSession):
285         (WebCore::MediaSession::kind): Format the value as a string (which the JS bindings expect).
286         * Modules/mediasession/MediaSession.h: The media session kind is now stored as an enum rather than a string
287           since we only support a small, fixed number of values.
288
289 2015-06-25  Eric Carlson  <eric.carlson@apple.com>
290
291         [Mac] Crash in WebCore::MediaPlayer::canPlayToWirelessPlaybackTarget
292         https://bugs.webkit.org/show_bug.cgi?id=146317
293
294         Reviewed by Brent Fulgham.
295
296         * html/HTMLMediaElement.cpp:
297         (WebCore::HTMLMediaElement::mediaState): NULL-check m_player before using it.
298
299 2015-06-25  Commit Queue  <commit-queue@webkit.org>
300
301         Unreviewed, rolling out r185956.
302         https://bugs.webkit.org/show_bug.cgi?id=146321
303
304         Causes massive crashes on test bots (Requested by bfulgham on
305         #webkit).
306
307         Reverted changeset:
308
309         "Enabling MEDIA_STREAM"
310         https://bugs.webkit.org/show_bug.cgi?id=145947
311         http://trac.webkit.org/changeset/185956
312
313 2015-06-25  Brent Fulgham  <bfulgham@apple.com>
314
315         [Win] Update MediaPlayerPrivateAVFoundationCF::supportsType
316         https://bugs.webkit.org/show_bug.cgi?id=146302
317         <rdar://problem/19726553>
318
319         Reviewed by Eric Carlson.
320
321         Tested by existing media tests.
322
323         Update the AVFoundationCF version of 'supportsType' to more closely match the AVFoundation
324         version. Use this new code when the necessary AVFoundationCF functions are present.
325
326         * AVFoundationSupport.py: Check for presence of AVCFURLAssetIsPlayableExtendedMIMEType.
327         (fileContains): Added helper function.
328         * WebCore.vcxproj/WebCoreGenerated.vcxproj: Add AVFoundationSupport.py to project file to make
329         maintenance easier.
330         * WebCore.vcxproj/WebCoreGenerated.vcxproj.filters: Ditto.
331         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
332         (WebCore::MediaPlayerPrivateAVFoundation::isUnsupportedMIMEType): Moved from ObjC version.
333         (WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList): Ditto.
334         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
335         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add missing declaration.
336         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
337         (WebCore::avfMIMETypes): Added CF version of AVFoundation code.
338         (WebCore::MediaPlayerPrivateAVFoundationCF::supportsType): Update to use new AVCF
339         method if it is available.
340         (WebCore::MediaPlayerPrivateAVFoundationCF::languageOfPrimaryAudioTrack): Handle case of a
341         null language locale. This is a drive-by fix of a bug found during testing.
342         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
343         (WebCore::isUnsupportedMIMEType): Deleted.
344         (WebCore::staticMIMETypeList): Deleted.
345
346 2015-06-25  Matthew Daiter  <mdaiter@apple.com>
347
348         Enabling MEDIA_STREAM
349         https://bugs.webkit.org/show_bug.cgi?id=145947
350         <rdar://problem/21365829>
351
352         Reviewed by Brent Fulgham.
353
354         * Configurations/FeatureDefines.xcconfig:
355         * Modules/mediastream/UserMediaClient.h:
356         * WebCore.xcodeproj/project.pbxproj:
357         * platform/mediastream/mac/AVAudioCaptureSource.mm:
358         * platform/mock/UserMediaClientMock.h:
359
360 2015-06-25  Zalan Bujtas  <zalan@apple.com>
361
362         Do not send touch events to the slider's thumb when it does not have a renderer.
363         https://bugs.webkit.org/show_bug.cgi?id=146307
364         rdar://problem/21539399
365
366         Reviewed by Simon Fraser.
367
368         Bail out early if either the touch target or the renderer() is null.
369
370         Test: fast/events/touch/input-range-with-thumb-display-none-crash.html
371
372         * html/shadow/SliderThumbElement.cpp:
373         (WebCore::findTouchWithIdentifier):
374         (WebCore::SliderThumbElement::handleTouchStart):
375         (WebCore::SliderThumbElement::handleTouchMove):
376         (WebCore::SliderThumbElement::handleTouchEndAndCancel):
377
378 2015-06-25  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
379
380         [Streams API] Implement HighWaterMark
381         https://bugs.webkit.org/show_bug.cgi?id=146235
382
383         Reviewed by Darin Adler.
384
385         Retrieval of HighWaterMark parameter from arguments passed to the ReadableStream JS constructor.
386         Retrieval of size function callback from arguments passed to the ReadableStream JS constructor.
387         Calling doPull() if buffer size is below HighWaterMark.
388
389         Covered by rebased tests.
390
391         * Modules/streams/ReadableStream.cpp:
392         (WebCore::ReadableStream::pull): Adding precise check for HWM.
393         * Modules/streams/ReadableStream.h: Introducing hasEnoughValues.
394         * bindings/js/ReadableJSStream.cpp:
395         (WebCore::getHighWaterMark): Utility routine to get properly HWM value.
396         (WebCore::ReadableJSStream::create): Retrieval of HWM and size function.
397         (WebCore::ReadableJSStream::ReadableJSStream):
398         * bindings/js/ReadableJSStream.h: Adding hasEnoughValues and desiredSize prototypes.
399
400 2015-06-25  Tim Horton  <timothy_horton@apple.com>
401
402         Try to fix the iOS EWS build.
403
404         * platform/spi/cocoa/SecuritySPI.h:
405
406 2015-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
407
408         [GTK] Empty gtk-font-name setting causes WebProcess crash rendering pages
409         https://bugs.webkit.org/show_bug.cgi?id=146246
410
411         Reviewed by Sergio Villar Senin.
412
413         Return early if system font is empty.
414
415         * rendering/RenderThemeGtk.cpp:
416         (WebCore::RenderThemeGtk::updateCachedSystemFontDescription):
417
418 2015-06-24  Chris Dumez  <cdumez@apple.com>
419
420         Unreviewed, EFL build fix after r185940.
421
422         Members were initialized in wrong order.
423
424         * Modules/mediastream/MediaDeviceInfo.cpp:
425         (WebCore::MediaDeviceInfo::MediaDeviceInfo):
426
427 2015-06-24  Chris Dumez  <cdumez@apple.com>
428
429         Unreviewed, Build fix after r185940.
430
431         Move implementation inside WebCore namespace.
432
433         * Modules/mediastream/MediaDeviceInfo.cpp:
434
435 2015-06-24  Chris Dumez  <cdumez@apple.com>
436
437         Unreviewed, speculative GTK build fix after 185940.
438
439         Add new cpp file to CMakeLists.txt.
440
441         * CMakeLists.txt:
442
443 2015-06-24  Matt Daiter  <mdaiter@apple.com>
444
445         Building MediaDeviceInfo for enumerateDevices
446         https://bugs.webkit.org/show_bug.cgi?id=146257
447         <rdar://problem/21513462>
448
449         Reviewed by Eric Carlson.
450
451         MediaDeviceInfo necessary for enumerateDevices
452
453         * CMakeLists.txt: Added MediaDevicesInfo.idl
454         * DerivedSources.make: Added MediaDevicesInfo.idl
455         * Modules/mediastream/MediaDeviceInfo.h: Created class for MediaDevicesInfo
456         (WebCore::MediaDeviceInfo::create): Allocates class
457         (WebCore::MediaDeviceInfo::MediaDeviceInfo): Creates class for public
458         (WebCore::MediaDeviceInfo::~MediaDeviceInfo): 
459         (WebCore::MediaDeviceInfo::label):
460         (WebCore::MediaDeviceInfo::deviceId):
461         (WebCore::MediaDeviceInfo::groupId):
462         (WebCore::MediaDeviceInfo::kind):
463         * Modules/mediastream/MediaDeviceInfo.idl:
464         * WebCore.xcodeproj/project.pbxproj:
465
466 2015-06-24  Anders Carlsson  <andersca@apple.com>
467
468         Detect view services by using the "com.apple.UIKit.vends-view-services" entitlement
469         https://bugs.webkit.org/show_bug.cgi?id=146301
470
471         Reviewed by Tim Horton.
472
473         * WebCore.xcodeproj/project.pbxproj:
474         * platform/spi/cocoa/SecuritySPI.h:
475
476 2015-06-24  Said Abou-Hallawa  <sabouhallawa@apple.com>
477
478         Add a new color -apple-wireless-playback-target-active
479         https://bugs.webkit.org/show_bug.cgi?id=146269
480         <rdar://problem/21465189>
481
482         Reviewed by Dean Jackson.
483
484         At the moment we use -apple-system-blue to indicate an Airplay route is
485         active. This might not always be blue, so we need to add another system
486         color with a name that will allow us to change the underlying color.
487         Initially -apple-wireless-playback-target-active will be an alias to
488         -apple-system-blue.
489
490         Existing tests are modified to include the new color value.
491
492         * Modules/mediacontrols/mediaControlsApple.js:
493         (Controller.prototype.updateWirelessTargetPickerButton):
494         * Modules/mediacontrols/mediaControlsiOS.css:
495         (video::-webkit-media-controls-wireless-playback-picker-button.playing):
496         Use the new color value in the media controls.
497         
498         * css/CSSParser.cpp:
499         (WebCore::isAppleLegacyCssValueKeyword): Returns true if the value keyword
500         has an '-apple' prefix which has to be replaced by '-webkit'
501         
502         (WebCore::cssValueKeywordID): Call a new function which handles all the
503         '-apple' legacy keywords.
504         
505         * css/CSSValueKeywords.in: Define the new color keyword.
506         
507         * rendering/RenderThemeIOS.mm:
508         (WebCore::RenderThemeIOS::systemColor):
509         * rendering/RenderThemeMac.mm:
510         (WebCore::RenderThemeMac::systemColor):
511         Define the value of the new color keyword to be an alias of systemBlueColor.
512
513 2015-06-24  Matt Rajca  <mrajca@apple.com>
514
515         MediaSession: propagate MediaSessionMetadata to WebPageProxy
516         https://bugs.webkit.org/show_bug.cgi?id=146282
517
518         Reviewed by Darin Adler and Tim Horton.
519
520         * Modules/mediasession/MediaSession.cpp:
521         (WebCore::MediaSession::setMetadata):
522
523 2015-06-24  Chris Dumez  <cdumez@apple.com>
524
525         Null dereference in DocumentLoader::areAllLoadersPageCacheAcceptable()
526         https://bugs.webkit.org/show_bug.cgi?id=146286
527         <rdar://problem/21523788>
528
529         Reviewed by Sam Weinig.
530
531         Add null check for the Page in areAllLoadersPageCacheAcceptable()
532         to fix this top crasher until I can investigate how this can happen.
533
534         * loader/DocumentLoader.cpp:
535         (WebCore::areAllLoadersPageCacheAcceptable):
536
537 2015-06-24  Anders Carlsson  <andersca@apple.com>
538
539         Move PluginMainThreadScheduler to WebKit/win
540         https://bugs.webkit.org/show_bug.cgi?id=146289
541
542         Reviewed by Tim Horton.
543
544         * CMakeLists.txt:
545         * Configurations/WebCore.xcconfig:
546         * WebCore.vcxproj/WebCore.vcxproj:
547         * WebCore.vcxproj/WebCore.vcxproj.filters:
548         * WebCore.xcodeproj/project.pbxproj:
549         * plugins/PluginMainThreadScheduler.cpp:
550         (WebCore::PluginMainThreadScheduler::scheduler): Deleted.
551         (WebCore::PluginMainThreadScheduler::PluginMainThreadScheduler): Deleted.
552         (WebCore::PluginMainThreadScheduler::scheduleCall): Deleted.
553         (WebCore::PluginMainThreadScheduler::registerPlugin): Deleted.
554         (WebCore::PluginMainThreadScheduler::unregisterPlugin): Deleted.
555         (WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin): Deleted.
556         (WebCore::PluginMainThreadScheduler::dispatchCalls): Deleted.
557         (WebCore::PluginMainThreadScheduler::mainThreadCallback): Deleted.
558         * plugins/PluginMainThreadScheduler.h:
559         (WebCore::PluginMainThreadScheduler::Call::Call): Deleted.
560         (WebCore::PluginMainThreadScheduler::Call::performCall): Deleted.
561
562 2015-06-24  Dean Jackson  <dino@apple.com>
563
564         Better fix for Element with blur backdrop-filter shows edge duplication and dark edges
565         https://bugs.webkit.org/show_bug.cgi?id=146287
566         <rdar://problem/21530437>
567
568         Reviewed by Simon Fraser.
569
570         There is no need to carry around a bit in FilterOperations indicating what
571         type of source property the object came from. Whether or not to clip to the
572         bounds of the filter region is purely a property of the type of CALayer
573         we are applying the filter to.
574
575         This basically reverts r185846.
576
577         Covered by the test for the previous commit.
578
579         * css/CSSPropertyNames.in:
580         * css/StyleBuilderConverter.h:
581         (WebCore::StyleBuilderConverter::convertBackdropFilterOperations): Deleted.
582         * page/animation/CSSPropertyAnimation.cpp:
583         (WebCore::blendFilterOperations): Deleted.
584         * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Set the normalized
585         edges property if we are a CABackdropLayer.
586         * platform/graphics/filters/FilterOperations.cpp:
587         (WebCore::FilterOperations::operator==):
588         (WebCore::FilterOperations::operationsMatch):
589         (WebCore::FilterOperations::operator=): Deleted.
590         * platform/graphics/filters/FilterOperations.h:
591         (WebCore::FilterOperations::isUsedForBackdropFilters): Deleted.
592         (WebCore::FilterOperations::setUsedForBackdropFilters): Deleted.
593
594 2015-06-24  Doug Russell  <d_russell@apple.com>
595
596         Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject 
597         when posting a selection notification when on the border between two accessibilityObjects
598         https://bugs.webkit.org/show_bug.cgi?id=146177
599
600         Reviewed by Darin Adler.
601
602         Add support for position to be passed for selection changes to allow checking.
603         for boundaries in the case of ignored elements.
604         Add support for searching for unignored siblings of AccessibilityObjects.
605         Include AccessibilityObject wrappers in notifications for tests.
606
607         Test: platform/mac/accessibility/selection-element-tabbing-to-link.html
608
609         * accessibility/AXObjectCache.cpp:
610         (WebCore::AXObjectCache::postTextStateChangeNotification):
611         * accessibility/AXObjectCache.h:
612         * accessibility/AccessibilityObject.cpp:
613         (WebCore::AccessibilityObject::previousSiblingUnignored):
614         (WebCore::AccessibilityObject::nextSiblingUnignored):
615         * accessibility/AccessibilityObject.h:
616         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
617         (isValueTypeSupported):
618         (arrayRemovingNonSupportedTypes):
619         (dictionaryRemovingNonSupportedTypes):
620         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
621         * editing/mac/FrameSelectionMac.mm:
622         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
623
624 2015-06-24  Anders Carlsson  <andersca@apple.com>
625
626         Enable -Winconsistent-missing-override when building with Xcode
627         https://bugs.webkit.org/show_bug.cgi?id=146288
628
629         Reviewed by Sam Weinig.
630
631         * Configurations/Base.xcconfig:
632         * Modules/encryptedmedia/MediaKeySession.h:
633         * Modules/webdatabase/DatabaseTask.h:
634         * html/DateTimeLocalInputType.h:
635         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
636         * page/scrolling/mac/ScrollingCoordinatorMac.h:
637         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
638         (WebCore::MediaPlayerPrivateAVFoundation::platformLayer): Deleted.
639         (WebCore::MediaPlayerPrivateAVFoundation::supportsScanning): Deleted.
640         (WebCore::MediaPlayerPrivateAVFoundation::fileSize): Deleted.
641         (WebCore::MediaPlayerPrivateAVFoundation::engineDescription): Deleted.
642         (WebCore::MediaPlayerPrivateAVFoundation::platformErrorCode): Deleted.
643         (WebCore::MediaPlayerPrivateAVFoundation::notifyTrackModeChanged): Deleted.
644         * platform/graphics/avfoundation/VideoTrackPrivateAVF.h:
645         (WebCore::VideoTrackPrivateAVF::trackIndex): Deleted.
646         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
647         (WebCore::CDMSessionAVFoundationObjC::type): Deleted.
648         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
649         (WebCore::CDMSessionMediaSourceAVFObjC::type): Deleted.
650         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
651         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsAcceleratedRendering): Deleted.
652         (WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayToWirelessPlaybackTarget): Deleted.
653         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
654         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential): Deleted.
655         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToContinueWithoutCredential): Deleted.
656         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCancellation): Deleted.
657         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToPerformDefaultHandling): Deleted.
658         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedChallengeRejection): Deleted.
659         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
660         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Deleted.
661         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
662         (WebCore::MediaPlayerPrivateQTKit::supportsScanning): Deleted.
663         (WebCore::MediaPlayerPrivateQTKit::networkState): Deleted.
664         (WebCore::MediaPlayerPrivateQTKit::readyState): Deleted.
665         (WebCore::MediaPlayerPrivateQTKit::maximumDurationToCacheMediaTime): Deleted.
666         (WebCore::MediaPlayerPrivateQTKit::engineDescription): Deleted.
667         * platform/mac/ScrollAnimatorMac.h:
668         * platform/mac/SerializedPlatformRepresentationMac.h:
669         (WebCore::SerializedPlatformRepresentationMac::platformType): Deleted.
670         * platform/mac/ThemeMac.h:
671         (WebCore::ThemeMac::controlRequiresPreWhiteSpace): Deleted.
672         * testing/MockCDM.cpp:
673         (WebCore::MockCDMSession::setClient): Deleted.
674
675 2015-06-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
676
677         Improve JSDOMPromise callPromiseFunction naming
678         https://bugs.webkit.org/show_bug.cgi?id=146280
679
680         Unreviewed.
681
682         No change in behavior.
683
684         * bindings/js/JSDOMPromise.h:
685         (WebCore::callPromiseFunction):
686
687 2015-06-24  Tim Horton  <timothy_horton@apple.com>
688
689         REGRESSION (r185804): Crash selecting time in the form on https://backup.brighthorizons.com/BackupCareRequest.aspx
690         <rdar://problem/21525376>
691
692         Reviewed by Sam Weinig.
693
694         * page/TextIndicator.cpp:
695         (WebCore::TextIndicator::createWithRange):
696         Null check.
697
698 2015-06-24  Zalan Bujtas  <zalan@apple.com>
699
700         Subpixel rendering: roundToDevicePixel() snaps to wrong value.
701         https://bugs.webkit.org/show_bug.cgi?id=146273
702         rdar://problem/18509840
703
704         Reviewed by Simon Fraser.
705
706         Due to the floating point approximate representation, we can't always produce
707         the correct snap value. This patch addresses the issue by removing redundant kFixedPointDenominator multiplication
708         and by changing the rounding in roundToDevicePixel() from float to double.
709
710         API test is added.
711
712         * platform/LayoutUnit.h:
713         (WebCore::roundToDevicePixel):
714
715 2015-06-23  Matt Rajca  <mrajca@apple.com>
716
717         MediaSession: Support setting of metadata
718         https://bugs.webkit.org/show_bug.cgi?id=146253
719
720         Reviewed by Eric Carlson.
721
722         * Modules/mediasession/MediaSession.cpp:
723         (WebCore::MediaSession::MediaSession): Store a reference to the document so we can use it in setMetadata.
724         (WebCore::MediaSession::setMetadata): Implemented as described in the Media Session spec.
725         * Modules/mediasession/MediaSession.h:
726         * Modules/mediasession/MediaSession.idl: Added the setMetadata method.
727         * Modules/mediasession/MediaSessionMetadata.h:
728         (WebCore::MediaSessionMetadata::MediaSessionMetadata): Added to keep track of media session metadata.
729         (WebCore::MediaSessionMetadata::title):
730         (WebCore::MediaSessionMetadata::artist):
731         (WebCore::MediaSessionMetadata::album):
732         (WebCore::MediaSessionMetadata::artworkURL):
733         * WebCore.xcodeproj/project.pbxproj: Added MediaSessionMetadata.h.
734
735 2015-06-24  Daniel Bates  <dabates@apple.com>
736
737         Content Security Policy error message when frame load is blocked does not read well
738         https://bugs.webkit.org/show_bug.cgi?id=146279
739
740         Reviewed by Csaba Osztrogonác.
741
742         Substitute "Refused to load frame" for "Refused to frame" as the prefix of the error message
743         emitted when the Content Security Policy of the page blocks a frame load.
744
745         * page/ContentSecurityPolicy.cpp:
746         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
747
748 2015-06-11  Sergio Villar Senin  <svillar@igalia.com>
749
750         intrinsic size keywords don't work for heights
751         https://bugs.webkit.org/show_bug.cgi?id=113610
752
753         Reviewed by Darin Adler.
754
755         Based on Blink's r148314 & r150355 by <cbiesinger@chromium.org>.
756
757         Adds intrinsic values support to heigh & min/max-height. This involves the
758         following changes:
759         - RenderBox needs to pass the content height through to computeLogicalHeight and
760         related functions, which needs it to resolve max-content, et. al.
761         - Make the callers pass the content height to this function. Some callers pass
762         logicalHeight() (adjusted for border/padding) which works because if
763         logicalHeight is not the content height, then it is the height we ended up using,
764         so the constrain* functions will just constrain to that value again.
765         - Parsing code needs to be adjusted to support intrinsic values for heights.
766
767         Tests: fast/css-intrinsic-dimensions/height-css-tables-collapsed.html
768                fast/css-intrinsic-dimensions/height-css-tables.html
769                fast/css-intrinsic-dimensions/height-flexbox.html
770                fast/css-intrinsic-dimensions/height-positioned-replaced.html
771                fast/css-intrinsic-dimensions/height-positioned.html
772                fast/css-intrinsic-dimensions/height-replaced.html
773                fast/css-intrinsic-dimensions/height-tables-collapsed.html
774                fast/css-intrinsic-dimensions/height-tables.html
775                fast/css-intrinsic-dimensions/height.html
776
777         * css/CSSParser.cpp:
778         (WebCore::CSSParser::isValidSize): Refactored from validateWidth and
779         validateHeight.
780         (WebCore::CSSParser::parseValue):
781         (WebCore::CSSParser::validateWidth): Deleted.
782         (WebCore::CSSParser::validateHeight): Deleted.
783         * css/CSSParser.h:
784         * platform/Length.h:
785         (WebCore::Length::isFillAvailable):
786         (WebCore::Length::isFitContent):
787         * rendering/RenderBox.cpp:
788         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
789         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
790         (WebCore::RenderBox::computeLogicalHeight):
791         (WebCore::RenderBox::computeLogicalHeightUsing):
792         (WebCore::RenderBox::computeContentLogicalHeight):
793         (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
794         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
795         (WebCore::RenderBox::computePercentageLogicalHeight):
796         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
797         (WebCore::RenderBox::availableLogicalHeight):
798         (WebCore::RenderBox::availableLogicalHeightUsing):
799         (WebCore::RenderBox::computePositionedLogicalHeight):
800         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
801         * rendering/RenderBox.h:
802         * rendering/RenderFlexibleBox.cpp:
803         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
804         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
805         * rendering/RenderFlowThread.cpp:
806         (WebCore::RenderFlowThread::addForcedRegionBreak):
807         * rendering/RenderGrid.cpp:
808         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
809         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
810         * rendering/RenderMultiColumnSet.cpp:
811         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
812         * rendering/RenderReplaced.cpp:
813         (WebCore::RenderReplaced::hasReplacedLogicalHeight):
814         * rendering/RenderTable.cpp:
815         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
816         (WebCore::RenderTable::layout):
817
818 2015-06-24  Commit Queue  <commit-queue@webkit.org>
819
820         Unreviewed, rolling out r185906.
821         https://bugs.webkit.org/show_bug.cgi?id=146276
822
823         MSVC doesn't yet provide a const-qualified std::array<T,
824         N>::size(), failing to compile the static_assert (Requested by
825         zdobersek on #webkit).
826
827         Reverted changeset:
828
829         "Improve the source code generated by make_names.pl"
830         https://bugs.webkit.org/show_bug.cgi?id=146208
831         http://trac.webkit.org/changeset/185906
832
833 2015-06-24  Zan Dobersek  <zdobersek@igalia.com>
834
835         Improve the source code generated by make_names.pl
836         https://bugs.webkit.org/show_bug.cgi?id=146208
837
838         Reviewed by Darin Adler.
839
840         Clean up and optimize the output that's generated by the make_names.pl script
841         when generating large sets of DOM names for attributes and tags.
842
843         The GenerateStrings() function in the StaticString.pm module is split into
844         GenerateStringData() and GenerateASCIILiteral() so that the two new functions
845         can be used independently, with the original function still being called when
846         generating font names.
847
848         Tags and attributes have the corresponding static QualifiedName globals defined
849         as before. After that, two static const std::array<> objects are defined for
850         both types -- the first is an ordered array of addresses of the QualifiedName
851         objects (corresponding to the C array that was defined in getHTMLTags(),
852         getSVGAttrs() etc.), and the second is an ordered array of StringImpl::StaticASCIILiteral
853         objects that replaces separately defined StringImpl::StaticASCIILiteral objects
854         and the additional tables that contained pairs of QualifiedName object addresses
855         and the corresponding StaticASCIILiteral object references in the init() function.
856         This is all generated by the printStaticData() function in make_names.pl.
857
858         The printQualifiedNameCreation() function generates a static_assert() that ensures
859         that the corresponding std::array<QualifiedName*> and std::array<StaticASCIILiteral>
860         objects have the same amount of items, and then sets up a loop that walks through
861         the two arrays and properly constructs the QualifiedName objects from the static
862         literal data.
863
864         On the GTK port, this shaves off ~54kB from the final stripped shared library
865         on a 64-bit build, and ~21kB on a 32-bit build.
866
867         * bindings/scripts/StaticString.pm:
868         (GenerateStringData):
869         (GenerateASCIILiteral):
870         (GenerateStrings):
871         * dom/make_names.pl:
872         (printCppHead):
873         (printNamesCppFile):
874         (printStaticData):
875         (printQualifiedNameCreation):
876         (printInit): Deleted.
877         (printDefinitions): Deleted.
878
879 2015-06-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
880
881         Refactor UserMediaRequest to share more codes between MediaDevices.getUserMedia and legacy webkitGetUserMedia
882         https://bugs.webkit.org/show_bug.cgi?id=146237
883
884         Reviewed by Darin Adler.
885
886         Covered by existing tests, no change in behavior.
887
888         * Modules/mediastream/MediaConstraintsImpl.cpp:
889         (WebCore::MediaConstraintsImpl::create): Simplified error handling by removing exception code parameter.
890         * Modules/mediastream/MediaConstraintsImpl.h: Ditto.
891         * Modules/mediastream/MediaDevices.cpp:
892         (WebCore::MediaDevices::getUserMedia): Removed code now in UserMediaRequest::start.
893         * Modules/mediastream/NavigatorUserMedia.cpp:
894         (WebCore::NavigatorUserMedia::webkitGetUserMedia): Ditto.
895         * Modules/mediastream/UserMediaRequest.cpp:
896         (WebCore::parseOptions): Simplified error handling by removing exception code parameter.
897         (WebCore::UserMediaRequest::start): Renamed create in start and added common code.
898         * Modules/mediastream/UserMediaRequest.h:
899
900 2015-06-23  Andreas Kling  <akling@apple.com>
901
902         Should reduce tile coverage for the first paint after a tab switch.
903         <https://webkit.org/b/146252>
904         <rdar://problem/19821583>
905
906         Reviewed by Darin Adler.
907
908         Reduce the number of tiles we need to paint after switching tabs,
909         to shorten the time it takes before we can flush pixels to screen.
910
911         We accomplish this by piggybacking on the "speculative tiling enabled"
912         mode of FrameView, which was previously only used to throttle painting
913         and layer flushes during page load.
914
915         When a FrameView becomes visible, which is what happens when you
916         switch to its tab, we revert the speculative tiling optimization to
917         its initial state, and reset the "scrolled by user" flag.
918
919         In practice this means that after switching tabs, we only generate
920         enough tiles to fill the viewport. Then, after 500ms has passed
921         or the user scrolls the page, we go back to the usual speculative
922         tiling mode.
923
924         * page/FrameView.cpp:
925         (WebCore::FrameView::show):
926
927 2015-06-23  Anders Carlsson  <andersca@apple.com>
928
929         Remove windowResizerRect code, nobody is using it anymore
930         https://bugs.webkit.org/show_bug.cgi?id=146265
931
932         Reviewed by Beth Dakin.
933
934         * loader/EmptyClients.h:
935         * page/Chrome.cpp:
936         (WebCore::Chrome::windowResizerRect): Deleted.
937         * page/Chrome.h:
938         * page/ChromeClient.h:
939         * page/FrameView.cpp:
940         (WebCore::FrameView::windowResizerRect): Deleted.
941         * page/FrameView.h:
942         * platform/ScrollView.cpp:
943         (WebCore::ScrollView::ScrollView): Deleted.
944         (WebCore::ScrollView::windowResizerRectChanged): Deleted.
945         (WebCore::ScrollView::containsScrollbarsAvoidingResizer): Deleted.
946         (WebCore::ScrollView::adjustScrollbarsAvoidingResizerCount): Deleted.
947         (WebCore::ScrollView::setParent): Deleted.
948         * platform/ScrollView.h:
949         (WebCore::ScrollView::windowResizerRect): Deleted.
950         * platform/Scrollbar.cpp:
951         (WebCore::Scrollbar::Scrollbar): Deleted.
952         (WebCore::Scrollbar::setFrameRect): Deleted.
953         (WebCore::Scrollbar::setParent): Deleted.
954         * platform/Scrollbar.h:
955
956 2015-06-23  Dean Jackson  <dino@apple.com>
957
958         Media controls are missing the white backdrop in UIWebViews
959         https://bugs.webkit.org/show_bug.cgi?id=146251
960         <rdar://problem/20181345>
961
962         Reviewed by Simon Fraser.
963
964         Implement two new CALayer subclasses that explicitly set
965         something that resembles the system appearance for
966         media-controls-dark-bar-background and media-controls-light-bar-background.
967         This way, WebKit1 clients get a visible result.
968
969         Creating the actual system recipes is tracked by:
970         https://bugs.webkit.org/show_bug.cgi?id=146250
971
972         * WebCore.xcodeproj/project.pbxproj: Add new files.
973         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
974         (PlatformCALayerCocoa::PlatformCALayerCocoa): Use the new CALayer subclasses for
975         the appropriate layer types.
976         * platform/graphics/ca/cocoa/WebSystemBackdropLayer.h: Added.
977         * platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm: Added.
978         (-[WebLightSystemBackdropLayer init]):
979         (-[WebLightSystemBackdropLayer setBackgroundColor:]): Only set to a light grey.
980         (-[WebDarkSystemBackdropLayer init]):
981         (-[WebDarkSystemBackdropLayer setBackgroundColor:]): Only set to a dark grey.
982
983 2015-06-18  Matt Rajca  <mrajca@apple.com>
984
985         Support releasing media sessions
986         https://bugs.webkit.org/show_bug.cgi?id=146132
987
988         Reviewed by Darin Adler.
989
990         * Modules/mediasession/MediaSession.cpp: Implemented as described in the Media Session spec.
991         (WebCore::MediaSession::releaseSession):
992         (WebCore::MediaSession::releaseInternal):
993         * Modules/mediasession/MediaSession.h:
994
995 2015-06-23  Chris Fleizach  <cfleizach@apple.com>
996
997         AX: iOS: VoiceOver and ARIA: has popup property not announced
998         https://bugs.webkit.org/show_bug.cgi?id=146188
999
1000         Reviewed by Darin Adler.
1001
1002         Expose the existing "has popup" property to the iOS Accessibility API.
1003
1004         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1005         (-[WebAccessibilityObjectWrapper accessibilityHasPopup]):
1006
1007 2015-06-23  Javier Fernandez  <jfernandez@igalia.com>
1008
1009         [CSS Grid Layout] Performance optimization: avoid computing overflow alignment if not needed
1010         https://bugs.webkit.org/show_bug.cgi?id=146231
1011
1012         Reviewed by Sergio Villar Senin.
1013
1014         We don't need to apply any overflow handling if alignment value don't have a potential
1015         risk of data loss, as it's the case of 'start' value.
1016
1017         This patch avoid computing the overflow in all the cases, since it adds an unneeded
1018         overhead which affects performance.
1019
1020         New code improves performance around 3%-8%, depending on the grid tests.
1021
1022         No new tests, no new funcitonality.
1023
1024         * rendering/RenderGrid.cpp:
1025         (WebCore::RenderGrid::rowPositionForChild):
1026         (WebCore::RenderGrid::columnPositionForChild):
1027
1028 2015-06-23  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1029
1030         MediaDevices.getUserMedia should migrate from callbacks to DOMPromise
1031         https://bugs.webkit.org/show_bug.cgi?id=146200
1032
1033         Reviewed by Darin Adler.
1034
1035         Introduced DOMPromiseWithCallback to resolve/reject promises while allowing promise clients to use a typed callback approach.
1036         Migrated MediaDevices.getUserMedia from callbacks to DOMPromiseWithCallback.
1037         Removed MediaDevices.getUserMedia custom binding.
1038
1039         Covered by existing tests.
1040
1041         * CMakeLists.txt: Removing custom binding.
1042         * Modules/mediastream/MediaDevices.cpp:
1043         (WebCore::MediaDevices::getUserMedia): Moving from callback to promise.
1044         * Modules/mediastream/MediaDevices.h: Ditto.
1045         * Modules/mediastream/MediaDevices.idl: Removing custom binding.
1046         * Modules/mediastream/NavigatorUserMedia.cpp:
1047         (WebCore::NavigatorUserMedia::webkitGetUserMedia): Converting from promise callback to API callbacks.
1048         * Modules/mediastream/UserMediaRequest.cpp:
1049         (WebCore::UserMediaRequest::create): Moving from callback to promise.
1050         (WebCore::UserMediaRequest::UserMediaRequest): Ditto.
1051         (WebCore::UserMediaRequest::didCreateStream): Ditto.
1052         (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Ditto.
1053         (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Ditto.
1054         * Modules/mediastream/UserMediaRequest.h: Ditto.
1055         * bindings/js/JSDOMPromise.h: Introducing DOMPromiseWithCallback and removing crypto specific header.
1056         (WebCore::DOMPromiseWithCallback::DOMPromiseWithCallback):
1057         (WebCore::Error>::resolve):
1058         (WebCore::Error>::reject):
1059         * bindings/js/JSMediaDevicesCustom.cpp: Removed.
1060         * bindings/js/JSSubtleCryptoCustom.cpp: Updating headers.
1061
1062 2015-06-23  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1063
1064         [Streams API] Implement ReadableStream js source "'cancel" callback
1065         https://bugs.webkit.org/show_bug.cgi?id=146204
1066
1067         Reviewed by Darin Adler.
1068
1069         Calling "cancel" JS function when web app is cancelling a JS readable stream.
1070         Handling of promise returned value in case of async cancel.
1071
1072         Covered by rebased tests.
1073
1074         * bindings/js/ReadableJSStream.cpp:
1075         (WebCore::ReadableJSStream::invoke): Refactoring to pass cancel reason or controller to the JS function.
1076         (WebCore::ReadableJSStream::doStart): Ditto.
1077         (WebCore::startReadableStreamAsync): Renaming readableStream as protectedStream.
1078         (WebCore::createPullResultFulfilledFunction): Ditto.
1079         (WebCore::ReadableJSStream::doPull): Refactoring to pass cancel reason or controller to the JS function.
1080         (WebCore::createCancelResultFulfilledFunction): Cancel promise fullfil callback.
1081         (WebCore::createCancelResultRejectedFunction): Cancel promise reject callback.
1082         (WebCore::ReadableJSStream::doCancel): Calling cancel JS callback and handling promise returned value.
1083         * bindings/js/ReadableJSStream.h: Refactoring to pass cancel reason or controller to the JS function.
1084
1085 2015-06-22  Ryuan Choi  <ryuan.choi@navercorp.com>
1086
1087         [EFL] Hyphenation is not supported
1088         https://bugs.webkit.org/show_bug.cgi?id=89830
1089
1090         Reviewed by Gyuyoung Kim.
1091
1092         Share libHyphen backend of GTK port.
1093
1094         Rebased fast/text/hyphenate-*.html
1095
1096         * PlatformEfl.cmake:
1097         * PlatformGTK.cmake:
1098         * platform/efl/FileSystemEfl.cpp:
1099         (WebCore::listDirectory): Deleted because of lack of functionality.
1100         eina_file_ls returns full directory path so fnmatch fails to check dict file.
1101         This patch reuse Posix implementation instead of EFL port specific function.
1102         * platform/posix/FileSystemPOSIX.cpp: Ditto.
1103         * platform/text/gtk/HyphenationLibHyphen.cpp: Moved to platform/text/hyphen
1104         * platform/text/hyphen/HyphenationLibHyphen.cpp:
1105         Renamed from Source/WebCore/platform/text/gtk/HyphenationLibHyphen.cpp.
1106         (WebCore::scanTestDictionariesDirectoryIfNecessary):
1107         Added PLATFORM guard and EFL implementation for the test directory
1108
1109 2015-06-22  Chris Dumez  <cdumez@apple.com>
1110
1111         [WK1] WebAllowDenyPolicyListener.denyOnlyThisRequest() should not start a new permission request
1112         https://bugs.webkit.org/show_bug.cgi?id=146228
1113         <rdar://problem/15179262>
1114
1115         Reviewed by Daniel Bates.
1116
1117         Add Geolocation::resetIsAllowed() API that merely resets
1118         m_allowGeolocation to Unknown, so that we will request the permission
1119         again the next time a position is requested.
1120
1121         * Modules/geolocation/Geolocation.h:
1122         (WebCore::Geolocation::resetIsAllowed):
1123
1124 2015-06-22  Simon Fraser  <simon.fraser@apple.com>
1125
1126         ASSERT(!m_zOrderListsDirty) when mousing over web view with incremental rendering suppressed
1127         https://bugs.webkit.org/show_bug.cgi?id=146225
1128
1129         Reviewed by Zalan Bujtas.
1130
1131         Update RenderLayer's z-order lists when hit testing. There's no guarantee that they've
1132         been updated; this happens to work most of the time because painting updates them,
1133         but if incremental rendering is suppressed, we may not have painted yet.
1134         
1135         Easy to hit on webkit.org in MiniBrowser, but I wasn't able to make a reduced testcase.
1136
1137         * rendering/RenderLayer.cpp:
1138         (WebCore::RenderLayer::hitTest):
1139         (WebCore::RenderLayer::updateLayerListsIfNeeded): Flip the order of the tests, since checking
1140         dirty bits is cheaper than calling isStackingContext().
1141
1142 2015-06-22  Dean Jackson  <dino@apple.com>
1143
1144         Rename PlatformCA*Mac to PlatformCA*Cocoa
1145         https://bugs.webkit.org/show_bug.cgi?id=146224
1146         <rdar://problem/21497182>
1147
1148         Reviewed by Simon Fraser.
1149
1150         Rename PlatformCALayerMac and related files in platform/graphics/ca/mac
1151         to the more accurate Cocoa suffix.
1152
1153         * WebCore.xcodeproj/project.pbxproj:
1154         * page/mac/ServicesOverlayController.mm:
1155         * platform/graphics/ca/GraphicsLayerCA.cpp:
1156         * platform/graphics/ca/PlatformCAAnimation.h:
1157         * platform/graphics/ca/PlatformCALayer.h:
1158         * platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp: Renamed from Source/WebCore/platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp.
1159         * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h.
1160         * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm.
1161         * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAFiltersMac.mm.
1162         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h.
1163         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm.
1164         * platform/graphics/ca/cocoa/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.h.
1165         * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.mm.
1166         * platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
1167         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
1168         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
1169         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1170         * platform/graphics/ca/mac/WebTiledBackingLayer.mm:
1171
1172 2015-06-22  Alex Christensen  <achristensen@webkit.org>
1173
1174         [cssjit] Disable compiling scrollbar pseudoclass selectors
1175         https://bugs.webkit.org/show_bug.cgi?id=146220
1176
1177         Reviewed by Benjamin Poulain.
1178
1179         * cssjit/SelectorCompiler.cpp:
1180         (WebCore::SelectorCompiler::addScrollbarPseudoClassType):
1181         Don't compile selectors with scrollbar pseudoclasses.
1182
1183 2015-06-22  Simon Fraser  <simon.fraser@apple.com>
1184
1185         -webkit-clip-path clips incorrectly if the element bounds go beyond the top edge of the page
1186         https://bugs.webkit.org/show_bug.cgi?id=146218
1187         rdar://problem/21127840
1188
1189         Reviewed by Zalan Bujtas.
1190
1191         The clip path is computed using the RenderLayer's bounding box, so needs to be offset
1192         by the offsetFromRenderer when set on the mask layer.
1193
1194         Test: compositing/masks/compositing-clip-path-origin.html
1195
1196         * rendering/RenderLayerBacking.cpp:
1197         (WebCore::RenderLayerBacking::updateMaskingLayerGeometry):
1198
1199 2015-06-22  Michael Catanzaro  <mcatanzaro@igalia.com>
1200
1201         Web sockets should be treated as active mixed content
1202         https://bugs.webkit.org/show_bug.cgi?id=140624
1203
1204         Reviewed by Sam Weinig.
1205
1206         Tests: http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html
1207                http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame.html
1208
1209         * Modules/websockets/WebSocket.cpp:
1210         (WebCore::WebSocket::connect): Block ws:// WebSocket connections from https:// pages, and
1211         emit the onerror event after doing so.
1212         * platform/SchemeRegistry.cpp:
1213         (WebCore::secureSchemes): Add wss:// to the list of secure schemes.
1214
1215 2015-06-22  Dean Jackson  <dino@apple.com>
1216
1217         Element with blur backdrop-filter shows edge duplication and dark edges
1218         https://bugs.webkit.org/show_bug.cgi?id=146215
1219         <rdar://problem/20367695>
1220
1221         Reviewed by Tim Horton.
1222
1223         The input images to backdrop filters should duplicate their edge pixels
1224         outwards, rather than using transparent pixels. This is a flag we
1225         set on the Gaussian blur, but means we have to remember if the
1226         FilterOperations list came from a regular filter or a backdrop filter.
1227
1228         Test: css3/filters/backdrop/blur-input-bounds.html
1229
1230         * css/CSSPropertyNames.in: New custom convertor for backdrop-filter.
1231         * css/StyleBuilderConverter.h:
1232         (WebCore::StyleBuilderConverter::convertBackdropFilterOperations): New convertor
1233         that sets the backdrop flag, but is otherwise the same as a normal filter
1234         convertor.
1235         * page/animation/CSSPropertyAnimation.cpp:
1236         (WebCore::blendFilterOperations): Inherit the backdrop flag if either of our
1237         inputs has it.
1238         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Set the inputNormalizeEdges
1239         key on the CAFilter if necessary.
1240         * platform/graphics/filters/FilterOperations.cpp: Add a new flag indicating if
1241         these operations are intended for backdrops.
1242         (WebCore::FilterOperations::operator=):
1243         (WebCore::FilterOperations::operator==):
1244         * platform/graphics/filters/FilterOperations.h:
1245         (WebCore::FilterOperations::isUsedForBackdropFilters):
1246         (WebCore::FilterOperations::setUsedForBackdropFilters):
1247
1248 2015-06-22  Tim Horton  <timothy_horton@apple.com>
1249
1250         [TextIndicator] Text shifts one pixel to the left when I force click to bring up Lookup in Mail messages
1251         https://bugs.webkit.org/show_bug.cgi?id=146214
1252         <rdar://problem/20782970>
1253
1254         Reviewed by Dean Jackson.
1255
1256         * page/mac/TextIndicatorWindow.mm:
1257         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
1258         (WebCore::TextIndicatorWindow::setTextIndicator):
1259         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]): Deleted.
1260         When the WebView is at a nonintegral position, we can end up needing a TextIndicator
1261         with a nonintegral position. We need to round the window position, so we need to apply
1262         the fractional part to the indicator layers inside, not to the window.
1263
1264 2015-06-22  Myles C. Maxfield  <mmaxfield@apple.com>
1265
1266         [iOS] Arabic text styled with Georgia is rendered as boxes
1267         https://bugs.webkit.org/show_bug.cgi?id=145681
1268         <rdar://problem/21169844>
1269
1270         Reviewed by Darin Adler.
1271
1272         Georgia doesn't support Arabic, so we ask CoreText what font does support Arabic. It returns
1273         TimesNewRomanPSMT. However, WebKit explicitly disallows this font on iOS. Therefore, instead
1274         of using TimesNewRomanPSMT, we will simply just use GeezaPro.
1275
1276         Test: fast/text/arabic-times-new-roman.html
1277
1278         * platform/graphics/ios/FontCacheIOS.mm:
1279         (WebCore::FontCache::systemFallbackForCharacters):
1280         * platform/graphics/Font.h: Let FontCacheIOS call fontFamilyShouldNotBeUsedForArabic()
1281         * platform/graphics/cocoa/FontCocoa.mm:
1282         (WebCore::fontFamilyShouldNotBeUsedForArabic):
1283
1284 2015-06-22  Alex Christensen  <achristensen@webkit.org>
1285
1286         Unreviewed non-mac debug build fix after r185840.
1287
1288         * loader/ResourceLoader.cpp:
1289         (WebCore::ResourceLoader::willSendRequest):
1290         Added enable flag around assertion.
1291
1292 2015-06-20  Alex Christensen  <achristensen@webkit.org>
1293
1294         [Content Extensions] Add SPI to reload without content blocking.
1295         https://bugs.webkit.org/show_bug.cgi?id=146128
1296         rdar://problem/20351903
1297
1298         Reviewed by Sam Weinig.
1299
1300         * html/HTMLMediaElement.cpp:
1301         (WebCore::HTMLMediaElement::loadResource):
1302         * loader/ResourceLoader.cpp:
1303         (WebCore::ResourceLoader::willSendRequest):
1304         * loader/cache/CachedResourceLoader.cpp:
1305         (WebCore::CachedResourceLoader::requestResource):
1306         * page/DOMWindow.cpp:
1307         (WebCore::DOMWindow::open):
1308         * page/Page.h:
1309         (WebCore::Page::userContentController):
1310         (WebCore::Page::userContentExtensionsEnabled):
1311         (WebCore::Page::setUserContentExtensionsEnabled):
1312         (WebCore::Page::group):
1313         * page/UserContentController.cpp:
1314         (WebCore::UserContentController::removeAllUserContentExtensions):
1315         (WebCore::UserContentController::processContentExtensionRulesForLoad):
1316         (WebCore::UserContentController::actionsForResourceLoad):
1317         * page/UserContentController.h:
1318
1319 2015-06-22  Zalan Bujtas  <zalan@apple.com>
1320
1321         REGRESSION(r169105) Dangling renderer pointer in SelectionSubtreeRoot::SelectionSubtreeData.
1322         https://bugs.webkit.org/show_bug.cgi?id=146116
1323         rdar://problem/20959369
1324
1325         Reviewed by Brent Fulgham.
1326
1327         This patch ensures that we don't adjust the selection unless the visual selection still matches this subtree root.
1328
1329         When multiple selection roots are present we need to ensure that a RenderObject
1330         only shows up in one of them.
1331         RenderView::splitSelectionBetweenSubtrees(), as the name implies, splits the
1332         selection and sets the selection range (start/end) on each selection root.
1333         However, SelectionSubtreeRoot::adjustForVisibleSelection() later recomputes the range
1334         based on visible selection and that could end up collecting renderers as selection start/end
1335         from another selection subtree.
1336         RenderObject's holds the last selection state (RenderObject::setSelectionState).
1337         If we set a renderer first as "on selection border" and later "inside" using multiple selection roots,
1338         we can't clean up selections properly when this object gets destroyed.
1339         One of the roots ends up with a dangling RenderObject pointer.
1340
1341         Test: fast/regions/crash-when-renderer-is-in-multiple-selection-subtrees.html
1342
1343         * rendering/SelectionSubtreeRoot.cpp:
1344         (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
1345
1346 2015-06-22  Jeremy Jones  <jeremyj@apple.com>
1347
1348         Do not exit fullscreen when starting PiP since this is done automatically.
1349         https://bugs.webkit.org/show_bug.cgi?id=144871
1350
1351         Reviewed by Darin Adler.
1352
1353         Since we don't explicitly exit fullscreen, update state in shouldExitFullscreenWithReason()
1354
1355         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Declare shouldExitFullscreenWithReason().
1356         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1357         (-[WebAVPlayerController playerViewController:shouldExitFullScreenWithReason:]): Forward to WebVideoFullscreenInterfaceAVKit.
1358         (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Added.
1359         (WebVideoFullscreenInterfaceAVKit::willStartPictureInPicture): Remove enter fullscreen code.
1360         * platform/spi/cocoa/AVKitSPI.h: Add missing enums.
1361
1362 2015-06-22  Daniel Bates  <dabates@apple.com>
1363
1364         AX: UI Automation cannot find AutoFill or search cancel buttons
1365         https://bugs.webkit.org/show_bug.cgi?id=145241
1366         <rdar://problem/21051411>
1367
1368         Reviewed by Chris Fleizach.
1369
1370         Add support for hit testing the search cancel button and AutoFill button so that
1371         they can be accessed by UI Automation.
1372
1373         Currently the accessibility hit test machinery ignores nodes in a shadow tree.
1374         So, it neither finds the <input type="search"> cancel button nor the AutoFill button
1375         when it performs a hit test. Therefore these buttons cannot be accessed using
1376         UI Automation.
1377
1378         Tests: accessibility/hit-test-input-auto-fill-button.html
1379                accessibility/hit-test-input-search-cancel-button.html
1380                accessibility/input-search-cancel-button.html
1381
1382         * accessibility/AccessibilityRenderObject.cpp:
1383         (WebCore::AccessibilityRenderObject::accessibilityTextFieldDecorationHitTest): Added; returns
1384         the AccessibilityObject for the search cancel button or AutoFill text field decoration as applicable.
1385         (WebCore::AccessibilityRenderObject::accessibilityHitTest): Check whether the hit node
1386         is a text field decoration.
1387
1388 2015-06-22  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1389
1390         [Streams API] Implement ReadableStream cancel (abstract part)
1391         https://bugs.webkit.org/show_bug.cgi?id=146111
1392
1393         Reviewed by Darin Adler.
1394
1395         This patch implements ReadableStream and ReadableStreamReader cancel.
1396         The reader delegates cancellation to its stream.
1397
1398         This patch also ensures that controller.close() will not throw in case cancellation is on-going.
1399
1400         A follow-up patch will implement the calling of 'cancel' JS callback for JS sources.
1401
1402         Covered by rebased tests.
1403
1404         * Modules/streams/ReadableStream.cpp:
1405         (WebCore::ReadableStream::cancel): Checks whether locked or not before cancelling.
1406         (WebCore::ReadableStream::cancelNoCheck): Cancel without lock check.
1407         (WebCore::ReadableStream::notifyCancelSucceeded): Async cancel callback.
1408         (WebCore::ReadableStream::notifyCancelFailed): Ditto.
1409         * Modules/streams/ReadableStream.h:
1410         * Modules/streams/ReadableStream.idl: Cleaned up IDL.
1411         * Modules/streams/ReadableStreamReader.cpp:
1412         (WebCore::ReadableStreamReader::cancel):
1413         * Modules/streams/ReadableStreamReader.h:
1414         * Modules/streams/ReadableStreamReader.idl: Cleaned up IDL
1415         * bindings/js/JSReadableStreamControllerCustom.cpp:
1416         (WebCore::JSReadableStreamController::close):
1417         * bindings/js/JSReadableStreamCustom.cpp:
1418         (WebCore::JSReadableStream::cancel):
1419         * bindings/js/JSReadableStreamReaderCustom.cpp:
1420         (WebCore::JSReadableStreamReader::cancel):
1421         * bindings/js/ReadableJSStream.cpp:
1422         (WebCore::ReadableJSStream::doCancel):
1423         * bindings/js/ReadableJSStream.h:
1424
1425 2015-06-22  Adam Bergkvist  <adam.bergkvist@ericsson.com>
1426
1427         WebRTC: Navigator.webkitGetUserMedia() requires three arguments
1428         https://bugs.webkit.org/show_bug.cgi?id=146022
1429
1430         Reviewed by Eric Carlson.
1431
1432         Updated custom binding to make the third error callback argument
1433         mandatory. Updated and unskipped three tests (for the GTK+ port).
1434
1435         * bindings/js/JSNavigatorCustom.cpp:
1436         (WebCore::JSNavigator::webkitGetUserMedia):
1437
1438 2015-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1439
1440         Unreviewed. Fix GTK+ build after r185818.
1441
1442         Actually rollout r185320.
1443
1444         * platform/network/soup/DNSSoup.cpp:
1445         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
1446         (WebCore::DNSResolveQueue::platformResolve):
1447         (WebCore::gotProxySettingsCallback): Deleted.
1448         (WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.
1449
1450 2015-06-16  Gavin Barraclough  <barraclough@apple.com>
1451
1452         Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
1453         https://bugs.webkit.org/show_bug.cgi?id=146198
1454
1455         Unreviewed rollout.
1456
1457         * platform/network/DNSResolveQueue.cpp:
1458         (WebCore::DNSResolveQueue::DNSResolveQueue):
1459         (WebCore::DNSResolveQueue::isUsingProxy):
1460         (WebCore::DNSResolveQueue::add):
1461         (WebCore::DNSResolveQueue::timerFired):
1462         * platform/network/DNSResolveQueue.h:
1463         * platform/network/cf/DNSCFNet.cpp:
1464         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
1465         (WebCore::clientCallback):
1466         (WebCore::DNSResolveQueue::platformResolve):
1467         (WebCore::proxyIsEnabledInSystemPreferences): Deleted.
1468         (WebCore::isUsingProxy): Deleted.
1469         (WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.
1470         * platform/network/soup/DNSSoup.cpp:
1471
1472 2015-06-21  Alexey Proskuryakov  <ap@apple.com>
1473
1474         REGRESSION (r172975): navigator.language unable to tell region for Traditional Chinese users
1475         https://bugs.webkit.org/show_bug.cgi?id=146121
1476         rdar://problem/21395180
1477
1478         Reviewed by Darin Adler.
1479
1480         Revert to previous behavior, which is wrong in many ways, but not as wrong as the new one.
1481
1482         * platform/mac/Language.mm:
1483         (WebCore::httpStyleLanguageCode):
1484         (WebCore::platformUserPreferredLanguages):
1485         * platform/spi/cf/CFBundleSPI.h:
1486
1487 2015-06-19  Andy Estes  <aestes@apple.com>
1488
1489         Give Node::didNotifySubtreeInsertions() a better name
1490         https://bugs.webkit.org/show_bug.cgi?id=146170
1491
1492         Reviewed by Darin Adler.
1493
1494         didNotifySubtreeInsertions() is not a good name. It sounds like we are notifying the subtree insertions, which doesn't make sense.
1495
1496         This function is really about notifying the Node that the subtree it's a part of has finished being inserted into the DOM
1497         (i.e. all nodes have received their call to insertedInto()). Change the name to finishedInsertingSubtree() to better reflect this.
1498
1499         * dom/ContainerNode.cpp:
1500         (WebCore::ContainerNode::notifyChildInserted):
1501         * dom/ContainerNodeAlgorithms.h:
1502         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
1503         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
1504         * dom/Element.cpp:
1505         (WebCore::Element::addShadowRoot):
1506         * dom/Node.h:
1507         (WebCore::Node::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1508         (WebCore::Node::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1509         * dom/ScriptElement.cpp:
1510         (WebCore::ScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1511         (WebCore::ScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1512         * dom/ScriptElement.h:
1513         * html/HTMLFrameElementBase.cpp:
1514         (WebCore::HTMLFrameElementBase::insertedInto):
1515         (WebCore::HTMLFrameElementBase::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1516         (WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1517         * html/HTMLFrameElementBase.h:
1518         * html/HTMLScriptElement.cpp:
1519         (WebCore::HTMLScriptElement::insertedInto):
1520         (WebCore::HTMLScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1521         (WebCore::HTMLScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1522         * html/HTMLScriptElement.h:
1523         * svg/SVGFEImageElement.cpp:
1524         (WebCore::SVGFEImageElement::insertedInto):
1525         (WebCore::SVGFEImageElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1526         (WebCore::SVGFEImageElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1527         * svg/SVGFEImageElement.h:
1528         * svg/SVGMPathElement.cpp:
1529         (WebCore::SVGMPathElement::insertedInto):
1530         (WebCore::SVGMPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1531         (WebCore::SVGMPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1532         * svg/SVGMPathElement.h:
1533         * svg/SVGScriptElement.cpp:
1534         (WebCore::SVGScriptElement::insertedInto):
1535         (WebCore::SVGScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1536         (WebCore::SVGScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1537         * svg/SVGScriptElement.h:
1538         * svg/SVGTRefElement.cpp:
1539         (WebCore::SVGTRefElement::insertedInto):
1540         (WebCore::SVGTRefElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1541         (WebCore::SVGTRefElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1542         * svg/SVGTRefElement.h:
1543         * svg/SVGTextPathElement.cpp:
1544         (WebCore::SVGTextPathElement::insertedInto):
1545         (WebCore::SVGTextPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1546         (WebCore::SVGTextPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1547         * svg/SVGTextPathElement.h:
1548         * svg/animation/SVGSMILElement.cpp:
1549         (WebCore::SVGSMILElement::insertedInto):
1550         (WebCore::SVGSMILElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1551         (WebCore::SVGSMILElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1552         * svg/animation/SVGSMILElement.h:
1553
1554 2015-06-21  Philip Chimento  <philip.chimento@gmail.com>
1555
1556         libwebkit2gtk fails to link without opengl
1557         https://bugs.webkit.org/show_bug.cgi?id=138332
1558
1559         Reviewed by Carlos Garcia Campos.
1560
1561         * CMakeLists.txt: The third-party ANGLE directories need to be
1562         included even if ENABLE(GRAPHICS_CONTEXT_3D) is false. They must
1563         be included after the OpenGL headers as the comment says.
1564         * platform/graphics/texmap/BitmapTexturePool.cpp: Remove
1565         reference to no longer existent header file.
1566
1567 2015-06-20  Tim Horton  <timothy_horton@apple.com>
1568
1569         Deselection of text causes a noticeable jump on force touch machines
1570         https://bugs.webkit.org/show_bug.cgi?id=146173
1571         <rdar://problem/20992842>
1572
1573         Reviewed by Sam Weinig.
1574
1575         When we have a TextIndicator of type Crossfade, we end up putting
1576         a layer with the blue highlight + text painted into it on top of the
1577         content, and cross-fading that layer to the yellow-highlighted text.
1578
1579         This is necessary for BounceAndCrossfade TextIndicators, because the
1580         blue highlight has to bounce, but is not necessary for Crossfade-only
1581         ones; we can just fade in the yellow highlight on top of the
1582         existing blue page highlight, and all is well.
1583
1584         So, get rid of the Crossfade TextIndicator type and use FadeIn, separately
1585         keeping track of whether or not we can add a margin (we still can't
1586         add a margin to TextIndicators that indicate the page's current selection,
1587         because the blue highlight cannot have the margin applied to it, and we
1588         want the bounds to match exactly).
1589
1590         * page/TextIndicator.cpp:
1591         (WebCore::TextIndicator::createWithRange):
1592         If the range is the same as the selection, turn off the margin.
1593         We were previously doing this based on the presentation transition, but now
1594         there's no difference in presentation transition in this case.
1595
1596         (WebCore::TextIndicator::createWithSelectionInFrame):
1597         (WebCore::TextIndicator::wantsBounce):
1598         (WebCore::TextIndicator::wantsContentCrossfade):
1599         (WebCore::TextIndicator::wantsFadeIn):
1600         (WebCore::TextIndicator::wantsManualAnimation):
1601         * page/TextIndicator.h:
1602         Get rid of TextIndicatorPresentationTransition::Crossfade.
1603
1604         (WebCore::TextIndicator::setWantsMargin):
1605         (WebCore::TextIndicator::wantsMargin):
1606         Keep track of whether we want a margin.
1607
1608         * page/mac/TextIndicatorWindow.mm:
1609         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
1610         Determine if we should use a margin based on wantsMargin instead of the
1611         presentation transition.
1612
1613 2015-06-20  Ryuan Choi  <ryuan.choi@navercorp.com>
1614
1615         [EFL] Do not consider test directories when DEVELOPER_MODE is OFF
1616         https://bugs.webkit.org/show_bug.cgi?id=146171
1617
1618         Reviewed by Gyuyoung Kim.
1619
1620         * platform/efl/EflInspectorUtilities.cpp:
1621         (WebCore::inspectorResourcePath): Only used WEB_INSPECTOR_DIR which CMake decides properly.
1622
1623 2015-06-19  Michael Catanzaro  <mcatanzaro@igalia.com>
1624
1625         Fix absolute value warning in LocalizedStringsGtk.cpp
1626         https://bugs.webkit.org/show_bug.cgi?id=145919
1627
1628         Reviewed by Martin Robinson.
1629
1630         Use abs(static_cast<int>(time)) rather than static_cast<int>(abs(time)) to avoid clang's
1631         warnings about passing a float to abs() instead of std::abs(). Also, because casting an int
1632         to an int is silly.
1633
1634         * platform/gtk/LocalizedStringsGtk.cpp:
1635         (WebCore::localizedMediaTimeDescription):
1636
1637 2015-06-19  Devin Rousso  <drousso@apple.com>
1638
1639         Web Inspector: Highlight currently edited CSS selector
1640         https://bugs.webkit.org/show_bug.cgi?id=145658
1641
1642         Reviewed by Joseph Pecoraro.
1643
1644         Test: inspector/dom/highlight-multiple-shapes.html
1645
1646         * inspector/InspectorController.cpp:
1647         (WebCore::InspectorController::buildObjectForHighlightedNode):
1648         * inspector/InspectorController.h:
1649         * inspector/InspectorDOMAgent.cpp:
1650         (WebCore::InspectorDOMAgent::highlightSelector): Gets a list of all nodes matching a given selector string and highlights each of them.
1651         * inspector/InspectorDOMAgent.h:
1652         * inspector/InspectorOverlay.cpp:
1653         (WebCore::InspectorOverlay::hideHighlight):
1654         (WebCore::InspectorOverlay::highlightNodeList): Loops through a given NodeList to create highlightObjects for each of them.
1655         (WebCore::InspectorOverlay::shouldShowOverlay):
1656         (WebCore::buildObjectForElementData): Don't show flow fragments when highlighting multiple nodes.
1657         (WebCore::InspectorOverlay::buildHighlightObjectForNode):
1658         (WebCore::InspectorOverlay::buildObjectForHighlightedNode): Now returns an array containing the highlightObject for each highligthed node.
1659         (WebCore::InspectorOverlay::drawNodeHighlight): Now sends an array to the InspectorOverlayPage.js to provide support for highlighting multiple nodes.
1660         * inspector/InspectorOverlay.h:
1661         * inspector/InspectorOverlayPage.js: Now expects an array as its parameter and loops through it to highlight each node given.
1662         If the parameter array contains more than one element, do not draw the textbox containing info on that node.
1663         (drawNodeHighlight):
1664
1665 2015-06-19  Joseph Pecoraro  <pecoraro@apple.com>
1666
1667         Crash under WebCore::PageConsoleClient::addMessage attempting to log insecure content message in ImageDocument
1668         https://bugs.webkit.org/show_bug.cgi?id=146096
1669
1670         Reviewed by Timothy Hatcher.
1671
1672         Was able to reproduce this using a user stylesheet with an http css font
1673         on a pdf (ImageDocument) main document loaded over https. Was unable to
1674         create a reliable test for this scenario.
1675
1676         * page/PageConsoleClient.cpp:
1677         (WebCore::getParserLocationForConsoleMessage):
1678         The scriptableDocumentParser could be null, such as in an ImageDocument.
1679
1680 2015-06-19  Dean Jackson  <dino@apple.com>
1681
1682         Extremely large canvas crashes on pre-El Capitan machines
1683         https://bugs.webkit.org/show_bug.cgi?id=146169
1684         <rdar://problem/21410046>
1685
1686         Reviewed by Tim Horton.
1687
1688         On machines before El Capitan, make the maximum canvas size
1689         8k by 8k.
1690
1691         Covered by existing tests.
1692
1693         * html/HTMLCanvasElement.cpp:
1694
1695 2015-06-19  Tim Horton  <timothy_horton@apple.com>
1696
1697         Selection services cannot be invoked when force click is enabled
1698         https://bugs.webkit.org/show_bug.cgi?id=146166
1699         <rdar://problem/21468362>
1700
1701         Reviewed by Darin Adler.
1702
1703         * page/mac/ServicesOverlayController.h:
1704         Turn Highlight::Type into something we can use for dirty flags.
1705
1706         * page/mac/ServicesOverlayController.mm:
1707         (WebCore::ServicesOverlayController::Highlight::createForSelection):
1708         (WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber):
1709         (WebCore::ServicesOverlayController::ServicesOverlayController):
1710         (WebCore::ServicesOverlayController::selectionRectsDidChange):
1711         (WebCore::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
1712         (WebCore::ServicesOverlayController::invalidateHighlightsOfType):
1713         (WebCore::ServicesOverlayController::buildPotentialHighlightsIfNeeded):
1714         (WebCore::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
1715         (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
1716         (WebCore::ServicesOverlayController::buildSelectionHighlight):
1717         (WebCore::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight):
1718         (WebCore::ServicesOverlayController::determineActiveHighlight):
1719         (WebCore::ServicesOverlayController::didScrollFrame):
1720         (WebCore::ServicesOverlayController::handleClick):
1721         Coalesce highlight rebuilding so that things (like TextIndicator creation)
1722         that change the selection and then reset it immediately don't cause us
1723         to lose the active highlight.
1724
1725         This also means that if the selection changes multiple times in a runloop
1726         (easily possible from script), we won't waste a lot of time rebuilding highlights.
1727
1728         (WebCore::ServicesOverlayController::didRebuildPotentialHighlights):
1729         Merged into buildPotentialHighlightsIfNeeded.
1730
1731 2015-06-19  Matt Baker  <mattbaker@apple.com>
1732
1733         Web Inspector: TimelineAgent needs to handle nested runloops
1734         https://bugs.webkit.org/show_bug.cgi?id=145090
1735
1736         Reviewed by Joseph Pecoraro.
1737
1738         Previously nested run loops caused InspectorTimelineAgent to prematurely pop the current run loop record. This
1739         patch adds a counter to track the run loop nesting level, and rendering frame records are only pushed/popped
1740         when the nesting level is zero. Run loop entry/exit notifications received while the debugger is paused do not
1741         affect the nesting level.
1742
1743         * inspector/InspectorTimelineAgent.cpp:
1744         (WebCore::InspectorTimelineAgent::internalStart):
1745         (WebCore::InspectorTimelineAgent::internalStop):
1746         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
1747         * inspector/InspectorTimelineAgent.h:
1748
1749 2015-06-19  Brent Fulgham  <bfulgham@apple.com>
1750
1751         Follow-up fix to r185766.
1752         https://bugs.webkit.org/show_bug.cgi?id=22132
1753
1754         Reviewed by Zalan Bujtas.
1755
1756         Suggested by Darin Adler in the bug.
1757
1758         * platform/graphics/filters/FETile.cpp:
1759         (WebCore::FETile::platformApplySoftware): Use WTF::move when passing
1760         the new tileImageCopy RefPtr.
1761
1762 2015-06-19  Michael Catanzaro  <mcatanzaro@igalia.com>
1763
1764         [SOUP] Fix return-type-c-linkage warning after r185553
1765         https://bugs.webkit.org/show_bug.cgi?id=146014
1766
1767         Reviewed by Martin Robinson.
1768
1769         * platform/network/soup/WebKitSoupRequestGeneric.cpp:
1770         (webkitSoupRequestGenericGetRequest): Return a pointer rather than a reference.
1771         * platform/network/soup/WebKitSoupRequestGeneric.h: webkitSoupRequestGenericGetRequest now
1772         returns a pointer rather than a reference.
1773
1774 2015-06-19  Dean Jackson  <dino@apple.com>
1775
1776         Played <audio> looks invisible against the gray background
1777         https://bugs.webkit.org/show_bug.cgi?id=146164
1778         <rdar://problem/21014284>
1779
1780         Reviewed by Brent Fulgham.
1781
1782         The plus-darker blend mode was not allowing any white to
1783         show through in the rendering. We don't need this for
1784         audio controls, where we draw on an opaque grey background.
1785
1786         * Modules/mediacontrols/mediaControlsiOS.css:
1787         (audio::-webkit-media-controls-panel): Darken the color of the controls a
1788         little to make white stand out more.
1789         (audio::-webkit-media-controls-timeline): Remove the plus-darker blending.
1790         (video::-webkit-media-controls-timeline): Apply blending only to video.
1791
1792 2015-06-19  Andy Estes  <aestes@apple.com>
1793
1794         Various assertion failures occur when executing script in the midst of DOM insertion
1795         https://bugs.webkit.org/show_bug.cgi?id=132482
1796
1797         Reviewed by Darin Adler.
1798
1799         Prior to this change, when an element containing a <script> child was inserted into a document, the script was
1800         executed in ScriptElement::insertedInto(). That script can access nodes that follow it in the newly-inserted
1801         hierarchy but are not yet fully inserted, leading to at least the following problems:
1802
1803             - The script could remove a node that is not yet marked as in the document.
1804             - The script could remove a named <map> that has yet to be added to TreeScope::m_imageMapsByName.
1805             - The script could remove a form control that has yet to be added to FormController::m_formElementsWithState.
1806
1807         These scenarios all result in assertion failures. This change ensures that each node in the newly-inserted
1808         hierarchy is fully inserted before executing any scripts.
1809
1810         Tests: fast/dom/element-removed-while-inserting-parent-crash.html
1811                fast/dom/named-map-removed-while-inserting-parent-crash.html
1812                fast/forms/form-control-removed-while-inserting-parent-crash.html
1813                svg/dom/element-removed-while-inserting-parent-crash.html
1814
1815         * dom/ScriptElement.cpp:
1816         (WebCore::ScriptElement::shouldNotifySubtreeInsertions): Renamed from insertedInto().
1817         Returned true in the case where insertedInto() would've called prepareScript().
1818         (WebCore::ScriptElement::didNotifySubtreeInsertions): Called prepareScript().
1819         (WebCore::ScriptElement::insertedInto): Renamed to shouldNotifySubtreeInsertions().
1820         * dom/ScriptElement.h:
1821         * html/HTMLScriptElement.cpp:
1822         (WebCore::HTMLScriptElement::insertedInto): If shouldNotifySubtreeInsertions() is true, returned InsertionShouldCallDidNotifySubtreeInsertions.
1823         Otherwise, returned InsertionDone.
1824         (WebCore::HTMLScriptElement::didNotifySubtreeInsertions): Called ScriptElement::didNotifySubtreeInsertions().
1825         * html/HTMLScriptElement.h:
1826         * svg/SVGScriptElement.cpp:
1827         (WebCore::SVGScriptElement::insertedInto): Did the same as HTMLScriptElement::insertedInto().
1828         (WebCore::SVGScriptElement::didNotifySubtreeInsertions): Called ScriptElement::didNotifySubtreeInsertions().
1829         * svg/SVGScriptElement.h:
1830
1831 2015-06-19  Brent Fulgham  <bfulgham@apple.com>
1832
1833         All calls of ImageBuffer::create should null check the return value
1834         https://bugs.webkit.org/show_bug.cgi?id=22132
1835
1836         Reviewed by Zalan Bujtas.
1837
1838         ImageBuffer::create returns nullptr for a number of reasons, and should be
1839         expected to do so. We missed this check in a few places, resulting in
1840         crashes on some systems. Likewise, ImageBuffer::copyImage may return nullptr
1841         in normal use and should be checked.
1842
1843         * platform/graphics/BitmapImage.cpp:
1844         (WebCore::BitmapImage::drawPattern): Add nullptr check for create and copyImage. Remove
1845         extra call to 'setImageObserver'.
1846         * platform/graphics/cairo/ImageBufferCairo.cpp:
1847         (WebCore::ImageBuffer::drawPattern): Add nullptr check for copyImage.
1848         * platform/graphics/cg/ImageBufferCG.cpp:
1849         (WebCore::ImageBuffer::drawPattern): Add nullptr checks for copyImage.
1850         * platform/graphics/filters/FETile.cpp:
1851         (WebCore::FETile::platformApplySoftware): Add nullptr check for copyImage.
1852         * platform/graphics/filters/FilterEffect.cpp:
1853         (WebCore::FilterEffect::asImageBuffer): Add nullptr check for create.
1854         (WebCore::FilterEffect::openCLImageToImageBuffer): Ditto.
1855         * platform/graphics/texmap/BitmapTexture.cpp:
1856         (WebCore::BitmapTexture::updateContents): Add nullptr checks for create and copyImage.
1857         * svg/graphics/SVGImage.cpp:
1858         (WebCore::SVGImage::drawPatternForContainer): Add nullptr check for copyImage.
1859
1860 2015-06-19  Jeremy Jones  <jeremyj@apple.com>
1861
1862         Get CAContext directly for CALayer instead of walking the layer tree.
1863         https://bugs.webkit.org/show_bug.cgi?id=146138
1864         <rdar://problem/21455974>
1865
1866         Reviewed by Darin Adler.
1867
1868         This will get the context directly from the CALayer instead of getting all CAContexts, walking the layer tree 
1869         to the root and comparing that against each CAContext's root layer.
1870
1871         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1872         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
1873
1874 2015-06-18  Brent Fulgham  <bfulgham@apple.com>
1875
1876         [iOS] scrollIntoViewIfNeeded is not working with scroll-snap points
1877         https://bugs.webkit.org/show_bug.cgi?id=145318
1878         <rdar://problem/21081501>
1879
1880         Reviewed by Simon Fraser.
1881
1882         Use the ScrollController in iOS to track the scroll snap point state.
1883         We do not need the animation implementation or timers since the actual
1884         animation is handled by UIKit.
1885
1886         This change lets us communicate the current offset into the scroll snap
1887         offset vector between the WebProcess and RemoteScrollingTree so that
1888         both sides stay in sync regardless of whether user gestures or style
1889         updates have caused us to shift to a different snap point.
1890
1891         * page/scrolling/AsyncScrollingCoordinator.cpp:
1892         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): Set the
1893         current horizontal and vertical scroll snap offset indices.
1894         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode): Ditto.
1895         * page/scrolling/AsyncScrollingCoordinator.h: Mark the setActiveScrollSnapIndices
1896         for export so that it can be reached by the UIProcess.
1897         * page/scrolling/ScrollingCoordinator.h: Keep track of horizontal and
1898         vertical scroll snap offset indices.
1899         * page/scrolling/ScrollingStateScrollingNode.cpp:
1900         (WebCore::ScrollingStateScrollingNode::setCurrentHorizontalSnapPointIndex): Added.
1901         (WebCore::ScrollingStateScrollingNode::setCurrentVerticalSnapPointIndex): Added.
1902         * page/scrolling/ScrollingStateScrollingNode.h:
1903         (WebCore::ScrollingStateScrollingNode::currentHorizontalSnapPointIndex): Added.
1904         (WebCore::ScrollingStateScrollingNode::currentVerticalSnapPointIndex): Added.
1905         * page/scrolling/ScrollingTree.h:
1906         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1907         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren): Update the scroll snap
1908         point offset indices if either has changed.
1909         * page/scrolling/ScrollingTreeScrollingNode.h:
1910         (WebCore::ScrollingTreeScrollingNode::currentHorizontalSnapPointIndex): Added.
1911         (WebCore::ScrollingTreeScrollingNode::currentVerticalSnapPointIndex): Added.
1912         (WebCore::ScrollingTreeScrollingNode::setCurrentHorizontalSnapPointIndex): Added.
1913         (WebCore::ScrollingTreeScrollingNode::setCurrentVerticalSnapPointIndex): Added.
1914         * page/scrolling/ThreadedScrollingTree.cpp:
1915         (WebCore::ThreadedScrollingTree::currentSnapPointIndicesDidChange): New method
1916         to handle notifications about scroll snap index changes from the UIProcess.
1917         * page/scrolling/ThreadedScrollingTree.h:
1918         * page/scrolling/ios/ScrollingTreeIOS.cpp:
1919         (WebCore::ScrollingTreeIOS::currentSnapPointIndicesDidChange): New method
1920         to handle notifications about scroll snap index changes from the UIProcess.
1921         * page/scrolling/ios/ScrollingTreeIOS.h:
1922         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1923         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): Update scroll
1924         snap point current offset indices if they have changed.
1925         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Remove unneeded
1926         PLATFORM(MAC) macro.
1927         * platform/ScrollAnimator.cpp:
1928         (WebCore::ScrollAnimator::ScrollAnimator): We have a ScrollController if we are
1929         supporting scroll snap points or rubber banding.
1930         (WebCore::ScrollAnimator::processWheelEventForScrollSnap): This method is not needed
1931         for iOS builds.
1932         (WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset): Enable this on iOS.
1933         (WebCore::ScrollAnimator::updateScrollSnapState): Renamed from 'updateScrollAnimatorsAndTimers'
1934         and enabled on iOS.
1935         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Deleted.
1936         * platform/ScrollAnimator.h: Enable some scroll snap methods on iOS.
1937         * platform/ScrollableArea.cpp:
1938         (WebCore::ScrollableArea::handleWheelEvent): Enable scroll snap index bookkeeping on iOS, too.
1939         (WebCore::ScrollableArea::updateScrollSnapState): Revise to call 'updateScrollSnapState' instead
1940         of 'updateScrollAnimatorsAndTimers'.
1941         * platform/cocoa/ScrollController.h: Enable some methods on iOS. Reorder methods to
1942         reduce the number of macros needed to do so.
1943         * platform/cocoa/ScrollController.mm:
1944         (systemUptime): Only build for Mac.
1945         (WebCore::ScrollController::ScrollController): Disable rubber band-specific members on iOS.
1946         (WebCore::ScrollController::handleWheelEvent): Only build this on Mac.
1947         (WebCore::ScrollController::isRubberBandInProgress): Always return 'false' on iOS.
1948         (WebCore::ScrollController::startSnapRubberbandTimer): Only build this on Mac.
1949         (WebCore::ScrollController::shouldRubberBandInHorizontalDirection): Ditto.
1950         (WebCore::ScrollController::scrollSnapPointState): Enable on iOS.
1951         (WebCore::ScrollController::hasActiveScrollSnapTimerForAxis): Only build on Mac.
1952         (WebCore::ScrollController::updateScrollSnapState): renamed from 'updateScrollAnimatorsAndTimers'
1953         (WebCore::ScrollController::startScrollSnapTimer): Only build on Mac.
1954         (WebCore::ScrollController::initializeGlideParameters): Ditto.
1955         (WebCore::ScrollController::activeScrollSnapIndexForAxis): Enable on iOS.
1956         (WebCore::ScrollController::setActiveScrollSnapIndicesForOffset): Ditto.
1957         (WebCore::ScrollController::beginScrollSnapAnimation): Only build on Mac.
1958         (WebCore::ScrollController::computeGlideDelta): Ditto.
1959         (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Deleted.
1960         * rendering/RenderLayerCompositor.cpp:
1961         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Capture any changes in scroll
1962         snap offset indices.
1963
1964 2015-06-19  Jeremy Jones  <jeremyj@apple.com>
1965
1966         Fullscreen view should not update bounds of video when in PiP.
1967         https://bugs.webkit.org/show_bug.cgi?id=146134
1968
1969         Reviewed by Darin Adler.
1970
1971         Don't update bounds on video layer when it is not a child.
1972
1973         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1974         (-[WebAVVideoLayer setBounds:]):
1975
1976 2015-06-19  Zalan Bujtas  <zalan@apple.com>
1977
1978         RenderRubyText requires RenderRubyRun parent.
1979         https://bugs.webkit.org/show_bug.cgi?id=146148
1980         rdar://problem/21423319
1981
1982         Reviewed by Simon Fraser.
1983
1984         RenderRubyText expects its parent to be RenderRubyRun and since a
1985         a non-block <rt> requires anonymous wrapper, we should check whether
1986         the display type is actually block.
1987
1988         Test: fast/ruby/crash-when-ruby-rt-is-non-block.html
1989
1990         * html/RubyTextElement.cpp:
1991         (WebCore::RubyTextElement::createElementRenderer):
1992
1993 2015-06-19  Jeremy Jones  <jeremyj@apple.com>
1994
1995         cancelPreviousPerformRequestsWithTarget for -resolveBounds in wrong class.
1996         https://bugs.webkit.org/show_bug.cgi?id=146140
1997
1998         Reviewed by Eric Carlson.
1999
2000         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2001         (-[WebCALayerHostWrapper dealloc]): Added.
2002         (-[WebAVVideoLayer dealloc]): Deleted.
2003
2004 2015-06-19  Per Arne Vollan  <peavo@outlook.com>
2005
2006         [WinCairo] Null pointer crash in BitmapTexture::updateContents.
2007         https://bugs.webkit.org/show_bug.cgi?id=146147
2008
2009         Reviewed by Brent Fulgham.
2010
2011         Added null pointer check.
2012
2013         * platform/graphics/texmap/BitmapTexture.cpp:
2014         (WebCore::BitmapTexture::updateContents):
2015
2016 2015-06-19  Anders Carlsson  <andersca@apple.com>
2017
2018         Spintracer treats the web process as hung when it's showing JavaScript dialogs in the UI process
2019         https://bugs.webkit.org/show_bug.cgi?id=146124
2020         rdar://problem/21449395
2021
2022         Reviewed by Geoffrey Garen.
2023
2024         * platform/spi/cg/CoreGraphicsSPI.h:
2025
2026 2015-06-19  Csaba Osztrogonác  <ossy@webkit.org>
2027
2028         Remove unnecessary svn:executable flags
2029         https://bugs.webkit.org/show_bug.cgi?id=146107
2030
2031         Reviewed by Alexey Proskuryakov.
2032
2033         * html/canvas/CanvasRenderingContext2D.cpp: Removed property svn:executable.
2034         * mathml/MathMLMencloseElement.cpp: Removed property svn:executable.
2035         * mathml/MathMLMencloseElement.h: Removed property svn:executable.
2036         * platform/efl/RenderThemeEfl.cpp: Removed property svn:executable.
2037         * rendering/mathml/RenderMathMLMenclose.cpp: Removed property svn:executable.
2038         * rendering/mathml/RenderMathMLMenclose.h: Removed property svn:executable.
2039
2040 2015-06-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2041
2042         Bindings generator should generate code to catch exception and reject promises for Promise-based APIs
2043         https://bugs.webkit.org/show_bug.cgi?id=146060
2044
2045         Reviewed by Darin Adler.
2046
2047         The binding generator splits the function that binds JS to the DOM class implementation in two for functions returning promise.
2048         The first function, called from JS, is responsible of casting this to the expected JSXXX class.
2049         If casting fails, an exception is raised. Otherwise, it calls the second function.
2050         After calling the second function, it checks whether an exception is raised, in which case it returns a rejected promise.
2051         The second function is responsible of argument conversion and calling the DOM class function.
2052
2053         Covered by expectations and AudioContext promise still working.
2054         A test case is added for a promise returning function taking a typed argument as input (if argument value cannot be typed, the promise is rejected).
2055         A second test case is a promise-returning function that can raise an exception. In that case the DOMException is used as rejection value.
2056
2057         As can be seen from generated code, this generalized code adds a mandatory check (is there an exception?) at the end of the function.
2058         This check is done even in cases we know there will be no exception.
2059         This may be covered by another patch if this optimization is thought useful enough.
2060
2061         * bindings/js/JSDOMPromise.cpp:
2062         (WebCore::rejectPromiseWithExceptionIfAny): Utility method for the binding code.
2063         (WebCore::callPromiseFunction): Ditto.
2064         * bindings/js/JSDOMPromise.h:
2065         * bindings/scripts/CodeGeneratorJS.pm:
2066         (GenerateImplementation):
2067         (GenerateFunctionCastedThis): Extracted from GenerateImplementationFunctionCall to reuse it in case of promise-returning functions.
2068         (GenerateImplementationFunctionCall):
2069         (GenerateCallbackImplementation): Deleted.
2070         * bindings/scripts/test/JS/JSTestObj.cpp:
2071         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
2072         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
2073         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
2074         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
2075         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
2076         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
2077         * bindings/scripts/test/TestObj.idl:
2078
2079 2015-06-18  Jeremy Jones  <jeremyj@apple.com>
2080
2081         Disable UIWindow for fullscreen video for selected clients.
2082         https://bugs.webkit.org/show_bug.cgi?id=145852
2083
2084         Reviewed by Simon Fraser.
2085
2086         Disable UIWindow for fullscreen video doesn't work everywhere (rdar://problem/21315993), so just disable it when creating a UIWindow won't work.
2087         Fix some interface hiding and layout problems that showed up in the non UIWindow code path.
2088
2089         * platform/RuntimeApplicationChecksIOS.h:
2090         * platform/RuntimeApplicationChecksIOS.mm: Remove iAD bundle identifier.
2091         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2092         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Opt out of UIWindow when hosted in another process. And fix view parenting for non-window case.
2093         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Fix for AVKit exit fullscreen complaining about -needsLayout.
2094
2095         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
2096         (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
2097         (WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen):
2098         (WebVideoFullscreenInterfaceAVKit::didStartOptimizedFullscreen):
2099         (WebVideoFullscreenInterfaceAVKit::willStopOptimizedFullscreen):
2100         (WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen):
2101         These hide and show the view controller where we hide and show the window.
2102
2103 2015-06-18  Dean Jackson  <dino@apple.com>
2104
2105         Provide a way for web developers to draw a Theme-specific Wireless Playback icon
2106         https://bugs.webkit.org/show_bug.cgi?id=146123
2107         <rdar://problem/21119287>
2108
2109         Reviewed by Simon Fraser.
2110
2111         Implement a -webkit-named-image() CSS <image> generator that allows a site to
2112         request artwork by name and get the platform variant. At the moment
2113         we only support "wireless-playback" which returns a generic image everywhere
2114         but Cocoa platforms, where we render the AirPlay icon.
2115
2116         In order to do this I added a ThemeCocoa to share any Theme code between
2117         Mac and iOS.
2118
2119         Test: fast/css/named-icons.html
2120
2121         * WebCore.xcodeproj/project.pbxproj: Add new files CSSNamedImageValue, NamedImageGeneratedImage and ThemeCocoa.
2122
2123         * css/CSSImageGeneratorValue.cpp: Handle the new NamedImageClass in the switch statements for downcasting.
2124         (WebCore::CSSImageGeneratorValue::image):
2125         (WebCore::CSSImageGeneratorValue::isFixedSize):
2126         (WebCore::CSSImageGeneratorValue::isPending):
2127         (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
2128
2129         * css/CSSNamedImageValue.cpp: New class. Just holds a name String.
2130         (WebCore::CSSNamedImageValue::customCSSText):
2131         (WebCore::CSSNamedImageValue::image):
2132         (WebCore::CSSNamedImageValue::equals):
2133         * css/CSSNamedImageValue.h:
2134         (WebCore::CSSNamedImageValue::create):
2135         (WebCore::CSSNamedImageValue::isFixedSize):
2136         (WebCore::CSSNamedImageValue::isPending):
2137         (WebCore::CSSNamedImageValue::CSSNamedImageValue):
2138
2139         * css/CSSParser.cpp:
2140         (WebCore::CSSParser::isGeneratedImageValue): Allow "-webkit-named-image(".
2141         (WebCore::CSSParser::parseGeneratedImage): Call parseNamedImage if we hit named-icon.
2142         (WebCore::CSSParser::parseNamedImage): Parse the function looking for a CSS ident.
2143         * css/CSSParser.h:
2144
2145         * css/CSSValue.cpp: Handle NamedImageClass in the various switch statements.
2146         (WebCore::CSSValue::equals):
2147         (WebCore::CSSValue::cssText):
2148         (WebCore::CSSValue::destroy):
2149         * css/CSSValue.h:
2150         (WebCore::CSSValue::isNamedImageValue): Helper to detect the correct CSSValue subclass.
2151
2152         * platform/Theme.cpp:
2153         (WebCore::Theme::drawNamedImage): Draw a generic wireless playback icon.
2154         * platform/Theme.h: Add drawNamedImage.
2155
2156         * platform/cocoa/ThemeCocoa.cpp: New shared base class for ThemeMac and ThemeIOS.
2157         (WebCore::fitContextToBox):
2158         (WebCore::ThemeCocoa::drawNamedImage): Draw an AirPlay icon for wireless playback.
2159         * platform/cocoa/ThemeCocoa.h:
2160
2161         * platform/graphics/CrossfadeGeneratedImage.h: Drive-by removal of unnecessary forward class definition.
2162
2163         * platform/graphics/ImageBuffer.h: Add NamedImageGeneratedImage as a friend class.
2164
2165         * platform/graphics/NamedImageGeneratedImage.cpp: New class. Calls into the Theme to render the artwork.
2166         (WebCore::NamedImageGeneratedImage::NamedImageGeneratedImage):
2167         (WebCore::NamedImageGeneratedImage::draw):
2168         (WebCore::NamedImageGeneratedImage::drawPattern):
2169         * platform/graphics/NamedImageGeneratedImage.h:
2170
2171         * platform/ios/ThemeIOS.h: Inherit from ThemeCocoa.
2172         * platform/mac/ThemeMac.h: Ditto.
2173
2174 2015-06-18  KyungTae Kim  <ktf.kim@samsung.com> and Myles C. Maxfield  <mmaxfield@apple.com>
2175
2176         [CSS3] Add support for the word-break:keep-all CSS property
2177         https://bugs.webkit.org/show_bug.cgi?id=123782
2178
2179         Reviewed by Darin Adler.
2180
2181         Add support for word-break:keep-all CSS property by CSS3 spec:
2182         http://www.w3.org/TR/2013/WD-css-text-3-20131010/#word-break-property
2183
2184         Test: fast/text/word-break-keep-all.html
2185
2186         * css/CSSParser.cpp:
2187         (WebCore::isValidKeywordPropertyAndValue):
2188         * css/CSSPrimitiveValueMappings.h:
2189         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2190         (WebCore::CSSPrimitiveValue::operator EWordBreak):
2191         * css/CSSValueKeywords.in:
2192         * rendering/RenderText.cpp:
2193         (WebCore::RenderText::computePreferredLogicalWidths):
2194         * rendering/break_lines.h:
2195         (WebCore::nextBreakablePositionKeepingAllWords):
2196         (WebCore::nextBreakablePositionKeepingAllWordsIgnoringNBSP):
2197         (WebCore::isBreakable):
2198         * rendering/line/BreakingContext.h:
2199         (WebCore::BreakingContext::handleText):
2200         (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
2201         * rendering/style/RenderStyleConstants.h:
2202
2203 2015-06-18  Jon Lee  <jonlee@apple.com>
2204
2205         Update AVKit usage of pip
2206         https://bugs.webkit.org/show_bug.cgi?id=146095
2207         <rdar://problem/21386853>
2208
2209         Reviewed by Eric Carlson.
2210
2211         - Rename enum VideoFullscreenModeOptimized to VideoFullscreenModePictureInPicture
2212         - Rename MediaElementSession::allowsAlternateFullscreen to allowsPictureInPicture
2213         - Rename Settings::allowsAlternateFullscreen to allowsPictureInPictureMediaPlayback
2214         - Update AVKit calls and AVKitSPI.h
2215         - Rename WebVideoFullscreenInterfaceAVKit delegate functions and member variables
2216
2217         * html/HTMLMediaElement.cpp:
2218         * html/HTMLVideoElement.cpp:
2219         * html/MediaElementSession.cpp:
2220         (WebCore::MediaElementSession::allowsPictureInPicture): Renamed.
2221         (WebCore::MediaElementSession::allowsAlternateFullscreen): Deleted.
2222         * html/MediaElementSession.h:
2223         * page/Settings.cpp:
2224         * page/Settings.in:
2225         * platform/graphics/MediaPlayerEnums.h:
2226         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2227         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2228         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Remove unused setIsOptimized.
2229         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2230         * platform/spi/cocoa/AVKitSPI.h: Remove unused typedef.
2231         * platform/spi/mac/AVFoundationSPI.h:
2232
2233 2015-06-18  Jeremy Jones  <jeremyj@apple.com>
2234
2235         Fix crash when entering fullscreen during exit fullscreen animation.
2236         https://bugs.webkit.org/show_bug.cgi?id=146117
2237
2238         Reviewed by Simon Fraser.
2239
2240         Because enterFullscreen can be called during exitFullscreen animation, the exit fullscreen teardown
2241         should not imply a fullscreen state change on video element.
2242
2243         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2244         (WebVideoFullscreenControllerContext::exitFullscreen): May be called from mainThread
2245         (-[WebVideoFullscreenController exitFullscreen]): May be called from mainThread
2246         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
2247         (WebVideoFullscreenModelVideoElement::setVideoElement): 
2248         Changing associated video element does not imply fullscreen mode change.
2249
2250 2015-06-18  Brian J. Burg  <burg@cs.washington.edu>
2251
2252         Web Inspector: improve generated types for objects passed to backend commands
2253         https://bugs.webkit.org/show_bug.cgi?id=146091
2254
2255         Reviewed by Joseph Pecoraro.
2256
2257         Update type signatures for backend command implementations. In a few cases, clean
2258         up relevant helper function signatures and copy data out of parameter objects where
2259         the code previously held onto a reference.
2260
2261         No new tests, no behavior changed.
2262
2263         * inspector/InspectorCSSAgent.cpp:
2264         (WebCore::computePseudoClassMask):
2265         (WebCore::InspectorCSSAgent::setStyleText):
2266         (WebCore::InspectorCSSAgent::setRuleSelector):
2267         (WebCore::InspectorCSSAgent::forcePseudoState):
2268         * inspector/InspectorCSSAgent.h:
2269         * inspector/InspectorDOMAgent.cpp:
2270         (WebCore::parseColor):
2271         (WebCore::parseConfigColor):
2272         (WebCore::parseQuad):
2273         (WebCore::InspectorDOMAgent::performSearch):
2274         (WebCore::InspectorDOMAgent::setSearchingForNode):
2275         (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
2276         (WebCore::InspectorDOMAgent::setInspectModeEnabled):
2277         (WebCore::InspectorDOMAgent::highlightRect):
2278         (WebCore::InspectorDOMAgent::highlightQuad):
2279         (WebCore::InspectorDOMAgent::innerHighlightQuad):
2280         (WebCore::InspectorDOMAgent::highlightNode):
2281         (WebCore::InspectorDOMAgent::highlightFrame):
2282         * inspector/InspectorDOMAgent.h:
2283         * inspector/InspectorDOMStorageAgent.cpp:
2284         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
2285         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
2286         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
2287         (WebCore::InspectorDOMStorageAgent::findStorageArea):
2288         * inspector/InspectorDOMStorageAgent.h:
2289         * inspector/InspectorIndexedDBAgent.cpp:
2290         (WebCore::InspectorIndexedDBAgent::requestData):
2291         * inspector/InspectorIndexedDBAgent.h:
2292         * inspector/InspectorReplayAgent.cpp:
2293         (WebCore::InspectorReplayAgent::replayToPosition):
2294         * inspector/InspectorReplayAgent.h:
2295         * inspector/InspectorResourceAgent.cpp:
2296         (WebCore::InspectorResourceAgent::willSendRequest):
2297         (WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
2298         Clean up extraHTTPHeaders to copy header key/values out of the InspectorObject, rather
2299         than retaining the protocol object indefinitely. This matches the ownership scheme used
2300         everywhere else.
2301
2302         * inspector/InspectorResourceAgent.h:
2303         * inspector/InspectorStyleSheet.h:
2304         (WebCore::InspectorCSSId::InspectorCSSId):
2305         * inspector/InspectorWorkerAgent.cpp:
2306         (WebCore::InspectorWorkerAgent::sendMessageToWorker):
2307         * inspector/InspectorWorkerAgent.h:
2308
2309 2015-06-18  Anders Carlsson  <andersca@apple.com>
2310
2311         Remove shouldInterruptJavaScript
2312         https://bugs.webkit.org/show_bug.cgi?id=146118
2313
2314         Reviewed by Antti Koivisto.
2315
2316         The WebKit SPI methods for deciding whether JavaScript execution should be interrupted hasn't been used
2317         for many releases. Furthermore, they don't make sense in the multi-process architecture since it's still possible
2318         to interrupt execution (by closing the browser tab or window) from the UI process.
2319
2320         * bindings/js/JSDOMWindowBase.cpp:
2321         (WebCore::JSDOMWindowBase::shouldInterruptScript):
2322         * loader/EmptyClients.h:
2323         * page/Chrome.cpp:
2324         (WebCore::Chrome::shouldInterruptJavaScript): Deleted.
2325         * page/Chrome.h:
2326         * page/ChromeClient.h:
2327
2328 2015-06-18  Benjamin Poulain  <bpoulain@apple.com>
2329
2330         [CSS JIT][ARMv7] The pseudo element early exit trashes r6
2331         https://bugs.webkit.org/show_bug.cgi?id=146078
2332
2333         Reviewed by Alex Christensen.
2334
2335         The pseudo element early failure runs before we generate the prologue.
2336         The reason is that we can often exit immediately on function entry, before
2337         we even touch any memory.
2338
2339         On ARMv7, we don't have many spare registers so the MacroAssembler
2340         uses r6 as a scratch register and the client code is expected to save
2341         it.
2342
2343         In the early failure case, we were not pushing r6 before using the MacroAssembler
2344         and its value could be trashed.
2345
2346         This patch push the macro assembler registers separately from the prologue.
2347
2348         For restoring the registers, a new function generateFunctionEnding() encapsulate
2349         the pop() and ret().
2350
2351         * cssjit/SelectorCompiler.cpp:
2352         (WebCore::SelectorCompiler::SelectorCodeGenerator::pushMacroAssemblerRegisters):
2353         (WebCore::SelectorCompiler::SelectorCodeGenerator::popMacroAssemblerRegisters):
2354         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
2355         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
2356         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2357
2358         * cssjit/StackAllocator.h:
2359         (WebCore::StackAllocator::operator=):
2360         We have a new case for the stack allocator: some stack changes are conditional
2361         at compile time instead of runtime. This is easy to deal with by overriding
2362         the stack if a path is not taken at compile time.
2363
2364 2015-06-17  Conrad Shultz  <conrad_shultz@apple.com>
2365
2366         REGRESSION: js/dom/navigator-plugins-crash.html asserts a lot
2367         https://bugs.webkit.org/show_bug.cgi?id=144399
2368
2369         Reviewed by Darin Adler.
2370
2371         Earlier work made the array of web-visible plug-ins dynamic, but allowed DOMPlugin (and, indirectly by extension,
2372         DOMMimeType) to continue keeping a reference to a plug-in in terms of an index into that array. This superficially
2373         appeared correct since DOMPlugin immutably holds onto a PluginData instance, which in turn immutably holds onto a
2374         Page instance. PluginStrategy::getWebVisiblePluginInfo() is passed this Page, which is used to determine the contents
2375         of the plugin array. The expectation was that keeping an index would still be safe since the Page is not changing,
2376         but this is not strictly correct since relevant attributes of the Page and/or the available plugins may still change.
2377
2378         It's not entirely clear why the test failures are intermittent and occur only on certain configurations, but address
2379         them by eliminating the incorrect storage of indexes in favor of keeping copies of the relevant plugin info itself.
2380
2381         * plugins/DOMMimeType.cpp:
2382         (WebCore::DOMMimeType::DOMMimeType):
2383         Instead of storing the MIME type index, retrieve and store the MIME class info and plugin info.
2384         (WebCore::DOMMimeType::type):
2385         Directly access the m_mimeClassInfo member.
2386         (WebCore::DOMMimeType::suffixes):
2387         Ditto.
2388         (WebCore::DOMMimeType::description):
2389         Ditto.
2390         (WebCore::DOMMimeType::enabledPlugin):
2391         Directly access the m_pluginInfo member.
2392         (WebCore::DOMMimeType::mimeClassInfo): Deleted.
2393
2394         * plugins/DOMMimeType.h:
2395         Update member variables.
2396
2397         * plugins/DOMPlugin.cpp:
2398         (WebCore::DOMPlugin::DOMPlugin):
2399         Instead of storing the plugin index, store the plugin info directly.
2400         (WebCore::DOMPlugin::name):
2401         Directly access m_pluginInfo.
2402         (WebCore::DOMPlugin::filename):
2403         Ditto.
2404         (WebCore::DOMPlugin::description):
2405         Ditto.
2406         (WebCore::DOMPlugin::length):
2407         Ditto.
2408         (WebCore::DOMPlugin::item):
2409         Access m_pluginInfo directly; find the matching plug-in based on matching PluginInfo (for which an overloaded
2410         comparator is supplied below).
2411         (WebCore::DOMPlugin::pluginInfo): Deleted.
2412
2413         * plugins/DOMPlugin.h:
2414         Update member variables.
2415         (WebCore::DOMPlugin::create):
2416         Accept a PluginInfo instead of a plugin index.
2417
2418         * plugins/DOMPluginArray.cpp:
2419         (WebCore::DOMPluginArray::item):
2420         (WebCore::DOMPluginArray::namedItem):
2421
2422         * plugins/PluginData.h:
2423         (WebCore::operator==):
2424         Added; compare PluginInfo structs on the basis of member equality.
2425
2426 2015-06-17  Alex Christensen  <achristensen@webkit.org>
2427
2428         [Content Extensions] Log blocked loads to the WebInspector console
2429         https://bugs.webkit.org/show_bug.cgi?id=146089
2430
2431         Reviewed by Joseph Pecoraro.
2432
2433         * contentextensions/ContentExtensionsBackend.cpp:
2434         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
2435         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
2436         Log which URLs are blocked and the URL of the page they are blocked from.
2437
2438 2015-06-18  Joseph Pecoraro  <pecoraro@apple.com>
2439
2440         Crash under WebCore::DOMWindow::dispatchMessageEventWithOriginCheck attempting to log console message
2441         https://bugs.webkit.org/show_bug.cgi?id=146093
2442
2443         Reviewed by Timothy Hatcher.
2444
2445         * page/DOMWindow.cpp:
2446         (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
2447         The console could be null so null check its use.
2448
2449 2015-06-18  Csaba Osztrogonác  <ossy@webkit.org>
2450
2451         Suppress null-conversion warnings in ANGLE
2452         https://bugs.webkit.org/show_bug.cgi?id=145125
2453
2454         Reviewed by Alex Christensen.
2455
2456         * CMakeLists.txt:
2457
2458 2015-06-18  Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>
2459
2460         [Streams API] Implement ReadableStreamReader.releaseLock
2461         https://bugs.webkit.org/show_bug.cgi?id=145299
2462
2463         Reviewed by Darin Adler.
2464
2465         Covered by rebased tests.
2466
2467         * Modules/streams/ReadableStream.cpp:
2468         (WebCore::ReadableStream::close): Moving some close code to newly added releaseReader.
2469         (WebCore::ReadableStream::releaseReader): Implements reader release and callbacks finalization.
2470         (WebCore::ReadableStream::changeStateToErrored): Calls releaseReader.
2471         * Modules/streams/ReadableStream.h:
2472         (WebCore::ReadableStream::hasReadPendingRequests): Added to enable reader.releaseLock throwing if read requests are pending.
2473         * Modules/streams/ReadableStreamReader.cpp:
2474         (WebCore::ReadableStreamReader::releaseLock): Implementation of releaseLock
2475         * Modules/streams/ReadableStreamReader.h:
2476         * Modules/streams/ReadableStreamReader.idl:
2477         (WebCore::releaseLock): Deleted.
2478
2479 2015-06-18  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2480
2481         GObject and ObjC bindings generator should not generate code for promise-based APIs
2482         https://bugs.webkit.org/show_bug.cgi?id=146059
2483
2484         Reviewed by Darin Adler.
2485
2486         Covered by rebased expectations.
2487
2488         * bindings/scripts/CodeGeneratorGObject.pm:
2489         (SkipFunction): Disabling GObject DOM binding for functions returning promises.
2490         * bindings/scripts/CodeGeneratorObjC.pm:
2491         (SkipFunction): Disabling ObjC DOM binding for functions returning promises.
2492         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Rebasing expectation.
2493         (webkit_dom_test_obj_get_read_only_long_attr): Deleted.
2494         (webkit_dom_test_obj_get_read_only_string_attr): Deleted.
2495         * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Rebasing expectation.
2496         * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
2497         * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
2498         (core): Deleted.
2499
2500 2015-06-17  Ryuan Choi  <ryuan.choi@navercorp.com>
2501
2502         [EFL] test_ewk2_context_url_scheme_register has been crashed since r185553
2503         https://bugs.webkit.org/show_bug.cgi?id=146075
2504
2505         Reviewed by Carlos Garcia Campos.
2506
2507         Since r185553, CustomProtocolManager sends StartLoading message to UIProcess
2508         with request of SoupGenericRequest instead of request itself.
2509         But, request of SoupGenericRequest is nullptr in EFL port because EFL port
2510         does not use m_initiatingPageID.
2511
2512         This patch updates request of SoupGenericRequest although m_initiatingPageID is null.
2513
2514         * platform/network/soup/ResourceRequestSoup.cpp: 
2515         (WebCore::ResourceRequest::updateSoupRequest):
2516
2517 2015-06-17  Daniel Bates  <dabates@apple.com>
2518
2519         Client may receive began editing callback for already focused text field
2520         https://bugs.webkit.org/show_bug.cgi?id=146074
2521         <rdar://problem/21293562>
2522
2523         Reviewed by Darin Adler.
2524
2525         Fixes an issue where the client would be notified that began editing in a text field
2526         for each programmatic DOM focus event dispatched at the text field regardless of
2527         whether the field was focused. The client should only be notified that began editing
2528         exactly once when a text field becomes focused (either programmatically or by user interaction).
2529
2530         * html/TextFieldInputType.cpp:
2531         (WebCore::TextFieldInputType::forwardEvent): Move logic to dispatch editing began callback from here...
2532         (WebCore::TextFieldInputType::handleFocusEvent): to here. This function is called when the
2533         text field becomes newly focused.
2534         * html/TextFieldInputType.h:
2535
2536 2015-06-17  Alex Christensen  <achristensen@webkit.org>
2537
2538         [Content Extensions] Fail to parse invalid arrays
2539         https://bugs.webkit.org/show_bug.cgi?id=146079
2540         rdar://problem/21422649
2541
2542         Reviewed by Benjamin Poulain.
2543
2544         Covered by new and corrected API tests.
2545
2546         * contentextensions/ContentExtensionParser.cpp:
2547         (WebCore::ContentExtensions::loadTrigger):
2548         Fail to parse invalid arrays for if-domain, unless-domain, resource-type, and load-type arrays.
2549
2550 2015-06-16  Jon Honeycutt  <jhoneycutt@apple.com>
2551
2552         Position::findParent() should take a reference
2553         https://bugs.webkit.org/show_bug.cgi?id=146038
2554
2555         Reviewed by Darin Adler.
2556
2557         * dom/Position.cpp:
2558         (WebCore::Position::containerNode):
2559         (WebCore::Position::parentAnchoredEquivalent):
2560         Pass a reference; there is already a null check.
2561         (WebCore::Position::previous):
2562         Add a missing null check. Code below this expects that node is non-null.
2563         (WebCore::Position::next):
2564         Ditto.
2565         (WebCore::Position::atStartOfTree):
2566         (WebCore::Position::atEndOfTree):
2567         Pass a reference.
2568         (WebCore::Position::findParent):
2569         Changed to take a reference.
2570
2571         * dom/Position.h:
2572         Ditto.
2573
2574 2015-06-17  Brent Fulgham  <bfulgham@apple.com>
2575
2576         Overflow regions with scroll snap points are not reliably rubber banding
2577         https://bugs.webkit.org/show_bug.cgi?id=142522
2578         <rdar://problem/20100726>
2579
2580         Reviewed by Darin Adler.
2581
2582         When computing the target scroll destination, update the nearest snap point index
2583         and other bookkeeping, but keep the original gesture target if it would have taken
2584         us beyond either limit of the scroll container.
2585
2586         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2587         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2588         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollExtents): Add new method
2589         to support client API.
2590         * platform/ScrollAnimator.cpp:
2591         (WebCore::ScrollAnimator::scrollExtents): Add new method to support client API.
2592         * platform/ScrollAnimator.h:
2593         * platform/cocoa/ScrollController.h:
2594         (WebCore::ScrollControllerClient::scrollExtents): Added new pure virtual method to API.
2595         * platform/cocoa/ScrollController.mm:
2596         (WebCore::ScrollController::beginScrollSnapAnimation): Hold onto original user gesture
2597         target, and use that instead of our nearest snap point if the gesture takes us past
2598         either extreme of the scroll container.
2599
2600 2015-06-17  Tim Horton  <timothy_horton@apple.com>
2601
2602         Swipe gesture can get stuck, preventing scrolling and other gestures
2603         https://bugs.webkit.org/show_bug.cgi?id=146088
2604         <rdar://problem/16056087>
2605
2606         Reviewed by Darin Adler.
2607
2608         * WebCore.xcodeproj/project.pbxproj:
2609         * platform/spi/mac/NSEventSPI.h: Added.
2610         Add an SPI header.
2611
2612 2015-06-16  Matt Rajca  <mrajca@apple.com>
2613
2614         MediaSession: handle MediaEventTrackNext and MediaEventTrackPrevious events
2615         https://bugs.webkit.org/show_bug.cgi?id=146028
2616
2617         Reviewed by Darin Adler.
2618
2619         * Modules/mediasession/MediaRemoteControls.idl: Added nexttrack/previoustrack event handlers.
2620         * Modules/mediasession/MediaSession.cpp: Dispatch the nexttrack/previoustrack events.
2621         (WebCore::MediaSession::skipToNextTrack):
2622         (WebCore::MediaSession::skipToPreviousTrack):
2623         * Modules/mediasession/MediaSession.h:
2624         * Modules/mediasession/MediaSessionManager.cpp: Skip to the next/previous track as described in the media session spec.
2625         (WebCore::MediaSessionManager::skipToNextTrack):
2626         (WebCore::MediaSessionManager::skipToPreviousTrack):
2627         * Modules/mediasession/MediaSessionManager.h:
2628         * dom/EventNames.h: Added the nexttrack/previoustrack event names.
2629         * page/Page.cpp: Tell MediaSessionManager to handle the new track-skipping events.
2630         (WebCore::Page::handleMediaEvent):
2631
2632 2015-06-17  Chris Fleizach  <cfleizach@apple.com>
2633
2634         AX: VoiceOver in iOS not announcing generic WAI-ARIA region, even if labelled properly
2635         https://bugs.webkit.org/show_bug.cgi?id=146066
2636
2637         Reviewed by Darin Adler.
2638
2639         Allow the region role to identify as a landmark type.
2640
2641         Updated test: platform/ios-simulator/accessibility/landmark-types.html
2642
2643         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2644         (-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
2645
2646 2015-06-17  Simon Fraser  <simon.fraser@apple.com>
2647
2648         REGRESSION (r173283-r173296): Amazon.com front page has no caret in the search field
2649         https://bugs.webkit.org/show_bug.cgi?id=146073
2650         rdar://problem/21022203
2651
2652         Reviewed by Tim Horton.
2653
2654         Text controls (text inputs and textareas) need backing store even when empty, because
2655         they need to be able to paint a caret.
2656
2657         Test: compositing/backing/form-controls-backing.html
2658
2659         * rendering/RenderLayerBacking.cpp:
2660         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
2661
2662 2015-06-17  Zalan Bujtas  <zalan@apple.com>
2663
2664         Selection cache produces invalid result when ancestor has float element.
2665         https://bugs.webkit.org/show_bug.cgi?id=146042
2666         rdar://problem/20604592
2667
2668         Reviewed by Ryosuke Niwa.
2669
2670         Selection cache already takes floats into account, however it's not enough to check current
2671         block against floats. Any of the ancestor's float starting from the selection root block
2672         can impact the selection offsets.
2673
2674         Test: fast/block/selection-cache-is-incorrect-when-non-direct-parent-has-float.html
2675
2676         * rendering/LogicalSelectionOffsetCaches.h:
2677         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::ContainingBlockInfo):
2678         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock):
2679         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::block):
2680         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::cache):
2681         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::hasFloatsOrFlowThreads):
2682         (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
2683
2684 2015-06-17  Joanmarie Diggs  <jdiggs@igalia.com>
2685
2686         AX: [ATK] Expose element tag name as an object attribute
2687         https://bugs.webkit.org/show_bug.cgi?id=146062
2688
2689         Reviewed by Mario Sanchez Prada.
2690
2691         Expose the element tag name as an object attribute with name "tag" and
2692         value being the lowercase tag name, both being what Gecko does for ATK.
2693
2694         No new tests. We already have sufficient coverage for AtkObject attributes.
2695         These tests have been updated to reflect the addition of the new attribute.
2696
2697         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2698         (webkitAccessibleGetAttributes):
2699
2700 2015-06-17  Antti Koivisto  <antti@apple.com>
2701
2702         iOS WebKit1: [LegacyTileLayer drawInContext:] should ensure it has web lock
2703         https://bugs.webkit.org/show_bug.cgi?id=146072
2704         rdar://problem/21149759
2705
2706         Reviewed by Simon Fraser
2707
2708         There are some scenarios where we end up drawing without web lock due to client or system issues.
2709         This can cause crashes.
2710
2711         * platform/ios/LegacyTileLayer.mm:
2712         (-[LegacyTileLayer setNeedsDisplayInRect:]):
2713         (-[LegacyTileLayer drawInContext:]):
2714
2715             Ensure we have the web lock when called in main thread (even though we should have it already).
2716
2717 2015-06-17  Brent Fulgham  <bfulgham@apple.com>
2718
2719         CSS scroll snap: defining snap points on axis that does not scroll does not work properly
2720         https://bugs.webkit.org/show_bug.cgi?id=146043
2721         <rdar://problem/20125511>
2722
2723         Reviewed by Simon Fraser.
2724
2725         Tested by css3/scroll-snap/scroll-snap-mismatch.html
2726
2727         We always seed the set of scroll snap points with the start and end of the scroll container. This is not
2728         the right behavior if there are no scroll points defined, because we end up creating a snap for the start
2729         and end of the container, and any scroll gesture just takes us across the entire element.
2730         
2731         Instead, when we do not find any scroll snap points, we should clear the snap point state for the container.
2732
2733         * page/scrolling/AxisScrollSnapOffsets.cpp:
2734         (WebCore::updateFromStyle): If we did not find any snap points (i.e., the snapOffsets container
2735         only holds '0', return an empty Vector. 
2736         (WebCore::updateSnapOffsetsForScrollableArea): If the set of snap points produced by 'updateFromStyle' is empty,
2737         clear the horizontal (or vertical) snap offsets for the scroll area.
2738         
2739
2740 2015-06-17  Chris Fleizach  <cfleizach@apple.com>
2741
2742         AX: input role="spinbutton" gets skipped in voiceover
2743         https://bugs.webkit.org/show_bug.cgi?id=145514
2744
2745         Reviewed by Mario Sanchez Prada.
2746
2747         SpinButton role was added, but left out of iOS.
2748         To prevent this from happening again, explicitly list every role in the switch statement that
2749         determines accessible visibility.
2750
2751         Test: platform/ios-simulator/accessibility/spinbutton.html
2752
2753         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2754         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
2755         (-[WebAccessibilityObjectWrapper isAccessibilityElement]):
2756
2757 2015-06-17  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2758
2759         [Streams API] ReadableJSStream should handle promises returned by JS source pull callback
2760         https://bugs.webkit.org/show_bug.cgi?id=145965
2761
2762         Reviewed by Darin Adler.
2763
2764         Implemented asynchronous pulling.
2765         In particular, ensuring that doPull is not called as long as previous call to doPull is finished.
2766         Storing whether to pull automatically when the current pull is finished. 
2767
2768         Covered by rebased tests.
2769
2770         * Modules/streams/ReadableStream.cpp:
2771         (WebCore::ReadableStream::pull): stores whether to pull again.
2772         (WebCore::ReadableStream::finishPulling): called when pulling finishes.
2773         * Modules/streams/ReadableStream.h:
2774         * bindings/js/ReadableJSStream.cpp:
2775         (WebCore::createPullResultFulfilledFunction): The promise resolve callback.
2776         (WebCore::ReadableJSStream::doPull): Handling of promise.
2777         * bindings/js/ReadableJSStream.h:
2778
2779 2015-06-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2780
2781         WebProcess crashes after too many redirect error when there's an active NPAPI plugin
2782         https://bugs.webkit.org/show_bug.cgi?id=146019
2783
2784         Reviewed by Darin Adler.
2785
2786         This happens with the GTK+ port after a navigation action ends up
2787         in an infinite redirection and the ResourceHandle fails with too
2788         many redirections error. I should actually happen after any error
2789         is reported by the ResourceHnalder before the load is
2790         committed. But tt only happens if there's an active NPAPI
2791         plugin. The problem is that FrameLoader::receivedMainResourceError()
2792         is called recursively because DocumentLoader::stopLoading() ends up
2793         calling mainReceivedError() that calls FrameLoader::receivedMainResourceError()
2794         again. DocumentLoader::stopLoading() checks if the document is
2795         still loading, which can happen if the main resource is loading,
2796         if there's any subresource loading or if there's a plugin
2797         loading. So, in case of being loading, those cases are handled
2798         individually to cancel the main resource, or set an error in the
2799         document loader and cancel subresources and plugins, except for
2800         this case of plugins, that mainReceivedError is called instead of
2801         setting cancelled error on the document loader.
2802
2803         * loader/DocumentLoader.cpp:
2804         (WebCore::DocumentLoader::stopLoading): If the document is still
2805         loading because there are active plugins, set the cancelled error
2806         on the document instead of calling mainReceivedError again.
2807
2808 2015-06-16  Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>
2809
2810         [Streams API] Implement ReadableStream locked property
2811         https://bugs.webkit.org/show_bug.cgi?id=146023
2812
2813         Reviewed by Darin Adler.
2814
2815         Covered by rebased tests.
2816
2817         * Modules/streams/ReadableStream.h:
2818         (WebCore::ReadableStream::locked): Renamed isLocked by locked.
2819         * Modules/streams/ReadableStream.idl: Adding locked.
2820         * bindings/js/JSReadableStreamCustom.cpp:
2821         (WebCore::JSReadableStream::getReader): Using isLocked.
2822         * bindings/js/JSReadableStreamReaderCustom.cpp:
2823         (WebCore::constructJSReadableStreamReader): Using isLocked.
2824
2825 2015-06-16  Myles C. Maxfield  <mmaxfield@apple.com>
2826
2827         REGRESSION(r184899): [Cocoa] font-variant: small-caps is not honored with web fonts
2828         https://bugs.webkit.org/show_bug.cgi?id=145873
2829         <rdar://problem/21314282>
2830
2831         Reviewed by Dean Jackson.
2832
2833         When font-variant: small-caps is applied, we create a smaller version of the original font
2834         and draw capital characters in that smaller font. CGFontRefs do not have an intrinsic size,
2835         and web fonts historically only had a CGFontRef, which means that there was no need to
2836         convert the CGFontRef to be smaller (as opposed to regular fonts, which had a CTFontRef and
2837         therefore needed the conversion). Instead, we just changed m_size, which represents
2838         the size that the text should be drawn in.
2839
2840         However, r184899 gave CTFontRefs to web fonts. This means that now the FontPlatformData's
2841         m_size variable disagreed with the CTFontRef member. The solution here is to unify the web
2842         font and regular font codepaths, and treat them the same throughout.
2843
2844         Note that this patch removes the last use of the m_isCustomFont variable. As soon as we
2845         entirely migrate to CORETEXT_WEB_FONTS, we should delete this variable.
2846
2847         Test: fast/text/small-caps-web-font.html
2848
2849         * platform/graphics/cocoa/FontCocoa.mm:
2850         (WebCore::Font::platformCreateScaledFont): Treat web fonts the same as regular fonts.
2851         * platform/text/TextFlags.h: Add a comment regarding teh deletion of m_isCustomFont.
2852
2853 2015-06-16  Alex Christensen  <achristensen@webkit.org>
2854
2855         [Content Extensions] Implement branch compaction for DFA bytecode.
2856         https://bugs.webkit.org/show_bug.cgi?id=145619
2857
2858         Reviewed by Benjamin Poulain.
2859
2860         This patch adds another pass to the DFABytecodeCompiler which finds where the bytecode from each node
2861         would be if it were compiled with no branch compaction, then uses that as a worst-case value to determine
2862         how many bytes are needed to store the relative jump distance.  Then when linking, it will fill in the 
2863         value as it already did, but with a variable size jump.  The jumps are also now signed distances relative to
2864         where the jump is stored.
2865
2866         This patch is covered by existing tests, which have many jumps that are near the -128/127 byte boundary,
2867         and the switch from 16-bit jumps to 32-bit jumps near the -65536/65535 byte boundary is analogous.
2868
2869         * contentextensions/ContentExtensionCompiler.cpp:
2870         (WebCore::ContentExtensions::compileRuleList):
2871         * contentextensions/DFABytecode.h:
2872         (WebCore::ContentExtensions::smallestPossibleJumpSize):
2873         (WebCore::ContentExtensions::instructionSizeWithArguments):
2874         * contentextensions/DFABytecodeCompiler.cpp:
2875         (WebCore::ContentExtensions::append):
2876         (WebCore::ContentExtensions::appendZeroes):
2877         (WebCore::ContentExtensions::setBits):
2878         (WebCore::ContentExtensions::appendActionBytecodeSize):
2879         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
2880         (WebCore::ContentExtensions::DFABytecodeCompiler::longestPossibleJump):
2881         (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
2882         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
2883         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
2884         (WebCore::ContentExtensions::DFABytecodeCompiler::emitTerminate):
2885         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
2886         (WebCore::ContentExtensions::DFABytecodeCompiler::compiledNodeMaxBytecodeSize):
2887         (WebCore::ContentExtensions::DFABytecodeCompiler::ranges):
2888         (WebCore::ContentExtensions::DFABytecodeCompiler::checkForRangeMaxBytecodeSize):
2889         (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
2890         (WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize):
2891         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
2892         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
2893         (WebCore::ContentExtensions::set32Bits): Deleted.
2894         * contentextensions/DFABytecodeCompiler.h:
2895         * contentextensions/DFABytecodeInterpreter.cpp:
2896         (WebCore::ContentExtensions::getBits):
2897         (WebCore::ContentExtensions::getInstruction):
2898         (WebCore::ContentExtensions::jumpSizeInBytes):
2899         (WebCore::ContentExtensions::getJumpSize):
2900         (WebCore::ContentExtensions::getJumpDistance):
2901         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
2902         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
2903         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
2904         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2905         * loader/ResourceLoadInfo.h:
2906
2907 2015-06-16  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2908
2909         [GTK] [Wayland] Should be possible to build with support for both X11 and Wayland.
2910         https://bugs.webkit.org/show_bug.cgi?id=145701
2911
2912         Reviewed by Darin Adler.
2913
2914         No new tests, no behavior changes.
2915
2916         When building both targets, we have to include the wayland-egl
2917         headers in order to build the Wayland target. This causes that
2918         EGLNativePixmapType and EGLNativeWindowType get defined as
2919         different types than when building only the X11 target.
2920
2921         By type casting them to the ones that are expected, we are able
2922         to build both targets at the same time.
2923
2924         I have done tests (building each target alone as also both targets
2925         at the same time), and everything seems to works as expected.
2926
2927         Once built for both targets, if you try to launch the MiniBrowser
2928         from inside a Wayland compositor (Weston on top of X for example),
2929         it will trigger the X11 target if the DISPLAY environment variable
2930         is set and the environment variable GDK_BACKEND is not set to wayland,
2931         otherwise it will trigger the Wayland target.
2932
2933         * platform/graphics/GLContext.cpp:
2934         (WebCore::GLContext::createContextForWindow): Add type casts. We have
2935         to consider here two different type casts depending on the type of
2936         GLNativeWindowType to avoid a build failure on 32-bits platforms.
2937         The static_cast one was already beeing done as an implicit cast
2938         (from uint64_t to XID), the reinterpret_cast is the new one that
2939         we need to do only when building on both platforms.
2940         * platform/graphics/egl/GLContextEGL.cpp: Add missing include when
2941         building both targets that is required for defining DefaultRootWindow().
2942         (WebCore::GLContextEGL::createPixmapContext): Add type cast.
2943
2944 2015-06-15  Jon Honeycutt  <jhoneycutt@apple.com>
2945
2946         [iOS] Crash long pressing on <input type=file>
2947         https://bugs.webkit.org/show_bug.cgi?id=146009
2948         <rdar://problem/21234453>
2949
2950         Reviewed by Ryosuke Niwa.
2951
2952         * dom/Position.cpp:
2953         (WebCore::Position::atStartOfTree):
2954         (WebCore::Position::atEndOfTree):
2955         Null check the container node before passing it to findParent().
2956
2957 2015-06-15  Chris Fleizach  <cfleizach@apple.com>
2958
2959         AX:  iOS accessibility tests are not running because we need WKTR support
2960         https://bugs.webkit.org/show_bug.cgi?id=145991
2961
2962         Reviewed by Daniel Bates.
2963
2964         Make some minor modifications to support notification handling in WKTR.
2965
2966         * accessibility/ios/AXObjectCacheIOS.mm:
2967         (WebCore::AXObjectCache::postPlatformNotification):
2968         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2969         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2970         (-[WebAccessibilityObjectWrapper accessibilityClickPoint]):
2971         (-[WebAccessibilityObjectWrapper description]):
2972         (-[WebAccessibilityObjectWrapper accessibilitySetPostedNotificationCallback:withContext:]): Deleted.
2973         (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]): Deleted.
2974
2975 2015-06-16  Mark Lam  <mark.lam@apple.com>
2976
2977         Use NakedPtr<Exception>& to return exception results.
2978         https://bugs.webkit.org/show_bug.cgi?id=145870
2979
2980         Reviewed by Anders Carlsson and Filip Pizlo.
2981
2982         No new WebCore tests because this functionality is already covered by existing tests.
2983         API tests added for WTF::NakedPtr.
2984
2985         * bindings/js/JSCallbackData.cpp:
2986         (WebCore::JSCallbackData::invokeCallback):
2987         * bindings/js/JSCustomXPathNSResolver.cpp:
2988         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2989         * bindings/js/JSErrorHandler.cpp:
2990         (WebCore::JSErrorHandler::handleEvent):
2991         * bindings/js/JSEventListener.cpp:
2992         (WebCore::JSEventListener::handleEvent):
2993         * bindings/js/JSMainThreadExecState.cpp:
2994         (WebCore::JSMainThreadExecState::didLeaveScriptContext):
2995         (WebCore::functionCallHandlerFromAnyThread):
2996         (WebCore::evaluateHandlerFromAnyThread):
2997         * bindings/js/JSMainThreadExecState.h:
2998         (WebCore::JSMainThreadExecState::currentState):
2999         (WebCore::JSMainThreadExecState::call):
3000         (WebCore::JSMainThreadExecState::evaluate):
3001         * bindings/js/JSMutationCallback.cpp:
3002         (WebCore::JSMutationCallback::call):
3003         * bindings/js/ScheduledAction.cpp:
3004         (WebCore::ScheduledAction::executeFunctionInContext):
3005         * bindings/js/ScriptController.cpp:
3006         (WebCore::ScriptController::evaluateInWorld):
3007         * bindings/js/WorkerScriptController.cpp:
3008         (WebCore::WorkerScriptController::evaluate):
3009         (WebCore::WorkerScriptController::setException):
3010         * bindings/js/WorkerScriptController.h:
3011         (WebCore::WorkerScriptController::workerGlobalScopeWrapper):
3012         * bindings/objc/WebScriptObject.mm:
3013         (-[WebScriptObject callWebScriptMethod:withArguments:]):
3014         * workers/WorkerGlobalScope.cpp:
3015         (WebCore::WorkerGlobalScope::importScripts):
3016
3017 2015-06-16  Brent Fulgham  <bfulgham@apple.com>
3018
3019         CSS Scroll Snap - support snapping to nested elements
3020         https://bugs.webkit.org/show_bug.cgi?id=145843
3021         <rdar://problem/21339581>
3022
3023         Reviewed by Darin Adler.
3024
3025         Tested by css3/scroll-snap/nested-elements.html
3026
3027         The Scroll Snap Point implementation was not properly handling nested elements.
3028         This could be resolved by recursively calling 'appendChildSnapOffsets', but this
3029         seemed like an inefficient approach, especially considering how often this method
3030         is called during various scaling and other operations.
3031         
3032         Instead, do the following:
3033         (1) Add a new HashSet to RenderView that holds a collection of RenderElements that
3034             have scroll-snap-coordinates.
3035         (2) During RenderElement::styleWillChange, register all elements that have the
3036             scroll-snap-coordinates style with the RenderView.
3037         (3) When performing 'appendChildSnapOffsets', refer to the HashSet of elements, select the
3038             subset of these entries relevant to the current scrolling container, and build up the
3039             set of scroll-snap-coordinates needed for the current scrolling container.
3040
3041         * page/scrolling/AxisScrollSnapOffsets.cpp:
3042         (WebCore::appendChildSnapOffsets): Check the scroll-snap-coordinate RenderElement HashSet
3043         for the RenderView to find all elements that are children of the current scrolling container.
3044         Add the scroll-snap-coordinates for these RenderElements to the current set of snap points.
3045         * rendering/RenderElement.cpp:
3046         (WebCore::findEnclosingScrollableContainer): New helper function.
3047         (WebCore::RenderElement::styleWillChange): If the current element has scroll-snap-coordinate
3048         defined, remember it for later so we can use it with the relevant scrolling container
3049         after layout completes.
3050         (WebCore::RenderElement::willBeRemovedFromTree): Unregister the current element from the
3051         RenderView.
3052         (WebCore::RenderElement::findEnclosingScrollableContainer): Added. Locate the relevant
3053         scrolling container for the current object.
3054         * rendering/RenderElement.h:
3055         * rendering/RenderView.cpp:
3056         (WebCore::Document::registerRenderElementWithScrollSnapCoordinates): Added.
3057         (WebCore::Document::unregisterRenderElementWithScrollSnapCoordinates): Added.
3058         * rendering/RenderView.h:
3059
3060 2015-06-16  Brady Eidson  <beidson@apple.com>
3061
3062         [IndexedDB] array index keys are concatenated across cursor lifetime
3063         <rdar://problem/19684902> and https://bugs.webkit.org/show_bug.cgi?id=138504
3064
3065         Reviewed by Brady Eidson, patch by Mark Dixon <mark@lowla.io>
3066
3067         Tested by:
3068         storage/indexeddb/keypath-arrays.html
3069
3070         IDBKeyData and IDBKeyPath need to clear any existing array values before calling
3071         decodeObjects to update the value of an existing object.
3072         
3073         * Modules/indexeddb/IDBKeyData.cpp:
3074         (WebCore::IDBKeyData::decode):
3075         * Modules/indexeddb/IDBKeyPath.cpp:
3076         (WebCore::IDBKeyPath::decode):
3077
3078 2015-06-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
3079
3080         Canvas dimensions should be limited to 4096x4096 pixels on iOS devices.
3081         https://bugs.webkit.org/show_bug.cgi?id=145998
3082
3083         Reviewed by Darin Adler.
3084
3085         The value of MaxCanvasArea should depend on the platform. If the platform
3086         is iOS, the limit should be 64M. Otherwise the limit should be 1G.
3087
3088         Test: fast/canvas/pattern-too-large-to-create-2.html
3089
3090         * html/HTMLCanvasElement.cpp: Change MaxCanvasArea value based on the platform. 
3091         
3092         * rendering/svg/RenderSVGShape.h:
3093         (WebCore::RenderSVGShape::graphicsElement): Remove un-implemented constructor.
3094
3095 2015-06-16  Chris Dumez  <cdumez@apple.com>
3096
3097         REGRESSION(r185012): chat frame in Gmail now says "Something's not right"
3098         https://bugs.webkit.org/show_bug.cgi?id=146025
3099         <rdar://problem/21391412>
3100
3101         Reviewed by Darin Adler.
3102
3103         Only throttle timers in non-visible iframes once they've reached the
3104         max nesting level to avoid throttling critical one-shot timers. This is
3105         consistent with the default DOMTimer throttling behavior that is
3106         defined in the specification.
3107
3108         Power-wise, we are mostly interested in DOMTimers that fire frequently
3109         and cause high CPU usage over an extended period of time anyway.
3110
3111         * dom/Document.cpp:
3112         (WebCore::Document::setTimerThrottlingEnabled):
3113         (WebCore::Document::timerAlignmentInterval):
3114         * dom/Document.h:
3115         * dom/ScriptExecutionContext.cpp:
3116         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
3117         * dom/ScriptExecutionContext.h:
3118         * page/DOMTimer.cpp:
3119         (WebCore::DOMTimer::alignedFireTime):
3120
3121 2015-06-16  sylvain-galineau  <galineau@adobe.com>
3122
3123         Incorrect order of arguments in initial-letter property
3124         https://bugs.webkit.org/show_bug.cgi?id=139667
3125
3126         Reviewed by Sam Weinig.
3127
3128         The CSS specification swapped the order of the initial-letters numeric values.
3129         The drop cap's height now comes first, followed by its optional vertical position.
3130         See http://www.w3.org/TR/css-inline/#sizing-drop-initials.
3131          
3132         No new tests. Existing tests updated.
3133
3134         * css/CSSParser.cpp:
3135         (WebCore::CSSParser::parseValue): swap arguments to reflect new spec order.
3136
3137 2015-06-16  Alex Christensen  <achristensen@webkit.org>
3138
3139         Remove some unused values.
3140         https://bugs.webkit.org/show_bug.cgi?id=145997
3141
3142         Reviewed by Gyuyoung Kim.
3143
3144         This patch should have no change in behavior.
3145
3146         * accessibility/AccessibilityObject.cpp:
3147         (WebCore::computeBestScrollOffset):
3148         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
3149         (WebCore::AccessibilityObject::scrollToGlobalPoint):
3150         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3151         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3152         * html/canvas/WebGL2RenderingContext.cpp:
3153         (WebCore::WebGL2RenderingContext::validateTexFuncData):
3154         * html/canvas/WebGLRenderingContext.cpp:
3155         (WebCore::WebGLRenderingContext::validateTexFuncData):
3156         * platform/graphics/StringTruncator.cpp:
3157         (WebCore::leftTruncateToBuffer):
3158         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3159         (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
3160         * rendering/InlineTextBox.cpp:
3161         (WebCore::InlineTextBox::localSelectionRect):
3162         * rendering/RenderElement.cpp:
3163         (WebCore::RenderElement::anchorRect):
3164         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3165         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
3166         * rendering/svg/SVGTextQuery.cpp:
3167         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
3168         Remove unused values.
3169
3170 2015-06-16  Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>
3171
3172         [Streams API] Calling controller.error() should trigger storing an undefined error
3173         https://bugs.webkit.org/show_bug.cgi?id=145976
3174
3175         Reviewed by Darin Adler.
3176
3177         Covered by rebased test.
3178
3179         * bindings/js/JSReadableStreamControllerCustom.cpp:
3180         (WebCore::JSReadableStreamController::error): Storing undefined if no error value passed.
3181         * bindings/js/ReadableJSStream.cpp: Removed storeError(ExecState*).
3182         (WebCore::ReadableJSStream::ReadableJSStream):
3183
3184 2015-06-16  Chris Dumez  <cdumez@apple.com>
3185
3186         Purge StyledElement's presentation attribute cache on memory pressure
3187         https://bugs.webkit.org/show_bug.cgi?id=145999
3188         <rdar://problem/21359252>
3189
3190         Reviewed by Andreas Kling.
3191
3192         Purge StyledElement's presentation attribute cache on memory pressure.
3193
3194         * dom/StyledElement.cpp:
3195         (WebCore::presentationAttributeCache):
3196         (WebCore::presentationAttributeCacheCleaner):
3197         (WebCore::StyledElement::clearPresentationAttributeCache):
3198         * dom/StyledElement.h:
3199         * platform/MemoryPressureHandler.cpp:
3200         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
3201
3202 2015-06-15  Brent Fulgham  <bfulgham@apple.com>
3203
3204         REGRESSION(r175251, Mavericks Only): Playback may stall
3205         https://bugs.webkit.org/show_bug.cgi?id=145989
3206         <rdar://problem/21271919>
3207
3208         Unreviewed post-review correction.
3209
3210         Dave Kilzer pointed out that the macro around the waitForVideoOutputMediaDataWillChange
3211         call was incorrect. This patch corrects this error.
3212
3213         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3214         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Correct the
3215         macro definition.
3216
3217 2015-06-15  Chris Fleizach  <cfleizach@apple.com>
3218
3219         AX: Changing state of radio buttons causes VoiceOver to go busy for a short time.
3220         https://bugs.webkit.org/show_bug.cgi?id=145933
3221
3222         Reviewed by Dean Jackson.
3223
3224         When radio buttons animate the new focus selection state, the thread activity looks a lot like short burst of
3225         activity to draw, then wait on CoreAnimation to apply those changes.
3226
3227         Since those periods of activity during animation are so short, VoiceOver is not able to query for all the
3228         attributes it needs, and gets stuck in the queue behind rendering.
3229
3230         The fix here is to turn off button state animations while VoiceOver is running.
3231
3232         * platform/mac/ThemeMac.mm:
3233         (WebCore::updateStates):
3234
3235 2015-06-15  Zalan Bujtas  <zalan@apple.com>
3236
3237         RootInlineBox::m_lineBreakObj becomes invalid when a child renderer is removed and the line does not get marked dirty.
3238         https://bugs.webkit.org/show_bug.cgi?id=145988
3239         rdar://problem/20959137
3240
3241         Reviewed by David Hyatt.
3242
3243         This patch ensures that we find the right first inline box so that we can dirty the
3244         the appropriate line boxes.
3245         With marking the right line boxes dirty, now we can update RootInlineBox::m_lineBreakObj at the next layout.
3246
3247         Test: fast/inline/crash-when-child-renderer-is-removed-and-line-stays-clean.html
3248
3249         * rendering/RenderInline.cpp:
3250         (WebCore::RenderInline::culledInlineFirstLineBox):
3251         (WebCore::RenderInline::culledInlineLastLineBox):
3252         * rendering/RootInlineBox.cpp:
3253         (WebCore::RootInlineBox::setLineBreakInfo): Deleted. Remove misleading assert and comment.
3254
3255 2015-06-15  Matt Rajca  <mrajca@apple.com>
3256
3257         Media Session: Improve the safety of playback toggling
3258         https://bugs.webkit.org/show_bug.cgi?id=145986
3259
3260         Reviewed by Darin Adler.
3261
3262         * Modules/mediasession/MediaSession.cpp:
3263         (WebCore::MediaSession::togglePlayback): Improved the safety of the loop so that we don't re-visit elements that
3264           may have been deleted underneath us.
3265         * Modules/mediasession/MediaSession.h: Added a pointer to the set of iterated active participating elements so
3266           we can remove any elements that are deleted from the underlying "real" set.
3267
3268 2015-06-15  Brent Fulgham  <bfulgham@apple.com>
3269
3270         REGRESSION(r175251, Mavericks Only): Playback may stall
3271         https://bugs.webkit.org/show_bug.cgi?id=145989
3272         <rdar://problem/21271919>
3273
3274         Reviewed by Dean Jackson.
3275
3276         Revert r175251 for Mavericks build targets.
3277
3278         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3279         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
3280         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
3281         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
3282
3283 2015-06-15  Darin Adler  <darin@apple.com>
3284
3285         REGRESSION (r182215): Reproducible crash at drawsvg.org due to reentrant layout
3286         https://bugs.webkit.org/show_bug.cgi?id=145964
3287
3288         Reviewed by Simon Fraser.
3289
3290         Test: svg/as-object/mutate-on-load.html
3291
3292         * page/FrameView.cpp:
3293         (WebCore::FrameView::forceLayoutParentViewIfNeeded): Don't do a synchronous layout here,
3294         because it can lead indirectly to unwanted layout reentrancy. Instead schedule a layout.
3295
3296 2015-06-15  Matt Rajca  <mrajca@apple.com>
3297
3298         Media Session: Active participating elements can change while being iterated 
3299         https://bugs.webkit.org/show_bug.cgi?id=145978
3300
3301         Reviewed by Alex Christensen.
3302
3303         * Modules/mediasession/MediaSession.cpp:
3304         (WebCore::MediaSession::togglePlayback): Iterate through a copy of m_activeParticipatingElements since its contents
3305           can be modified in the loop.
3306
3307 2015-06-15  Chris Fleizach  <cfleizach@apple.com>
3308
3309         AX: no accessibility support for details element
3310         https://bugs.webkit.org/show_bug.cgi?id=131111
3311
3312         Reviewed by Darin Adler.
3313
3314         Add accessibility support for Mac for details element by:
3315            1) Returning new subroles for <details> and <summary>
3316            2) Exposing isExpanded property for <details> element.
3317
3318         Test: platform/mac/accessibility/details-summary.html
3319
3320         * accessibility/AccessibilityObject.cpp:
3321         (WebCore::AccessibilityObject::supportsARIAPressed):
3322         (WebCore::AccessibilityObject::supportsExpanded):
3323         (WebCore::AccessibilityObject::isExpanded):
3324         (WebCore::AccessibilityObject::supportsARIAExpanded): Deleted.
3325         * accessibility/AccessibilityObject.h:
3326         (WebCore::AccessibilityObject::canvasHasFallbackContent):
3327         * accessibility/AccessibilityRenderObject.cpp:
3328         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3329         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3330         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3331         (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
3332         (-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):
3333         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3334         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
3335         (createAccessibilityRoleMap):
3336         (-[WebAccessibilityObjectWrapper subrole]):
3337         * html/HTMLDetailsElement.h:
3338         * inspector/InspectorDOMAgent.cpp:
3339         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
3340
3341 2015-06-15  Alex Christensen  <achristensen@webkit.org>
3342
3343         [Content Extensions] Limit number of rules.
3344         https://bugs.webkit.org/show_bug.cgi?id=145663
3345
3346         Reviewed by Benjamin Poulain.
3347
3348         Added an API test to make sure that parsing fails when there are too many rules.
3349
3350         * contentextensions/ContentExtensionError.cpp:
3351         (WebCore::ContentExtensions::contentExtensionErrorCategory):
3352         * contentextensions/ContentExtensionError.h:
3353         * contentextensions/ContentExtensionParser.cpp:
3354         (WebCore::ContentExtensions::loadEncodedRules):
3355         Fail to parse a content extension with more than 50000 rules.
3356
3357 2015-06-12  Alexey Proskuryakov  <ap@apple.com>
3358
3359         -[WKWebView evaluateJavaScript] provides a misleading error when the return cannot be serialized
3360         https://bugs.webkit.org/show_bug.cgi?id=145900
3361
3362         Reviewed by Sam Weinig.
3363
3364         * English.lproj/Localizable.strings:
3365
3366 2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>
3367
3368         [SOUP] Custom URI schemes don't work for requests containing a fragment identifier
3369         https://bugs.webkit.org/show_bug.cgi?id=145969
3370
3371         Reviewed by Sergio Villar Senin.
3372
3373         For URIs like foo:bar#baz, what the custom protocol manager
3374         receives in the UI process is foo:bar, so the user can't handle fragments.
3375
3376         * platform/network/soup/ResourceRequestSoup.cpp:
3377         (WebCore::ResourceRequest::updateSoupRequest): If the SoupRequest
3378         is a WebKitSoupRequestGeneric, call
3379         webkitSoupRequestGenericSetRequest with the ResourceRequest.
3380         * platform/network/soup/WebKitSoupRequestGeneric.cpp:
3381         (webkitSoupRequestGenericSetRequest):
3382         (webkitSoupRequestGenericGetRequest):
3383         * platform/network/soup/WebKitSoupRequestGeneric.h:
3384
3385 2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>
3386
3387         [SOUP] Move WebKitSoupRequestGeneric to platform layer
3388         https://bugs.webkit.org/show_bug.cgi?id=145968
3389
3390         Reviewed by Sergio Villar Senin.
3391
3392         * PlatformEfl.cmake:
3393         * PlatformGTK.cmake:
3394         * platform/network/soup/WebKitSoupRequestGeneric.cpp: Renamed from Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp.
3395         (webkitSoupRequestGenericFinalize):
3396         (webkit_soup_request_generic_init):
3397         (webkitSoupRequestGenericSendAsync):
3398         (webkitSoupRequestGenericSendFinish):
3399         (webkitSoupRequestGenericGetContentLength):
3400         (webkitSoupRequestGenericGetContentType):
3401         (webkit_soup_request_generic_class_init):
3402         (webkitSoupRequestGenericSetContentLength):
3403         (webkitSoupRequestGenericSetContentType):
3404         * platform/network/soup/WebKitSoupRequestGeneric.h: Renamed from Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.h.