Implement an internal style property for displaystyle.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-07-07  Frederic Wang  <fwang@igalia.com>
2
3         Implement an internal style property for displaystyle.
4         https://bugs.webkit.org/show_bug.cgi?id=133845
5
6         Reviewed by Brent Fulgham.
7
8         Tests: mathml/opentype/large-operators-displaystyle-dynamic.html
9                mathml/opentype/large-operators-displaystyle.html
10
11         This is based on a patch by Alejandro G. Castro <alex@igalia.com>
12
13         * CMakeLists.txt: Add MathMLStyle to the build system.
14         * WebCore.xcodeproj/project.pbxproj: ditto.
15         * mathml/MathMLInlineContainerElement.cpp:
16         (WebCore::MathMLInlineContainerElement::parseAttribute): Resolve the mathml style when the
17         displaystyle attribute changes on the mtable or mstyle elements.
18         * mathml/MathMLInlineContainerElement.h: Define parseAttribute.
19         * mathml/MathMLMathElement.cpp:
20         (WebCore::MathMLMathElement::MathMLMathElement): Indicate that we have custom style.
21         (WebCore::MathMLMathElement::parseAttribute): Resolve the mathml style when the display or
22         displaystyle attributes change on the math element.
23         (WebCore::MathMLMathElement::didAttachRenderers): Resolve the mathml style when one
24         renderer is attached.
25         * mathml/MathMLMathElement.h: Declare parseAttribute and didAttachRenderers.
26         * mathml/mathattrs.in: Declare the display and displaystyle attributes.
27         * rendering/mathml/MathMLStyle.cpp: Added.
28         (WebCore::MathMLStyle::MathMLStyle): New class to handle custom MathML style.
29         (WebCore::MathMLStyle::create):
30         (WebCore::MathMLStyle::setDisplayStyle): Helper function to take the displaystyle from
31         the specified rendered.
32         (WebCore::MathMLStyle::resolveMathMLStyleTree): Helper function to resolve the custom
33         MathML style in renderer subtree.
34         (WebCore::MathMLStyle::getMathMLParentNode): Helper function to get a MathML ancestor of
35         the specified renderer.
36         (WebCore::MathMLStyle::updateStyleIfNeeded): Helper function to update the style of the
37         specified renderer if needed.
38         (WebCore::MathMLStyle::resolveMathMLStyle): Resolve the MathML style of a given renderer.
39         For displaystyle, we inherit the value of the parent except for the cases mentioned in the
40         MathML recommendation.
41         * rendering/mathml/MathMLStyle.h: New class header for custom MathML style.
42         Only displaystyle is supported for now.
43         * rendering/mathml/RenderMathMLBlock.cpp: Add a member and getter for custom MathML style.
44         (WebCore::RenderMathMLBlock::RenderMathMLBlock):
45         * rendering/mathml/RenderMathMLBlock.h: ditto.
46         (WebCore::RenderMathMLBlock::mathMLStyle):
47         * rendering/mathml/RenderMathMLMath.h: Add definition to use the syntax is<RenderMathMLMath>.
48         * rendering/mathml/RenderMathMLOperator.h:
49         (WebCore::RenderMathMLOperator::isLargeOperatorInDisplayStyle): Do not rerturn true when
50         the operator is not in displaystyle.
51         * rendering/mathml/RenderMathMLRoot.h: Make updateStyle public, so that it can be called
52         by MathMLStyle::updateStyleIfNeeded.
53         * rendering/mathml/RenderMathMLUnderOver.h: Add definition to use the syntax
54         is<RenderMathMLUnderOver>.
55
56 2016-07-07  Ryosuke Niwa  <rniwa@webkit.org>
57
58         Replace scoped flag in Event by composed flag
59         https://bugs.webkit.org/show_bug.cgi?id=158415
60
61         Reviewed by Chris Dumez.
62
63         Replace `scoped` flag with `composed` flag and negate its meaning per the latest spec:
64         https://dom.spec.whatwg.org/#dom-event-composed
65         https://github.com/w3c/webcomponents/issues/513
66
67         In the old spec, every event was assumed to be "composed" (crosses shadow boundaries)
68         by default and there was `scoped` flag which prevented the event from crossing bondaries,
69         and there was a handful of events for which `scoped` was set true when dispatched by UA.
70
71         In the new spec, every event is assumed to be "scoped" and a handful of user-initiated
72         events set `composed` flag to true, which is also exposed in EventInit dictionary.
73         `relatedTargetScoped` flag has been removed. New behavior is identical to when this flag
74         was set to true.
75
76         No new tests since existing tests are updated to test the new flag and behavior.
77
78         * dom/CompositionEvent.cpp:
79         (WebCore::CompositionEvent::isCompositionEvent): Added.
80         * dom/CompositionEvent.h:
81         * dom/Event.cpp:
82         (WebCore::Event::Event): Initialize m_composed. Also re-ordered m_type and m_isInitialized
83         for better packing.
84         (WebCore::Event::composed): Renamed from Event::composed. We return true whenever composed
85         is set to true in EventInit, or the engine is dispatching an user-initiated event listed in:
86         https://github.com/w3c/webcomponents/issues/513#issuecomment-224183937
87         as well as keypress, cut, paste, and, copy as discussed in:
88         https://github.com/w3c/webcomponents/issues/513#issuecomment-230988170
89         (WebCore::Event::isCompositionEvent): Added.
90         * dom/Event.h:
91         (WebCore::Event::composed): Added.
92         (WebCore::Event::scoped): Deleted.
93         (WebCore::Event::relatedTargetScoped): Deleted.
94         (WebCore::Event): Reordered m_type and m_isInitialized for better packing. Added m_composed
95         and removed m_scoped and m_relatedTargetScoped.
96         * dom/Event.idl:
97         * dom/EventPath.cpp:
98         (WebCore::shouldEventCrossShadowBoundary): Returns true if the event did not originate from
99         a shadow tree (this event entered the current shadow tree via a slot so we need to proceed with
100         the normal bubble path outside the shadow tree) or composed flag is set true.
101         (WebCore::EventPath::EventPath): m_event no longer exists, which was only used to get the value
102         of relatedTargetScoped which has been removed.
103         (WebCore::EventPath::setRelatedTarget): Behave as if relatedTargetScoped is always set true
104         since the flag has been removed.
105         * dom/EventPath.h:
106         * dom/FocusEvent.cpp:
107         (WebCore::FocusEvent::relatedTargetScoped): Deleted.
108         * dom/FocusEvent.h:
109         * dom/MouseEvent.cpp:
110         (WebCore::MouseEvent::relatedTargetScoped): Deleted.
111         * dom/MouseEvent.h:
112
113 2016-07-07  Chris Dumez  <cdumez@apple.com>
114
115         tdody.deleteRow(-1) and tr.deleteCell(-1) should not throw when there are no rows / cells
116         https://bugs.webkit.org/show_bug.cgi?id=159527
117         <rdar://problem/27232261>
118
119         Reviewed by Alex Christensen.
120
121         tdody.deleteRow(-1) and tr.deleteCell(-1) should not throw when there
122         are no rows / cells:
123         - https://html.spec.whatwg.org/multipage/tables.html#dom-tbody-deleterow
124         - https://html.spec.whatwg.org/multipage/tables.html#dom-tr-deletecell
125
126         Firefox and Chrome do not throw but WebKit was throwing.
127
128         No new tests, rebaselined existing tests.
129
130         * html/HTMLTableRowElement.cpp:
131         (WebCore::HTMLTableRowElement::deleteCell):
132         * html/HTMLTableSectionElement.cpp:
133         (WebCore::HTMLTableSectionElement::deleteRow):
134
135 2016-07-07  Chris Dumez  <cdumez@apple.com>
136
137         HTMLTitleElement.text should only account for direct children Text nodes
138         https://bugs.webkit.org/show_bug.cgi?id=159536
139
140         Reviewed by Ryosuke Niwa.
141
142         HTMLTitleElement.text should only account for direct children Text nodes:
143         - https://html.spec.whatwg.org/multipage/semantics.html#dom-title-text
144         - https://html.spec.whatwg.org/multipage/infrastructure.html#child-text-content
145
146         Firefox and Chrome match the specification. However, WebKit accounted for all
147         Text nodes that are descendants, not just children. This patch aligns our
148         behavior with the specification and other browsers.
149
150         No new tests, rebaselined existing tests.
151
152         * html/HTMLTitleElement.cpp:
153         (WebCore::HTMLTitleElement::text):
154
155 2016-07-07  Dean Jackson  <dino@apple.com>
156
157         REGRESSION(r200769): animations are no longer overridden
158         https://bugs.webkit.org/show_bug.cgi?id=159450
159         <rdar://problem/27120570>
160
161         Reviewed by Zalan Bujtas.
162
163         The change in r200769 removed a lot of the prefixing variant
164         handling, but unfortunately we can't be completely rid
165         of it until we alias the prefixed transitions and animations
166         to the non-prefixed form. For example, setting the prefixed
167         shorthand has to reset the non-prefixed longhands.
168
169         The fix was to explicitly call the variant forms when
170         parsing such longhands, and make sure that MutableStyleProperties
171         removes all prefixed variants when removing shorthands.
172
173         The existing test was amended to cover this case:
174         fast/css/shorthand-omitted-initial-value-overrides-shorthand.html
175
176         * css/CSSParser.cpp:
177         (WebCore::CSSParser::parseAnimationShorthand):
178         (WebCore::CSSParser::addPropertyWithPrefixingVariant):
179         (WebCore::CSSParser::parseTransitionShorthand):
180         * css/CSSParser.h:
181         * css/StyleProperties.cpp:
182         (WebCore::MutableStyleProperties::removeShorthandProperty):
183
184 2016-07-07  Alex Christensen  <achristensen@webkit.org>
185
186         Fix CMake build.
187
188         * PlatformMac.cmake:
189
190 2016-07-07  Alex Christensen  <achristensen@webkit.org>
191
192         Fix CMake build.
193
194         * PlatformMac.cmake:
195
196 2016-07-07  Myles C. Maxfield  <mmaxfield@apple.com> and Frédéric Wang  <fred.wang@free.fr>
197
198         [Font Loading] The callback passed to document.fonts.ready should always be called
199         https://bugs.webkit.org/show_bug.cgi?id=158884
200
201         Reviewed by Dean Jackson.
202
203         The boolean was simply not being reset when loads start.
204
205         Test: fast/text/font-face-set-ready-fire.html
206
207         * css/FontFaceSet.cpp:
208         (WebCore::FontFaceSet::startedLoading):
209         * css/FontFaceSet.h:
210
211 2016-07-07  Andy Estes  <aestes@apple.com>
212
213         [Content Filtering] Load blocked pages more like other error pages are loaded
214         https://bugs.webkit.org/show_bug.cgi?id=159485
215         <rdar://problem/26014076>
216
217         Reviewed by Brady Eidson.
218
219         Content filter blocked pages were being loaded by cancelling the provisional load of the
220         page that was blocked and then scheduling a navigation to the content filter error page.
221         Some clients would not expect a new, Web process-initiated provisional navigation to start
222         after a cancellation, though, and this would put them in a bad state.
223         
224         This patch changes blocked page loading to behave more like loading other error pages.
225         Specifically:
226         1. didFailProvisionalLoad is dispatched with a new, non-cancellation error code.
227         2. The blocked page is loaded immediately after dispatching didFailProvisionalLoad, which
228            prevents FrameLoader from creating a new back-forward list item for the substitute data load.
229         3. A substitute data load initiated by the client for the blocked URL is ignored if
230            ContentFilter will display its own error page.
231         4. A file: URL is used instead of a custom scheme for the base URL of the blocked page,
232            since some clients expect this.
233
234         Updated existing tests to capture frame load delegate callbacks and the back forward list.
235         Added new API tests: ContentFiltering.LoadAlternate*.
236
237         * English.lproj/Localizable.strings: Added a WebKitErrorFrameLoadBlockedByContentFilter description.
238         * Resources/ContentFilterBlockedPage.html: Added.
239         * WebCore.xcodeproj/project.pbxproj: Added ContentFilterBlockedPage.html as a frameowrk resource.
240         * loader/ContentFilter.cpp:
241         (WebCore::ContentFilter::stopFilteringMainResource): Only set m_state to Stopped if not
242         already Blocked, so that we don't forget this ContentFilter was blocked when calling
243         cancelMailResourceLoad() in didDecide().
244         (WebCore::ContentFilter::didDecide): Moved code from DocumentLoader::contentFilterDidBlock() to here.
245         Created a blockedByContentFilterError() and called cancelMainResourceLoad().
246         (WebCore::blockedPageURL): Returned a file: URL to ContentFilterBlockedPage.html in WebCore.framework.
247         (WebCore::ContentFilter::continueAfterSubstituteDataRequest): If the substitute data load
248         is for the same failingURL as the currently-displayed blocked page, ignore it.
249         (WebCore::ContentFilter::handleProvisionalLoadFailure): Load the blocked page if m_state is Blocked
250         and the ResourceError matches the error we used when previously calling cancelMainResourceLoad().
251         (WebCore::ContentFilter::unblockHandler): Deleted.
252         (WebCore::ContentFilter::replacementData): Deleted.
253         (WebCore::ContentFilter::unblockRequestDeniedScript): Deleted.
254         * loader/ContentFilter.h:
255         * loader/DocumentLoader.cpp:
256         (WebCore::DocumentLoader::contentFilter): Returned m_contentFilter.
257         (WebCore::DocumentLoader::installContentFilterUnblockHandler): Deleted.
258         (WebCore::DocumentLoader::contentFilterDidBlock): Deleted.
259         * loader/DocumentLoader.h:
260         * loader/EmptyClients.h: Added a default implementation of blockedByContentFilterError().
261         * loader/FrameLoader.cpp:
262         (WebCore::FrameLoader::load): If m_loadType was already RedirectWithLockedBackForwardList
263         and we are loading subsitute data for a failing URL, continue to use RedirectWithLockedBackForwardList.
264         This prevents a new back-forward list item from being created when loading a blocked page in a subframe.
265         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
266         Called ContentFilter::handleProvisionalLoadFailure() after dispatchDidFailProvisionalLoad().
267         (WebCore::FrameLoader::blockedByContentFilterError): Called FrameLoaderClient::blockedByContentFilterError().
268         * loader/FrameLoader.h:
269         * loader/FrameLoaderClient.h:
270         * loader/NavigationScheduler.cpp:
271         (WebCore::ScheduledSubstituteDataLoad::ScheduledSubstituteDataLoad): Deleted.
272         (WebCore::NavigationScheduler::scheduleSubstituteDataLoad): Deleted.
273         * loader/NavigationScheduler.h:
274         * loader/PolicyChecker.cpp:
275         (WebCore::PolicyChecker::checkNavigationPolicy): Ignored a substitute data load for a
276         failing URL if ContentFilter::continueAfterSubstituteDataRequest() returns false.
277
278 2016-07-07  Chris Dumez  <cdumez@apple.com>
279
280         td / th should be exposed as HTMLTableCellElement objects
281         https://bugs.webkit.org/show_bug.cgi?id=159518
282         <rdar://problem/27225436>
283
284         Reviewed by Ryosuke Niwa.
285
286         td / th should be exposed as HTMLTableCellElement objects:
287         - https://html.spec.whatwg.org/multipage/tables.html#the-td-element
288         - https://html.spec.whatwg.org/multipage/tables.html#the-th-element
289
290         We were using HTMLTableDataCellElement / HTMLTableHeaderCellElement
291         sub-types.
292
293         Firefox and Chrome match the current specification.
294
295         We actually introduced these types recently via Bug 148859 to align
296         with an older version of the HTML specification. However, it seems the
297         specification has been updated to match Firefox / Chrome in the mean
298         time.
299
300         Since we have not shipped those subtypes yet, the compatibility risk is
301         low.
302
303         No new tests, rebaselined existing tests.
304
305         * CMakeLists.txt:
306         * DerivedSources.cpp:
307         * DerivedSources.make:
308         * WebCore.xcodeproj/project.pbxproj:
309         * html/HTMLElementsAllInOne.cpp:
310         * html/HTMLTableCellElement.cpp:
311         (WebCore::HTMLTableCellElement::create):
312         (WebCore::HTMLTableCellElement::scope):
313         (WebCore::HTMLTableCellElement::setScope):
314         (WebCore::HTMLTableCellElement::setRowSpanForBindings): Deleted.
315         * html/HTMLTableCellElement.h:
316         * html/HTMLTableCellElement.idl:
317         * html/HTMLTableDataCellElement.h: Removed.
318         * html/HTMLTableDataCellElement.idl: Removed.
319         * html/HTMLTableHeaderCellElement.cpp: Removed.
320         * html/HTMLTableHeaderCellElement.h: Removed.
321         * html/HTMLTableHeaderCellElement.idl: Removed.
322         * html/HTMLTableRowElement.cpp:
323         (WebCore::HTMLTableRowElement::insertCell):
324         * html/HTMLTagNames.in:
325
326 2016-07-07  Brady Eidson  <beidson@apple.com>
327
328         Modern IDB: When IDBDatabase objects are garbage collected, they don't close their server connection.
329         <rdar://problem/25910345> and https://bugs.webkit.org/show_bug.cgi?id=159523
330
331         Reviewed by Alex Christensen.
332
333         Tests: storage/indexeddb/modern/gc-closes-database-private.html
334                storage/indexeddb/modern/gc-closes-database.html
335
336         * Modules/indexeddb/IDBDatabase.cpp:
337         (WebCore::IDBDatabase::IDBDatabase): New logging.
338         (WebCore::IDBDatabase::~IDBDatabase): Close server connection.
339         (WebCore::IDBDatabase::fireVersionChangeEvent): New logging.
340         (WebCore::IDBDatabase::dispatchEvent): New logging.
341
342         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
343         (WebCore::IDBClient::IDBConnectionToServer::openDatabase): New logging.
344
345 2016-07-07  Frederic Wang  <fwang@igalia.com>
346
347         Refactor layout functions to avoid using flexbox in MathML
348         https://bugs.webkit.org/show_bug.cgi?id=153991
349
350         Reviewed by Brent Fulgham.
351
352         No new tests, already covered by existing tests.
353
354         * css/mathml.css:
355         (math): Change inline mathematical formulas from inline-flex to inline.
356         (math[display="block"]): Change display mathematical formulas from flex to block and
357         remove flexbox property justify-content.
358         (ms, mspace, mtext, mi, mn, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts,
359          mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle)
360          menclose, semantics, mpadded, maction): In order to render properly, all children of the
361          classes derived from RenderMathMLBlock must now be block-level. So we add more elements in
362          this list and update the display property.
363         (mtd > *): However, we use inline-block for children of the cell so that the text-align
364          property is taken into account.
365         * rendering/RenderBox.cpp:
366         (WebCore::RenderBox::computeLogicalWidthInRegion): Add a special case for RenderMathMLBlock
367         to preserve the old behavior.
368         (WebCore::RenderBox::sizesLogicalWidthToFitContent): Ditto.
369         * rendering/RenderFlexibleBox.h: No need to override layoutBlock anymore.
370         * rendering/mathml/RenderMathMLBlock.cpp: Include LayoutRepainter header for use in layoutBlock.
371         (WebCore::RenderMathMLBlock::RenderMathMLBlock): Inherit from RenderBlock and ensure that
372         our children are block-level.
373         (WebCore::RenderMathMLBlock::~RenderMathMLBlock): Added.
374         (WebCore::RenderMathMLBlock::baselinePosition): If the baselinefirstLineBaseline() is
375         undefined, just returns 0.
376         (WebCore::RenderMathMLBlock::paint): Call RenderBlock::paint.
377         (WebCore::RenderMathMLBlock::layoutItems): Implement a simplified version of
378         RenderFlexibleBox::layoutItems where we assume horizontal layout for all children.
379         (WebCore::RenderMathMLBlock::layoutBlock): Add a basic implementation based on
380         RenderFlexibleBox::layoutBlock.
381         (WebCore::RenderMathMLBlock::renderName): Deleted. There is now a simple implementation in the header.
382         * rendering/mathml/RenderMathMLBlock.h: Use RenderBlock instead of RenderFlexibleBox and
383         define layout functions. Define avoidsFloats and canDropAnonymousBlockChild to preserve
384         the old behavior and remove isFlexibleBoxImpl.
385         * rendering/mathml/RenderMathMLFenced.cpp:
386         (WebCore::RenderMathMLFenced::createMathMLOperator): Use block for anonymous RenderMathMLOperator.
387         * rendering/mathml/RenderMathMLRow.cpp:
388         (WebCore::RenderMathMLRow::layoutRowItems): No need to handle the flexbox case anymore.
389         (WebCore::RenderMathMLRow::paintChildren): Deleted. We now just use RenderBlock::paintChildren.
390         * rendering/mathml/RenderMathMLRow.h:
391         * rendering/mathml/RenderMathMLFraction.cpp:
392         (WebCore::RenderMathMLFraction::paintChildren): Deleted. We now just use RenderBlock::paintChildren.
393         * rendering/mathml/RenderMathMLFraction.h:
394         * rendering/mathml/RenderMathMLRoot.cpp:
395         (WebCore::RenderMathMLRoot::paintChildren): Deleted. We now just use RenderBlock::paintChildren.
396         * rendering/mathml/RenderMathMLRoot.h:
397         * rendering/mathml/RenderMathMLScripts.cpp:
398         (WebCore::RenderMathMLScripts::paintChildren): Deleted. We now just use RenderBlock::paintChildren.
399         * rendering/mathml/RenderMathMLScripts.h:
400         * rendering/mathml/RenderMathMLUnderOver.cpp:
401         (WebCore::RenderMathMLUnderOver::paintChildren): Deleted. We now just use RenderBlock::paintChildren.
402         * rendering/mathml/RenderMathMLUnderOver.h:
403
404 2016-07-07  Antti Koivisto  <antti@apple.com>
405
406         REGRESSION (r199054): CrashTracer: [USER] parseWebKit at WebCore: WebCore::RenderBlockFlow::checkFloatsInCleanLine + 107
407         https://bugs.webkit.org/show_bug.cgi?id=159519
408
409         Reviewed by Zalan Bujtas.
410
411         Test: fast/inline/trailing-floats-inline-crash.html
412
413         * rendering/RenderBlockLineLayout.cpp:
414         (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
415
416             Use the existing deletionHasBegun bit in RenderStyle to assert against this reliably.
417
418         * rendering/RenderLineBoxList.cpp:
419         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
420
421             In some cases a special TrailingFloatsRootInlineBox may be added as the last root linebox of a flow.
422             If it is combined with br the existing invalidation that invalidates the next and previous line may
423             not be sufficient. Test for this case and invalidate the TrailingFloatsRootInlineBox too if it exists.
424
425         * rendering/RootInlineBox.h:
426         (WebCore::RootInlineBox::isTrailingFloatsRootInlineBox):
427         * rendering/TrailingFloatsRootInlineBox.h:
428         * rendering/style/RenderStyle.h:
429         (WebCore::RenderStyle::deletionHasBegun):
430
431             Expose the bit in debug.
432
433 2016-07-07  Alex Christensen  <achristensen@webkit.org>
434
435         Use SocketProvider to create WebSocketChannels
436         https://bugs.webkit.org/show_bug.cgi?id=158776
437
438         Reviewed by Brent Fulgham.
439
440         This patch should have no change in behavior except making an InvalidStateError in
441         conditions where we should not be able to do networking, like in a detached frame.
442         It just replaces ThreadableWebSocketChannel::create with SocketProvider::createWebSocketChannel
443         which does the same thing as ThreadableWebSocketChannel::create for Mac and 
444         Windows WebKit1.  The WebKit2 implementation is the same right now, but it will
445         be replaced by a proxy that will do the WebSocket operations in the NetworkProcess.
446
447         * Modules/websockets/ThreadableWebSocketChannel.cpp: Removed.
448         * Modules/websockets/ThreadableWebSocketChannel.h:
449         (WebCore::ThreadableWebSocketChannel::ThreadableWebSocketChannel):
450         * Modules/websockets/WebSocket.cpp:
451         (WebCore::WebSocket::connect):
452         * Modules/websockets/WebSocketChannel.h:
453         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
454         * WebCore.xcodeproj/project.pbxproj:
455         * dom/Document.cpp:
456         (WebCore::Document::idbConnectionProxy):
457         (WebCore::Document::socketProvider):
458         (WebCore::Document::canNavigate):
459         * dom/Document.h:
460         (WebCore::Document::notifyRemovePendingSheetIfNeeded):
461         * dom/ScriptExecutionContext.h:
462         * inspector/InspectorOverlay.cpp:
463         (WebCore::InspectorOverlay::overlayPage):
464         * loader/EmptyClients.cpp:
465         (WebCore::EmptyEditorClient::registerRedoStep):
466         (WebCore::EmptySocketProvider::createWebSocketChannel):
467         * loader/EmptyClients.h:
468         * page/Page.h:
469         * page/PageConfiguration.cpp:
470         (WebCore::PageConfiguration::PageConfiguration):
471         * page/PageConfiguration.h:
472         * page/SocketProvider.h:
473         (WebCore::SocketProvider::~SocketProvider):
474         * svg/graphics/SVGImage.cpp:
475         (WebCore::SVGImage::dataChanged):
476         * workers/DedicatedWorkerGlobalScope.cpp:
477         (WebCore::DedicatedWorkerGlobalScope::create):
478         (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
479         * workers/DedicatedWorkerGlobalScope.h:
480         * workers/DedicatedWorkerThread.cpp:
481         (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
482         (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
483         (WebCore::DedicatedWorkerThread::runEventLoop):
484         * workers/DedicatedWorkerThread.h:
485         * workers/WorkerGlobalScope.cpp:
486         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
487         (WebCore::WorkerGlobalScope::disableEval):
488         (WebCore::WorkerGlobalScope::socketProvider):
489         (WebCore::WorkerGlobalScope::idbConnectionProxy):
490         * workers/WorkerGlobalScope.h:
491         (WebCore::WorkerGlobalScope::script):
492         * workers/WorkerMessagingProxy.cpp:
493         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
494         * workers/WorkerThread.cpp:
495         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
496         (WebCore::WorkerThread::WorkerThread):
497         (WebCore::WorkerThread::idbConnectionProxy):
498         (WebCore::WorkerThread::socketProvider):
499         * workers/WorkerThread.h:
500         (WebCore::WorkerThread::workerGlobalScope):
501
502 2016-07-07  Commit Queue  <commit-queue@webkit.org>
503
504         Unreviewed, rolling out r202905 and r202911.
505         https://bugs.webkit.org/show_bug.cgi?id=159522
506
507         This test is fails on El Capitan and Sierra WK1 (Requested by
508         ryanhaddad on #webkit).
509
510         Reverted changesets:
511
512         "Add a test for media control dropoff"
513         https://bugs.webkit.org/show_bug.cgi?id=151287
514         http://trac.webkit.org/changeset/202905
515
516         "Add a test for media control dropoff"
517         https://bugs.webkit.org/show_bug.cgi?id=151287
518         http://trac.webkit.org/changeset/202911
519
520 2016-07-07  Antoine Quint  <graouts@apple.com>
521
522         <img> with a wide gamut PDF does not display using a wide gamut color space
523         https://bugs.webkit.org/show_bug.cgi?id=158983
524         <rdar://problem/25720247>
525
526         Reviewed by Dean Jackson.
527
528         Calls to ImageBuffer::createCompatibleBuffer() that do not provide an explicit
529         color space will now infer the color space from the provided graphics context
530         on platforms using CG. The method signature that takes in a GraphicsContext
531         without a color space is now split into a CG-specified implementation and a
532         Cairo one to avoid having diverging platform code in ImageBuffer.cpp.
533
534         Some call sites need to provide an explicit color space still, so we add a new
535         ImageBuffer::createCompatibleBuffer() that allows for that while inferring
536         sizing and scaling from a GraphicsContext.
537         
538         All signatures of ImageBuffer::createCompatibleBuffer() are losing the
539         hasAlpha parameter which was always ignored. All call sites that were using
540         hasAlpha have been updated.
541
542         In addition, we make all the IOSurface and IOSurfacePool code, which is
543         CG-specific, use the plaform-specific type CGColorSpaceRef instead of ColorSpace
544         so that we may pick up on the color space copied over from the graphics context
545         in the CG-specific implementation of ImageBuffer::createCompatibleBuffer().
546
547         * html/canvas/CanvasRenderingContext2D.cpp:
548         (WebCore::CanvasRenderingContext2D::drawTextInternal):
549         * platform/graphics/BitmapImage.cpp:
550         (WebCore::BitmapImage::drawPattern):
551         * platform/graphics/GradientImage.cpp:
552         (WebCore::GradientImage::drawPattern):
553         * platform/graphics/ImageBuffer.cpp:
554         (WebCore::ImageBuffer::createCompatibleBuffer):
555         * platform/graphics/ImageBuffer.h:
556         * platform/graphics/NamedImageGeneratedImage.cpp:
557         (WebCore::NamedImageGeneratedImage::drawPattern):
558         * platform/graphics/cairo/ImageBufferCairo.cpp:
559         (WebCore::ImageBuffer::createCompatibleBuffer):
560         * platform/graphics/cg/IOSurfacePool.cpp:
561         (WebCore::surfaceMatchesParameters):
562         (WebCore::IOSurfacePool::takeSurface):
563         * platform/graphics/cg/IOSurfacePool.h:
564         * platform/graphics/cg/ImageBufferCG.cpp:
565         (WebCore::ImageBuffer::createCompatibleBuffer):
566         (WebCore::ImageBuffer::ImageBuffer):
567         * platform/graphics/cocoa/IOSurface.h:
568         * platform/graphics/cocoa/IOSurface.mm:
569         (WebCore::IOSurface::surfaceFromPool):
570         (WebCore::IOSurface::create):
571         (WebCore::IOSurface::createFromSendRight):
572         (WebCore::IOSurface::createFromSurface):
573         (WebCore::IOSurface::createFromImage):
574         (WebCore::IOSurface::IOSurface):
575         (WebCore::IOSurface::ensurePlatformContext):
576         * platform/mac/ThemeMac.mm:
577         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
578         * platform/spi/cg/CoreGraphicsSPI.h:
579         * rendering/RenderBoxModelObject.cpp:
580         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
581         * rendering/RenderThemeMac.mm:
582         (WebCore::RenderThemeMac::paintProgressBar):
583         * rendering/svg/SVGRenderingContext.cpp:
584         (WebCore::SVGRenderingContext::bufferForeground):
585         * svg/graphics/SVGImage.cpp:
586         (WebCore::SVGImage::drawPatternForContainer):
587
588 2016-07-07  Beth Dakin  <bdakin@apple.com>
589
590         All fullscreen videos should be able the control the controls manager
591         https://bugs.webkit.org/show_bug.cgi?id=159496
592         -and corresponding-
593         rdar://problem/27009446
594
595         Reviewed by Eric Carlson.
596
597         * html/HTMLMediaElement.cpp:
598         (WebCore::HTMLMediaElement::fullscreenModeChanged):
599         * html/MediaElementSession.cpp:
600         (WebCore::MediaElementSession::canControlControlsManager):
601
602 2016-07-07  Jer Noble  <jer.noble@apple.com>
603
604         Crash due to HTMLMediaElement at JavaScriptCore: JSC::JSLockHolder::JSLockHolder
605         https://bugs.webkit.org/show_bug.cgi?id=159517
606         <rdar://problem/27221109>
607
608         Reviewed by Eric Carlson.
609
610         When WebKit on iOS gets a notification that the UIProcess has been backgrounded, it sends an
611         interruption event to the WebProcess to pause any playing HTMLMediaElements. When the
612         elements which get this interruption have pending promises created during a previous call to
613         play(), these promises get rejected.
614
615         However, if the HTMLMediaElement's document has already been destroyed, the pending Promises
616         are in an inconsistent state: their script execution context (the document) has been
617         destroyed, leading to the crash in JSLockHolder.
618
619         When HTMLMediaElement is notified that its ScriptExecutionContext has been destroyed, also
620         clear the list of pending Promises.
621
622         * html/HTMLMediaElement.cpp:
623         (WebCore::HTMLMediaElement::contextDestroyed):
624
625 2016-07-05  Jer Noble  <jer.noble@apple.com>
626
627         Facebook videos without audio tracks will sometimes cause playback controls to appear.
628         https://bugs.webkit.org/show_bug.cgi?id=159437
629
630         Reviewed by Eric Carlson.
631
632         Because updatePlaybackControlsManager() will cause the session manager to walk through all
633         the outstanding sessions asking if it canControlControlsManager(), some sessions will say
634         they can control the controls manager if we are currently processing a user gesture. This is
635         obviously not intended (there may be a user gesture to un-mute video 1, but an unrelated
636         video 2 should not be allowed to use that use gesture to fulfill its own requirements.)
637
638         So in those situations where conditions may have changed and updatePlaybackControlsManager()
639         needs to be called, instead schedule the update for the next run loop.
640         
641         * html/HTMLMediaElement.cpp:
642         (WebCore::HTMLMediaElement::setMuted):
643         (WebCore::HTMLMediaElement::layoutSizeChanged):
644         (WebCore::HTMLMediaElement::updatePlayState):
645         (WebCore::HTMLMediaElement::createMediaPlayer):
646         (WebCore::HTMLMediaElement::scheduleUpdatePlaybackControlsManager):
647         * html/HTMLMediaElement.h:
648
649 2016-07-07  Jer Noble  <jer.noble@apple.com>
650
651         Unreviewed build fix after r202908. Fix the webPlaybackSessionInterfaceMac @property.
652
653         * platform/mac/WebPlaybackControlsManager.h:
654         * platform/mac/WebPlaybackControlsManager.mm:
655
656 2016-07-07  Youenn Fablet  <youenn@apple.com>
657
658         [Fetch API] Response constructor should throw in case of bad reason phrase
659         https://bugs.webkit.org/show_bug.cgi?id=159508
660
661         Reviewed by Alex Christensen.
662
663         Covered by rebased test.
664
665         * Modules/fetch/FetchResponse.cpp:
666         (WebCore::FetchResponse::initializeWith): Validating reason phrase with new routine.
667         Throwing a TypeError in case of error.
668         * platform/network/HTTPParsers.cpp:
669         (WebCore::isValidReasonPhrase): Added to validate reason phrase according
670         https://tools.ietf.org/html/rfc7230#section-3.1.2
671         * platform/network/HTTPParsers.h:
672
673 2016-07-07  Youenn Fablet  <youenn@apple.com>
674
675         [Fetch API] Response.redirect should throw a RangeError in case of bad status code
676         https://bugs.webkit.org/show_bug.cgi?id=159507
677
678         Reviewed by Alex Christensen.
679
680         Covered by rebased test.
681
682         * Modules/fetch/FetchResponse.cpp:
683         (WebCore::FetchResponse::redirect): Throw a RangeError in case of bad status.
684
685 2016-07-05  Jer Noble  <jer.noble@apple.com>
686
687         Ownership between WebPlaybackSessionInterfaceMac and WebPlaybackControlsManager is backwards.
688         https://bugs.webkit.org/show_bug.cgi?id=159441
689
690         Reviewed by Eric Carlson.
691
692         The WebPlaybackControlsManager should own the WebPlaybackSessionInterfaceMac, and not
693         vice versa.
694
695         * platform/mac/WebPlaybackControlsManager.h:
696         * platform/mac/WebPlaybackControlsManager.mm:
697         (-[WebPlaybackControlsManager webPlaybackSessionInterfaceMac]):
698         (-[WebPlaybackControlsManager setWebPlaybackSessionInterfaceMac:]):
699         * platform/mac/WebPlaybackSessionInterfaceMac.h:
700         * platform/mac/WebPlaybackSessionInterfaceMac.mm:
701         (WebCore::WebPlaybackSessionInterfaceMac::playBackControlsManager):
702
703 2016-07-07  Eric Carlson  <eric.carlson@apple.com>
704
705         Add a test for media control dropoff
706         https://bugs.webkit.org/show_bug.cgi?id=151287
707         <rdar://problem/23544666>
708
709         Reviewed by Antoine Quint.
710
711         Test: media/controls/inline-elements-dropoff-order.html
712
713         * Modules/mediacontrols/mediaControlsApple.js: Expose more state to testing.
714
715 2016-07-07  Miguel Gomez  <magomez@igalia.com>
716
717         [GTK] Painting a video into a canvas doesn't work when accelerated compositing is enabled
718         https://bugs.webkit.org/show_bug.cgi?id=159405
719
720         Reviewed by Xabier Rodriguez-Calvar.
721
722         Implement video frame painting to the canvas when accelerated compositing is enabled.
723
724         Already covered by existent tests.
725
726         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
727         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
728         Replace custom enumeration for the video rotation with the ImageOrientation class.
729         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
730         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
731         Replace the orientation value comparison with ImageOrientation::usesWidthAsHeight().
732         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
733         Perform the frame painting taking into account the video orientation tag.
734         (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
735         Rotate the native image before returning it.
736         (WebCore::MediaPlayerPrivateGStreamerBase::setVideoSourceOrientation):
737         Replace custom enumeration for the video rotation with the ImageOrientation class.
738         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase): Deleted.
739         Remove orientation initialization.
740         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
741         Remove custom enumeration for the video orientation.
742
743 2016-07-07  Philippe Normand  <pnormand@igalia.com>
744
745         [GStreamer][GL] switch to appsink
746         https://bugs.webkit.org/show_bug.cgi?id=159466
747
748         Reviewed by Carlos Garcia Campos.
749
750         Fakesink is mostly used for tests. Appsink provides the same
751         functionality and is actually meant to be used on application
752         side.
753
754         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
755         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
756         (WebCore::newSampleCallback):
757         (WebCore::newPrerollCallback):
758         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):
759         (WebCore::MediaPlayerPrivateGStreamerBase::drawCallback): Deleted.
760         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
761
762 2016-07-06  Chris Dumez  <cdumez@apple.com>
763
764         Document.title setter does not work for SVG documents
765         https://bugs.webkit.org/show_bug.cgi?id=159503
766         <rdar://problem/27212313>
767
768         Reviewed by Ryosuke Niwa.
769
770         Document.title setter should work for SVG documents:
771         - https://html.spec.whatwg.org/multipage/dom.html#document.title
772
773         This patch aligns our behavior with the specification
774         and with Firefox / Chrome.
775
776         No new tests, rebaselined existing test.
777
778         * dom/Document.cpp:
779         (WebCore::Document::setTitle):
780         - Reverse the if conditions for clarity.
781         - If the document element is an SVG svg element, create a
782           SVGTitleElement and insert it as first child of the
783           document element.
784         - Call SVGTitleElement::setText() instead of
785           HTMLTitleElement::setText() at the end of the method if
786           m_titleElement is a SVGTitleElement.
787
788         (WebCore::Document::updateTitleElement):
789         - If document element is an SVG svg element, use the first
790           child of the document element that is a SVGTitleElement.
791
792         * svg/SVGTitleElement.cpp:
793         (WebCore::SVGTitleElement::setText):
794         * svg/SVGTitleElement.h:
795         Add SVGTitleElement::setText() method that does the same
796         thing as HTMLTitleElement::setText().
797
798 2016-07-06  Chris Dumez  <cdumez@apple.com>
799
800         Align Document.body setter with the HTML specification
801         https://bugs.webkit.org/show_bug.cgi?id=159490
802
803         Reviewed by Alex Christensen.
804
805         Align Document.body setter with the HTML specification:
806         - https://html.spec.whatwg.org/multipage/dom.html#dom-document-body
807
808         In particular, the following web-exposed changes were made:
809         - It is now possible to set document.body to a frameset element.
810         - We no longer call importNode() on the passed in body. Therefore,
811           if the body comes from another document, its will be adopted /
812           transferred rather than cloned.
813
814         Both changes match the behavior of Firefox and Chrome.
815
816         No new tests, updated / rebaselined existing tests.
817
818         * dom/Document.cpp:
819         (WebCore::Document::setBodyOrFrameset):
820
821 2016-07-06  Brady Eidson  <beidson@apple.com>
822
823         Fix my bogus json I landed earlier today.
824
825         * features.json:
826
827 2016-07-06  Benjamin Poulain  <bpoulain@apple.com>
828
829         [JSC] Unify how we throw TypeError from C++
830         https://bugs.webkit.org/show_bug.cgi?id=159500
831
832         Reviewed by Saam Barati.
833
834         * bindings/js/JSBiquadFilterNodeCustom.cpp:
835         (WebCore::JSBiquadFilterNode::setType):
836         * bindings/js/JSBlobCustom.cpp:
837         (WebCore::constructJSBlob):
838         * bindings/js/JSCryptoKeySerializationJWK.cpp:
839         (WebCore::getBigIntegerVectorFromJSON):
840         (WebCore::JSCryptoKeySerializationJWK::JSCryptoKeySerializationJWK):
841         (WebCore::tryJWKKeyOpsValue):
842         (WebCore::JSCryptoKeySerializationJWK::reconcileUsages):
843         (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence):
844         (WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents):
845         (WebCore::JSCryptoKeySerializationJWK::keyData):
846         (WebCore::addJWKAlgorithmToJSON):
847         (WebCore::JSCryptoKeySerializationJWK::serialize):
848         * bindings/js/JSCryptoOperationData.cpp:
849         (WebCore::cryptoOperationDataFromJSValue):
850         * bindings/js/JSDOMBinding.cpp:
851         (WebCore::enforceRange):
852         (WebCore::throwTypeError):
853         (WebCore::throwArgumentMustBeEnumError):
854         (WebCore::throwArgumentMustBeFunctionError):
855         (WebCore::throwArgumentTypeError):
856         (WebCore::throwArrayElementTypeError):
857         (WebCore::throwGetterTypeError):
858         (WebCore::throwThisTypeError):
859         * bindings/js/JSDataCueCustom.cpp:
860         (WebCore::constructJSDataCue):
861         * bindings/js/JSDocumentCustom.cpp:
862         (WebCore::JSDocument::defineElement):
863         * bindings/js/JSFileCustom.cpp:
864         (WebCore::constructJSFile):
865         * bindings/js/JSModuleLoader.cpp:
866         (WebCore::JSModuleLoader::evaluate):
867         * bindings/js/JSMutationObserverCustom.cpp:
868         (WebCore::constructJSMutationObserver):
869         * bindings/js/JSOscillatorNodeCustom.cpp:
870         (WebCore::JSOscillatorNode::setType):
871         * bindings/js/JSPannerNodeCustom.cpp:
872         (WebCore::JSPannerNode::setPanningModel):
873         (WebCore::JSPannerNode::setDistanceModel):
874         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
875         (WebCore::constructJSReadableStreamController):
876         (WebCore::constructJSReadableStreamReader):
877         * bindings/js/JSSubtleCryptoCustom.cpp:
878         (WebCore::cryptoKeyFormatFromJSValue):
879         (WebCore::importKey):
880         (WebCore::exportKey):
881         * bindings/js/ReadableStreamController.cpp:
882         (WebCore::ReadableStreamController::invoke):
883         * bindings/js/SerializedScriptValue.cpp:
884         (WebCore::CloneDeserializer::throwValidationError):
885         (WebCore::SerializedScriptValue::maybeThrowExceptionIfSerializationFailed):
886         * bridge/c/c_instance.cpp:
887         (JSC::Bindings::CInstance::invokeMethod):
888         * bridge/objc/objc_instance.mm:
889         (ObjcInstance::invokeMethod):
890         * bridge/objc/objc_runtime.mm:
891         (JSC::Bindings::ObjcArray::setValueAt):
892
893 2016-07-06  Tim Horton  <timothy_horton@apple.com>
894
895         Email from June 1st containing text 'Today @ 7:10PM' is linkified, but shouldn't be
896         https://bugs.webkit.org/show_bug.cgi?id=159498
897         <rdar://problem/26719903>
898
899         Reviewed by Sam Weinig.
900
901         New API test: WebKit2.DataDetectionReferenceDate
902
903         * editing/cocoa/DataDetection.h:
904         * editing/cocoa/DataDetection.mm:
905         (WebCore::DataDetection::detectContentInRange):
906         Extract the reference date from the DataDetectors context dictionary if it exists,
907         and pass it along to DataDetectors.
908
909         * loader/FrameLoader.cpp:
910         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
911         * loader/FrameLoaderClient.h:
912         Plumb the DataDetectors context dictionary through from WebPage.
913
914 2016-07-06  Chris Dumez  <cdumez@apple.com>
915
916         [WK2][Cocoa] Disable ResourceResponse lazy initialization
917         https://bugs.webkit.org/show_bug.cgi?id=159497
918         <rdar://problem/27209066>
919
920         Reviewed by Alex Christensen.
921
922         Add method to Cocoa's ResponseResponse header to disable
923         lazy initialization.
924
925         * platform/network/cf/ResourceResponse.h:
926         * platform/network/cocoa/ResourceResponseCocoa.mm:
927         (WebCore::ResourceResponse::disableLazyInitialization):
928
929 2016-07-06  Brent Fulgham  <bfulgham@apple.com>
930
931         Return values of JSArray::createUninitialized (and related) are not consistently checked for nullptr
932         https://bugs.webkit.org/show_bug.cgi?id=159495
933         <rdar://problem/26075433>
934
935         Reviewed by Dean Jackson.
936
937         Test: fast/canvas/canvas-getImageData-invalid-result-buffer-crash.html
938
939         * html/ImageData.cpp:
940         (WebCore::ImageData::ImageData): Assert at construction if we could not create a valid
941         buffer.
942         * platform/SharedBuffer.cpp:
943         (WebCore::SharedBuffer::createArrayBuffer): Check for a null buffer before using it.
944         * platform/graphics/cg/ImageBufferDataCG.cpp:
945         (WebCore::ImageBufferData::getData): Ditto.
946         * platform/graphics/filters/FEGaussianBlur.cpp:
947         (WebCore::FEGaussianBlur::platformApplySoftware): Ditto.
948         * platform/graphics/filters/FilterEffect.cpp:
949         (WebCore::FilterEffect::copyImageBytes): Ditto.
950         (WebCore::FilterEffect::copyUnmultipliedImage): Ditto.
951         (WebCore::FilterEffect::copyPremultipliedImage): Ditto.
952
953 2016-07-06  Chris Dumez  <cdumez@apple.com>
954
955         Document.body should return the first child of the html element that is either a body / frameset element
956         https://bugs.webkit.org/show_bug.cgi?id=159488
957
958         Reviewed by Ryosuke Niwa.
959
960         Document.body should return the first child of the html element that is
961         either a body / frameset element:
962         - https://html.spec.whatwg.org/multipage/dom.html#dom-document-body
963         - https://html.spec.whatwg.org/multipage/dom.html#the-body-element-2
964
965         We used the first child of the *document* element that is either a
966         body / frameset element, even if the document element is not an html
967         element.
968
969         Firefox and Chrome match the specification.
970
971         Test: imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/Document.body.html
972
973         * dom/Document.cpp:
974         (WebCore::Document::bodyOrFrameset):
975
976 2016-07-06  Dean Jackson  <dino@apple.com>
977
978         Adopt new PiP glyph
979         https://bugs.webkit.org/show_bug.cgi?id=159494
980         <rdar://problem/27061084>
981
982         Reviewed by Ada Chan.
983
984         We got new artwork for Picture-in-Picture on macOS from
985         our designers.
986
987         * Modules/mediacontrols/mediaControlsApple.css:
988         (video::-webkit-media-controls-panel .picture-in-picture-button):
989         (video::-webkit-media-controls-panel .picture-in-picture-button.return-from-picture-in-picture):
990
991 2016-07-06  Commit Queue  <commit-queue@webkit.org>
992
993         Unreviewed, rolling out r202867.
994         https://bugs.webkit.org/show_bug.cgi?id=159491
995
996         This change caused an existing LayoutTest to crash on ios-
997         simulator (Requested by ryanhaddad on #webkit).
998
999         Reverted changeset:
1000
1001         "<img> with a wide gamut PDF does not display using a wide
1002         gamut color space"
1003         https://bugs.webkit.org/show_bug.cgi?id=158983
1004         http://trac.webkit.org/changeset/202867
1005
1006 2016-07-06  Chris Dumez  <cdumez@apple.com>
1007
1008         [ShadowDOM] assignedSlot property should be on Text, not CharacterData
1009         https://bugs.webkit.org/show_bug.cgi?id=159482
1010         <rdar://problem/27201687>
1011
1012         Reviewed by Ryosuke Niwa.
1013
1014         assignedSlot property should be on Text, not CharacterData as per:
1015         - https://dom.spec.whatwg.org/#mixin-slotable
1016
1017         Align with the latest specification.
1018
1019         No new tests, rebaselined existing test.
1020
1021         * CMakeLists.txt:
1022         * DerivedSources.make:
1023         * WebCore.xcodeproj/project.pbxproj:
1024         * dom/Element.idl:
1025         * dom/NonDocumentTypeChildNode.idl:
1026         * dom/Slotable.idl: Copied from Source/WebCore/dom/NonDocumentTypeChildNode.idl.
1027         * dom/Text.idl:
1028
1029 2016-07-06  Jeremy Jones  <jeremyj@apple.com>
1030
1031         Do not animate video fullscreen exit when page has navigated away.
1032         https://bugs.webkit.org/show_bug.cgi?id=159479
1033
1034         Reviewed by Eric Carlson.
1035
1036         No new tests there is no effect on the DOM. The only effect is to video fullscreen window animation.
1037
1038         When the page has been navigated away, the fullscreen or picture-in-picture window should
1039         not animate back inline in the page, since the page has already navigated to a new page.
1040         Instead exit the fullscreen mode without animating.
1041
1042         * html/HTMLMediaElement.cpp:
1043         (WebCore::HTMLMediaElement::exitFullscreen):
1044
1045 2016-07-06  Jeremy Jones  <jeremyj@apple.com>
1046
1047         Signal that media element is prepared for inline when being stopped since script won't be able to.
1048         https://bugs.webkit.org/show_bug.cgi?id=159163
1049         rdar://problem/26844557
1050
1051         Reviewed by Jer Noble.
1052
1053         No new tests since this don't change behavior in the DOM. It prevents a race that could cause 
1054         fullscreen and picture in picture to fail to tear down completely.
1055   
1056         When an element exits a fullscreen mode and is immediately removed from the DOM by the page, 
1057         its JavaScript stops running. The fullscreen code is then blocked waiting for JS to signal 
1058         that it has updated its state in preparation for inline mode. This change explicitly signals
1059         this since JS wont be able to.
1060
1061         Additionally, when going from PiP back to inline, don't go through fullscreen first, when the 
1062         request comes from the DOM. This was causing the presentation mode to become confused. The
1063         page requests inline. PiP would exit back to fullscreen and set the presentation mode to
1064         fullscreen. Then it would exit fullscreen back to inline, but the DOM still had the wrong
1065         presentation mode. Skipping this removes an unnecessary step in the animation and keeps the
1066         presentation mode state consistent.
1067
1068         * html/HTMLMediaElement.cpp:
1069         (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
1070         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Set prepared for inline.
1071         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Return directly to inlne.
1072
1073 2016-07-06  Chris Dumez  <cdumez@apple.com>
1074
1075         Add support for Node.isConnected
1076         https://bugs.webkit.org/show_bug.cgi?id=159474
1077         <rdar://problem/27197947>
1078
1079         Reviewed by Ryosuke Niwa.
1080
1081         Add support for Node.isConnected as per:
1082         - https://dom.spec.whatwg.org/#dom-node-isconnected
1083
1084         Chrome already supports this.
1085
1086         Test: imported/w3c/web-platform-tests/dom/nodes/Node-isConnected.html
1087
1088         * dom/Node.idl:
1089
1090 2016-07-06  Brady Eidson  <beidson@apple.com>
1091
1092         Update IndexedDB's status on the feature page (How had we not done this already?)
1093
1094         Rubberstamped by Sam Weinig.
1095
1096         * features.json:
1097
1098 2016-07-06  Antoine Quint  <graouts@apple.com>
1099
1100         <img> with a wide gamut PDF does not display using a wide gamut color space
1101         https://bugs.webkit.org/show_bug.cgi?id=158983
1102         <rdar://problem/25720247>
1103
1104         Reviewed by Tim Horton.
1105
1106         Calls to ImageBuffer::createCompatibleBuffer() that do not provide an explicit
1107         color space will now infer the color space from the provided graphics context
1108         on platforms using CG. The method signature that takes in a GraphicsContext
1109         without a color space is now split into a CG-specified implementation and a
1110         Cairo one to avoid having diverging platform code in ImageBuffer.cpp.
1111
1112         Some call sites need to provide an explicit color space still, so we add a new
1113         ImageBuffer::createCompatibleBuffer() that allows for that while inferring
1114         sizing and scaling from a GraphicsContext.
1115         
1116         All signatures of ImageBuffer::createCompatibleBuffer() are losing the
1117         hasAlpha parameter which was always ignored. All call sites that were using
1118         hasAlpha have been updated.
1119
1120         In addition, we make all the IOSurface and IOSurfacePool code, which is
1121         CG-specific, use the plaform-specific type CGColorSpaceRef instead of ColorSpace
1122         so that we may pick up on the color space copied over from the graphics context
1123         in the CG-specific implementation of ImageBuffer::createCompatibleBuffer().
1124
1125         * html/canvas/CanvasRenderingContext2D.cpp:
1126         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1127         * platform/graphics/GradientImage.cpp:
1128         (WebCore::GradientImage::drawPattern):
1129         * platform/graphics/ImageBuffer.cpp:
1130         (WebCore::ImageBuffer::createCompatibleBuffer):
1131         * platform/graphics/ImageBuffer.h:
1132         * platform/graphics/NamedImageGeneratedImage.cpp:
1133         (WebCore::NamedImageGeneratedImage::drawPattern):
1134         * platform/graphics/cairo/ImageBufferCairo.cpp:
1135         (WebCore::ImageBuffer::createCompatibleBuffer):
1136         * platform/graphics/cg/IOSurfacePool.cpp:
1137         (WebCore::surfaceMatchesParameters):
1138         (WebCore::IOSurfacePool::takeSurface):
1139         * platform/graphics/cg/IOSurfacePool.h:
1140         * platform/graphics/cg/ImageBufferCG.cpp:
1141         (WebCore::ImageBuffer::createCompatibleBuffer):
1142         (WebCore::ImageBuffer::ImageBuffer):
1143         * platform/graphics/cocoa/IOSurface.h:
1144         * platform/graphics/cocoa/IOSurface.mm:
1145         (WebCore::IOSurface::surfaceFromPool):
1146         (WebCore::IOSurface::create):
1147         (WebCore::IOSurface::createFromSendRight):
1148         (WebCore::IOSurface::createFromSurface):
1149         (WebCore::IOSurface::createFromImage):
1150         (WebCore::IOSurface::IOSurface):
1151         (WebCore::IOSurface::ensurePlatformContext):
1152         * platform/mac/ThemeMac.mm:
1153         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
1154         * platform/spi/cg/CoreGraphicsSPI.h:
1155         * rendering/RenderBoxModelObject.cpp:
1156         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1157         * rendering/RenderThemeMac.mm:
1158         (WebCore::RenderThemeMac::paintProgressBar):
1159         * rendering/svg/SVGRenderingContext.cpp:
1160         (WebCore::SVGRenderingContext::bufferForeground):
1161         * svg/graphics/SVGImage.cpp:
1162         (WebCore::SVGImage::drawPatternForContainer):
1163
1164 2016-07-06  Tim Horton  <timothy_horton@apple.com>
1165
1166         Long spin editing text at top of message containing Reader version of web page with many GIFs
1167         https://bugs.webkit.org/show_bug.cgi?id=159444
1168         <rdar://problem/26790386>
1169
1170         Reviewed by Sam Weinig.
1171
1172         * editing/cocoa/HTMLConverter.mm:
1173         (fileWrapperForElement):
1174         Instead of looking up the image's data in the cache by URL, just use the
1175         CachedImage on the HTMLImageElement. There are situations (which seem to involve
1176         cloning the DOM then having the cloned DOM get garbage collected) where the image
1177         can be removed from the cache, but still be live in the document.
1178
1179 2016-07-06  Brady Eidson  <beidson@apple.com>
1180
1181         Hold RefPtr<>'s to UniqueIDBDatabases while performing user delete.
1182         https://bugs.webkit.org/show_bug.cgi?id=159471
1183
1184         Reviewed by Brent Fulgham.
1185
1186         * Modules/indexeddb/server/IDBServer.cpp:
1187         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
1188         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesForOrigins):
1189
1190 2016-07-06  Commit Queue  <commit-queue@webkit.org>
1191
1192         Unreviewed, rolling out r202725.
1193         https://bugs.webkit.org/show_bug.cgi?id=159473
1194
1195         didn't reduce coreui memory usage (Requested by kling on
1196         #webkit).
1197
1198         Reverted changeset:
1199
1200         "[Mac] Get rid of the old timey rubber-banding linen pattern."
1201         https://bugs.webkit.org/show_bug.cgi?id=159329
1202         http://trac.webkit.org/changeset/202725
1203
1204 2016-07-06  Philippe Normand  <pnormand@igalia.com>
1205
1206         [GStreamer] duration query improvements
1207         https://bugs.webkit.org/show_bug.cgi?id=159458
1208
1209         Reviewed by Carlos Garcia Campos.
1210
1211         Currently the player caches the result of the duration query but
1212         this is overkill because it's cached by playbin already. The only
1213         time where the player needs to cache the duration is when EOS was
1214         reached because in that situation the query would fail.
1215
1216         No new tests, existing media tests cover this patch.
1217
1218         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1219         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): Member variables update.
1220         (WebCore::MediaPlayerPrivateGStreamer::load): Stop the fill timer
1221         before loading a new URL, the same player can be used for
1222         different assets.
1223         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition): Perform
1224         a duration query, the duration value is no longer locally cached.
1225         (WebCore::MediaPlayerPrivateGStreamer::duration): Return cached value only after EOS was reached.
1226         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired): Perform
1227         a duration query, the duration value is no longer locally cached.
1228         (WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable): Ditto.
1229         (WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded): Ditto.
1230         (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress): Ditto.
1231         (WebCore::MediaPlayerPrivateGStreamer::updateStates): Remove duration caching support.
1232         (WebCore::MediaPlayerPrivateGStreamer::didEnd): Ditto.
1233         (WebCore::MediaPlayerPrivateGStreamer::durationChanged): Ditto.
1234         (WebCore::MediaPlayerPrivateGStreamer::cacheDuration): Deleted.
1235         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1236
1237 2016-07-06  Manuel Rego Casasnovas  <rego@igalia.com>
1238
1239         [css-grid] Height percentages are not properly resolved for item's children
1240         https://bugs.webkit.org/show_bug.cgi?id=159258
1241
1242         Reviewed by Sergio Villar Senin.
1243
1244         When grid items are vertically stretched (default behavior)
1245         they store their height on RenderBox::overrideLogicalContentHeight().
1246         In order to resolve the percentage height on the grid item's children
1247         we need to use that size.
1248
1249         Test: fast/css-grid-layout/percent-resolution-grid-item-children.html
1250
1251         * rendering/RenderBox.cpp:
1252         (WebCore::RenderBox::computePercentageLogicalHeight):
1253
1254 2016-07-06  Zan Dobersek  <zdobersek@igalia.com>
1255
1256         [GTK] Better guard TextureMapper header and CMake includes
1257         https://bugs.webkit.org/show_bug.cgi?id=159415
1258
1259         Reviewed by Carlos Garcia Campos.
1260
1261         * PlatformGTK.cmake: Only include TextureMapper.cmake if USE_TEXTURE_MAPPER is enabled.
1262         * platform/graphics/GraphicsContext3DPrivate.h: Guard texmap header inclusions with USE(TEXTURE_MAPPER).
1263         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: Ditto, but wrap it around
1264         the existing USE(TEXTURE_MAPPER_GL) block.
1265
1266 2016-07-05  Olivier Blin  <olivier.blin@softathome.com>
1267
1268         [GStreamer] Do not build MediaPlayerPrivateGStreamerOwr when VIDEO is disabled
1269         https://bugs.webkit.org/show_bug.cgi?id=159425
1270
1271         Reviewed by Philippe Normand.
1272
1273         MediaPlayer backends are useful and can be built only when VIDEO is enabled.
1274
1275         No new tests, behavior is unchanged.
1276
1277         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
1278         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
1279
1280 2016-07-05  Per Arne Vollan  <pvollan@apple.com>
1281
1282         [Win] Layout Test http/tests/security/contentSecurityPolicy/source-list-parsing-10.html is failing
1283         https://bugs.webkit.org/show_bug.cgi?id=147646
1284
1285         Reviewed by Brent Fulgham.
1286
1287         Fix build error when CSP_NEXT is disabled.
1288
1289         * DerivedSources.cpp:
1290
1291 2016-07-05  David Kilzer  <ddkilzer@apple.com>
1292
1293         Throw exceptions for invalid number of channels for ConvolverNode
1294         <https://webkit.org/b/159238>
1295
1296         Reviewed by Brent Fulgham.
1297
1298         Fix based on a Blink change (patch by <rtoy@chromium.org>):
1299         <https://chromium.googlesource.com/chromium/src.git/+/0cc26bbb7175aec77910d0b47faf9f8c8a640fe5>
1300
1301         Also includes a related fix for ReverbConvolverStage (patch by <rtoy@chromium.org>):
1302         <https://src.chromium.org/viewvc/blink?revision=157832&view=revision>
1303
1304         Test: webaudio/convolver-channels.html
1305
1306         * Modules/webaudio/ConvolverNode.cpp:
1307         (WebCore::ConvolverNode::setBuffer): Throw an exception for
1308         anything but 1, 2 or 4 channels.
1309         * platform/audio/ReverbConvolverStage.cpp:
1310         (WebCore::ReverbConvolverStage::ReverbConvolverStage): Don't read past the end of
1311         the impulseResponse array.
1312
1313 2016-07-05  Johan K. Jensen  <jj@johanjensen.dk>
1314
1315         Web Inspector: Sending XHR with UTF8 encoded data shows garbled data in Resource sidebar
1316         https://bugs.webkit.org/show_bug.cgi?id=159358
1317
1318         Reviewed by Joseph Pecoraro.
1319
1320         Test: http/tests/inspector/network/xhr-request-data-encoded-correctly.html
1321
1322         * inspector/InspectorNetworkAgent.cpp:
1323         (WebCore::buildObjectForResourceRequest):
1324         * inspector/NetworkResourcesData.cpp:
1325         (WebCore::NetworkResourcesData::setResourceContent):
1326
1327 2016-07-05  Chris Fleizach  <cfleizach@apple.com>
1328
1329         AX: Image attachment in email does not show up in AX tree
1330         https://bugs.webkit.org/show_bug.cgi?id=159422
1331
1332         Reviewed by Joanmarie Diggs.
1333
1334         When an image loads after the accessibility tree has already been created, the ignored status
1335         of that image does not get updated.
1336
1337         Test: accessibility/image-load-on-delay.html
1338
1339         * rendering/RenderImage.cpp:
1340         (WebCore::RenderImage::imageChanged):
1341
1342 2016-07-05  Alex Christensen  <achristensen@webkit.org>
1343
1344         Fix Windows build.
1345         https://bugs.webkit.org/show_bug.cgi?id=159103
1346
1347         * Modules/indexeddb/IDBActiveDOMObject.h:
1348         (WebCore::IDBActiveDOMObject::callFunctionOnOriginThread):
1349         WTF.
1350
1351 2016-07-05  Enrica Casucci  <enrica@apple.com>
1352
1353         HTMLAttachment elements don't receive clicks after the first on iOS.
1354         https://bugs.webkit.org/show_bug.cgi?id=159310
1355         rdar://problem/25776940
1356
1357         Reviewed by Tim Horton.
1358
1359         shouldSelectOnMouseDown() now returns false on iOS.
1360
1361         * html/HTMLAttachmentElement.h:
1362
1363 2016-07-05  Brady Eidson  <beidson@apple.com>
1364
1365         IDBDatabase can null deref its ScriptExecutionContext inside connectionToServerLost.
1366         <rdar://problem/27169924> and https://bugs.webkit.org/show_bug.cgi?id=159432
1367
1368         Reviewed by Alex Christensen.
1369
1370         No new tests (Targeted test not possible, covered peripherally by all IDB tests).
1371
1372         * Modules/indexeddb/IDBActiveDOMObject.h:
1373         * Modules/indexeddb/IDBDatabase.cpp:
1374         (WebCore::IDBDatabase::connectionToServerLost): Make sure there is still a script execution context.
1375
1376 2016-07-01  Jer Noble  <jer.noble@apple.com>
1377
1378         REGRESSION (r202641): Netflix playback stalls after a few seconds
1379         https://bugs.webkit.org/show_bug.cgi?id=159365
1380
1381         Reviewed by Eric Carlson.
1382
1383         Test: LayoutTests/media/media-source/media-source-small-gap.html
1384
1385         In r202641, we removed a "fudge factor" of 1 millisecond added onto the duration
1386         of every sample for the purposes of calculating a SourceBuffer's buffered ranges.
1387         Netflix (and likely other providers) have streams that have 1 "timeScale" gaps
1388         between segments (e.g., 1/9000s, 1/3003s, etc.). Fill those gaps by looking for
1389         the previous and next samples and extending the buffered range to cover the gaps
1390         if they're short enough. We have to ensure that we correctly remove those extended
1391         durations when we remove samples from the SourceBuffer as well.
1392
1393         * Modules/mediasource/SourceBuffer.cpp:
1394         (WebCore::removeSamplesFromTrackBuffer):
1395         (WebCore::SourceBuffer::removeCodedFrames):
1396         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1397
1398 2016-07-05  Brady Eidson  <beidson@apple.com>
1399
1400         Database process crashes deleting a corrupt SQLite database file (null deref).
1401         https://bugs.webkit.org/show_bug.cgi?id=155506.
1402
1403         Reviewed by Alex Christensen.
1404
1405         Covered by new API test.
1406
1407         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1408         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore): Null check.
1409
1410 2016-07-05  Brady Eidson  <beidson@apple.com>
1411
1412         TransactionOperations can get destroyed on the wrong thread.
1413         https://bugs.webkit.org/show_bug.cgi?id=159103
1414
1415         Reviewed by Alex Christensen.
1416
1417         No new tests (Very racy, not feasible to write a dedicated test for, caught on bots occasionally as-is).
1418
1419         * Modules/indexeddb/IDBActiveDOMObject.h:
1420         (WebCore::IDBActiveDOMObject::callFunctionOnOriginThread):
1421         
1422         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
1423         (WebCore::IDBClient::IDBConnectionProxy::completeOperation): Pass the last ref to the operation to its
1424           origin thread to be deleted there.
1425         
1426         * Modules/indexeddb/client/TransactionOperation.h:
1427         (WebCore::IDBClient::TransactionOperation::performCompleteOnOriginThread):
1428
1429 2016-07-05  Youenn Fablet  <youenn@apple.com>
1430
1431         Remove CredentialRequest ResourceLoaderOptions
1432         https://bugs.webkit.org/show_bug.cgi?id=159404
1433
1434         Reviewed by Sam Weinig.
1435
1436         No observable change of behavior.
1437         Removing CredentialRequest from ResourceLoaderOptions and replacing it by FetchOptions::Credentials.
1438         As per https://fetch.spec.whatwg.org/#http-fetch, credentials flag is set according FetchOptions::Credentials.
1439
1440         * loader/DocumentLoader.cpp:
1441         (WebCore::DocumentLoader::startLoadingMainResource): Set credentials mode to Include.
1442         * loader/DocumentThreadableLoader.cpp:
1443         (WebCore::DocumentThreadableLoader::redirectReceived): Disable credentials if credentials mode is SameOrigin
1444         (request being cross origin).
1445         * loader/MediaResourceLoader.cpp: Refqctoring to use CachedResourceReauest::setAsPotentiallyCrossOrigin.
1446         Removed unnecessary ResourceRequest copy by using the mutable request of CachedResourceRequest.
1447         (WebCore::MediaResourceLoader::requestResource):
1448         * loader/NetscapePlugInStreamLoader.cpp:
1449         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Set credential mode  to Include
1450         * loader/ResourceLoaderOptions.h: Removing CredentialRequest option.
1451         (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
1452         (WebCore::ResourceLoaderOptions::credentialRequest): Deleted.
1453         (WebCore::ResourceLoaderOptions::setCredentialRequest): Deleted.
1454         * loader/cache/CachedResourceLoader.cpp:
1455         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Set credential mode to Include.
1456         (WebCore::CachedResourceLoader::defaultCachedResourceOptions): Ditto.
1457         * loader/cache/CachedResourceRequest.cpp:
1458         (WebCore::CachedResourceRequest::setAsPotentiallyCrossOrigin): Set credential mode according crossorigin
1459         atribute value.
1460         * loader/icon/IconLoader.cpp:
1461         (WebCore::IconLoader::startLoading): Set credential mode to Omit.
1462         * page/EventSource.cpp:
1463         (WebCore::EventSource::connect): Set credential mode according crossorigin atribute value.
1464         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
1465         (WebCore::WebCoreAVCFResourceLoader::startLoading): Set credential mode to Omit.
1466         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1467         (WebCore::WebCoreAVFResourceLoader::startLoading): Ditto.
1468         * platform/network/ResourceHandleTypes.h: Removed definition of CredentialRequest.
1469         * xml/XMLHttpRequest.cpp:
1470         (WebCore::XMLHttpRequest::createRequest): Set credential mode according crossorigin atribute value.
1471
1472 2016-07-04  Fujii Hironori  <Hironori.Fujii@sony.com>
1473
1474         [GTK] Null Node dereference in FrameSelection::notifyAccessibilityForSelectionChange of FrameSelectionAtk.cpp
1475         https://bugs.webkit.org/show_bug.cgi?id=159411
1476
1477         Reviewed by Carlos Garcia Campos.
1478
1479         Tests:
1480             editing/selection/selection-in-iframe-removed-crash.html
1481
1482         * editing/atk/FrameSelectionAtk.cpp:
1483         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
1484         Added a null check for the return value of containerNode().
1485
1486 2016-07-04  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1487
1488         [EFL] Remove mac configuration dependency in WebKit Version definition
1489         https://bugs.webkit.org/show_bug.cgi?id=159407
1490
1491         Reviewed by Yusuke Suzuki.
1492
1493         EFL port has been used Version.xconfig file in WebKit/mac/Configurations
1494         in order to generate WebKitVersion.h file. But it can be simply defined
1495         in cmake.
1496
1497         * PlatformEfl.cmake: Remove WebKitVersion.h generation.
1498         * platform/efl/UserAgentEfl.cpp:
1499         (WebCore::versionForUAString): Use USER_AGENT_EFL_MAJOR_VERSION and USER_AGENT_EFL_MINOR_VERSION.
1500
1501 2016-07-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1502
1503         [Coordinated Graphics] Modernize and cleanup CompositingCoordinator
1504         https://bugs.webkit.org/show_bug.cgi?id=159212
1505
1506         Reviewed by Žan Doberšek.
1507
1508         Use references instead of pointers when possible.
1509
1510         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1511         (WebCore::CoordinatedGraphicsLayer::paintToSurface):
1512         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1513         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
1514         (WebCore::CoordinatedImageBacking::update):
1515         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
1516         * platform/graphics/texmap/coordinated/CoordinatedSurface.h:
1517         * platform/graphics/texmap/coordinated/Tile.cpp:
1518         (WebCore::Tile::updateBackBuffer):
1519         * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h:
1520
1521 2016-07-04  Youenn Fablet  <youenn@apple.com>
1522
1523         Remove RequestOriginPolicy from ResourceLoaderOptions
1524         https://bugs.webkit.org/show_bug.cgi?id=159406
1525
1526         Reviewed by Sam Weinig.
1527
1528         Using FetchOptions::mode in lieu of ResourceLoaderOptions::RequestOriginPolicy.
1529         The cors, no-cors and same-origin values match PotentiallyCrossOriginEnabled,
1530         UseDefaultOriginRestrictionsForType and RestrictToSameOrigin, default being
1531         cors/UseDefaultOriginRestrictionsForType as per fetch specification.
1532
1533         No change of behavior.
1534
1535         * css/CSSImageSetValue.cpp:
1536         (WebCore::CSSImageSetValue::cachedImageSet):
1537         * css/CSSImageValue.cpp:
1538         (WebCore::CSSImageValue::cachedImage):
1539         * loader/DocumentLoader.cpp:
1540         (WebCore::DocumentLoader::startLoadingMainResource):
1541         * loader/MediaResourceLoader.cpp:
1542         (WebCore::MediaResourceLoader::requestResource):
1543         * loader/NetscapePlugInStreamLoader.cpp:
1544         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
1545         * loader/ResourceLoaderOptions.h:
1546         (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
1547         (WebCore::ResourceLoaderOptions::requestOriginPolicy): Deleted.
1548         (WebCore::ResourceLoaderOptions::setRequestOriginPolicy): Deleted.
1549         * loader/SubresourceLoader.cpp:
1550         (WebCore::SubresourceLoader::init):
1551         (WebCore::SubresourceLoader::willSendRequestInternal):
1552         * loader/cache/CachedResourceLoader.cpp:
1553         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1554         (WebCore::CachedResourceLoader::canRequest):
1555         (WebCore::CachedResourceLoader::defaultCachedResourceOptions):
1556         * loader/cache/CachedResourceRequest.cpp:
1557         (WebCore::CachedResourceRequest::setAsPotentiallyCrossOrigin):
1558         * loader/icon/IconLoader.cpp:
1559         (WebCore::IconLoader::startLoading):
1560         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
1561         (WebCore::WebCoreAVCFResourceLoader::startLoading):
1562         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1563         (WebCore::WebCoreAVFResourceLoader::startLoading):
1564         * style/StylePendingResources.cpp:
1565         (WebCore::Style::loadPendingImage):
1566
1567 2016-07-04  Youenn Fablet  <youenn@apple.com>
1568
1569         Shield WebRTC JS built-ins from user scripts
1570         https://bugs.webkit.org/show_bug.cgi?id=155964
1571
1572         Reviewed by Sam Weinig.
1573
1574         Making use of Promise.prototype.@then instead of Promise.prototype.then.
1575         Covered by updated tests.
1576
1577         * Modules/mediastream/RTCPeerConnection.js:
1578         (createOffer):
1579         (createAnswer):
1580         (setLocalDescription):
1581         (setRemoteDescription):
1582         (addIceCandidate):
1583         (getStats):
1584         * Modules/mediastream/RTCPeerConnectionInternals.js:
1585         (enqueueOperation):
1586
1587 2016-07-04  Brady Eidson  <beidson@apple.com>
1588
1589         WebProcesses don't handle DatabaseProcess going away uncleanly..
1590         https://bugs.webkit.org/show_bug.cgi?id=159371
1591
1592         Reviewed by Alex Christensen.
1593
1594         Covered by new API test.
1595
1596         * Modules/indexeddb/IDBDatabase.cpp:
1597         (WebCore::IDBDatabase::didCloseFromServer):
1598         (WebCore::IDBDatabase::connectionToServerLost):
1599         * Modules/indexeddb/IDBDatabase.h:
1600         
1601         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
1602         (WebCore::IDBClient::IDBConnectionProxy::connectionToServerLost): Notify all IDBDatabase
1603           connections, as well as all pending IDBOpenDBRequests, with the error about the
1604           server connection dropping.
1605         * Modules/indexeddb/client/IDBConnectionProxy.h:
1606         
1607         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1608         (WebCore::IDBClient::IDBConnectionToServer::connectionToServerLost):
1609         * Modules/indexeddb/client/IDBConnectionToServer.h:
1610         
1611         * Modules/indexeddb/shared/IDBError.h:
1612
1613 2016-07-04  Philippe Normand  <pnormand@igalia.com>
1614
1615         Release build with logging enabled fails
1616         https://bugs.webkit.org/show_bug.cgi?id=159403
1617
1618         Reviewed by Žan Doberšek.
1619
1620         Protect logging-related methods with !LOG_DISABLED.
1621
1622         * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
1623         * Modules/indexeddb/IDBDatabaseIdentifier.h:
1624         * Modules/indexeddb/IDBKey.cpp:
1625         * Modules/indexeddb/IDBKey.h:
1626         * Modules/indexeddb/IDBKeyData.cpp:
1627         * Modules/indexeddb/IDBKeyData.h:
1628         * Modules/indexeddb/IDBKeyPath.cpp:
1629         (WebCore::IDBKeyPath::IDBKeyPath):
1630         * Modules/indexeddb/IDBKeyRangeData.cpp:
1631         * Modules/indexeddb/IDBKeyRangeData.h:
1632         * Modules/indexeddb/server/IndexValueEntry.cpp:
1633         (WebCore::IDBServer::IndexValueEntry::Iterator::isValid):
1634         * Modules/indexeddb/server/IndexValueStore.cpp:
1635         * Modules/indexeddb/server/IndexValueStore.h:
1636         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1637         (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
1638         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1639         (WebCore::IDBServer::UniqueIDBDatabase::isVersionChangeInProgress):
1640         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
1641         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
1642         * Modules/indexeddb/shared/IDBIndexInfo.cpp:
1643         * Modules/indexeddb/shared/IDBIndexInfo.h:
1644         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
1645         * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
1646         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
1647         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
1648         * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
1649         * Modules/indexeddb/shared/IDBTransactionInfo.h:
1650         * page/SecurityOriginData.cpp:
1651         * page/SecurityOriginData.h:
1652
1653 2016-07-04  Commit Queue  <commit-queue@webkit.org>
1654
1655         Unreviewed, rolling out r202556.
1656         https://bugs.webkit.org/show_bug.cgi?id=159399
1657
1658         introduces deadlocks (Requested by philn on #webkit).
1659
1660         Reverted changeset:
1661
1662         "[GStreamer] improved duration query support in the HTTP
1663         source element"
1664         https://bugs.webkit.org/show_bug.cgi?id=159204
1665         http://trac.webkit.org/changeset/202556
1666
1667 2016-07-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1668
1669         [image-decoders] Make ImageDecoder::size() lazily decode the image if needed to return a valid size
1670         https://bugs.webkit.org/show_bug.cgi?id=159297
1671
1672         Reviewed by Antonio Gomes.
1673
1674         It's otherwise confusing leading to bugs like #159089.
1675
1676         * platform/image-decoders/ImageDecoder.cpp:
1677         (WebCore::ImageDecoder::createFrameImageAtIndex): Check the size at the beginning and return early if it's
1678         empty. We no longer need to check the size after calling frameBufferAtIndex().
1679         * platform/image-decoders/ImageDecoder.h:
1680         (WebCore::ImageDecoder::size): Check first is size is available, which lazily decodes the image.
1681         (WebCore::ImageDecoder::scaledSize): Remove const.
1682         (WebCore::ImageDecoder::frameSizeAtIndex): Ditto.
1683         * platform/image-decoders/ico/ICOImageDecoder.cpp:
1684         (WebCore::ICOImageDecoder::size): Ditto.
1685         (WebCore::ICOImageDecoder::frameSizeAtIndex): Ditto.
1686         * platform/image-decoders/ico/ICOImageDecoder.h:
1687
1688 2016-07-02  Youenn Fablet  <youenn@apple.com>
1689
1690         Synchronous preflight checker should set loading options to not use credentials
1691         https://bugs.webkit.org/show_bug.cgi?id=159351
1692
1693         Reviewed by Alex Christensen.
1694
1695         Like for asynchronous preflighting, synchronous preflighting loading options should disqble any credentials.
1696
1697         No change of behavior as preflight request is expressly set to not use credentials in
1698         createAccessControlPreflightRequest.
1699
1700         * loader/CrossOriginPreflightChecker.cpp:
1701         (WebCore::CrossOriginPreflightChecker::doPreflight):
1702
1703 2016-07-01  Commit Queue  <commit-queue@webkit.org>
1704
1705         Unreviewed, rolling out r202766.
1706         https://bugs.webkit.org/show_bug.cgi?id=159382
1707
1708         The new test asserts every time (Requested by ap on #webkit).
1709
1710         Reverted changeset:
1711
1712         "Web Inspector: Sending XHR with UTF8 encoded data shows
1713         garbled data in Resource sidebar"
1714         https://bugs.webkit.org/show_bug.cgi?id=159358
1715         http://trac.webkit.org/changeset/202766
1716
1717 2016-07-01  Zalan Bujtas  <zalan@apple.com>
1718
1719         prepareForDestruction() always needs to be called before destroying the Document object.
1720         https://bugs.webkit.org/show_bug.cgi?id=159372
1721         rdar://problem/26788150
1722
1723         Reviewed by Antti Koivisto.
1724
1725         We should never start destroying the Document object without calling prepareForDestruction() first.
1726         It ensures that render tree gets nuked before we start tearing down the node tree.
1727
1728         Test: fast/history/page-cache-destroy-document.html
1729
1730         * dom/Document.cpp:
1731         (WebCore::Document::removedLastRef):
1732
1733 2016-07-01  Johan K. Jensen  <jj@johanjensen.dk>
1734
1735         Web Inspector: Sending XHR with UTF8 encoded data shows garbled data in Resource sidebar
1736         https://bugs.webkit.org/show_bug.cgi?id=159358
1737
1738         Reviewed by Joseph Pecoraro.
1739
1740         Test: http/tests/inspector/network/xhr-request-data-encoded-correctly.html
1741
1742         * inspector/InspectorNetworkAgent.cpp:
1743         (WebCore::buildObjectForResourceRequest):
1744
1745 2016-07-01  Dean Jackson  <dino@apple.com>
1746
1747         "image-src" support is missing. We only support "-webkit-image-src"
1748         https://bugs.webkit.org/show_bug.cgi?id=159373
1749         <rdar://problem/27140443>
1750
1751         Patch by Brent Fulgham and Dean Jackson.
1752         Reviewed by Dean Jackson and Brent Fulgham.
1753
1754         Support unprefixed image-set.
1755
1756         Test: fast/css/image-set-unprefixed.html
1757
1758         * css/CSSImageSetValue.cpp:
1759         (WebCore::CSSImageSetValue::customCSSText):
1760         * css/CSSParser.cpp:
1761         (WebCore::isImageSetFunctionValue): New helper function
1762         that checks prefixed and unprefixed form.
1763         (WebCore::CSSParser::parseValue): Use the helper.
1764         (WebCore::CSSParser::parseContent):
1765         (WebCore::CSSParser::parseFillImage):
1766         (WebCore::CSSParser::parseBorderImage):
1767
1768 2016-07-01  Chris Dumez  <cdumez@apple.com>
1769
1770         Possible null Range dereference under AXObjectCache::visiblePositionFromCharacterOffset()
1771         https://bugs.webkit.org/show_bug.cgi?id=159330
1772         <rdar://problem/27123752>
1773
1774         Reviewed by Benjamin Poulain.
1775
1776         rangeForUnorderedCharacterOffsets() can return a null Range but we failed
1777         to do a null check before dereferencing it.
1778
1779         * accessibility/AXObjectCache.cpp:
1780         (WebCore::AXObjectCache::visiblePositionFromCharacterOffset):
1781
1782 2016-07-01  Chris Dumez  <cdumez@apple.com>
1783
1784         Regression(r199087): window.focus() / window.close() can no longer be called by a Window's opener
1785         https://bugs.webkit.org/show_bug.cgi?id=159364
1786         <rdar://problem/27117169>
1787
1788         Reviewed by Gavin Barraclough.
1789
1790         window.focus() / window.close() could no longer be called by a Window's opener
1791         after r199087, which would break focusing of open iWork documents on icloud.com.
1792
1793         Before r199087, we would construct a new function in the caller's context every
1794         time window.focus and window.close was accessed. r199087 fixed the issue so that
1795         we always call the same function. However, those functions are using
1796         [CallWith=Document] and they are were no longer passed the *caller*'s document
1797         as a result. This broke focus / close permission checking as the code needed the
1798         caller's document to do the check.
1799
1800         This patch introduces [CallWith=CallerDocument] and [CallWith=CallerWindow] so
1801         that the implementation can now pass the caller's Document / Window to the
1802         implementation. The bindings rely on JSDOMWindow's callerDOMWindow() to get the
1803         caller DOMWindow / document. This new functionality is now used for window.close
1804         and window.focus to unbreak their permission checking.
1805
1806         Test: fast/dom/Window/child-window-focus.html
1807
1808         * bindings/scripts/CodeGeneratorJS.pm:
1809         (GenerateCallWith):
1810         * bindings/scripts/IDLAttributes.txt:
1811         * page/DOMWindow.cpp:
1812         (WebCore::DOMWindow::focus):
1813         * page/DOMWindow.h:
1814         * page/DOMWindow.idl:
1815
1816 2016-07-01  Chris Dumez  <cdumez@apple.com>
1817
1818         [iOS] Possible null Range dereference under computeAutocorrectionContext()
1819         https://bugs.webkit.org/show_bug.cgi?id=159328
1820         <rdar://problem/26766720>
1821
1822         Reviewed by Benjamin Poulain.
1823
1824         * editing/Editor.cpp:
1825         (WebCore::Editor::compositionRange):
1826         * editing/Editor.h:
1827         Update to return a RefPtr instead of a PassRefPtr and use nullptr
1828         instead of 0 in the implementation.
1829
1830 2016-07-01  Jon Davis  <jond@apple.com>
1831
1832         Updated Picture element and WOFF 2 status
1833         https://bugs.webkit.org/show_bug.cgi?id=159356
1834
1835         Reviewed by Timothy Hatcher.
1836         
1837         Status updates and clean-up to move Web Animations and Resource Timing entries from JSC to WebCore.
1838
1839         * features.json:
1840
1841 2016-07-01  Andreas Kling  <akling@apple.com>
1842
1843         Add early return when processing content extensions if there aren't any.
1844         <https://webkit.org/b/159363>
1845
1846         Reviewed by Antti Koivisto.
1847
1848         Short-circuit outta there if there aren't any extensions to query.
1849
1850         * contentextensions/ContentExtensionsBackend.cpp:
1851         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
1852
1853 2016-07-01  Eric Carlson  <eric.carlson@apple.com>
1854
1855         HTMLMediaElement::resume() may cause JavaScript execution
1856         https://bugs.webkit.org/show_bug.cgi?id=159327
1857         <rdar://problem/27131641>
1858
1859         Reviewed by Jer Noble.
1860
1861         HTMLMediaElement::updatePlayState can cause an element to begin playing and enter fullscreen,
1862         which can result in a call to the media controls and JavaScript execution. Javascript is not
1863         allowed allowed to run when a page resumes, so make the call to updatePlayState asynchronous.
1864
1865         No new tests, I wasn't able to create a test that triggers the crash.
1866
1867         * html/HTMLMediaElement.cpp:
1868         (WebCore::HTMLMediaElement::scheduleDelayedAction): Support UpdatePlayState.
1869         (WebCore::HTMLMediaElement::pendingActionTimerFired): Ditto.
1870         (WebCore::HTMLMediaElement::setReadyState): UpdateMediaState -> UpdateState.
1871         (WebCore::HTMLMediaElement::playInternal): Don't call updateMediaController, it is called
1872           by updatePlayState.
1873         (WebCore::HTMLMediaElement::setMuted): UpdateMediaState -> UpdateState.
1874         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Ditto.
1875         (WebCore::HTMLMediaElement::mediaEngineWasUpdated): Update media state asynchronously.
1876         (WebCore::HTMLMediaElement::updatePlayState): Add parameter to allow update to happen
1877           asynchronously.
1878         (WebCore::HTMLMediaElement::setPlaying): UpdateMediaState -> UpdateState.
1879         (WebCore::HTMLMediaElement::setPausedInternal): Update media state asynchronously.
1880         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):  
1881           UpdateMediaState -> UpdateState.
1882         (WebCore::HTMLMediaElement::removeEventListener): Ditto.
1883         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Ditto.
1884         (WebCore::HTMLMediaElement::updateMediaState): UpdateMediaState -> UpdateState
1885         * html/HTMLMediaElement.h:
1886         * html/HTMLMediaElementEnums.h: Add UpdatePlayState.
1887
1888 2016-07-01  Brady Eidson  <beidson@apple.com>
1889
1890         Blob content type not preserved when retrieving blobs from IndexedDB.
1891         <rdar://problem/27057357> and https://bugs.webkit.org/show_bug.cgi?id=159360
1892
1893         Reviewed by Alex Christensen.
1894
1895         Test: storage/indexeddb/modern/blob-svg-image.html
1896
1897         * fileapi/Blob.cpp:
1898         (WebCore::Blob::Blob):
1899
1900         * fileapi/ThreadableBlobRegistry.cpp:
1901         (WebCore::postToMainThread):
1902         (WebCore::ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked): Pass along the content type
1903           to the blob registry so that if the file-backed blob takes over, it has the content type.
1904         (WebCore::threadableQueue): Deleted.
1905         * fileapi/ThreadableBlobRegistry.h:
1906
1907         * platform/network/BlobRegistry.h:
1908
1909         * platform/network/BlobRegistryImpl.cpp:
1910         (WebCore::BlobRegistryImpl::registerBlobURL):
1911         (WebCore::BlobRegistryImpl::registerBlobURLOptionallyFileBacked):
1912         * platform/network/BlobRegistryImpl.h:
1913
1914 2016-07-01  Youenn Fablet  <youenn@apple.com>
1915
1916         Make ResourceLoaderOptions derive from FetchOptions
1917         https://bugs.webkit.org/show_bug.cgi?id=159345
1918
1919         Reviewed by Alex Christensen.
1920
1921         No change of behavior.
1922
1923         * Modules/fetch/FetchLoader.cpp:
1924         (WebCore::FetchLoader::start):
1925         * loader/CrossOriginPreflightChecker.cpp:
1926         (WebCore::CrossOriginPreflightChecker::startPreflight):
1927         * loader/ResourceLoaderOptions.h:
1928         (WebCore::ResourceLoaderOptions::fetchOptions): Deleted.
1929         (WebCore::ResourceLoaderOptions::setFetchOptions): Deleted.
1930         * loader/SubresourceLoader.cpp:
1931         (WebCore::SubresourceLoader::willSendRequestInternal):
1932         * loader/ThreadableLoader.h: Removing securityOrigin field (left over from https://bugs.webkit.org/show_bug.cgi?id=159221)
1933
1934 2016-07-01  Per Arne Vollan  <pvollan@apple.com>
1935
1936         [Win] Animations tests are crashing in debug mode.
1937         https://bugs.webkit.org/show_bug.cgi?id=159335
1938
1939         Reviewed by Alex Christensen.
1940
1941         A MSVC runtime check fails because an uninitialized variable is being used.
1942
1943         * css/StyleResolver.cpp:
1944         (WebCore::StyleResolver::keyframeStylesForAnimation):
1945
1946 2016-07-01  Youenn Fablet  <youennf@gmail.com>
1947
1948         Add a runtime flag for DOM iterators
1949         https://bugs.webkit.org/show_bug.cgi?id=159300
1950
1951         Reviewed by Alex Christensen.
1952
1953         * Modules/fetch/FetchHeaders.idl: Making iterator runtime-enabled.
1954         * bindings/generic/RuntimeEnabledFeatures.h:
1955         (WebCore::RuntimeEnabledFeatures::setDOMIteratorEnabled):
1956         (WebCore::RuntimeEnabledFeatures::domIteratorEnabled):
1957         * bindings/scripts/CodeGeneratorJS.pm:
1958         (ToMethodName): Fixing dOM -> dom casing issue.
1959         (GenerateImplementation): Using addIterableProperties new method.
1960         (addIterableProperties): Activating property addition according runtime flag if iterator is rnutime flagged.
1961         * bindings/scripts/IDLParser.pm:
1962         (parseOptionalIterableInterface): Adding extendedAttributes to iterable.
1963         * bindings/scripts/test/JS/JSTestNode.cpp:
1964         (WebCore::JSTestNodePrototype::finishCreation):
1965         * bindings/scripts/test/JS/JSTestObj.cpp:
1966         (WebCore::JSTestObjPrototype::finishCreation):
1967         * bindings/scripts/test/TestNode.idl: Making iterator runtime-enabled.
1968         * bindings/scripts/test/TestObj.idl: Ditto.
1969         * css/FontFaceSet.idl: Ditto.
1970         * dom/NodeList.idl: Ditto.
1971
1972 2016-07-01  Frederic Wang  <fwang.igalia.com>
1973
1974         Eliminate trailing whitespace in MathML code
1975         https://bugs.webkit.org/show_bug.cgi?id=159091
1976
1977         Reviewed by Alex Christensen.
1978
1979         No new tests, behavior is unchanged.
1980
1981         * rendering/mathml/RenderMathMLBlock.cpp:
1982         (WebCore::RenderMathMLBlock::baselinePosition):
1983         (WebCore::RenderMathMLBlock::paint):
1984         (WebCore::parseMathMLNamedSpace):
1985         * rendering/mathml/RenderMathMLBlock.h:
1986         * rendering/mathml/RenderMathMLFenced.cpp:
1987         (WebCore::RenderMathMLFenced::updateFromElement):
1988         (WebCore::RenderMathMLFenced::addChild):
1989         * rendering/mathml/RenderMathMLFenced.h:
1990         * rendering/mathml/RenderMathMLFraction.cpp:
1991         (WebCore::RenderMathMLFraction::styleDidChange):
1992         (WebCore::RenderMathMLFraction::paint):
1993         * rendering/mathml/RenderMathMLFraction.h:
1994         * rendering/mathml/RenderMathMLMath.h:
1995         * rendering/mathml/RenderMathMLMenclose.h:
1996         * rendering/mathml/RenderMathMLOperator.cpp:
1997         * rendering/mathml/RenderMathMLOperator.h:
1998         * rendering/mathml/RenderMathMLRoot.cpp:
1999         (WebCore::RenderMathMLRoot::paint):
2000         * rendering/mathml/RenderMathMLScripts.cpp:
2001         * rendering/mathml/RenderMathMLSpace.cpp:
2002         * rendering/mathml/RenderMathMLSpace.h:
2003         * rendering/mathml/RenderMathMLToken.h:
2004         * rendering/mathml/RenderMathMLUnderOver.cpp:
2005         * rendering/mathml/RenderMathMLUnderOver.h:
2006
2007 2016-07-01  Frederic Wang  <fwang@igalia.com>
2008
2009         Small cleanup: Remove unused functions RenderObject::isRenderMathML*Wrapper
2010         https://bugs.webkit.org/show_bug.cgi?id=159333
2011
2012         Reviewed by Alex Christensen.
2013
2014         After the refactoring of RenderMathMLRoot and RenderMathMLScripts, the anonymous flexbox
2015         wrappers used in the old layout implementation have been removed. We thus remove the
2016         corresponding isRender* function from RenderObject.
2017
2018         No new tests, behavior is unchanged.
2019
2020         * rendering/RenderObject.h:
2021         (WebCore::RenderObject::isRenderMathMLRootWrapper): Deleted.
2022         (WebCore::RenderObject::isRenderMathMLScriptsWrapper): Deleted.
2023
2024 2016-07-01  Andreas Kling  <akling@apple.com>
2025
2026         [Mac] Get rid of the old timey rubber-banding linen pattern.
2027         <https://webkit.org/b/159329>
2028
2029         Reviewed by Benjamin Poulain.
2030
2031         Remove the "ScrollingOverhang" custom GraphicsLayer appearance since that was only used to
2032         install the old timey linen pattern behind the web content.
2033
2034         We now always just set the overhang area's background color to the document background color.
2035
2036         This fixes an issue where we could end up loading the linen pattern and keeping it in memory
2037         despite never actually showing it on screen.
2038
2039         * platform/ScrollbarTheme.h:
2040         (WebCore::ScrollbarTheme::setUpOverhangAreasLayerContents): Deleted.
2041         * platform/graphics/GraphicsLayer.cpp:
2042         * platform/graphics/GraphicsLayer.h:
2043         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2044         (PlatformCALayerCocoa::updateCustomAppearance):
2045         * platform/mac/ScrollbarThemeMac.h:
2046         * platform/mac/ScrollbarThemeMac.mm:
2047         (WebCore::linenBackgroundColor): Deleted.
2048         (WebCore::ScrollbarThemeMac::setUpOverhangAreaBackground): Deleted.
2049         (WebCore::ScrollbarThemeMac::removeOverhangAreaBackground): Deleted.
2050         (WebCore::ScrollbarThemeMac::setUpOverhangAreasLayerContents): Deleted.
2051         * rendering/RenderLayerCompositor.cpp:
2052         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2053         (WebCore::RenderLayerCompositor::setRootExtendedBackgroundColor):
2054
2055 2016-06-30  Jiewen Tan  <jiewen_tan@apple.com>
2056
2057         Create a generic "linked-on-or-after" check for new CSP Rules
2058         https://bugs.webkit.org/show_bug.cgi?id=159322
2059         <rdar://problem/27117220>
2060
2061         Reviewed by Brent Fulgham.
2062
2063         Create a generic "linked-on-or-after" check for new CSP Rules and cleanup
2064         quirks for Ecobee, Quora and XtraMat.
2065
2066         * platform/RuntimeApplicationChecks.h:
2067         * platform/RuntimeApplicationChecks.mm:
2068         (WebCore::IOSApplication::isEcobee): Deleted.
2069         (WebCore::IOSApplication::isQuora): Deleted.
2070         (WebCore::IOSApplication::isXtraMath): Deleted.
2071
2072 2016-06-30  Antti Koivisto  <antti@apple.com>
2073
2074         WebContent crash due to RELEASE_ASSERT(!m_inLoadPendingImages) in StyleResolver::~StyleResolver()
2075         https://bugs.webkit.org/show_bug.cgi?id=159307
2076         <rdar://problem/26184868>
2077
2078         Reviewed by Andreas Kling.
2079
2080         Pseudo elements are resolved in RenderTreeUpdater (instead of Style::TreeResolver). Their resolution may trigger
2081         resource loads which can cause synchronous layout (when failing synchronously) and lead to destruction of the
2082         the style resolver in post layout task.
2083
2084         No known reliable way to test this.
2085
2086         * style/RenderTreeUpdater.cpp:
2087         (WebCore::RenderTreeUpdater::commit):
2088
2089             Use PostResolutionCallbackDisabler in RenderTreeUpdater similarly to Style::TreeResolver. This prevents
2090             post layout tasks from running synchronously and closes this particular crash path.
2091
2092 2016-06-30  Antoine Quint  <graouts@apple.com>
2093
2094         Drawing an SVG image into a <canvas> that is not in the DOM draws the wrong region
2095         https://bugs.webkit.org/show_bug.cgi?id=159276
2096
2097         Reviewed by Dean Jackson.
2098
2099         In the event where the <img> element that we are passing to CanvasRenderingContext2D.drawImage()
2100         points to an SVG resource, we ensure that the container for the SVG image is sized to match the
2101         HTML element. The necessity for setting this container size, explained in webkit.org/b/148845,
2102         is that we must ensure a cached image does not have an outdated container size.
2103
2104         Tests: svg/as-image/img-with-svg-resource-in-dom-and-drawImage.html
2105                svg/as-image/img-with-svg-resource-in-dom-no-size-and-drawImage.html
2106                svg/as-image/img-with-svg-resource-not-in-dom-and-drawImage.html
2107                svg/as-image/img-with-svg-resource-not-in-dom-no-size-and-drawImage.html
2108
2109         * html/canvas/CanvasRenderingContext2D.cpp:
2110         (WebCore::CanvasRenderingContext2D::drawImage):
2111
2112 2016-06-30  Eric Carlson  <eric.carlson@apple.com>
2113
2114         getUserMedia() exposed, but not functional
2115         https://bugs.webkit.org/show_bug.cgi?id=158393
2116         <rdar://problem/26642259>
2117
2118         Reviewed by Dean Jackson.
2119         
2120         Set default value of the Media Stream runtime flag to false on Mac OS X and iOS until the
2121         browser support is in place.
2122
2123         * bindings/generic/RuntimeEnabledFeatures.cpp:
2124         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures): Disable media stream by default
2125         on Mac OS X and iOS.
2126         * bindings/generic/RuntimeEnabledFeatures.h:
2127
2128 2016-06-30  Commit Queue  <commit-queue@webkit.org>
2129
2130         Unreviewed, rolling out r202676.
2131         https://bugs.webkit.org/show_bug.cgi?id=159314
2132
2133         This change caused storage/websql tests to crash on Mac and
2134         iOS WK1 (Requested by ryanhaddad on #webkit).
2135
2136         Reverted changeset:
2137
2138         "Purge PassRefPtr in Modules/webdatabase"
2139         https://bugs.webkit.org/show_bug.cgi?id=159255
2140         http://trac.webkit.org/changeset/202676
2141
2142 2016-06-30  Antoine Quint  <graouts@apple.com>
2143
2144         [iOS] Media controls are too cramped with small video
2145         https://bugs.webkit.org/show_bug.cgi?id=158815
2146         <rdar://problem/26824238>
2147
2148         Reviewed by Eric Carlson.
2149
2150         In updateLayoutForDisplayedWidth(), we try to ensure a minimum width is guaranteed
2151         for the progress indicator. However, we were not accounting for the width used by
2152         the current and remaining time labels on either side of it, so we would incorrectly
2153         conclude that we were guaranteeing the minimum time and yield incorrect layouts since
2154         we were trying to fit more buttons than we had room for.
2155
2156         In order to correctly compute the available width for the progress indicator, we now
2157         have clones of the current and remaining time labels, hidden from video and VoiceOver,
2158         that we update along with the originals. The same styles apply to both clones and
2159         originals, so we may measure the clones to determine the space used by the time labels.
2160         The reason we need to use clones is that if the time labels had previously been hidden
2161         from view, precisely because there was not enough space to display them along with the
2162         progress indicator, then trying to obtain metrics from them would yield 0 since they had
2163         "display: none" styles applied. In order to avoid extra layouts and possible flashing, we
2164         use the clones so that we never have to toggle the "display" property of the originals
2165         just to obtain their measurements.
2166
2167         As a result of this change, we adjust the constant used to set the minimum required
2168         width available to display the progress indicator after all other essential controls
2169         and labels have been measured. That constant used to account for the width of the
2170         time labels, and this is no longer correct.
2171
2172         Test: media/video-controls-drop-and-restore-timeline.html
2173
2174         * Modules/mediacontrols/mediaControlsApple.css:
2175         (::-webkit-media-controls-time-remaining-display.clone):
2176         * Modules/mediacontrols/mediaControlsApple.js:
2177         (Controller):
2178         (Controller.prototype.createTimeClones):
2179         (Controller.prototype.removeTimeClass):
2180         (Controller.prototype.addTimeClass):
2181         (Controller.prototype.updateDuration):
2182         (Controller.prototype.updateLayoutForDisplayedWidth):
2183         (Controller.prototype.updateTime):
2184         (Controller.prototype.updateControlsWhileScrubbing):
2185         * Modules/mediacontrols/mediaControlsiOS.css:
2186         (::-webkit-media-controls-time-remaining-display.clone):
2187         * Modules/mediacontrols/mediaControlsiOS.js:
2188
2189 2016-06-30  Brian Burg  <bburg@apple.com>
2190
2191         Unreviewed, fix the macOS Sierra Release configuration after r202642.
2192
2193         * platform/audio/mac/MediaSessionManagerMac.mm:
2194         (WebCore::MediaSessionManagerMac::updateNowPlayingInfo):
2195         Add missing UNUSED_PARAM for when logging is not enabled.
2196
2197 2016-06-30  Commit Queue  <commit-queue@webkit.org>
2198
2199         Unreviewed, rolling out r202679.
2200         https://bugs.webkit.org/show_bug.cgi?id=159302
2201
2202         Still causing timeouts on media/controls-drag-timebar.html
2203         (Requested by ap on #webkit).
2204
2205         Reverted changeset:
2206
2207         "[iOS] Media controls are too cramped with small video"
2208         https://bugs.webkit.org/show_bug.cgi?id=158815
2209         http://trac.webkit.org/changeset/202679
2210
2211 2016-06-30  Antoine Quint  <graouts@apple.com>
2212
2213         [iOS] Media controls are too cramped with small video
2214         https://bugs.webkit.org/show_bug.cgi?id=158815
2215         <rdar://problem/26824238>
2216
2217         Reviewed by Eric Carlson.
2218
2219         In updateLayoutForDisplayedWidth(), we try to ensure a minimum width is guaranteed
2220         for the progress indicator. However, we were not accounting for the width used by
2221         the current and remaining time labels on either side of it, so we would incorrectly
2222         conclude that we were guaranteeing the minimum time and yield incorrect layouts since
2223         we were trying to fit more buttons than we had room for.
2224
2225         In order to correctly compute the available width for the progress indicator, we now
2226         have clones of the current and remaining time labels, hidden from video and VoiceOver,
2227         that we update along with the originals. The same styles apply to both clones and
2228         originals, so we may measure the clones to determine the space used by the time labels.
2229         The reason we need to use clones is that if the time labels had previously been hidden
2230         from view, precisely because there was not enough space to display them along with the
2231         progress indicator, then trying to obtain metrics from them would yield 0 since they had
2232         "display: none" styles applied. In order to avoid extra layouts and possible flashing, we
2233         use the clones so that we never have to toggle the "display" property of the originals
2234         just to obtain their measurements.
2235
2236         As a result of this change, we adjust the constant used to set the minimum required
2237         width available to display the progress indicator after all other essential controls
2238         and labels have been measured. That constant used to account for the width of the
2239         time labels, and this is no longer correct.
2240
2241         Test: media/video-controls-drop-and-restore-timeline.html
2242
2243         * Modules/mediacontrols/mediaControlsApple.css:
2244         (::-webkit-media-controls-time-remaining-display.clone):
2245         * Modules/mediacontrols/mediaControlsApple.js:
2246         (Controller):
2247         (Controller.prototype.createTimeClones):
2248         (Controller.prototype.removeTimeClass):
2249         (Controller.prototype.addTimeClass):
2250         (Controller.prototype.updateDuration):
2251         (Controller.prototype.updateLayoutForDisplayedWidth):
2252         (Controller.prototype.updateTime):
2253         (Controller.prototype.updateControlsWhileScrubbing):
2254         * Modules/mediacontrols/mediaControlsiOS.css:
2255         (::-webkit-media-controls-time-remaining-display.clone):
2256         * Modules/mediacontrols/mediaControlsiOS.js:
2257
2258 2016-06-30  Eric Carlson  <eric.carlson@apple.com>
2259
2260         [Mac] Crash registering AVFoundation media engine
2261         https://bugs.webkit.org/show_bug.cgi?id=159269
2262         <rdar://problem/27017656>
2263
2264         Reviewed by Brent Fulgham.
2265
2266         * platform/graphics/MediaPlayer.cpp:
2267         (WebCore::mediaEngineVectorLock): New, return the static Lock.
2268         (WebCore::haveMediaEnginesVector): Wrap the naked bool.
2269         (WebCore::buildMediaEnginesVector): Assert that the lock is locked.
2270         (WebCore::installedMediaEngines): Hold the lock while checking/rebuilding the vector.
2271         (WebCore::MediaPlayer::resetMediaEngines): Hold the lock while clearing the vector.
2272
2273         Use SOFT_LINK_CLASS_FOR_SOURCE instead of SOFT_LINK_CLASS because the former uses dispatch_once
2274         to ensure that class loading is thread safe.
2275         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2276         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
2277         (WebCore::assetCacheForPath):
2278         (WebCore::MediaPlayerPrivateAVFoundationObjC::originsInMediaCache):
2279         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
2280         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCacheForOrigins):
2281         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
2282         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
2283         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
2284         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
2285         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
2286         (WebCore::MediaPlayerPrivateAVFoundationObjC::createOpenGLVideoOutput):
2287         (WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange):
2288         (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
2289         (-[WebCoreAVFPullDelegate setCallback:]):
2290         (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
2291         (-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]):
2292
2293 2016-06-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2294
2295         [image-decoders] Use final and override in ImageDecoder subclasses
2296         https://bugs.webkit.org/show_bug.cgi?id=159291
2297
2298         Reviewed by Antonio Gomes.
2299
2300         * platform/image-decoders/bmp/BMPImageDecoder.h:
2301         * platform/image-decoders/gif/GIFImageDecoder.h:
2302         * platform/image-decoders/ico/ICOImageDecoder.cpp:
2303         (WebCore::ICOImageDecoder::frameSizeAtIndex):
2304         * platform/image-decoders/ico/ICOImageDecoder.h:
2305         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
2306         * platform/image-decoders/png/PNGImageDecoder.h:
2307         * platform/image-decoders/webp/WEBPImageDecoder.h:
2308
2309 2016-06-30  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2310
2311         Purge PassRefPtr in Modules/webdatabase
2312         https://bugs.webkit.org/show_bug.cgi?id=159255
2313
2314         Reviewed by Benjamin Poulain.
2315
2316         As a step to remove PassRefPtr use, this patch cleans it up in Modules/webdatabase.
2317
2318         Additionally unnecessary spaces and tabs are removed too.
2319
2320         * Modules/webdatabase/ChangeVersionWrapper.cpp:
2321         * Modules/webdatabase/DOMWindowWebDatabase.h:
2322         * Modules/webdatabase/Database.cpp:
2323         (WebCore::Database::Database):
2324         (WebCore::Database::~Database):
2325         (WebCore::Database::scheduleTransaction):
2326         (WebCore::Database::runTransaction):
2327         * Modules/webdatabase/Database.h:
2328         * Modules/webdatabase/DatabaseAuthorizer.cpp:
2329         (WebCore::DatabaseAuthorizer::allowRead):
2330         * Modules/webdatabase/DatabaseManager.cpp:
2331         (WebCore::DatabaseManager::openDatabase):
2332         (WebCore::DatabaseManager::fullPathForDatabase):
2333         (WebCore::DatabaseManager::detailsForNameAndOrigin):
2334         * Modules/webdatabase/DatabaseManager.h:
2335         * Modules/webdatabase/DatabaseTask.cpp:
2336         (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
2337         * Modules/webdatabase/DatabaseTask.h:
2338         * Modules/webdatabase/SQLCallbackWrapper.h:
2339         (WebCore::SQLCallbackWrapper::SQLCallbackWrapper):
2340         * Modules/webdatabase/SQLResultSetRowList.h:
2341         * Modules/webdatabase/SQLStatement.cpp:
2342         (WebCore::SQLStatement::SQLStatement):
2343         (WebCore::SQLStatement::sqlError):
2344         (WebCore::SQLStatement::sqlResultSet):
2345         * Modules/webdatabase/SQLStatement.h:
2346         * Modules/webdatabase/SQLTransaction.h:
2347         * Modules/webdatabase/SQLTransactionBackend.cpp:
2348         (WebCore::SQLTransactionBackend::create):
2349         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
2350         (WebCore::SQLTransactionBackend::transactionError):
2351         * Modules/webdatabase/SQLTransactionBackend.h:
2352
2353 2016-06-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2354
2355         [Coordinated Graphics] Move CompositingCoordinator from platform to WebKit2 layer
2356         https://bugs.webkit.org/show_bug.cgi?id=159209
2357
2358         Reviewed by Žan Doberšek.
2359
2360         Remove CompositingCoordinator and its helper classes from the platform layer.
2361
2362         * platform/TextureMapper.cmake:
2363
2364 2016-06-29  Youenn Fablet  <youenn@apple.com>
2365
2366         Pass SecurityOrigin as references in CORS check code
2367         https://bugs.webkit.org/show_bug.cgi?id=159263
2368
2369         Reviewed by Alex Christensen.
2370
2371         No change of behavior.
2372
2373         * css/CSSImageSetValue.cpp:
2374         (WebCore::CSSImageSetValue::cachedImageSet):
2375         * css/CSSImageValue.cpp:
2376         (WebCore::CSSImageValue::cachedImage):
2377         * dom/ScriptElement.cpp:
2378         (WebCore::ScriptElement::requestScript):
2379         * loader/CrossOriginAccessControl.cpp:
2380         (WebCore::updateRequestForAccessControl):
2381         (WebCore::createAccessControlPreflightRequest):
2382         (WebCore::passesAccessControlCheck):
2383         * loader/CrossOriginAccessControl.h:
2384         * loader/CrossOriginPreflightChecker.cpp:
2385         (WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
2386         * loader/DocumentThreadableLoader.cpp:
2387         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
2388         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
2389         (WebCore::DocumentThreadableLoader::preflightSuccess):
2390         (WebCore::DocumentThreadableLoader::isAllowedRedirect):
2391         (WebCore::DocumentThreadableLoader::securityOrigin):
2392         * loader/DocumentThreadableLoader.h:
2393         * loader/ImageLoader.cpp:
2394         (WebCore::ImageLoader::updateFromElement):
2395         * loader/LinkLoader.cpp:
2396         (WebCore::preloadIfNeeded):
2397         * loader/MediaResourceLoader.cpp:
2398         (WebCore::MediaResourceLoader::requestResource):
2399         * loader/SubresourceLoader.cpp:
2400         (WebCore::SubresourceLoader::checkCrossOriginAccessControl):
2401         * loader/TextTrackLoader.cpp:
2402         (WebCore::TextTrackLoader::load):
2403         * loader/cache/CachedResource.cpp:
2404         (WebCore::CachedResource::passesAccessControlCheck):
2405         * loader/cache/CachedResourceRequest.cpp:
2406         (WebCore::CachedResourceRequest::setAsPotentiallyCrossOrigin):
2407
2408 2016-06-29  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2409
2410         WebRTC: Implement MediaEndpointPeerConnection::setConfiguration()
2411         https://bugs.webkit.org/show_bug.cgi?id=159254
2412
2413         Reviewed by Eric Carlson.
2414
2415         Implement MediaEndpointPeerConnection::setConfiguration() which is the
2416         MediaEndpointPeerConnection implementation of RTCPeerConnection.setConfiguration() [1].
2417
2418         [1] https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#dom-rtcpeerconnection-setconfiguration
2419
2420         Testing: Updated existing test.
2421
2422         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
2423         (WebCore::MediaEndpointPeerConnection::setConfiguration):
2424         Implemented.
2425         * Modules/mediastream/RTCConfiguration.cpp:
2426         (WebCore::RTCConfiguration::initialize):
2427         * Modules/mediastream/RTCConfiguration.h:
2428         Use shared enums.
2429         * Modules/mediastream/RTCConfiguration.idl:
2430         Remove 'None'/'Public' IceTransportPolicy enum value (removed from WebRTC 1.0).
2431         * platform/mediastream/MediaEndpointConfiguration.cpp:
2432         (WebCore::MediaEndpointConfiguration::MediaEndpointConfiguration):
2433         * platform/mediastream/MediaEndpointConfiguration.h:
2434         Use shared enums.
2435         (WebCore::MediaEndpointConfiguration::create):
2436         * platform/mediastream/PeerConnectionStates.h: Renamed from Source/WebCore/Modules/mediastream/PeerConnectionStates.h.
2437         Make shared enums accessible to platform objects (currently MediaEndpointConfiguration).
2438
2439 2016-06-29  Hunseop Jeong  <hs85.jeong@samsung.com>
2440
2441         Unreviewed, CMake build fix - 2.
2442
2443         * PlatformMac.cmake:
2444
2445 2016-06-29  Hunseop Jeong  <hs85.jeong@samsung.com>
2446
2447         Unreviewed, CMake build fix. 
2448
2449         * PlatformMac.cmake:
2450
2451 2016-06-29  Jer Noble  <jer.noble@apple.com>
2452
2453         Unprefix webkit-playsinline.
2454         https://bugs.webkit.org/show_bug.cgi?id=159283
2455
2456         Reviewed by Eric Carlson.
2457
2458         Tests: media/video-playsinline.html
2459                media/video-webkit-playsinline.html
2460
2461         Unprefix the webkit-playsinline content attribute, as an unprefixed version
2462         was added to the HTML spec by <https://github.com/whatwg/html/pull/1444>.
2463         The new 'playsinline' content attribute reflects to a new DOM property of
2464         the same name.
2465
2466         * html/HTMLAttributeNames.in:
2467         * html/HTMLVideoElement.idl:
2468         * html/MediaElementSession.cpp:
2469         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
2470
2471 2016-06-29  Alex Christensen  <achristensen@webkit.org>
2472
2473         Fix null dereferencing after r201441
2474         https://bugs.webkit.org/show_bug.cgi?id=159282
2475         rdar://problem/27082559
2476
2477         Reviewed by Andreas Kling.
2478
2479         No new tests.  This is reproducible when dragging from regular to high-DPI displays, 
2480         and we don't have testing infrastructure for simulating that.
2481
2482         * css/MediaQueryMatcher.cpp:
2483         (WebCore::MediaQueryMatcher::styleResolverChanged):
2484         MediaQueryListListener::queryChanged can mutate the Vector of listeners while we are iterating it.
2485         Copy the Vector of listeners and iterate the copy so we don't go out of bounds.
2486
2487 2016-06-29  Antti Koivisto  <antti@apple.com>
2488
2489         Factor pending CSS resources into a struct
2490         https://bugs.webkit.org/show_bug.cgi?id=159268
2491
2492         Reviewed by Andreas Kling.
2493
2494         To fix resource loading related re-entrancy issues in StyleResolver we should move the triggering of
2495         resource loads outside the style resolver. The first step for that is to capture pending resources to a struct.
2496
2497         * CMakeLists.txt:
2498         * WebCore.xcodeproj/project.pbxproj:
2499         * css/CSSCursorImageValue.cpp:
2500         (WebCore::CSSCursorImageValue::cachedImage):
2501         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
2502         * css/CSSCursorImageValue.h:
2503         * css/CSSGradientValue.cpp:
2504         (WebCore::GradientStop::GradientStop):
2505         (WebCore::CSSGradientValue::gradientWithStylesResolved):
2506         * css/CSSGradientValue.h:
2507         (WebCore::CSSGradientValue::loadSubimages):
2508         (WebCore::CSSGradientValue::CSSGradientValue):
2509         * css/CSSImageSetValue.cpp:
2510         (WebCore::CSSImageSetValue::cachedImageSet):
2511         (WebCore::CSSImageSetValue::cachedOrPendingImageSet):
2512         * css/CSSImageSetValue.h:
2513         * css/StyleResolver.cpp:
2514         (WebCore::StyleResolver::State::clear):
2515         (WebCore::StyleResolver::State::setParentStyle):
2516         (WebCore::StyleResolver::State::ensurePendingResources):
2517         (WebCore::isAtShadowBoundary):
2518         (WebCore::StyleResolver::cachedOrPendingFromValue):
2519         (WebCore::StyleResolver::generatedOrPendingFromValue):
2520         (WebCore::StyleResolver::setOrPendingFromValue):
2521         (WebCore::StyleResolver::cursorOrPendingFromValue):
2522         (WebCore::filterOperationForType):
2523         (WebCore::StyleResolver::createFilterOperations):
2524         (WebCore::StyleResolver::loadPendingResources):
2525         (WebCore::StyleResolver::MatchedProperties::MatchedProperties):
2526         (WebCore::StyleResolver::loadPendingSVGDocuments): Deleted.
2527         (WebCore::StyleResolver::loadPendingImage): Deleted.
2528         (WebCore::StyleResolver::loadPendingShapeImage): Deleted.
2529         (WebCore::StyleResolver::loadPendingImages): Deleted.
2530         * css/StyleResolver.h:
2531         (WebCore::StyleResolver::rootElementStyle):
2532         (WebCore::StyleResolver::element):
2533         (WebCore::StyleResolver::document):
2534         (WebCore::StyleResolver::documentSettings):
2535         (WebCore::StyleResolver::State::setApplyPropertyToVisitedLinkStyle):
2536         (WebCore::StyleResolver::State::applyPropertyToRegularStyle):
2537         (WebCore::StyleResolver::State::applyPropertyToVisitedLinkStyle):
2538         (WebCore::StyleResolver::State::setFontDirty):
2539         (WebCore::StyleResolver::State::fontDirty):
2540         (WebCore::StyleResolver::State::useSVGZoomRules):
2541         (WebCore::StyleResolver::State::takePendingResources):
2542         (WebCore::StyleResolver::State::cssToLengthConversionData):
2543         (WebCore::StyleResolver::State::cascadeLevel):
2544         (WebCore::StyleResolver::State::setCascadeLevel):
2545         (WebCore::StyleResolver::state):
2546         (WebCore::StyleResolver::State::pendingImageProperties): Deleted.
2547         (WebCore::StyleResolver::State::filtersWithPendingSVGDocuments): Deleted.
2548         * style/StylePendingResources.cpp: Added.
2549         (WebCore::Style::loadPendingImage):
2550         (WebCore::Style::loadPendingImages):
2551         (WebCore::Style::loadPendingSVGFilters):
2552         (WebCore::Style::loadPendingResources):
2553
2554             Move the functions for triggering the resource loads from StyleResolver.
2555
2556         * style/StylePendingResources.h: Added.
2557
2558             Add struct for pending resources.
2559
2560 2016-06-29  Anders Carlsson  <andersca@apple.com>
2561
2562         Add "type" and "paymentPass" properties in PaymentMethod
2563         https://bugs.webkit.org/show_bug.cgi?id=159278
2564         rdar://problem/26999112
2565
2566         Reviewed by Dean Jackson.
2567
2568         * Modules/applepay/cocoa/PaymentMethodCocoa.mm:
2569         (WebCore::toString):
2570         (WebCore::toDictionary):
2571
2572 2016-06-29  Nan Wang  <n_wang@apple.com>
2573
2574         AX: Crash in WebCore::Document::focusNavigationStartingNode(WebCore::FocusDirection) const + 128
2575         https://bugs.webkit.org/show_bug.cgi?id=159240
2576
2577         Reviewed by Ryosuke Niwa.
2578
2579         This crash is caused by passing an empty node to ElementTraversal::previous(Node&). When the
2580         focusNavigationStartingNode has been removed and it has no next sibling, we should fallback
2581         to itself for calculating the next focused element.
2582
2583         Test: fast/events/remove-focus-navigation-starting-point-crash.html
2584
2585         * dom/Document.cpp:
2586         (WebCore::Document::focusNavigationStartingNode):
2587
2588 2016-06-29  Ryan Haddad  <ryanhaddad@apple.com>
2589
2590         Unreviewed, rolling out r202617.
2591
2592         The LayoutTest from this change crashes under GuardMalloc
2593
2594         Reverted changeset:
2595
2596         "Throw exceptions for invalid number of channels for
2597         ConvolverNode"
2598         https://bugs.webkit.org/show_bug.cgi?id=159238
2599         http://trac.webkit.org/changeset/202617
2600
2601 2016-06-29  Anders Carlsson  <andersca@apple.com>
2602
2603         Rename addressFields to contactFields
2604         https://bugs.webkit.org/show_bug.cgi?id=159271
2605         rdar://problem/27086955
2606
2607         Reviewed by Beth Dakin.
2608
2609         * Modules/applepay/ApplePaySession.cpp:
2610         (WebCore::createContactFields):
2611         (WebCore::isValidPaymentRequestPropertyName):
2612         (WebCore::createPaymentRequest):
2613         (WebCore::createAddressFields): Deleted.
2614         * Modules/applepay/PaymentRequest.h:
2615         (WebCore::PaymentRequest::requiredBillingContactFields):
2616         (WebCore::PaymentRequest::setRequiredBillingContactFields):
2617         (WebCore::PaymentRequest::requiredShippingContactFields):
2618         (WebCore::PaymentRequest::setRequiredShippingContactFields):
2619         (WebCore::PaymentRequest::requiredBillingAddressFields): Deleted.
2620         (WebCore::PaymentRequest::setRequiredBillingAddressFields): Deleted.
2621         (WebCore::PaymentRequest::requiredShippingAddressFields): Deleted.
2622         (WebCore::PaymentRequest::setRequiredShippingAddressFields): Deleted.
2623
2624 2016-06-29  Jiewen Tan  <jiewen_tan@apple.com>
2625
2626         Unreviewed, third attempt to fix ASAN build for r202599
2627
2628         * platform/text/TextCodecReplacement.cpp:
2629         (WebCore::TextCodecReplacement::decode):
2630
2631 2016-06-29  Jer Noble  <jer.noble@apple.com>
2632
2633         Adopt MediaRemote.
2634         https://bugs.webkit.org/show_bug.cgi?id=159250
2635
2636         Reviewed by Eric Carlson.
2637
2638         Adopt MediaRemote and use the framework to implement MediaSessionManageMac
2639         and RemoteCommandListenerMac.
2640
2641         * WebCore.xcodeproj/project.pbxproj:
2642         * platform/RemoteCommandListener.cpp:
2643         * platform/audio/PlatformMediaSessionManager.cpp:
2644         * platform/audio/cocoa/MediaSessionManagerCocoa.cpp: Renamed from Source/WebCore/platform/audio/mac/MediaSessionManagerMac.cpp.
2645         (PlatformMediaSessionManager::updateSessionState):
2646         * platform/audio/mac/MediaSessionManagerMac.h: Added.
2647         * platform/audio/mac/MediaSessionManagerMac.mm: Added.
2648         (WebCore::PlatformMediaSessionManager::sharedManager):
2649         (WebCore::PlatformMediaSessionManager::sharedManagerIfExists):
2650         (WebCore::MediaSessionManagerMac::MediaSessionManagerMac):
2651         (WebCore::MediaSessionManagerMac::~MediaSessionManagerMac):
2652         (WebCore::MediaSessionManagerMac::sessionWillBeginPlayback):
2653         (WebCore::MediaSessionManagerMac::removeSession):
2654         (WebCore::MediaSessionManagerMac::sessionWillEndPlayback):
2655         (WebCore::MediaSessionManagerMac::clientCharacteristicsChanged):
2656         (WebCore::MediaSessionManagerMac::nowPlayingEligibleSession):
2657         (WebCore::MediaSessionManagerMac::updateNowPlayingInfo):
2658         * platform/cocoa/SoftLinking.h:
2659         * platform/mac/MediaRemoteSoftLink.cpp: Added.
2660         * platform/mac/MediaRemoteSoftLink.h: Added.
2661         * platform/mac/RemoteCommandListenerMac.h: Added.
2662         (WebCore::RemoteCommandListenerMac::createWeakPtr):
2663         * platform/mac/RemoteCommandListenerMac.mm: Added.
2664         (WebCore::RemoteCommandListener::create):
2665         (WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac):
2666         (WebCore::RemoteCommandListenerMac::~RemoteCommandListenerMac):
2667         * platform/spi/mac/MediaRemoteSPI.h: Added.
2668
2669 2016-06-29  Jer Noble  <jer.noble@apple.com>
2670
2671         Cannot clear a MediaSource SourceBuffer in Safari 9 and WebKit nightly
2672         https://bugs.webkit.org/show_bug.cgi?id=159230
2673
2674         Reviewed by Eric Carlson.
2675
2676         Test: media/media-source/media-source-remove.html (modified)
2677
2678         Move to using a MediaTime directly (rather than as a double) to add
2679         and removed buffered ranges. Also, drop the use of the "microsecond"
2680         fudge factor when adding buffered ranges.
2681
2682         * Modules/mediasource/SourceBuffer.cpp:
2683         (WebCore::removeSamplesFromTrackBuffer):
2684         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2685
2686 2016-06-29  Jiewen Tan  <jiewen_tan@apple.com>
2687
2688         Unreviewed, second attempt to fix ASAN build for r202599
2689
2690         * platform/text/TextCodecReplacement.cpp:
2691
2692 2016-06-29  Jiewen Tan  <jiewen_tan@apple.com>
2693
2694         Unreviewed, first attempt to fix ASAN build for r202599
2695
2696         * platform/text/TextCodecReplacement.cpp:
2697
2698 2016-06-29  Joseph Pecoraro  <pecoraro@apple.com>
2699
2700         Web Inspector: Show Shadow Root type in DOM Tree
2701         https://bugs.webkit.org/show_bug.cgi?id=159236
2702         <rdar://problem/27068521>
2703
2704         Reviewed by Timothy Hatcher.
2705
2706         Test: inspector/dom/shadowRootType.html
2707
2708         * inspector/InspectorDOMAgent.cpp:
2709         (WebCore::shadowRootType):
2710         (WebCore::InspectorDOMAgent::buildObjectForNode):
2711         Set the shadowRootType property when a node is a ShadowRoot.
2712
2713 2016-06-29  Jeremy Jones  <jeremyj@apple.com>
2714
2715         Replace MPAudioVideoRoutingActionSheet with MPAVRoutingSheet.
2716         https://bugs.webkit.org/show_bug.cgi?id=159161
2717         <rdar://problem/26017691>
2718
2719         Reviewed by Sam Weinig.
2720
2721         Replace MPAudioVideoRoutingActionSheet SPI with MPAVRoutingSheet SPI.
2722
2723         * platform/spi/ios/MediaPlayerSPI.h:
2724
2725 2016-06-29  Alejandro G. Castro  <alex@igalia.com>
2726
2727         WebRTC: ice-char can not contain '=' characters for credentials
2728         https://bugs.webkit.org/show_bug.cgi?id=159207
2729
2730         Reviewed by Eric Carlson.
2731
2732         Avoid a general calculation to get a base64 without padding which
2733         was wrong in the randomString function. Because each parameter
2734         using the function requires a different setup depending of the
2735         specification and this is not a general API, it is a better
2736         solution to calculate and store the sizes we want to use, comment
2737         them and test them, considering we use base64 to generate the
2738         strings we just need to avoid padding.
2739
2740         Existing test modified to match the correct behavior.
2741
2742         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
2743         (WebCore::randomString): Now the size is the one passed.
2744         (WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection):
2745         Used different valid values following the sdp parser in each case.
2746
2747 2016-06-29  David Kilzer  <ddkilzer@apple.com>
2748
2749         Crash when 'input' event handler for input[type=color] changes the input type
2750         <https://webkit.org/b/159262>
2751         <rdar://problem/27020404>
2752
2753         Reviewed by Daniel Bates.
2754
2755         Fix based on a Blink change (patch by <tkent@chromium.org>):
2756         <https://chromium.googlesource.com/chromium/src.git/+/a17cb3ecef49a078657524cdeaba33ad2083646c>
2757
2758         Test: fast/forms/color/color-type-change-on-input-crash.html
2759
2760         * html/ColorInputType.cpp:
2761         (WebCore::ColorInputType::didChooseColor): Add EventQueueScope
2762         before setValueFromRenderer() to fix the bug.
2763         * html/HTMLInputElement.h:
2764         (WebCore::HTMLInputElement::setValueFromRenderer): Add comment
2765         about how to use this method.
2766
2767 2016-06-29  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2768
2769         WebRTC: Misc MediaStreamEvent fixes: Update build flag and remove PassRefPtr usage
2770         https://bugs.webkit.org/show_bug.cgi?id=159132
2771
2772         Reviewed by Eric Carlson.
2773
2774         Use the WEB_RTC build flag instead of MEDIA_STREAM since this event is related to
2775         RTCPeerConnection. Also remove PassRefPtr usage.
2776
2777         Updated existing expected results.
2778
2779         * Modules/mediastream/MediaStreamEvent.cpp:
2780         (WebCore::MediaStreamEvent::create):
2781         (WebCore::MediaStreamEvent::MediaStreamEvent):
2782         * Modules/mediastream/MediaStreamEvent.h:
2783         * Modules/mediastream/MediaStreamEvent.idl:
2784         * dom/EventNames.in:
2785
2786 2016-06-29  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2787
2788         REGRESSION(r202337) [WebRTC] Crash when loading html5test.com
2789         https://bugs.webkit.org/show_bug.cgi?id=159145
2790
2791         Reviewed by Eric Carlson.
2792
2793         MediaEndpointPeerConnection uses an implementation of the MediaEndpoint interface to
2794         interact with the port's WebRTC backend. A mock (MockMediaEndpoint) is used for testing.
2795         This change adds an "empty" MediaEndpoint implementation that simplifies the case when a
2796         port builds and tests with MediaEndpointPeerConnection/MockMediaEndpoint, but doesn't have
2797         a "real" MediaEndpoint implementation yet (to use with MiniBrowser).
2798
2799         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
2800         (WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection):
2801         * platform/mediastream/MediaEndpoint.cpp:
2802         (WebCore::EmptyRealtimeMediaSource::create):
2803         (WebCore::EmptyRealtimeMediaSource::EmptyRealtimeMediaSource):
2804         (WebCore::EmptyMediaEndpoint::EmptyMediaEndpoint):
2805         (WebCore::createMediaEndpoint):
2806
2807 2016-06-29  Alejandro G. Castro  <alex@igalia.com>
2808
2809         Fix assertion in debug build when creating the SocketStreamHandle object.
2810
2811         We have to call relaxAdoptionRequirement to avoid the assertion
2812         when protecting the non-adopted SocketStreamHandle we are
2813         creating. Update to r202370.
2814
2815         Rubber-stamped by Carlos Garcia Campos.
2816
2817         * platform/network/soup/SocketStreamHandleSoup.cpp:
2818         (WebCore::SocketStreamHandle::SocketStreamHandle):
2819
2820 2016-06-29  David Kilzer  <ddkilzer@apple.com>
2821
2822         Throw exceptions for invalid number of channels for ConvolverNode
2823         <https://webkit.org/b/159238>
2824         <rdar://problem/27020410>
2825
2826         Reviewed by Brent Fulgham.
2827
2828         Fix based on a Blink change (patch by <rtoy@chromium.org>):
2829         <https://chromium.googlesource.com/chromium/src.git/+/0cc26bbb7175aec77910d0b47faf9f8c8a640fe5>
2830
2831         Test: webaudio/convolver-channels.html
2832
2833         * Modules/webaudio/ConvolverNode.cpp:
2834         (WebCore::ConvolverNode::setBuffer): Throw an exception for
2835         anything but 1, 2 or 4 channels.
2836
2837 2016-06-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2838
2839         REGRESSION(r198782, r201043): [image-decoders] Flickering with some animated gif
2840         https://bugs.webkit.org/show_bug.cgi?id=159089
2841
2842         Reviewed by Antonio Gomes.
2843
2844         There's some flickering when loading big enough animated gifs running the animation in a loop. The first time it
2845         loads everything is fine, but after the first loop iteration there are several flickering effects, once every
2846         time the animation finishes and some others happening in the middle of the animation loop. The flickering
2847         happens because we fail to render some of the frames, and it has two diferent causes:
2848
2849          - In r198782, ImageDecoder::createFrameImageAtIndex(), was modified to check first if the image is empty to
2850         return early, and then try to get the frame image from the decoder. This is the aone causing the flickering
2851         always on the first frame after one iteration. It happens because ImageDecoder::size() is always empty at that
2852         point. The first time doesn't happen because the gif is loaded and BitmapImage calls isSizeAvailable() from
2853         BitmapImage::dataChanged(). The isSizeAvailable call makes the gif decoder calculate the size. But for the next
2854         iterations, frames are cached and BitmapImage already has the decoded data so isSizeAvailable is not called
2855         again. When createFrameImageAtIndex() is called again for the first frame, size is empty until the gif decoder
2856         creates the reader again, which happens when frameBufferAtIndex() is called, so after that the size is
2857         available. So, we could call isSizeAvailable before checking the size, or simply do the check after the
2858         frameBufferAtIndex() call as we used to do.
2859
2860          - In r201043 BitmapImage::destroyDecodedDataIfNecessary() was fixed to use the actual bytes used by the frame
2861         in order to decide whether to destroy decoded data or not. This actually revealed a bug, it didn't happen before
2862         because we were never destroying frames before. The bug is in the gif decoder that doesn't correctly handle the
2863         case of destroying only some of the frames from the buffer cache. The gif decoder is designed to always process the
2864         frames in order, the reader keeps an index of the currently processed frame, so when some frames are read from the
2865         cache, and then we ask the decoder for a not cached frame, the currently processed frame is not in sync with the
2866         actual frame we are asking for, and we end do not processing any frame at all.
2867
2868         * platform/image-decoders/ImageDecoder.cpp:
2869         (WebCore::ImageDecoder::createFrameImageAtIndex): Check the size after calling frameBufferAtIndex().
2870         * platform/image-decoders/gif/GIFImageDecoder.cpp:
2871         (WebCore::GIFImageDecoder::clearFrameBufferCache): Delete the reader when clearing the cache since it's out of sync.
2872
2873 2016-06-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2874
2875         [GStreamer] Adaptive streaming issues
2876         https://bugs.webkit.org/show_bug.cgi?id=144040
2877
2878         Reviewed by Philippe Normand.
2879
2880         There are multiple deadlocks in the web process when HLS content is loaded by GStreamer. It happens because gst
2881         is using several threads to download manifest, fragments, monitor the downloads, etc. To download the fragments
2882         and manifest it always creates the source element in a separate thread, something that is not actually expected
2883         to happen in WebKit source element. Our source element is always scheduling tasks (start, stop, need-data,
2884         enough-data and seek) to the main thread, and those downloads that use the ResourceHandleStreamingClient
2885         (there's no player associated) also happen in the main thread, because libsoup calls all its async callbacks in
2886         the main thread. So, the result is that it can happen that we end up blocking the main thread in a lock until
2887         the download finishes, but the download never finishes because tasks are scheduled in the main thread that is
2888         blocked in a lock. This can be prevented by always using a secondary thread for downloads made by
2889         ResourceHandleStreamingClient, using its own run loop with a different GMainContext so that libsoup sends
2890         callbacks to the right thread. We also had to refactor the tasks a bit, leaving the thread safe parts to be run
2891         in the calling thread always, and only scheduling to the main thread in case of not using
2892         ResourceHandleStreamingClient and only for the non thread safe parts.
2893         This patch also includes r200455 that was rolled out, but it was a perfectly valid workaround for GST bug.
2894
2895         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
2896         (WTF::ensureGRef): Consume the floating ref if needed.
2897         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
2898         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2899         (webkit_web_src_init): Check if object is being created in the main thread.
2900         (webKitWebSrcStop): Stop the media resource loader in the main thread and the resource handle streaming in the
2901         current thread.
2902         (webKitWebSrcStart): Start the media resource loader in the main thread and the resource handle streaming in
2903         the current thread.
2904         (webKitWebSrcChangeState): Call webKitWebSrcStart and webKitWebSrcStop in the current thread.
2905         (webKitWebSrcNeedData): Update status in the current thread and notify the media resource loader in the main thread.
2906         (webKitWebSrcEnoughData): Ditto.
2907         (webKitWebSrcSeek): Ditto.
2908         (webKitWebSrcSetMediaPlayer): Add an assert to ensure that source elements used by WebKit are always created in
2909         the main thread.
2910         (ResourceHandleStreamingClient::ResourceHandleStreamingClient): Use a secondary thread to do the download.
2911         (ResourceHandleStreamingClient::~ResourceHandleStreamingClient): Stop the secondary thread.
2912         (ResourceHandleStreamingClient::setDefersLoading): Notify the secondary thread.
2913
2914 2016-06-28  Youenn Fablet  <youennf@gmail.com>
2915
2916         Remove ThreadableLoaderOptions origin
2917         https://bugs.webkit.org/show_bug.cgi?id=159221
2918
2919         Reviewed by Sam Weinig.
2920
2921         No change of behavior.
2922
2923         * loader/DocumentThreadableLoader.cpp:
2924         (WebCore::DocumentThreadableLoader::loadResourceSynchronously): Adding origing parameter.
2925         (WebCore::DocumentThreadableLoader::create): Ditto.
2926         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Ditto.
2927         (WebCore::DocumentThreadableLoader::redirectReceived): Setting m_origin.
2928         (WebCore::DocumentThreadableLoader::securityOrigin): Checking m_origin.
2929         * loader/DocumentThreadableLoader.h: Adding m_origin member.
2930         * loader/ThreadableLoader.cpp:
2931         (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Removing origin.
2932         (WebCore::ThreadableLoaderOption::isolatedCopy): Deleted.
2933         * loader/ThreadableLoader.h: Removing origin parameter and isolatedCopy function.
2934         * loader/WorkerThreadableLoader.cpp:
2935         (WebCore::LoaderTaskOptions::LoaderTaskOptions): Structure to pass loader task options from one thread to another.
2936         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
2937         * page/EventSource.cpp:
2938         (WebCore::EventSource::connect): Removing setting of the origin.
2939         * workers/WorkerScriptLoader.cpp:
2940         (WebCore::WorkerScriptLoader::loadSynchronously): Ditto.
2941         (WebCore::WorkerScriptLoader::loadAsynchronously): Ditto.
2942         * xml/XMLHttpRequest.cpp:
2943         (WebCore::XMLHttpRequest::createRequest): Ditto.
2944
2945 2016-06-28  Commit Queue  <commit-queue@webkit.org>
2946
2947         Unreviewed, rolling out r202580.
2948         https://bugs.webkit.org/show_bug.cgi?id=159245
2949
2950         Caused all WKTR tests to fail on GuardMalloc and Production
2951         only for unknown reasons, investigating offline. (Requested by
2952         brrian on #webkit).
2953
2954         Reverted changeset:
2955
2956         "RunLoop::Timer should use constructor templates instead of
2957         class templates"
2958         https://bugs.webkit.org/show_bug.cgi?id=159153
2959         http://trac.webkit.org/changeset/202580
2960
2961 2016-06-28  Benjamin Poulain  <benjamin@webkit.org>
2962
2963         Rename ChildrenAffectedByActive to StyleAffectedByActive
2964         https://bugs.webkit.org/show_bug.cgi?id=159187
2965
2966         Reviewed by Antti Koivisto.
2967
2968         Flags named "ChildrenAffectedBy" are used when the invalidation
2969         of children is so crazy that we invalidate the whole parent subtree instead.
2970
2971         That's not the case for :active. It is a straightforward element invalidation.
2972         Consequently, the property is renamed to StyleAffectedByActive.
2973
2974         * dom/Element.cpp:
2975         (WebCore::Element::setActive):
2976         (WebCore::Element::setStyleAffectedByActive):
2977         (WebCore::Element::hasFlagsSetDuringStylingOfChildren):
2978         (WebCore::Element::rareDataStyleAffectedByActive):
2979         (WebCore::Element::setChildrenAffectedByActive): Deleted.
2980         (WebCore::Element::rareDataChildrenAffectedByActive): Deleted.
2981         * dom/Element.h:
2982         (WebCore::Element::styleAffectedByActive):
2983         (WebCore::Element::childrenAffectedByActive): Deleted.
2984         * dom/ElementRareData.h:
2985         (WebCore::ElementRareData::styleAffectedByActive):
2986         (WebCore::ElementRareData::setStyleAffectedByActive):
2987         (WebCore::ElementRareData::ElementRareData):
2988         (WebCore::ElementRareData::resetDynamicRestyleObservations):
2989         (WebCore::ElementRareData::childrenAffectedByActive): Deleted.
2990         (WebCore::ElementRareData::setChildrenAffectedByActive): Deleted.
2991         * style/StyleRelations.cpp:
2992         (WebCore::Style::commitRelations):
2993
2994 2016-06-28  Jiewen Tan  <jiewen_tan@apple.com>
2995
2996         Implement "replacement" codec
2997         https://bugs.webkit.org/show_bug.cgi?id=159180
2998         <rdar://problem/26015178>
2999
3000         Reviewed by Brent Fulgham.
3001
3002         Test: fast/encoding/charset-replacement.html
3003
3004         Add support for "replacement" codec according to the spec:
3005         https://encoding.spec.whatwg.org/#replacement
3006         According to the spec, encoding labels {"csiso2022kr", "hz-gb-2312", "iso-2022-cn",
3007         "iso-2022-cn-ext", "iso-2022-kr"} are used to conduct certain attacks that abuse
3008         a mismatch between encodings supported on the server and the client. Therefore,
3009         they are grouped under the "replacement" codec, which does the following things
3010         to prevent those attacks.
3011         1) Decode: terminates with a single U+FFFD.
3012         2) Encode: treated as UTF-8.
3013
3014         Furthermore, the "replacement" codec is a specification convenience to group those
3015         vulnerable encoding labels. Therefore, it should not be able to use directly.
3016
3017         This change is based on the following Blink changes:
3018         https://codereview.chromium.org/265973003, and
3019         https://codereview.chromium.org/261013007.
3020
3021         * CMakeLists.txt:
3022         * WebCore.xcodeproj/project.pbxproj:
3023         * platform/text/TextAllInOne.cpp:
3024         * platform/text/TextCodecReplacement.cpp: Added.
3025         (WebCore::TextCodecReplacement::create):
3026         (WebCore::TextCodecReplacement::TextCodecReplacement):
3027         (WebCore::TextCodecReplacement::registerEncodingNames):
3028         (WebCore::TextCodecReplacement::registerCodecs):
3029         (WebCore::TextCodecReplacement::decode):
3030         * platform/text/TextCodecReplacement.h: Added.
3031         * platform/text/TextEncoding.cpp:
3032         (WebCore::TextEncoding::TextEncoding):
3033         * platform/text/TextEncodingRegistry.cpp:
3034         (WebCore::isReplacementEncoding):
3035         (WebCore::extendTextCodecMaps):
3036         * platform/text/TextEncodingRegistry.h:
3037
3038 2016-06-28  Dean Jackson  <dino@apple.com>
3039
3040         Remove incorrect comments in HTMLCanvasElement
3041         https://bugs.webkit.org/show_bug.cgi?id=159229
3042
3043         Reviewed by Sam Weinig.
3044
3045         These comments are wrong.
3046
3047         * html/HTMLCanvasElement.cpp:
3048         (WebCore::HTMLCanvasElement::probablySupportsContext):
3049         (WebCore::HTMLCanvasElement::getContext): Deleted.
3050
3051 2016-06-28  Geoffrey Garen  <ggaren@apple.com>
3052
3053         CrashTracer beneath JSC::MarkedBlock::specializedSweep
3054         https://bugs.webkit.org/show_bug.cgi?id=159223
3055
3056         Reviewed by Saam Barati.
3057
3058         This crash is caused by a media element re-entering JS during the GC
3059         sweep phase.
3060
3061         In theory, other CachedResourceClients in the DOM might also trigger
3062         similar bugs, but our data only implicates the media elements, so this
3063         fix targets them.
3064
3065         * html/HTMLDocument.h: Document has no reason to inherit from
3066         CachedResourceClient. I found this becuase I had to search for all
3067         CachedResourceClients in researching this patch.
3068
3069         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
3070         (WebCore::WebCoreAVCFResourceLoader::invalidate): Delay our call to
3071         stopLoading because it might re-enter JS, and we might have been called
3072         by the GC sweep phase destroying a media element.
3073
3074         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
3075         (WebCore::WebCoreAVFResourceLoader::invalidate): Ditto.
3076
3077 2016-06-28  Saam Barati  <sbarati@apple.com>
3078
3079         some Watchpoints' ::fireInternal method will call operations that might GC where the GC will cause the watchpoint itself to destruct
3080         https://bugs.webkit.org/show_bug.cgi?id=159198
3081         <rdar://problem/26302360>
3082
3083         Reviewed by Filip Pizlo.
3084
3085         * bindings/js/JSDOMWindowBase.cpp:
3086         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
3087         * bindings/scripts/CodeGeneratorJS.pm:
3088         (GenerateHeader):
3089         * bindings/scripts/test/JS/JSTestEventTarget.h:
3090         (WebCore::JSTestEventTarget::create):
3091
3092 2016-06-28  Anders Carlsson  <andersca@apple.com>
3093
3094         Move the user gesture requirement to the ApplePaySession constructor
3095         https://bugs.webkit.org/show_bug.cgi?id=159225
3096         rdar://problem/26507267
3097
3098         Reviewed by Tim Horton.
3099
3100         By doing this, clients can do pre-validation before showing the sheet, while we still maintain the user gesture requirement.
3101
3102         * Modules/applepay/ApplePaySession.cpp:
3103         (WebCore::ApplePaySession::create):
3104         (WebCore::ApplePaySession::begin): Deleted.
3105
3106 2016-06-28  Youenn Fablet  <youenn@apple.com>
3107
3108         Iterable interfaces should have their related prototype @@iterator property writable
3109         https://bugs.webkit.org/show_bug.cgi?id=159211
3110         <rdar://problem/26950766>
3111
3112         Reviewed by Chris Dumez.
3113
3114         Updating @@iterator property according  http://heycam.github.io/webidl/#es-iterator.
3115
3116         Covered by updated test.
3117
3118         * bindings/scripts/CodeGeneratorJS.pm:
3119         (GenerateImplementation): Removing ReadOnly flag from @@iterator property of iterable interfaces.
3120         * bindings/scripts/test/JS/JSTestNode.cpp:
3121         (WebCore::JSTestNodePrototype::finishCreation): Rebasing expectation.
3122         * bindings/scripts/test/JS/JSTestObj.cpp:
3123         (WebCore::JSTestObjPrototype::finishCreation): Ditto.
3124
3125 2016-06-28  Anders Carlsson  <andersca@apple.com>
3126
3127         "Total amount is too big" error message is displaying on clicking Pay button
3128         https://bugs.webkit.org/show_bug.cgi?id=159219
3129         rdar://problem/26722110
3130
3131         Reviewed by Tim Horton.
3132
3133         Match the PassKit max amount.
3134
3135         * Modules/applepay/PaymentRequestValidator.cpp:
3136         (WebCore::PaymentRequestValidator::validateTotal):
3137
3138 2016-06-28  Anders Carlsson  <andersca@apple.com>
3139
3140         PaymentMerchantSession should wrap a PKPaymentMerchantSession
3141         https://bugs.webkit.org/show_bug.cgi?id=159218
3142         rdar://problem/26872118
3143
3144         Reviewed by Tim Horton.
3145
3146         * Modules/applepay/ApplePaySession.cpp:
3147         (WebCore::ApplePaySession::completeMerchantValidation):
3148         Use PaymentMerchantSession::fromJS.
3149
3150         (WebCore::createMerchantSession): Deleted.
3151
3152         * Modules/applepay/PaymentCoordinator.h:
3153         PaymentMerchantSession is now a class.
3154
3155         * Modules/applepay/PaymentCoordinatorClient.h:
3156         PaymentMerchantSession is now a class.
3157
3158         * Modules/applepay/PaymentMerchantSession.h:
3159         (WebCore::PaymentMerchantSession::PaymentMerchantSession):
3160         (WebCore::PaymentMerchantSession::~PaymentMerchantSession):
3161         (WebCore::PaymentMerchantSession::pkPaymentMerchantSession):
3162         Store a PKPaymentMerchantSession in a RetainPtr inside the PaymentMerchantSession object.
3163
3164         * Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm:
3165         (WebCore::PaymentMerchantSession::fromJS):
3166         Convert the JS object to a PKPaymentMerchantSession and return a PaymentMerchantSession that wraps it.
3167
3168         * WebCore.xcodeproj/project.pbxproj:
3169         Add new files.
3170
3171         * bindings/js/Dictionary.h:
3172         (WebCore::Dictionary::initializerObject):
3173         Add new getter.
3174
3175 2016-06-28  Brian Burg  <bburg@apple.com>
3176
3177         RunLoop::Timer should use constructor templates instead of class templates
3178         https://bugs.webkit.org/show_bug.cgi?id=159153
3179
3180         Reviewed by Alex Christensen.
3181
3182         Remove the RunLoop::Timer class template argument, and pass its constructor
3183         a reference to `this` instead of a pointer to `this`.
3184
3185         * Modules/mediasession/WebMediaSessionManager.cpp:
3186         (WebCore::WebMediaSessionManager::WebMediaSessionManager):
3187         * Modules/mediasession/WebMediaSessionManager.h:
3188         * page/WheelEventTestTrigger.cpp:
3189         (WebCore::WheelEventTestTrigger::WheelEventTestTrigger):
3190         * page/WheelEventTestTrigger.h:
3191         * page/mac/TextIndicatorWindow.h:
3192         * page/mac/TextIndicatorWindow.mm:
3193         (WebCore::TextIndicatorWindow::TextIndicatorWindow):
3194         * platform/MainThreadSharedTimer.h:
3195         * platform/cocoa/ScrollController.h:
3196         * platform/cocoa/ScrollController.mm:
3197         (WebCore::ScrollController::ScrollController):
3198         * platform/glib/MainThreadSharedTimerGLib.cpp:
3199         (WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
3200         * platform/graphics/MediaPlaybackTargetPicker.cpp:
3201         (WebCore::MediaPlaybackTargetPicker::MediaPlaybackTargetPicker):
3202         * platform/graphics/MediaPlaybackTargetPicker.h:
3203         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3204         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
3205         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3206         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3207         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
3208         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3209         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3210         (VideoRenderRequestScheduler::VideoRenderRequestScheduler):
3211         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
3212         (WebCore::TextureMapperPlatformLayerProxy::TextureMapperPlatformLayerProxy):
3213         (WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread):
3214         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
3215         * platform/mock/MediaPlaybackTargetPickerMock.cpp:
3216         (WebCore::MediaPlaybackTargetPickerMock::MediaPlaybackTargetPickerMock):
3217         * platform/mock/MediaPlaybackTargetPickerMock.h:
3218         * platform/mock/MockRealtimeVideoSource.cpp:
3219         (WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
3220         * platform/mock/MockRealtimeVideoSource.h:
3221         * platform/network/ResourceHandleInternal.h:
3222         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
3223
3224 2016-06-27  Jer Noble  <jer.noble@apple.com>
3225
3226         Cross-domain video loads do not prompt for authorization.
3227         https://bugs.webkit.org/show_bug.cgi?id=159195
3228         <rdar://problem/26234612>
3229
3230         Reviewed by Brent Fulgham.
3231
3232         Test: http/tests/media/video-auth.html (modified)
3233
3234         We should prompt for authorization when a cross-origin <video> is embedded
3235         in a web page.
3236
3237         * loader/MediaResourceLoader.cpp:
3238         (WebCore::MediaResourceLoader::requestResource):
3239
3240 2016-06-28  Ryosuke Niwa  <rniwa@webkit.org>
3241
3242         REGRESSION(r201471): FormClient.textFieldDidEndEditing is no longer called when a text field is removed
3243         https://bugs.webkit.org/show_bug.cgi?id=159199
3244         <rdar://problem/26748189>
3245
3246         Reviewed by Alexey Proskuryakov.
3247
3248         The bug was caused by HTMLInputElement's endEditing no longer getting called due to the behavior change.
3249         Preserve the WebKit2 API semantics by manually calling HTMLInputElement::endEditing in setFocusedElement.
3250
3251         Tests: WebKit2TextFieldDidBeginAndEndEditing
3252
3253         * dom/Document.cpp:
3254         (WebCore::Document::setFocusedElement):
3255
3256 2016-06-28  Frederic Wang  <fwang@igalia.com>
3257
3258         Phrasing content should be accepted in <mo> elements
3259         https://bugs.webkit.org/show_bug.cgi?id=130245
3260
3261         Reviewed by Brent Fulgham.
3262
3263         After r202420, the RenderMathMLOperator element no longer messes with anonymous block and
3264         text nodes. Hence it is now safe to allow foreign content inside <mo>.
3265
3266         We extend foreign-element-in-token.html to cover the mo case.
3267
3268         * mathml/MathMLTextElement.cpp:
3269         (WebCore::MathMLTextElement::childShouldCreateRenderer): Remove the early return for <mo> so
3270         that it accepts phrasing content children.
3271
3272 2016-06-27  Anders Carlsson  <andersca@apple.com>
3273
3274         WebKit::WebPaymentCoordinator leak
3275         https://bugs.webkit.org/show_bug.cgi?id=159168
3276         rdar://problem/26929772
3277
3278         Reviewed by Beth Dakin.
3279
3280         * Modules/applepay/PaymentCoordinator.cpp:
3281         (WebCore::PaymentCoordinator::~PaymentCoordinator):
3282         Call paymentCoordinatorDestroyed().
3283
3284         * Modules/applepay/PaymentCoordinatorClient.h:
3285         Rename mainFrameDestroyed to paymentCoordinatorDestroyed().
3286
3287         * loader/EmptyClients.cpp:
3288
3289 2016-06-28  Frederic Wang  <fwang@igalia.com>
3290
3291         Remove anonymous in renderName for all MathML renderers but RenderMathMLOperator
3292         https://bugs.webkit.org/show_bug.cgi?id=159114
3293
3294         Reviewed by Martin Robinson.
3295
3296         After r202420, the only anonymous MathML renderers are the RenderMathMLOperators created by
3297         the mfenced element. Hence we remove the special case for anonymous in the renderName
3298         implementation of most MathML renderers.
3299
3300         No new tests, behavior unchanged.
3301
3302         * rendering/mathml/RenderMathMLRow.h:
3303         * rendering/mathml/RenderMathMLSpace.h:
3304         * rendering/mathml/RenderMathMLToken.h:
3305
3306 2016-06-28  Adam Bergkvist  <adam.bergkvist@ericsson.com>
3307
3308         WebRTC: Robustify 'this' type check in RTCPeerConnection JS built-ins
3309         https://bugs.webkit.org/show_bug.cgi?id=158831
3310
3311         Reviewed by Youenn Fablet.
3312
3313         Use @operations slot in RTCPeerConnection type check.
3314
3315         Updated results of existing test.
3316
3317         * Modules/mediastream/RTCPeerConnection.js:
3318         (initializeRTCPeerConnection):
3319         Initialize @operations slot in constructor.
3320         * Modules/mediastream/RTCPeerConnectionInternals.js:
3321         (isRTCPeerConnection):
3322         Use @operations slot in type check.
3323
3324 2016-06-28  Frederic Wang  <fwang@igalia.com>
3325
3326         AX: Remove dead code in AccessibilityRenderObject::textUnderElement
3327         https://bugs.webkit.org/show_bug.cgi?id=159205
3328
3329         Reviewed by Joanmarie Diggs.
3330
3331         RenderMathMLOperator used to destroy its descendants and to replace them with an anonymous
3332         text node wrapped inside anonymous blocks. After r202420, it just behaves as any other token
3333         elements. Hence we remove the code in AccessibilityRenderObject::textUnderElement that was
3334         used to handle this specific render tree structure.
3335
3336         No new tests, already covered by accessibility/math-text.html.
3337
3338         * accessibility/AccessibilityRenderObject.cpp:
3339         (WebCore::AccessibilityRenderObject::textUnderElement): Remove dead code for RenderText and RenderMathMLOperator.
3340
3341 2016-06-28  Per Arne Vollan  <pvollan@apple.com>
3342
3343         [Win] Custom elements tests are failing.
3344         https://bugs.webkit.org/show_bug.cgi?id=159139
3345
3346         Reviewed by Alex Christensen.
3347
3348         Fix compile errors after enabling custom element API.
3349
3350         * bindings/js/JSHTMLElementCustom.cpp:
3351         (WebCore::constructJSHTMLElement):
3352         * dom/CustomElementDefinitions.cpp:
3353         (WebCore::CustomElementDefinitions::addElementDefinition):
3354         * dom/Document.cpp:
3355         (WebCore::createHTMLElementWithNameValidation):
3356         (WebCore::createFallbackHTMLElement):
3357         * dom/Element.cpp:
3358         (WebCore::Element::attributeChanged):
3359         * dom/LifecycleCallbackQueue.cpp:
3360         (WebCore::LifecycleQueueItem::LifecycleQueueItem):
3361         (WebCore::LifecycleCallbackQueue::enqueueElementUpgrade):
3362         (WebCore::LifecycleCallbackQueue::enqueueAttributeChangedCallback):
3363         * html/parser/HTMLConstructionSite.cpp:
3364         (WebCore::HTMLConstructionSite::insertHTMLElementOrFindCustomElementInterface):
3365         (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
3366         * html/parser/HTMLDocumentParser.cpp:
3367         (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder):
3368         * html/parser/HTMLTreeBuilder.cpp:
3369         (WebCore::CustomElementConstructionData::CustomElementConstructionData):
3370         (WebCore::HTMLTreeBuilder::insertGenericHTMLElement):
3371         * html/parser/HTMLTreeBuilder.h:
3372
3373 2016-06-28  Philippe Normand  <pnormand@igalia.com>
3374
3375         [GStreamer] usec rounding is wrong during accurate seeking
3376         https://bugs.webkit.org/show_bug.cgi?id=90734
3377
3378         Reviewed by Carlos Garcia Campos.
3379
3380         Use floor() to round the microseconds value, this is more robust
3381         than roundf.
3382
3383         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
3384         (WebCore::toGstClockTime):
3385         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3386         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
3387
3388 2016-06-28  Philippe Normand  <pnormand@igalia.com>
3389
3390         [GStreamer] improved duration query support in the HTTP source element
3391         https://bugs.webkit.org/show_bug.cgi?id=159204
3392
3393         Reviewed by Carlos Garcia Campos.
3394
3395         When we have the Content-Length value it is possible to infer the TIME
3396         duration in most cases by performing a convert query in the downstream
3397         elements. This is especially useful when the duration query wasn't
3398         managed by the sinks and thus reached the source element.
3399
3400         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3401         (webKitWebSrcQueryWithParent):
3402
3403 2016-06-28  Youenn Fablet  <youenn@apple.com>
3404
3405         Binding generator should generate accessors for constructors safely accessed from JS builtin
3406         https://bugs.webkit.org/show_bug.cgi?id=159087
3407
3408         Reviewed by Alex Christensen.
3409
3410         Removed constructor private slots direct additions in JSDOMGlobalObject.
3411         Added support for generating the code that will do that.
3412         Advantage of the implementation:
3413         - Private slots will expose constructors that are also publically visible (previously workers had some private slots filled with WebRTC constructors).
3414         - Private slots no longer require the creation of the constructors at window creation time.
3415
3416         Although PublicIdentifier and PrivateIdentifier are both added where needed, the binding generator does not
3417         support the case of a constructor accessible only privately.
3418
3419         Covered by existing test set and adding binding test.
3420
3421         * Modules/mediastream/MediaStream.idl: Marked as PublicIdentifier/PrivateIdentifier.
3422         * Modules/mediastream/MediaStreamTrack.idl: Ditto.
3423         * Modules/mediastream/RTCIceCandidate.idl: Ditto.
3424         * Modules/mediastream/RTCSessionDescription.idl: Ditto.
3425         * Modules/streams/ReadableStream.idl: Ditto.
3426         * bindings/js/JSDOMGlobalObject.cpp:
3427         (WebCore::JSDOMGlobalObject::addBuiltinGlobals): Removed unneeded additions.
3428         * bindings/scripts/CodeGeneratorJS.pm:
3429         (GenerateImplementation): Added support for private slots for interface constructors marked as
3430         PrivateIdentifier.
3431         * bindings/scripts/preprocess-idls.pl:
3432         (GenerateConstructorAttribute): Make PublicIdentifier/PrivateIdentifier copied interface attributes.
3433         * bindings/scripts/test/GObject/WebKitDOMTestGlobalObject.cpp:
3434         (webkit_dom_test_global_object_set_property):
3435         (webkit_dom_test_global_object_get_property):
3436         (webkit_dom_test_global_object_class_init):