Phrasing content should be accepted in <mo> elements
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-06-28  Frederic Wang  <fwang@igalia.com>
2
3         Phrasing content should be accepted in <mo> elements
4         https://bugs.webkit.org/show_bug.cgi?id=130245
5
6         Reviewed by Brent Fulgham.
7
8         After r202420, the RenderMathMLOperator element no longer messes with anonymous block and
9         text nodes. Hence it is now safe to allow foreign content inside <mo>.
10
11         We extend foreign-element-in-token.html to cover the mo case.
12
13         * mathml/MathMLTextElement.cpp:
14         (WebCore::MathMLTextElement::childShouldCreateRenderer): Remove the early return for <mo> so
15         that it accepts phrasing content children.
16
17 2016-06-27  Anders Carlsson  <andersca@apple.com>
18
19         WebKit::WebPaymentCoordinator leak
20         https://bugs.webkit.org/show_bug.cgi?id=159168
21         rdar://problem/26929772
22
23         Reviewed by Beth Dakin.
24
25         * Modules/applepay/PaymentCoordinator.cpp:
26         (WebCore::PaymentCoordinator::~PaymentCoordinator):
27         Call paymentCoordinatorDestroyed().
28
29         * Modules/applepay/PaymentCoordinatorClient.h:
30         Rename mainFrameDestroyed to paymentCoordinatorDestroyed().
31
32         * loader/EmptyClients.cpp:
33
34 2016-06-28  Frederic Wang  <fwang@igalia.com>
35
36         Remove anonymous in renderName for all MathML renderers but RenderMathMLOperator
37         https://bugs.webkit.org/show_bug.cgi?id=159114
38
39         Reviewed by Martin Robinson.
40
41         After r202420, the only anonymous MathML renderers are the RenderMathMLOperators created by
42         the mfenced element. Hence we remove the special case for anonymous in the renderName
43         implementation of most MathML renderers.
44
45         No new tests, behavior unchanged.
46
47         * rendering/mathml/RenderMathMLRow.h:
48         * rendering/mathml/RenderMathMLSpace.h:
49         * rendering/mathml/RenderMathMLToken.h:
50
51 2016-06-28  Adam Bergkvist  <adam.bergkvist@ericsson.com>
52
53         WebRTC: Robustify 'this' type check in RTCPeerConnection JS built-ins
54         https://bugs.webkit.org/show_bug.cgi?id=158831
55
56         Reviewed by Youenn Fablet.
57
58         Use @operations slot in RTCPeerConnection type check.
59
60         Updated results of existing test.
61
62         * Modules/mediastream/RTCPeerConnection.js:
63         (initializeRTCPeerConnection):
64         Initialize @operations slot in constructor.
65         * Modules/mediastream/RTCPeerConnectionInternals.js:
66         (isRTCPeerConnection):
67         Use @operations slot in type check.
68
69 2016-06-28  Frederic Wang  <fwang@igalia.com>
70
71         AX: Remove dead code in AccessibilityRenderObject::textUnderElement
72         https://bugs.webkit.org/show_bug.cgi?id=159205
73
74         Reviewed by Joanmarie Diggs.
75
76         RenderMathMLOperator used to destroy its descendants and to replace them with an anonymous
77         text node wrapped inside anonymous blocks. After r202420, it just behaves as any other token
78         elements. Hence we remove the code in AccessibilityRenderObject::textUnderElement that was
79         used to handle this specific render tree structure.
80
81         No new tests, already covered by accessibility/math-text.html.
82
83         * accessibility/AccessibilityRenderObject.cpp:
84         (WebCore::AccessibilityRenderObject::textUnderElement): Remove dead code for RenderText and RenderMathMLOperator.
85
86 2016-06-28  Per Arne Vollan  <pvollan@apple.com>
87
88         [Win] Custom elements tests are failing.
89         https://bugs.webkit.org/show_bug.cgi?id=159139
90
91         Reviewed by Alex Christensen.
92
93         Fix compile errors after enabling custom element API.
94
95         * bindings/js/JSHTMLElementCustom.cpp:
96         (WebCore::constructJSHTMLElement):
97         * dom/CustomElementDefinitions.cpp:
98         (WebCore::CustomElementDefinitions::addElementDefinition):
99         * dom/Document.cpp:
100         (WebCore::createHTMLElementWithNameValidation):
101         (WebCore::createFallbackHTMLElement):
102         * dom/Element.cpp:
103         (WebCore::Element::attributeChanged):
104         * dom/LifecycleCallbackQueue.cpp:
105         (WebCore::LifecycleQueueItem::LifecycleQueueItem):
106         (WebCore::LifecycleCallbackQueue::enqueueElementUpgrade):
107         (WebCore::LifecycleCallbackQueue::enqueueAttributeChangedCallback):
108         * html/parser/HTMLConstructionSite.cpp:
109         (WebCore::HTMLConstructionSite::insertHTMLElementOrFindCustomElementInterface):
110         (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
111         * html/parser/HTMLDocumentParser.cpp:
112         (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder):
113         * html/parser/HTMLTreeBuilder.cpp:
114         (WebCore::CustomElementConstructionData::CustomElementConstructionData):
115         (WebCore::HTMLTreeBuilder::insertGenericHTMLElement):
116         * html/parser/HTMLTreeBuilder.h:
117
118 2016-06-28  Philippe Normand  <pnormand@igalia.com>
119
120         [GStreamer] usec rounding is wrong during accurate seeking
121         https://bugs.webkit.org/show_bug.cgi?id=90734
122
123         Reviewed by Carlos Garcia Campos.
124
125         Use floor() to round the microseconds value, this is more robust
126         than roundf.
127
128         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
129         (WebCore::toGstClockTime):
130         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
131         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
132
133 2016-06-28  Philippe Normand  <pnormand@igalia.com>
134
135         [GStreamer] improved duration query support in the HTTP source element
136         https://bugs.webkit.org/show_bug.cgi?id=159204
137
138         Reviewed by Carlos Garcia Campos.
139
140         When we have the Content-Length value it is possible to infer the TIME
141         duration in most cases by performing a convert query in the downstream
142         elements. This is especially useful when the duration query wasn't
143         managed by the sinks and thus reached the source element.
144
145         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
146         (webKitWebSrcQueryWithParent):
147
148 2016-06-28  Youenn Fablet  <youenn@apple.com>
149
150         Binding generator should generate accessors for constructors safely accessed from JS builtin
151         https://bugs.webkit.org/show_bug.cgi?id=159087
152
153         Reviewed by Alex Christensen.
154
155         Removed constructor private slots direct additions in JSDOMGlobalObject.
156         Added support for generating the code that will do that.
157         Advantage of the implementation:
158         - Private slots will expose constructors that are also publically visible (previously workers had some private slots filled with WebRTC constructors).
159         - Private slots no longer require the creation of the constructors at window creation time.
160
161         Although PublicIdentifier and PrivateIdentifier are both added where needed, the binding generator does not
162         support the case of a constructor accessible only privately.
163
164         Covered by existing test set and adding binding test.
165
166         * Modules/mediastream/MediaStream.idl: Marked as PublicIdentifier/PrivateIdentifier.
167         * Modules/mediastream/MediaStreamTrack.idl: Ditto.
168         * Modules/mediastream/RTCIceCandidate.idl: Ditto.
169         * Modules/mediastream/RTCSessionDescription.idl: Ditto.
170         * Modules/streams/ReadableStream.idl: Ditto.
171         * bindings/js/JSDOMGlobalObject.cpp:
172         (WebCore::JSDOMGlobalObject::addBuiltinGlobals): Removed unneeded additions.
173         * bindings/scripts/CodeGeneratorJS.pm:
174         (GenerateImplementation): Added support for private slots for interface constructors marked as
175         PrivateIdentifier.
176         * bindings/scripts/preprocess-idls.pl:
177         (GenerateConstructorAttribute): Make PublicIdentifier/PrivateIdentifier copied interface attributes.
178         * bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.cpp:
179         (webkit_dom_test_global_object_set_property):
180         (webkit_dom_test_global_object_get_property):
181         (webkit_dom_test_global_object_class_init):
182         (webkit_dom_test_global_object_get_public_and_private_attribute):
183         (webkit_dom_test_global_object_set_public_and_private_attribute):
184         * bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.h:
185         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
186         (WebCore::JSTestGlobalObject::finishCreation):
187         (WebCore::jsTestGlobalObjectPublicAndPrivateAttribute):
188         (WebCore::setJSTestGlobalObjectPublicAndPrivateAttribute):
189         * bindings/scripts/test/ObjC/DOMTestGlobalObject.h:
190         * bindings/scripts/test/ObjC/DOMTestGlobalObject.mm:
191         (-[DOMTestGlobalObject publicAndPrivateAttribute]):
192         (-[DOMTestGlobalObject setPublicAndPrivateAttribute:]):
193         * bindings/scripts/test/TestGlobalObject.idl:
194
195
196 2016-06-27  Jer Noble  <jer.noble@apple.com>
197
198         REGRESSION?(r202466): http/tests/security/canvas-remote-read-remote-video-redirect.html failing on Sierra
199         https://bugs.webkit.org/show_bug.cgi?id=159172
200         <rdar://problem/27030025>
201
202         Reviewed by Brent Fulgham.
203
204         Add a hasSingleSecurityOrigin property to WebCoreNSURLSession that gets updated each time one of that
205         sessions' tasks receieves a response or a redirect request. Check that property from the MediaPlayerPrivate.
206
207         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
208         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin):
209         * platform/network/cocoa/WebCoreNSURLSession.h:
210         * platform/network/cocoa/WebCoreNSURLSession.mm:
211         (-[WebCoreNSURLSession updateHasSingleSecurityOrigin:]):
212         (-[WebCoreNSURLSession dataTaskWithRequest:]):
213         (-[WebCoreNSURLSession dataTaskWithURL:]):
214         (-[WebCoreNSURLSessionDataTask resource:receivedResponse:]):
215         (-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:]):
216
217 2016-06-27  Alex Christensen  <achristensen@webkit.org>
218
219         CMake build fix.
220
221         * PlatformMac.cmake:
222
223 2016-06-27  Youenn Fablet  <youenn@apple.com>
224
225         Remove didFailAccessControlCheck ThreadableLoaderClient callback
226         https://bugs.webkit.org/show_bug.cgi?id=159149
227
228         Reviewed by Daniel Bates.
229
230         Adding an AccessControl ResourceError type.
231         Replacing didFailAccessControlCheck callback by a direct call to didFail with an error of type AccessControl.
232
233         Making CrossOriginPreflightChecker always return an AccessControl error. Previously some errors created below
234         were passed directly to threadable loader clients.
235
236         When doing preflight on unauthorized web sites, WTR/DRT will trigger a cancellation error which was translating into an abort event in XMLHttpRequest.
237         This patch is changing the error type to AccessControl, which translates into an error event in XMLHttpReauest.
238
239         This change of behavior is seen in imported/w3c/web-platform-tests/XMLHttpRequest/send-authentication-cors-setrequestheader-no-cred.htm.
240         No other observable change of behavior should be expected.
241
242         * inspector/InspectorNetworkAgent.cpp: Computing error message in didFail according the error type.
243         * loader/CrossOriginPreflightChecker.cpp:
244         (WebCore::CrossOriginPreflightChecker::validatePreflightResponse): Setting preflightFailure error type to AccessControl.
245         (WebCore::CrossOriginPreflightChecker::notifyFinished): Ditto.
246         (WebCore::CrossOriginPreflightChecker::doPreflight): Ditto.
247         * loader/DocumentThreadableLoader.cpp:
248         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest): Replacing didFailAccessControlCheck
249         callback by a direct call to didFail with an error of type AccessControl.
250         (WebCore::reportContentSecurityPolicyError): Ditto.
251         (WebCore::reportCrossOriginResourceSharingError): Ditto.
252         (WebCore::DocumentThreadableLoader::didReceiveResponse): Ditto.
253         (WebCore::DocumentThreadableLoader::preflightFailure): Calling didFail directly.
254         * loader/ThreadableLoaderClient.h: Removing didFailAccessControlCheck.
255         * loader/ThreadableLoaderClientWrapper.h: Ditto.
256         * loader/WorkerThreadableLoader.cpp: Ditto.
257         * loader/WorkerThreadableLoader.h: Ditto.
258         * page/EventSource.cpp:
259         (WebCore::EventSource::didFail): Removing didFailAccessControlCheck and putting handling code in didFail.
260         * page/EventSource.h:
261         * platform/network/ResourceErrorBase.cpp:
262         (WebCore::ResourceErrorBase::setType): Softening the assertion to cover the case of migration to AccessControl.
263         * platform/network/ResourceErrorBase.h: Adding AccessControl error type.
264         (WebCore::ResourceErrorBase::isAccessControl):
265
266 2016-06-27  Chris Dumez  <cdumez@apple.com>
267
268         HTMLElement / SVGElement should implement GlobalEventHandlers, not Element
269         https://bugs.webkit.org/show_bug.cgi?id=159191
270         <rdar://problem/27019299>
271
272         Reviewed by Ryosuke Niwa.
273
274         HTMLElement / SVGElement should implement GlobalEventHandlers, not Element:
275         - https://html.spec.whatwg.org/multipage/dom.html#htmlelement
276         - https://www.w3.org/TR/SVG2/types.html#InterfaceSVGElement
277
278         Firefox and Chrome behave as per the specification.
279
280         Fixing this also fixes rendering on http://survey123.arcgis.com/.
281
282         No new tests, covered by existing tests that were rebaselined.
283
284         * dom/Element.idl:
285         * html/HTMLElement.idl:
286         * svg/SVGElement.idl:
287
288 2016-06-27  Myles C. Maxfield  <mmaxfield@apple.com>
289
290         [macOS] Test gardening: Generic font families should not map to fonts which aren't installed
291         https://bugs.webkit.org/show_bug.cgi?id=159111
292         <rdar://problem/25807529>
293
294         Unreviewed.
295
296         Osaka-Mono does not come preinstalled on macOS Sierra. However, many Japanese users
297         will have the font installed. Before setting the generic font family, we should check
298         to see if the font is present.
299
300         * page/cocoa/SettingsCocoa.mm:
301         (WebCore::osakaMonoIsInstalled):
302         (WebCore::Settings::initializeDefaultFontFamilies):
303
304 2016-06-24  Ryosuke Niwa  <rniwa@webkit.org>
305
306         Don't keep all newly created potential custom elements alive when the feature is disabled
307         https://bugs.webkit.org/show_bug.cgi?id=159113
308
309         Reviewed by Daniel Bates.
310
311         Don't keep all HTML unknown elements which has a valid custom element alive when the feature is turned off.
312
313         Ideally we want to conform to the behavior in the Custom Elements specification and only upgrade an element
314         that is inserted into the document. We'll implement that later.
315
316         * dom/Document.cpp:
317         (WebCore::createHTMLElementWithNameValidation):
318
319 2016-06-27  Simon Fraser  <simon.fraser@apple.com>
320
321         [iOS] -webkit-overflow-scrolling: touch prevents repaint with RTL
322         https://bugs.webkit.org/show_bug.cgi?id=159186
323         rdar://problem/26659341
324
325         Reviewed by Zalan Bujtas.
326         
327         There were two issues with repaints in -webkit-overflow-scrolling:touch scrolling
328         layers.
329
330         First, if the scrolled contents were inline (e.g. a <span>), then repaints were
331         broken because RenderInline didn't call shouldApplyClipAndScrollPositionForRepaint().
332         Fix by making shouldApplyClipAndScrollPositionForRepaint() a member function of RenderBox
333         and calling it from RenderBox::computeRectForRepaint() and RenderInline::clippedOverflowRectForRepaint().
334
335         Second, repaints were broken in RTL because RenderLayerBacking::setContentsNeedDisplayInRect()
336         confused scroll offset and scroll position; it needs to subtract scrollPosition.
337         
338         Finally renamed to applyCachedClipAndScrollOffsetForRepaint() to applyCachedClipAndScrollPositionForRepaint()
339         to make it clear that it uses scrollPosition, not scrollOffset.
340
341         Tests: compositing/scrolling/touch-scrolling-repaint-spans.html
342                compositing/scrolling/touch-scrolling-repaint.html
343
344         * rendering/RenderBox.cpp:
345         (WebCore::RenderBox::applyCachedClipAndScrollPositionForRepaint):
346         (WebCore::RenderBox::shouldApplyClipAndScrollPositionForRepaint):
347         (WebCore::RenderBox::computeRectForRepaint):
348         (WebCore::RenderBox::applyCachedClipAndScrollOffsetForRepaint): Deleted.
349         (WebCore::shouldApplyContainersClipAndOffset): Deleted.
350         * rendering/RenderBox.h:
351         * rendering/RenderInline.cpp:
352         (WebCore::RenderInline::clippedOverflowRectForRepaint):
353         (WebCore::RenderInline::computeRectForRepaint):
354         * rendering/RenderLayerBacking.cpp:
355         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
356         * rendering/RenderObject.cpp:
357         (WebCore::RenderObject::computeRectForRepaint):
358
359 2016-06-27  Commit Queue  <commit-queue@webkit.org>
360
361         Unreviewed, rolling out r202436.
362         https://bugs.webkit.org/show_bug.cgi?id=159190
363
364         We don't need to make this change. (Requested by thorton on
365         #webkit).
366
367         Reverted changeset:
368
369         "Do not use iOS specific telephone detection on macOS."
370         https://bugs.webkit.org/show_bug.cgi?id=159096
371         http://trac.webkit.org/changeset/202436
372
373 2016-06-27  Benjamin Poulain  <benjamin@webkit.org>
374
375         Adopt the iOS TouchEventHandler API for cases that must have synchronous dispatch
376         https://bugs.webkit.org/show_bug.cgi?id=159179
377         rdar://problem/27006387
378
379         Reviewed by Simon Fraser.
380
381         Tests: fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-block-scrolling-state.html
382                fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-document-scrolling-state.html
383                fast/events/touch/ios/block-without-overflow-scroll-scrolling-state.html
384                fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-block.html
385                fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-document.html
386                fast/events/touch/ios/drag-block-without-overflow-scroll.html
387
388         * dom/Document.cpp:
389         (WebCore::Document::prepareForDestruction):
390         (WebCore::Document::removeAllEventListeners):
391         * dom/Node.cpp:
392         (WebCore::Node::willBeDeletedFrom):
393         (WebCore::tryAddEventListener):
394         (WebCore::tryRemoveEventListener):
395         * html/shadow/SliderThumbElement.cpp:
396         (WebCore::SliderThumbElement::registerForTouchEvents):
397         (WebCore::SliderThumbElement::unregisterForTouchEvents):
398         * rendering/RenderLayer.cpp:
399         (WebCore::RenderLayer::registerAsTouchEventListenerForScrolling):
400         (WebCore::RenderLayer::unregisterAsTouchEventListenerForScrolling):
401
402 2016-06-27  Alex Christensen  <achristensen@webkit.org>
403
404         Fix Windows build.
405
406         * bindings/js/SerializedScriptValue.h:
407         WTF
408
409 2016-06-27  Commit Queue  <commit-queue@webkit.org>
410
411         Unreviewed, rolling out r202520.
412         https://bugs.webkit.org/show_bug.cgi?id=159185
413
414         This change broke the 32-bit El Capitan build (Requested by
415         ryanhaddad on #webkit).
416
417         Reverted changeset:
418
419         "REGRESSION?(r202466): http/tests/security/canvas-remote-read-
420         remote-video-redirect.html failing on Sierra"
421         https://bugs.webkit.org/show_bug.cgi?id=159172
422         http://trac.webkit.org/changeset/202520
423
424 2016-06-27  Jer Noble  <jer.noble@apple.com>
425
426         REGRESSION?(r202466): http/tests/security/canvas-remote-read-remote-video-redirect.html failing on Sierra
427         https://bugs.webkit.org/show_bug.cgi?id=159172
428         <rdar://problem/27030025>
429
430         Reviewed by Brent Fulgham.
431
432         Add a hasSingleSecurityOrigin property to WebCoreNSURLSession that gets updated each time one of that
433         sessions' tasks receieves a response or a redirect request. Check that property from the MediaPlayerPrivate.
434
435         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
436         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin):
437         * platform/network/cocoa/WebCoreNSURLSession.h:
438         * platform/network/cocoa/WebCoreNSURLSession.mm:
439         (-[WebCoreNSURLSession updateHasSingleSecurityOrigin:]):
440         (-[WebCoreNSURLSession dataTaskWithRequest:]):
441         (-[WebCoreNSURLSession dataTaskWithURL:]):
442         (-[WebCoreNSURLSessionDataTask resource:receivedResponse:]):
443         (-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:]):
444
445 2016-06-27  Benjamin Poulain  <benjamin@webkit.org>
446
447         Fix style invalidation for :active when the activated node has no renderer
448         https://bugs.webkit.org/show_bug.cgi?id=159125
449
450         Reviewed by Antti Koivisto.
451
452         Same old bug: a style invalidation path was depending
453         on the style.
454
455         Here we really need both flags. An element can have
456         childrenAffectedByActive() false and renderStyle->affectedByActive() true
457         if it was subject to style sharing.
458
459         The element state "childrenAffectedByActive" should be renamed
460         "styleAffectedByActive" since it is not a parent invalidation flag.
461         That will be done separately.
462
463         Tests: fast/css/pseudo-active-on-labeled-control-without-renderer.html
464                fast/css/pseudo-active-style-sharing-1.html
465                fast/css/pseudo-active-style-sharing-2.html
466                fast/css/pseudo-active-style-sharing-3.html
467                fast/css/pseudo-active-style-sharing-4.html
468                fast/css/pseudo-active-style-sharing-5.html
469                fast/css/pseudo-active-style-sharing-6.html
470
471         * dom/Element.cpp:
472         (WebCore::Element::setActive):
473         * style/StyleRelations.cpp:
474         (WebCore::Style::commitRelationsToRenderStyle):
475
476 2016-06-27  Joanmarie Diggs  <jdiggs@igalia.com>
477
478         AX: REGRESSION (r202063): ARIA role attribute is being ignored for label element
479         https://bugs.webkit.org/show_bug.cgi?id=159162
480
481         Reviewed by Chris Fleizach.
482
483         createFromRenderer() was creating an AccessibilityLabel for any HTMLLabelElement which
484         lacked an explicitly-handled ARIA role. We should instead create an AccessibilityLabel
485         when there is no ARIA role.
486
487         Test: accessibility/aria-role-on-label.html
488
489         * accessibility/AXObjectCache.cpp:
490         (WebCore::createFromRenderer):
491
492 2016-06-27  Commit Queue  <commit-queue@webkit.org>
493
494         Unreviewed, rolling out r202505.
495         https://bugs.webkit.org/show_bug.cgi?id=159169
496
497         The test added with this change is flaky and it caused an
498         existing test to time out on El Capitan. (Requested by
499         ryanhaddad on #webkit).
500
501         Reverted changeset:
502
503         "[iOS] Media controls are too cramped with small video"
504         https://bugs.webkit.org/show_bug.cgi?id=158815
505         http://trac.webkit.org/changeset/202505
506
507 2016-06-27  Benjamin Poulain  <bpoulain@apple.com>
508
509         Add :focus-within to the status page
510
511         * features.json:
512         I forgot to update the json file when landing the feature.
513
514 2016-06-27  Eric Carlson  <eric.carlson@apple.com>
515
516         [Mac] PiP placeholder should remain visible when 'controls' attribute is removed
517         https://bugs.webkit.org/show_bug.cgi?id=159158
518         <rdar://problem/26727435>
519
520         Reviewed by Jer Noble.
521
522         No new tests, existing test updated.
523
524         * Modules/mediacontrols/mediaControlsApple.js:
525         (Controller.prototype.shouldHaveControls): Always return true when in PiP or AirPlay mode.
526
527 2016-06-27  Oliver Hunt  <oliver@apple.com>
528
529         Update ATS WebContent exception for more robust framework information
530         https://bugs.webkit.org/show_bug.cgi?id=159151
531
532         Reviewed by Alex Christensen.
533
534         We found some unexpected poor interaction with AVFoundation in the existing
535         CFNetwork SPI. This new SPI is more solid and let's us provide more useful
536         information while also being more future proof against new frameworks and
537         ATS modes.
538
539         * platform/network/mac/ResourceHandleMac.mm:
540         (WebCore::ResourceHandle::createNSURLConnection):
541
542 2016-06-27  Antoine Quint  <graouts@apple.com>
543
544         [iOS] Media controls are too cramped with small video
545         https://bugs.webkit.org/show_bug.cgi?id=158815
546         <rdar://problem/26824238>
547
548         Reviewed by Dean Jackson.
549
550         In updateLayoutForDisplayedWidth(), we try to ensure a minimum width is guaranteed
551         for the progress indicator. However, we were not accounting for the width used by
552         the current and remaining time labels on either side of it, so we would incorrectly
553         conclude that we were guaranteeing the minimum time and yield incorrect layouts since
554         we were trying to fit more buttons than we had room for.
555
556         In order to correctly compute the available width for the progress indicator, we now
557         have clones of the current and remaining time labels, hidden from video and VoiceOver,
558         that we update along with the originals. The same styles apply to both clones and
559         originals, so we may measure the clones to determine the space used by the time labels.
560         The reason we need to use clones is that if the time labels had previously been hidden
561         from view, precisely because there was not enough space to display them along with the
562         progress indicator, then trying to obtain metrics from them would yield 0 since they had
563         "display: none" styles applied. In order to avoid extra layouts and possible flashing, we
564         use the clones so that we never have to toggle the "display" property of the originals
565         just to obtain their measurements.
566
567         As a result of this change, we adjust the constant used to set the minimum required
568         width available to display the progress indicator after all other essential controls
569         and labels have been measured. That constant used to account for the width of the
570         time labels, and this is no longer correct.
571
572         Test: media/video-controls-drop-and-restore-timeline.html
573
574         * Modules/mediacontrols/mediaControlsApple.css:
575         (::-webkit-media-controls-time-remaining-display.clone):
576         * Modules/mediacontrols/mediaControlsApple.js:
577         (Controller):
578         (Controller.prototype.createTimeClones):
579         (Controller.prototype.removeTimeClass):
580         (Controller.prototype.addTimeClass):
581         (Controller.prototype.updateDuration):
582         (Controller.prototype.updateLayoutForDisplayedWidth):
583         (Controller.prototype.updateTime):
584         (Controller.prototype.updateControlsWhileScrubbing):
585         * Modules/mediacontrols/mediaControlsiOS.css:
586         (::-webkit-media-controls-time-remaining-display.clone):
587         * Modules/mediacontrols/mediaControlsiOS.js:
588
589 2016-06-27  Anders Carlsson  <andersca@apple.com>
590
591         No error message when passing an invalid API version to ApplePaySession constructor
592         https://bugs.webkit.org/show_bug.cgi?id=159154
593
594         Reviewed by Tim Horton.
595
596         Log an error message if the version is not supported. Also, check for version 0 since that is also not supported.
597
598         * Modules/applepay/ApplePaySession.cpp:
599         (WebCore::ApplePaySession::create):
600
601 2016-06-27  Joanmarie Diggs  <jdiggs@igalia.com>
602
603         AX: Anonymous RenderMathMLOperators are not exposed to the accessibility tree
604         https://bugs.webkit.org/show_bug.cgi?id=139582
605         <rdar://problem/26938849>
606
607         Reviewed by Chris Fleizach.
608
609         This is based on a patch by Frederic Wang <fwang@igalia.com>.
610
611         WebCore assigns the generic MathElementRole AccessibilityRole to elements
612         which are expected to be included in the accessibility tree. This assignment
613         is based on the AccessibilityRenderObject's node being a MathMLElement. The
614         anonymous RenderMathMLOperators fail that test.
615
616         From the perspective of accessibility support, these operators function
617         like MathMLElements. Furthermore, both WebCore and the platforms rely
618         upon MathElementRole to identify accessible MathML objects. The simplest
619         fix is to have AccessibilityRenderObject::isMathElement() treat anonymous
620         MathML operators as if they were MathMLElements.
621
622         Now that these operators are being exposed, we need to handle them in
623         AccessibilityRenderObject::textUnderElement() which assumes that anonymous
624         objects either have nodes or have children with nodes. And crashes when
625         that fails to be the case. Making RenderMathMLOperator::textContent()
626         public and then using it to get the text under anonymous operators solves
627         this problem. We also assign StaticTextRole to these operators on the Mac
628         because the default platform mapping of MathElementRole is GroupRole, which
629         made sense when we had a child RenderText object holding the operator.
630
631         Lastly, AccessibilityRenderObject::isIgnoredElementWithinMathTree() no
632         longer needs to special-case anonymous operators because they now have
633         MathElementRole.
634
635         Tests: accessibility/math-fenced.html
636                accessibility/math-foreign-content.html
637
638         * accessibility/AccessibilityObject.h:
639         (WebCore::AccessibilityObject::isAnonymousMathOperator):
640         * accessibility/AccessibilityRenderObject.cpp:
641         (WebCore::AccessibilityRenderObject::textUnderElement):
642         (WebCore::AccessibilityRenderObject::stringValue):
643         (WebCore::AccessibilityRenderObject::isMathElement):
644         (WebCore::AccessibilityRenderObject::isAnonymousMathOperator):
645         (WebCore::AccessibilityRenderObject::isIgnoredElementWithinMathTree):
646         * accessibility/AccessibilityRenderObject.h:
647         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
648         (-[WebAccessibilityObjectWrapper role]):
649         * rendering/mathml/RenderMathMLMath.h:
650         * rendering/mathml/RenderMathMLOperator.h:
651         (WebCore::RenderMathMLOperator::textContent):
652
653 2016-06-27  Adam Bergkvist  <adam.bergkvist@ericsson.com>
654
655         WebRTC: Remove unused RTCOfferAnswerOptionsPrivate.h
656         https://bugs.webkit.org/show_bug.cgi?id=159130
657
658         Reviewed by Eric Carlson.
659
660         Remove unused RTCOfferAnswerOptionsPrivate.h file.
661
662         * platform/mediastream/RTCOfferAnswerOptionsPrivate.h: Removed.
663
664 2016-06-27  Jer Noble  <jer.noble@apple.com>
665
666         Crash in layout test /media/video-buffered-range-contains-currentTime.html
667         https://bugs.webkit.org/show_bug.cgi?id=159109
668         <rdar://problem/26535750>
669
670         Reviewed by Alex Christensen.
671
672         Guard against a dealloc race condition by holding a retain on the session
673         until the task's _resource:loadFinishedWithError: completes, including
674         main thread callbacks.
675         
676         * platform/network/cocoa/WebCoreNSURLSession.mm:
677         (-[WebCoreNSURLSessionDataTask _resource:loadFinishedWithError:]):
678
679 2016-06-27  Frederic Wang  <fwang@igalia.com>
680
681         Set an upper limit for the size or number of pieces of stretchy operators
682         https://bugs.webkit.org/show_bug.cgi?id=155434
683
684         Reviewed by Brent Fulgham.
685
686         Stretchy MathML operators can currently use an arbitrary number of extension glyphs to cover
687         a target size. This may result in hangs if large stretch sizes are requested. This change
688         only allow at most the 128 first extensions to be painted by the MathOperator class, which
689         should really be enough for mathematical formulas used in practice.
690
691         No new tests, already tested by very-large-stretchy-operators.
692
693         * rendering/mathml/MathOperator.cpp: Add a new kMaximumExtensionCount constant.
694         (WebCore::MathOperator::fillWithVerticalExtensionGlyph): Limit the number of step in this loop to kMaximumExtensionCount.
695         (WebCore::MathOperator::fillWithHorizontalExtensionGlyph): Ditto.
696
697 2016-06-27  Frederic Wang  <fred.wang@free.fr>
698
699         Small refactoring MathMLInlineContainerElement::createElementRenderer
700         https://bugs.webkit.org/show_bug.cgi?id=159131
701
702         Reviewed by Brent Fulgham.
703
704         Many of the MathML renderer classes have been merged during the MathML refactoring. We
705         simplify how instances are created in MathMLInlineContainerElement::createElementRenderer
706         by removing duplicate createRenderer calls.
707
708         No new tests, behavior unchanged.
709
710         * mathml/MathMLInlineContainerElement.cpp:
711         (WebCore::MathMLInlineContainerElement::createElementRenderer):
712
713 2016-06-27  Miguel Gomez  <magomez@igalia.com>
714
715         [GTK][EFL] Build with threaded compositor enabled is broken
716         https://bugs.webkit.org/show_bug.cgi?id=159138
717
718         Reviewed by Carlos Garcia Campos.
719
720         No need to set the device scale. The compositor buffer is only used for the accelerated
721         canvas scenario, and the device scale is always 1 there.
722         This change was introduced in r202421.
723
724         Covered by existing tests.
725
726         * platform/graphics/cairo/ImageBufferCairo.cpp:
727         (WebCore::ImageBufferData::createCompositorBuffer):
728
729 2016-06-27  Philippe Normand  <philn@igalia.com>
730
731         [GStreamer] top/bottom black bars added needlessly in fullscreen
732         https://bugs.webkit.org/show_bug.cgi?id=158980
733
734         Reviewed by Carlos Garcia Campos.
735
736         The natural video size calculation depends on the validity of the
737         current sample, so whenever the first sample reached the sink it's a
738         good idea to reflect this on the player which will update its natural
739         size accordingly.
740
741         Fixes an issue where black borders were added on top and bottom of
742         fullscreen video.
743
744         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
745         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
746
747 2016-06-27  Youenn Fablet  <youenn@apple.com>
748
749         Remove didFailRedirectCheck ThreadableLoaderClient callback
750         https://bugs.webkit.org/show_bug.cgi?id=159085
751
752         Reviewed by Daniel Bates.
753
754         Removing didFailRedirectCheck and using didFailAccessControlCheck instead.
755         The change in behavior is that additional error messages are outputted in the console.
756         These messages give additional debugging information.
757
758         Covered by rebased tests.
759
760         * Modules/fetch/FetchLoader.cpp: Removing didFailRedirectCheck.
761         * Modules/fetch/FetchLoader.h: Ditto.
762         * inspector/InspectorNetworkAgent.cpp: Ditto.
763         * loader/DocumentThreadableLoader.cpp:
764         (WebCore::DocumentThreadableLoader::redirectReceived): Calling didFailAccessControlCheck with information on failing
765         URL.
766         (WebCore::DocumentThreadableLoader::loadRequest): Ditto.
767         * loader/ThreadableLoaderClient.h: Removing didFailRedirectCheck.
768         * loader/ThreadableLoaderClientWrapper.h: Ditto.
769         * loader/WorkerThreadableLoader.cpp: Ditto.
770         * loader/WorkerThreadableLoader.h: Ditto.
771         * page/EventSource.cpp: Ditto.
772         * page/EventSource.h: Ditto.
773         * workers/WorkerScriptLoader.cpp: Ditto.
774         * workers/WorkerScriptLoader.h: Ditto.
775         * xml/XMLHttpRequest.cpp: Ditto.
776         * xml/XMLHttpRequest.h: Ditto.
777
778 2016-06-26  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
779
780         [EFL] Fix build warning when using geoclue2
781         https://bugs.webkit.org/show_bug.cgi?id=159128
782
783         Reviewed by Antonio Gomes.
784
785         EFL port has handled build warning as error. So EFL port
786         hasn't been built when we use geoclue2 library because a generated geoclue2 file
787         has unused-parameter build warning. To fix it this patch set to ignore the build warning
788         in the generated geoclue2 file.
789
790         * PlatformEfl.cmake:
791
792 2016-06-26  Chris Dumez  <cdumez@apple.com>
793
794         Regression: HTMLOptionsCollection's named properties have precedence over indexed properties
795         https://bugs.webkit.org/show_bug.cgi?id=159058
796         <rdar://problem/26988542>
797
798         Reviewed by Ryosuke Niwa.
799
800         HTMLOptionsCollection's named properties had precedence over indexed properties,
801         which is wrong as per:
802         http://heycam.github.io/webidl/#getownproperty-guts
803
804         The reason is that there was a named property getter defined on HTMLOptionsCollection
805         but no indexed property getter. As a result, HTMLOptionsCollection would fall back to
806         using HTMLCollection's indexed property getter but HTMLOptionsCollection's named getter
807         would take precedence. This patch defines an indexed property getter on
808         HTMLOptionsCollection to fix the problem.
809
810         Ideally, HTMLOptionsCollection would have no indexed / named property getters and would
811         entirely rely on the ones from HTMLCollection. However, our bindings generator currently
812         has trouble with this and requires HTMLOptionsCollection to have a named getter.
813
814         Test: fast/dom/HTMLSelectElement/options-indexed-getter-precedence.html
815
816         * html/HTMLOptionsCollection.idl:
817
818 2016-06-26  Chris Dumez  <cdumez@apple.com>
819
820         Regression(r202262): Infinite loop under searchForLinkRemovingExistingDDLinks()
821         https://bugs.webkit.org/show_bug.cgi?id=159122
822         <rdar://problem/27014649>
823
824         Reviewed by Ryosuke Niwa.
825
826         Infinite loop under searchForLinkRemovingExistingDDLinks() because the
827         value returned by NodeTraversal::next() was ignored and the node iterator
828         was never updated.
829
830         * editing/cocoa/DataDetection.mm:
831         (WebCore::searchForLinkRemovingExistingDDLinks):
832
833 2016-06-25  Benjamin Poulain  <bpoulain@apple.com>
834
835         The active state of elements can break when focus changes
836         https://bugs.webkit.org/show_bug.cgi?id=159112
837
838         Reviewed by Antti Koivisto.
839
840         The pseudo class :active was behaving weirdly when used
841         with label elements with an associated form element.
842         The form element would get the :active state on the first click
843         then no longer get the state until the focus changes.
844
845         What was happenning is setFocusedElement() was clearing active
846         for some unknown reason. When you really do that on an active element,
847         you end up in an inconsistent state where no invalidation works.
848
849         The two tests illustrates 2 ways this breaks.
850
851         The test "pseudo-active-on-labeled-element-not-canceled-by-focus" clicks
852         several time on a lable element. The first time, the input element gets
853         the focus. The second time, it already has the focus, setFocusedElement()
854         clears :active before finding the focusable element and end up clearing
855         the active state on a target in the active chain.
856
857         The test "pseudo-active-with-programmatic-focus.html" shows how to invalidate
858         arbitrary elements using JavaScript. This can cause severely broken active
859         chains where invalidation never cleans some ancestors.
860
861         Tests: fast/css/pseudo-active-on-labeled-element-not-canceled-by-focus.html
862                fast/css/pseudo-active-with-programmatic-focus.html
863
864         * dom/Document.cpp:
865         (WebCore::Document::setFocusedElement): Deleted.
866
867         * page/EventHandler.cpp:
868         (WebCore::EventHandler::handleMouseDoubleClickEvent):
869         This is WebKit1 specific. The double click event was dispatching
870         the mouseUp and Click with after doing an Active hit test.
871         This causes us to have :active state in and after mouseUp in WebKit1.
872
873 2016-06-24  Jer Noble  <jer.noble@apple.com>
874
875         Consider exposing or hiding knowledge of a redirect from clients of WebCoreNSURLSession
876         https://bugs.webkit.org/show_bug.cgi?id=156722
877         <rdar://problem/25780035>
878
879         Reviewed by Alex Christensen.
880
881         Fixes tests: http/tests/security/contentSecurityPolicy/audio-redirect-allowed2.html
882                      http/tests/security/contentSecurityPolicy/video-redirect-allowed2.html
883
884         When receieving a NSURLResponse containing a redirected URL, AVFoundadtion will use the
885         URL in the response for subsequent requests. This violates the HTTP specification if the
886         redirect was temporary, and it also breaks two CSP tests by bypassing the redirect step
887         for subsequent requests.
888
889         Work around this behavior in AVFoundation by recreating the NSURLResponse with the original
890         request URL in the case of a temporary redirect.
891
892         * platform/network/cocoa/WebCoreNSURLSession.mm:
893         (-[WebCoreNSURLSessionDataTask resource:receivedResponse:]):
894         (-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:]):
895
896 2016-06-24  Jer Noble  <jer.noble@apple.com>
897
898         MSE gets confused by in-band text tracks
899         https://bugs.webkit.org/show_bug.cgi?id=159107
900         <rdar://problem/26871330>
901
902         Reviewed by Eric Carlson.
903
904         We can't currently handle text track samples in SourceBufferPrivateAVFObjC,
905         so don't pass them up to SourceBuffer.
906
907         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
908         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
909         (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
910
911 2016-06-24  Mark Lam  <mark.lam@apple.com>
912
913         [JSC] Error prototypes are called on remote scripts.
914         https://bugs.webkit.org/show_bug.cgi?id=52192
915
916         Reviewed by Keith Miller.
917
918         Test: http/tests/security/regress-52192.html
919
920         Parsing errors are reported to the main script's window.onerror function.  AFAIK,
921         both Chrome and Firefox have the error reporting mechanism use an internal
922         sanitized version of Error.prototype.toString() that will not invoke any getters
923         or proxies instead.
924
925         This patch fixes this issue by matching Chrome and Firefox's behavior.
926
927         Note: we did not choose to make error objects and prototypes read-only because
928         that was observed to have broken the web.
929         See https://bugs.chromium.org/p/chromium/issues/detail?id=69187#c73
930
931         Credit for reporting this issue goes to Daniel Divricean (http://divricean.ro).
932
933         * bindings/js/JSDOMBinding.cpp:
934         (WebCore::reportException):
935         * ForwardingHeaders/runtime/ErrorInstance.h: Added.
936
937 2016-06-24  Jer Noble  <jer.noble@apple.com>
938
939         Media elements should not lose playback controls when muted by a user gesture
940         https://bugs.webkit.org/show_bug.cgi?id=159078
941         <rdar://problem/26925904>
942
943         Reviewed by Beth Dakin.
944
945         Rearrange canControlControlsManager() so that the muted check only occurs if
946         a user gesture is required.
947
948         * html/MediaElementSession.cpp:
949         (WebCore::MediaElementSession::canControlControlsManager):
950
951 2016-06-24  Beth Dakin  <bdakin@apple.com>
952
953         Include enclosingListType in EditorState
954         https://bugs.webkit.org/show_bug.cgi?id=159102
955         -and corresponding-
956         rdar://problem/26932490
957
958         Reviewed by Enrica Casucci.
959
960         Make HTMLOListElement.h and HTMLUListElement.h Private instead of Project.
961         * WebCore.xcodeproj/project.pbxproj:
962
963         Export enclosingList(Node*)
964         * editing/htmlediting.h:
965
966 2016-06-24  Anders Carlsson  <andersca@apple.com>
967
968         Another Windows build fix.
969
970         * platform/network/BlobRegistry.h:
971
972 2016-06-24  Anders Carlsson  <andersca@apple.com>
973
974         Yet another Windows build fix.
975
976         * dom/ActiveDOMCallbackMicrotask.h:
977
978 2016-06-24  Anders Carlsson  <andersca@apple.com>
979
980         Another Windows build fix.
981
982         * page/FrameView.h:
983
984 2016-06-24  Anders Carlsson  <andersca@apple.com>
985
986         Inline more of the Apple Pay source code
987         https://bugs.webkit.org/show_bug.cgi?id=159099
988
989         Reviewed by Andreas Kling.
990
991         * page/Settings.h:
992         (WebCore::Settings::applePayEnabled):
993         (WebCore::Settings::setApplePayEnabled):
994         (WebCore::Settings::applePayCapabilityDisclosureAllowed):
995         (WebCore::Settings::setApplePayCapabilityDisclosureAllowed):
996
997 2016-06-24  Anders Carlsson  <andersca@apple.com>
998
999         Windows build fix.
1000
1001         * platform/GenericTaskQueue.h:
1002         (WebCore::TaskDispatcher::postTask):
1003
1004 2016-06-24  Frederic Wang  <fwang@igalia.com>
1005
1006         Use auto* for MathML elements and renderers when possible
1007         https://bugs.webkit.org/show_bug.cgi?id=159090
1008
1009         Reviewed by Alex Christensen.
1010
1011         No new tests, behavior is unchanged.
1012
1013         * mathml/MathMLElement.cpp:
1014         (WebCore::MathMLElement::attributeChanged):
1015         * mathml/MathMLSelectElement.cpp:
1016         (WebCore::MathMLSelectElement::getSelectedActionChildAndIndex):
1017         (WebCore::MathMLSelectElement::getSelectedActionChild):
1018         (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
1019         (WebCore::MathMLSelectElement::updateSelectedChild):
1020         * rendering/mathml/RenderMathMLFraction.cpp:
1021         (WebCore::RenderMathMLFraction::isValid):
1022         * rendering/mathml/RenderMathMLMenclose.cpp:
1023         (WebCore::RenderMathMLMenclose::layoutBlock):
1024         * rendering/mathml/RenderMathMLRoot.cpp:
1025         (WebCore::RenderMathMLRoot::isValid):
1026         * rendering/mathml/RenderMathMLRow.cpp:
1027         (WebCore::RenderMathMLRow::firstLineBaseline):
1028         (WebCore::RenderMathMLRow::computeLineVerticalStretch):
1029         (WebCore::RenderMathMLRow::computePreferredLogicalWidths):
1030         (WebCore::RenderMathMLRow::layoutRowItems):
1031         * rendering/mathml/RenderMathMLScripts.cpp:
1032         (WebCore::RenderMathMLScripts::unembellishedOperator):
1033         (WebCore::RenderMathMLScripts::getBaseAndScripts):
1034         (WebCore::RenderMathMLScripts::computePreferredLogicalWidths):
1035         (WebCore::RenderMathMLScripts::getScriptMetricsAndLayoutIfNeeded):
1036         (WebCore::RenderMathMLScripts::layoutBlock):
1037         (WebCore::RenderMathMLScripts::firstLineBaseline):
1038         * rendering/mathml/RenderMathMLUnderOver.cpp:
1039         (WebCore::RenderMathMLUnderOver::firstLineBaseline):
1040         (WebCore::RenderMathMLUnderOver::isValid):
1041         (WebCore::RenderMathMLUnderOver::over):
1042
1043 2016-06-24  Joseph Pecoraro  <pecoraro@apple.com>
1044
1045         Remove unused and static return value from InspectorStyle::populateAllProperties
1046         https://bugs.webkit.org/show_bug.cgi?id=159069
1047
1048         Reviewed by Andreas Kling.
1049
1050         * inspector/InspectorStyleSheet.cpp:
1051         (WebCore::InspectorStyle::populateAllProperties):
1052         * inspector/InspectorStyleSheet.h:
1053
1054 2016-06-21  Anders Carlsson  <andersca@apple.com>
1055
1056         Rename NoncopyableFunction to Function
1057         https://bugs.webkit.org/show_bug.cgi?id=158354
1058
1059         Reviewed by Chris Dumez.
1060
1061         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
1062         (WebCore::MediaEndpointPeerConnection::runTask):
1063         * Modules/mediastream/MediaEndpointPeerConnection.h:
1064         * Modules/webaudio/AudioDestinationNode.h:
1065         (WebCore::AudioDestinationNode::resume):
1066         (WebCore::AudioDestinationNode::suspend):
1067         (WebCore::AudioDestinationNode::close):
1068         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
1069         (WebCore::DefaultAudioDestinationNode::resume):
1070         (WebCore::DefaultAudioDestinationNode::suspend):
1071         (WebCore::DefaultAudioDestinationNode::close):
1072         * Modules/webaudio/DefaultAudioDestinationNode.h:
1073         * dom/ActiveDOMCallbackMicrotask.cpp:
1074         (WebCore::ActiveDOMCallbackMicrotask::ActiveDOMCallbackMicrotask):
1075         * dom/ActiveDOMCallbackMicrotask.h:
1076         * dom/ScriptExecutionContext.h:
1077         (WebCore::ScriptExecutionContext::Task::Task):
1078         * fileapi/AsyncFileStream.cpp:
1079         (WebCore::callOnFileThread):
1080         (WebCore::AsyncFileStream::perform):
1081         * fileapi/AsyncFileStream.h:
1082         * page/FrameView.cpp:
1083         (WebCore::FrameView::queuePostLayoutCallback):
1084         (WebCore::FrameView::flushPostLayoutTasksQueue):
1085         * page/FrameView.h:
1086         * page/scrolling/ScrollingThread.cpp:
1087         (WebCore::ScrollingThread::dispatch):
1088         (WebCore::ScrollingThread::dispatchBarrier):
1089         (WebCore::ScrollingThread::dispatchFunctionsFromScrollingThread):
1090         * page/scrolling/ScrollingThread.h:
1091         * platform/GenericTaskQueue.cpp:
1092         (WebCore::TaskDispatcher<Timer>::postTask):
1093         * platform/GenericTaskQueue.h:
1094         (WebCore::TaskDispatcher::postTask):
1095         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
1096         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1097         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::scheduleDeferredTask):
1098         * platform/mediastream/MediaStreamPrivate.cpp:
1099         (WebCore::MediaStreamPrivate::scheduleDeferredTask):
1100         * platform/mediastream/MediaStreamPrivate.h:
1101         * platform/mediastream/mac/AVMediaCaptureSource.h:
1102         * platform/mediastream/mac/AVMediaCaptureSource.mm:
1103         (WebCore::AVMediaCaptureSource::scheduleDeferredTask):
1104         * style/StyleTreeResolver.cpp:
1105         (WebCore::Style::postResolutionCallbackQueue):
1106         (WebCore::Style::queuePostResolutionCallback):
1107         * style/StyleTreeResolver.h:
1108
1109 2016-06-24  Amir Alavi  <aalavi@apple.com>
1110
1111         Use _CFHTTPCookieStorageGetDefault directly instead of NSHTTPCookieStorage to get default cookie storage
1112         https://bugs.webkit.org/show_bug.cgi?id=159095
1113         rdar://problem/26630073
1114
1115         Reviewed by Brent Fulgham.
1116
1117         No new tests, it isn't possible to test this in a LayoutTest.
1118
1119         * platform/network/mac/CookieJarMac.mm:
1120         (WebCore::httpCookiesForURL): Get a CFHTTPCookieStorageRef when no cookie storage is provided to match the case when cookie storage is provided.
1121
1122 2016-06-24  Enrica Casucci  <enrica@apple.com>
1123
1124         Do not use iOS specific telephone detection on macOS.
1125         https://bugs.webkit.org/show_bug.cgi?id=159096
1126         rdar://problem/25870571
1127
1128         Reviewed by Anders Carlsson.
1129
1130         Adding platform guard.
1131
1132         * platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
1133         (WebCore::TelephoneNumberDetector::phoneNumbersScanner):
1134
1135 2016-06-24  Jer Noble  <jer.noble@apple.com>
1136
1137         Unreviewed build fix after r202429; AVStreamDataParser does not exist on iOS.
1138
1139         * platform/spi/mac/AVFoundationSPI.h:
1140
1141 2016-06-24  Jer Noble  <jer.noble@apple.com>
1142
1143         Unreviewed build fix after r202429; Fix the type of the delegate property on AVStreamDataParser.
1144
1145         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1146         * platform/spi/mac/AVFoundationSPI.h:
1147
1148 2016-06-02  Jer Noble  <jer.noble@apple.com>
1149
1150         [MSE] Adopt +[AVStreamDataParser outputMIMECodecParameterForInputMIMECodecParameter:]
1151         https://bugs.webkit.org/show_bug.cgi?id=158312
1152
1153         Reviewed by Eric Carlson.
1154
1155         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1156         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):
1157
1158         Move the declaration of AVStreamDataParser into AVFoundationSPI.h:
1159
1160         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
1161         (WebCore::CDMSessionAVStreamSession::update):
1162         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1163         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1164         (-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]):
1165         * platform/spi/mac/AVFoundationSPI.h:
1166
1167 2016-06-24  Eric Carlson  <eric.carlson@apple.com>
1168
1169         [iOS, Mac] Assume a media file has audio during AirPlay
1170         https://bugs.webkit.org/show_bug.cgi?id=159088
1171         <rdar://problem/24616592>
1172
1173         Reviewed by Jer Noble.
1174
1175         No new tests, it isn't possible to test this in a LayoutTest.
1176
1177         * html/HTMLMediaElement.cpp:
1178         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Call 
1179           mediaSession->setCanProduceAudio(true) when AirPlay becomes active.
1180
1181 2016-06-24  Jer Noble  <jer.noble@apple.com>
1182
1183         Playback controls refer to wrong element when playing multiple items in a page.
1184         https://bugs.webkit.org/show_bug.cgi?id=159076
1185         <rdar://problem/26953532>
1186
1187         Reviewed by Beth Dakin.
1188
1189         Use a new method PlatformMediaSessionManager::currentSessionMatching() to get
1190         the most recently active media element which qualifies for playback controls.
1191
1192         * html/HTMLMediaElement.cpp:
1193         (WebCore::HTMLMediaElement::updatePlaybackControlsManager): Get the most recently active session.
1194         * html/MediaElementSession.cpp:
1195         (WebCore::MediaElementSession::canControlControlsManager): Make virtual; no longer takes an element.
1196         * html/MediaElementSession.h:
1197         (isType): Allow downcasting from PlatformMediaSession -> MediaElementSession.
1198         * page/ChromeClient.h:
1199         * platform/audio/PlatformMediaSession.h:
1200         (WebCore::PlatformMediaSession::canControlControlsManager): Defaults to false;
1201         * platform/audio/PlatformMediaSessionManager.cpp:
1202         (WebCore::PlatformMediaSessionManager::currentSessionMatching): Added.
1203         * platform/audio/PlatformMediaSessionManager.h:
1204
1205 2016-06-24  Dan Bernstein  <mitz@apple.com>
1206
1207         Fixed the macOS build.
1208
1209         * platform/spi/cocoa/DataDetectorsCoreSPI.h:
1210
1211 2016-06-24  Dan Bernstein  <mitz@apple.com>
1212
1213         [iOS] Inline DataDetectorsAdditions.h
1214         https://bugs.webkit.org/show_bug.cgi?id=159093
1215
1216         Reviewed by Anders Carlsson.
1217
1218         * editing/cocoa/DataDetection.mm:
1219         (WebCore::constructURLStringForResult): Use soft-linked constant directly.
1220
1221         * platform/cocoa/DataDetectorsCoreSoftLink.h: Declare soft-linked constant.
1222         * platform/cocoa/DataDetectorsCoreSoftLink.mm: Define soft-linked constant.
1223         * platform/spi/cocoa/DataDetectorsCoreSPI.h: Declare constant.
1224
1225 2016-06-24  Yusuke Suzuki  <utatane.tea@gmail.com>
1226
1227         [GTK][EFL] ImageBufferCairo should accept resolution factor
1228         https://bugs.webkit.org/show_bug.cgi?id=157848
1229
1230         Reviewed by Martin Robinson.
1231
1232         ImageBufferCairo ignored the resolution factor passed in its constructor.
1233         This resolution factor is originally introduced for HiDPI Canvas,
1234         and since HiDPI canvas is not enabled in the ports using Cairo,
1235         the lack of this implementation does not cause any problems.
1236         And now, HiDPI Canvas is removed from the tree.
1237
1238         However, WebKit CSS filter uses this path.
1239         The missing implementation is required under the HiDPI environment.
1240
1241         Since Cairo surface can have the device scale factor transparently,
1242         the operations onto the surface is correctly done in the logical coordinate system.
1243         So all we need to handle carefully is the direct surface modification done
1244         in filter effects.
1245
1246         In this patch, we extend the image buffer size according to the resolution factor,
1247         as the same to the CoreGraphics' implementation (ImageBufferCG). And by setting the
1248         device scale factor of the surface correctly, we ensure that the rest of the Cairo
1249         painting stack works with the existing logical coordinate system. And in ImageBufferCairo,
1250         we carefully handle the logical and backing store coordinate system.
1251
1252         The attached test applies the CSS filter onto the svg image. And we resize the image size,
1253         and perform scrolling. It incurs the paint, and filter effect recalcuation.
1254         In that path, the filter effect side assumes that the image buffer size is scaled with the
1255         resolution factor. So without this patch, it incurs buffer overflow and leads WebProcess crash.
1256
1257         * platform/graphics/IntPoint.h:
1258         (WebCore::IntPoint::scale):
1259         * platform/graphics/cairo/ImageBufferCairo.cpp:
1260         (WebCore::ImageBufferData::createCompositorBuffer):
1261         (WebCore::ImageBuffer::ImageBuffer):
1262         (WebCore::ImageBuffer::copyImage):
1263         (WebCore::ImageBuffer::platformTransformColorSpace):
1264         (WebCore::getImageData):
1265         (WebCore::logicalUnit):
1266         (WebCore::backingStoreUnit):
1267         (WebCore::ImageBuffer::getUnmultipliedImageData):
1268         (WebCore::ImageBuffer::getPremultipliedImageData):
1269         (WebCore::ImageBuffer::putByteArray):
1270         (WebCore::ImageBuffer::copyToPlatformTexture):
1271
1272 2016-06-24  Frederic Wang  <fwang@igalia.com>
1273
1274         Refactor RenderMathMLOperator and RenderMathMLToken to avoid using anonymous renderers.
1275         https://bugs.webkit.org/show_bug.cgi?id=155018
1276
1277         Reviewed by Martin Robinson.
1278
1279         No new tests, already covered by existing tests.
1280
1281         We use MathOperator for RenderMathMLOperator to avoid creating anonymous text nodes again
1282         and again. We reimplement implicit mathvariant="italic" on single-char mi in a way that does
1283         not rely on creating anonymous text nodes. Finally, we improve the determination/update of
1284         when mathvariant is italic to avoid breaking foreign-mi-dynamic test.
1285         The change in the render tree structure breaks mfenced accessibility support but that will
1286         be fixed in follow-up patches. The simplifications made here will also allow to simplify the
1287         accessibility code.
1288
1289         * css/mathml.css:
1290         (mo): Deleted. This flexbox rule is no longer needed.
1291         * rendering/mathml/RenderMathMLBlock.cpp:
1292         (WebCore::RenderMathMLBlock::createAnonymousMathMLBlock): Deleted. We no longer need to
1293         create anonymous renderer with this function.
1294         * rendering/mathml/RenderMathMLBlock.h: Delete createAnonymousMathMLBlock.
1295         * rendering/mathml/RenderMathMLOperator.cpp: Implement layout functions without relying on
1296         flexbox or anonymous.
1297         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Handle the case of !useMathOperator()
1298         for which we need to add extra operator spacing after the RenderMathMLToken layout.
1299         (WebCore::RenderMathMLOperator::layoutBlock): Ditto.
1300         (WebCore::RenderMathMLOperator::isChildAllowed): Deleted. We allow the non-anonymous text.
1301         (WebCore::RenderMathMLOperator::rebuildTokenContent): No longer destroy and rebuild
1302         anonymous wrapper. Remove updateStyle call.
1303         (WebCore::RenderMathMLOperator::updateStyle): Deleted. We no longer need anonymous style for the spacing.
1304         * rendering/mathml/RenderMathMLOperator.h: Remove updateStyle() and isChildAllowed().
1305         Make textContent() public so that it can be accessed from the accessibility code.
1306         * rendering/mathml/RenderMathMLToken.cpp: Reimplement implicit mathvariant="italic" by
1307         painting MATHEMATICAL ITALIC characters instead of styling an anonymous wrapper.
1308         (WebCore::RenderMathMLToken::RenderMathMLToken): Init m_mathVariantGlyph and m_mathVariantGlyphDirty
1309         (WebCore::RenderMathMLToken::updateTokenContent): Set mathvariant glyph dirty when the content changes.
1310         (WebCore::transformToItalic): Helper function to map latin and greek alphabets to their
1311         MATHEMATICAL ITALIC counterpart.
1312         (WebCore::RenderMathMLToken::computePreferredLogicalWidths): Implement this function to
1313         handle the case where the mathvariant glyph is used.
1314         (WebCore::RenderMathMLToken::updateMathVariantGlyph): Helper function to update the mathvariant glyph.
1315         For now, we try and keep with the old (and limited) implementation: a mathvariant glyph may
1316         only used for single-char <mi> without mathvariant attribute attached to it.
1317         (WebCore::RenderMathMLToken::styleDidChange): Set the mathvariant glyph dirty when the style
1318         changes.
1319         (WebCore::RenderMathMLToken::updateFromElement): Remove updateStyle call and set mathvariant
1320         glyph dirty.
1321         (WebCore::RenderMathMLToken::firstLineBaseline): Implement this function to handle the case
1322          where the mathvariant glyph is used.
1323         (WebCore::RenderMathMLToken::layoutBlock): Ditto.
1324         (WebCore::RenderMathMLToken::paint): Ditto.
1325         (WebCore::RenderMathMLToken::paintChildren): Ditto.
1326         (WebCore::RenderMathMLToken::addChild): Deleted. No need to bother with anonymous renderer
1327         or style.
1328         (WebCore::RenderMathMLToken::createWrapperIfNeeded): Deleted. Ditto.
1329         (WebCore::RenderMathMLToken::updateStyle): Deleted. Ditto.
1330         * rendering/mathml/RenderMathMLToken.h: Update declarations of functions.
1331         (WebCore::RenderMathMLToken::setMathVariantGlyphDirty): Helper function to indicate that the
1332         mathvariant glyph will need to be updated.
1333
1334 2016-06-24  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1335
1336         Unreviewed EFL build fix.
1337
1338         There is forward declaration build error on EFL port.
1339
1340         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Include DOMWindow.h and Document.h.
1341
1342 2016-06-23  Brady Eidson  <beidson@apple.com>
1343
1344         Retrieving Blobs from IndexedDB using cursors fails in WK2 (Sandboxing)
1345         https://bugs.webkit.org/show_bug.cgi?id=158991
1346
1347         Reviewed by Alex Christensen.
1348
1349         Test: storage/indexeddb/modern/blob-cursor.html
1350
1351         * platform/network/BlobDataFileReference.cpp:
1352         (WebCore::BlobDataFileReference::startTrackingModifications): Deleted.
1353
1354 2016-06-23  Alex Christensen  <achristensen@webkit.org>
1355
1356         Remove unused didCancelAuthenticationChallenge
1357         https://bugs.webkit.org/show_bug.cgi?id=158819
1358
1359         Reviewed by David Kilzer.
1360
1361         No change in behavior.  This callback was deprecated in Yosemite.  It is never called.
1362
1363         * loader/EmptyClients.h:
1364         * loader/FrameLoaderClient.h:
1365         * loader/ResourceLoadNotifier.cpp:
1366         (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge): Deleted.
1367         * loader/ResourceLoadNotifier.h:
1368         * loader/ResourceLoader.cpp:
1369         (WebCore::ResourceLoader::didCancelAuthenticationChallenge): Deleted.
1370         * loader/ResourceLoader.h:
1371         * platform/network/ResourceHandle.h:
1372         * platform/network/ResourceHandleClient.h:
1373         (WebCore::ResourceHandleClient::didCancelAuthenticationChallenge): Deleted.
1374         * platform/network/mac/ResourceHandleMac.mm:
1375         (WebCore::ResourceHandle::didCancelAuthenticationChallenge): Deleted.
1376         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
1377         (-[WebCoreResourceHandleAsDelegate connection:didCancelAuthenticationChallenge:]): Deleted.
1378         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
1379         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didCancelAuthenticationChallenge:]): Deleted.
1380         * platform/spi/cocoa/NSURLDownloadSPI.h:
1381
1382 2016-06-23  Anders Carlsson  <andersca@apple.com>
1383
1384         Add "shippingType" to the list of valid payment request properties
1385         https://bugs.webkit.org/show_bug.cgi?id=159079
1386         <rdar://problem/26988429>
1387
1388         Reviewed by Dean Jackson.
1389
1390         * Modules/applepay/ApplePaySession.cpp:
1391         (WebCore::isValidPaymentRequestPropertyName):
1392
1393 2016-06-23  Benjamin Poulain  <benjamin@webkit.org>
1394
1395         Specialize synchronous event tracking per event type
1396         https://bugs.webkit.org/show_bug.cgi?id=158826
1397
1398         Reviewed by Simon Fraser.
1399
1400         First, kudos to Rick Byers for all his helps on passive event dispatch.
1401         The specs are pretty damn good and his help reviewing patches is very useful.
1402
1403         This patch change synchronous event dispatch to happen per event
1404         instead of per sequence touchstart->touchend.
1405
1406         The big advantage of this is we can dispatch more events asynchronously.
1407         For example, to handle a tap programmatically, you can limit the active listener
1408         to the touchend event. The touchstart and touchmove are now dispatched asynchronously.
1409
1410         The implementation is a simple extension to EventTrackingRegions.
1411         Instead of a single synchronous region, we have one region per event type.
1412         When processing the events, we only need to send the events synchronously
1413         if that particular event type has a synchronous region.
1414
1415         Note that EventDispatcher's touch event support already supports
1416         mixing synchronous and asynchronous events. The events are always processed
1417         in order even if asynchronous events are pending when a synchronous dispatch
1418         happens.
1419
1420         Tests: fast/events/touch/ios/tap-with-active-listener-inside-document-with-passive-listener.html
1421                fast/events/touch/ios/tap-with-active-listener-inside-window-with-passive-listener.html
1422                fast/events/touch/ios/tap-with-active-touch-end-listener.html
1423                fast/events/touch/ios/tap-with-passive-listener-inside-active-listener.html
1424                fast/events/touch/ios/tap-with-passive-touch-end-listener.html
1425                fast/events/touch/ios/tap-with-passive-touch-start-active-touch-end-listeners-on-elements.html
1426                fast/events/touch/ios/tap-with-passive-touch-start-active-touch-move-listeners-on-elements.html
1427
1428         * CMakeLists.txt:
1429         * WebCore.xcodeproj/project.pbxproj:
1430         * dom/EventTarget.cpp:
1431         (WebCore::EventTarget::hasActiveTouchEventListeners): Deleted.
1432         * dom/EventTarget.h:
1433         * page/DebugPageOverlays.cpp:
1434         (WebCore::NonFastScrollableRegionOverlay::updateRegion):
1435         * page/Page.cpp:
1436         (WebCore::Page::nonFastScrollableRects):
1437         * page/scrolling/ScrollingCoordinator.cpp:
1438         (WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame):
1439         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
1440         (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
1441         * page/scrolling/ScrollingTree.cpp:
1442         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
1443         (WebCore::ScrollingTree::eventTrackingTypeForPoint):
1444         * page/scrolling/ScrollingTree.h:
1445         * platform/EventTrackingRegions.cpp: Added.
1446         (WebCore::EventTrackingRegions::trackingTypeForPoint):
1447         (WebCore::EventTrackingRegions::isEmpty):
1448         (WebCore::EventTrackingRegions::translate):
1449         (WebCore::EventTrackingRegions::uniteSynchronousRegion):
1450         (WebCore::EventTrackingRegions::unite):
1451         (WebCore::operator==):
1452         * platform/EventTrackingRegions.h:
1453         (WebCore::EventTrackingRegions::isEmpty): Deleted.
1454         (WebCore::EventTrackingRegions::trackingTypeForPoint): Deleted.
1455         (WebCore::operator==): Deleted.
1456
1457 2016-06-23  Simon Fraser  <simon.fraser@apple.com>
1458
1459         More attempting to fix external iOS builds.
1460
1461         * platform/spi/cocoa/QuartzCoreSPI.h:
1462
1463 2016-06-23  Simon Fraser  <simon.fraser@apple.com>
1464
1465         Try to fix the non-internal builds by defining CARenderServerBufferRef.
1466
1467         * platform/spi/cocoa/QuartzCoreSPI.h:
1468
1469 2016-06-23  Simon Fraser  <simon.fraser@apple.com>
1470
1471         [iOS] Make DumpRenderTree and WebKitTestRunner in the simulator use render server snapshotting
1472         https://bugs.webkit.org/show_bug.cgi?id=159077
1473
1474         Reviewed by Tim Horton.
1475
1476         Add CARenderServer SPIs.
1477
1478         Test: fast/harness/snapshot-captures-compositing.html
1479
1480         * platform/spi/cocoa/QuartzCoreSPI.h:
1481
1482 2016-06-23  Brian Burg  <bburg@apple.com>
1483
1484         Web Inspector: add assertions to catch dangling frontends that persist between tests
1485         https://bugs.webkit.org/show_bug.cgi?id=159073
1486
1487         Reviewed by Joseph Pecoraro.
1488
1489         Based on the analysis in https://webkit.org/b/159070, we suspect that some test
1490         flakiness might be caused by dangling frontends from previous test cases. Add an
1491         assertion that should catch any frontends that are attached to the inspected page's
1492         backend. There should never be any frontends connected when a test first starts.
1493
1494         * inspector/InspectorController.cpp:
1495         (WebCore::InspectorController::setIsUnderTest):
1496         * inspector/InspectorController.h:
1497
1498 2016-06-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
1499
1500         requestFrameAnimation() callback timestamp should be very close to Performance.now() 
1501         https://bugs.webkit.org/show_bug.cgi?id=159038
1502
1503         Reviewed by Simon Fraser.
1504
1505         Pass the Performance.now() to requestFrameAnimation() callback. Do not add
1506         the timeUntilOutput which is the difference between outputTime and now since
1507         this addition makes us report a timestamp ahead in the future by almost 33ms.
1508
1509         A new function named "nowTimestamp()" is added to the DOMWindow class. It
1510         calls Performance.now() if WEB_TIMING is enabled, otherwise it calls
1511         monotonicallyIncreasingTime(). The returned timestamp is seconds and it is
1512         relative to the document loading time.
1513
1514         The timestamp passing will be removed all the down till the callers of
1515         ScriptedAnimationController::serviceScriptedAnimations(). The callers will
1516         getting the now timestamp by calling DOMWindow::nowTimestamp().
1517
1518         Tests: animations/animation-callback-timestamp.html
1519                animations/animation-multiple-callbacks-timestamp.html
1520
1521         * dom/Document.cpp:
1522         (WebCore::Document::monotonicTimestamp):
1523         (WebCore::Document::serviceScriptedAnimations):
1524         * dom/Document.h:
1525         * dom/ScriptedAnimationController.cpp:
1526         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
1527         (WebCore::ScriptedAnimationController::animationTimerFired):
1528         (WebCore::ScriptedAnimationController::displayRefreshFired):
1529         * dom/ScriptedAnimationController.h:
1530         * html/HTMLMediaElement.cpp:
1531         (WebCore::HTMLMediaElement::getVideoPlaybackQuality):
1532         * loader/DocumentLoadTiming.h:
1533         (WebCore::DocumentLoadTiming::referenceWallTime):
1534         * page/DOMWindow.cpp:
1535         (WebCore::DOMWindow::nowTimestamp):
1536         * page/DOMWindow.h:
1537         * page/FrameView.cpp:
1538         (WebCore::FrameView::serviceScriptedAnimations):
1539         * page/FrameView.h:
1540         * platform/graphics/DisplayRefreshMonitor.cpp:
1541         (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
1542         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
1543         * platform/graphics/DisplayRefreshMonitor.h:
1544         (WebCore::DisplayRefreshMonitor::setMonotonicAnimationStartTime): Deleted.
1545         * platform/graphics/DisplayRefreshMonitorClient.cpp:
1546         (WebCore::DisplayRefreshMonitorClient::fireDisplayRefreshIfNeeded):
1547         * platform/graphics/DisplayRefreshMonitorClient.h:
1548         * platform/graphics/GraphicsLayerUpdater.cpp:
1549         (WebCore::GraphicsLayerUpdater::displayRefreshFired):
1550         * platform/graphics/GraphicsLayerUpdater.h:
1551         * platform/graphics/ios/DisplayRefreshMonitorIOS.h:
1552         * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
1553         (-[WebDisplayLinkHandler handleDisplayLink:]):
1554         (WebCore::DisplayRefreshMonitorIOS::displayLinkFired):
1555         (WebCore::mediaTimeToCurrentTime): Deleted.
1556         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
1557         (WebCore::displayLinkCallback):
1558         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
1559         * platform/graphics/mac/DisplayRefreshMonitorMac.h:
1560         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
1561         (WebCore::CompositingCoordinator::syncDisplayState):
1562         (WebCore::CompositingCoordinator::nextAnimationServiceTime):
1563
1564 2016-06-23  David Kilzer  <ddkilzer@apple.com>
1565
1566         Remove unused HarfBuzzFaceCoreText.cpp
1567         <https://webkit.org/b/159065>
1568
1569         Reviewed by Myles C. Maxfield.
1570
1571         * platform/graphics/harfbuzz/HarfBuzzFaceCoreText.cpp: Removed.
1572
1573 2016-06-23  Joseph Pecoraro  <pecoraro@apple.com>
1574
1575         Web Inspector: Memory Timeline sometimes shows impossible value for bmalloc size (underflowed)
1576         https://bugs.webkit.org/show_bug.cgi?id=158110
1577         <rdar://problem/26498584>
1578
1579         Reviewed by Andreas Kling.
1580
1581         IOSurface memory backing Canvas element buffers should be classified as "GC Owned",
1582         but should not be considered a part of bmalloc. In fact, the actual memory cost is
1583         external to the Web Content Process. The majority of extra memory reporters tend
1584         to report extra memory that is also allocated in bmalloc. However, some report
1585         non-bmalloc memory, such as the IOSurfaces here.
1586         
1587         Continue to report the memory cost without changes to inform the Heap for garbage
1588         collection. However, also keep better accounting of GCOwned memory that is external
1589         to the process for better accounting for the Resource Usage overlay and Web Inspector
1590         Memory timeline.
1591         
1592         This is a bit of a game where we want to display the best possible number for
1593         "GCOwned memory" in the tools, but some of that memory shows up in the other
1594         regions (bmalloc, system malloc, etc). Already many sizes are estimates
1595         (ReportExtraMemory, reportExtraMemory ignores small allocations), so we just focus
1596         on getting the largest sources of allocations, such as Canvas IOSurfaces here,
1597         into the right bucket. ResourceUsageThreadCocoa continues to subtract the "extra"
1598         memory from bmalloc. So, we should address other large sources of "extra memory"
1599         not in bmalloc. A likely candidate is HTMLMediaElement which uses the deprecated
1600         reporting right now.
1601
1602         * bindings/scripts/CodeGeneratorJS.pm:
1603         (GenerateImplementation):
1604         * bindings/scripts/IDLAttributes.txt:
1605         Add a way to report External memory, dependent on reporting Extra memory.
1606
1607         * html/HTMLCanvasElement.cpp:
1608         (WebCore::HTMLCanvasElement::externalMemoryCost):
1609         * html/HTMLCanvasElement.h:
1610         * html/HTMLCanvasElement.idl:
1611         Report external memory cost just like extra memory.
1612
1613         * page/ResourceUsageData.cpp:
1614         (WebCore::ResourceUsageData::ResourceUsageData):
1615         * page/ResourceUsageData.h:
1616         (WebCore::MemoryCategoryInfo::totalSize):
1617         * page/cocoa/ResourceUsageOverlayCocoa.mm:
1618         (WebCore::RingBuffer::at):
1619         (WebCore::appendDataToHistory):
1620         (WebCore::ResourceUsageOverlay::platformDraw):
1621         * page/cocoa/ResourceUsageThreadCocoa.mm:
1622         (WebCore::categoryForVMTag):
1623         (WebCore::ResourceUsageThread::platformThreadBody):
1624         Do not count the GCOwned External memory as dirty memory.
1625         Include External memory output in the overlay.
1626
1627         * inspector/InspectorMemoryAgent.cpp:
1628         (WebCore::InspectorMemoryAgent::collectSample):
1629         When sizing the JavaScript portion, include both the GC Owned
1630         category's dirty and external memory. Ultimately we will
1631         want this everywhere in case things change.
1632
1633         * platform/graphics/ImageBuffer.cpp:
1634         (WebCore::memoryCost):
1635         (WebCore::externalMemoryCost):
1636         * platform/graphics/ImageBuffer.h:
1637         * platform/graphics/cg/ImageBufferCG.cpp:
1638         (WebCore::ImageBuffer::memoryCost):
1639         (WebCore::ImageBuffer::externalMemoryCost):
1640         Report IOSurface total bytes as extra memory and external memory
1641         so that it can be tracked as GC Owned memory that is separate from
1642         regular (bmalloc/other) in process memory.
1643
1644 2016-06-23  Alexey Proskuryakov  <ap@apple.com>
1645
1646         Handle (0, 0) ranges from Lookup
1647         https://bugs.webkit.org/show_bug.cgi?id=159062
1648         rdar://problem/26960385
1649
1650         Reviewed by Tim Horton.
1651
1652         * editing/mac/DictionaryLookup.mm: (WebCore::DictionaryLookup::rangeAtHitTestResult):
1653         Paper over <https://bugs.webkit.org/show_bug.cgi?id=159063>, which seems too involved
1654         to fix now.
1655
1656 2016-06-23  Joseph Pecoraro  <pecoraro@apple.com>
1657
1658         Web Inspector: first heap snapshot taken when a page is reloaded happens before the reload navigation
1659         https://bugs.webkit.org/show_bug.cgi?id=158995
1660         <rdar://problem/26923778>
1661
1662         Reviewed by Brian Burg.
1663
1664         When the "Heap" instrument is included in the Timeline list
1665         of instruments, defer starting it in an auto-capture scenario
1666         until after the page does its first navigation.
1667
1668         AutoCapture on the backend happens when it is enabled at
1669         the main resource starts loading. In that case it proceeds
1670         through the following phases:
1671
1672             No Auto Capture:
1673                 None
1674
1675             Auto Capture:
1676                 BeforeLoad -> FirstNavigation -> AfterFirstNavigation
1677
1678         When toggling instruments for backend initiated capture
1679         most instruments do not care and will just start/stop.
1680
1681         * inspector/InspectorInstrumentation.cpp:
1682         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1683         Inform the TimelineAgent that the main frame navigated.
1684         Do this after informing the HeapAgent (so any potential
1685         snapshot does not get cleared) and PageAgent (so the
1686         frontend knows the page navigated before the agent starts).
1687
1688         * inspector/InspectorTimelineAgent.h:
1689         * inspector/InspectorTimelineAgent.cpp:
1690         (WebCore::InspectorTimelineAgent::internalStop):
1691         (WebCore::InspectorTimelineAgent::mainFrameStartedLoading):
1692         (WebCore::InspectorTimelineAgent::mainFrameNavigated):
1693         Update the auto capture phase transitions.
1694
1695         (WebCore::InspectorTimelineAgent::toggleHeapInstrument):
1696         Only start the heap agent during the None phase (console.profile)
1697         or with the first navigation (auto capture page navigation).
1698
1699 2016-06-23  Joseph Pecoraro  <pecoraro@apple.com>
1700
1701         Web Inspector: Snapshots should be cleared at some point
1702         https://bugs.webkit.org/show_bug.cgi?id=157907
1703         <rdar://problem/26373610>
1704
1705         Reviewed by Timothy Hatcher.
1706
1707         * CMakeLists.txt:
1708         * WebCore.xcodeproj/project.pbxproj:
1709         * inspector/InspectorAllInOne.cpp:
1710         New specialized agent.
1711
1712         * inspector/InspectorController.cpp:
1713         (WebCore::InspectorController::InspectorController):
1714         Construct a specialized HeapAgent.
1715
1716         * inspector/PageHeapAgent.h:
1717         * inspector/PageHeapAgent.cpp:
1718         (WebCore::PageHeapAgent::PageHeapAgent):
1719         (WebCore::PageHeapAgent::enable):
1720         (WebCore::PageHeapAgent::disable):
1721         (WebCore::PageHeapAgent::mainFrameNavigated):
1722         Clear backend snapshots on page navigations.
1723         Set the PageHeapAgent instrumenting agent on enable/disable.
1724
1725         * inspector/InstrumentingAgents.cpp:
1726         (WebCore::InstrumentingAgents::reset):
1727         * inspector/InstrumentingAgents.h:
1728         (WebCore::InstrumentingAgents::pageHeapAgent):
1729         (WebCore::InstrumentingAgents::setPageHeapAgent):
1730         Active PageHeapAgent.
1731
1732         * inspector/InspectorInstrumentation.cpp:
1733         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1734         Inform the PageHeapAgent when the mainframe navigates.
1735
1736 2016-06-23  Joseph Pecoraro  <pecoraro@apple.com>
1737
1738         CSSComputedStyleDeclaration::length should recalculate styles if needed to provide the correct value
1739         https://bugs.webkit.org/show_bug.cgi?id=159053
1740         <rdar://problem/26638119>
1741
1742         Reviewed by Simon Fraser.
1743
1744         Test: fast/css/variables/custom-property-computed-style-length-update.html
1745
1746         * css/CSSComputedStyleDeclaration.cpp:
1747         (WebCore::CSSComputedStyleDeclaration::length):
1748
1749 2016-06-23  John Wilander  <wilander@apple.com>
1750
1751         Enable window.open() for existing versions of Secret Society
1752         https://bugs.webkit.org/show_bug.cgi?id=159049
1753         <rdar://problem/26528349>
1754
1755         Reviewed by Andy Estes.
1756
1757         The Secret Society Hidden Mystery app has a broken version check treating iOS 10
1758         as iOS 1 on iPads. Therefore it believes it can use window.open() in a tap
1759         handler. We should allow the existing versions of the app to do this to not break
1760         them.
1761
1762         No new tests. Tested manually in the app.
1763
1764         * page/DOMWindow.cpp:
1765         (WebCore::DOMWindow::allowPopUp):
1766             Now checks with Settings whether it should allow a popup even though it is
1767             not processing a user gesture.
1768         * page/Settings.in:
1769             Added setting allowWindowOpenWithoutUserGesture.
1770         * platform/RuntimeApplicationChecks.h:
1771         * platform/RuntimeApplicationChecks.mm:
1772         (WebCore::IOSApplication::isTheSecretSocietyHiddenMystery):
1773             Added.
1774
1775 2016-06-23  Chris Dumez  <cdumez@apple.com>
1776
1777         Only call sqlite3_initialize() when a SQLite database is actually being opened
1778         https://bugs.webkit.org/show_bug.cgi?id=159033
1779
1780         Reviewed by Brady Eidson.
1781
1782         Only call sqlite3_initialize() when a SQLite database is actually being opened
1783         instead of doing it unconditionally. sqlite3_initialize() was previously called
1784         in the SQLiteDatabase constructor which gets called on WebContent process
1785         initialization because a DatabaseTracker is constructed on initialization and
1786         DatabaseTracker has a SQLiteDatabase data member.
1787
1788         * platform/sql/SQLiteDatabase.cpp:
1789         (WebCore::initializeSQLiteIfNecessary):
1790         (WebCore::SQLiteDatabase::open):
1791         (WebCore::SQLiteDatabase::SQLiteDatabase): Deleted.
1792         * platform/sql/SQLiteDatabase.h:
1793
1794 2016-06-23  Adam Bergkvist  <adam.bergkvist@ericsson.com>
1795
1796         WebRTC: Align 'update ICE connection/gathering state' steps with the WebRTC 1.0 specification
1797         https://bugs.webkit.org/show_bug.cgi?id=159054
1798
1799         Reviewed by Eric Carlson.
1800
1801         Add checks for same state and closed RTCPeerConnection in the 'update ICE connection state'
1802         and 'update ICE gathering state' routines as described in [1].
1803
1804         [1] https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#update-ice-gathering-state
1805
1806         No change in current behavior.
1807
1808         * Modules/mediastream/RTCPeerConnection.cpp:
1809         (WebCore::RTCPeerConnection::updateIceGatheringState):
1810         (WebCore::RTCPeerConnection::updateIceConnectionState):
1811
1812 2016-06-23  Adam Bergkvist  <adam.bergkvist@ericsson.com>
1813
1814         WebRTC: Add support for RTCPeerConnection legacy MediaStream-based API
1815         https://bugs.webkit.org/show_bug.cgi?id=158940
1816
1817         Reviewed by Eric Carlson.
1818
1819         Implement the legacy MediaStream-based RTCPeerConnection API as JS built-ins. The
1820         getRemoteStreams() function and the 'addstream' event are partly implemented with native
1821         code.
1822
1823         Test: fast/mediastream/RTCPeerConnection-legacy-stream-based-api.html
1824
1825         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
1826         (WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask):
1827         (WebCore::MediaEndpointPeerConnection::getRemoteStreams):
1828         The getRemoteStreams() function and the 'addstream' event is backed up by native code.
1829         * Modules/mediastream/MediaEndpointPeerConnection.h:
1830         * Modules/mediastream/MediaStream.idl:
1831         * Modules/mediastream/PeerConnectionBackend.h:
1832         * Modules/mediastream/RTCPeerConnection.h:
1833         * Modules/mediastream/RTCPeerConnection.idl:
1834         * Modules/mediastream/RTCPeerConnection.js:
1835         (initializeRTCPeerConnection):
1836         (getLocalStreams):
1837         (getRemoteStreams):
1838         (getStreamById):
1839         (addStream):
1840         (removeStream):
1841         Legacy API implemented as JS built-ins.
1842         * bindings/js/JSDOMGlobalObject.cpp:
1843         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
1844         * bindings/js/WebCoreBuiltinNames.h:
1845
1846 2016-06-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1847
1848         Unreviewed. Fix the build with CSS Shapes disabled.
1849
1850         * css/StyleBuilderConverter.h:
1851
1852 2016-06-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1853
1854         [Soup] Clean up SocketStreamHandle soup implementation
1855         https://bugs.webkit.org/show_bug.cgi?id=159024
1856
1857         Reviewed by Žan Doberšek.
1858
1859         Stop using a global HashMap to "acivate"/"deactivate" handles, and just take a reference of the handle and
1860         pass the ownership to the callbacks, using a GCancellable to cancel all async operations.
1861
1862         * platform/network/soup/SocketStreamHandle.h:
1863         (WebCore::SocketStreamHandle::create):
1864         (WebCore::SocketStreamHandle::id): Deleted.
1865         * platform/network/soup/SocketStreamHandleSoup.cpp:
1866         (WebCore::SocketStreamHandle::SocketStreamHandle):
1867         (WebCore::SocketStreamHandle::connected):
1868         (WebCore::SocketStreamHandle::connectedCallback):
1869         (WebCore::SocketStreamHandle::readBytes):
1870         (WebCore::SocketStreamHandle::readReadyCallback):
1871         (WebCore::SocketStreamHandle::didFail):
1872         (WebCore::SocketStreamHandle::platformSend):
1873         (WebCore::SocketStreamHandle::platformClose):
1874         (WebCore::SocketStreamHandle::beginWaitingForSocketWritability):
1875         (WebCore::SocketStreamHandle::writeReadyCallback):
1876         (WebCore::getHandleFromId): Deleted.
1877         (WebCore::deactivateHandle): Deleted.
1878         (WebCore::activateHandle): Deleted.
1879         (WebCore::SocketStreamHandle::~SocketStreamHandle): Deleted.
1880         (WebCore::connectedCallback): Deleted.
1881         (WebCore::readReadyCallback): Deleted.
1882         (WebCore::writeReadyCallback): Deleted.
1883
1884 2016-06-22  Brady Eidson  <beidson@apple.com>
1885
1886         DatabaseProcess doesn't handle WebProcesses going away uncleanly.
1887         https://bugs.webkit.org/show_bug.cgi?id=158894
1888
1889         Reviewed by Alex Christensen.
1890
1891         No new tests (Covered by additions to existing API test).
1892
1893         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
1894         (WebCore::IDBServer::IDBConnectionToClient::registerDatabaseConnection):
1895         (WebCore::IDBServer::IDBConnectionToClient::unregisterDatabaseConnection):
1896         (WebCore::IDBServer::IDBConnectionToClient::connectionToClientClosed):
1897         * Modules/indexeddb/server/IDBConnectionToClient.h:
1898         
1899         * Modules/indexeddb/server/IDBServer.cpp:
1900         (WebCore::IDBServer::IDBServer::unregisterConnection): Call connectionToClientClosed() on
1901           the connection, which cleans up after it in the server.
1902         
1903         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
1904         (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
1905         (WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):
1906
1907 2016-06-22  Benjamin Poulain  <bpoulain@apple.com>
1908
1909         AX: Add support for CSS4 :focus-within pseudo
1910         https://bugs.webkit.org/show_bug.cgi?id=140144
1911
1912         Reviewed by Antti Koivisto.
1913
1914         Tests: fast/css/pseudo-focus-within-basics.html
1915                fast/css/pseudo-focus-within-inside-shadow-dom.html
1916                fast/css/pseudo-focus-within-style-sharing-1.html
1917                fast/css/pseudo-focus-within-style-sharing-2.html
1918                fast/selectors/focus-within-style-update.html
1919
1920         * css/CSSSelector.cpp:
1921         (WebCore::CSSSelector::selectorText):
1922         * css/CSSSelector.h:
1923         * css/SelectorChecker.cpp:
1924         (WebCore::SelectorChecker::checkOne):
1925         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
1926         * cssjit/SelectorCompiler.cpp:
1927         (WebCore::SelectorCompiler::addPseudoClassType):
1928         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1929         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasFocusWithin):
1930         * dom/ContainerNode.cpp:
1931         (WebCore::destroyRenderTreeIfNeeded):
1932         * dom/Element.cpp:
1933         (WebCore::Element::~Element):
1934         (WebCore::Element::setFocus):
1935         (WebCore::Element::unregisterNamedFlowContentElement):
1936         (WebCore::Element::setIsNamedFlowContentElement):
1937         (WebCore::Element::clearIsNamedFlowContentElement):
1938         (WebCore::Element::setStyleAffectedByFocusWithin):
1939         (WebCore::Element::rareDataStyleAffectedByFocusWithin):
1940         (WebCore::Element::rareDataIsNamedFlowContentElement):
1941         * dom/Element.h:
1942         (WebCore::Element::hasFocusWithin):
1943         (WebCore::Element::styleAffectedByFocusWithin):
1944         (WebCore::Element::isNamedFlowContentElement):
1945         (WebCore::Element::setHasFocusWithin):
1946         * dom/ElementRareData.h:
1947         (WebCore::ElementRareData::styleAffectedByFocusWithin):
1948         (WebCore::ElementRareData::setStyleAffectedByFocusWithin):
1949         (WebCore::ElementRareData::isNamedFlowContentElement):
1950         (WebCore::ElementRareData::setIsNamedFlowContentElement):
1951         (WebCore::ElementRareData::ElementRareData):
1952         (WebCore::ElementRareData::resetComputedStyle):
1953         * dom/Node.h:
1954         (WebCore::Node::flagHasFocusWithin):
1955         (WebCore::Node::isNamedFlowContentNode): Deleted.
1956         (WebCore::Node::setIsNamedFlowContentNode): Deleted.
1957         (WebCore::Node::clearIsNamedFlowContentNode): Deleted.
1958         * rendering/RenderNamedFlowThread.cpp:
1959         (WebCore::RenderNamedFlowThread::clearContentElements):
1960         (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
1961         (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
1962         (WebCore::nextNodeInsideContentElement):
1963         * style/RenderTreeUpdater.cpp:
1964         (WebCore::RenderTreeUpdater::updateElementRenderer):
1965         * style/StyleRelations.cpp:
1966         (WebCore::Style::commitRelationsToRenderStyle):
1967         (WebCore::Style::commitRelations):
1968         * style/StyleRelations.h:
1969         * style/StyleSharingResolver.cpp:
1970         (WebCore::Style::SharingResolver::canShareStyleWithElement):
1971
1972 2016-06-22  Oliver Hunt  <oliver@apple.com>
1973
1974         Integrate WebKit's CFURLConnection with App Transport Security
1975         https://bugs.webkit.org/show_bug.cgi?id=159039
1976         <rdar://problem/26953685>
1977
1978         Reviewed by Alex Christensen.
1979
1980         Pass additional options to NSURLConnect initialiser to identify that
1981         this connection is for WebKit content loading.
1982
1983         * platform/network/mac/ResourceHandleMac.mm:
1984         (WebCore::ResourceHandle::createNSURLConnection):
1985
1986 2016-06-20  Jeremy Jones  <jeremyj@apple.com>
1987
1988         Adopt commitPriority to get rid of the 2 AVPL solution for PiP
1989         https://bugs.webkit.org/show_bug.cgi?id=158949
1990         rdar://problem/26867866
1991
1992         Reviewed by Simon Fraser.
1993
1994         No new tests because there is no behavior change. This reverts changes from 
1995         https://bugs.webkit.org/show_bug.cgi?id=158148 and instead uses -[CAContext commitPriority:]
1996         to prevent flicker when moving a layer between contexts. 
1997         commitPriority allows the layer to be added to the destination context before it is 
1998         removed from the source context.
1999
2000         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: remove m_secondaryVideoLayer.
2001         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: ditto
2002         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenGravity): ditto.
2003         (WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds): ditto.
2004         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): ditto.
2005         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity): ditto.
2006         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: ditto
2007         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer): ditto
2008         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: ditto
2009         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers):ditto
2010         * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.h: ditto
2011         * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm: ditto
2012         (WebCore::VideoFullscreenLayerManager::setVideoLayer): ditto
2013         (WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer): ditto and adopt commitPriority.
2014         (WebCore::VideoFullscreenLayerManager::setVideoFullscreenFrame): ditto
2015         (WebCore::VideoFullscreenLayerManager::setVideoLayers): Deleted. 
2016         (WebCore::VideoFullscreenLayerManager::didDestroyVideoLayer): remove m_secondaryVideoLayer.
2017         * platform/spi/cocoa/QuartzCoreSPI.h: Add commitPriority.
2018
2019 2016-06-22  Simon Fraser  <simon.fraser@apple.com>
2020
2021         REGRESSION (r201629): Weird button glitching on github.com
2022         https://bugs.webkit.org/show_bug.cgi?id=159031
2023         rdar://problem/26880332
2024
2025         Reviewed by Tim Horton.
2026
2027         r201629 changed the logic slightly when creating an image buffer for a scaled context;
2028         it set the buffer context's scale to the scale in the source context, but this failed
2029         to take into account the rounding up of the buffer size, which the old code did.
2030
2031         Fix by reverting to the old behavior.
2032
2033         Since buffer sizes can only be integral, changed compatibleBufferSize() to return
2034         an IntSize.
2035
2036         Test: fast/backgrounds/scaled-gradient-background.html
2037
2038         * platform/graphics/ImageBuffer.cpp:
2039         (WebCore::ImageBuffer::createCompatibleBuffer):
2040         (WebCore::ImageBuffer::compatibleBufferSize):
2041         * platform/graphics/ImageBuffer.h:
2042         * platform/graphics/IntRect.h:
2043         (WebCore::IntRect::area):
2044         * platform/graphics/IntSize.h:
2045         (WebCore::IntSize::area): Make this return an unsigned.
2046
2047 2016-06-22  Anders Carlsson  <andersca@apple.com>
2048
2049         Inline the last of the Apple Pay WebCore code
2050         https://bugs.webkit.org/show_bug.cgi?id=159032
2051
2052         Reviewed by Tim Horton.
2053
2054         * loader/EmptyClients.cpp:
2055         (WebCore::fillWithEmptyClients):
2056         * page/MainFrame.cpp:
2057         (WebCore::MainFrame::MainFrame):
2058         * page/MainFrame.h:
2059         * page/PageConfiguration.h:
2060         * platform/cocoa/ThemeCocoa.mm:
2061         (WebCore::passKitBundle):
2062         (WebCore::loadPassKitPDFPage):
2063         (WebCore::applePayButtonLogoBlack):
2064         (WebCore::applePayButtonLogoWhite):
2065         (WebCore::drawApplePayButton):
2066         (WebCore::ThemeCocoa::drawNamedImage):
2067
2068 2016-06-22  Anders Carlsson  <andersca@apple.com>
2069
2070         Exception is not thrown when shipping method is an invalid amount
2071         https://bugs.webkit.org/show_bug.cgi?id=159030
2072         rdar://problem/26700413
2073
2074         Reviewed by Tim Horton.
2075
2076         * Modules/applepay/ApplePaySession.cpp:
2077         (WebCore::createShippingMethods):
2078         Bail if createShippingMethod returns Nullopt.
2079
2080         (WebCore::createPaymentRequest):
2081         Bail if createShippingMethods returns Nullopt.
2082
2083 2016-06-22  Anders Carlsson  <andersca@apple.com>
2084
2085         Exception is not thrown when shipping method is an invalid amount
2086         https://bugs.webkit.org/show_bug.cgi?id=159029
2087         rdar://problem/26700413
2088
2089         Reviewed by Tim Horton.
2090
2091         * Modules/applepay/PaymentRequest.h:
2092         Change ShippingMethod::amount to be a signed 64-bit integer.
2093
2094         * Modules/applepay/PaymentRequestValidator.cpp:
2095         (WebCore::PaymentRequestValidator::validate):
2096         Call validateShippingMethods.
2097
2098         (WebCore::PaymentRequestValidator::validateShippingMethods):
2099         Validate all the shipping methods.
2100
2101         (WebCore::PaymentRequestValidator::validateShippingMethod):
2102         Check that the amount is >= 0.
2103
2104         * Modules/applepay/PaymentRequestValidator.h:
2105         Add new members.
2106
2107 2016-06-22  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2108
2109         WebRTC: Add support for the negotiationneeded event in MediaEndpointPeerConnection
2110         https://bugs.webkit.org/show_bug.cgi?id=158985
2111
2112         Reviewed by Eric Carlson.
2113
2114         Implement MediaEndpointPeerConnection's isNegotiationNeeded, markAsNeedingNegotiation and
2115         clearNegotiationNeededState functions. The calls to these functions are already up-to-date.
2116
2117         Test: fast/mediastream/RTCPeerConnection-more-media-to-negotiate.html
2118
2119         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
2120         (WebCore::MediaEndpointPeerConnection::markAsNeedingNegotiation):
2121         * Modules/mediastream/MediaEndpointPeerConnection.h:
2122         * Modules/mediastream/RTCPeerConnection.cpp:
2123         (WebCore::RTCPeerConnection::scheduleNegotiationNeededEvent):
2124
2125 2016-06-22  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2126
2127         WebRTC: Replace RTCPeerConnection custom constructor with a JS built-in constructor
2128         https://bugs.webkit.org/show_bug.cgi?id=158832
2129
2130         Reviewed by Eric Carlson and Youenn Fablet.
2131
2132         Use a JS built-in constructor instead of a custom constructor. This makes it easier to
2133         initialize private fields for functions implemented as JS built-ins. The constructor
2134         behavior is in need of updating, but that is left to a follow-up change [1].
2135
2136         [1] http://webkit.org/b/158936
2137         No change in behavior.
2138
2139         * CMakeLists.txt:
2140         * Modules/mediastream/RTCPeerConnection.cpp:
2141         (WebCore::RTCPeerConnection::create):
2142         (WebCore::RTCPeerConnection::RTCPeerConnection):
2143         (WebCore::RTCPeerConnection::~RTCPeerConnection):
2144         (WebCore::RTCPeerConnection::initializeWith):
2145         * Modules/mediastream/RTCPeerConnection.h:
2146         * Modules/mediastream/RTCPeerConnection.idl:
2147         * Modules/mediastream/RTCPeerConnection.js:
2148         (initializeRTCPeerConnection):
2149         Add JS built-in constructor function.
2150         * WebCore.xcodeproj/project.pbxproj:
2151         * bindings/js/JSRTCPeerConnectionCustom.cpp: Removed.
2152         (WebCore::constructJSRTCPeerConnection): Deleted.
2153
2154 2016-06-22  Youenn Fablet  <youenn@apple.com>
2155
2156         CrossOriginPreflightChecker should call DocumentThreadableLoader preflightFailure instead of didFailLoading
2157         https://bugs.webkit.org/show_bug.cgi?id=158984
2158
2159         Reviewed by Darin Adler.
2160
2161         No change of behavior.
2162
2163         Calling DocumentThreadableLoader preflightFailure instead of didFailLoading for any preflight error case.
2164
2165         * loader/CrossOriginPreflightChecker.cpp:
2166         (WebCore::CrossOriginPreflightChecker::notifyFinished): Directly calling preflightFailure callback.
2167         (WebCore::CrossOriginPreflightChecker::doPreflight): Ditto.
2168         (WebCore::CrossOriginPreflightChecker::handleLoadingFailure): Deleted.
2169         (WebCore::CrossOriginPreflightChecker::redirectReceived): Deleted (should have been removed as part of
2170         https://bugs.webkit.org/show_bug.cgi?id=111008).
2171         * loader/CrossOriginPreflightChecker.h:
2172
2173 2016-06-22  Youenn Fablet  <youennf@gmail.com>
2174
2175         JSDOMIterator forEach should support second optional parameter
2176         https://bugs.webkit.org/show_bug.cgi?id=159020
2177
2178         Reviewed by Chris Dumez.
2179
2180         Covered by beefed up test.
2181
2182         * bindings/js/JSDOMIterator.h:
2183         (WebCore::iteratorForEach): Setting callback thisValue to the second argument passed to forEach.
2184
2185 2016-06-22  Jer Noble  <jer.noble@apple.com>
2186
2187         Media controls stop working after exiting PiP
2188         https://bugs.webkit.org/show_bug.cgi?id=159026
2189         <rdar://problem/26753579>
2190
2191         Reviewed by Eric Carlson.
2192
2193         Do not slave setting WebVideoFullscreenModelVideoElement::setVideoElement() to
2194         WebPlaybackSessionModelVideoElement::setMediaElement(). After all, someone else
2195         (i.e., the media controls) may still be using it.
2196
2197         * platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
2198         (WebVideoFullscreenModelVideoElement::setVideoElement): Deleted.
2199         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2200         (WebVideoFullscreenControllerContext::didCleanupFullscreen):
2201         (WebVideoFullscreenControllerContext::setUpFullscreen):
2202
2203 2016-06-22  Jer Noble  <jer.noble@apple.com>
2204
2205         Update document's isPlayingMedia() state whenever media element's media state changes
2206         https://bugs.webkit.org/show_bug.cgi?id=159018
2207         <rdar://problem/26586630>
2208
2209         Reviewed by Beth Dakin.
2210
2211         The Document can end up with a stale m_mediaState if its own value isn't updated when
2212         its constituent HTMLMediaElement's m_mediaStates change.
2213
2214         * html/HTMLMediaElement.cpp:
2215         (WebCore::HTMLMediaElement::updateMediaState):
2216
2217 2016-06-22  Simon Fraser  <simon.fraser@apple.com>
2218
2219         Crash under GraphicsLayerCA::recursiveCommitChanges() with deep layer trees
2220         https://bugs.webkit.org/show_bug.cgi?id=159023
2221         rdar://problem/25377842
2222
2223         Reviewed by Tim Horton.
2224
2225         Having an on-stack DisplayList::Recorder increased the stack frame size significantly,
2226         causing stack exhaustion with deep layer trees, despite the existing depth check.
2227
2228         Make the Recorder heap-allocated to fix this.
2229
2230         Tested by LayoutTests/compositing//layer-creation/deep-tree.html.
2231
2232         * platform/graphics/ca/GraphicsLayerCA.cpp:
2233         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
2234
2235 2016-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>
2236
2237         [GTK] Add support for variadic parameters to GObject DOM bindings
2238         https://bugs.webkit.org/show_bug.cgi?id=158942
2239
2240         Reviewed by Michael Catanzaro.
2241
2242         Generate code for functions having variadic parameters.
2243
2244         * bindings/scripts/CodeGeneratorGObject.pm:
2245         (GenerateFunction):
2246         (SkipFunction):
2247         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2248         (webkit_dom_test_obj_variadic_string_method):
2249         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2250
2251 2016-06-21  Benjamin Poulain  <bpoulain@apple.com>
2252
2253         :hover CSS pseudo-class sometimes keeps matching ever after mouse has left the element
2254         https://bugs.webkit.org/show_bug.cgi?id=158340
2255
2256         Reviewed by Simon Fraser.
2257
2258         When removing a hovered subtree from the document, we were getting
2259         into an inconsistent state where m_hoveredElement is in the detached
2260         subtree and we have no way of clearing the existing IsHovered flags.
2261
2262         What happens is:
2263         -The root "a" has an child "b" that is hovered.
2264         -"a" starts being removed from the tree, its renderer is destroyed.
2265         -RenderTreeUpdater::tearDownRenderers() pushes "a" on the teardownStack
2266          and calls hoveredElementDidDetach().
2267         -hoveredElementDidDetach() is called with "a". "a" is not the hovered
2268          element, the function does nothing.
2269         -RenderTreeUpdater::tearDownRenderers() pushes "b" on the teardownStack
2270          and calls hoveredElementDidDetach().
2271         -hoveredElementDidDetach() is called with "b". The next parent with a renderer
2272          is "a", m_hoveredElement is set to "a".
2273         -"a"'s parent is set to nullptr.
2274
2275         -> We have a m_hoveredElement on the root of a detached tree, making
2276            it impossible to clear the real dirty tree.
2277
2278         This patch changes the order in which we clear the flags.
2279         It is done in the order in which we clear the renderers to ensure
2280         the last element with a dead renderer is the last to update m_hoveredElement.
2281
2282         Tests: fast/css/ancestor-of-hovered-element-detached.html
2283                fast/css/ancestor-of-hovered-element-removed.html
2284
2285         * Source/WebCore/style/RenderTreeUpdater.cpp:
2286
2287 2016-06-21  Youenn Fablet  <youennf@gmail.com>
2288
2289         [Fetch API] Rename 'origin-only' referrer policy to 'origin'
2290         https://bugs.webkit.org/show_bug.cgi?id=158982
2291
2292         Reviewed by Alex Christensen.
2293
2294         Covered by updated tests.
2295
2296         * Modules/fetch/FetchRequest.cpp:
2297         (WebCore::setReferrerPolicy): Renaming origin-only to origin.
2298         * Modules/fetch/FetchRequest.idl: Ditto.
2299         * loader/FetchOptions.h: Ditto.
2300
2301 2016-06-21  Chris Dumez  <cdumez@apple.com>
2302
2303         Let the compiler generate the move constructor and assignment operator for ScriptExecutionContext::Task
2304         https://bugs.webkit.org/show_bug.cgi?id=159013
2305
2306         Reviewed by Brady Eidson.
2307
2308         Let the compiler generate the move constructor and assignment operator for
2309         ScriptExecutionContext::Task. We previously manually defined the move
2310         constructor but there is no need as it doesn't do anything special.
2311
2312         * dom/ScriptExecutionContext.h:
2313
2314 2016-06-21  Dean Jackson  <dino@apple.com>
2315
2316         DumpRenderTree crashed in com.apple.WebCore: WebCore::HTMLSelectElement::updateSelectedState
2317         https://bugs.webkit.org/show_bug.cgi?id=159009
2318         <rdar://problem/23454623>
2319
2320         Reviewed by Jon Lee.
2321
2322         It seems we can get bogus indices from UIKit's implementation
2323         of UIWebSelectMultiplePicker. Guard against this situation.
2324
2325         Covered by running the existing tests in WebKit1 with Guard Malloc,
2326         such as fast/spatial-navigation/snav-multiple-select-optgroup.html
2327
2328         * html/HTMLSelectElement.cpp:
2329         (WebCore::HTMLSelectElement::updateSelectedState): Early return
2330         if we get an index out of range.
2331
2332 2016-06-21  Chris Dumez  <cdumez@apple.com>
2333
2334         Pass ScriptExecutionContext::Task as rvalue reference
2335         https://bugs.webkit.org/show_bug.cgi?id=159007
2336
2337         Reviewed by Anders Carlsson.
2338
2339         Pass ScriptExecutionContext::Task as rvalue reference since its non-copyable
2340         and has to be moved in.
2341
2342         * workers/WorkerLoaderProxy.h:
2343         * workers/WorkerMessagingProxy.cpp:
2344         (WebCore::WorkerMessagingProxy::postTaskToLoader):
2345         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
2346         * workers/WorkerMessagingProxy.h:
2347         * workers/WorkerRunLoop.cpp:
2348         (WebCore::WorkerRunLoop::postTask):
2349         (WebCore::WorkerRunLoop::postTaskAndTerminate):
2350         (WebCore::WorkerRunLoop::postTaskForMode):
2351         (WebCore::WorkerRunLoop::Task::Task):
2352         * workers/WorkerRunLoop.h:
2353
2354 2016-06-21  Anders Carlsson  <andersca@apple.com>
2355
2356         Include IdentifierInlines.h.
2357
2358         * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp:
2359
2360 2016-06-21  Anders Carlsson  <andersca@apple.com>
2361
2362         Add PaymentHeaders.h file.
2363
2364         * Modules/applepay/PaymentHeaders.h: Added.
2365         * WebCore.xcodeproj/project.pbxproj:
2366
2367 2016-06-21  Anders Carlsson  <andersca@apple.com>
2368
2369         Make a bunch of Apple Pay headers private instead of project.
2370
2371         * WebCore.xcodeproj/project.pbxproj:
2372
2373 2016-06-21  Anders Carlsson  <andersca@apple.com>
2374
2375         Move the last Apple Pay WebCore files to the open source repository
2376         https://bugs.webkit.org/show_bug.cgi?id=159005
2377
2378         Reviewed by Tim Horton.
2379
2380         * DerivedSources.make:
2381         * Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp: Added.
2382         * Modules/applepay/ApplePayPaymentAuthorizedEvent.h: Added.
2383         * Modules/applepay/ApplePayPaymentAuthorizedEvent.idl: Added.
2384         * Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp: Added.
2385         * Modules/applepay/ApplePayPaymentMethodSelectedEvent.h: Added.
2386         * Modules/applepay/ApplePayPaymentMethodSelectedEvent.idl: Added.
2387         * Modules/applepay/ApplePaySession.cpp: Added.
2388         * Modules/applepay/ApplePaySession.h: Added.
2389         * Modules/applepay/ApplePaySession.idl: Added.
2390         * Modules/applepay/ApplePayShippingContactSelectedEvent.cpp: Added.
2391         * Modules/applepay/ApplePayShippingContactSelectedEvent.h: Added.
2392         * Modules/applepay/ApplePayShippingContactSelectedEvent.idl: Added.
2393         * Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp: Added.
2394         * Modules/applepay/ApplePayShippingMethodSelectedEvent.h: Added.
2395         * Modules/applepay/ApplePayShippingMethodSelectedEvent.idl: Added.
2396         * Modules/applepay/ApplePayValidateMerchantEvent.cpp: Added.
2397         * Modules/applepay/ApplePayValidateMerchantEvent.h: Added.
2398         * Modules/applepay/ApplePayValidateMerchantEvent.idl: Added.
2399         * Modules/applepay/Payment.h: Added.
2400         * Modules/applepay/PaymentAuthorizationStatus.h: Added.
2401         * Modules/applepay/PaymentContact.h: Added.
2402         * Modules/applepay/PaymentMerchantSession.h: Added.
2403         * Modules/applepay/PaymentMethod.h: Added.
2404         * Modules/applepay/PaymentRequestValidator.cpp: Added.
2405         * Modules/applepay/PaymentRequestValidator.h: Added.
2406         * Modules/applepay/cocoa/PaymentContactCocoa.mm: Added.
2407         * Modules/applepay/cocoa/PaymentMethodCocoa.mm: Added.
2408         * WebCore.xcodeproj/project.pbxproj:
2409         * bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp: Added.
2410         * bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp: Added.
2411         * bindings/js/JSApplePaySessionCustom.cpp: Added.
2412         * bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp: Added.
2413         * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp: Added.
2414         * dom/EventNames.in:
2415         * dom/EventTargetFactory.in:
2416
2417 2016-06-21  Anders Carlsson  <andersca@apple.com>
2418
2419         Fix build.
2420
2421         * Configurations/FeatureDefines.xcconfig:
2422
2423 2016-06-21  Jiewen Tan  <jiewen_tan@apple.com>
2424
2425         Unreviewed, rolling out r202302, r202303, r202305, and
2426         r202306.
2427
2428         Roll out the rollouts because of breaking the build.
2429
2430         Reverted changesets:
2431
2432         "Unreviewed, rolling out r200678."
2433         https://bugs.webkit.org/show_bug.cgi?id=157453
2434         http://trac.webkit.org/changeset/202302
2435
2436         "Unreviewed, rolling out r200619."
2437         https://bugs.webkit.org/show_bug.cgi?id=131443
2438         http://trac.webkit.org/changeset/202303
2439
2440         "Unreviewed, attempt to fix the build after r202303."
2441         http://trac.webkit.org/changeset/202305
2442
2443         "Unreviewed, attempt to fix the build after r202303."
2444         http://trac.webkit.org/changeset/202306
2445
2446 2016-06-21  Chris Dumez  <cdumez@apple.com>
2447
2448         Unreviewed, attempt to fix the build after r202303.
2449
2450         * bindings/js/JSDOMIterator.h:
2451         (WebCore::IteratorInspector::decltype):
2452         (WebCore::IteratorInspector::test):
2453
2454 2016-06-21  Chris Dumez  <cdumez@apple.com>
2455
2456         Unreviewed, attempt to fix the build after r202303.
2457
2458         * bindings/js/JSDOMIterator.h:
2459         (WebCore::toJS):
2460
2461 2016-06-21  Jiewen Tan  <jiewen_tan@apple.com>
2462
2463         Unreviewed, rolling out r200619.
2464
2465         This incompleted feature broke http://m.yahoo.co.jp. Roll it
2466         out together with r200678.
2467
2468         Reverted changeset:
2469
2470         "NodeList should be iterable"
2471         https://bugs.webkit.org/show_bug.cgi?id=131443
2472         http://trac.webkit.org/changeset/200619
2473
2474 2016-06-21  Jiewen Tan  <jiewen_tan@apple.com>
2475
2476         Unreviewed, rolling out r200678.
2477
2478         This incompleted feature broke http://m.yahoo.co.jp. Roll it
2479         out together with r200619.
2480
2481         Reverted changeset:
2482
2483         "Ensure DOM iterators remain done"
2484         https://bugs.webkit.org/show_bug.cgi?id=157453
2485         http://trac.webkit.org/changeset/200678
2486
2487 2016-06-21  Anders Carlsson  <andersca@apple.com>
2488
2489         Begin moving the Apple Pay code to the open source repository
2490         https://bugs.webkit.org/show_bug.cgi?id=158998
2491
2492         Reviewed by Tim Horton.
2493
2494         * Configurations/FeatureDefines.xcconfig:
2495         Add ENABLE_APPLE_PAY.
2496
2497         * Modules/applepay/PaymentCoordinator.cpp: Added.
2498         * Modules/applepay/PaymentCoordinator.h: Added.
2499         * Modules/applepay/PaymentCoordinatorClient.h: Added.
2500         * Modules/applepay/PaymentRequest.cpp: Added.
2501         * Modules/applepay/PaymentRequest.h: Added.
2502         * Modules/applepay/cocoa/PaymentCocoa.mm: Added.
2503         * WebCore.xcodeproj/project.pbxproj:
2504         Add new files.
2505
2506         * dom/EventNames.h:
2507         Add new event names.
2508
2509         * page/MainFrame.h:
2510         Use a forward declaration.
2511
2512 2016-06-21  Said Abou-Hallawa  <sabouhallawa@apple,com>
2513
2514         Add system tracing points for requestAnimationFrame() workflow
2515         https://bugs.webkit.org/show_bug.cgi?id=158723
2516
2517         Reviewed by Simon Fraser.
2518
2519         Add trace points for requestAnimationFrame().
2520
2521         * dom/ScriptedAnimationController.cpp:
2522         (WebCore::ScriptedAnimationController::requestAnimationFrameEnabled):
2523         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
2524         (WebCore::ScriptedAnimationController::windowScreenDidChange):
2525         (WebCore::ScriptedAnimationController::scheduleAnimation):
2526         * dom/ScriptedAnimationController.h:
2527         * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
2528         (WebCore::DisplayRefreshMonitorIOS::requestRefreshCallback):
2529         (WebCore::DisplayRefreshMonitorIOS::displayLinkFired):
2530
2531 2016-06-20  Simon Fraser  <simon.fraser@apple.com>
2532
2533         [iOS] Typing text into a text field or text area causes screen to scroll down (hiding text entry)
2534         https://bugs.webkit.org/show_bug.cgi?id=158970
2535
2536         Reviewed by Ryosuke Niwa.
2537
2538         insertTextWithoutSendingTextEvent() should only reveal the selection up to the main frame on iOS,
2539         since the UI process can zoom and scroll the view to the text input.
2540
2541         Test: fast/forms/ios/typing-in-input-in-iframe.html
2542
2543         * editing/Editor.cpp:
2544         (WebCore::Editor::insertTextWithoutSendingTextEvent):
2545
2546 2016-06-21  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2547
2548         WebRTC: Remove unused MediaEndpointClient::gotRemoteSource function
2549         https://bugs.webkit.org/show_bug.cgi?id=158986
2550
2551         Reviewed by Eric Carlson.
2552
2553         Remote sources are explicitly created with MediaEndpoint::createMutedRemoteSource so the
2554         MediaEndpointClient::gotRemoteSource can be removed.
2555
2556         No change in behavior.
2557
2558         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
2559         (WebCore::MediaEndpointPeerConnection::gotRemoteSource): Deleted.
2560         * Modules/mediastream/MediaEndpointPeerConnection.h:
2561         * platform/mediastream/MediaEndpoint.h:
2562
2563 2016-06-20  Simon Fraser  <simon.fraser@apple.com>
2564
2565         Focus event dispatched in iframe causes parent document to scroll incorrectly
2566         https://bugs.webkit.org/show_bug.cgi?id=158629
2567         rdar://problem/26521616
2568
2569         Reviewed by Tim Horton.
2570
2571         When focussing elements in iframes, the page could scroll to an incorrect location.
2572         This happened because code in Element::focus() tried to disable scrolling on focus,
2573         but did so only for the current frame, so ancestor frames got programmatically scrolled.
2574         On iOS we handle the scrolling in the UI process, so never want the web process to
2575         do programmatic scrolling.
2576
2577         Fix by changing the focus and cache restore code to use SelectionRevealMode::DoNotReveal,
2578         rather than manually prohibiting frame scrolling. Pass SelectionRevealMode through various callers,
2579         and use RevealUpToMainFrame for iOS, allowing the UI process to do the zoomToRect: for the main frame.
2580
2581         Tests: fast/forms/ios/focus-input-in-iframe.html
2582                fast/forms/ios/programmatic-focus-input-in-iframe.html
2583
2584         * dom/Document.h:
2585         * dom/Element.cpp:
2586         (WebCore::Element::scrollIntoView):
2587         (WebCore::Element::scrollIntoViewIfNeeded):
2588         (WebCore::Element::scrollIntoViewIfNotVisible):
2589         (WebCore::Element::focus):
2590         (WebCore::Element::updateFocusAppearance):
2591         * dom/Element.h:
2592         * editing/Editor.cpp:
2593         (WebCore::Editor::insertTextWithoutSendingTextEvent):
2594         (WebCore::Editor::revealSelectionAfterEditingOperation):
2595         (WebCore::Editor::findStringAndScrollToVisible):
2596         * editing/FrameSelection.cpp:
2597         (WebCore::FrameSelection::updateAndRevealSelection):
2598         (WebCore::FrameSelection::revealSelection):
2599         (WebCore::FrameSelection::FrameSelection): Deleted.
2600         * editing/FrameSelection.h:
2601         * html/HTMLInputElement.cpp:
2602         (WebCore::HTMLInputElement::updateFocusAppearance):
2603         * html/HTMLTextAreaElement.cpp:
2604         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
2605         * page/ContextMenuController.cpp:
2606         (WebCore::ContextMenuController::contextMenuItemSelected):
2607         * page/FrameView.cpp:
2608         (WebCore::FrameView::scrollToAnchor):
2609         * rendering/RenderLayer.cpp:
2610         (WebCore::RenderLayer::scrollRectToVisible):
2611         (WebCore::RenderLayer::autoscroll):
2612         * rendering/RenderLayer.h:
2613         * rendering/RenderObject.cpp:
2614         (WebCore::RenderObject::scrollRectToVisible):
2615         * rendering/RenderObject.h:
2616
2617 2016-06-21  Frederic Wang  <fwang@igalia.com>
2618
2619         Implement RenderMathMLOperator::layoutBlock
2620         https://bugs.webkit.org/show_bug.cgi?id=157521
2621
2622         Reviewed by Brent Fulgham.
2623
2624         No new tests, already covered by existing tests.
2625
2626         Add an initial implementation of RenderMathMLOperator::layoutBlock, which will perform
2627         special layout when the MathOperator is used. We also improved how the logical height is
2628         calculated and avoid updating the style when stretchTo is called.
2629
2630         * rendering/mathml/RenderMathMLOperator.cpp:
2631         (WebCore::RenderMathMLOperator::stretchTo):
2632         (WebCore::RenderMathMLOperator::layoutBlock):
2633         (WebCore::RenderMathMLOperator::computeLogicalHeight): Deleted.
2634         * rendering/mathml/RenderMathMLOperator.h:
2635
2636 2016-06-21  Chris Dumez  <cdumez@apple.com>
2637
2638         Unreviewed, roll out r202268 as it looks like it was a ~50% regression on Dromaeo DOM Core
2639
2640         * bindings/scripts/CodeGeneratorJS.pm:
2641         (GenerateImplementation):
2642         (GeneratePrototypeDeclaration):
2643         * bindings/scripts/test/JS/JSInterfaceName.cpp:
2644         (WebCore::JSInterfaceNamePrototype::finishCreation):
2645         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2646         (WebCore::JSTestActiveDOMObjectPrototype::finishCreation):
2647         (WebCore::JSTestActiveDOMObject::createPrototype): Deleted.
2648         (WebCore::JSTestActiveDOMObject::prototype): Deleted.
2649         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
2650         (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::finishCreation):
2651         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2652         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation):
2653         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2654         (WebCore::JSTestCustomNamedGetterPrototype::finishCreation):
2655         (WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter): Deleted.
2656         (WebCore::JSTestCustomNamedGetter::createPrototype): Deleted.
2657         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2658         (WebCore::JSTestEventConstructorPrototype::finishCreation):
2659         (WebCore::JSTestEventConstructor::createPrototype): Deleted.
2660         (WebCore::JSTestEventConstructor::prototype): Deleted.
2661         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2662         (WebCore::JSTestEventTargetPrototype::finishCreation):
2663         (WebCore::JSTestEventTarget::JSTestEventTarget): Deleted.
2664         (WebCore::JSTestEventTarget::createPrototype): Deleted.
2665         * bindings/scripts/test/JS/JSTestException.cpp:
2666         (WebCore::JSTestExceptionPrototype::finishCreation):
2667         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2668         (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
2669         * bindings/scripts/test/JS/JSTestInterface.cpp:
2670         (WebCore::JSTestInterfacePrototype::finishCreation):
2671         (WebCore::jsTestInterfaceImplementsStr2): Deleted.
2672         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2673         (WebCore::JSTestJSBuiltinConstructorPrototype::finishCreation):
2674         (WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor): Deleted.
2675         (WebCore::JSTestJSBuiltinConstructor::createPrototype): Deleted.
2676         (WebCore::JSTestJSBuiltinConstructor::destroy): Deleted.
2677         (WebCore::jsTestJSBuiltinConstructorTestAttributeCustom): Deleted.
2678         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2679         (WebCore::JSTestMediaQueryListListenerPrototype::finishCreation):
2680         (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): Deleted.
2681         (WebCore::JSTestMediaQueryListListener::createPrototype): Deleted.
2682         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2683         (WebCore::JSTestNamedConstructorPrototype::finishCreation):
2684         * bindings/scripts/test/JS/JSTestNode.cpp:
2685         (WebCore::JSTestNodePrototype::finishCreation):
2686         (WebCore::JSTestNode::JSTestNode): Deleted.
2687         (WebCore::JSTestNode::prototype): Deleted.
2688         (WebCore::jsTestNodeName): Deleted.
2689         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2690         (WebCore::JSTestNondeterministicPrototype::finishCreation):
2691         (WebCore::JSTestNondeterministic::JSTestNondeterministic): Deleted.
2692         (WebCore::JSTestNondeterministic::prototype): Deleted.
2693         (WebCore::JSTestNondeterministic::destroy): Deleted.
2694         * bindings/scripts/test/JS/JSTestObj.cpp:
2695         (WebCore::JSTestObjPrototype::finishCreation):
2696         (WebCore::JSTestObj::JSTestObj): Deleted.
2697         (WebCore::JSTestObj::createPrototype): Deleted.
2698         (WebCore::JSTestObj::prototype): Deleted.
2699         (WebCore::JSTestObj::destroy): Deleted.
2700         (WebCore::JSTestObj::getOwnPropertySlot): Deleted.
2701         (WebCore::JSTestObj::getOwnPropertySlotByIndex): Deleted.
2702         (WebCore::jsTestObjReadOnlyLongAttr): Deleted.
2703         (WebCore::jsTestObjReadOnlyStringAttr): Deleted.
2704         (WebCore::jsTestObjReadOnlyTestObjAttr): Deleted.
2705         (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr): Deleted.
2706         (WebCore::jsTestObjConstructorStaticStringAttr): Deleted.
2707         (WebCore::jsTestObjConstructorTestSubObj): Deleted.
2708         (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor): Deleted.
2709         (WebCore::jsTestObjEnumAttr): Deleted.
2710         (WebCore::jsTestObjByteAttr): Deleted.
2711         (WebCore::jsTestObjOctetAttr): Deleted.
2712         (WebCore::jsTestObjShortAttr): Deleted.
2713         (WebCore::jsTestObjClampedShortAttr): Deleted.
2714         (WebCore::jsTestObjEnforceRangeShortAttr): Deleted.
2715         (WebCore::jsTestObjUnsignedShortAttr): Deleted.
2716         (WebCore::jsTestObjLongAttr): Deleted.
2717         (WebCore::jsTestObjLongLongAttr): Deleted.
2718         (WebCore::jsTestObjReflectedCustomBooleanAttr): Deleted.
2719         (WebCore::jsTestObjReflectedCustomURLAttr): Deleted.
2720         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2721         (WebCore::JSTestOverloadedConstructorsPrototype::finishCreation):
2722         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2723         (WebCore::JSTestOverrideBuiltinsPrototype::finishCreation):
2724         (WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins): Deleted.
2725         (WebCore::JSTestOverrideBuiltins::createPrototype): Deleted.
2726         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2727         (WebCore::JSTestSerializedScriptValueInterfacePrototype::finishCreation):
2728         (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): Deleted.
2729         (WebCore::JSTestSerializedScriptValueInterface::prototype): Deleted.
2730         (WebCore::JSTestSerializedScriptValueInterface::destroy): Deleted.
2731         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2732         (WebCore::JSTestTypedefsPrototype::finishCreation):
2733         (WebCore::JSTestTypedefs::JSTestTypedefs): Deleted.
2734         (WebCore::JSTestTypedefs::createPrototype): Deleted.
2735         (WebCore::JSTestTypedefs::prototype): Deleted.
2736         (WebCore::JSTestTypedefs::destroy): Deleted.
2737         (WebCore::jsTestTypedefsUnsignedLongLongAttr): Deleted.
2738         (WebCore::jsTestTypedefsImmutableSerializedScriptValue): Deleted.
2739         (WebCore::jsTestTypedefsAttrWithGetterException): Deleted.
2740         * bindings/scripts/test/JS/JSattribute.cpp:
2741         (WebCore::JSattributePrototype::finishCreation):
2742         * bindings/scripts/test/JS/JSreadonly.cpp:
2743         (WebCore::JSreadonlyPrototype::finishCreation):
2744
2745 2016-06-21  Keith Miller  <keith_miller@apple.com>
2746
2747         It should be easy to add a private global helper function for builtins
2748         https://bugs.webkit.org/show_bug.cgi?id=158893
2749
2750         Reviewed by Mark Lam.
2751
2752         Add JSCJSValueInlines.h to fix build issues.
2753
2754         * platform/mock/mediasource/MockBox.cpp:
2755
2756 2016-06-21  Amir Alavi  <aalavi@apple.com>
2757
2758         Upstream WKHTTPCookiesForURL from WebKitSystemInterface to OpenSource
2759         https://bugs.webkit.org/show_bug.cgi?id=158967
2760
2761         Reviewed by Brent Fulgham.
2762
2763         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2764         * platform/mac/WebCoreSystemInterface.h:
2765         * platform/mac/WebCoreSystemInterface.mm:
2766         * platform/network/mac/CookieJarMac.mm:
2767         (WebCore::httpCookiesForURL): Upstreamed from WebKitSystemInterface.
2768         (WebCore::cookiesForURL): Changed to call httpCookiesForURL.
2769         (WebCore::deleteCookie): Ditto.
2770         * platform/spi/cf/CFNetworkSPI.h:
2771
2772 2016-06-21  Chris Dumez  <cdumez@apple.com>
2773
2774         Unreviewed, rolling out r202231.
2775
2776         Seems to have regressed PLT on both iOS and Mac (very obvious
2777         on iOS Warm PLT)
2778
2779         Reverted changeset:
2780
2781         "When navigating, discard decoded image data that is only live
2782         due to page cache."
2783         https://bugs.webkit.org/show_bug.cgi?id=158941
2784         http://trac.webkit.org/changeset/202231
2785
2786 2016-06-21  Youenn Fablet  <youennf@gmail.com>
2787
2788         Add bindings generator support to add a native JS function to both a 'name' and a private '@name' slot
2789         https://bugs.webkit.org/show_bug.cgi?id=158777
2790
2791         Reviewed by Eric Carlson.
2792
2793         Adding a new PublicIdentifier keyword to cover the case of the same function exposed publicly and privately.
2794         Renaming Private keyword to PrivateIdentifier.
2795         Functions exposed both publicly and privately should set both keywords.
2796         By default, functions are publically exposed.
2797
2798         Updated binding generator to generate public exposure except if PrivateIdentifer is set and PublicIdentifier is
2799         not set.
2800
2801         Keeping skipping of ObjC/GObject binding for PrivateIdentifier-only functions.
2802
2803         Covered by rebased binding tests.
2804
2805         * Modules/fetch/FetchHeaders.idl:
2806         * Modules/fetch/FetchResponse.idl:
2807         * Modules/mediastream/MediaDevices.idl:
2808         * Modules/mediastream/RTCPeerConnection.idl:
2809         * bindings/scripts/CodeGeneratorGObject.pm:
2810         (SkipFunction):
2811         * bindings/scripts/CodeGeneratorJS.pm:
2812         (GeneratePropertiesHashTable):
2813         (GenerateImplementation):
2814         * bindings/scripts/CodeGeneratorObjC.pm:
2815         (SkipFunction):
2816         * bindings/scripts/IDLAttributes.txt:
2817         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2818         (webkit_dom_test_obj_private_also_method):
2819         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2820         * bindings/scripts/test/JS/JSTestObj.cpp:
2821         (WebCore::JSTestObjPrototype::finishCreation):
2822         (WebCore::jsTestObjPrototypeFunctionPrivateMethod):
2823         (WebCore::jsTestObjPrototypeFunctionPrivateAlsoMethod):
2824         * bindings/scripts/test/ObjC/DOMTestObj.h:
2825         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2826         (-[DOMTestObj privateAlsoMethod:]):
2827         * bindings/scripts/test/TestObj.idl:
2828
2829 2016-06-21  Dan Bernstein  <mitz@apple.com>
2830
2831         Inlined some picture-in-picture code.
2832         https://bugs.webkit.org/show_bug.cgi?id=158977
2833
2834         Reviewed by Eric Carlsson.
2835
2836         This code was written primarily by Ada Chan, and originally reviewed by Alex Christensen,
2837         Anders Carlsson, Conrad Shultz, Dan Bernstein, Eric Carlson, Jer Noble, Jeremy Jones,
2838         Jon Lee, Remy Demarest, and Zach Li.
2839
2840         * English.lproj/Localizable.strings:
2841           Updated using update-webkit-localizable-strings.
2842
2843         * Modules/mediacontrols/mediaControlsApple.css:
2844         (video:-webkit-full-screen::-webkit-media-controls-panel .picture-in-picture-button):
2845
2846         * Modules/mediacontrols/mediaControlsApple.js:
2847         (Controller.prototype.configureFullScreenControls):
2848
2849         * WebCore.xcodeproj/project.pbxproj: Added PIPSPI.h.
2850
2851         * html/HTMLMediaElement.cpp: Inlined code from HTMLMediaElementAdditions.cpp.
2852
2853         * html/HTMLVideoElement.cpp: Inlined code from HTMLVideoElementSupportsFullscreenAdditions.cpp.
2854
2855         * platform/LocalizedStrings.cpp:
2856         (WebCore::contextMenuItemTagEnterVideoEnhancedFullscreen): Brought in from ContextMenuLocalizedStringsAdditions.cpp.
2857         (WebCore::contextMenuItemTagExitVideoEnhancedFullscreen): Ditto.
2858         (WebCore::AXARIAContentGroupText): Made updates that should have been part of r198543.
2859
2860         * platform/mac/WebVideoFullscreenInterfaceMac.h: Removed USE(APPLE_INTERNAL_SDK) guards.
2861         * platform/mac/WebVideoFullscreenInterfaceMac.mm: Inlined WebVideoFullscreenInterfaceMacAdditions.mm.
2862
2863         * platform/spi/mac/PIPSPI.h: Added.
2864
2865         * rendering/HitTestResult.cpp: Inlined HitTestResultAdditions.cpp.
2866
2867         * rendering/RenderThemeMac.mm:
2868         (WebCore::RenderThemeMac::mediaControlsStyleSheet): Removed include of
2869           RenderThemeMacMediaControlsStyleSheetAdditions.mm now that the content is in
2870           mediaControlsApple.css.
2871         (WebCore::RenderThemeMac::mediaControlsScript): Removed include of
2872           RenderThemeMacMediaControlsScriptAdditions.mm now that the content is in mediaControlsApple.js.
2873
2874 2016-06-21  Miguel Gomez  <magomez@igalia.com>
2875
2876         [GStreamer] video orientation support
2877         https://bugs.webkit.org/show_bug.cgi?id=148524
2878
2879         Reviewed by Philippe Normand.
2880
2881         Rotate video frames to follow the orientation metadata in the video file.
2882         When accelerated compositing is disabled, the rotation is performed by a videoflip element added
2883         to the playbin.
2884         When accelerated compositing is enabled, the rotation is peformed by the TextureMapper in response
2885         to a rotation flag set on the frame buffers.
2886
2887         Test: media/video-orientation.html
2888
2889         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2890         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2891         Handle the GST_MESSAGE_TAG message from the bin.
2892         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
2893         Add the videflip element to the bin when accelerated compositing is disabled.
2894         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2895         (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
2896         Receive and use extra flags for the TextureMapper.
2897         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
2898         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
2899         When using accelerated compositing, transpose the video size if the rotation is 90 or 270 degrees.
2900         (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
2901         Add rotation flag to frame holder and layer buffer.
2902         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
2903         Use rotation flag when requesting the TextureMapper to draw.
2904         (WebCore::MediaPlayerPrivateGStreamerBase::setVideoSourceRotation):
2905         Function to store the video rotation.
2906         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2907         Add bits to store the video rotation.
2908         * platform/graphics/texmap/TextureMapperGL.cpp:
2909         (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
2910         Modify the patternTransform according to the rotation flag passed.
2911         * platform/graphics/texmap/TextureMapperGL.h:
2912         Add new flags to handle the video souce rotation.
2913         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
2914         (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
2915         Change the drawTexture method used so custom flags can be passed.
2916         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
2917         (WebCore::TextureMapperPlatformLayerBuffer::setExtraFlags):
2918         New method to set TextureMapper flags.
2919
2920 2016-06-20  Frederic Wang  <fwang@igalia.com>
2921
2922         Use the MathOperator to handle some non-stretchy operators
2923         https://bugs.webkit.org/show_bug.cgi?id=157519
2924
2925         Reviewed by Brent Fulgham.
2926
2927         To prepare for the removal of anonymous text node from the render classes of token elements
2928         we use MathOperator to handle two cases where the actual text to display may not be
2929         available in the DOM: mfenced and minus operators. This change removes support for the
2930         case of mfenced operators with multiple characters since that it is not supported by
2931         MathOperator. It is a edge case that is not used in practice since fences and separators are
2932         only made of a single character. However, it would still be possible to duplicate some
2933         code/logic to add it back if that turns out to be necessary.
2934
2935         No new tests, already covered by existing tests.
2936
2937         * rendering/mathml/MathOperator.cpp:
2938         (WebCore::MathOperator::MathOperator): Rename UndefinedOperator.
2939         (WebCore::RenderMathMLOperator::firstLineBaseline): Improve rounding of ascent so that mfenced operators are correctly aligned.
2940         * rendering/mathml/MathOperator.h: Rename UndefinedOperator, since it can now be used to draw non-stretchy operators.
2941         (WebCore::MathOperator::isStretched): Deleted. This function is no longer used by RenderMathMLOperator.
2942         (WebCore::MathOperator::unstretch): Deleted. This function is no longer used by RenderMathMLOperator.
2943         * rendering/mathml/RenderMathMLOperator.cpp:
2944         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Use useMathOperator.
2945         (WebCore::RenderMathMLOperator::rebuildTokenContent): Set the MathOperator when useMathOperator() is true.
2946         When the operator is not likely to stretch we just leave its type as NormalOperator.
2947         (WebCore::RenderMathMLOperator::useMathOperator): Helper function to determine when MathOperator should be used.
2948         (WebCore::RenderMathMLOperator::firstLineBaseline): Use useMathOperator.
2949         (WebCore::RenderMathMLOperator::computeLogicalHeight): Ditto.
2950         (WebCore::RenderMathMLOperator::paint): Ditto.
2951         (WebCore::RenderMathMLOperator::paintChildren): Ditto.
2952         * rendering/mathml/RenderMathMLOperator.h: Declare useMathOperator.
2953
2954 2016-06-19  Gavin & Ellie Barraclough  <barraclough@apple.com>
2955
2956         Don't eagerly reify DOM Prototype properties
2957         https://bugs.webkit.org/show_bug.cgi?id=158557
2958
2959         Reviewed by Andreas Kling.
2960
2961         We were eagerly reifying these properties to avoid virtualizing getOwnPropertySlot,
2962         but since bug #158059 this does not require a method table call in any case.
2963         Eagerly reifying these values likely has some CPU and memory cost on page load.
2964
2965         * bindings/scripts/CodeGeneratorJS.pm:
2966         (GenerateImplementation):
2967             - should generate compressed index for hashtable,
2968               prototype object ClassInfo should contain static table,
2969               don't reifyStaticProperties for prototype objects.
2970         (GeneratePrototypeDeclaration):
2971             - Set HasStaticPropertyTable for DOM prototype objects.
2972         * bindings/scripts/test/JS/JSInterfaceName.cpp:
2973         (WebCore::JSInterfaceNamePrototype::JSInterfaceNamePrototype):
2974         (WebCore::JSInterfaceNamePrototype::finishCreation):
2975         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2976         (WebCore::JSTestActiveDOMObjectPrototype::JSTestActiveDOMObjectPrototype):
2977         (WebCore::JSTestActiveDOMObjectPrototype::finishCreation):
2978         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
2979         (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::JSTestClassWithJSBuiltinConstructorPrototype):
2980         (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::finishCreation):
2981         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2982         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::JSTestCustomConstructorWithNoInterfaceObjectPrototype):
2983         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation):
2984         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2985         (WebCore::JSTestCustomNamedGetterPrototype::JSTestCustomNamedGetterPrototype):
2986         (WebCore::JSTestCustomNamedGetterPrototype::finishCreation):
2987         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2988         (WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype):
2989         (WebCore::JSTestEventConstructorPrototype::finishCreation):
2990         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2991         (WebCore::JSTestEventTargetPrototype::JSTestEventTargetPrototype):
2992         (WebCore::JSTestEventTargetPrototype::finishCreation):
2993         * bindings/scripts/test/JS/JSTestException.cpp:
2994         (WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype):
2995         (WebCore::JSTestExceptionPrototype::finishCreation):
2996         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2997         (WebCore::JSTestGenerateIsReachablePrototype::JSTestGenerateIsReachablePrototype):
2998         (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
2999         * bindings/scripts/test/JS/JSTestInterface.cpp:
3000         (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
3001         (WebCore::JSTestInterfacePrototype::finishCreation):
3002         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3003         (WebCore::JSTestJSBuiltinConstructorPrototype::JSTestJSBuiltinConstructorPrototype):
3004         (WebCore::JSTestJSBuiltinConstructorPrototype::finishCreation):
3005         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3006         (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
3007         (WebCore::JSTestMediaQueryListListenerPrototype::finishCreation):
3008         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3009         (WebCore::JSTestNamedConstructorPrototype::JSTestNamedConstructorPrototype):
3010         (WebCore::JSTestNamedConstructorPrototype::finishCreation):
3011         * bindings/scripts/test/JS/JSTestNode.cpp:
3012         (WebCore::JSTestNodePrototype::JSTestNodePrototype):
3013         (WebCore::JSTestNodePrototype::finishCreation):
3014         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3015         (WebCore::JSTestNondeterministicPrototype::JSTestNondeterministicPrototype):
3016         (WebCore::JSTestNondeterministicPrototype::finishCreation):
3017         * bindings/scripts/test/JS/JSTestObj.cpp:
3018         (WebCore::JSTestObjPrototype::JSTestObjPrototype):
3019         (WebCore::JSTestObjPrototype::finishCreation):
3020         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3021         (WebCore::JSTestOverloadedConstructorsPrototype::JSTestOverloadedConstructorsPrototype):
3022         (WebCore::JSTestOverloadedConstructorsPrototype::finishCreation):
3023         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3024         (WebCore::JSTestOverrideBuiltinsPrototype::JSTestOverrideBuiltinsPrototype):
3025         (WebCore::JSTestOverrideBuiltinsPrototype::finishCreation):
3026         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3027         (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
3028         (WebCore::JSTestSerializedScriptValueInterfacePrototype::finishCreation):
3029         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3030         (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
3031         (WebCore::JSTestTypedefsPrototype::finishCreation):
3032         * bindings/scripts/test/JS/JSattribute.cpp:
3033         (WebCore::JSattributePrototype::JSattributePrototype):
3034         (WebCore::JSattributePrototype::finishCreation):
3035         * bindings/scripts/test/JS/JSreadonly.cpp:
3036         (WebCore::JSreadonlyPrototype::JSreadonlyPrototype):
3037         (WebCore::JSreadonlyPrototype::finishCreation):
3038
3039 2016-06-20  Adam Bergkvist  <adam.bergkvist@ericsson.com>
3040
3041         WebRTC: RTCIceCandidate init dictionary don't handle explicit null or undefined values correctly
3042         https://bugs.webkit.org/show_bug.cgi?id=158873
3043
3044         Reviewed by Alejandro G. Castro.
3045
3046         Prevent explicit null and undefined values from being converted to "null" and "undefined"
3047         strings.
3048
3049         Test: Extended fast/mediastream/RTCIceCandidate.html
3050
3051         * Modules/mediastream/RTCIceCandidate.cpp:
3052         (WebCore::RTCIceCandidate::create):
3053
3054 2016-06-20  Commit Queue  <commit-queue@webkit.org>
3055
3056         Unreviewed, rolling out r202252.
3057         https://bugs.webkit.org/show_bug.cgi?id=158974
3058
3059         See rdar://problem/26867866 for details (Requested by ap on
3060         #webkit).
3061
3062         Reverted changeset:
3063
3064         "Adopt commitPriority to get rid of the 2 AVPL solution for
3065         PiP"
3066         https://bugs.webkit.org/show_bug.cgi?id=158949
3067         http://trac.webkit.org/changeset/202252
3068
3069 2016-06-20  Commit Queue  <commit-queue@webkit.org>
3070
3071         Unreviewed, rolling out r202243.
3072         https://bugs.webkit.org/show_bug.cgi?id=158972
3073
3074         Broke Windows build and iOS tests (Requested by ap on
3075         #webkit).
3076
3077         Reverted changeset:
3078
3079         "Focus event dispatched in iframe causes parent document to
3080         scroll incorrectly"
3081         https://bugs.webkit.org/show_bug.cgi?id=158629
3082         http://trac.webkit.org/changeset/202243
3083
3084 2016-06-20  Chris Dumez  <cdumez@apple.com>
3085
3086         Simplify / Optimize DataDetector's searchForLinkRemovingExistingDDLinks()
3087         https://bugs.webkit.org/show_bug.cgi?id=158968
3088
3089         Reviewed by Ryosuke Niwa.
3090
3091         Simplify / Optimize DataDetector's searchForLinkRemovingExistingDDLinks():
3092         - Use modern ancestorsOfType<HTMLAnchorElement>() to traverse anchor ancestors
3093           instead of traversing by hand.
3094         - Use NodeTraversal::next() to traverse the tree until we find endNode and
3095           use a for loop instead of a while loop. Previously, the logic the determine
3096           the next node was at the end of the loop and was identical behavior-wise
3097           to NodeTraversal::next(). However, the previous code for a lot less efficient
3098           because it was calling Node::childNodes() to get a NodeList of the children,
3099           then calling length() on it to check if we had children and finally use
3100           the first item in the list as next node. This was very inefficient because
3101           NodeList::length() would need to traverse all children to figure out the
3102           length and would cache all the children in a Vector in CollectionIndexCache.
3103
3104         * dom/ElementAncestorIterator.h:
3105         (WebCore::ancestorsOfType):
3106         * dom/ElementIterator.h:
3107         (WebCore::findElementAncestorOfType):
3108         (WebCore::findElementAncestorOfType<Element>):
3109         Update ancestorsOfType() to take a Node instead of an Element. There are no
3110         performance benefits to taking an Element here and it is a valid use case to
3111         want an Element ancestor of a non-Element node.
3112
3113         * editing/cocoa/DataDetection.mm:
3114         (WebCore::searchForLinkRemovingExistingDDLinks):
3115         (WebCore::dataDetectorTypeForCategory): Deleted.
3116
3117 2016-06-20  Commit Queue  <commit-queue@webkit.org>
3118
3119         Unreviewed, rolling out r202248.
3120         https://bugs.webkit.org/show_bug.cgi?id=158960
3121
3122         breaks builds on the simulator (Requested by keith_mi_ on
3123         #webkit).
3124
3125         Reverted changeset:
3126
3127         "It should be easy to add a private global helper function for
3128         builtins"
3129         https://bugs.webkit.org/show_bug.cgi?id=158893
3130         http://trac.webkit.org/changeset/202248
3131
3132 2016-06-20  Jeremy Jones  <jeremyj@apple.com>
3133
3134         Adopt commitPriority to get rid of the 2 AVPL solution for PiP
3135         https://bugs.webkit.org/show_bug.cgi?id=158949
3136         rdar://problem/26867866
3137
3138         Reviewed by Simon Fraser.
3139
3140         No new tests because there is no behavior change. This reverts changes from 
3141         https://bugs.webkit.org/show_bug.cgi?id=158148 and instead uses -[CAContext commitPriority:]
3142         to prevent flicker when moving a layer between contexts. 
3143         commitPriority allows the layer to be added to the destination context before it is 
3144         removed from the source context.
3145
3146         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: remove m_secondaryVideoLayer.
3147         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: ditto
3148         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenGravity): ditto.
3149         (WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds): ditto.
3150         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): ditto.
3151         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity): ditto.
3152         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: ditto
3153         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer): ditto
3154         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: ditto
3155         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers):ditto
3156         * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.h: ditto
3157         * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm: ditto
3158         (WebCore::VideoFullscreenLayerManager::setVideoLayer): ditto
3159         (WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer): ditto and adopt commitPriority.
3160         (WebCore::VideoFullscreenLayerManager::setVideoFullscreenFrame): ditto
3161         (WebCore::VideoFullscreenLayerManager::setVideoLayers): Deleted. 
3162         (WebCore::VideoFullscreenLayerManager::didDestroyVideoLayer): remove m_secondaryVideoLayer.
3163         * platform/spi/cocoa/QuartzCoreSPI.h: Add commitPriority.
3164
3165 2016-06-20  Zalan Bujtas  <zalan@apple.com>
3166
3167         Set the end position on the placeholder BidiRun properly.
3168         https://bugs.webkit.org/show_bug.cgi?id=158958
3169
3170         Reviewed by Myles C. Maxfield.
3171         rdar://problem/26609266
3172
3173         The second paramenter for BidiRun indicates the end position and not the length of the run.
3174         This was regressed at r102875 where only the start position was changed from 0 to pos.
3175
3176         Test: fast/text/international/bidi-style-in-isolate-crash.html
3177
3178         * rendering/InlineIterator.h:
3179         (WebCore::addPlaceholderRunForIsolatedInline):
3180
3181 2016-06-20  Fujii Hironori  <Hironori.Fujii@sony.com>
3182
3183         A composition underline is placed to wrong position in RTL
3184         https://bugs.webkit.org/show_bug.cgi?id=158602
3185
3186         Reviewed by Myles C. Maxfield.
3187
3188         InlineTextBox::paintCompositionUnderline does not take RTL into
3189         account.  The position of composition underline should be
3190         mirrored in RTL.
3191
3192         Test: editing/input/composition-underline-rtl.html
3193
3194         * rendering/InlineTextBox.cpp:
3195         (WebCore::mirrorRTLSegment): New helper function to convert RTL start position to LTR.
3196         (WebCore::InlineTextBox::paintDecoration): Use mirrorRTLSegment.
3197         (WebCore::InlineTextBox::paintCompositionUnderline): Ditto.
3198
3199 2016-06-20  Keith Miller  <keith_miller@apple.com>
3200
3201         It should be easy to add a private global helper function for builtins
3202         https://bugs.webkit.org/show_bug.cgi?id=158893
3203
3204         Reviewed by Mark Lam.
3205
3206         Add JSCJSValueInlines.h to fix build issues.
3207
3208         * platform/mock/mediasource/MockBox.cpp:
3209
3210 2016-06-20  Benjamin Poulain  <benjamin@webkit.org>
3211
3212         :default CSS pseudo-class should match checkboxes+radios with a `checked` attribute
3213         https://bugs.webkit.org/show_bug.cgi?id=156230
3214
3215         Reviewed by Alex Christensen.
3216
3217         This patch update the :default pseudo class matching to be closer to the spec:
3218         https://html.spec.whatwg.org/multipage/scripting.html#selector-default
3219
3220         The main remaining difference with the spec is the definition of "default button".
3221         This is an unrelated problem that should be addressed separately.
3222
3223         The implementation was missing support for:
3224         -input elements of type "checkbox" or "radio" with the "checked" attribute defined.
3225         -option elements with the "selected" attribute defined.
3226
3227         The existing support for default button was pretty bad, I fixed that too.
3228         The owner form now has a resetDefaultButton() API. When a Form Associated Element
3229         becomes a submit button or loses that property, the element calls its form
3230         to update the style as needed.
3231
3232         Whenever the submit button changes, 2 elements needs to have their style invalidated:
3233         -The former default button.
3234         -The new default button.
3235         To invalidate the former button, FormElement now caches the computed
3236         default button. When the default button changes, the cached value is invalidated
3237         in addition to the new value.
3238
3239         Computing the new default button takes linear time in the number of form associated element.
3240         To mitigate that, resetDefaultButton() is only called when changes are related
3241         to submit buttons. Since those changes are rare, I don't expect the invalidation
3242         to be a problem.
3243
3244         Tests: fast/css/pseudo-default-basics.html
3245                fast/selectors/default-style-update.html
3246
3247         * css/SelectorChecker.cpp:
3248         (WebCore::SelectorChecker::checkOne):
3249         * css/SelectorCheckerTestFunctions.h:
3250         (WebCore::matchesDefaultPseudoClass):
3251         (WebCore::isDefaultButtonForForm): Deleted.
3252         * cssjit/SelectorCompiler.cpp:
3253         (WebCore::SelectorCompiler::addPseudoClassType):
3254         * dom/Element.cpp:
3255         (WebCore::Element::matchesValidPseudoClass):
3256         (WebCore::Element::matchesInvalidPseudoClass):
3257         (WebCore::Element::matchesDefaultPseudoClass):
3258         * dom/Element.h:
3259         (WebCore::Element::matchesValidPseudoClass): Deleted.
3260         (WebCore::Element::matchesInvalidPseudoClass): Deleted.
3261         (WebCore::Element::isDefaultButtonForForm): Deleted.
3262         * html/HTMLButtonElement.cpp:
3263         (WebCore::HTMLButtonElement::parseAttribute):
3264         (WebCore::HTMLButtonElement::matchesDefaultPseudoClass):
3265         * html/HTMLButtonElement.h:
3266         * html/HTMLFormControlElement.cpp:
3267         (WebCore::HTMLFormControlElement::isDefaultButtonForForm): Deleted.
3268         * html/HTMLFormControlElement.h:
3269         * html/HTMLFormElement.cpp:
3270         (WebCore::HTMLFormElement::~HTMLFormElement):
3271         (WebCore::HTMLFormElement::registerFormElement):
3272         (WebCore::HTMLFormElement::removeFormElement):
3273         (WebCore::HTMLFormElement::defaultButton):
3274         (WebCore::HTMLFormElement::resetDefaultButton):
3275         * html/HTMLFormElement.h:
3276         * html/HTMLInputElement.cpp:
3277         (WebCore::HTMLInputElement::updateType):
3278         (WebCore::HTMLInputElement::parseAttribute):
3279         (WebCore::HTMLInputElement::matchesDefaultPseudoClass):
3280         * html/HTMLInputElement.h:
3281         * html/HTMLOptionElement.cpp:
3282         (WebCore::HTMLOptionElement::matchesDefaultPseudoClass):
3283         (WebCore::HTMLOptionElement::parseAttribute):
3284         * html/HTMLOptionElement.h:
3285         * style/StyleSharingResolver.cpp:
3286         (WebCore::Style::SharingResolver::canShareStyleWithElement):
3287         (WebCore::Style::canShareStyleWithControl): Deleted.
3288
3289 2016-06-20  Simon Fraser  <simon.fraser@apple.com>
3290
3291         Focus event dispatched in iframe causes parent document to scroll incorrectly
3292         https://bugs.webkit.org/show_bug.cgi?id=158629
3293         rdar://problem/26521616
3294
3295         Reviewed by Tim Horton.
3296
3297         When focussing elements in iframes, the page could scroll to an incorrect location.
3298         This happened because code in Element::focus() tried to disable scrolling on focus,
3299         but did so only for the current frame, so ancestor frames got programmatically scrolled.
3300         On iOS we handle the scrolling in the UI process, so never want the web process to
3301         do programmatic scrolling.
3302
3303         Fix by changing the focus and cache restore code to use SelectionRevealMode::DoNotReveal,
3304         rather than manually prohibiting frame scrolling. Pass SelectionRevealMode through various callers,
3305         and use RevealUpToMainFrame for iOS, allowing the UI process to do the zoomToRect: for the main frame.
3306
3307         Tests: fast/forms/ios/focus-input-in-iframe.html
3308                fast/forms/ios/programmatic-focus-input-in-iframe.html
3309
3310         * dom/Document.h:
3311         * dom/Element.cpp:
3312         (WebCore::Element::scrollIntoView):
3313         (WebCore::Element::scrollIntoViewIfNeeded):
3314         (WebCore::Element::scrollIntoViewIfNotVisible):
3315         (WebCore::Element::focus):
3316         (WebCore::Element::updateFocusAppearance):
3317         * dom/Element.h:
3318         * editing/Editor.cpp:
3319         (WebCore::Editor::insertTextWithoutSendingTextEvent):
3320         (WebCore::Editor::revealSelectionAfterEditingOperation):
3321         (WebCore::Editor::findStringAndScrollToVisible):
3322         * editing/FrameSelection.cpp:
3323         (WebCore::FrameSelection::updateAndRevealSelection):
3324         (WebCore::FrameSelection::revealSelection):
3325         (WebCore::FrameSelection::FrameSelection): Deleted.
3326         * editing/FrameSelection.h:
3327         * html/HTMLInputElement.cpp:
3328         (WebCore::HTMLInputElement::updateFocusAppearance):
3329         * html/HTMLTextAreaElement.cpp:
3330         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
3331         * page/ContextMenuController.cpp:
3332         (WebCore::ContextMenuController::contextMenuItemSelected):
3333         * page/FrameView.cpp:
3334         (WebCore::FrameView::scrollToAnchor):
3335         * rendering/RenderLayer.cpp:
3336         (WebCore::RenderLayer::scrollRectToVisible):
3337         (WebCore::RenderLayer::autoscroll):
3338         * rendering/RenderLayer.h:
3339         * rendering/RenderObject.cpp:
3340         (WebCore::RenderObject::scrollRectToVisible):
3341         * rendering/RenderObject.h:
3342
3343 2016-06-20  Keith Rollin  <krollin@apple.com>
3344
3345         Remove RefPtr::release() and change calls sites to use WTFMove()
3346         https://bugs.webkit.org/show_bug.cgi?id=158369
3347
3348         Reviewed by Chris Dumez.
3349
3350         RefPtr::release() releases its managed pointer awkwardly. It's more
3351         direct and clearer to use WTFMove to transfer ownership of the managed
3352         pointer.
3353
3354         As part of this cleanup, also change a lot of explicit data types to
3355         'auto'.
3356
3357         No new tests: there's no new functionality, just a refactoring of
3358         existing code.
3359
3360         * Modules/mediasource/SourceBuffer.cpp:
3361         (WebCore::removeSamplesFromTrackBuffer):
3362         (WebCore::SourceBuffer::provideMediaData):
3363         * Modules/mediastream/UserMediaRequest.cpp:
3364         (WebCore::UserMediaRequest::start):
3365         * Modules/webdatabase/SQLCallbackWrapper.h:
3366         (WebCore::SQLCallbackWrapper::clear):
3367         * bindings/js/JSDOMWindowCustom.cpp:
3368         (WebCore::handlePostMessage):
3369         * bindings/js/JSHistoryCustom.cpp:
3370         (WebCore::JSHistory::pushState):
3371         (WebCore::JSHistory::replaceState):
3372         * bindings/js/JSMessagePortCustom.h:
3373         (WebCore::handlePostMessage):
3374         * bindings/js/ScriptControllerMac.mm:
3375         (WebCore::ScriptController::createScriptInstanceForWidget):
3376         * bindings/js/SerializedScriptValue.cpp:
3377         (WebCore::CloneDeserializer::readTerminal):
3378         * css/CSSComputedStyleDeclaration.cpp:
3379         (WebCore::ComputedStyleExtractor::copyPropertiesInSet):
3380         * css/SVGCSSParser.cpp:
3381         (WebCore::CSSParser::parseSVGValue):
3382         * css/StyleBuilderConverter.h:
3383         (WebCore::StyleBuilderConverter::convertShapeValue):
3384         * css/StyleProperties.cpp:
3385         (WebCore::StyleProperties::copyPropertiesInSet):
3386         * css/StyleResolver.cpp:
3387         (WebCore::StyleResolver::loadPendingImages):
3388         * dom/InlineStyleSheetOwner.cpp:
3389         (WebCore::InlineStyleSheetOwner::clearSheet):
3390         * editing/ApplyStyleCommand.cpp:
3391         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
3392         * editing/CompositeEditCommand.cpp:
3393         (WebCore::CompositeEditCommand::removeChildrenInRange):
3394         (WebCore::CompositeEditCommand::removeNodeAndPruneAncestors):
3395         (WebCore::CompositeEditCommand::prune):
3396         (WebCore::CompositeEditCommand::replaceSelectedTextInNode):
3397         (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):
3398         * editing/CreateLinkCommand.cpp:
3399         (WebCore::CreateLinkCommand::doApply):
3400         * editing/EditingStyle.cpp:
3401         (WebCore::EditingStyle::mergeStyle):
3402         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
3403         * editing/Editor.cpp:
3404         (WebCore::ClearTextCommand::CreateAndApply):
3405         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
3406         * editing/EditorCommand.cpp:
3407         (WebCore::executeInsertNode):
3408         * editing/InsertTextCommand.cpp:
3409         (WebCore::InsertTextCommand::performOverwrite):
3410         (WebCore::InsertTextCommand::insertTab):
3411         * editing/RemoveNodePreservingChildrenCommand.cpp:
3412         (WebCore::RemoveNodePreservingChildrenCommand::doApply):
3413         * editing/ReplaceSelectionCommand.cpp:
3414         (WebCore::ReplacementFragment::removeNodePreservingChildren):
3415         (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor):
3416         * html/FTPDirectoryDocument.cpp:
3417         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
3418         * html/HTMLFontElement.cpp:
3419         (WebCore::HTMLFontElement::collectStyleForPresentationAttribute):
3420         * html/HTMLFormElement.cpp:
3421         (WebCore::HTMLFormElement::prepareForSubmission):
3422         * html/HTMLTableElement.cpp:
3423         (WebCore::leakBorderStyle):
3424         (WebCore::leakGroupBorderStyle):
3425         * html/parser/HTMLDocumentParser.cpp:
3426         (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder):
3427         * html/track/InbandDataTextTrack.cpp:
3428         (WebCore::InbandDataTextTrack::addDataCue):
3429         * html/track/InbandGenericTextTrack.cpp:
3430         (WebCore::InbandGenericTextTrack::newCuesParsed):
3431         * html/track/InbandWebVTTTextTrack.cpp:
3432         (WebCore::InbandWebVTTTextTrack::newCuesParsed):
3433         * html/track/TextTrackCueList.cpp:
3434         (WebCore::TextTrackCueList::add):
3435         * inspector/InspectorCSSAgent.cpp:
3436         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
3437         * inspector/InspectorDOMAgent.cpp:
3438         (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
3439         * inspector/InspectorIndexedDBAgent.cpp: