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