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