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