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