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