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