r184718 and r184725 caused four tests to begin crashing
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-05-21  Jake Nielsen  <jacob_nielsen@apple.com>
2
3         r184718 and r184725 caused four tests to begin crashing
4
5         Unreviewed rollback.
6
7         Tests that started crashing:
8
9         svg/carto.net/textbox.svg svg/custom/tref-clone-crash.html svg/custom/use-animation-in-fill.html svg/custom/use-multiple-on-nested-disallowed-font.html
10
11         * svg/SVGAnimateElementBase.cpp:
12         (WebCore::propertyTypesAreConsistent):
13         * svg/SVGAnimatedPath.cpp:
14         (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
15         * svg/SVGAnimatedTypeAnimator.h:
16         (WebCore::SVGAnimatedTypeAnimator::executeAction):
17         * svg/SVGAnimationElement.cpp:
18         (WebCore::SVGAnimationElement::parseAttribute):
19         * svg/SVGCursorElement.cpp:
20         (WebCore::SVGCursorElement::~SVGCursorElement):
21         (WebCore::SVGCursorElement::isSupportedAttribute):
22         * svg/SVGDocumentExtensions.cpp:
23         (WebCore::SVGDocumentExtensions::pauseAnimations):
24         (WebCore::SVGDocumentExtensions::unpauseAnimations):
25         (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
26         (WebCore::SVGDocumentExtensions::isElementWithPendingResources):
27         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
28         (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement):
29         (WebCore::SVGDocumentExtensions::rebuildElements):
30         * svg/SVGElement.cpp:
31         (WebCore::populateAttributeNameToCSSPropertyIDMap):
32         (WebCore::populateAttributeNameToAnimatedPropertyTypeMap):
33         (WebCore::attributeNameToAnimatedPropertyTypeMap):
34         (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
35         (WebCore::cssPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
36         (WebCore::hasLoadListener):
37         * svg/SVGFontData.cpp:
38         (WebCore::SVGFontData::applySVGGlyphSelection):
39         * svg/SVGFontElement.cpp:
40         (WebCore::SVGFontElement::registerLigaturesInGlyphCache):
41         (WebCore::SVGKerningMap::insert):
42         (WebCore::stringMatchesUnicodeRange):
43         * svg/SVGPathByteStream.h:
44         (WebCore::SVGPathByteStream::begin):
45         (WebCore::SVGPathByteStream::end):
46         (WebCore::SVGPathByteStream::append):
47         (WebCore::SVGPathByteStream::clear):
48         (WebCore::SVGPathByteStream::isEmpty):
49         * svg/SVGPathUtilities.cpp:
50         (WebCore::appendSVGPathByteStreamFromSVGPathSeg):
51         * svg/animation/SMILTimeContainer.cpp:
52         (WebCore::SMILTimeContainer::setElapsed):
53         (WebCore::SMILTimeContainer::updateAnimations):
54         * svg/animation/SVGSMILElement.cpp:
55         (WebCore::SVGSMILElement::parseBeginOrEnd):
56         (WebCore::SVGSMILElement::connectConditions):
57         (WebCore::SVGSMILElement::disconnectConditions):
58         (WebCore::SVGSMILElement::notifyDependentsIntervalChanged):
59         (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
60         * svg/graphics/filters/SVGFilterBuilder.cpp:
61         (WebCore::SVGFilterBuilder::clearResultsRecursive):
62         * svg/graphics/filters/SVGFilterBuilder.h:
63         (WebCore::SVGFilterBuilder::addBuiltinEffects):
64         * svg/properties/SVGAnimatedProperty.cpp:
65         (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
66         * svg/properties/SVGListProperty.h:
67         (WebCore::SVGListProperty::detachListWrappersAndResize):
68         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
69         (WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles):
70
71 2015-05-21  Brent Fulgham  <bfulgham@apple.com>
72
73         Scroll-snap points needs to be updated during programmatic scrolls
74         https://bugs.webkit.org/show_bug.cgi?id=145216
75         <rdar://problem/21051039>
76
77         Reviewed by Dean Jackson.
78
79         Whenever we adjust the current scroll position, make sure we also update the current
80         active scroll snap offset index (if applicable).
81
82         * platform/ScrollAnimator.cpp:
83         (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation): Call the new 'updateActiveScrollSnapIndexForOffset'
84         method after moving to a new position.
85         (WebCore::ScrollAnimator::setCurrentPosition): Ditto.
86         (WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset): New method. Asks the scroll controller to
87         identify the closest scroll snap offset index. If it finds something relevant, update the ScrollableArea state
88         to track these new values.
89         * platform/ScrollAnimator.h:
90         * platform/cocoa/ScrollController.h:
91         (WebCore::ScrollController::activeScrollSnapIndexDidChange):
92         (WebCore::ScrollController::setScrollSnapIndexDidChange):
93         * platform/cocoa/ScrollController.mm:
94         (WebCore::ScrollController::setNearestScrollSnapIndexForAxisAndOffset): Added. Find the closest relevant scroll snap offset
95         index for the given scroll offset, and update the internal scroll snap state to reflect it.
96         (WebCore::ScrollController::setActiveScrollSnapIndicesForOffset): Given the x and y offset for a scroll,
97         set the relevant scroll snap offset indices.
98         * platform/mac/ScrollAnimatorMac.mm:
99         (WebCore::ScrollAnimatorMac::immediateScrollTo): Call the new 'updateActiveScrollSnapIndexForOffset' method
100         after moving to a new position.
101         (WebCore::ScrollAnimatorMac::immediateScrollBy): Ditto.
102
103 2015-05-21  Matt Baker  <mattbaker@apple.com>
104
105         Unreviewed build fix.
106
107         * svg/SVGAnimateElementBase.cpp:
108         (WebCore::propertyTypesAreConsistent): should be type.properties, not type.properties().
109
110 2015-05-21  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
111
112         [Streams API] Remove ReadableStreamReader closed promise internal slot
113         https://bugs.webkit.org/show_bug.cgi?id=145215
114
115         Reviewed by Darin Adler.
116
117         Using the new JSPromiseDeferred member generated by binding generator to handle closed promise attribute.
118         Removed internal slots routines previously used to ensure persistency of the promise.
119
120         Existing tests cover the changes.
121
122         * bindings/js/JSReadableStreamReaderCustom.cpp:
123         (WebCore::JSReadableStreamReader::closed):
124         (WebCore::JSReadableStreamReader::cancel): Deleted.
125         (WebCore::JSReadableStreamReader::releaseLock): Deleted.
126         * bindings/js/ReadableJSStream.cpp:
127         (WebCore::getPropertyFromObject): Deleted.
128         (WebCore::callFunction): Deleted.
129         (WebCore::ReadableJSStream::Source::create): Deleted.
130         (WebCore::ReadableJSStream::Source::Source): Deleted.
131         * bindings/js/ReadableJSStream.h:
132
133 2015-05-21  Roger Fong  <roger_fong@apple.com>
134
135         Media Controls stop updating after hovering for a few seconds.
136         https://bugs.webkit.org/show_bug.cgi?id=144770.
137         <rdar://problem/19823121>
138
139         Reviewed by Jer Noble.
140
141         * Modules/mediacontrols/mediaControlsApple.js:
142         (Controller.prototype.createBase):
143         We should never hide controls immediately as a result of mousing out of the controls.
144         It should only happen when the mouse leaves the video entirely.
145         (Controller.prototype.updateTimelineMetricsIfNeeded):
146         Don’t update if controls are hidden, timeline dimensions will be 0.
147         (Controller.prototype.handlePanelTransitionEnd): 
148         Instead of adjusting visibility via adding and removing classes,
149         remove controls entirely from the tree.
150         (Controller.prototype.showControls):
151         Add controls back into the tree when showing controls.
152         (Controller.prototype.updateForShowingControls):
153         Helper method for showControls.
154         (Controller.prototype.controlsAreHidden):
155         Controls also hidden if removed from tree.
156
157         Remove forceUpdate logic, no longer necessary.
158         (Controller.prototype.handleDurationChange): 
159         (Controller.prototype.updateProgress):
160         (Controller.prototype.updateTime):
161
162         Override methods to use add and remove panelContainer for iOS.
163         * Modules/mediacontrols/mediaControlsiOS.js:
164         (ControllerIOS.prototype.handlePanelTransitionEnd):
165         (ControllerIOS.prototype.showControls):
166         (ControllerIOS.prototype.controlsAreHidden):
167
168 2015-05-21  Chris Dumez  <cdumez@apple.com>
169
170         Regression(r179293): We no longer call destroyDecodedData() on CachedResources on memory pressure
171         https://bugs.webkit.org/show_bug.cgi?id=145270
172         <rdar://problem/20734901>
173
174         Reviewed by Andreas Kling.
175
176         We no longer call destroyDecodedData() on CachedResources on memory
177         pressure after r179293. In r179293, we started calling
178         MemoryCache::evictResources() on memory pressure instead of
179         MemoryCache::pruneToPercentage(0). However, unlike
180         MemoryCache::pruneToPercentage(), it appears
181         MemoryCache::evictResources() removes the CachedResources from the
182         memory cache without calling destroyDecodedData() on them.
183         This caused a regression on Membuster.
184
185         This patch now calls MemoryCache::pruneLiveResourcesToSize(0) on
186         critical memory pressure, instead of evictResources(). We don't need to
187         call pruneDeadResourcesToSize(0) here because the non-critical memory
188         pressure handler already takes care of this.
189
190         During local testing, this change seemed to decrease the overall memory
191         usage of WebProcesses by ~10MB on Membuster (tested on Yosemite).
192
193         * platform/MemoryPressureHandler.cpp:
194         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
195         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
196
197 2015-05-21  Said Abou-Hallawa  <sabouhallawa@apple.com>
198
199         SVG as image uses very tiny default font-size
200         https://bugs.webkit.org/show_bug.cgi?id=68090
201
202         Reviewed by Darin Adler.
203
204         When loading a document, WebKit creates a Page object and then changes its setting
205         from the browser's preferences. This is true for interactive resources also, such as a
206         stand-alone SVG or an SVG embedded in an <object> tag for example. For non-interactive
207         resources, like an SVG embedded in an <img> tag for example, this function is called
208         after loading the resource is finished. This function creates an artificial page and
209         fabricates a scoped settings for it. This turns out to be problematic for cases like
210         the default font size because its initial value is zero. We cannot go from WebCore to
211         WebKit to ask for the global settings. But we can inherit the global settings from the
212         the master page. This is not the best solution because of two reasons. (1) Once the
213         resource is cached and the styles for the text elements are calculated, nothing can
214         change the values of styles except removing the resource itself from the cache if the
215         browser's preferences change. Also there is no mechanism to notify this artificial
216         page if the browser's preferences change. (2) An image like a non-interactive SVG,
217         should be displayed the same way regardless of the browser's preferences. A user may
218         be able to change the default font size for other text. But this should not affect
219         images even if they are vector images like SVG. An easy and more agreeable solution
220         is to hard-code the default font size for this case and do not depend on the global
221         settings at all.
222
223         Test: svg/text/text-default-font-size.html
224
225         * page/Settings.in: Set the initial value of the setting defaultFontSize to be 16.
226         
227 2015-05-21  Hunseop Jeong  <hs85.jeong@samsung.com>
228
229         Use modern for-loops in WebCore/svg.
230         https://bugs.webkit.org/show_bug.cgi?id=145209
231
232         Reviewed by Darin Adler.
233
234         No new tests, no new tests.
235
236         * svg/SVGAnimateElementBase.cpp:
237         (WebCore::propertyTypesAreConsistent):
238         * svg/SVGAnimatedPath.cpp:
239         (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
240         * svg/SVGAnimatedTypeAnimator.h:
241         (WebCore::SVGAnimatedTypeAnimator::executeAction):
242         * svg/SVGAnimationElement.cpp:
243         (WebCore::SVGAnimationElement::parseAttribute):
244         * svg/SVGCursorElement.cpp:
245         (WebCore::SVGCursorElement::~SVGCursorElement):
246         * svg/SVGDocumentExtensions.cpp:
247         (WebCore::SVGDocumentExtensions::pauseAnimations):
248         (WebCore::SVGDocumentExtensions::unpauseAnimations):
249         (WebCore::SVGDocumentExtensions::dispatchSVGLoadEventToOutermostSVGElements):
250         (WebCore::SVGDocumentExtensions::isElementWithPendingResources):
251         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
252         (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement):
253         * svg/SVGElement.cpp:
254         (WebCore::populateAttributeNameToCSSPropertyIDMap):
255         (WebCore::populateAttributeNameToAnimatedPropertyTypeMap):
256         (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap):
257         (WebCore::hasLoadListener):
258         * svg/SVGFontData.cpp:
259         (WebCore::SVGFontData::applySVGGlyphSelection):
260         * svg/SVGFontElement.cpp:
261         (WebCore::SVGFontElement::registerLigaturesInGlyphCache):
262         (WebCore::SVGKerningMap::insert):
263         (WebCore::stringMatchesUnicodeRange):
264         * svg/SVGPathByteStream.h:
265         (WebCore::SVGPathByteStream::append):
266         * svg/animation/SMILTimeContainer.cpp:
267         (WebCore::SMILTimeContainer::setElapsed):
268         (WebCore::SMILTimeContainer::updateAnimations):
269         * svg/animation/SVGSMILElement.cpp:
270         (WebCore::SVGSMILElement::parseBeginOrEnd):
271         (WebCore::SVGSMILElement::connectConditions):
272         (WebCore::SVGSMILElement::disconnectConditions):
273         (WebCore::SVGSMILElement::notifyDependentsIntervalChanged):
274         (WebCore::SVGSMILElement::createInstanceTimesFromSyncbase):
275         * svg/graphics/filters/SVGFilterBuilder.cpp:
276         (WebCore::SVGFilterBuilder::clearResultsRecursive):
277         * svg/graphics/filters/SVGFilterBuilder.h:
278         (WebCore::SVGFilterBuilder::addBuiltinEffects):
279         * svg/properties/SVGAnimatedProperty.cpp:
280         (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
281         * svg/properties/SVGListProperty.h:
282         (WebCore::SVGListProperty::detachListWrappersAndResize):
283         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
284         (WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles):
285
286 2015-05-21  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
287
288         Purge PassRefPtr in WebCore/Modules
289         https://bugs.webkit.org/show_bug.cgi?id=145112
290
291         Reviewed by Darin Adler.
292
293         As a step to remove PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr
294         depends on null of return value.
295
296         No new tests, no behavior changes.
297
298         * Modules/encryptedmedia/MediaKeySession.cpp:
299         (WebCore::MediaKeySession::create):
300         * Modules/encryptedmedia/MediaKeySession.h:
301         * Modules/encryptedmedia/MediaKeys.cpp:
302         (WebCore::MediaKeys::create):
303         (WebCore::MediaKeys::createSession):
304         * Modules/encryptedmedia/MediaKeys.h:
305         * Modules/gamepad/Gamepad.h:
306         * Modules/gamepad/NavigatorGamepad.cpp:
307         (WebCore::NavigatorGamepad::gamepadFromPlatformGamepad):
308         * Modules/gamepad/deprecated/Gamepad.h:
309         * Modules/geolocation/GeolocationError.h:
310         (WebCore::GeolocationError::create):
311         * Modules/geolocation/GeolocationPosition.h:
312         (WebCore::GeolocationPosition::create):
313         * Modules/geolocation/Geoposition.h:
314         (WebCore::Geoposition::create):
315         * Modules/geolocation/PositionError.h:
316         (WebCore::PositionError::create):
317         * Modules/geolocation/PositionOptions.h:
318         (WebCore::PositionOptions::create):
319         * Modules/mediacontrols/MediaControlsHost.cpp:
320         (WebCore::MediaControlsHost::create):
321         * Modules/mediacontrols/MediaControlsHost.h:
322         * Modules/mediasource/MediaSource.cpp:
323         (WebCore::MediaSource::create):
324         * Modules/mediasource/MediaSource.h:
325         * Modules/mediastream/RTCDataChannel.cpp:
326         (WebCore::RTCDataChannel::create):
327         * Modules/mediastream/RTCDataChannel.h:
328         * Modules/mediastream/RTCIceCandidate.cpp:
329         (WebCore::RTCIceCandidate::create):
330         * Modules/mediastream/RTCIceCandidate.h:
331         * Modules/webaudio/OfflineAudioContext.cpp:
332         (WebCore::OfflineAudioContext::create):
333         * Modules/webaudio/OfflineAudioContext.h:
334         * Modules/webaudio/OfflineAudioDestinationNode.h:
335         (WebCore::OfflineAudioDestinationNode::create):
336         * Modules/webaudio/OscillatorNode.cpp:
337         (WebCore::OscillatorNode::create):
338         * Modules/webaudio/OscillatorNode.h:
339         * Modules/webdatabase/Database.cpp:
340         (WebCore::Database::runTransaction):
341         * Modules/webdatabase/DatabaseTracker.cpp:
342         (WebCore::DatabaseTracker::originLockFor):
343         * Modules/webdatabase/DatabaseTracker.h:
344         * Modules/webdatabase/SQLError.h:
345         (WebCore::SQLError::create):
346         * Modules/webdatabase/SQLResultSet.h:
347         (WebCore::SQLResultSet::create):
348         * Modules/webdatabase/SQLResultSetRowList.h:
349         (WebCore::SQLResultSetRowList::create):
350         * Modules/webdatabase/SQLStatementBackend.cpp:
351         (WebCore::SQLStatementBackend::create):
352         * Modules/webdatabase/SQLStatementBackend.h:
353         * Modules/webdatabase/SQLTransactionBackend.cpp:
354         (WebCore::SQLTransactionBackend::create):
355         * Modules/webdatabase/SQLTransactionBackend.h:
356         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
357         (WebCore::ThreadableWebSocketChannelClientWrapper::create):
358         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
359         * Modules/websockets/WebSocket.cpp:
360         (WebCore::WebSocket::create):
361         * Modules/websockets/WebSocket.h:
362         * Modules/websockets/WebSocketChannel.h:
363         (WebCore::WebSocketChannel::create):
364         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
365         (WebCore::WorkerThreadableWebSocketChannel::create):
366         (WebCore::WorkerThreadableWebSocketChannel::Bridge::create):
367         * editing/InsertListCommand.h:
368         (WebCore::InsertListCommand::create):
369         * workers/Worker.cpp:
370         (WebCore::Worker::create):
371         * workers/Worker.h:
372         * xml/XPathExpression.cpp:
373         (WebCore::XPathExpression::createExpression):
374         (WebCore::XPathExpression::evaluate):
375         * xml/XPathExpression.h:
376
377 2015-05-20  Commit Queue  <commit-queue@webkit.org>
378
379         Unreviewed, rolling out r184667 and r184682.
380         https://bugs.webkit.org/show_bug.cgi?id=145245
381
382         Broke media/media-controls-timeline-updates.html on WebKit2
383         (Requested by ap on #webkit).
384
385         Reverted changesets:
386
387         "Media Controls stop updating after hovering for a few
388         seconds."
389         https://bugs.webkit.org/show_bug.cgi?id=144770
390         http://trac.webkit.org/changeset/184667
391
392         "Unreviewed. Media Controls stop updating after hovering for a
393         few seconds."
394         https://bugs.webkit.org/show_bug.cgi?id=144770
395         http://trac.webkit.org/changeset/184682
396
397 2015-05-20  Jon Lee  <jonlee@apple.com>
398
399         [iOS] Update optimized fullscreen controls artwork
400         https://bugs.webkit.org/show_bug.cgi?id=145208
401         rdar://problem/21034032
402
403         Reviewed by Jer Noble.
404
405         Update the artwork when media goes into optimized fullscreen. Add a new UI part
406         representing return-from-optimized.
407
408         * Modules/mediacontrols/MediaControlsHost.cpp:
409         (WebCore::MediaControlsHost::mediaUIImageData): Return data for the return button.
410         * Modules/mediacontrols/MediaControlsHost.idl: Add a new part ID.
411         * Modules/mediacontrols/mediaControlsApple.js: Add a new ClassName to apply to the
412         button when in the proper state.
413         * Modules/mediacontrols/mediaControlsiOS.js:
414         (ControllerIOS.prototype.handlePresentationModeChange): Add the ClassName when the
415         video goes into optimized fullscreen mode. Remove it otherwise.
416         * platform/ios/WebCoreSystemInterfaceIOS.h:
417         * rendering/RenderThemeIOS.mm:
418         (WebCore::RenderThemeIOS::mediaControlsStyleSheet): Add the return button data to the
419         stylesheet.
420
421 2015-05-20  Alex Christensen  <achristensen@webkit.org>
422
423         [ContentExtensions] Properly initialize ActionKey.state
424         https://bugs.webkit.org/show_bug.cgi?id=145237
425         rdar://problem/20716683
426
427         Reviewed by Benjamin Poulain.
428
429         * contentextensions/DFAMinimizer.cpp:
430         Initialize ActionKey.state to Valid if it is a valid ActionKey.
431         Inlining can now be done safely.
432
433 2015-05-20  Roger Fong  <roger_fong@apple.com>
434
435         Unreviewed. Media Controls stop updating after hovering for a few seconds.
436         https://bugs.webkit.org/show_bug.cgi?id=144770.
437         <rdar://problem/19823121>
438
439         Followup to r184667.
440         * Modules/mediacontrols/mediaControlsApple.js:
441         (Controller.prototype.showControls):
442         Only put controls back into the tree if they don’t yet exist in the tree.
443         Otherwise we interrupt operations like scrubbing.
444
445 2015-05-20  Enrica Casucci  <enrica@apple.com>
446
447         [iOS] Using CSS viewport units causes incorrect layout.
448         https://bugs.webkit.org/show_bug.cgi?id=145225
449         rdar://problem/20924495
450
451         Reviewed by Benjamin Poulain.
452
453         * page/ViewportConfiguration.cpp:
454         (WebCore::ViewportConfiguration::initialScaleFromSize):
455         (WebCore::ViewportConfiguration::initialScale):
456         (WebCore::ViewportConfiguration::initialScaleIgnoringContentSize):
457         * page/ViewportConfiguration.h:
458         (WebCore::ViewportConfiguration::initialScaleFromSize):
459         (WebCore::ViewportConfiguration::initialScaleIgnoringContentSize):
460
461 2015-05-20  Chris Fleizach  <cfleizach@apple.com>
462
463         AX: improve list heuristics (presentational use versus actual lists)
464         https://bugs.webkit.org/show_bug.cgi?id=134187
465
466         Reviewed by Darin Adler.
467
468         Improve heuristics for list detection by:
469             1. Not exposing lists without list markers (unless explicitly marked as lists)
470             2. Recognizing css: before-content as list markers
471
472         Test: accessibility/list-detection2.html
473
474         * accessibility/AccessibilityList.cpp:
475         (WebCore::AccessibilityList::isDescriptionList):
476         (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):
477         (WebCore::AccessibilityList::determineAccessibilityRole):
478         * accessibility/AccessibilityList.h:
479
480 2015-05-20  Antti Koivisto  <antti@apple.com>
481
482         REGRESSION (r172591): Can no longer style <optgroup> with colors (LayoutTests/fast/forms/select/optgroup-rendering.html)
483         https://bugs.webkit.org/show_bug.cgi?id=145227
484         rdar://problem/20967472
485
486         Reviewed by Darin Adler.
487
488         Test: fast/forms/select/select-painting.html
489
490         Use computedStyle() consistently for option and optgroup items.
491
492         * rendering/RenderListBox.cpp:
493         (WebCore::RenderListBox::paintItemForeground):
494         (WebCore::RenderListBox::paintItemBackground):
495
496             We can always use computedStyle() and it can't be null. If there was renderer style it would return that.
497
498         * rendering/RenderMenuList.cpp:
499         (RenderMenuList::itemStyle):
500         (RenderMenuList::getItemBackgroundColor):
501
502 2015-05-19  Jer Noble  <jer.noble@apple.com>
503
504         Touching HTMLMediaElement.h or MediaPlayer.h causes a world rebuild.
505         https://bugs.webkit.org/show_bug.cgi?id=145193
506
507         Reviewed by Eric Carlson.
508
509         HTMLMediaElement.h and MediaPlayer.h are included in a number of headers solely for access to the enums
510         defined within the classes contained within. Move these enums into their own--otherwise empty--classes.
511         Then add `using` declarations to pull those inherited enums back into the namespace of HTMLMediaElement
512         and MediaPlayer.
513
514         Classes and headers which do not need to directly include HTMLMediaElement.h can now include HTMLMediaElementEnums.h
515         instead; the same goes for MediaPlayer.h and MediaPlayerEnums.h.
516
517         * WebCore.xcodeproj/project.pbxproj: Add new files to project.
518         * html/HTMLMediaElement.cpp:
519         (WebCore::HTMLMediaElement::TrackGroup::TrackGroup): Move definition here from the header.
520         * html/HTMLMediaElement.h:
521         (WebCore::HTMLMediaElement::videoFullscreenGravity): MediaPlayer -> MediaPlayerEnums.
522         (WebCore::HTMLMediaElement::preloadValue): Ditto.
523         (WebCore::HTMLMediaElement::TrackGroup::TrackGroup): Deleted; moved to implementation file.
524         * html/HTMLMediaElementEnums.h: Added.
525         * html/MediaControllerInterface.h: Inherit from HTMLMediaElementEnums.
526         * page/ChromeClient.h: HTMLMediaElement -> HTMLMediaElementEnums.
527         * platform/graphics/MediaPlayer.h: MediaPlayer -> MediaPlayerEnums.
528         * platform/graphics/MediaPlayerEnums.h: Added.
529         * platform/ios/WebVideoFullscreenControllerAVKit.h:
530         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
531         (-[WebVideoFullscreenController enterFullscreen:mode:]): HTMLMediaElement -> HTMLMediaElementEnums.
532         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
533         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
534         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Ditto.
535         (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Ditto.
536         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Ditto.
537         (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal): Ditto.
538         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Ditto.
539         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): Ditto.
540         (WebVideoFullscreenInterfaceAVKit::mayAutomaticallyShowVideoOptimized): Ditto.
541         (WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen): Ditto.
542         (WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen): Ditto.
543         (WebVideoFullscreenInterfaceAVKit::didCancelOptimizedFullscreen): Ditto.
544         (WebVideoFullscreenInterfaceAVKit::setMode): Ditto.
545         (WebVideoFullscreenInterfaceAVKit::clearMode): Ditto.
546         * platform/ios/WebVideoFullscreenModel.h:
547         * platform/ios/WebVideoFullscreenModelVideoElement.h:
548         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
549         (WebVideoFullscreenModelVideoElement::setVideoElement): Ditto.
550         (WebVideoFullscreenModelVideoElement::fullscreenModeChanged): Ditto.
551
552 2015-05-20  Roger Fong  <roger_fong@apple.com>
553
554         Media Controls stop updating after hovering for a few seconds.
555         https://bugs.webkit.org/show_bug.cgi?id=144770.
556         <rdar://problem/19823121>
557
558         Reviewed by Jer Noble.
559
560         * Modules/mediacontrols/mediaControlsApple.js:
561         (Controller.prototype.createBase):
562         We should never hide controls immediately as a result of mousing out of the controls.
563         It should only happen when the mouse leaves the video entirely.
564         (Controller.prototype.updateTimelineMetricsIfNeeded):
565         Don’t update if controls are hidden, timeline dimensions will be 0.
566         (Controller.prototype.handlePanelTransitionEnd): 
567         Instead of adjusting visibility via adding and removing classes,
568         remove controls entirely from the tree.
569         (Controller.prototype.showControls):
570         Add controls back into the tree when showing controls.
571         (Controller.prototype.updateForShowingControls):
572         Helper method for showControls.
573         (Controller.prototype.controlsAreHidden):
574         Controls also hidden if removed from tree.
575
576         Remove forceUpdate logic, no longer necessary.
577         (Controller.prototype.handleDurationChange): 
578         (Controller.prototype.updateProgress):
579         (Controller.prototype.updateTime):
580
581         Override methods to use add and remove panelContainer for iOS.
582         * Modules/mediacontrols/mediaControlsiOS.js:
583         (ControllerIOS.prototype.handlePanelTransitionEnd):
584         (ControllerIOS.prototype.showControls):
585         (ControllerIOS.prototype.controlsAreHidden):
586
587 2015-05-20  Eric Carlson  <eric.carlson@apple.com>
588
589         [Mac] inform media session of all state changes
590         https://bugs.webkit.org/show_bug.cgi?id=145222
591
592         Reviewed by Dean Jackson.
593
594         * html/HTMLMediaElement.cpp:
595         (WebCore::HTMLMediaElement::~HTMLMediaElement): Call updateMediaState.
596         (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): Ditto.
597         (WebCore::HTMLMediaElement::mediaPlayerFirstVideoFrameAvailable): Ditto.
598         (WebCore::HTMLMediaElement::removeEventListener): Ditto.
599         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Ditto.
600
601 2015-05-20  Daniel Bates  <dabates@apple.com>
602
603         AX: AutoFill button is not accessible with VoiceOver
604         https://bugs.webkit.org/show_bug.cgi?id=145200
605         <rdar://problem/20507480>
606
607         Reviewed by Chris Fleizach.
608
609         Add ARIA label and role attributes to the AutoFill button markup so that VoiceOver
610         can identify and interact with it.
611
612         Test: accessibility/input-auto-fill-button.html
613
614         * English.lproj/Localizable.strings: Add placeholder localized string for AutoFill button.
615         * html/TextFieldInputType.cpp:
616         (WebCore::TextFieldInputType::createAutoFillButton): Add ARIA label and role attributes.
617         * platform/LocalizedStrings.cpp:
618         (WebCore::AXAutoFillButtonText): Added; returns the localized string for the AutoFill button.
619         * platform/LocalizedStrings.h:
620         * platform/efl/LocalizedStringsEfl.cpp:
621         (WebCore::AXAutoFillButtonText): Ditto.
622         * platform/gtk/LocalizedStringsGtk.cpp:
623         (WebCore::AXAutoFillButtonText): Ditto.
624
625 2015-05-20  Dean Jackson  <dino@apple.com>
626
627         Label text for default buttons don’t have the correct white color
628         https://bugs.webkit.org/show_bug.cgi?id=145221
629         <rdar://problem/20985817>
630
631         Follow-up commit. After discussion with the AppKit team, we've
632         concluded that a solid white is the color that best matches
633         the system.
634
635         * rendering/RenderThemeMac.mm:
636         (WebCore::RenderThemeMac::systemColor): Use Color::white.
637
638 2015-05-20  Dean Jackson  <dino@apple.com>
639
640         Label text for default buttons don’t have the correct white color
641         https://bugs.webkit.org/show_bug.cgi?id=145221
642         <rdar://problem/20985817>
643
644         Reviewed by Tim Horton.
645
646         Use a 85% solid white for the active text color on buttons.
647
648         As has been disappointingly pointed out in other patches, we don't
649         have a good way to test ActiveButtonText since it only applies at
650         paint time.
651
652         * rendering/RenderThemeMac.mm:
653         (WebCore::RenderThemeMac::systemColor): Move to an 85% solid white.
654
655 2015-05-20  Alexey Proskuryakov  <ap@apple.com>
656
657         ThreadableLoaderOptions::isolatedCopy() doesn't produce a copy that is safe for sending to another thread
658         https://bugs.webkit.org/show_bug.cgi?id=145217
659
660         Reviewed by Anders Carlsson.
661
662         Caught by existing tests, rarely. I don't know how to catch such bugs more reliably.
663
664         * loader/ThreadableLoader.cpp: (WebCore::ThreadableLoaderOptions::isolatedCopy):
665         * loader/ThreadableLoader.h:
666
667 2015-05-20  Tim Horton  <timothy_horton@apple.com>
668
669         Add a mechanism to opt-out of the automatic scaling applied to not-really-responsive sites
670         https://bugs.webkit.org/show_bug.cgi?id=144760
671
672         Reviewed by Darin Adler.
673
674         Add a new viewport property, shrink-to-fit, which can be used to disable
675         the automatic scaling introduced in r181400. This provides sites with a
676         way to tell WebKit that they're really sure they want to be laid out at
677         window-width/height, even if they fail to fit within that size.
678
679         * dom/ViewportArguments.cpp:
680         (WebCore::ViewportArguments::resolve):
681         (WebCore::findBooleanValue):
682         (WebCore::setViewportFeature):
683         * dom/ViewportArguments.h:
684         (WebCore::ViewportArguments::ViewportArguments):
685         (WebCore::ViewportArguments::operator==):
686         * page/ViewportConfiguration.cpp:
687         (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints):
688         (WebCore::ViewportConfiguration::shouldIgnoreVerticalScalingConstraints):
689         (WebCore::ViewportConfiguration::webpageParameters):
690         (WebCore::ViewportConfiguration::textDocumentParameters):
691         (WebCore::ViewportConfiguration::imageDocumentParameters):
692         (WebCore::ViewportConfiguration::testingParameters):
693         (WebCore::booleanViewportArgumentIsSet):
694         (WebCore::ViewportConfiguration::updateConfiguration):
695         (WebCore::ViewportConfigurationTextStream::operator<<):
696         (WebCore::viewportArgumentUserZoomIsSet): Deleted.
697         * page/ViewportConfiguration.h:
698         (WebCore::ViewportConfiguration::Parameters::Parameters):
699         Plumb the shrink-to-fit viewport property through.
700         If shrink-to-fit is set to yes, or not set, we behave as usual; if it is
701         set to no, we will bail from shouldIgnore[Horizontal|Vertical]ScalingConstraints,
702         effectively disabling the automatic scaling introduced in r181400.
703
704 2015-05-20  Antti Koivisto  <antti@apple.com>
705
706         Assertion failure in WebCore::BidiRun::BidiRun()
707         https://bugs.webkit.org/show_bug.cgi?id=145203
708         rdar://problem/20958973
709
710         Reviewed by Andreas Kling.
711
712         Test: fast/text/text-combine-crash.html
713
714         * rendering/line/BreakingContext.h:
715         (WebCore::BreakingContext::handleText):
716
717             Renove !isCombined() check. RenderCombineText::combineText() doesn't
718             do any work unless needed and text may become uncombined too.
719
720         * rendering/line/LineBreaker.cpp:
721         (WebCore::LineBreaker::skipLeadingWhitespace):
722
723             Same here.
724
725 2015-05-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
726
727         AudioContext resume/close/suspend should reject promises with a DOM exception in lieu of throwing exceptions
728         https://bugs.webkit.org/show_bug.cgi?id=145064
729
730         Reviewed by Darin Adler.
731
732         Rejecting resume/suspend/close promises with InvalidStateError values in case context is offline.
733         Removed unneeded calls to postTask for resolving/rejecting promises.
734         Adding promise rejection of DOM Exception values, 0 being equivalent of no error passed to reject callback.
735
736         Test: webaudio/audiocontext-promise-throwing.html
737
738         * Modules/webaudio/AudioContext.cpp:
739         (WebCore::AudioContext::suspendContext): Rejecting promise in lieu of throwing exception.
740         (WebCore::AudioContext::resumeContext): Ditto.
741         (WebCore::AudioContext::closeContext): Ditto.
742         * Modules/webaudio/AudioContext.h:
743         * bindings/js/JSAudioContextCustom.cpp:
744         (WebCore::JSAudioContext::suspend): Removing ExceptionCode handling.
745         (WebCore::JSAudioContext::resume): Ditto.
746         (WebCore::JSAudioContext::close): Ditto.
747         * bindings/js/JSDOMBinding.cpp:
748         (WebCore::createDOMException): Splitting DOM exception creation from throwing.
749         (WebCore::setDOMException): Ditto.
750         * bindings/js/JSDOMBinding.h: Adding createDOMException prototype.
751         * bindings/js/JSDOMPromise.h:
752         (WebCore::DeferredWrapper::reject<ExceptionCode>):
753
754 2015-05-20  Commit Queue  <commit-queue@webkit.org>
755
756         Unreviewed, rolling out r184645.
757         https://bugs.webkit.org/show_bug.cgi?id=145220
758
759         Broken build (Requested by jacob_nielsen on #webkit).
760
761         Reverted changeset:
762
763         "AX: AutoFill button is not accessible with VoiceOver"
764         https://bugs.webkit.org/show_bug.cgi?id=145200
765         http://trac.webkit.org/changeset/184645
766
767 2015-05-20  Daniel Bates  <dabates@apple.com>
768
769         AX: AutoFill button is not accessible with VoiceOver
770         https://bugs.webkit.org/show_bug.cgi?id=145200
771         <rdar://problem/20507480>
772
773         Reviewed by Chris Fleizach.
774
775         Add ARIA label and role attributes to the AutoFill button markup so that VoiceOver
776         can identify and interact with it.
777
778         Test: accessibility/input-auto-fill-button.html
779
780         * English.lproj/Localizable.strings: Add placeholder localized string for AutoFill button.
781         * html/TextFieldInputType.cpp:
782         (WebCore::TextFieldInputType::createAutoFillButton): Add ARIA label and role attributes.
783         * platform/LocalizedStrings.cpp:
784         (WebCore::AXAutoFillButtonText): Added; returns the localized string for the AutoFill button.
785         * platform/LocalizedStrings.h:
786         * platform/efl/LocalizedStringsEfl.cpp:
787         (WebCore::AXAutoFillButtonText): Ditto.
788         * platform/gtk/LocalizedStringsGtk.cpp:
789         (WebCore::AXAutoFillButtonText): Ditto.
790
791 2015-05-20  Alex Christensen  <achristensen@webkit.org>
792
793         [Content Extensions] Relax restrictions on triggers that match everything.
794         https://bugs.webkit.org/show_bug.cgi?id=145069
795
796         Reviewed by Benjamin Poulain.
797
798         Added API tests that cover the new functionality and test for correctness in behavior.
799
800         * contentextensions/CompiledContentExtension.cpp:
801         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
802         * contentextensions/ContentExtensionCompiler.cpp:
803         (WebCore::ContentExtensions::addUniversalActionsToDFA):
804         (WebCore::ContentExtensions::compileRuleList):
805         Put universalActionsWithoutDomains into the DFA from filtersWithoutDomains and
806         put universalActionsWithDomains into the DFA from filtersWithDomains.        
807         * contentextensions/ContentExtensionError.cpp:
808         (WebCore::ContentExtensions::contentExtensionErrorCategory):
809         * contentextensions/ContentExtensionError.h:
810         Remove error codes for errors that are not errors any more.
811         * contentextensions/ContentExtensionsBackend.cpp:
812         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
813         * contentextensions/ContentExtensionsBackend.h:
814         * contentextensions/DFABytecode.h:
815         (WebCore::ContentExtensions::instructionSizeWithArguments):
816         * contentextensions/DFABytecodeCompiler.cpp:
817         (WebCore::ContentExtensions::set32Bits):
818         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
819         (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
820         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
821         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
822         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
823         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
824         (WebCore::ContentExtensions::DFABytecodeCompiler::emitTestFlagsAndAppendAction): Deleted.
825         * contentextensions/DFABytecodeCompiler.h:
826         * contentextensions/DFABytecodeInterpreter.cpp:
827         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
828         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
829         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
830         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
831         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot): Deleted.
832         * contentextensions/DFABytecodeInterpreter.h:
833         Add a new bytecode AppendActionDefaultStylesheet to mark actions that are css-display-none
834         that need to be put in the default stylesheet to be ignored or not as a whole.
835         css-display-none actions with flags or domain rules and css-display-none actions 
836         after ignore-previous-rules actions are not to be in this precompiled stylesheet, but
837         they will be applied as needed per page.  The precompiled stylesheet is already applied
838         if no ignore-previous-rules action is triggered.
839         * loader/ResourceLoadInfo.h:
840
841 2015-05-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
842
843         JS binding generator should create a member variable for each Promise attribute of an interface
844         https://bugs.webkit.org/show_bug.cgi?id=145056
845
846         Reviewed by Darin Adler.
847
848         For each attribute XXX whose type is Promise, a member m_XXXPromiseDeferred is created, its type being a JSC::Strong of JSPromiseDeferred.
849         The purpose is to enable custom getters to create the JSPromiseDeferred and store ino the class member to ensure the same promise is returned each time
850         the custom getter is called.
851         This patch will enable simplifying ReadableStreamReader custom binding.
852
853         Covered by added attribute in TestObj.idl.
854
855         * bindings/scripts/CodeGeneratorJS.pm:
856         (GenerateHeader):
857         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
858         (webkit_dom_test_obj_get_property):
859         (webkit_dom_test_obj_class_init):
860         (webkit_dom_test_obj_get_test_promise_attr):
861         (webkit_dom_test_obj_set_nullable_string_value): Deleted.
862         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
863         * bindings/scripts/test/JS/JSTestObj.cpp:
864         (WebCore::jsTestObjTestPromiseAttr):
865         (WebCore::jsTestObjAttributeWithReservedEnumType): Deleted.
866         * bindings/scripts/test/JS/JSTestObj.h:
867         * bindings/scripts/test/ObjC/DOMTestObj.h:
868         * bindings/scripts/test/ObjC/DOMTestObj.mm:
869         (-[DOMTestObj testPromiseAttr]):
870         (-[DOMTestObj attribute]): Deleted.
871         * bindings/scripts/test/TestObj.idl:
872
873 2015-05-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
874
875         AudioContext suspend/resume/close should resolve promises immediately when state is already suspended/active/closed
876         https://bugs.webkit.org/show_bug.cgi?id=145164
877
878         Reviewed by Jer Noble.
879
880         Test: webaudio/audiocontext-promise.html
881
882         * Modules/webaudio/AudioContext.cpp:
883         (WebCore::AudioContext::suspendContext): Immediatly call callbacks whenever possible to resolve/reject promises.
884         (WebCore::AudioContext::resumeContext): Ditto.
885         (WebCore::AudioContext::closeContext): Ditto
886
887 2015-05-20  Carlos Garcia Campos  <cgarcia@igalia.com>
888
889         REGRESSION(r184420): [GTK] webkit_dom_html_element_get_children has been removed
890         https://bugs.webkit.org/show_bug.cgi?id=145174
891
892         Reviewed by Philippe Normand.
893
894         children property has been moved to Element, Document and
895         DocumentFragment to match the spec, so we need to expose the new
896         get_children and bring back webkit_dom_html_element_get_children()
897         as deprecated.
898
899         * bindings/gobject/WebKitDOMDeprecated.cpp:
900         (webkit_dom_html_element_get_children):
901         * bindings/gobject/WebKitDOMDeprecated.h:
902         * bindings/gobject/WebKitDOMDeprecated.symbols:
903         * bindings/gobject/webkitdom.symbols:
904
905 2015-05-20  Hunseop Jeong  <hs85.jeong@samsung.com>
906
907         nullptr cleanup in WebCore/xml.
908         https://bugs.webkit.org/show_bug.cgi?id=145165
909
910         Reviewed by Csaba Osztrogonác.
911
912         No new tests, no behavior changes
913
914         * xml/XMLHttpRequest.cpp:
915         (WebCore::XMLHttpRequest::responseXML):
916         (WebCore::XMLHttpRequest::internalAbort):
917         (WebCore::XMLHttpRequest::clearResponseBuffers):
918         (WebCore::XMLHttpRequest::clearRequest):
919         (WebCore::XMLHttpRequest::didFinishLoading):
920         * xml/XMLHttpRequestProgressEventThrottle.cpp:
921         (WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent):
922         * xml/XSLImportRule.cpp:
923         (WebCore::XSLImportRule::XSLImportRule):
924         (WebCore::XSLImportRule::~XSLImportRule):
925         (WebCore::XSLImportRule::setXSLStyleSheet):
926         (WebCore::XSLImportRule::loadSheet):
927         * xml/XSLStyleSheet.h:
928         * xml/XSLStyleSheetLibxslt.cpp:
929         (WebCore::XSLStyleSheet::XSLStyleSheet):
930         (WebCore::XSLStyleSheet::~XSLStyleSheet):
931         (WebCore::XSLStyleSheet::clearDocuments):
932         * xml/XSLTProcessorLibxslt.cpp:
933         (WebCore::saveResultToString):
934         (WebCore::xsltParamArrayFromParameterMap):
935         (WebCore::xmlDocPtrFromNode):
936         (WebCore::XSLTProcessor::transformToString):
937         * xml/parser/XMLDocumentParser.cpp:
938         (WebCore::XMLDocumentParser::clearCurrentNodeStack):
939         (WebCore::XMLDocumentParser::exitText):
940         (WebCore::XMLDocumentParser::notifyFinished):
941         * xml/parser/XMLDocumentParser.h:
942         * xml/parser/XMLDocumentParserLibxml2.cpp:
943         (WebCore::openFunc):
944         (WebCore::XMLDocumentParser::XMLDocumentParser):
945         * xml/parser/XMLDocumentParserScope.cpp:
946         * xml/parser/XMLDocumentParserScope.h:
947
948 2015-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
949
950         [SOUP] Network Cache: Implement ShareableResource for Soup and enable it for GTK platform
951         https://bugs.webkit.org/show_bug.cgi?id=144380
952
953         Reviewed by Antti Koivisto.
954
955         Add a soup implementation of SharedBuffer::tryReplaceContentsWithPlatformBuffer().
956
957         Covered by http/tests/cache/disk-cache/ tests.
958
959         * loader/cache/CachedResource.cpp: Define
960         CachedResource::tryReplaceEncodedData() also for Soup.
961         * loader/cache/CachedResource.h: Ditto.
962         * platform/soup/SharedBufferSoup.cpp:
963         (WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer):
964
965 2015-05-17  Sam Weinig  <sam@webkit.org>
966
967         Organize event handlers a bit
968         https://bugs.webkit.org/show_bug.cgi?id=145106
969
970         Reviewed by Darin Adler.
971
972         - Add GlobalEventHandlers.idl (from https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers)
973           and move all event handlers shared by Element, Document and DOMWindow there. Put all the standard defined
974           event handlers at the top (commenting out the ones that aren't implemented yet) and the non-standard ones
975           at the bottom.
976
977           There is one change in behavior here. Previously, the media related event handlers where only exposed on
978           Element and DOMWindow. The spec says they should also be on Document, so this adds support for that (this
979           is tested in fast/dom/event-handler-attributes.html).
980
981         - Add WindowEventHandlers.idl (from https://html.spec.whatwg.org/multipage/webappapis.html#windoweventhandlers)
982           and move all event handlers shared by DOMWindow, HTMLBodyElement and HTMLFrameSetElement there. Put all the 
983           standard defined event handlers at the top (commenting out the ones that aren't implemented yet) and the 
984           non-standard ones at the bottom.
985
986         - Group remaining event handlers in Element, Document, DOMWindow, HTMLBodyElement and HTMLFrameSetElement by
987           their grouping, and add some FIXMEs for future cleaning.
988
989         * CMakeLists.txt:
990         * DerivedSources.make:
991         * WebCore.xcodeproj/project.pbxproj:
992         - Add GlobalEventHandlers.idl and WindowEventHandlers.idl.
993
994         * bindings/scripts/CodeGeneratorJS.pm:
995         (GenerateImplementation):
996         Add special cases for WindowEventHandler when used on DOMWindow and DocumentEventHandler when used on Document
997         so that event handlers using those extended attributes can be set on shared interfaces. This is used to allow
998         DOMWindow to implement WindowEventHandlers.
999
1000         * dom/Document.idl:
1001         Move event handlers to GlobalEventHandlers and have Document implement it. Group remaining event handlers.
1002
1003         * dom/Element.idl:
1004         Move event handlers to GlobalEventHandlers and have Element implement it. Group remaining event handlers.
1005
1006         * dom/GlobalEventHandlers.idl:
1007         Added.
1008
1009         * html/HTMLBodyElement.idl:
1010         Move event handlers to WindowEventHandlers and have HTMLBodyElement implement it. Group remaining event handlers.
1011         
1012         * html/HTMLFrameSetElement.idl:
1013         Move event handlers to WindowEventHandlers and have HTMLFrameSetElement implement it. Group remaining event handlers.
1014
1015         * page/DOMWindow.idl:
1016         Move event handlers to GlobalEventHandlers and WindowEventHandlers and have DOMWindow implement both of them. Group 
1017         remaining event handlers.
1018
1019         * page/WindowEventHandlers.idl:
1020         Added.
1021
1022 2015-05-19  Antti Koivisto  <antti@apple.com>
1023
1024         Crash under WebCore::invalidateStyleRecursively
1025         https://bugs.webkit.org/show_bug.cgi?id=145186
1026         rdar://problem/19736838
1027
1028         Reviewed by Andreas Kling
1029
1030         We have seen crashes where we run out of stack under invalidateStyleRecursively in StyleInvalidationAnalysis
1031         on some devices.
1032
1033         Switch to iterative algorithm.
1034
1035         * css/StyleInvalidationAnalysis.cpp:
1036         (WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis):
1037         (WebCore::invalidateIfNeeded):
1038         (WebCore::invalidateStyleForTree):
1039         (WebCore::StyleInvalidationAnalysis::invalidateStyle):
1040         (WebCore::invalidateStyleRecursively): Deleted.
1041
1042 2015-05-19  Yusuke Suzuki  <utatane.tea@gmail.com>
1043
1044         Move AtomicStringImpl table related operations from AtomicString to AtomicStringImpl
1045         https://bugs.webkit.org/show_bug.cgi?id=145109
1046
1047         Reviewed by Darin Adler.
1048
1049         * dom/TreeScope.cpp:
1050         (WebCore::TreeScope::getElementById):
1051
1052 2015-05-19  Jon Lee  <jonlee@apple.com>
1053
1054         [iOS] Optimized fullscreen placeholder is incorrectly sized
1055         https://bugs.webkit.org/show_bug.cgi?id=145196
1056         rdar://problem/21031188
1057
1058         Reviewed by Dean Jackson.
1059
1060         Add a new media part UI for the placeholder text when entering optimized fullscreen,
1061         and use it as part of the title text in the placeholder. Now the wireless playback status
1062         div serves as a multi-purpose placeholder.
1063
1064         * Modules/mediacontrols/MediaControlsHost.cpp:
1065         (WebCore::MediaControlsHost::mediaUIImageData): Return the placeholder text.
1066         * Modules/mediacontrols/MediaControlsHost.idl: Add a new UI part for placeholder text.
1067         * Modules/mediacontrols/mediaControlsApple.js: Add a new "optimized" ClassName when
1068         the presentation mode is set to optimized.
1069
1070         * Modules/mediacontrols/mediaControlsiOS.css:
1071         (audio::-webkit-media-controls-wireless-playback-status): The text should be at
1072         medium weight, not light weight.
1073         (audio::-webkit-media-controls-wireless-playback-text-top): The title text should be
1074         white for both wireless playback and optimized fullscreen. It matches the style
1075         when taking a video fullscreen.
1076
1077         Add new CSS rules when the placard is used for optimized fullscreen.
1078         (audio::-webkit-media-controls-wireless-playback-status.optimized): Accommodate the
1079         size of the graphic, and position appropriately.
1080         (audio::-webkit-media-controls-wireless-playback-text-top.optimized): One line is
1081         needed, so use this one, and place it where the bottom one is since more room is
1082         needed to accommodate the graphic.
1083         (audio::-webkit-media-controls-wireless-playback-text-bottom.optimized): One line is
1084         needed, so hide this one.
1085         * Modules/mediacontrols/mediaControlsiOS.js:
1086         (ControllerIOS.prototype.createControls): Several of the container divs are already
1087         created in Controller.prototype.createControls(). Fly-by fix to avoid creation of
1088         those divs. Only the panelContainer is new for the iOS controls. Fly-by fix of a
1089         missing semicolon.
1090         (ControllerIOS.prototype.handlePresentationModeChange): When the presentation mode
1091         changes do several things:
1092             1- Update the background image. Clear the inline background image when going back
1093                to inline or in wireless playback.
1094             2- Add the "optimized" ClassName to the placeholder container, and the two text
1095                divs when entering optimized fullscreen. Remove them in other cases.
1096             3- Set -webkit-media-controls-wireless-playback-text-top to the placeholder text.
1097                This is better than embedding it inside the graphic. Clear the -bottom text.
1098         * platform/ios/WebCoreSystemInterfaceIOS.h: Add a new enum to obtain the placeholder
1099         text.
1100
1101 2015-05-19  Ryuan Choi  <ryuan.choi@navercorp.com>
1102
1103         [EFL] Use GSimpleProxyResolver instead of custom SoupProxyResolver
1104         https://bugs.webkit.org/show_bug.cgi?id=145154
1105
1106         Reviewed by Gyuyoung Kim.
1107
1108         SoupProxyResolver was deprecated since libsoup 2.42.
1109         So, this patch refactors the custom SoupProxyResolver to GSimpleProxyResolver
1110         which provides same functionality in gio.
1111
1112         No new tests, because there is not behavior change.
1113
1114         * PlatformEfl.cmake:
1115         * WebCore.vcxproj/WebCore.vcxproj:
1116         * WebCore.vcxproj/WebCore.vcxproj.filters:
1117         * platform/network/soup/ProxyResolverSoup.cpp: Removed.
1118         * platform/network/soup/ProxyResolverSoup.h: Removed.
1119         * platform/network/soup/SoupNetworkSession.cpp:
1120         (WebCore::SoupNetworkSession::setHTTPProxy): Moved to private member.
1121         (WebCore::SoupNetworkSession::httpProxy): Deleted because nobody calls it.
1122         * platform/network/soup/SoupNetworkSession.h:
1123
1124 2015-05-19  Commit Queue  <commit-queue@webkit.org>
1125
1126         Unreviewed, rolling out r184595.
1127         https://bugs.webkit.org/show_bug.cgi?id=145197
1128
1129         Introduced a crash in 15 layout tests on Mavericks on #webkit
1130         (Requested by rniwa on #webkit).
1131
1132         Reverted changeset:
1133
1134         "Media Controls stop updating after hovering for a few
1135         seconds."
1136         https://bugs.webkit.org/show_bug.cgi?id=144770
1137         http://trac.webkit.org/changeset/184595
1138
1139 2015-05-19  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1140
1141         REGRESSION(r181571): Build broken when USE(OPENGL_ES_2) is defined.
1142         https://bugs.webkit.org/show_bug.cgi?id=145156
1143
1144         Reviewed by Alex Christensen.
1145
1146         No new tests, no behavior changes.
1147
1148         Vertex Array Objects are not available in OpenGLESv2.
1149         Add guards to avoid using this when building with GLESv2.
1150
1151         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1152         (WebCore::GraphicsContext3D::createVertexArray):
1153         (WebCore::GraphicsContext3D::deleteVertexArray):
1154         (WebCore::GraphicsContext3D::isVertexArray):
1155         (WebCore::GraphicsContext3D::bindVertexArray):
1156
1157 2015-05-19  Roger Fong  <roger_fong@apple.com>
1158
1159         Upper half of volume control should be filled, not hollow.
1160         https://bugs.webkit.org/show_bug.cgi?id=145187.
1161         <rdar://problem/21021970>
1162
1163         Reviewed by Dean Jackson.
1164
1165         * Modules/mediacontrols/mediaControlsApple.js:
1166         (Controller.prototype.drawVolumeBackground):
1167
1168 2015-05-19  Michael Saboff  <msaboff@apple.com>
1169
1170         REGRESSION(183787): JIT is enabled for all builds
1171         https://bugs.webkit.org/show_bug.cgi?id=145179
1172
1173         Reviewed by Geoffrey Garen.
1174
1175         Eliminated the setting of ENABLE_JIT, as wtf/Platform.h has appropriate logic to
1176         set it depending on OS and CPU type.
1177
1178         Only changed the way build options are initialized.
1179
1180         * Configurations/FeatureDefines.xcconfig:
1181
1182 2015-05-19  Chris Dumez  <cdumez@apple.com>
1183
1184         [Mac] Font lookups are flakey due to caching
1185         https://bugs.webkit.org/show_bug.cgi?id=145180
1186         <rdar://problem/21012406>
1187
1188         Reviewed by Darin Adler.
1189
1190         Font lookups were flakey on Mac due to the cache in fontWithFamily().
1191         The reason is that the "desired family" to "available family" mapping
1192         is sometimes dependent on the desired traits. However, our cache was
1193         only using the "desired family" as key.
1194
1195         This patch now uses a std::pair as key containing both the "desired
1196         family" and the "desired traits" for correctness. I also updated the
1197         cache to use WTF types instead of NS types.
1198
1199         Test: platform/mac/fast/text/font-weights.html
1200
1201         * platform/graphics/mac/FontCacheMac.mm:
1202         (WebCore::desiredFamilyToAvailableFamilyMap):
1203         (WebCore::hasDesiredFamilyToAvailableFamilyMapping):
1204         (WebCore::rememberDesiredFamilyToAvailableFamilyMapping):
1205         (WebCore::fontWithFamily):
1206         (WebCore::invalidateFontCache):
1207         (WebCore::desiredFamilyToAvailableFamilyDictionary): Deleted.
1208
1209 2015-05-19  Brady Eidson  <beidson@apple.com>
1210
1211         X-Frame-Options headers not respected when loading from application cache.
1212         <rdar://problem/14877623> and https://bugs.webkit.org/show_bug.cgi?id=131800
1213
1214         Reviewed by Alexey Proskuryakov.
1215
1216         Test: http/tests/appcache/x-frame-options-prevents-framing.php
1217
1218         This patch updates SubstituteData to hold on to a ResourceResponse instead of just a URL.
1219         
1220         It also updates all users of SubstituteData to reflect this.
1221         
1222         Finally it updates ApplicationCacheHost to put the full response (including x-frame-options header)
1223         in the SubstituteData so they can be checked at the appropriate times.
1224         
1225         * loader/DocumentLoader.cpp:
1226         (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
1227         (WebCore::DocumentLoader::responseReceived): Update an ASSERT to reflect that it's okay to not have
1228           a main resource as long as you have a substitute identifier for it.
1229         (WebCore::DocumentLoader::documentURL):
1230         (WebCore::DocumentLoader::contentFilterDidDecide):
1231         
1232         * loader/FrameLoader.cpp:
1233         (WebCore::FrameLoader::loadArchive):
1234         (WebCore::FrameLoader::defaultSubstituteDataForURL):
1235
1236         * loader/SubstituteData.h:
1237         (WebCore::SubstituteData::SubstituteData):
1238         (WebCore::SubstituteData::shouldRevealToSessionHistory):
1239         (WebCore::SubstituteData::mimeType):
1240         (WebCore::SubstituteData::textEncoding):
1241         (WebCore::SubstituteData::response):
1242         (WebCore::SubstituteData::responseURL): Deleted.
1243
1244         * loader/appcache/ApplicationCacheHost.cpp:
1245         (WebCore::ApplicationCacheHost::maybeLoadMainResource): Put the full ResourceResponse here, which 
1246           includes x-frame-options headers sent back when the resources was initially loaded from the network.
1247
1248         * platform/network/ResourceResponseBase.h:
1249
1250 2015-05-19  Brent Fulgham  <bfulgham@apple.com>
1251
1252         REGRESSION(142590): Part 2: Scroll-snap points are improperly snapping to earlier index values (Scrolling Thread) 
1253         https://bugs.webkit.org/show_bug.cgi?id=145175
1254         <rdar://problem/21023785>
1255
1256         Reviewed by Beth Dakin.
1257
1258         Extend the main-thread scrolling changes done in Bug 145140 to also handle Scrolling Thread snapping.
1259         The post-layout fixup (needed to handle window resize and device orientation changes) should not fire
1260         while Scrolling Thread scroll-snap animations are running, since these animations will most likely
1261         move the scroll view into the proper position. If we attempt to 'fix up' the scroll position before
1262         these animations finish, we get an ugly 'jump' in the display.
1263
1264         * page/FrameView.cpp:
1265         (WebCore::FrameView::isScrollSnapInProgress): New method based on isRubberBandInProgress, which considers
1266         both the ScrollAnimator (main thread) scrolling, as well as the ScrollingCoordinator (Scrolling Thread)
1267         scrolling operations. Returns true if a scroll-snap animation is still active.
1268         * page/FrameView.h:
1269         * page/scrolling/AsyncScrollingCoordinator.cpp:
1270         (WebCore::AsyncScrollingCoordinator::isScrollSnapInProgress): Added. Returns scrolling tree's
1271         'isScrollSnapInProgress' state.
1272         * page/scrolling/AsyncScrollingCoordinator.h:
1273         * page/scrolling/ScrollingCoordinator.h:
1274         (WebCore::ScrollingCoordinator::isScrollSnapInProgress): Added default 'false' stub.
1275         * page/scrolling/ScrollingTree.cpp:
1276         (WebCore::ScrollingTree::ScrollingTree): Use modern C++11 initializers.
1277         (WebCore::ScrollingTree::isScrollSnapInProgress): Added.
1278         (WebCore::ScrollingTree::setMainFrameIsScrollSnapping): Added.
1279         * page/scrolling/ScrollingTree.h:
1280         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1281         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1282         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): Update scrolling tree state to match the
1283         ScrollController's scroll-snap state.
1284         (WebCore::ScrollingTreeFrameScrollingNodeMac::startScrollSnapTimer): Added. When starting a scroll snap timer,
1285         always set the scrolling tree scroll-snapping state to true.
1286         (WebCore::ScrollingTreeFrameScrollingNodeMac::stopScrollSnapTimer): Added. When ending a scroll snap timer,
1287         only set the scrolling tree scroll-snapping state to false if the other axis animator is inactive.
1288         * platform/ScrollableArea.cpp:
1289         (WebCore::ScrollableArea::updateScrollSnapState): Revise implementation to use its 'isScrollSnapInProgress'
1290         method, rather than only looking at the ScrollAnimator (main thread) state.
1291         * platform/ScrollableArea.h:
1292         (WebCore::ScrollableArea::isScrollSnapInProgress): Added.
1293         * platform/cocoa/ScrollController.h:
1294         * platform/cocoa/ScrollController.mm:
1295         (WebCore::ScrollController::hasActiveScrollSnapTimerForAxis): Added. Reports if the scroll snap animation
1296         timer on the requested axis is running or not.
1297         * rendering/RenderLayer.cpp:
1298         (WebCore::RenderLayer::isScrollSnapInProgress): Added.
1299         * rendering/RenderLayer.h:
1300
1301 2015-05-19  Roger Fong  <roger_fong@apple.com>
1302
1303         Media Controls stop updating after hovering for a few seconds.
1304         https://bugs.webkit.org/show_bug.cgi?id=144770.
1305         <rdar://problem/19823121>
1306
1307         Reviewed by Jer Noble.
1308
1309         * Modules/mediacontrols/mediaControlsApple.js:
1310         (Controller.prototype.createBase):
1311         We should never hide controls immediately as a result of mousing out of the controls.
1312         It should only happen when the mouse leaves the video entirely.
1313         (Controller.prototype.updateTimelineMetricsIfNeeded):
1314         Don’t update if controls are hidden, timeline dimensions will be 0.
1315         (Controller.prototype.handlePanelTransitionEnd): 
1316         Instead of adjusting visibility via adding and removing classes,
1317         remove controls entirely from the tree.
1318         (Controller.prototype.showControls):
1319         Add controls back into the tree when showing controls.
1320         (Controller.prototype.updateForShowingControls):
1321         Helper method for showControls.
1322         (Controller.prototype.controlsAreHidden):
1323         Controls also hidden if removed from tree.
1324
1325         Remove forceUpdate logic, no longer necessary.
1326         (Controller.prototype.handleDurationChange): 
1327         (Controller.prototype.updateProgress):
1328         (Controller.prototype.updateTime):
1329
1330         Override methods to use add and remove panelContainer for iOS.
1331         * Modules/mediacontrols/mediaControlsiOS.js:
1332         (ControllerIOS.prototype.handlePanelTransitionEnd):
1333         (ControllerIOS.prototype.showControls):
1334         (ControllerIOS.prototype.controlsAreHidden):
1335
1336 2015-05-19  Brent Fulgham  <bfulgham@apple.com>
1337
1338         Scroll-snap animations should not start on axes with zero-delta
1339         https://bugs.webkit.org/show_bug.cgi?id=145148
1340
1341         Reviewed by Dean Jackson.
1342
1343         Don't begin a scroll snap animation on an axis that had no change in position (on that axis)
1344         during the gesture.
1345
1346         * platform/cocoa/ScrollController.mm:
1347         (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Don't begin a scroll snap
1348         animation if no movement on this axis was ever made.
1349
1350 2015-05-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1351
1352         AudioContext should resolve promises with jsUndefined() and not jsNull()
1353         https://bugs.webkit.org/show_bug.cgi?id=145063
1354
1355         Reviewed by Sam Weinig.
1356
1357         Covered by updated test.
1358
1359         * bindings/js/JSDOMPromise.h:
1360         (WebCore::DeferredWrapper::resolve): resolving std::nullptr_t as jsUndefined() and not jsNull()
1361
1362 2015-05-19  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1363
1364         [Streams API] Migrate closed promise handling from ReadableStreamReader to ReadableStream
1365         https://bugs.webkit.org/show_bug.cgi?id=145110
1366
1367         Reviewed by Darin Adler.
1368
1369         Reader is now just checking whether it is the reader locking the stream or not.
1370         If not and stream is readable, it resolves the closed promise.
1371         Otherwise, it delegates the promise handling to its stream.
1372
1373         No change in behavior.
1374
1375         * Modules/streams/ReadableStream.cpp:
1376         (WebCore::ReadableStream::cleanCallbacks): Cleaning of closed callbacks.
1377         (WebCore::ReadableStream::changeStateToClosed): Resolving closed promise if set.
1378         (WebCore::ReadableStream::changeStateToErrored): Rejecting closed promise if set.
1379         (WebCore::ReadableStream::getReader): Removed reader state notification.
1380         (WebCore::ReadableStream::closed): Moved from reader to stream.
1381         * Modules/streams/ReadableStream.h:
1382         (WebCore::ReadableStream::reader): Added to allow reader to check whether it is locking its stream or not.
1383         (WebCore::ReadableStream::isReadable): Added as an improvement over internalState which is removed.
1384         (WebCore::ReadableStream::internalState): Deleted.
1385         * Modules/streams/ReadableStreamReader.cpp:
1386         (WebCore::ReadableStreamReader::closed):
1387         * Modules/streams/ReadableStreamReader.h: Removed state and closed promise callbacks.
1388         * bindings/js/JSReadableStreamControllerCustom.cpp:
1389         (WebCore::JSReadableStreamController::close): Refactoring of internalState to isReadable.
1390         (WebCore::JSReadableStreamController::error): Ditto.
1391         * bindings/js/JSReadableStreamReaderCustom.cpp:
1392         (WebCore::JSReadableStreamReader::closed): Refactoring to have the promise value as callback parameter.
1393
1394 2015-05-19  Jeremy Jones  <jeremyj@apple.com>
1395
1396         Remove use of deprecated AVKit SPI cancelOptimizedFullscreen.
1397         https://bugs.webkit.org/show_bug.cgi?id=145159
1398
1399         Reviewed by Eric Carlson.
1400
1401         Remove cancelOptimizedFullscreen, and use stopOptimizedFullscreen instead.
1402
1403         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1404         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal):
1405         * platform/spi/cocoa/AVKitSPI.h: remove declaration.
1406
1407 2015-05-19  Zalan Bujtas  <zalan@apple.com>
1408
1409         Merged anonymous blocks should invalidate simple line layout path.
1410         https://bugs.webkit.org/show_bug.cgi?id=145104
1411         rdar://problem/20980930
1412
1413         Reviewed by Antti Koivisto.
1414
1415         When anonymous blocks are merged together, it's not guaranteed that the final block can use simple line layout.
1416         This patch ensures that the flow block, where the other block's content gets moved to, is no longer on simple line layout path.
1417         Whether the final flow block ends up using inline boxes or simple line layout will be determined during the next layout.
1418
1419         Test: fast/block/crash-when-anonymous-blocks-are-merged-with-simple-line-layout.html
1420
1421         * rendering/RenderElement.cpp:
1422         (WebCore::RenderElement::insertChildInternal):
1423
1424 2015-05-19  Beth Dakin  <bdakin@apple.com>
1425
1426         Crash in WebCore::RenderLayer::updateScrollbarsAfterLayout
1427         https://bugs.webkit.org/show_bug.cgi?id=145142
1428
1429         Reviewed by Simon Fraser.
1430
1431         I have not been able to reproduce this crash, but according to symbolication 
1432         m_vBar is null. It seems like this crash was probably caused by 
1433         http://trac.webkit.org/changeset/173668 which made it so that overflow:scroll 
1434         behaves like overflow:auto when the scrollbars are overlay. I can see how you 
1435         could encounter this crash with that change if the layout caused 
1436         styleRequiresScrollbar() to return true when it used to return false. Then this 
1437         code, by failing to null-check the scrollbars, assumes that 
1438         styleRequiresScrollbar() could not have changed based on a layout. But it could 
1439         change if the css changed the scrollbars to be custom or if the user managed 
1440         switch to legacy style scrollbars at just the wrong time. Or I suppose it could 
1441         also happen if the user has legacy scrollbars and the style switched from auto to 
1442         scroll during the layout.
1443
1444         Anyway, we should null-check  the scrollbars. This is a speculative fix.
1445         * rendering/RenderLayer.cpp:
1446         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
1447
1448 2015-05-19  Hunseop Jeong  <hs85.jeong@samsung.com>
1449
1450         Use modern for-loops in WebCore/xml.
1451         https://bugs.webkit.org/show_bug.cgi?id=145046
1452
1453         Reviewed by Chris Dumez.
1454
1455         No new tests, no new tests.
1456
1457         * xml/XMLHttpRequest.cpp:
1458         (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod):
1459         * xml/XPathExpressionNode.cpp:
1460         (WebCore::XPath::Expression::setSubexpressions):
1461         * xml/XPathFunctions.cpp:
1462         (WebCore::XPath::FunSum::evaluate):
1463         (WebCore::XPath::populateFunctionMap):
1464         * xml/XPathNodeSet.cpp:
1465         (WebCore::XPath::NodeSet::traversalSort):
1466         * xml/XPathParser.cpp:
1467         (WebCore::XPath::populateAxisNamesMap):
1468         * xml/XPathPath.cpp:
1469         (WebCore::XPath::Filter::evaluate):
1470         (WebCore::XPath::LocationPath::evaluate):
1471         * xml/XPathPredicate.cpp:
1472         (WebCore::XPath::EqTestOp::compare):
1473         (WebCore::XPath::Union::evaluate):
1474         * xml/XPathStep.cpp:
1475         (WebCore::XPath::Step::optimize):
1476         (WebCore::XPath::Step::predicatesAreContextListInsensitive):
1477         (WebCore::XPath::Step::evaluate):
1478         (WebCore::XPath::nodeMatches):
1479         * xml/XSLStyleSheetLibxslt.cpp:
1480         (WebCore::XSLStyleSheet::~XSLStyleSheet):
1481         (WebCore::XSLStyleSheet::isLoading):
1482         (WebCore::XSLStyleSheet::clearDocuments):
1483         (WebCore::XSLStyleSheet::locateStylesheetSubResource):
1484         * xml/XSLTProcessorLibxslt.cpp:
1485         (WebCore::xsltParamArrayFromParameterMap):
1486
1487 2015-05-19  Jon Lee  <jonlee@apple.com>
1488
1489         Improve text rendering of placeholder
1490         https://bugs.webkit.org/show_bug.cgi?id=145135
1491
1492         Reviewed by Eric Carlson.
1493
1494         * Modules/mediacontrols/mediaControlsApple.css: The <p> elements of the wireless playback
1495         text are being popped out into separate layers, causing the text to render antialiased, which
1496         looks bad on non-retina machines. Explicitly set the background color (which is ok since the
1497         container element for the placeholder is also black). Also extend the height out 1pt to prevent
1498         clipping of descenders.
1499         (audio::-webkit-media-controls-wireless-playback-text-top): Set background color to black and add
1500         1 to the height.
1501         (audio::-webkit-media-controls-wireless-playback-text-bottom): Ditto.
1502
1503 2015-05-19  Jon Lee  <jonlee@apple.com>
1504
1505         [iOS] Current time display should be right-aligned
1506         https://bugs.webkit.org/show_bug.cgi?id=145163
1507         rdar://problem/21014339
1508
1509         Reviewed by Eric Carlson.
1510
1511         * Modules/mediacontrols/mediaControlsiOS.css: Use flex-start and flex-end
1512         instead of right and left, similar to the Mac controls.
1513         (video::-webkit-media-controls-current-time-display):
1514         (video::-webkit-media-controls-time-remaining-display):
1515
1516 2015-05-14  Chris Fleizach  <cfleizach@apple.com>
1517
1518         AX: Select text mechanism returns results outside of text control regions
1519         https://bugs.webkit.org/show_bug.cgi?id=145041
1520
1521         Reviewed by Mario Sanchez Prada.
1522
1523         The behavior of the select text mechanism (inside accessibility) should make sure that results
1524         returned stay within text control elements if the search was initiated inside a text control element.
1525
1526         Test: platform/mac/accessibility/select-text-stays-inside-text-controls.html
1527
1528         * accessibility/AccessibilityObject.cpp:
1529         (WebCore::rangeClosestToRange):
1530         (WebCore::AccessibilityObject::selectText):
1531
1532 2015-05-19  Chris Dumez  <cdumez@apple.com>
1533
1534         Mark static variables as const when possible
1535         https://bugs.webkit.org/show_bug.cgi?id=145161
1536
1537         Reviewed by Andreas Kling.
1538
1539         * Modules/mediasession/WebMediaSessionManager.cpp:
1540         * Modules/mediasource/SourceBuffer.cpp:
1541         * Modules/webdatabase/SQLException.cpp:
1542         * dom/DOMCoreException.cpp:
1543         * inspector/NetworkResourcesData.cpp:
1544         * loader/icon/IconDatabase.cpp:
1545         (WebCore::urlForLogging):
1546         * page/AutoscrollController.cpp:
1547         * page/Page.cpp:
1548         * platform/RuntimeApplicationChecksIOS.mm:
1549         (WebCore::applicationIsAdSheet):
1550         (WebCore::applicationIsMobileMail):
1551         (WebCore::applicationIsMobileSafari):
1552         (WebCore::applicationIsDumpRenderTree):
1553         (WebCore::applicationIsWebApp):
1554         (WebCore::applicationIsOkCupid):
1555         (WebCore::applicationIsFacebook):
1556         (WebCore::applicationIsEpicurious):
1557         (WebCore::applicationIsDaijisenDictionary):
1558         (WebCore::applicationIsNASAHD):
1559         (WebCore::applicationIsMASH):
1560         (WebCore::applicationIsTheEconomistOnIPhone):
1561         (WebCore::applicationIsWebProcess):
1562         (WebCore::applicationIsIBooksOnIOS):
1563         * platform/audio/HRTFElevation.cpp:
1564         * platform/audio/mac/AudioHardwareListenerMac.cpp:
1565         (WebCore::processIsRunningPropertyDescriptor):
1566         (WebCore::outputDevicePropertyDescriptor):
1567         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
1568         * platform/graphics/ca/GraphicsLayerCA.cpp:
1569         * platform/graphics/mac/FontCacheMac.mm:
1570         (WebCore::toCoreTextFontWeight):
1571         (WebCore::toAppKitFontWeight):
1572         (WebCore::toNSFontWeight):
1573         * platform/mac/ScrollAnimatorMac.mm:
1574         (supportsUIStateTransitionProgress):
1575         (supportsExpansionTransitionProgress):
1576         (supportsContentAreaScrolledInDirection):
1577         * platform/mac/ScrollbarThemeMac.mm:
1578         * platform/mac/WebCoreNSURLExtras.mm:
1579         (WebCore::dataForURLComponentType):
1580         * platform/mock/ScrollbarThemeMock.cpp:
1581         * platform/text/icu/UTextProviderLatin1.cpp:
1582         * platform/text/ios/LocalizedDateCache.mm:
1583         (WebCore::LocalizedDateCache::calculateMaximumWidth):
1584         * rendering/RenderBlockLineLayout.cpp:
1585         (WebCore::RenderBlockFlow::matchedEndLine):
1586         * rendering/RenderBoxModelObject.cpp:
1587         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
1588         * rendering/RenderFrameBase.cpp:
1589         (WebCore::shouldExpandFrame):
1590         * rendering/RenderTableSection.cpp:
1591         * rendering/RenderThemeIOS.mm:
1592         (WebCore::getInsetGradient):
1593         (WebCore::getShineGradient):
1594         (WebCore::getShadeGradient):
1595         (WebCore::getConvexGradient):
1596         (WebCore::getConcaveGradient):
1597         (WebCore::getSliderTrackGradient):
1598         (WebCore::getReadonlySliderTrackGradient):
1599         (WebCore::getSliderThumbOpaquePressedGradient):
1600         (WebCore::RenderThemeIOS::paintCheckboxDecorations):
1601         (WebCore::RenderThemeIOS::paintRadioDecorations):
1602         * rendering/RenderThemeMac.mm:
1603         (WebCore::toFontWeight):
1604         (WebCore::TopGradientInterpolate):
1605         (WebCore::BottomGradientInterpolate):
1606         (WebCore::MainGradientInterpolate):
1607         (WebCore::TrackGradientInterpolate):
1608
1609 2015-05-18  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1610
1611         Use Ref instead of PassRefPtr in WebCore/bindings
1612         https://bugs.webkit.org/show_bug.cgi?id=144981
1613
1614         Reviewed by Darin Adler.
1615
1616         As a step to purge PassRefPtr, remove PassRefPtr in WebCore/bindings.
1617
1618         No new tests, no behavior changes.
1619
1620         * bindings/gobject/GObjectNodeFilterCondition.h:
1621         (WebCore::GObjectNodeFilterCondition::create):
1622         * bindings/gobject/GObjectXPathNSResolver.h:
1623         (WebCore::GObjectXPathNSResolver::create):
1624         * bindings/js/JSCustomXPathNSResolver.cpp:
1625         (WebCore::JSCustomXPathNSResolver::create):
1626         * bindings/js/JSCustomXPathNSResolver.h:
1627         * bindings/js/JSDOMGlobalObjectTask.cpp:
1628         * bindings/js/JSErrorHandler.h:
1629         (WebCore::JSErrorHandler::create):
1630         * bindings/js/JSLazyEventListener.cpp:
1631         (WebCore::JSLazyEventListener::createForNode):
1632         (WebCore::JSLazyEventListener::createForDOMWindow):
1633         * bindings/js/JSLazyEventListener.h:
1634         * bindings/js/JSMutationCallback.h:
1635         (WebCore::JSMutationCallback::create):
1636         * bindings/js/JSNodeFilterCondition.h:
1637         (WebCore::JSNodeFilterCondition::create):
1638         * bindings/js/SerializedScriptValue.cpp:
1639         (WebCore::SerializedScriptValue::create):
1640         (WebCore::SerializedScriptValue::numberValue):
1641         (WebCore::SerializedScriptValue::undefinedValue):
1642         (WebCore::SerializedScriptValue::nullValue):
1643         * bindings/js/SerializedScriptValue.h:
1644         * bindings/objc/ObjCEventListener.h:
1645         * bindings/objc/ObjCEventListener.mm:
1646         (WebCore::ObjCEventListener::wrap):
1647         * bindings/objc/ObjCNodeFilterCondition.h:
1648         (WebCore::ObjCNodeFilterCondition::create):
1649
1650 2015-05-18  Csaba Osztrogonác  <ossy@webkit.org>
1651
1652         Fix uninitialized warnings in RealtimeMediaSourceCenterOwr.cpp
1653         https://bugs.webkit.org/show_bug.cgi?id=145119
1654
1655         Reviewed by Gyuyoung Kim.
1656
1657         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
1658         (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
1659         (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
1660
1661 2015-05-18  Michael Catanzaro  <mcatanzaro@igalia.com>
1662
1663         [CMake] Ignore warnings in system headers
1664         https://bugs.webkit.org/show_bug.cgi?id=144747
1665
1666         Reviewed by Darin Adler.
1667
1668         Separate include directories into WebKit project includes and system includes. Suppress all
1669         warnings from headers in system include directories using the SYSTEM argument to
1670         the include_directories command.
1671
1672         * CMakeLists.txt:
1673         * PlatformEfl.cmake:
1674         * PlatformGTK.cmake:
1675         * PlatformMac.cmake:
1676
1677 2015-05-18  Myles C. Maxfield  <mmaxfield@apple.com>
1678
1679         Addressing post-review comments on r184353
1680         https://bugs.webkit.org/show_bug.cgi?id=145146
1681
1682         Reviewed by Benjamin Poulain.
1683
1684         See per-file comments.
1685
1686         No new tests because there is no behavior change.
1687
1688         * platform/graphics/mac/FontCacheMac.mm:
1689         (WebCore::fontWithFamilySpecialCase): Use equalIgnoringASCIICase() AtomicString overload.
1690         * rendering/RenderThemeMac.mm:
1691         (WebCore::RenderThemeMac::updateCachedSystemFontDescription): Implement Ben's ideas for
1692         cheaply constructing AtomicStrings only when necessary.
1693
1694 2015-05-18  Skachkov Alexandr  <gskachkov@gmail.com>
1695
1696         [ES6] Arrow function syntax. Feature flag for arrow function
1697         https://bugs.webkit.org/show_bug.cgi?id=145108
1698
1699         Reviewed by Ryosuke Niwa.
1700
1701         Added feature flag ENABLE_ES6_ARROWFUNCTION_SYNTAX for arrow function
1702
1703         * Configurations/FeatureDefines.xcconfig:
1704
1705 2015-05-18  Brent Fulgham  <bfulgham@apple.com>
1706
1707         REGRESSION(142590): Scroll-snap points are improperly snapping to earlier index values
1708         https://bugs.webkit.org/show_bug.cgi?id=145140
1709         <rdar://problem/21006738>
1710
1711         Reviewed by Beth Dakin.
1712
1713         The new "nearestActiveSnapPoint" logic is firing while scroll snap animations are running. We need
1714         to add an "isScrollSnapInProgress" predicate, much like the existing "isRubberBandInProgress" to avoid
1715         certain "fix-up" logic that we don't want running while we are in the process of moving to a new position.
1716
1717         * platform/ScrollAnimator.h:
1718         (WebCore::ScrollAnimator::ScrollAnimator::isScrollSnapInProgress): Added.
1719         * platform/ScrollableArea.cpp:
1720         (WebCore::ScrollableArea::updateScrollSnapState): If we are in the midst of a scroll snap operation,
1721         do not attempt to reset position to the current active snap point.
1722         * platform/cocoa/ScrollController.h:
1723         * platform/cocoa/ScrollController.mm:
1724         (WebCore::ScrollController::isScrollSnapInProgress): Added.
1725         * platform/mac/ScrollAnimatorMac.h:
1726         * platform/mac/ScrollAnimatorMac.mm:
1727         (WebCore::ScrollAnimatorMac::isScrollSnapInProgress): Added.
1728
1729 2015-05-17  Manuel Rego Casasnovas  <rego@igalia.com>
1730
1731         [CSS Grid Layout] Add scrollbar width in intrinsic logical widths computation
1732         https://bugs.webkit.org/show_bug.cgi?id=145021
1733
1734         Like for flexboxes we've to take into account the scrollbar logical
1735         width while computing the intrinsic min and max logical widths.
1736
1737         Reviewed by Sergio Villar Senin.
1738
1739         Test: fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html
1740
1741         * rendering/RenderGrid.cpp:
1742         (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Add scrollbar
1743         logical width.
1744
1745 2015-05-17  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1746
1747         [Streams API] Delegate ReadableStreamReader reference counting to ReadableStream
1748         https://bugs.webkit.org/show_bug.cgi?id=144907
1749
1750         Reviewed by Darin Adler.
1751
1752         Changed the link between readadable stream and reader.
1753         Controller ref()/deref() now increments/decrements its stream ref counter, similarly to ReadableStreamController.
1754         This ensures that even if JS scripts do not keep track of the readable stream,
1755         the readable stream will not be disposed as long as the JS script has access to its reader.
1756
1757         All readers of a given stream are kept by the stream, either in an array (for released readers) 
1758         or and in ReadableStream::m_reader for the active reader.
1759         This removes the need for the code synchronizing stream and reader.
1760
1761         As a reader can now already count on its stream, the reader no longer needs to store the error in errored state.
1762         Removal of ReadableJSStream::Reader as closed promise rejection error is directly retrieved from the ReadableStream.
1763         Moved the creation of reader directly in ReadableStream.
1764
1765         Next step should be to remove ReadableStreamReader::m_state and to delegate the handling of ReadableStreamReader closed promise callbacks to ReadableStream.
1766
1767         No change in behavior.
1768
1769         * Modules/streams/ReadableStream.cpp:
1770         (WebCore::ReadableStream::changeStateToClosed):
1771         (WebCore::ReadableStream::changeStateToErrored):
1772         (WebCore::ReadableStream::getReader):
1773         * Modules/streams/ReadableStream.h:
1774         (WebCore::ReadableStream::reader):
1775         * Modules/streams/ReadableStreamReader.cpp:
1776         (WebCore::ReadableStreamReader::clean):
1777         (WebCore::ReadableStreamReader::ref):
1778         (WebCore::ReadableStreamReader::deref):
1779         (WebCore::ReadableStreamReader::closed):
1780         (WebCore::ReadableStreamReader::changeStateToClosed):
1781         (WebCore::ReadableStreamReader::changeStateToErrored):
1782         * Modules/streams/ReadableStreamReader.h:
1783         (WebCore::ReadableStreamReader::ReadableStreamReader):
1784         * Modules/streams/ReadableStreamReader.idl:
1785         * bindings/js/JSReadableStreamCustom.cpp:
1786         (WebCore::JSReadableStream::getReader):
1787         * bindings/js/JSReadableStreamReaderCustom.cpp:
1788         (WebCore::JSReadableStreamReader::closed):
1789         (WebCore::constructJSReadableStreamReader):
1790         * bindings/js/ReadableJSStream.cpp:
1791         (WebCore::ReadableJSStream::storeError):
1792         (WebCore::ReadableJSStream::ReadableJSStream): Deleted.
1793         * bindings/js/ReadableJSStream.h:
1794
1795 2015-05-17  Alexey Proskuryakov  <ap@apple.com>
1796
1797         Crash when uploading huge files to YouTube or Google Drive
1798         https://bugs.webkit.org/show_bug.cgi?id=145083
1799         rdar://problem/15468529
1800
1801         Reviewed by Darin Adler.
1802
1803         This fixes the crash, but uploading will fail.
1804
1805         * fileapi/FileReaderLoader.cpp:
1806         (WebCore::FileReaderLoader::start): Tell SubresourceLoader to not store a copy of
1807         all received data, FileReaderLoader has its own buffer.
1808         (WebCore::FileReaderLoader::didReceiveResponse): Fixed a bounds check - not every
1809         64-bit value that doesn't fit into 32 bits is negative. With this, FileReader fails
1810         on huge files right away, as intended.
1811         (WebCore::FileReaderLoader::didReceiveData): Fixed multiple bugs in code that's
1812         executed when size is not available upfront. This is the code that used to crash,
1813         but with the above fix, it's not executed by YouTube.
1814         Not only overflow was handled incorrectly, but even simply growing a buffer for
1815         append was buggy.
1816
1817 2015-05-16  Zalan Bujtas  <zalan@apple.com>
1818
1819         REGRESSION (Subpixel): Dashed underline is missing when box is positioned at subpixels.
1820         https://bugs.webkit.org/show_bug.cgi?id=145097
1821         rdar://problem/18588415
1822
1823         Reviewed by Simon Fraser.
1824
1825         Dashed and dotted border painting needs clipping in order to properly display corners.
1826         Similarly to solid border's quad calculation, we pixelsnap the border positions before computing the clipping quad values.
1827
1828         Test: fast/borders/dashed-border-on-subpixel-position.html
1829               fast/borders/dotted-border-on-subpixel-position.html
1830
1831         * rendering/RenderBoxModelObject.cpp:
1832         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
1833
1834 2015-05-16  Sungmann Cho  <sungmann.cho@navercorp.com>
1835
1836         Remove styleText() and applyStyleText() from InspectorStyle.
1837         https://bugs.webkit.org/show_bug.cgi?id=145093
1838
1839         Reviewed by Darin Adler.
1840
1841         styleText() and applyStyleText() in InspectorStyle are private aliases for the public
1842         accessors in the same class but are rarely used. I think it would be better off removing
1843         these aliases and updating all the current call sites to use the public accessors directly
1844         as noted in InspectorStyleSheet.h.
1845
1846         No new tests, no behavior change.
1847
1848         * inspector/InspectorStyleSheet.cpp:
1849         (WebCore::InspectorStyle::populateAllProperties):
1850         * inspector/InspectorStyleSheet.h:
1851
1852 2015-05-16  Sungmann Cho  <sungmann.cho@navercorp.com>
1853
1854         Remove MessageType variant of addMessageToConsole() from ChromeClient.
1855         https://bugs.webkit.org/show_bug.cgi?id=145095
1856
1857         Reviewed by Darin Adler.
1858
1859         All addMessageToConsole() in ChromeClient are exactly the same thing.
1860         So there is no reason to keep all this methods.
1861
1862         No new tests, no behavior change.
1863
1864         * page/ChromeClient.h:
1865         * page/PageConsoleClient.cpp:
1866         (WebCore::PageConsoleClient::messageWithTypeAndLevel):
1867
1868 2015-05-15  Sam Weinig  <sam@webkit.org>
1869
1870         Add getElementById to DocumentFragment
1871         https://bugs.webkit.org/show_bug.cgi?id=145094
1872
1873         Reviewed by Alexey Proskuryakov.
1874
1875         Match the latest DOM standard and other browsers by adding getElementById
1876         to DocumentFragment in addition to Document and SVGSVGElement. Add NonElementParentNode
1877         interface that the DOM standard defines.
1878
1879         Test: fast/dom/DocumentFragment/getElementById.html
1880
1881         * DerivedSources.make:
1882         * WebCore.xcodeproj/project.pbxproj:
1883         Add NonElementParentNode.idl
1884
1885         * dom/Document.idl:
1886         Mark Document as implementing NonElementParentNode and remove now redundant getElementById
1887         declaration.
1888
1889         * dom/DocumentFragment.cpp:
1890         (WebCore::DocumentFragment::getElementById):
1891         * dom/DocumentFragment.h:
1892         Add implementation of getElementById for DocumentFragments. Add a fast path for ShadowRoots
1893         which can take advantage of the fact that they are TreeScopes to use the elements by id cache
1894         in TreeScrope.
1895
1896         * dom/DocumentFragment.idl:
1897         Mark DocumentFragment as implementing NonElementParentNode.
1898
1899         * dom/NonElementParentNode.idl: Copied from Source/WebCore/dom/NonDocumentTypeChildNode.idl.
1900         Added.
1901
1902         * svg/SVGSVGElement.cpp:
1903         (WebCore::SVGSVGElement::getElementById):
1904         * svg/SVGSVGElement.h:
1905         * svg/SVGSVGElement.idl:
1906         Convert to taking an AtomicString to match other getElementByIds.
1907
1908 2015-05-15  Antti Koivisto  <antti@apple.com>
1909
1910         When redirecting to data URL use HTTP response for same origin policy checks
1911         https://bugs.webkit.org/show_bug.cgi?id=145054
1912         rdar://problem/20299050
1913
1914         Reviewed by Alexey Proskuryakov.
1915
1916         Test: http/tests/security/canvas-remote-read-data-url-image-redirect.html
1917
1918         * dom/ScriptElement.cpp:
1919         (WebCore::ScriptElement::notifyFinished):
1920         * dom/ScriptExecutionContext.cpp:
1921         (WebCore::ScriptExecutionContext::sanitizeScriptError):
1922         * html/canvas/CanvasRenderingContext.cpp:
1923         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
1924         * loader/ImageLoader.cpp:
1925         (WebCore::ImageLoader::notifyFinished):
1926         * loader/MediaResourceLoader.cpp:
1927         (WebCore::MediaResourceLoader::responseReceived):
1928         * loader/TextTrackLoader.cpp:
1929         (WebCore::TextTrackLoader::notifyFinished):
1930         * loader/cache/CachedImage.cpp:
1931         (WebCore::CachedImage::isOriginClean):
1932         * loader/cache/CachedResource.cpp:
1933         (WebCore::CachedResource::passesAccessControlCheck):
1934         (WebCore::CachedResource::passesSameOriginPolicyCheck):
1935
1936             Factor repeatedly used same origin policy test into a function.
1937
1938         (WebCore::CachedResource::redirectReceived):
1939
1940             When redirecting to a data URL save the redirect response.
1941
1942         (WebCore::CachedResource::responseForSameOriginPolicyChecks):
1943
1944             In case we got redirected to data use that response instead of the final data response for policy checks.
1945
1946         * loader/cache/CachedResource.h:
1947
1948 2015-05-16  Jon Lee  <jonlee@apple.com>
1949
1950         [iOS] wireless playback picker button is drawn incorrectly
1951         https://bugs.webkit.org/show_bug.cgi?id=145057
1952         rdar://problem/20877518
1953
1954         Reviewed by Jer Noble.
1955
1956         * Modules/mediacontrols/mediaControlsiOS.js:
1957         (ControllerIOS.prototype.updateWirelessTargetPickerButton): This method is
1958         defined in Controller, but is only meant to run on Macs. Override it with
1959         an empty function for iOS.
1960
1961 2015-05-15  Simon Fraser  <simon.fraser@apple.com>
1962
1963         REGRESSION (r183300): Background missing on top links on apple.com
1964         https://bugs.webkit.org/show_bug.cgi?id=145079
1965         rdar://problem/20914252
1966
1967         Reviewed by Tim Horton.
1968         
1969         Re-land r184421 with a fix to check against rects.coverageRect
1970         rather than the stale m_coverageRect.
1971
1972         Test: compositing/visible-rect/backing-change-height-from-zero.html
1973
1974         * platform/graphics/ca/GraphicsLayerCA.cpp:
1975         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
1976         * rendering/RenderLayerBacking.cpp:
1977         (WebCore::RenderLayerBacking::shouldSkipLayerInDump):
1978
1979 2015-05-15  Matt Baker  <mattbaker@apple.com>
1980
1981         Web Inspector: REGRESSION (r181625): Timeline recording started from console.profile is always empty
1982         https://bugs.webkit.org/show_bug.cgi?id=144882
1983
1984         Reviewed by Joseph Pecoraro.
1985
1986         A timeline recording will always be stopped before the end of the current run loop is observed. Before
1987         dispatching the recording stopped event, any events that are currently in progress should be considered
1988         complete and sent to the frontend.
1989
1990         * inspector/InspectorTimelineAgent.cpp:
1991         (WebCore::InspectorTimelineAgent::internalStop):
1992
1993 2015-05-15  Commit Queue  <commit-queue@webkit.org>
1994
1995         Unreviewed, rolling out r184421.
1996         https://bugs.webkit.org/show_bug.cgi?id=145087
1997
1998         Introduced 42 layout test failures (Requested by rniwa on
1999         #webkit).
2000
2001         Reverted changeset:
2002
2003         "REGRESSION (r183300): Background missing on top links on
2004         apple.com"
2005         https://bugs.webkit.org/show_bug.cgi?id=145079
2006         http://trac.webkit.org/changeset/184421
2007
2008 2015-05-15  Simon Fraser  <simon.fraser@apple.com>
2009
2010         REGRESSION (r183300): Background missing on top links on apple.com
2011         https://bugs.webkit.org/show_bug.cgi?id=145079
2012         rdar://problem/20914252
2013
2014         Reviewed by Tim Horton.
2015
2016         GraphicsLayerCA::setVisibleAndCoverageRects() only set the m_intersectsCoverageRect
2017         flag if the coverage rect changed, but it doesn't if you simply change the size of
2018         the layer.
2019
2020         Instead, always re-evaluate the intersection, and set the CoverageRectChanged bit
2021         if it changes.
2022
2023         Test: compositing/visible-rect/backing-change-height-from-zero.html
2024
2025         * platform/graphics/ca/GraphicsLayerCA.cpp:
2026         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
2027         * rendering/RenderLayerBacking.cpp:
2028         (WebCore::RenderLayerBacking::shouldSkipLayerInDump): Don't skip any layers in a
2029         debug layer dump, to assist debugging.
2030
2031 2015-05-15  Sam Weinig  <sam@webkit.org>
2032
2033         Move HTMLElement's children property to ParentNode
2034         https://bugs.webkit.org/show_bug.cgi?id=145072
2035
2036         Reviewed by Chris Dumez.
2037
2038         Match the latest DOM standard and other browsers by moving the children property
2039         to ParentNode, thus exposing it on Element, Document and DocumentFragment.
2040
2041         Test: fast/dom/ParentNode-children.html
2042
2043         * dom/ContainerNode.cpp:
2044         (WebCore::ContainerNode::children):
2045         Moved implementation from HTMLElement to here.
2046
2047         (WebCore::ContainerNode::ensureCachedHTMLCollection):
2048         (WebCore::ContainerNode::cachedHTMLCollection):
2049         Moved implementation from Element to here so that ContainerNode::children
2050         can use it.
2051
2052         (WebCore::ContainerNode::firstElementChild):
2053         (WebCore::ContainerNode::lastElementChild):
2054         (WebCore::ContainerNode::childElementCount):
2055         Remove unnecessary assertions.
2056
2057         * dom/ContainerNode.h:
2058         Moved declarations from HTMLElement and Element to here.
2059
2060         * dom/Element.cpp:
2061         (WebCore::Element::ensureCachedHTMLCollection): Deleted.
2062         (WebCore::Element::cachedHTMLCollection): Deleted.
2063         * dom/Element.h:
2064         Moved to ContainerNode.
2065
2066         * dom/Node.cpp:
2067         (WebCore::Node::previousElementSibling):
2068         (WebCore::Node::nextElementSibling):
2069         Remove unnecessary assertions.
2070
2071         * dom/ParentNode.idl:
2072         Moved the children property here from HTMLElement.
2073
2074         * html/HTMLElement.cpp:
2075         (WebCore::HTMLElement::children): Deleted.
2076         * html/HTMLElement.h:
2077         Moved to ContainerNode.
2078
2079         * html/HTMLElement.idl:
2080         Get rid of the children property for all bindings except Objective-C which needs
2081         to keep it to avoid changing the public API.
2082
2083 2015-05-15  Zalan Bujtas  <zalan@apple.com>
2084
2085         WebCore ASan debug build fails. ERROR: WebCore has a weak external symbol in it.
2086         https://bugs.webkit.org/show_bug.cgi?id=145070
2087
2088         Reviewed by David Kilzer.
2089
2090         Build fix.
2091
2092         * Configurations/WebCore.unexp:
2093
2094 2015-05-15  Beth Dakin  <bdakin@apple.com>
2095
2096         Prefix force on MouseEvent and add constants for click and force click values
2097         https://bugs.webkit.org/show_bug.cgi?id=145065
2098         -and corresponding-
2099         rdar://problem/20770052
2100
2101         Reviewed by Tim Horton.
2102
2103         (WebCore::MouseEvent::webkitForce):
2104         * dom/MouseEvent.idl:
2105
2106 2015-05-15  Jer Noble  <jer.noble@apple.com>
2107
2108         [MediaControls] Refactor media controls & bring improvements made to iOS controls to Mac.
2109         https://bugs.webkit.org/show_bug.cgi?id=144973
2110
2111         Reviewed by Dean Jackson.
2112
2113         Pull improvements made to the iOS media controls back into the Mac controls by moving
2114         code from mediaControlsiOS.js into MediaControlsApple.js.
2115
2116         The largest refactored feature is the ability to drop individual controls from the media
2117         controls when the video is too small to contain them. To allow these controls to resize
2118         dynamically, a new "resize" event is fired inside the media element's shadow DOM.
2119
2120         * Modules/mediacontrols/mediaControlsApple.css:
2121         (audio::-webkit-media-controls-panel .dropped): Added; sets "display: none".
2122         * Modules/mediacontrols/mediaControlsApple.js:
2123         (Controller): Set defaults for new variables.
2124         (Controller.prototype.updateControls): Update the controls width; moved from iOS.js.
2125         (Controller.prototype.handleReadyStateChange): Update the controls; moved from iOS.js.
2126         (Controller.prototype.handleTimeUpdate): Update the progress; moved from iOS.js.
2127         (Controller.prototype.handleTimelineInput): Pause if scrubbing; moved from iOS.js.
2128         (Controller.prototype.handleTimelineChange): Update the progress; moved from iOS.js.
2129         (Controller.prototype.showControls): Update the controls width; moved from iOS.js.
2130         (Controller.prototype.hideControls): Removed _potentiallyScrubbing check; not needed due to changes
2131             to controlsAlwaysVisible().
2132         (Controller.prototype.scheduleUpdateLayoutForDisplayedWidth): Moved from iOS.js.
2133         (Controller.prototype.isControlVisible): Added; checks whether control is parented & not hidden.
2134         (Controller.prototype.updateLayoutForDisplayedWidth): Moved from iOS.js and refactored.
2135         (Controller.prototype.controlsAlwaysVisible): Return true if scrubbing.
2136         (Controller.prototype.updateHasAudio): Check currentPlaybackTargetIsWireless(); moved from iOS.js.
2137         (Controller.prototype.get scrubbing): Simple getter for _scrubbing.
2138         (Controller.prototype.set scrubbing): Check play state if scrubbing; start playback (if necessary)
2139             if not scrubbing.
2140         (Controller.prototype.get pageScaleFactor): Moved from iOS.js.
2141         (Controller.prototype.set pageScaleFactor): Ditto.
2142         (Controller.prototype.handleRootResize): Schedule an update of the contrtols width.
2143
2144         Remove a bunch of newly unnecessary code from the iOS media controls:
2145
2146         * Modules/mediacontrols/mediaControlsiOS.js:
2147         (ControllerIOS):
2148         (ControllerIOS.prototype.createControls): Remove ivars moved into Apple.js.
2149         (ControllerIOS.prototype.configureInlineControls): Remove spacer; made unnecessary.
2150         (ControllerIOS.prototype.showControls): Deleted.
2151         (ControllerIOS.prototype.updateTime): Deleted.
2152         (ControllerIOS.prototype.handleTimelineTouchStart): Just call "scrubbing = true", handled in Apple.js.
2153         (ControllerIOS.prototype.handleTimelineTouchEnd): Just call "scrubbing = false", handled in Apple.js.
2154         (ControllerIOS.prototype.handleReadyStateChange): Deleted.
2155         (ControllerIOS.prototype.setPlaying): Don't check _timelineIsHidden; not needed.
2156         (ControllerIOS.prototype.get pageScaleFactor): Deleted.
2157         (ControllerIOS.prototype.set pageScaleFactor): Deleted.
2158         (ControllerIOS.prototype.scheduleUpdateLayoutForDisplayedWidth): Deleted.
2159         (ControllerIOS.prototypeupdateLayoutForDisplayedWidth): Deleted.
2160
2161         Fire a "resize" event at the shadow DOM root when layout results in a size change.
2162
2163         * html/HTMLMediaElement.cpp:
2164         (WebCore::HTMLMediaElement::layoutSizeChanged): Fire the "resize" event at the shadow DOM.
2165         * html/HTMLMediaElement.h:
2166         * rendering/RenderMedia.cpp:
2167         (WebCore::RenderMedia::layout): Trigger layoutSizeChanged()
2168         * rendering/RenderMedia.h:
2169
2170         Drive-by fixes:
2171
2172         * Modules/mediacontrols/mediaControlsApple.js:
2173         (Controller.prototype.createControls): aria-label text is totally wrong; removed.
2174         (Controller.prototype.updateWirelessPlaybackStatus): Use class-names to hide controls, not inline styles.
2175
2176 2015-05-15  Alex Christensen  <achristensen@webkit.org>
2177
2178         [Content Extensions] Fail to load old content extension files
2179         https://bugs.webkit.org/show_bug.cgi?id=145027
2180
2181         Reviewed by Eric Carlson.
2182
2183         * contentextensions/DFABytecode.h:
2184
2185 2015-05-15  Eric Carlson  <eric.carlson@apple.com>
2186
2187         Unreviewed build fix.
2188
2189         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Add clang pragmas to ignore
2190         deprecation warnings.
2191
2192 2015-05-15  Jeremy Jones  <jeremyj@apple.com>
2193
2194         Limit alternate fullscreen with linked on or after.
2195         https://bugs.webkit.org/show_bug.cgi?id=144894
2196
2197         Reviewed by Dean Jackson.
2198
2199         * platform/ios/WebCoreSystemInterfaceIOS.h: add new wkIOSSystemVersion
2200
2201 2015-05-15  Roger Fong  <roger_fong@apple.com>
2202
2203         Unreviewed. Revert part of r184361.
2204
2205         * Modules/mediacontrols/mediaControlsApple.js:
2206         (Controller.prototype.configureInlineControls):
2207         HI wants the buttons flipped.
2208
2209 2015-05-15  Sungmann Cho  <sungmann.cho@navercorp.com>
2210
2211         Fix trivial typo in TextEncodingDetectorICU.cpp.
2212         https://bugs.webkit.org/show_bug.cgi?id=145055
2213
2214         Reviewed by Alexey Proskuryakov.
2215
2216         No new tests, no behavior change..
2217
2218         * platform/text/TextEncodingDetectorICU.cpp:
2219         (WebCore::detectTextEncoding):
2220
2221 2015-05-15  Alexey Proskuryakov  <ap@apple.com>
2222
2223         Cyrillic top-level domains are displayed as punycode
2224         https://bugs.webkit.org/show_bug.cgi?id=145024
2225         rdar://problem/17747133
2226         rdar://problem/14116594
2227
2228         Reviewed by Tim Horton.
2229
2230         Handling each TLD in code is annoying, but we can probably survive like this
2231         for a few more years, and maybe we'll think of an entirely different way to deal
2232         with non-ASCII domain labels in the meanwhile.
2233
2234         * platform/mac/WebCoreNSURLExtras.mm:
2235         (WebCore::isSecondLevelDomainNameAllowedByTLDRules):
2236         (WebCore::allCharactersAllowedByTLDRules):
2237
2238 2015-05-15  Roger Fong  <roger_fong@apple.com>
2239
2240         Cursor is displayed after full screen video controls fade away.
2241         https://bugs.webkit.org/show_bug.cgi?id=145034.
2242         <rdar://problem/20458604>
2243
2244         Reviewed by Jer Noble.
2245
2246         * Modules/mediacontrols/mediaControlsApple.css:
2247         (video::-webkit-media-controls-panel):
2248         Unnecessary cursor style is on the control panel while hidden but
2249         the cursor will already be hidden anyways from being auto-hidden.
2250         Causes style to change when controls are hidden,
2251         which causes the cursor to reappear.
2252
2253 2015-05-15  Roger Fong  <roger_fong@apple.com>
2254
2255         Checkmark on OFF option of captions sometimes does not appear.
2256         https://bugs.webkit.org/show_bug.cgi?id=145060.
2257         <rdar://problem/19388333>
2258
2259         Reviewed by Eric Carlson.
2260
2261         * Modules/mediacontrols/mediaControlsApple.js:
2262         (Controller.prototype.buildCaptionMenu):
2263         Audio tracks don’t have an OFF option.
2264         Remove related code to allow OFF option for subtitles to work properly.
2265
2266 2015-05-15  Zalan Bujtas  <zalan@apple.com>
2267
2268         White edge on animating panel on http://rokkosunnyvale.com
2269         https://bugs.webkit.org/show_bug.cgi?id=144986
2270         rdar://problem/20907683
2271
2272         Reviewed by Simon Fraser.
2273
2274         Background image geometry calculation needs to be based on the final painting size of the container
2275         in order to accurately compute tile sizes, repeating positions etc.
2276         The container's size is pixelsnapped at painting using absolute coordinates. This patch
2277         ensures that we snap to the same size while computing background geometry.
2278
2279         Test: fast/images/background-image-size-changes-fractional-position.html
2280
2281         * rendering/InlineFlowBox.cpp:
2282         (WebCore::InlineFlowBox::paintBoxDecorations):
2283         * rendering/RenderBox.cpp:
2284         (WebCore::RenderBox::paintBoxDecorations):
2285         (WebCore::RenderBox::paintBackground):
2286         (WebCore::RenderBox::getBackgroundPaintedExtent):
2287         (WebCore::RenderBox::computeBackgroundIsKnownToBeObscured):
2288         (WebCore::RenderBox::maskClipRect):
2289         (WebCore::RenderBox::repaintLayerRectsForImage): unable to get absolute coords.
2290         * rendering/RenderBox.h:
2291         * rendering/RenderBoxModelObject.cpp:
2292         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2293         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2294         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
2295         (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground):
2296         * rendering/RenderBoxModelObject.h:
2297         * rendering/RenderFieldset.cpp:
2298         (WebCore::RenderFieldset::paintBoxDecorations):
2299         * rendering/RenderImage.cpp:
2300         (WebCore::RenderImage::boxShadowShouldBeAppliedToBackground):
2301         (WebCore::RenderImage::computeBackgroundIsKnownToBeObscured):
2302         * rendering/RenderImage.h:
2303         * rendering/RenderLayer.cpp: unable to get absolute coords.
2304         (WebCore::RenderLayer::calculateClipRects):
2305         * rendering/RenderLayerBacking.cpp:
2306         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): currently not used.
2307         * rendering/RenderObject.h:
2308         (WebCore::RenderObject::computeBackgroundIsKnownToBeObscured):
2309         (WebCore::RenderObject::backgroundIsKnownToBeObscured):
2310         * rendering/RenderTable.cpp:
2311         (WebCore::RenderTable::paintBoxDecorations):
2312         * rendering/RenderTableCell.cpp:
2313         (WebCore::RenderTableCell::boxShadowShouldBeAppliedToBackground):
2314         * rendering/RenderTableCell.h:
2315
2316 2015-05-15  Jer Noble  <jer.noble@apple.com>
2317
2318         Crash in RenderFlowThread::popFlowThreadLayoutState() due to mismatched push/pop count
2319         https://bugs.webkit.org/show_bug.cgi?id=145042
2320
2321         Reviewed by David Hyatt.
2322
2323         RenderFlowThread previously used a ListHashSet to store its stack of active objects. This
2324         is problematic because, if the same object is pushed twice, only a single entry of that
2325         object is added to the stack. After this occurs, a matching number of pushes will pop too
2326         many items off the stack, causing a crash when popping a stack with zero items. This
2327         specifically happens in FrameView::layout(), which will push its root renderer on the stack
2328         of active items, and then ask the root to layout(), which will attempt to push itself on the
2329         stack of active items.
2330
2331         Instead of a ListHashSet, use a Vector, which has similar memory characteristics and no 
2332         uniqueness requirements.
2333
2334         * rendering/RenderFlowThread.cpp:
2335         (WebCore::RenderFlowThread::pushFlowThreadLayoutState):
2336         (WebCore::RenderFlowThread::popFlowThreadLayoutState):
2337         * rendering/RenderFlowThread.h:
2338
2339 2015-05-15  Per Arne Vollan  <peavo@outlook.com>
2340
2341         [Curl] WebSocket platform part is not implemented.
2342         https://bugs.webkit.org/show_bug.cgi?id=144628
2343
2344         Reviewed by Darin Adler.
2345
2346         Add Curl platform code implementation for WebSockets.
2347
2348         * platform/network/curl/SocketStreamHandle.h:
2349         (WebCore::SocketStreamHandle::create):
2350         (WebCore::SocketStreamHandle::SocketData::SocketData):
2351         * platform/network/curl/SocketStreamHandleCurl.cpp:
2352         (WebCore::SocketStreamHandle::SocketStreamHandle):
2353         (WebCore::SocketStreamHandle::~SocketStreamHandle):
2354         (WebCore::SocketStreamHandle::platformSend):
2355         (WebCore::SocketStreamHandle::platformClose):
2356         (WebCore::SocketStreamHandle::readData):
2357         (WebCore::SocketStreamHandle::sendData):
2358         (WebCore::SocketStreamHandle::waitForAvailableData):
2359         (WebCore::SocketStreamHandle::startThread):
2360         (WebCore::SocketStreamHandle::stopThread):
2361         (WebCore::SocketStreamHandle::didReceiveData):
2362         (WebCore::SocketStreamHandle::didOpenSocket):
2363         (WebCore::SocketStreamHandle::createCopy):
2364
2365 2015-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2366
2367         REGRESSION(r183861): [SOUP] Downloads are broken when using the Network Process
2368         https://bugs.webkit.org/show_bug.cgi?id=144738
2369
2370         Reviewed by Alexey Proskuryakov.
2371
2372         Add ResourceHandle::releaseForDownload() that releases the current
2373         handle to be used as a download.
2374
2375         * platform/network/ResourceHandle.h:
2376         * platform/network/soup/ResourceHandleSoup.cpp:
2377         (WebCore::ResourceHandle::releaseForDownload):
2378
2379 2015-05-15  Zan Dobersek  <zdobersek@igalia.com>
2380
2381         [GTK] Fix PlatformDisplayWayland construction error, implement the destructor
2382         https://bugs.webkit.org/show_bug.cgi?id=144997
2383
2384         Reviewed by Carlos Garcia Campos.
2385
2386         The PlatformDisplayWayland constructor is private, so we can't use
2387         std::make_unique<>() to construct an object of this class.
2388
2389         Implement the PlatformDisplayWayland destructor, cleaning out all
2390         the Wayland resources, if present.
2391
2392         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
2393         (WebCore::PlatformDisplayWayland::create):
2394         (WebCore::PlatformDisplayWayland::PlatformDisplayWayland):
2395         (WebCore::PlatformDisplayWayland::~PlatformDisplayWayland):
2396
2397 2015-05-14  Zalan Bujtas  <zalan@apple.com>
2398
2399         Images on www.fitstylelife.com jiggle on hover.
2400         https://bugs.webkit.org/show_bug.cgi?id=145020
2401         rdar://problem/20885337
2402
2403         Reviewed by Simon Fraser.
2404
2405         This patch ensures that the clipping layer of a composited content is pixel snapped properly.
2406
2407         Tests: compositing/composited-parent-clipping-layer-on-subpixel-position.html
2408                compositing/parent-clipping-layer-on-subpixel-position.html
2409
2410         * rendering/RenderLayerBacking.cpp:
2411         (WebCore::RenderLayerBacking::updateGeometry):
2412
2413 2015-05-14  Chris Dumez  <cdumez@apple.com>
2414
2415         Have DOMWindow::createWindow() take references to frames
2416         https://bugs.webkit.org/show_bug.cgi?id=145037
2417
2418         Reviewed by Gyuyoung Kim.
2419
2420         Have DOMWindow::createWindow() take references to frames instead of
2421         pointers as they are expected to be non-null. Also return a RefPtr
2422         instead of a PassRefPtr.
2423
2424         * inspector/InspectorFrontendClientLocal.cpp:
2425         (WebCore::InspectorFrontendClientLocal::openInNewTab):
2426         * loader/FrameLoader.cpp:
2427         (WebCore::createWindow):
2428         * loader/FrameLoader.h:
2429         * page/DOMWindow.cpp:
2430         (WebCore::DOMWindow::createWindow):
2431         (WebCore::DOMWindow::open):
2432         (WebCore::DOMWindow::showModalDialog):
2433         * page/DOMWindow.h:
2434
2435 2015-05-14  Simon Fraser  <simon.fraser@apple.com>
2436
2437         REGRESSION (r183794): Garbage tiles when body background switches to fixed
2438         https://bugs.webkit.org/show_bug.cgi?id=145032
2439         rdar://problem/20963679
2440
2441         Reviewed by Dean Jackson.
2442         
2443         After r183794 (or possibly an earlier commit), we failed to dynamically update
2444         the configuration of layers that handled fixed background attachment on the root.
2445         
2446         This would result in unpainted tiles, and non-fixed-background behavior.
2447         
2448         Fix by calling RenderLayerCompositor::rootOrBodyStyleChanged() whenever the
2449         style changes on the root or body renderers, and triggering a compositing update
2450         if the fixedness of the background changes. It calls the existing rootBackgroundTransparencyChanged()
2451         if the color changes.
2452
2453         Test: platform/mac-wk2/tiled-drawing/toggle-to-fixed-background.html
2454
2455         * rendering/RenderBox.cpp:
2456         (WebCore::RenderBox::styleDidChange):
2457         * rendering/RenderLayerCompositor.cpp:
2458         (WebCore::RenderLayerCompositor::rootOrBodyStyleChanged):
2459         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged):
2460         * rendering/RenderLayerCompositor.h:
2461
2462 2015-05-14  Commit Queue  <commit-queue@webkit.org>
2463
2464         Unreviewed, rolling out r184359 and r184362.
2465         https://bugs.webkit.org/show_bug.cgi?id=145035
2466
2467         Introduced a crash in six media element tests (Requested by
2468         rniwa on #webkit).
2469
2470         Reverted changesets:
2471
2472         "[MediaControls] Refactor media controls & bring improvements
2473         made to iOS controls to Mac."
2474         https://bugs.webkit.org/show_bug.cgi?id=144973
2475         http://trac.webkit.org/changeset/184359
2476
2477         "Unreviewed build fix after r184359; typo."
2478         http://trac.webkit.org/changeset/184362
2479
2480 2015-05-14  Jer Noble  <jer.noble@apple.com>
2481
2482         Unreviewed build fix after r184359; typo.
2483
2484         * html/HTMLMediaElement.cpp:
2485         (WebCore::HTMLMediaElement::layoutSizeChanged):
2486
2487 2015-05-14  Roger Fong  <roger_fong@apple.com>
2488
2489         Adjust button CSS and positioning in preparation.
2490         https://bugs.webkit.org/show_bug.cgi?id=144973.
2491         <rdar://problem/20306227>
2492
2493         Reviewed by Dean Jackson.
2494
2495         The only visual change here is the swapping of the rewind and play button positions.
2496         Also, position buttons based off of both left and right margins instead of just one of the two.
2497         This allows the controls drop off to work without having to use a spacer element to take the place
2498         of the timeline if the controls are too small.
2499         * Modules/mediacontrols/mediaControlsApple.css:
2500         (audio::-webkit-media-controls-rewind-button):
2501         (audio::-webkit-media-controls-play-button):
2502         (audio::-webkit-media-controls-panel .mute-box):
2503         (audio::-webkit-media-controls-wireless-playback-picker-button):
2504         (audio::-webkit-media-controls-toggle-closed-captions-button):
2505         (audio::-webkit-media-controls-fullscreen-button):
2506         (audio::-webkit-media-controls-fullscreen-button.exit):
2507         (audio::-webkit-media-controls-time-remaining-display):
2508         (audio:-webkit-full-screen::-webkit-media-controls-toggle-closed-captions-button):
2509         (audio:-webkit-full-screen::-webkit-media-controls-wireless-playback-picker-button):
2510         * Modules/mediacontrols/mediaControlsApple.js:
2511         (Controller.prototype.configureInlineControls):
2512
2513 2015-05-14  Dean Jackson  <dino@apple.com>
2514
2515         MediaControls: controls are live even when invisible
2516         https://bugs.webkit.org/show_bug.cgi?id=145029
2517         <rdar://problem/20865442>
2518
2519         Reviewed by Jer Noble.
2520
2521         When the controls are invisible they should ignore touch/mouse
2522         events.
2523
2524         * Modules/mediacontrols/mediaControlsiOS.css: Add pointer-events: none where appropriate.
2525         (video::-webkit-media-controls-panel-container):
2526         (video::-webkit-media-controls-panel-background):
2527         (video::-webkit-media-controls-panel):
2528         (video::-webkit-media-controls-panel.paused):
2529
2530 2015-05-14  Jer Noble  <jer.noble@apple.com>
2531
2532         [MediaControls] Refactor media controls & bring improvements made to iOS controls to Mac.
2533         https://bugs.webkit.org/show_bug.cgi?id=144973
2534
2535         Reviewed by Dean Jackson.
2536
2537         Pull improvements made to the iOS media controls back into the Mac controls by moving
2538         code from mediaControlsiOS.js into MediaControlsApple.js.
2539
2540         The largest refactored feature is the ability to drop individual controls from the media
2541         controls when the video is too small to contain them. To allow these controls to resize
2542         dynamically, a new "resize" event is fired inside the media element's shadow DOM.
2543
2544         * Modules/mediacontrols/mediaControlsApple.css:
2545         (audio::-webkit-media-controls-panel .dropped): Added; sets "display: none".
2546         * Modules/mediacontrols/mediaControlsApple.js:
2547         (Controller): Set defaults for new variables.
2548         (Controller.prototype.updateControls): Update the controls width; moved from iOS.js.
2549         (Controller.prototype.handleReadyStateChange): Update the controls; moved from iOS.js.
2550         (Controller.prototype.handleTimeUpdate): Update the progress; moved from iOS.js.
2551         (Controller.prototype.handleTimelineInput): Pause if scrubbing; moved from iOS.js.
2552         (Controller.prototype.handleTimelineChange): Update the progress; moved from iOS.js.
2553         (Controller.prototype.showControls): Update the controls width; moved from iOS.js.
2554         (Controller.prototype.hideControls): Removed _potentiallyScrubbing check; not needed due to changes
2555             to controlsAlwaysVisible().
2556         (Controller.prototype.scheduleUpdateLayoutForDisplayedWidth): Moved from iOS.js.
2557         (Controller.prototype.isControlVisible): Added; checks whether control is parented & not hidden.
2558         (Controller.prototype.updateLayoutForDisplayedWidth): Moved from iOS.js and refactored.
2559         (Controller.prototype.controlsAlwaysVisible): Return true if scrubbing.
2560         (Controller.prototype.updateHasAudio): Check currentPlaybackTargetIsWireless(); moved from iOS.js.
2561         (Controller.prototype.get scrubbing): Simple getter for _scrubbing.
2562         (Controller.prototype.set scrubbing): Check play state if scrubbing; start playback (if necessary)
2563             if not scrubbing.
2564         (Controller.prototype.get pageScaleFactor): Moved from iOS.js.
2565         (Controller.prototype.set pageScaleFactor): Ditto.
2566         (Controller.prototype.handleRootResize): Schedule an update of the contrtols width.
2567
2568         Remove a bunch of newly unnecessary code from the iOS media controls:
2569
2570         * Modules/mediacontrols/mediaControlsiOS.js:
2571         (ControllerIOS):
2572         (ControllerIOS.prototype.createControls): Remove ivars moved into Apple.js.
2573         (ControllerIOS.prototype.configureInlineControls): Remove spacer; made unnecessary.
2574         (ControllerIOS.prototype.showControls): Deleted.
2575         (ControllerIOS.prototype.updateTime): Deleted.
2576         (ControllerIOS.prototype.handleTimelineTouchStart): Just call "scrubbing = true", handled in Apple.js.
2577         (ControllerIOS.prototype.handleTimelineTouchEnd): Just call "scrubbing = false", handled in Apple.js.
2578         (ControllerIOS.prototype.handleReadyStateChange): Deleted.
2579         (ControllerIOS.prototype.setPlaying): Don't check _timelineIsHidden; not needed.
2580         (ControllerIOS.prototype.get pageScaleFactor): Deleted.
2581         (ControllerIOS.prototype.set pageScaleFactor): Deleted.
2582         (ControllerIOS.prototype.scheduleUpdateLayoutForDisplayedWidth): Deleted.
2583         (ControllerIOS.prototypeupdateLayoutForDisplayedWidth): Deleted.
2584
2585         Fire a "resize" event at the shadow DOM root when layout results in a size change.
2586
2587         * html/HTMLMediaElement.cpp:
2588         (WebCore::HTMLMediaElement::layoutSizeChanged): Fire the "resize" event at the shadow DOM.
2589         * html/HTMLMediaElement.h:
2590         * rendering/RenderMedia.cpp:
2591         (WebCore::RenderMedia::layout): Trigger layoutSizeChanged()
2592         * rendering/RenderMedia.h:
2593
2594         Drive-by fixes:
2595
2596         * Modules/mediacontrols/mediaControlsApple.js:
2597         (Controller.prototype.createControls): aria-label text is totally wrong; removed.
2598         (Controller.prototype.updateWirelessPlaybackStatus): Use class-names to hide controls, not inline styles.
2599
2600 2015-05-13  Ryosuke Niwa  <rniwa@webkit.org>
2601
2602         Crash in ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline
2603         https://bugs.webkit.org/show_bug.cgi?id=119068
2604
2605         Reviewed by Enrica Casucci.
2606
2607         The bug was caused by makeInsertedContentRoundTrippableWithHTMLTreeBuilder not updating
2608         nodes kept tracked by insertedNodes and moveNodeOutOfAncestor stumbling upon it.
2609
2610         Fixed the bug by updating insertedNodes in makeInsertedContentRoundTrippableWithHTMLTreeBuilder.
2611
2612         Test: editing/inserting/insert-table-in-paragraph-crash.html
2613
2614         * editing/ReplaceSelectionCommand.cpp:
2615         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
2616         (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor):
2617         * editing/ReplaceSelectionCommand.h:
2618
2619 2015-05-14  Myles C. Maxfield  <mmaxfield@apple.com>
2620
2621         [Mac] Expose more font weights for -apple-system
2622         https://bugs.webkit.org/show_bug.cgi?id=144707
2623
2624         Reviewed by Simon Fraser.
2625
2626         Previously, when we parsed a CSS declaration of the form font: keyword; where keyword
2627         is one of caption, icon, menu, message-box, small-caption, -webkit-mini-control, -webkit-small-control,
2628         or -webkit-control (which html.css does for form controls), we would ask the system what the appropriate
2629         system font is, get that font's family name, and synthesize a font-family CSS property for the element.
2630         Then, later when we actually go to look up the font, we would look up the font by family name using this
2631         information. However, this round-tripping of a font through a family name is actually lossy, and is not
2632         guaranteed to preserve system-font-ness (which we use for various things including metrics calculations).
2633
2634         This patch modifies this logic to specify a token family name instead, which the font lookup code special
2635         cases (and reacts by making the appropriate system-font lookup call). This approach is currently how iOS
2636         handles these system fonts; this patch simply brings this approach to OS X.
2637
2638         There is also an added progression here. We used to simply call [NSFont fontWithName:size:] on the system
2639         font family name (which the parser found for us) which entirely disregards weight. This means that we
2640         used to be getting synthesized bold in form controls which ask for a heavy weight. Migrating to this
2641         system-font aware call means that we get the real bold font instead of synthesized bold.
2642
2643         Once this system-font-ness is guaranteed to be preserved between parsing time and font lookup time, we
2644         can safely migrate to using [NSFont systemFontOfSize:weight] instead of [NSFont systemFontOfSize:] on
2645         platforms which support it.
2646
2647         Tests: fast/text/systemFont.html
2648                fast/css/css2-system-fonts.html
2649                fast/forms/select/optgroup-rendering.html
2650                fast/forms/validation-message-appearance.html
2651
2652         * css/CSSParser.cpp:
2653         (WebCore::CSSParser::parseSystemFont): Add a comment regarding why we are bothering with expanding out
2654         the font property in the first place.
2655         * platform/graphics/cocoa/FontCascadeCocoa.mm:
2656         (WebCore::FontCascade::primaryFontIsSystemFont): Update to use new system font tokens.
2657         * platform/graphics/mac/FontCacheMac.mm:
2658         (WebCore::toNSFontWeight): New static method to map font weights to NSFontWeight constants available on
2659         Yosemite and later.
2660         (WebCore::fontWithFamilySpecialCase): Pull all these special-case font token name handling into a
2661         separate function, which returns an Optional.
2662         (WebCore::fontWithFamily):
2663         * platform/mac/ThemeMac.mm:
2664         (WebCore::ThemeMac::controlFont): Use the font token name instead of the generated system font family
2665         name.
2666         * platform/spi/mac/NSFontSPI.h: Add [NSFont systemFontWithSize:weight:] and the proper NSFontWeight
2667         constants.
2668         * rendering/RenderThemeMac.mm:
2669         (WebCore::RenderThemeMac::updateCachedSystemFontDescription): Use the font token names instead of the
2670         generated system font family name.
2671         (WebCore::RenderThemeMac::setFontFromControlSize): Ditto.
2672
2673 2015-05-14  Roger Fong  <roger_fong@apple.com>
2674
2675         Add internals setting to disable wireless playback availability for layout tests
2676         https://bugs.webkit.org/show_bug.cgi?id=145012.
2677         <rdar://problem/20946504>
2678
2679         Reviewed by Eric Carlson.
2680
2681         * testing/InternalSettings.cpp:
2682         (WebCore::InternalSettings::resetToConsistentState):
2683         (WebCore::InternalSettings::setWirelessPlaybackDisabled):
2684         * testing/InternalSettings.idl:
2685
2686 2015-05-14  Beth Dakin  <bdakin@apple.com>
2687
2688         Change range of possible forces for mouseforcechanged DOM event
2689         https://bugs.webkit.org/show_bug.cgi?id=144987
2690         -and corresponding-
2691         rdar://problem/20472802
2692
2693         Reviewed by Tim Horton.
2694
2695         Change to a 0-3 range.
2696         * platform/PlatformMouseEvent.h:
2697         * platform/mac/PlatformEventFactoryMac.mm:
2698         (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
2699
2700 2015-05-14  Manuel Rego Casasnovas  <rego@igalia.com>
2701
2702         Fix typo in RenderBox::instrinsicScrollbarLogicalWidth()
2703         https://bugs.webkit.org/show_bug.cgi?id=144999
2704
2705         Reviewed by Sergio Villar Senin.
2706
2707         Rename RenderBox::instrinsicScrollbarLogicalWidth() to
2708         RenderBox::intrinsicScrollbarLogicalWidth().
2709
2710         No new tests, no behavior changes.
2711
2712         * rendering/RenderBlock.cpp:
2713         (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
2714         * rendering/RenderBlockFlow.cpp:
2715         (WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
2716         * rendering/RenderBox.cpp:
2717         (WebCore::RenderBox::intrinsicScrollbarLogicalWidth):
2718         (WebCore::RenderBox::instrinsicScrollbarLogicalWidth): Deleted.
2719         * rendering/RenderBox.h:
2720         * rendering/RenderDeprecatedFlexibleBox.cpp:
2721         (WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths):
2722         * rendering/RenderFlexibleBox.cpp:
2723         (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):
2724
2725 2015-05-14  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2726
2727         SharedBuffer::createWithContentsOfFile should use map file routines
2728         https://bugs.webkit.org/show_bug.cgi?id=144192
2729
2730         Reviewed by Darin Adler.
2731
2732         Made use of mmap routines within SharedBuffer::createWithContentsOfFile for EFL, GTK and Mac ports.
2733         If mapping is failing, it falls back to the previous version of SharedBuffer::createWithContentsOfFile renamed as
2734         SharedBuffer::createFromReadingFile (using open/read method).
2735         File content is mapped until SharedBuffer is cleared, destroyed or additional content is appended to the SharedBuffer.
2736
2737         A helper class, MappedFileData, is introduced to handle mapped files through calls to open/mmap/munmap/close.
2738
2739         Patch covered by existing layout tests and added unit tests.
2740
2741         * platform/FileSystem.cpp:
2742         (WebCore::MappedFileData::MappedFileData):
2743         (WebCore::MappedFileData::operator=):
2744         (WebCore::MappedFileData::~MappedFileData):
2745         * platform/FileSystem.h:
2746         (WebCore::MappedFileData::MappedFileData):
2747         (WebCore::MappedFileData::operator bool):
2748         (WebCore::MappedFileData::data):
2749         (WebCore::MappedFileData::size):
2750         * platform/SharedBuffer.cpp:
2751         (WebCore::SharedBuffer::SharedBuffer):
2752         (WebCore::SharedBuffer::createWithContentsOfFile): Making use of MappedFileData before using createFromReadingFile.
2753         (WebCore::SharedBuffer::size): Checking whether data is coming from a MappedFileData.
2754         (WebCore::SharedBuffer::data): Ditto.
2755         (WebCore::SharedBuffer::append): Ditto.
2756         (WebCore::SharedBuffer::clear): Clearing MappedFileData if needed.
2757         (WebCore::SharedBuffer::copy): Transferring mapped data to buffer if needed.
2758         (WebCore::SharedBuffer::getSomeData):
2759         (WebCore::SharedBuffer::maybeTransferMappedFileData):
2760         * platform/SharedBuffer.h:
2761         * platform/gtk/SharedBufferGtk.cpp:
2762         (WebCore::SharedBuffer::createFromReadingFile): renamed from createWithContentsOfFile.
2763         * platform/mac/SharedBufferMac.mm:
2764         (WebCore::SharedBuffer::createFromReadingFile): Dito.
2765         * platform/posix/SharedBufferPOSIX.cpp:
2766         (WebCore::SharedBuffer::createFromReadingFile): Ditto.
2767         * platform/win/SharedBufferWin.cpp:
2768         (WebCore::SharedBuffer::createFromReadingFile): Ditto.
2769
2770 2015-05-13  Simon Fraser  <simon.fraser@apple.com>
2771
2772         Get the ScriptController from the correct frame for media elements and plug-ins
2773         https://bugs.webkit.org/show_bug.cgi?id=144983
2774         rdar://problem/20692642&19943135
2775
2776         Reviewed by Sam Weinig.
2777
2778         HTMLMediaElement, QuickTimePluginReplacement and HTMLPlugInImageElement were
2779         getting the main frame's ScriptController instead of the one for their frame.
2780         This caused media controls JS to be running in the context of the main frame,
2781         which broke media controls which use getCSSCanvasContext() and -webkit-canvas.
2782         
2783         Fix by getting the frame via the element's document.
2784         
2785         Also undo r180584 which was working around this bug.
2786
2787         * Modules/mediacontrols/mediaControlsiOS.js:
2788         (ControllerIOS.prototype.drawTimelineBackground):
2789         * Modules/plugins/QuickTimePluginReplacement.mm:
2790         (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected):
2791         (WebCore::QuickTimePluginReplacement::installReplacement):
2792         * html/HTMLMediaElement.cpp:
2793         (WebCore::HTMLMediaElement::updateCaptionContainer):
2794         (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
2795         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
2796         (WebCore::HTMLMediaElement::pageScaleFactorChanged):
2797         * html/HTMLPlugInImageElement.cpp:
2798         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
2799
2800 2015-05-13  Sungmann Cho  <sungmann.cho@navercorp.com>
2801
2802         Fix trivial typos in ApplyBlockElementCommand
2803         https://bugs.webkit.org/show_bug.cgi?id=144984
2804
2805         Reviewed by Alexey Proskuryakov.
2806
2807         No new tests, no behavior change.
2808
2809         * editing/ApplyBlockElementCommand.cpp:
2810         (WebCore::ApplyBlockElementCommand::formatSelection):
2811         (WebCore::ApplyBlockElementCommand::endOfNextParagraphSplittingTextNodesIfNeeded):
2812         (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded): Deleted.
2813         * editing/ApplyBlockElementCommand.h:
2814
2815 2015-05-13  David Kilzer  <ddkilzer@apple.com>
2816
2817         REGRESION (r179958): Crash in WebCore::DocumentLoader::detachFromFrame when -[id<WebPolicyDelegate> decidePolicyForMIMEType:request:frame:decisionListener:] fails to call -[id<WebPolicyDecisionListener> download|ignore|use]
2818         <http://webkit.org/b/144975>
2819
2820         Reviewed by Andy Estes.
2821
2822         This change reverts r179958.  It changes RELEASE_ASSERT*()
2823         statements back to Debug-only ASSERT*() statements.
2824
2825         * loader/DocumentLoader.cpp:
2826         (WebCore::DocumentLoader::~DocumentLoader):
2827         (WebCore::DocumentLoader::continueAfterContentPolicy):
2828         (WebCore::DocumentLoader::detachFromFrame):
2829
2830 2015-05-13  Antti Koivisto  <antti@apple.com>
2831
2832         Cached CSS image resources don't show up after reloading <http://nightly.webkit.org/start/>
2833         https://bugs.webkit.org/show_bug.cgi?id=144952
2834         rdar://problem/13387307
2835
2836         Reviewed by Oliver Hunt.
2837
2838         This is a symptom of a general problem that we don't revalidate subresources of cached parsed stylesheets.
2839
2840         Fix by tightening the check we perform when choosing to used the cached sheet. If there are expired subresources
2841         we reparse the sheet.
2842
2843         Test: http/tests/cache/stylesheet-sharing.html
2844
2845         * css/CSSCrossfadeValue.cpp:
2846         (WebCore::CSSCrossfadeValue::traverseSubresources):
2847         (WebCore::CSSCrossfadeValue::hasFailedOrCanceledSubresources): Deleted.
2848
2849             Replace hasFailedOrCanceledSubresources with general purpose subresource traversal functions.
2850
2851         * css/CSSCrossfadeValue.h:
2852         * css/CSSFilterImageValue.cpp:
2853         (WebCore::CSSFilterImageValue::traverseSubresources):
2854         (WebCore::CSSFilterImageValue::hasFailedOrCanceledSubresources): Deleted.
2855         * css/CSSFilterImageValue.h:
2856         * css/CSSFontFaceSrcValue.cpp:
2857         (WebCore::CSSFontFaceSrcValue::traverseSubresources):
2858         (WebCore::CSSFontFaceSrcValue::hasFailedOrCanceledSubresources): Deleted.
2859         * css/CSSFontFaceSrcValue.h:
2860         * css/CSSImageSetValue.cpp:
2861         (WebCore::CSSImageSetValue::traverseSubresources):
2862         (WebCore::CSSImageSetValue::hasFailedOrCanceledSubresources): Deleted.
2863         * css/CSSImageSetValue.h:
2864         * css/CSSImageValue.cpp:
2865         (WebCore::CSSImageValue::traverseSubresources):
2866         (WebCore::CSSImageValue::hasFailedOrCanceledSubresources): Deleted.
2867         * css/CSSImageValue.h:
2868         * css/CSSValue.cpp:
2869         (WebCore::CSSValue::traverseSubresources):
2870         (WebCore::CSSValue::hasFailedOrCanceledSubresources): Deleted.
2871         * css/CSSValue.h:
2872         * css/CSSValueList.cpp:
2873         (WebCore::CSSValueList::traverseSubresources):
2874         (WebCore::CSSValueList::hasFailedOrCanceledSubresources): Deleted.
2875         * css/CSSValueList.h:
2876         * css/StyleProperties.cpp:
2877         (WebCore::StyleProperties::traverseSubresources):
2878         (WebCore::StyleProperties::hasFailedOrCanceledSubresources): Deleted.
2879         * css/StyleProperties.h:
2880         * css/StyleSheetContents.cpp:
2881         (WebCore::traverseSubresourcesInRules):
2882         (WebCore::StyleSheetContents::traverseSubresources):
2883         (WebCore::StyleSheetContents::subresourcesAllowReuse):
2884
2885             Disallow reuse if there are expired subresources.
2886
2887         (WebCore::StyleSheetContents::isLoadingSubresources):
2888
2889             Testing support.
2890
2891         (WebCore::childRulesHaveFailedOrCanceledSubresources): Deleted.
2892         (WebCore::StyleSheetContents::hasFailedOrCanceledSubresources): Deleted.
2893         * css/StyleSheetContents.h:
2894         (WebCore::StyleSheetContents::loadCompleted):
2895         * html/HTMLLinkElement.cpp:
2896         (WebCore::HTMLLinkElement::setCSSStyleSheet):
2897         * loader/cache/CachedCSSStyleSheet.cpp:
2898         (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
2899         * loader/cache/CachedCSSStyleSheet.h:
2900         * loader/cache/CachedImage.cpp:
2901         (WebCore::CachedImage::makeRevalidationDecision):
2902         (WebCore::CachedImage::mustRevalidateDueToCacheHeaders): Deleted.
2903
2904             Move the logging code out from this function (it requires frame access this function doesn't otherwise need)
2905             and refactor to return a decision enum.
2906
2907         * loader/cache/CachedImage.h:
2908         * loader/cache/CachedResource.cpp:
2909         (WebCore::CachedResource::makeRevalidationDecision):
2910         (WebCore::logResourceRevalidationReason): Deleted.
2911         (WebCore::CachedResource::mustRevalidateDueToCacheHeaders): Deleted.
2912         * loader/cache/CachedResource.h:
2913         (WebCore::CachedResource::loadFailedOrCanceled):
2914         * loader/cache/CachedResourceLoader.cpp:
2915         (WebCore::logRevalidation):
2916         (WebCore::logResourceRevalidationDecision):
2917         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
2918
2919             Move logging here.
2920
2921         * testing/Internals.cpp:
2922         (WebCore::Internals::isSharingStyleSheetContents):
2923         (WebCore::Internals::isStyleSheetLoadingSubresources):
2924         * testing/Internals.h:
2925         * testing/Internals.idl:
2926
2927 2015-05-13  Ryuan Choi  <ryuan.choi@navercorp.com>
2928
2929         [CoordinatedGraphics] Remove scaleFactor from SurfaceUpdateInfo
2930         https://bugs.webkit.org/show_bug.cgi?id=144935
2931
2932         Reviewed by Darin Adler.
2933
2934         The members of SurfaceUpdateInfo are only used to update tile except scaleFactor.
2935         So, this patch removes scaleFactor from SurfaceUpdateInfo.
2936         In addition, removes unnecessary parameters in createTile() 
2937
2938         No new tests because there is no behavior change.
2939
2940         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2941         (WebCore::CoordinatedGraphicsLayer::createTile):
2942         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2943         * platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
2944         (WebCore::CoordinatedTile::updateBackBuffer):
2945         * platform/graphics/texmap/coordinated/CoordinatedTile.h:
2946         * platform/graphics/texmap/coordinated/SurfaceUpdateInfo.h:
2947
2948 2015-05-13  Sam Weinig  <sam@webkit.org>
2949
2950         Modernize ContainerNode::childElementCount
2951         https://bugs.webkit.org/show_bug.cgi?id=144930
2952
2953         Reviewed by Darin Adler.
2954
2955         * dom/ContainerNode.cpp:
2956         (WebCore::ContainerNode::childElementCount):
2957         Use std::distance to compute the number of child elements.
2958
2959         * dom/ElementChildIterator.h:
2960         Add typedefs to make the child element iterators conform STL standards.
2961
2962 2015-05-13  Ryosuke Niwa  <rniwa@webkit.org>
2963
2964         REGRESSION(r183770): Crash inside WebEditorClient::shouldApplyStyle when applying underline
2965         https://bugs.webkit.org/show_bug.cgi?id=144949
2966         <rdar://problem/20895753>
2967
2968         Reviewed by Darin Adler.
2969
2970         The crash was caused by the variant of applyStyleToSelection that takes EditingStyle passing
2971         a null pointer to shouldApplyStyle when we're only applying text decoration changes so that
2972         m_mutableStyle in the editing style is null. This didn't reproduce in execCommand since we
2973         wouldn't call shouldApplyStyle in that case. It didn't reproduce in my manual testing because
2974         font panel also sets text shadow, which ends up filling up m_mutableStyle.
2975
2976         Fixed the bug by creating a mutable style properties when one is not provided by EditingStyle.
2977         Also fixed the "FIXME" in the function by converting text decoration changes to a corresponding
2978         text decoration value. The values passed to shouldApplyStyle now matches the old behavior prior
2979         to r183770.
2980
2981         Test: editing/style/underline-by-user.html
2982
2983         * editing/EditingStyle.cpp:
2984         (WebCore::EditingStyle::styleWithResolvedTextDecorations): Added.
2985         * editing/EditingStyle.h:
2986         * editing/Editor.cpp:
2987         (WebCore::Editor::applyStyleToSelection): Use styleWithResolvedTextDecorations to avoid the crash.
2988
2989 2015-05-13  Eric Carlson  <eric.carlson@apple.com>
2990
2991         Work around HTMLMediaElement::documentDidResumeFromPageCache being called twice
2992         https://bugs.webkit.org/show_bug.cgi?id=144969
2993
2994         Reviewed by Alexey Proskuryakov.
2995
2996         * dom/Document.cpp:
2997         (WebCore::Document::addPlaybackTargetPickerClient): Replace ASSERT with early 
2998         return to work around https://webkit.org/b/144970.
2999
3000 2015-05-13  Timothy Horton  <timothy_horton@apple.com>
3001
3002         Going back after resizing causes scroll knob to appear in the middle of the page
3003         https://bugs.webkit.org/show_bug.cgi?id=144968
3004         <rdar://problem/18299827>
3005
3006         Reviewed by Beth Dakin.
3007
3008         * history/CachedPage.cpp:
3009         (WebCore::CachedPage::restore):
3010         (WebCore::CachedPage::clear):
3011         * history/CachedPage.h:
3012         (WebCore::CachedPage::markForContentsSizeChanged):
3013         * history/PageCache.cpp:
3014         (WebCore::PageCache::markPagesForContentsSizeChanged):
3015         * history/PageCache.h:
3016         Add a flag that will cause us to call updateContentsSize() after a page
3017         comes out of the page cache, if necessary.
3018
3019         * page/FrameView.cpp:
3020         (WebCore::FrameView::setContentsSize):
3021         * page/FrameView.h:
3022         Mark all cached pages for this frame as needing updateContentsSize()
3023         when setContentsSize happens. This will ensure that scrollbar layers
3024         are repositioned when coming out of the page cache.
3025
3026 2015-05-13  Beth Dakin  <bdakin@apple.com>
3027
3028         Need SPI to set the overlay scroll bar style
3029         https://bugs.webkit.org/show_bug.cgi?id=144928
3030         -and corresponding-
3031         rdar://problem/20143614
3032
3033         Reviewed by Anders Carlsson.
3034
3035         New ChromeClient function preferredScrollbarOverlayStyle() will fetch the 
3036         scrollbar style that was set via the new SPI.
3037         * page/ChromeClient.h:
3038
3039         If the preferredScrollbarOverlayStyle() is anything but None, then use it. None is 
3040         used to indicate that the normal heuristic should compute the appropriate color.
3041         * page/FrameView.cpp:
3042         (WebCore::FrameView::recalculateScrollbarOverlayStyle):
3043         * page/FrameView.h:
3044
3045 2015-05-13  Brent Fulgham  <bfulgham@apple.com>
3046
3047         Scrollbars in overflow regions are not vanishing after scrolling with scroll snap points
3048         https://bugs.webkit.org/show_bug.cgi?id=142521
3049         <rdar://problem/20100706>
3050
3051         Reviewed by Darin Adler.
3052
3053         The scrollbars were not being dismissed because they were not being notified that the wheel
3054         gesture was finished. This was happening because the wheel event 'ended' state has zero
3055         deltaX and deltaY. If the region did not allow stretching, it would exit early, never passing
3056         through the 'handleWheelEventPhase' code that would notify the scrollbar controller that
3057         the gesture had ended.
3058
3059         * platform/ScrollableArea.cpp:
3060         (WebCore::ScrollableArea::mouseExitedContentArea): The wrong ScrollAnimator method was being
3061         called when the mouse exited the content area.
3062         * platform/mac/ScrollAnimatorMac.mm:
3063         (WebCore::ScrollAnimatorMac::handleWheelEvent): Do not early return when the wheel event has
3064         no change in X or Y coordinate.
3065
3066 2015-05-12  David Hyatt  <hyatt@apple.com>
3067
3068         Don't compute selection painting info when we don't have selection.
3069         https://bugs.webkit.org/show_bug.cgi?id=144920
3070         <rdar://problem/20919920>
3071
3072         Reviewed by Simon Fraser.
3073
3074         * rendering/InlineTextBox.cpp:
3075         (WebCore::InlineTextBox::paint):
3076
3077         Just set the selection paint style to the text paint style when we don't have a selection
3078         at all. Computing the selection style takes time in the case where a ::selection pseudo is
3079         used on the page, so we don't want to waste time computing that info unless it's actually
3080         needed.
3081
3082 2015-05-13  Joseph Pecoraro  <pecoraro@apple.com>
3083
3084         Pass String as reference in more places
3085         https://bugs.webkit.org/show_bug.cgi?id=144769
3086
3087         Reviewed by Daniel Bates.
3088
3089         * bindings/js/SerializedScriptValue.cpp:
3090         (WebCore::CloneSerializer::dumpString):
3091         (WebCore::CloneSerializer::dumpStringObject):
3092         * dom/DocumentMarkerController.cpp:
3093         (WebCore::DocumentMarkerController::addMarker):
3094         * dom/DocumentMarkerController.h:
3095         * inspector/InspectorApplicationCacheAgent.cpp:
3096         (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
3097         * inspector/InspectorApplicationCacheAgent.h:
3098         * inspector/InspectorNodeFinder.cpp:
3099         (WebCore::stripCharacters):
3100         (WebCore::InspectorNodeFinder::InspectorNodeFinder):
3101         * inspector/InspectorNodeFinder.h:
3102
3103 2015-05-13  Timothy Horton  <timothy_horton@apple.com>
3104
3105         View scale changes are temporarily lost after restoring a page from the page cache
3106         https://bugs.webkit.org/show_bug.cgi?id=144934
3107
3108         Reviewed by Brady Eidson.
3109
3110         * history/CachedPage.cpp:
3111         (WebCore::CachedPage::CachedPage):
3112         (WebCore::CachedPage::restore):
3113         (WebCore::CachedPage::clear):
3114         * history/CachedPage.h:
3115         (WebCore::CachedPage::markForDeviceOrPageScaleChanged): Renamed.
3116         * history/PageCache.cpp:
3117         (WebCore::PageCache::markPagesForDeviceOrPageScaleChanged): Renamed.
3118         * history/PageCache.h:
3119         Rename PageCache/CachedPage methods to make it more clear that they
3120         will eventually result in calling deviceOrPageScaleFactorChanged().
3121         Also, use modern initialization for CachedPage members.
3122
3123         * loader/HistoryController.cpp:
3124         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
3125         (WebCore::HistoryController::restoreScrollPositionAndViewState):
3126         Store the pageScaleFactor on HistoryItem with the view scale factored out,
3127         because the view scale can change while the page is in the page cache, and
3128         WebCore needs a way - without consulting with WebKit2 - to apply the changed
3129         view scale to the cached page scale.
3130
3131         * page/Page.cpp:
3132         (WebCore::Page::setViewScaleFactor):
3133         (WebCore::Page::setDeviceScaleFactor):
3134         * page/Page.h:
3135         (WebCore::Page::viewScaleFactor):
3136         Keep track of the viewScaleFactor, and mark all pages in the page cache
3137         as needing to call deviceOrPageScaleFactorChanged and do a full style recalc
3138         when they come back from the page cache.
3139
3140         For now, we expect all callers of setPageScaleFactor (including WebKit2 and
3141         HistoryController) to multiply the viewScale in manually, to avoid the
3142         significant amount of change in WebCore that would be required to keep them
3143         totally separately.
3144
3145 2015-05-12  Zan Dobersek  <zdobersek@igalia.com>
3146
3147         Reduce TransformationMatrix copies in MatrixTransformOperation, Matrix3DTransformOperation
3148         https://bugs.webkit.org/show_bug.cgi?id=144797
3149
3150         Reviewed by Darin Adler.
3151
3152         Using std::swap() on TransformationMatrix objects which don't
3153         provide move constructors will result in copies.
3154
3155         Instead, use a helper function in both MatrixTransformOperation
3156         and Matrix3DTransformOperation that calls TransformationMatrix::blend()
3157         and returns the new Matrix(3D)TransformOperation object, and call it
3158         with fromT and toT arguments switched when blending to identity.
3159
3160         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
3161         (WebCore::createOperation):
3162         (WebCore::Matrix3DTransformOperation::blend):
3163         * platform/graphics/transforms/Matrix3DTransformOperation.h: No need
3164         to copy the m_matrix member, it won't change when passed to
3165         TransformationMatrix::multiply().
3166         * platform/graphics/transforms/MatrixTransformOperation.cpp:
3167         (WebCore::createOperation):
3168         (WebCore::MatrixTransformOperation::blend):
3169
3170 2015-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3171
3172         [EGL][X11] XPixmap created in GLContextEGL::createPixmapContext() is leaked
3173         https://bugs.webkit.org/show_bug.cgi?id=144909
3174
3175         Reviewed by Sergio Villar Senin and Žan Doberšek.
3176
3177         The pixmap is created and passed to eglCreatePixmapSurface(), but
3178         never released. eglCreatePixmapSurface() doesn't take the
3179         ownership of the pixmap, so we should explicitly free it when the
3180         GLContextEGL is destroyed.
3181
3182         * platform/graphics/egl/GLContextEGL.cpp:
3183         (WebCore::GLContextEGL::createPixmapContext): Use XUniquePixmap
3184         and transfer the ownership to the context by using the new
3185         constructor that receives a XUniquePixmap&&.
3186         (WebCore::GLContextEGL::createContext): createPixmapContext() is
3187         now only defined for X11.
3188         (WebCore::GLContextEGL::GLContextEGL): New constructor that
3189         receives a XUniquePixmap&&.
3190         * platform/graphics/egl/GLContextEGL.h: Add new constructor and
3191         initialize the cairo device when defined to simplify constructors.
3192
3193 2015-05-12  Sungmann Cho  <sungmann.cho@navercorp.com>
3194
3195         Reindent DIBPixelData.h for consistency.
3196         https://bugs.webkit.org/show_bug.cgi?id=144942
3197
3198         Reviewed by Darin Adler.
3199
3200         No new tests, no behavior change.
3201
3202         * platform/graphics/win/DIBPixelData.h:
3203         (WebCore::DIBPixelData::DIBPixelData):
3204         (WebCore::DIBPixelData::buffer):
3205         (WebCore::DIBPixelData::bufferLength):
3206         (WebCore::DIBPixelData::size):
3207         (WebCore::DIBPixelData::bytesPerRow):
3208         (WebCore::DIBPixelData::bitsPerPixel):
3209
3210 2015-05-12  Commit Queue  <commit-queue@webkit.org>
3211
3212         Unreviewed, rolling out r184224.
3213         https://bugs.webkit.org/show_bug.cgi?id=144946
3214
3215         Made inspector/page/main-frame-resource.html assert every time
3216         (Requested by ap on #webkit).
3217
3218         Reverted changeset:
3219
3220         "Web Inspector: REGRESSION (r181625): Timeline recording
3221         started from console.profile is always empty"
3222         https://bugs.webkit.org/show_bug.cgi?id=144882
3223         http://trac.webkit.org/changeset/184224
3224
3225 2015-05-12  Jer Noble  <jer.noble@apple.com>
3226
3227         [Mac] Hang in MediaPlayerPrivateAVFoundationObjC::audioSourceProvider() - 'tracks' property not yet loaded
3228         https://bugs.webkit.org/show_bug.cgi?id=144937
3229
3230         Reviewed by Eric Carlson.
3231
3232         Querying for the -[AVAsset tracks] property blocks for network loading; and could
3233         block forever if the asset in question is not reachable. Add a "safe" mechanism for
3234         querying the list of audible tracks, and use that when providing the audioSourceProvider()
3235         with an audible track.
3236
3237         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3238         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3239         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
3240         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
3241         (WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider):
3242         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):
3243         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeAVAssetTracksForAudibleMedia):
3244
3245 2015-05-12  Ryosuke Niwa  <rniwa@webkit.org>
3246
3247         Mac build fix after r184228.
3248
3249         * bindings/scripts/CodeGeneratorJS.pm:
3250
3251 2015-05-12  Simon Fraser  <simon.fraser@apple.com>
3252
3253         Turn antialiased font dilation off by default
3254         https://bugs.webkit.org/show_bug.cgi?id=144940
3255         rdar://problem/20923031
3256
3257         Reviewed by Sam Weinig.
3258
3259         Turn antialised font dilation off by default.
3260
3261         * page/Settings.cpp:
3262         (WebCore::Settings::Settings):
3263         * platform/graphics/FontCascade.cpp:
3264
3265 2015-05-12  Alex Christensen  <achristensen@webkit.org>
3266
3267         Don't export all JS bindings classes.
3268         https://bugs.webkit.org/show_bug.cgi?id=144932
3269
3270         Reviewed by Dan Bernstein.
3271
3272         This change is good if it compiles and links successfully.
3273
3274         * bindings/scripts/CodeGeneratorJS.pm:
3275         (ExportLabelForClass):
3276         Add a list of the JS bindings classes that need WEBCORE_EXPORT to prevent exporting too many symbols from WebCore.
3277         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
3278         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
3279         * bindings/scripts/test/JS/JSTestEventConstructor.h:
3280         * bindings/scripts/test/JS/JSTestEventTarget.h:
3281         * bindings/scripts/test/JS/JSTestException.h:
3282         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
3283         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3284         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3285         * bindings/scripts/test/JS/JSTestNode.h:
3286         * bindings/scripts/test/JS/JSTestNondeterministic.h:
3287         * bindings/scripts/test/JS/JSTestObj.h:
3288         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
3289         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
3290         * bindings/scripts/test/JS/JSTestTypedefs.h:
3291         * bindings/scripts/test/JS/JSattribute.h:
3292         * bindings/scripts/test/JS/JSreadonly.h:
3293         Update bindings tests to remove WEBCORE_EXPORT from most of the tests,
3294         but keep one test with WEBCORE_EXPORT and one test with WEBCORE_TESTSUPPORT_EXPORT.
3295
3296 2015-05-12  Brent Fulgham  <bfulgham@apple.com>
3297
3298         [Win] Update DXSDK_DIR settings for build system.
3299
3300         Unreviewed build fix.
3301
3302         * WebCore.vcxproj/WebCore.proj: Add DXSDK_DIR definition for builder.
3303
3304 2015-05-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3305
3306         Return Ref instead of PassRefPtr in create() factory functions of WebCore/dom
3307         https://bugs.webkit.org/show_bug.cgi?id=144904
3308
3309         Reviewed by Andreas Kling.
3310
3311         We return Ref when we're sure if pointer can't be null. If not, we use RefPtr instead PassRefPtr.
3312
3313         No new tests, no behavior changes.
3314
3315         * dom/AutocompleteErrorEvent.h:
3316         * dom/DOMNamedFlowCollection.h:
3317         (WebCore::DOMNamedFlowCollection::create):
3318         * dom/MessageChannel.h:
3319         (WebCore::MessageChannel::create):
3320         * dom/MessagePort.h:
3321         * dom/MutationObserver.cpp:
3322         (WebCore::MutationObserver::create):
3323         * dom/MutationObserver.h:
3324         * dom/NamedFlowCollection.h:
3325         * dom/NodeFilter.h:
3326         (WebCore::NodeFilter::create):
3327         * dom/NodeIterator.h:
3328         (WebCore::NodeIterator::create):
3329         * dom/ProcessingInstruction.cpp:
3330         (WebCore::ProcessingInstruction::create):
3331         * dom/ProcessingInstruction.h:
3332         * dom/ScriptedAnimationController.h:
3333         (WebCore::ScriptedAnimationController::create):
3334         * dom/SecurityPolicyViolationEvent.h:
3335         * dom/StaticNodeList.h:
3336         * dom/TemplateContentDocumentFragment.h:
3337         * dom/Touch.cpp:
3338         (WebCore::Touch::cloneWithNewTarget):
3339         * dom/Touch.h:
3340         (WebCore::Touch::create):
3341         * dom/TouchEvent.h:
3342         * dom/TouchList.h:
3343         (WebCore::TouchList::create):
3344         * dom/TreeWalker.h:
3345         (WebCore::TreeWalker::create):
3346         * dom/WebKitNamedFlow.cpp:
3347         (WebCore::WebKitNamedFlow::create):
3348         * dom/WebKitNamedFlow.h:
3349         * dom/default/PlatformMessagePortChannel.cpp:
3350         (WebCore::PlatformMessagePortChannel::create):
3351         * dom/default/PlatformMessagePortChannel.h:
3352         (WebCore::PlatformMessagePortChannel::MessagePortQueue::create):
3353
3354 2015-05-12  Matt Baker  <mattbaker@apple.com>
3355
3356         Web Inspector: REGRESSION (r181625): Timeline recording started from console.profile is always empty
3357         https://bugs.webkit.org/show_bug.cgi?id=144882
3358
3359         Reviewed by Brian Burg.
3360
3361         A timeline recording will always be stopped before the end of the current run loop is observed. Before
3362         dispatching the recording stopped event, the last run loop record must be completed and sent to the frontend
3363         to prevent it from being discarded.
3364
3365         * inspector/InspectorTimelineAgent.cpp:
3366         (WebCore::InspectorTimelineAgent::internalStop):
3367
3368 2015-05-12  Zalan Bujtas  <zalan@apple.com>
3369
3370         REGRESSION(r175617): Some text doesn't render on internationalculinarycenter.com
3371         https://bugs.webkit.org/show_bug.cgi?id=144917
3372         rdar://problem/20545878
3373
3374         Reviewed by Andreas Kling.
3375
3376         This patch ensures that text stroke width value is taken into account while
3377         calculating visual overflow for simple line layout.
3378         Ceiling the text stroke width value matches the normal text layout behaviour.
3379
3380         Test: fast/text/simple-line-layout-text-stroke-width.html
3381
3382         * rendering/SimpleLineLayoutFunctions.cpp:
3383         (WebCore::SimpleLineLayout::paintFlow):
3384         (WebCore::SimpleLineLayout::collectFlowOverflow):
3385
3386 2015-05-12  Alexey Proskuryakov  <ap@apple.com>
3387
3388         Build fix.
3389
3390         * platform/spi/cf/CFNetworkSPI.h:
3391
3392 2015-05-12  Brent Fulgham  <bfulgham@apple.com>
3393
3394         ROLLOUT [Win] Unreviewed build fix for older DirectX build environments.
3395
3396         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3397
3398 2015-05-12  Joanmarie Diggs  <jdiggs@igalia.com>
3399
3400         AX: [ATK] ARIA menu items should not have anonymous block children
3401         https://bugs.webkit.org/show_bug.cgi?id=144653
3402
3403         Reviewed by Chris Fleizach.
3404
3405         Exclude anonymous block children of menu items from the accessible tree
3406         for ATK. Exclude list markers from the accessibility tree if the parent
3407         is not being exposed as an accessible list item.
3408
3409         No new tests. Instead, modified the existing tests to reflect the correct
3410         behavior.
3411
3412         * accessibility/AccessibilityRenderObject.cpp:
3413         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3414         * accessibility/atk/AccessibilityObjectAtk.cpp:
3415         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
3416
3417 2015-05-08  Alexey Proskuryakov  <ap@apple.com>
3418
3419         [Mac] Share cookie storage between UI process and secondary processes
3420         https://bugs.webkit.org/show_bug.cgi?id=144820
3421         rdar://problem/20572830
3422
3423         Reviewed by Darin Adler.
3424
3425         * platform/network/mac/CookieJarMac.mm:
3426         * platform/spi/cf/CFNetworkSPI.h:
3427         Moved SPIs into an SPI header, so that WebKit2 could use them too without duplication.
3428
3429 2015-05-12  Chris Dumez  <cdumez@apple.com>
3430
3431         [WK2] Log using diagnostic logging how far back in history we navigate
3432         https://bugs.webkit.org/show_bug.cgi?id=144919
3433         <rdar://problem/20920043>