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