3d302ebaf23056063cbd8251bf95e4d53a93843a
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-05-25  Zalan Bujtas  <zalan@apple.com>
2
3         Swap search field's cancel and result button for RTL content.
4         https://bugs.webkit.org/show_bug.cgi?id=158007
5
6         Reviewed by Dean Jackson.
7
8         Test: fast/forms/search-input-rtl.html
9
10         * css/html.css:
11         (input[type="search"]::-webkit-textfield-decoration-container): Deleted.
12         * rendering/RenderThemeMac.mm:
13         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
14         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
15
16 2016-05-25  Myles C. Maxfield  <mmaxfield@apple.com>
17
18         [Font Loading] ASSERT if calling FontFace.loaded twice with a garbage collection between them
19         https://bugs.webkit.org/show_bug.cgi?id=158015
20
21         Reviewed by Darin Adler.
22
23         The following scenario may occur:
24
25         1. We create a FontFace object
26         2. We create an associated JSFontFace object
27         3. We start loading the FontFace, which causes an extra ref to hang around until loading finishes
28         4. Javascript calls the "loaded" attribute on the FontFace, which saves a promise inside the FontFace
29         5. The FontFace goes out of scope in Javascript
30         6. A garbage collection occurs, causing us to delete the JSFontFace object
31         7. Javascript then encounters the FontFace object without first going through a reference to a JSFontFace.
32         It can do this via iterating through a FontFaceSet. We respond to this situation by creating a new
33         JSFontFace object and associating it with the existing FontFace.
34         8. Javascript calls the "loaded" attribute
35
36         In this situation, the newer JSFontFace object is out of sync with the older FontFace object. In
37         particular, the FontFace has a saved promise, but the JSFontFace doesn't know about it. Therefore,
38         the JSFontFace should be flexible to the presence of this member.
39
40         Test: fast/text/font-face-crash-2.html
41
42         * bindings/js/JSDOMPromise.h:
43         (WebCore::DOMPromise::deferredWrapper):
44         * bindings/js/JSFontFaceCustom.cpp:
45         (WebCore::JSFontFace::loaded):
46         * css/FontFace.h:
47
48 2016-05-25  Antti Koivisto  <antti@apple.com>
49
50         Shadow DOM: RenderTreePosition miscomputed when display:contents value changes
51         https://bugs.webkit.org/show_bug.cgi?id=158072
52         rdar://problem/25766333
53
54         Reviewed by Darin Adler.
55
56         Test: fast/shadow-dom/slot-crash.html
57
58         * style/RenderTreePosition.h:
59         (WebCore::RenderTreePosition::invalidateNextSibling):
60
61             Add unconditional invalidation function.
62
63         * style/RenderTreeUpdater.cpp:
64         (WebCore::RenderTreeUpdater::updateElementRenderer):
65
66             With display:contents rendering siblings may be found from the subtree and the existing cached
67             position may become invalid.
68             If the display:contents value changes invalidate the current render tree position.
69
70 2016-05-25  Brady Eidson  <beidson@apple.com>
71
72         Modern IDB: IDB objects from a worker thread might be destroyed on the main thread.
73         https://bugs.webkit.org/show_bug.cgi?id=158004
74
75         Reviewed by Alex Christensen.
76
77         No new tests (Spuriously reproduces on the bots, but I've been unable to construct a reliable test).
78
79         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
80         (WebCore::IDBClient::IDBConnectionProxy::completeOpenDBRequest):
81         (WebCore::IDBClient::IDBConnectionProxy::notifyOpenDBRequestBlocked):
82         (WebCore::IDBClient::IDBConnectionProxy::didCommitTransaction):
83         (WebCore::IDBClient::IDBConnectionProxy::didAbortTransaction):
84         (WebCore::IDBClient::IDBConnectionProxy::unregisterDatabaseConnection):
85         (WebCore::IDBClient::removeItemsMatchingCurrentThread):
86         (WebCore::IDBClient::IDBConnectionProxy::forgetActivityForCurrentThread): Clear out all objects that originated on this thread.
87         (WebCore::IDBClient::IDBConnectionProxy::takeIDBOpenDBRequest): Deleted.
88         * Modules/indexeddb/client/IDBConnectionProxy.h:
89
90         * workers/WorkerGlobalScope.cpp:
91         (WebCore::WorkerGlobalScope::stopIndexedDatabase):
92         * workers/WorkerGlobalScope.h:
93
94         * workers/WorkerThread.cpp:
95         (WebCore::WorkerThread::stop):
96
97 2016-05-25  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
98
99         Remove unused slotBase parameter in bindings generator
100         https://bugs.webkit.org/show_bug.cgi?id=158068
101
102         Reviewed by Darin Adler.
103
104         Remove unused slotBase parameter from attribute Getter functions.
105
106         * bindings/scripts/CodeGeneratorJS.pm:
107         (GenerateImplementation):
108         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
109         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
110         * bindings/scripts/test/JS/JSTestException.cpp:
111         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
112         * bindings/scripts/test/JS/JSTestInterface.cpp:
113         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
114         * bindings/scripts/test/JS/JSTestNode.cpp:
115         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
116         * bindings/scripts/test/JS/JSTestObj.cpp:
117         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
118         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
119         * bindings/scripts/test/JS/JSattribute.cpp:
120
121 2016-05-25  Alex Christensen  <achristensen@webkit.org>
122
123         Include fewer headers from headers
124         https://bugs.webkit.org/show_bug.cgi?id=158043
125
126         Reviewed by Brady Eidson.
127
128         * platform/graphics/GraphicsContext.h:
129         * rendering/svg/RenderSVGResourceClipper.h:
130         (isType):
131         * rendering/svg/RenderSVGResourceMasker.h:
132
133 2016-05-25  Eric Carlson  <eric.carlson@apple.com>
134
135         ASSERT in WebCore::TextTrackList::remove when running media/track/track-remove-track.html
136         https://bugs.webkit.org/show_bug.cgi?id=158071
137         <rdar://problem/26432041>
138
139         Reviewed by Chris Dumez.
140
141         No new tests, this prevents media/track/track-remove-track.html from crashing.
142
143         * html/track/TextTrackList.cpp:
144         (TextTrackList::remove): Don't assert when the media element has  been set to null.
145
146 2016-05-25  Zalan Bujtas  <zalan@apple.com>
147
148         Addressing post-review comments on r200971.
149
150         Reviewed by Darin Adler.
151
152         * page/EventHandler.cpp:
153         (WebCore::EventHandler::hitTestResultAtPoint):
154
155 2016-05-25  Manuel Rego Casasnovas  <rego@igalia.com>
156
157         [css-grid] Simplify grid track sizes parsing
158         https://bugs.webkit.org/show_bug.cgi?id=158021
159
160         Reviewed by Sergio Villar Senin.
161
162         Previously once we saw an auto-repeat function,
163         we passed the "FixedSizeOnly" restriction to the rest of methods.
164         That way we were sure that all the tracks after the auto-repeat
165         had fixed sizes.
166         But we needed to call allTracksAreFixedSized() to be sure that
167         the tracks before the auto-repeat had fixed sizes too.
168
169         Now we're introducing a new boolean |allTracksAreFixedSized|,
170         to check in advance if the declaration contains any track not fixed.
171         If that's the case and we found an auto-repeat method,
172         we consider it invalid.
173         With this approach we avoid the loop to verify
174         that all the tracks (before and after the auto-repeat) are fixed.
175         It also allows us to simplify the code and avoid passing
176         the restriction to all the methods parsing the track size.
177
178         No new tests, no change of behavior.
179
180         * css/CSSParser.cpp:
181         (WebCore::isGridTrackFixedSized): New method to check if a grid track
182         size is fixed or not (based on old allTracksAreFixedSized()).
183         (WebCore::CSSParser::parseGridTrackList): Add new boolean to detect
184         if any track has not a fixed size.
185         (WebCore::CSSParser::parseGridTrackRepeatFunction): Ditto.
186         (WebCore::CSSParser::parseGridTrackSize): Remove usage of
187         TrackSizeRestriction enum.
188         Check here if |minTrackBreadth| is a flexible size.
189         (WebCore::CSSParser::parseGridBreadth): Remove usage of
190         TrackSizeRestriction enum.
191         (WebCore::allTracksAreFixedSized): Deleted.
192         * css/CSSParser.h: Remove TrackSizeRestriction enum and update headers.
193
194 2016-05-25  Sergio Villar Senin  <svillar@igalia.com>
195
196         [css-grid] Refactor populateGridPositions()
197         https://bugs.webkit.org/show_bug.cgi?id=158065
198
199         Reviewed by Carlos Garcia Campos.
200
201         RenderGrid::populateGridPositions() was doing exactly the same thing for columns and rows
202         but using different data structures. That lead to a lot of duplicated code. It's easy to
203         refactor it in a new function that properly select the data structures to operate on based
204         on the direction.
205
206         No new tests as there is no change in behaviour.
207
208         * rendering/RenderGrid.cpp:
209         (WebCore::RenderGrid::layoutGridItems):
210         (WebCore::RenderGrid::populateGridPositionsForDirection): Refactored from
211         populateGridPositions().
212         (WebCore::RenderGrid::populateGridPositions): Deleted.
213         * rendering/RenderGrid.h:
214
215 2016-05-25  Commit Queue  <commit-queue@webkit.org>
216
217         Unreviewed, rolling out r201373.
218         https://bugs.webkit.org/show_bug.cgi?id=158064
219
220         Several tests are hitting the ASSERT (Requested by rego on
221         #webkit).
222
223         Reverted changeset:
224
225         "[css-grid] Simplify grid track sizes parsing"
226         https://bugs.webkit.org/show_bug.cgi?id=158021
227         http://trac.webkit.org/changeset/201373
228
229 2016-05-25  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
230
231         Purge PassRefPtr from TouchList
232         https://bugs.webkit.org/show_bug.cgi?id=157985
233
234         Reviewed by Darin Adler.
235
236         Use RefPtr&& argument instead of PassRefPtr in append()
237
238         * dom/TouchList.h:
239         (WebCore::TouchList::append):
240         * page/EventHandler.cpp:
241         (WebCore::EventHandler::handleTouchEvent):
242
243 2016-05-25  Antoine Quint  <graouts@apple.com>
244
245         Elements with backdrop-filter cannot be clipped with clip-path or mask
246         https://bugs.webkit.org/show_bug.cgi?id=142662
247         <rdar://problem/20150192>
248
249         Reviewed by Dean Jackson.
250
251         We used to only apply the mask to the layer contents but did not account
252         for the fact that a layer backdrop may exist. We now correctly mask the
253         backdrop layer as well as the layer contents.
254
255         Test: css3/filters/backdrop/backdrop-filter-with-clip-path.html
256
257         * platform/graphics/ca/GraphicsLayerCA.cpp:
258         (WebCore::GraphicsLayerCA::updateShape):
259         Ensure clones of a layer use the same shape path.
260
261         (WebCore::GraphicsLayerCA::updateMaskLayer):
262         If we have a backdrop layer, ensure that we apply a clone of the mask layer applied to
263         the layer contents.
264
265 2016-05-25  Manuel Rego Casasnovas  <rego@igalia.com>
266
267         [css-grid] Simplify grid track sizes parsing
268         https://bugs.webkit.org/show_bug.cgi?id=158021
269
270         Reviewed by Sergio Villar Senin.
271
272         Previously once we saw an auto-repeat function,
273         we passed the "FixedSizeOnly" restriction to the rest of methods.
274         That way we were sure that all the tracks after the auto-repeat
275         had fixed sizes.
276         But we needed to call allTracksAreFixedSized() to be sure that
277         the tracks before the auto-repeat had fixed sizes too.
278
279         Now we're introducing a new boolean |allTracksAreFixedSized|,
280         to check in advance if the declaration contains any track not fixed.
281         If that's the case and we found an auto-repeat method,
282         we consider it invalid.
283         With this approach we avoid the loop to verify
284         that all the tracks (before and after the auto-repeat) are fixed.
285         It also allows us to simplify the code and avoid passing
286         the restriction to all the methods parsing the track size.
287
288         No new tests, no change of behavior.
289
290         * css/CSSParser.cpp:
291         (WebCore::isGridTrackFixedSized): New method to check if a grid track
292         size is fixed or not (based on old allTracksAreFixedSized()).
293         (WebCore::CSSParser::parseGridTrackList): Add new boolean to detect
294         if any track has not a fixed size.
295         (WebCore::CSSParser::parseGridTrackRepeatFunction): Ditto.
296         (WebCore::CSSParser::parseGridTrackSize): Remove usage of
297         TrackSizeRestriction enum.
298         Check here if |minTrackBreadth| is a flexible size.
299         (WebCore::CSSParser::parseGridBreadth): Remove usage of
300         TrackSizeRestriction enum.
301         (WebCore::allTracksAreFixedSized): Deleted.
302         * css/CSSParser.h: Remove TrackSizeRestriction enum and update headers.
303
304 2016-05-24  Myles C. Maxfield  <mmaxfield@apple.com>
305
306         [Font Loading] Crash during font download failure after garbage collection
307         https://bugs.webkit.org/show_bug.cgi?id=158013
308         <rdar://problem/25148032>
309
310         Reviewed by Darin Adler.
311
312         Usually, ownership during font loading is top-down - JavaScript owns a JSFontFace,
313         which owns a FontFace, which owns a CSSFontFace. However, when we receive the
314         asynchronous callback that a font finished loading, the call comes in from the
315         bottom - it is delivered from the CSSFontFaceSource to the CSSFontFace, and then
316         to the FontFace. If a garbage collection had previously run, we might remove
317         the last reference to ourself during this asynchronous callback. A simple guard
318         makes sure this doesn't happen.
319
320         Test: fast/text/font-face-crash.html
321
322         * css/CSSFontFace.cpp:
323         (WebCore::CSSFontFace::fontLoaded):
324
325 2016-05-24  Ryan Haddad  <ryanhaddad@apple.com>
326
327         Unreviewed, rolling out r201349.
328
329         This change caused compositing tests to assert on iOS
330         simulator
331
332         Reverted changeset:
333
334         "Elements with backdrop-filter cannot be clipped with clip-
335         path or mask"
336         https://bugs.webkit.org/show_bug.cgi?id=142662
337         http://trac.webkit.org/changeset/201349
338
339 2016-05-24  Brady Eidson  <beidson@apple.com>
340
341         Modern IDB: (Workers) Eliminate race in getting the ScriptExecutionContext and using it.
342         https://bugs.webkit.org/show_bug.cgi?id=158038
343
344         Reviewed by Alex Christensen.
345
346         No new tests (Resolves potential flakes in existing tests).
347         
348         When the main thread is trying to post a task to a worker thread's ScriptExecutionContext, there is a race
349         between checking that the context still exists and actually using it.
350         
351         The solution is to add a new class - IDBActiveDOMObject - which does a few things things:
352         1 - Remembers its origin thread.
353         2 - Guards clearing its ScriptExecutionContext with a Lock.
354         3 - Adds a templated "performCallbackOnOriginThread" that uses the same Lock to make sure posting the task to
355             the ScriptExecutionContext's RunLoop is safe.
356
357         Also, tons of ASSERTions are updated because each object with an originThread no longer keeps its idea in an
358         accessible member variable.
359         
360         * Modules/indexeddb/IDBActiveDOMObject.h:
361         (WebCore::IDBActiveDOMObject::originThreadID):
362         (WebCore::IDBActiveDOMObject::performCallbackOnOriginThread):
363         (WebCore::IDBActiveDOMObject::IDBActiveDOMObject):
364         
365         * Modules/indexeddb/IDBDatabase.cpp:
366         (WebCore::IDBDatabase::IDBDatabase):
367         (WebCore::IDBDatabase::~IDBDatabase):
368         (WebCore::IDBDatabase::hasPendingActivity):
369         (WebCore::IDBDatabase::name):
370         (WebCore::IDBDatabase::version):
371         (WebCore::IDBDatabase::objectStoreNames):
372         (WebCore::IDBDatabase::createObjectStore):
373         (WebCore::IDBDatabase::transaction):
374         (WebCore::IDBDatabase::deleteObjectStore):
375         (WebCore::IDBDatabase::close):
376         (WebCore::IDBDatabase::didCloseFromServer):
377         (WebCore::IDBDatabase::maybeCloseInServer):
378         (WebCore::IDBDatabase::activeDOMObjectName):
379         (WebCore::IDBDatabase::canSuspendForDocumentSuspension):
380         (WebCore::IDBDatabase::stop):
381         (WebCore::IDBDatabase::startVersionChangeTransaction):
382         (WebCore::IDBDatabase::didStartTransaction):
383         (WebCore::IDBDatabase::willCommitTransaction):
384         (WebCore::IDBDatabase::didCommitTransaction):
385         (WebCore::IDBDatabase::willAbortTransaction):
386         (WebCore::IDBDatabase::didAbortTransaction):
387         (WebCore::IDBDatabase::didCommitOrAbortTransaction):
388         (WebCore::IDBDatabase::fireVersionChangeEvent):
389         (WebCore::IDBDatabase::dispatchEvent):
390         (WebCore::IDBDatabase::didCreateIndexInfo):
391         (WebCore::IDBDatabase::didDeleteIndexInfo):
392         * Modules/indexeddb/IDBDatabase.h:
393         (WebCore::IDBDatabase::originThreadID): Deleted.
394         
395         * Modules/indexeddb/IDBRequest.cpp:
396         (WebCore::IDBRequest::IDBRequest):
397         (WebCore::IDBRequest::~IDBRequest):
398         (WebCore::IDBRequest::errorCode):
399         (WebCore::IDBRequest::error):
400         (WebCore::IDBRequest::setSource):
401         (WebCore::IDBRequest::setVersionChangeTransaction):
402         (WebCore::IDBRequest::transaction):
403         (WebCore::IDBRequest::readyState):
404         (WebCore::IDBRequest::sourceObjectStoreIdentifier):
405         (WebCore::IDBRequest::sourceIndexIdentifier):
406         (WebCore::IDBRequest::requestedIndexRecordType):
407         (WebCore::IDBRequest::eventTargetInterface):
408         (WebCore::IDBRequest::activeDOMObjectName):
409         (WebCore::IDBRequest::canSuspendForDocumentSuspension):
410         (WebCore::IDBRequest::hasPendingActivity):
411         (WebCore::IDBRequest::stop):
412         (WebCore::IDBRequest::enqueueEvent):
413         (WebCore::IDBRequest::dispatchEvent):
414         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
415         (WebCore::IDBRequest::setResult):
416         (WebCore::IDBRequest::setResultToStructuredClone):
417         (WebCore::IDBRequest::clearResult):
418         (WebCore::IDBRequest::setResultToUndefined):
419         (WebCore::IDBRequest::resultCursor):
420         (WebCore::IDBRequest::willIterateCursor):
421         (WebCore::IDBRequest::didOpenOrIterateCursor):
422         (WebCore::IDBRequest::requestCompleted):
423         (WebCore::IDBRequest::onError):
424         (WebCore::IDBRequest::onSuccess):
425         * Modules/indexeddb/IDBRequest.h:
426         (WebCore::IDBRequest::originThreadID): Deleted.
427         
428         * Modules/indexeddb/IDBTransaction.cpp:
429         (WebCore::IDBTransaction::IDBTransaction):
430         (WebCore::IDBTransaction::originThreadID): Deleted.
431         * Modules/indexeddb/IDBTransaction.h:
432         
433         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
434         (WebCore::IDBClient::IDBConnectionProxy::completeOpenDBRequest):
435         (WebCore::IDBClient::IDBConnectionProxy::completeOperation):
436         (WebCore::IDBClient::IDBConnectionProxy::fireVersionChangeEvent):
437         (WebCore::IDBClient::IDBConnectionProxy::notifyOpenDBRequestBlocked):
438         (WebCore::IDBClient::IDBConnectionProxy::didStartTransaction):
439         (WebCore::IDBClient::IDBConnectionProxy::didCommitTransaction):
440         (WebCore::IDBClient::IDBConnectionProxy::didAbortTransaction):
441         (WebCore::IDBClient::IDBConnectionProxy::didCloseFromServer):
442         (WebCore::IDBClient::performCallbackOnCorrectThread): Deleted.
443         
444         * Modules/indexeddb/client/TransactionOperation.cpp:
445         (WebCore::IDBClient::TransactionOperation::scriptExecutionContext): Deleted.
446         * Modules/indexeddb/client/TransactionOperation.h:
447         (WebCore::IDBClient::TransactionOperation::performCompleteOnOriginThread):
448         
449         * WebCore.xcodeproj/project.pbxproj:
450
451 2016-05-23  Ada Chan  <adachan@apple.com>
452
453         Only set overflow:hidden on -webkit-media-controls when the placeholder is showing.
454         https://bugs.webkit.org/show_bug.cgi?id=157975
455
456         Reviewed by Eric Carlson.
457
458         Test: media/mac/controls-panel-not-clipped-out.html
459
460         overflow:hidden was added to clip out content contained in -webkit-media-controls
461         that sticks out of the bounds of that container when the inlinePlaybackPlaceholder
462         is showing. However, that style also clips out things that we want to show when the
463         inlinePlaybackPlaceholder is not showing. For example, the volume slider or the
464         controls panel when the video element's height is too short.
465
466         To fix that, we only set overflow:hidden on -webkit-media-controls when the
467         inlinePlaybackPlaceholder is visible.
468
469         * Modules/mediacontrols/mediaControlsApple.css:
470         (::-webkit-media-controls):
471         (::-webkit-media-controls.placeholder-showing):
472         Set overflow:hidden only when the placeholder is showing.
473
474         * Modules/mediacontrols/mediaControlsApple.js:
475         (Controller.prototype.handlePresentationModeChange):
476         Add the placeholderShowing class to -webkit-media-controls only when the
477         inlinePlaybackPlaceholder is not hidden.
478
479 2016-05-24  Ryan Haddad  <ryanhaddad@apple.com>
480
481         Unreviewed, rolling out r201341.
482
483         This change may have caused LayoutTests to crash on Mac and
484         iOS
485
486         Reverted changeset:
487
488         "Use lambda capture with initializer instead of StringCapture"
489         https://bugs.webkit.org/show_bug.cgi?id=158010
490         http://trac.webkit.org/changeset/201341
491
492 2016-05-24  Adam Bergkvist  <adam.bergkvist@ericsson.com>
493
494         WebRTC: RTCIceCandidate: Make attributes readonly (and update constructor arg)
495         https://bugs.webkit.org/show_bug.cgi?id=157859
496
497         Reviewed by Eric Carlson.
498
499         Make the RTCIceCandidate constructor argument mandatory and the attributes
500         read-only (in accordance with the WebRTC 1.0 specification [1]).
501
502         [1] https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#rtcicecandidate-interface
503
504         Updated existing test.
505
506         * Modules/mediastream/RTCIceCandidate.h:
507         (WebCore::RTCIceCandidate::setCandidate): Deleted.
508         (WebCore::RTCIceCandidate::setSdpMid): Deleted.
509         (WebCore::RTCIceCandidate::setSdpMLineIndex): Deleted.
510         * Modules/mediastream/RTCIceCandidate.idl:
511
512 2016-05-24  Antoine Quint  <graouts@apple.com>
513
514         Elements with backdrop-filter cannot be clipped with clip-path or mask
515         https://bugs.webkit.org/show_bug.cgi?id=142662
516         <rdar://problem/20150192>
517
518         Reviewed by Dean Jackson.
519
520         We used to only apply the mask to the layer contents but did not account
521         for the fact that a layer backdrop may exist. We now correctly mask the
522         backdrop layer as well as the layer contents.
523
524         Test: css3/filters/backdrop/backdrop-filter-with-clip-path.html
525
526         * platform/graphics/ca/GraphicsLayerCA.cpp:
527         (WebCore::GraphicsLayerCA::updateShape):
528         Ensure clones of a layer use the same shape path.
529
530         (WebCore::GraphicsLayerCA::updateMaskLayer):
531         If we have a backdrop layer, ensure that we apply a clone of the mask layer applied to
532         the layer contents.
533
534 2016-05-24  Zalan Bujtas  <zalan@apple.com>
535
536         fast/table/neighboring-cells-when-collapsed-border-changes.html is flaky.
537         https://bugs.webkit.org/show_bug.cgi?id=158009
538
539         Reviewed by David Hyatt.
540
541         RenderTable::invalidateCollapsedBorders() early returns on m_collapsedEmptyBorderIsPresent
542         which prevents us from marking neighboring cells dirty when style changes.
543         Decouple the "invalidate the collapsed borders" and the "mark the neighboring cells dirty" logic.
544
545         Covered by existing tests. (and now we agree with FF on cached-change-cell-border-width.html)
546
547         * rendering/RenderTable.cpp:
548         (WebCore::RenderTable::invalidateCollapsedBorders):
549         (WebCore::markCellDirtyWhenCollapsedBorderChanges): Deleted.
550         * rendering/RenderTableCell.cpp:
551         (WebCore::markCellDirtyWhenCollapsedBorderChanges):
552         (WebCore::RenderTableCell::styleDidChange):
553
554 2016-05-24  Alex Christensen  <achristensen@webkit.org>
555
556         Fix use-after-free after r201318
557         https://bugs.webkit.org/show_bug.cgi?id=158037
558         rdar://problem/26446729
559
560         Reviewed by Brady Eidson.
561
562         This fixes a crash when running fast/dom/navigation-with-sideeffects.html with GuardMalloc.
563
564         * bindings/scripts/CodeGeneratorJS.pm:
565         (GenerateImplementation):
566         * bindings/scripts/test/JS/JSTestObj.cpp:
567         (WebCore::setJSTestObjPutForwardsNullableAttribute):
568         Changing RefPtr<${type}> to auto caused the type to sometimes be a raw pointer, which does not keep the object alive.
569         In the case of JSDocument.cpp, forwardedImpl was what Document::location returned, which is a Location* and not a RefPtr<Location>.
570
571 2016-05-24  Chris Dumez  <cdumez@apple.com>
572
573         Use lambda capture with initializer instead of StringCapture
574         https://bugs.webkit.org/show_bug.cgi?id=158010
575
576         Reviewed by Antti Koivisto.
577
578         Use lambda capture with initializer instead of StringCapture now that
579         we support C++14.
580
581         * fileapi/AsyncFileStream.cpp:
582         (WebCore::AsyncFileStream::getSize):
583         (WebCore::AsyncFileStream::openForRead):
584         (WebCore::AsyncFileStream::openForWrite):
585         * loader/DocumentLoader.cpp:
586         (WebCore::DocumentLoader::installContentFilterUnblockHandler):
587         * loader/WorkerThreadableLoader.cpp:
588         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
589         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
590         (WebVideoFullscreenControllerContext::setExternalPlayback):
591         * platform/network/curl/CurlDownload.cpp:
592         (WebCore::CurlDownload::didReceiveHeader):
593         * workers/WorkerMessagingProxy.cpp:
594         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
595         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
596
597 2016-05-24  Said Abou-Hallawa  <sabouhallawa@apple.com>
598
599         In accelerated drawing mode, ImageBuffer::putByteArray() should copy the bytes directly to the IOSurface backing store
600         https://bugs.webkit.org/show_bug.cgi?id=157966
601
602         Reviewed by Dean Jackson.
603         
604         Roll out the the change of r106836 in ImageBuffer::putByteArray(). r106836
605         was using CG to draw the image data as a native image in the accelerated
606         drawing mode just to force invalidating the IOSurface cached image. Instead
607         of doing that, we can use a light-weight fix, for now, to force recreating
608         the IOSurface image if it is requested through CGIOSurfaceContextCreateImage().
609
610         * platform/graphics/cg/ImageBufferCG.cpp:
611         (WebCore::ImageBuffer::putByteArray):
612
613 2016-05-24  Chris Dumez  <cdumez@apple.com>
614
615         Use auto for some of our lambda function parameters
616         https://bugs.webkit.org/show_bug.cgi?id=158001
617
618         Reviewed by Darin Adler.
619
620         Use auto for some of our lambda function parameters now that we build with c++14.
621
622         * Modules/mediasource/MediaSource.cpp:
623         (WebCore::MediaSource::buffered):
624         (WebCore::MediaSource::monitorSourceBuffers):
625         (WebCore::MediaSource::endOfStream):
626         * Modules/mediasource/SampleMap.cpp:
627         (WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRangeFromEnd):
628         * accessibility/AccessibilityRenderObject.cpp:
629         (WebCore::AccessibilityRenderObject::ariaSelectedRows):
630         * bindings/js/SerializedScriptValue.cpp:
631         (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
632         * css/CSSValueList.cpp:
633         (WebCore::CSSValueList::removeAll):
634         * css/MediaList.cpp:
635         (WebCore::MediaQuerySet::remove):
636         * css/MediaQuery.cpp:
637         (WebCore::MediaQuery::MediaQuery):
638         * css/MediaQueryMatcher.cpp:
639         (WebCore::MediaQueryMatcher::removeListener):
640         * dom/Document.cpp:
641         (WebCore::Document::validateAutoSizingNodes):
642         * dom/Element.cpp:
643         (WebCore::Element::detachAttrNodeFromElementWithValue):
644         * dom/MutationObserver.cpp:
645         (WebCore::MutationObserver::deliverAllMutations):
646         * dom/Node.cpp:
647         (WebCore::Node::unregisterMutationObserver):
648         * html/LinkIconCollector.cpp:
649         * inspector/InspectorIndexedDBAgent.cpp:
650         (WebCore::InspectorIndexedDBAgent::requestDatabaseNames):
651         * loader/ResourceLoader.cpp:
652         (WebCore::ResourceLoader::loadDataURL):
653         * page/CaptionUserPreferences.cpp:
654         (WebCore::CaptionUserPreferences::sortedTrackListForMenu):
655         * page/CaptionUserPreferencesMediaAF.cpp:
656         (WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu):
657         * page/animation/AnimationController.cpp:
658         (WebCore::AnimationControllerPrivate::clear):
659         * platform/graphics/FontCascade.cpp:
660         (WebCore::pruneUnreferencedEntriesFromFontCascadeCache):
661         * platform/graphics/FontCascadeFonts.cpp:
662         (WebCore::FontCascadeFonts::pruneSystemFallbacks):
663         * platform/graphics/PathUtilities.cpp:
664         (WebCore::addIntersectionPoints):
665         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
666         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):
667         * platform/graphics/texmap/TextureMapperGL.cpp:
668         (WebCore::TextureMapperGLData::SharedGLData::~SharedGLData):
669         * platform/mac/HIDGamepad.cpp:
670         (WebCore::HIDGamepad::initElements):
671         * svg/SVGToOTFFontConversion.cpp:
672         (WebCore::SVGToOTFFontConverter::appendLigatureSubtable):
673         (WebCore::SVGToOTFFontConverter::finishAppendingKERNSubtable):
674
675 2016-05-24  Antti Koivisto  <antti@apple.com>
676
677         REGRESSION (r196629): Safari can get into a state where switching Reader theme doesn't apply to the webpage
678         https://bugs.webkit.org/show_bug.cgi?id=158018
679         <rdar://problem/24732776>
680
681         Reviewed by Darin Adler.
682
683         When a tab goes to background we clear the style resolver. It is recreated lazily when the tab is again active.
684         However style invalidation code tests if the style resolver exists and skips the invalidation if it doesn't.
685         With sufficiently simple document (like in Reader) we may never create one for other reasons and so style
686         invalidation doesn't work.
687
688         No test, don't know how to make one.
689
690         * dom/Element.cpp:
691         (WebCore::Element::needsStyleInvalidation):
692
693             Remove styleResolverIfExists() check and do the invalidation normally.
694             Instead check for forced style recalc. If there is one pending we don't need to bother with invalidation.
695
696 2016-05-24  Yusuke Suzuki  <utatane.tea@gmail.com>
697
698         Unreviewed, updating binding test results
699         https://bugs.webkit.org/show_bug.cgi?id=157080
700
701         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
702         (WebCore::jsTestActiveDOMObjectExcitingAttr):
703         (WebCore::jsTestActiveDOMObjectConstructor):
704         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
705         (WebCore::jsTestClassWithJSBuiltinConstructorConstructor):
706         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
707         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
708         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
709         (WebCore::jsTestCustomNamedGetterConstructor):
710         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
711         (WebCore::jsTestEventConstructorAttr1):
712         (WebCore::jsTestEventConstructorAttr2):
713         (WebCore::jsTestEventConstructorAttr3):
714         (WebCore::jsTestEventConstructorConstructor):
715         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
716         (WebCore::jsTestEventTargetConstructor):
717         * bindings/scripts/test/JS/JSTestException.cpp:
718         (WebCore::jsTestExceptionName):
719         (WebCore::jsTestExceptionConstructor):
720         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
721         (WebCore::jsTestGenerateIsReachableConstructor):
722         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
723         (WebCore::jsTestGlobalObjectRegularAttribute):
724         (WebCore::jsTestGlobalObjectEnabledAtRuntimeAttribute):
725         (WebCore::jsTestGlobalObjectConstructor):
726         * bindings/scripts/test/JS/JSTestInterface.cpp:
727         (WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttr):
728         (WebCore::jsTestInterfaceConstructorImplementsStaticAttr):
729         (WebCore::jsTestInterfaceImplementsStr1):
730         (WebCore::jsTestInterfaceImplementsStr2):
731         (WebCore::jsTestInterfaceImplementsStr3):
732         (WebCore::jsTestInterfaceImplementsNode):
733         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
734         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
735         (WebCore::jsTestInterfaceSupplementalStr1):
736         (WebCore::jsTestInterfaceSupplementalStr2):
737         (WebCore::jsTestInterfaceSupplementalStr3):
738         (WebCore::jsTestInterfaceSupplementalNode):
739         (WebCore::jsTestInterfaceConstructor):
740         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
741         (WebCore::jsTestJSBuiltinConstructorTestAttributeCustom):
742         (WebCore::jsTestJSBuiltinConstructorTestAttributeRWCustom):
743         (WebCore::jsTestJSBuiltinConstructorConstructor):
744         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
745         (WebCore::jsTestMediaQueryListListenerConstructor):
746         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
747         (WebCore::jsTestNamedConstructorConstructor):
748         * bindings/scripts/test/JS/JSTestNode.cpp:
749         (WebCore::jsTestNodeName):
750         (WebCore::jsTestNodeConstructor):
751         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
752         (WebCore::jsTestNondeterministicNondeterministicReadonlyAttr):
753         (WebCore::jsTestNondeterministicNondeterministicWriteableAttr):
754         (WebCore::jsTestNondeterministicNondeterministicExceptionAttr):
755         (WebCore::jsTestNondeterministicNondeterministicGetterExceptionAttr):
756         (WebCore::jsTestNondeterministicNondeterministicSetterExceptionAttr):
757         (WebCore::jsTestNondeterministicConstructor):
758         * bindings/scripts/test/JS/JSTestObj.cpp:
759         (WebCore::jsTestObjReadOnlyLongAttr):
760         (WebCore::jsTestObjReadOnlyStringAttr):
761         (WebCore::jsTestObjReadOnlyTestObjAttr):
762         (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
763         (WebCore::jsTestObjConstructorStaticStringAttr):
764         (WebCore::jsTestObjConstructorTestSubObj):
765         (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
766         (WebCore::jsTestObjEnumAttr):
767         (WebCore::jsTestObjByteAttr):
768         (WebCore::jsTestObjOctetAttr):
769         (WebCore::jsTestObjShortAttr):
770         (WebCore::jsTestObjClampedShortAttr):
771         (WebCore::jsTestObjEnforceRangeShortAttr):
772         (WebCore::jsTestObjUnsignedShortAttr):
773         (WebCore::jsTestObjLongAttr):
774         (WebCore::jsTestObjLongLongAttr):
775         (WebCore::jsTestObjUnsignedLongLongAttr):
776         (WebCore::jsTestObjStringAttr):
777         (WebCore::jsTestObjTestObjAttr):
778         (WebCore::jsTestObjTestNullableObjAttr):
779         (WebCore::jsTestObjLenientTestObjAttr):
780         (WebCore::jsTestObjUnforgeableAttr):
781         (WebCore::jsTestObjStringAttrTreatingNullAsEmptyString):
782         (WebCore::jsTestObjXMLObjAttr):
783         (WebCore::jsTestObjCreate):
784         (WebCore::jsTestObjReflectedStringAttr):
785         (WebCore::jsTestObjReflectedIntegralAttr):
786         (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
787         (WebCore::jsTestObjReflectedBooleanAttr):
788         (WebCore::jsTestObjReflectedURLAttr):
789         (WebCore::jsTestObjReflectedCustomIntegralAttr):
790         (WebCore::jsTestObjReflectedCustomBooleanAttr):
791         (WebCore::jsTestObjReflectedCustomURLAttr):
792         (WebCore::jsTestObjEnabledAtRuntimeAttribute):
793         (WebCore::jsTestObjTypedArrayAttr):
794         (WebCore::jsTestObjAttrWithGetterException):
795         (WebCore::jsTestObjAttrWithGetterExceptionWithMessage):
796         (WebCore::jsTestObjAttrWithSetterException):
797         (WebCore::jsTestObjAttrWithSetterExceptionWithMessage):
798         (WebCore::jsTestObjStringAttrWithGetterException):
799         (WebCore::jsTestObjStringAttrWithSetterException):
800         (WebCore::jsTestObjStrictTypeCheckingAttribute):
801         (WebCore::jsTestObjCustomAttr):
802         (WebCore::jsTestObjOnfoo):
803         (WebCore::jsTestObjOnwebkitfoo):
804         (WebCore::jsTestObjWithScriptStateAttribute):
805         (WebCore::jsTestObjWithCallWithAndSetterCallWithAttribute):
806         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
807         (WebCore::jsTestObjWithScriptStateAttributeRaises):
808         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
809         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
810         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
811         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
812         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
813         (WebCore::jsTestObjConditionalAttr1):
814         (WebCore::jsTestObjConditionalAttr2):
815         (WebCore::jsTestObjConditionalAttr3):
816         (WebCore::jsTestObjConditionalAttr4Constructor):
817         (WebCore::jsTestObjConditionalAttr5Constructor):
818         (WebCore::jsTestObjConditionalAttr6Constructor):
819         (WebCore::jsTestObjCachedAttribute1):
820         (WebCore::jsTestObjCachedAttribute2):
821         (WebCore::jsTestObjAnyAttribute):
822         (WebCore::jsTestObjContentDocument):
823         (WebCore::jsTestObjMutablePoint):
824         (WebCore::jsTestObjImmutablePoint):
825         (WebCore::jsTestObjStrawberry):
826         (WebCore::jsTestObjStrictFloat):
827         (WebCore::jsTestObjDescription):
828         (WebCore::jsTestObjId):
829         (WebCore::jsTestObjHash):
830         (WebCore::jsTestObjReplaceableAttribute):
831         (WebCore::jsTestObjNullableDoubleAttribute):
832         (WebCore::jsTestObjNullableLongAttribute):
833         (WebCore::jsTestObjNullableBooleanAttribute):
834         (WebCore::jsTestObjNullableStringAttribute):
835         (WebCore::jsTestObjNullableLongSettableAttribute):
836         (WebCore::jsTestObjNullableStringSettableAttribute):
837         (WebCore::jsTestObjNullableStringValue):
838         (WebCore::jsTestObjAttribute):
839         (WebCore::jsTestObjAttributeWithReservedEnumType):
840         (WebCore::jsTestObjPutForwardsAttribute):
841         (WebCore::jsTestObjPutForwardsNullableAttribute):
842         (WebCore::jsTestObjConstructor):
843         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
844         (WebCore::jsTestOverloadedConstructorsConstructor):
845         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
846         (WebCore::jsTestOverrideBuiltinsConstructor):
847         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
848         (WebCore::jsTestSerializedScriptValueInterfaceValue):
849         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
850         (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
851         (WebCore::jsTestSerializedScriptValueInterfacePorts):
852         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
853         (WebCore::jsTestSerializedScriptValueInterfaceConstructor):
854         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
855         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
856         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
857         (WebCore::jsTestTypedefsConstructorTestSubObj):
858         (WebCore::jsTestTypedefsAttrWithGetterException):
859         (WebCore::jsTestTypedefsAttrWithSetterException):
860         (WebCore::jsTestTypedefsStringAttrWithGetterException):
861         (WebCore::jsTestTypedefsStringAttrWithSetterException):
862         (WebCore::jsTestTypedefsConstructor):
863         * bindings/scripts/test/JS/JSattribute.cpp:
864         (WebCore::jsattributeReadonly):
865         (WebCore::jsattributeConstructor):
866         * bindings/scripts/test/JS/JSreadonly.cpp:
867         (WebCore::jsreadonlyConstructor):
868
869 2016-05-24  Manuel Rego Casasnovas  <rego@igalia.com>
870
871         [css-grid] Fix behavior of flexible track breadths
872         https://bugs.webkit.org/show_bug.cgi?id=157834
873
874         Reviewed by Sergio Villar Senin.
875
876         This patch is fixing 2 issues that are interrelated:
877
878         1) Flex sizes are invalid as min track sizing function.
879
880           The syntax has been recently updated on the spec:
881             <track-size> =
882               <track-breadth> |
883               minmax( <inflexible-breadth> , <track-breadth> )
884
885         2) Flex sizes outside minmax() behave as auto minimum.
886
887           Flex sizes outside minmax() were previously behaving like
888           minimum and maximum (e.g. 1fr => minmax(1fr, 1fr)).
889           However the spec changed and now this would be invalid,
890           so they should behave like auto minimum (e.g. minmax(auto, 1fr)).
891
892         * css/CSSParser.cpp:
893         (WebCore::CSSParser::parseGridTrackSize): Call parseGridBreadth()
894         for min sizing function using "InflexibleSizeOnly" restriction
895         when needed.
896         (WebCore::CSSParser::parseGridBreadth): Add check for
897         "InflexibleSizeOnly" resctriction.
898         * css/CSSParser.h: Add new type of restriction "InflexibleSizeOnly".
899         * rendering/RenderGrid.cpp:
900         (WebCore::RenderGrid::gridTrackSize): Add new condition to make
901         |minTrackBreadth| auto if it was a flex size.
902
903 2016-05-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
904
905         [Fetch API] Implement Fetch redirect mode
906         https://bugs.webkit.org/show_bug.cgi?id=157837
907
908         Reviewed by Alex Christensen.
909
910         Implementing step 5 of https://fetch.spec.whatwg.org/#http-fetch.
911         Making ResourceLoaderOptions include FetchOptions.
912         This allows SubresourceLoader to follow or not redirections based on that option.
913         CachedResource is made responsible to handle the type of the response (opaqueredirect, opaque, cors, basic...).
914         If redirection is not to be followed, either an error is returned or an empty response is returned.
915
916         Moved Response type and redirected flag from FetchResponse to ResourceResponse.
917         This allows CachedResource to easily communicate that information to FetchResponse.
918
919         Made some clean-up refactoring in ThreadableLoaderOptions.
920
921         http/tests/fetch/caching-with-different-options.html ensures that
922         caching at CachedResourceLoader will not have bad effects on fetch.
923         Covered by updated and rebased tests.
924
925         * Modules/fetch/FetchLoader.cpp:
926         (WebCore::FetchLoader::start):
927         * Modules/fetch/FetchResponse.cpp:
928         (WebCore::FetchResponse::error):
929         (WebCore::FetchResponse::redirect):
930         (WebCore::FetchResponse::FetchResponse):
931         (WebCore::FetchResponse::clone):
932         (WebCore::FetchResponse::startFetching):
933         * Modules/fetch/FetchResponse.h:
934         * WebCore.xcodeproj/project.pbxproj:
935         * loader/FetchOptions.h: Moved from Source/WebCore/Modules/fetch/FetchOptions.h.
936         * loader/ResourceLoaderOptions.h:
937         (WebCore::ResourceLoaderOptions::fetchOptions):
938         (WebCore::ResourceLoaderOptions::setFetchOptions):
939         * loader/SubresourceLoader.cpp:
940         (WebCore::SubresourceLoader::willSendRequestInternal):
941         * loader/ThreadableLoader.cpp:
942         * loader/ThreadableLoader.h:
943         * loader/cache/CachedResource.cpp:
944         (WebCore::CachedResource::setResponse):
945         * loader/cache/CachedResource.h:
946         (WebCore::CachedResource::setOpaqueRedirect):
947         * platform/network/ResourceResponseBase.cpp:
948         (WebCore::ResourceResponseBase::adopt):
949         (WebCore::ResourceResponseBase::copyData):
950         * platform/network/ResourceResponseBase.h:
951         (WebCore::ResourceResponseBase::type):
952         (WebCore::ResourceResponseBase::setType):
953         (WebCore::ResourceResponseBase::encode):
954         (WebCore::ResourceResponseBase::decode):
955
956 2016-05-23  Yusuke Suzuki  <utatane.tea@gmail.com>
957
958         Assertion failure for Reflect.get with Proxy and primitive value as explicit receiver
959         https://bugs.webkit.org/show_bug.cgi?id=157080
960
961         Reviewed by Saam Barati.
962
963         * bindings/js/JSDOMBinding.h:
964         (WebCore::nonCachingStaticFunctionGetter):
965         * bindings/js/JSDOMWindowCustom.cpp:
966         (WebCore::jsDOMWindowWebKit):
967         * bindings/js/JSPluginElementFunctions.cpp:
968         (WebCore::pluginElementPropertyGetter):
969         * bindings/js/JSPluginElementFunctions.h:
970         * bindings/scripts/CodeGeneratorJS.pm:
971         (GenerateHeader):
972         (GenerateImplementation):
973         * bridge/runtime_array.cpp:
974         (JSC::RuntimeArray::lengthGetter):
975         * bridge/runtime_array.h:
976         * bridge/runtime_method.cpp:
977         (JSC::RuntimeMethod::lengthGetter):
978         * bridge/runtime_method.h:
979         * bridge/runtime_object.cpp:
980         (JSC::Bindings::RuntimeObject::fallbackObjectGetter):
981         (JSC::Bindings::RuntimeObject::fieldGetter):
982         (JSC::Bindings::RuntimeObject::methodGetter):
983         * bridge/runtime_object.h:
984
985 2016-05-23  Alex Christensen  <achristensen@webkit.org>
986
987         Modernize CSS code
988         https://bugs.webkit.org/show_bug.cgi?id=157875
989
990         Reviewed by Chris Dumez.
991
992         * bindings/scripts/CodeGeneratorJS.pm:
993         (GenerateImplementation):
994         (GenerateParametersCheck):
995         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
996         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
997         * bindings/scripts/test/JS/JSTestObj.cpp:
998         (WebCore::JSTestObjConstructor::construct):
999         (WebCore::setJSTestObjPutForwardsNullableAttribute):
1000         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
1001         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
1002         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
1003         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
1004         (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
1005         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
1006         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1007         (WebCore::JSTestTypedefsConstructor::construct):
1008         * css/CSSBasicShapes.cpp:
1009         (WebCore::serializePositionOffset):
1010         (WebCore::buildSerializablePositionOffset):
1011         (WebCore::CSSBasicShapeCircle::cssText):
1012         (WebCore::CSSBasicShapeEllipse::cssText):
1013         * css/CSSCalculationValue.cpp:
1014         (WebCore::determineCategory):
1015         (WebCore::CSSCalcExpressionNodeParser::parseValue):
1016         * css/CSSMediaRule.cpp:
1017         (WebCore::CSSMediaRule::media):
1018         * css/CSSMediaRule.h:
1019         * css/CSSOMUtils.h:
1020         * css/CSSParser.cpp:
1021         (WebCore::CSSParser::createImportRule):
1022         (WebCore::CSSParser::createMediaRule):
1023         * css/CSSReflectValue.h:
1024         * css/CSSStyleSheet.cpp:
1025         (WebCore::CSSStyleSheet::setDisabled):
1026         (WebCore::CSSStyleSheet::setMediaQueries):
1027         (WebCore::CSSStyleSheet::insertRule):
1028         (WebCore::CSSStyleSheet::deleteRule):
1029         (WebCore::CSSStyleSheet::isLoading):
1030         (WebCore::CSSStyleSheet::media):
1031         (WebCore::CSSStyleSheet::parentStyleSheet):
1032         (WebCore::CSSStyleSheet::ownerDocument):
1033         (WebCore::CSSStyleSheet::clearChildRuleCSSOMWrappers):
1034         (WebCore::CSSStyleSheet::RuleMutationScope::RuleMutationScope):
1035         * css/CSSStyleSheet.h:
1036         * css/PropertySetCSSStyleDeclaration.cpp:
1037         * css/StyleRule.cpp:
1038         (WebCore::StyleRuleBase::createCSSOMWrapper):
1039         (WebCore::StyleRuleBase::destroy):
1040         (WebCore::StyleRuleGroup::wrapperRemoveRule):
1041         (WebCore::StyleRuleMedia::StyleRuleMedia):
1042         * css/StyleRule.h:
1043         (WebCore::StyleRuleBase::deref):
1044         (WebCore::StyleRuleBase::StyleRuleBase):
1045         (WebCore::StyleRuleMedia::create):
1046         (WebCore::StyleRuleMedia::mediaQueries):
1047         (WebCore::StyleRuleMedia::copy):
1048         (isType):
1049         * css/StyleRuleImport.cpp:
1050         (WebCore::StyleRuleImport::create):
1051         (WebCore::StyleRuleImport::StyleRuleImport):
1052         * css/StyleRuleImport.h:
1053         * css/StyleSheetContents.cpp:
1054         (WebCore::StyleSheetContents::isCacheable):
1055         (WebCore::StyleSheetContents::parserAppendRule):
1056         (WebCore::StyleSheetContents::ruleAt):
1057         (WebCore::StyleSheetContents::parserSetEncodingFromCharsetRule):
1058         (WebCore::StyleSheetContents::wrapperInsertRule):
1059         * css/StyleSheetContents.h:
1060         (WebCore::StyleSheetContents::hasSyntacticallyValidCSSHeader):
1061         (WebCore::StyleSheetContents::parserSetUsesRemUnits):
1062         (WebCore::StyleSheetContents::parserSetUsesStyleBasedEditability):
1063         (WebCore::StyleSheetContents::copy):
1064         * dom/InlineStyleSheetOwner.cpp:
1065         (WebCore::InlineStyleSheetOwner::createSheet):
1066         * inspector/InspectorStyleSheet.cpp:
1067
1068 2016-05-23  Zalan Bujtas  <zalan@apple.com>
1069
1070         Changing border color and size simultaneously fails to repaint.
1071         https://bugs.webkit.org/show_bug.cgi?id=157967
1072         <rdar://problem/26423918>
1073
1074         Reviewed by David Hyatt.
1075
1076         This patch ensures that the neighboring tables cells are dirtied when collapsed border change requires layout.
1077
1078         Test: fast/table/neighboring-cells-when-collapsed-border-changes.html
1079
1080         * rendering/RenderTable.cpp:
1081         (WebCore::markCellDirtyWhenCollapsedBorderChanges):
1082         (WebCore::RenderTable::invalidateCollapsedBorders):
1083
1084 2016-05-23  Chris Dumez  <cdumez@apple.com>
1085
1086         Avoid unnecessary call to Document::completeURL() in HTMLLinkElement::process()
1087         https://bugs.webkit.org/show_bug.cgi?id=157993
1088
1089         Reviewed by Ryosuke Niwa.
1090
1091         Avoid unnecessary call to Document::completeURL() in HTMLLinkElement::process().
1092         The call to getNonEmptyURLAttribute() already calls Document::completeURL()
1093         internally so we can just reuse the returned URL.
1094
1095         * html/HTMLLinkElement.cpp:
1096         (WebCore::HTMLLinkElement::process):
1097
1098 2016-05-23  Jiewen Tan  <jiewen_tan@apple.com>
1099
1100         Null popstate event fired when navigating back to a cached page with a stateless history entry
1101         https://bugs.webkit.org/show_bug.cgi?id=157963
1102         <rdar://problem/23414840>
1103
1104         Popstate events are not fired when WebKit navigates back to a history entry that doesn't
1105         have a state object if the entry's page is not cached. However, we fire popstate events
1106         unconditionally if the page is cached. This results in inconsistent behavior between
1107         initial navigations and cached navigations. Align the behavior of initial and cached
1108         navigations so that we produce consistent events.
1109
1110         Reviewed by Brent Fulgham.
1111
1112         Tests: fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html
1113                fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry.html
1114
1115         * history/CachedFrame.cpp:
1116         (WebCore::CachedFrameBase::restore):
1117
1118 2016-05-23  Chris Dumez  <cdumez@apple.com>
1119
1120         Generate bindings code for EventTarget.addEventListener() / removeEventListener()
1121         https://bugs.webkit.org/show_bug.cgi?id=157882
1122
1123         Reviewed by Darin Adler.
1124
1125         Generate bindings code for EventTarget.addEventListener() / removeEventListener()
1126         instead of hardcoding them in the bindings generator.
1127
1128         No new tests, rebaselined existing test, no web-exposed behavior change.
1129
1130         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1131         (WebCore::AudioScheduledSourceNode::addEventListener):
1132         (WebCore::AudioScheduledSourceNode::removeEventListener):
1133         * Modules/webaudio/AudioScheduledSourceNode.h:
1134         * Modules/webaudio/ScriptProcessorNode.cpp:
1135         (WebCore::ScriptProcessorNode::addEventListener):
1136         (WebCore::ScriptProcessorNode::removeEventListener):
1137         * Modules/webaudio/ScriptProcessorNode.h:
1138         * bindings/gobject/GObjectEventListener.cpp:
1139         (WebCore::GObjectEventListener::operator==):
1140         * bindings/gobject/GObjectEventListener.h:
1141         * bindings/js/JSEventListener.cpp:
1142         (WebCore::JSEventListener::operator==):
1143         (WebCore::eventHandlerAttribute): Deleted.
1144         * bindings/js/JSEventListener.h:
1145         (WebCore::JSEventListener::create):
1146         (WebCore::JSEventListener::cast): Deleted.
1147         (WebCore::JSEventListener::jsFunction): Deleted.
1148         * bindings/objc/ObjCEventListener.h:
1149         * bindings/objc/ObjCEventListener.mm:
1150         (WebCore::ObjCEventListener::operator==):
1151         * bindings/scripts/CodeGeneratorJS.pm:
1152         (GenerateImplementation):
1153         (JSValueToNative):
1154         (GetParentClassName): Deleted.
1155         (GetCallbackClassName): Deleted.
1156         (GetJSCallbackDataType): Deleted.
1157         * dom/EventListener.h:
1158         * dom/EventListenerMap.cpp:
1159         (WebCore::addListenerToVector):
1160         (WebCore::EventListenerMap::add):
1161         (WebCore::removeListenerFromVector):
1162         (WebCore::EventListenerMap::remove):
1163         (WebCore::copyListenersNotCreatedFromMarkupToTarget):
1164         * dom/EventListenerMap.h:
1165         * dom/EventTarget.cpp:
1166         (WebCore::EventTarget::addEventListener):
1167         (WebCore::EventTarget::addEventListenerForBindings):
1168         (WebCore::EventTarget::removeEventListenerForBindings):
1169         (WebCore::EventTarget::removeEventListener):
1170         (WebCore::EventTarget::setAttributeEventListener):
1171         (WebCore::EventTarget::clearAttributeEventListener):
1172         * dom/EventTarget.h:
1173         * dom/EventTarget.idl:
1174         * dom/MessagePort.cpp:
1175         (WebCore::MessagePort::addEventListener):
1176         * dom/MessagePort.h:
1177         * dom/Node.cpp:
1178         (WebCore::tryAddEventListener):
1179         (WebCore::Node::addEventListener):
1180         (WebCore::tryRemoveEventListener):
1181         (WebCore::Node::removeEventListener):
1182         * dom/Node.h:
1183         * dom/RegisteredEventListener.h:
1184         (WebCore::RegisteredEventListener::RegisteredEventListener):
1185         * html/HTMLMediaElement.cpp:
1186         (WebCore::HTMLMediaElement::addEventListener):
1187         (WebCore::HTMLMediaElement::removeEventListener):
1188         * html/HTMLMediaElement.h:
1189         * html/ImageDocument.cpp:
1190         (WebCore::ImageDocument::createDocumentStructure):
1191         (WebCore::ImageEventListener::operator==):
1192         * html/shadow/MediaControlsApple.cpp:
1193         (WebCore::MediaControlsApple::showClosedCaptionTrackList):
1194         (WebCore::MediaControlsApple::hideClosedCaptionTrackList):
1195         (WebCore::MediaControlsAppleEventListener::operator==):
1196         * html/shadow/MediaControlsApple.h:
1197         * inspector/InspectorIndexedDBAgent.cpp:
1198         * page/DOMWindow.cpp:
1199         (WebCore::DOMWindow::addEventListener):
1200         (WebCore::DOMWindow::removeEventListener):
1201         * page/DOMWindow.h:
1202         * platform/cocoa/WebPlaybackSessionModelMediaElement.h:
1203         * platform/cocoa/WebVideoFullscreenModelVideoElement.h:
1204         * svg/SVGElement.cpp:
1205         (WebCore::SVGElement::addEventListener):
1206         (WebCore::SVGElement::removeEventListener):
1207         * svg/SVGElement.h:
1208         * svg/SVGTRefElement.cpp:
1209         (WebCore::SVGTRefTargetEventListener::attach):
1210         (WebCore::SVGTRefTargetEventListener::detach):
1211         (WebCore::SVGTRefTargetEventListener::operator==):
1212         * svg/animation/SVGSMILElement.cpp:
1213         (WebCore::ConditionEventListener::operator==):
1214         (WebCore::SVGSMILElement::connectConditions):
1215         (WebCore::SVGSMILElement::disconnectConditions):
1216
1217 2016-05-23  Chris Dumez  <cdumez@apple.com>
1218
1219         Fix undefined behavior introduced in r201290.
1220         https://bugs.webkit.org/show_bug.cgi?id=157961
1221
1222         Reviewed by Alex Christensen.
1223
1224         The evaluation order of function arguments is undefined so it is unsafe to
1225         copyRef() and WTFMove() the same parameter in a function call.
1226
1227         * css/CSSBasicShapes.h:
1228
1229 2016-05-23  Brady Eidson  <beidson@apple.com>
1230
1231         Speculative fix for:
1232         Modern IDB: Some blob tests ASSERT sometimes on the bots.
1233         https://bugs.webkit.org/show_bug.cgi?id=157525
1234
1235         Reviewed by Alex Christensen.
1236
1237         No new tests (Should fix existing flakiness, not reproducibly testable).
1238
1239         For all of the lambdas involved in this operation, explicitly WTFMove all of the arguments around.
1240         
1241         Critically, this includes the RefPtr<TransactionOperation> protector as well as the 
1242         std::function<void ()> completionHandler(s).
1243         
1244         By doing so, this removes the possibility of a race between the background thread and the main thread
1245         tearing down the TransactionOperation, guaranteeing that it is torn down on its original thread.
1246         
1247         * Modules/indexeddb/IDBTransaction.cpp:
1248         (WebCore::IDBTransaction::putOrAddOnServer):
1249         * bindings/js/SerializedScriptValue.cpp:
1250         (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
1251         * platform/network/BlobRegistryImpl.cpp:
1252         (WebCore::BlobRegistryImpl::writeBlobsToTemporaryFiles):
1253
1254 2016-05-23  Commit Queue  <commit-queue@webkit.org>
1255
1256         Unreviewed, rolling out r201296.
1257         https://bugs.webkit.org/show_bug.cgi?id=158002
1258
1259         The LayoutTest added with this change is failing on mac-wk1
1260         (Requested by ryanhaddad on #webkit).
1261
1262         Reverted changeset:
1263
1264         "Changing border color and size simultaneously fails to
1265         repaint."
1266         https://bugs.webkit.org/show_bug.cgi?id=157967
1267         http://trac.webkit.org/changeset/201296
1268
1269 2016-05-23  Dean Jackson  <dino@apple.com>
1270
1271         Missing/Incomplete timestamp for inline Audio player in ePub book
1272         https://bugs.webkit.org/show_bug.cgi?id=157998
1273         <rdar://problem/25858437>
1274
1275         Reviewed by Jon Lee and Tim Horton.
1276
1277         On iOS it is rare to apply a text-zoom (Safari does not provide
1278         UI for it). However, iBooks uses text-zoom to increase the font
1279         size. This causes the time displays in the media controls to
1280         overflow their containers and be clipped.
1281
1282         The solution is to simply reset the text zoom for the media controls,
1283         which means the time displays will always be a constant size.
1284
1285         * Modules/mediacontrols/mediaControlsiOS.css:
1286         (audio::-webkit-media-controls-time-remaining-display):
1287
1288 2016-05-23  Zalan Bujtas  <zalan@apple.com>
1289
1290         Changing border color and size simultaneously fails to repaint.
1291         https://bugs.webkit.org/show_bug.cgi?id=157967
1292         <rdar://problem/26423918>
1293
1294         Reviewed by David Hyatt.
1295
1296         This patch ensures that the neighboring tables cells are dirtied when collapsed border change requires layout.
1297
1298         Test: fast/table/neighboring-cells-when-collapsed-border-changes.html
1299
1300         * rendering/RenderTable.cpp:
1301         (WebCore::markCellDirtyWhenCollapsedBorderChanges):
1302         (WebCore::RenderTable::invalidateCollapsedBorders):
1303
1304 2016-05-23  Chris Fleizach  <cfleizach@apple.com>
1305
1306         AX: iOS: when bringing focus to a text field we may zoom the page even if author wanted max scale = 1
1307         https://bugs.webkit.org/show_bug.cgi?id=157771
1308
1309         Reviewed by Tim Horton.
1310
1311         If the author requests scaling not to be enabled, we should not scale in when keyboard focus moves to a text field.
1312         Scaling should only happen when the user performs a gesture to do so in this case.
1313
1314         Tests: fast/viewport/ios/user-scalable-does-not-scale-for-keyboard-focus-with-author-defined-scale.html
1315                fast/viewport/ios/user-scalable-scales-for-keyboard-focus-with-no-author-defined-scale.html
1316
1317         * page/ViewportConfiguration.h:
1318         (WebCore::ViewportConfiguration::maximumScale):
1319
1320 2016-05-23  Ryan Haddad  <ryanhaddad@apple.com>
1321
1322         Unreviewed, rolling out r200414.
1323
1324         This change appears to have broken the 'write a reply' field
1325         on Nextdoor.com
1326
1327         Reverted changeset:
1328
1329         "Clicks inside button elements are sometimes discarded when
1330         the mouse moves"
1331         https://bugs.webkit.org/show_bug.cgi?id=39620
1332         http://trac.webkit.org/changeset/200414
1333
1334 2016-05-23  Chris Dumez  <cdumez@apple.com>
1335
1336         Clean up / Modernize the CSS Parser
1337         https://bugs.webkit.org/show_bug.cgi?id=157961
1338
1339         Reviewed by Alex Christensen.
1340
1341         Clean up / Modernize the CSS Parser.
1342
1343         * WebCore.xcodeproj/project.pbxproj:
1344         * css/BasicShapeFunctions.cpp:
1345         (WebCore::valueForBasicShape):
1346         (WebCore::convertToLength):
1347         (WebCore::convertToLengthSize):
1348         (WebCore::basicShapeForValue):
1349         * css/BasicShapeFunctions.h:
1350         * css/CSSBasicShapes.cpp:
1351         (WebCore::CSSBasicShapePolygon::cssText):
1352         (WebCore::CSSBasicShapePolygon::equals):
1353         * css/CSSBasicShapes.h:
1354         * css/CSSComputedStyleDeclaration.cpp:
1355         (WebCore::valueForReflection):
1356         (WebCore::ComputedStyleExtractor::valueForShadow):
1357         (WebCore::specifiedValueForGridTrackSize):
1358         * css/CSSCrossfadeValue.cpp:
1359         (WebCore::subimageKnownToBeOpaque):
1360         (WebCore::CSSCrossfadeValue::fixedSize):
1361         (WebCore::CSSCrossfadeValue::isPending):
1362         (WebCore::CSSCrossfadeValue::knownToBeOpaque):
1363         (WebCore::CSSCrossfadeValue::loadSubimages):
1364         (WebCore::CSSCrossfadeValue::image):
1365         (WebCore::CSSCrossfadeValue::blend):
1366         (WebCore::CSSCrossfadeValue::equals):
1367         (WebCore::CSSCrossfadeValue::equalInputImages):
1368         * css/CSSCrossfadeValue.h:
1369         (WebCore::CSSCrossfadeValue::create):
1370         (WebCore::CSSCrossfadeValue::CSSCrossfadeValue):
1371         * css/CSSCustomPropertyValue.h:
1372         (WebCore::CSSCustomPropertyValue::create):
1373         (WebCore::CSSCustomPropertyValue::CSSCustomPropertyValue):
1374         * css/CSSFilterImageValue.cpp:
1375         (WebCore::CSSFilterImageValue::fixedSize):
1376         (WebCore::CSSFilterImageValue::isPending):
1377         (WebCore::CSSFilterImageValue::loadSubimages):
1378         (WebCore::CSSFilterImageValue::image):
1379         (WebCore::CSSFilterImageValue::createFilterOperations):
1380         (WebCore::CSSFilterImageValue::equals):
1381         (WebCore::CSSFilterImageValue::equalInputImages):
1382         * css/CSSFilterImageValue.h:
1383         (WebCore::CSSFilterImageValue::CSSFilterImageValue):
1384         * css/CSSFontFaceSet.cpp:
1385         (WebCore::CSSFontFaceSet::matchingFaces):
1386         * css/CSSFunctionValue.cpp:
1387         (WebCore::CSSFunctionValue::CSSFunctionValue):
1388         * css/CSSFunctionValue.h:
1389         (WebCore::CSSFunctionValue::create):
1390         * css/CSSGradientValue.h:
1391         (WebCore::CSSLinearGradientValue::setAngle):
1392         * css/CSSGrammar.y.in:
1393         * css/CSSImageGeneratorValue.cpp:
1394         (WebCore::CSSImageGeneratorValue::subimageIsPending):
1395         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
1396         * css/CSSImageGeneratorValue.h:
1397         * css/CSSImageValue.cpp:
1398         (WebCore::CSSImageValue::cachedOrPendingImage):
1399         * css/CSSImageValue.h:
1400         * css/CSSKeyframesRule.cpp:
1401         (WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
1402         (WebCore::StyleRuleKeyframes::parserAppendKeyframe):
1403         (WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
1404         (WebCore::CSSKeyframesRule::appendRule):
1405         (WebCore::CSSKeyframesRule::findRule):
1406         (WebCore::CSSKeyframesRule::item):
1407         (WebCore::StyleRuleKeyframes::~StyleRuleKeyframes): Deleted.
1408         * css/CSSKeyframesRule.h:
1409         (WebCore::StyleRuleKeyframes::keyframes):
1410         * css/CSSParser.cpp:
1411         (WebCore::parseColorValue):
1412         (WebCore::parseSimpleLengthValue):
1413         (WebCore::parseKeywordValue):
1414         (WebCore::parseTranslateTransformValue):
1415         (WebCore::CSSParser::parseFontFaceValue):
1416         (WebCore::CSSParser::parseValue):
1417         (WebCore::CSSParser::parseCustomPropertyValue):
1418         (WebCore::CSSParser::parseDeclaration):
1419         (WebCore::CSSParser::SourceSize::SourceSize):
1420         (WebCore::filterProperties):
1421         (WebCore::CSSParser::clearProperties):
1422         (WebCore::CSSParser::addExpandedPropertyForValue):
1423         (WebCore::CSSParser::parseVariableDependentValue):
1424         (WebCore::CSSParser::parseContentDistributionOverflowPosition):
1425         (WebCore::CSSParser::parseItemPositionOverflowPosition):
1426         (WebCore::CSSParser::parseNonElementSnapPoints):
1427         (WebCore::CSSParser::parseScrollSnapDestination):
1428         (WebCore::CSSParser::parseScrollSnapCoordinate):
1429         (WebCore::CSSParser::parseFillShorthand):
1430         (WebCore::CSSParser::addAnimationValue):
1431         (WebCore::CSSParser::parseAnimationShorthand):
1432         (WebCore::CSSParser::parseColumnWidth):
1433         (WebCore::CSSParser::parseColumnCount):
1434         (WebCore::CSSParser::parseColumnsShorthand):
1435         (WebCore::CSSParser::parseTransitionShorthand):
1436         (WebCore::CSSParser::parseSize):
1437         (WebCore::CSSParser::parseQuotes):
1438         (WebCore::CSSParser::parseAlt):
1439         (WebCore::CSSParser::parseCustomPropertyDeclaration):
1440         (WebCore::CSSParser::parseContent):
1441         (WebCore::CSSParser::parseAttr):
1442         (WebCore::CSSParser::parseBackgroundColor):
1443         (WebCore::CSSParser::parseFillPositionComponent):
1444         (WebCore::CSSParser::parse4ValuesFillPosition):
1445         (WebCore::CSSParser::parse3ValuesFillPosition):
1446         (WebCore::CSSParser::parseFillPosition):
1447         (WebCore::CSSParser::parseFillSize):
1448         (WebCore::CSSParser::parseFillProperty):
1449         (WebCore::CSSParser::parseAnimationDelay):
1450         (WebCore::CSSParser::parseAnimationDirection):
1451         (WebCore::CSSParser::parseAnimationDuration):
1452         (WebCore::CSSParser::parseAnimationFillMode):
1453         (WebCore::CSSParser::parseAnimationIterationCount):
1454         (WebCore::CSSParser::parseAnimationName):
1455         (WebCore::CSSParser::parseAnimationPlayState):
1456         (WebCore::CSSParser::parseAnimationTrigger):
1457         (WebCore::CSSParser::parseAnimationProperty):
1458         (WebCore::CSSParser::parseKeyframeSelector):
1459         (WebCore::CSSParser::parseGridPosition):
1460         (WebCore::gridMissingGridPositionValue):
1461         (WebCore::CSSParser::parseGridItemPositionShorthand):
1462         (WebCore::CSSParser::parseGridGapShorthand):
1463         (WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns):
1464         (WebCore::CSSParser::parseGridTemplateShorthand):
1465         (WebCore::CSSParser::parseGridShorthand):
1466         (WebCore::CSSParser::parseGridAreaShorthand):
1467         (WebCore::CSSParser::parseGridLineNames):
1468         (WebCore::CSSParser::parseGridTrackList):
1469         (WebCore::CSSParser::parseGridTrackRepeatFunction):
1470         (WebCore::CSSParser::parseGridTrackSize):
1471         (WebCore::CSSParser::parseGridAutoFlow):
1472         (WebCore::skipCommaInDashboardRegion):
1473         (WebCore::CSSParser::parseDashboardRegions):
1474         (WebCore::parseGridTemplateAreasColumnNames):
1475         (WebCore::CSSParser::parseCounterContent):
1476         (WebCore::CSSParser::parseClipShape):
1477         (WebCore::CSSParser::parseInsetRoundedCorners):
1478         (WebCore::CSSParser::parseBasicShapeInset):
1479         (WebCore::CSSParser::parseBasicShapeCircle):
1480         (WebCore::CSSParser::parseBasicShapeEllipse):
1481         (WebCore::CSSParser::parseBasicShapePolygon):
1482         (WebCore::CSSParser::parseBasicShapePath):
1483         (WebCore::CSSParser::parseBasicShapeAndOrBox):
1484         (WebCore::CSSParser::parseFont):
1485         (WebCore::CSSParser::parseFontFamily):
1486         (WebCore::CSSParser::parseFontSynthesis):
1487         (WebCore::CSSParser::parseFontFaceSrcURI):
1488         (WebCore::CSSParser::parseFontFaceSrc):
1489         (WebCore::CSSParser::parseFontFaceUnicodeRange):
1490         (WebCore::parseAlphaValue):
1491         (WebCore::ShadowParseContext::commitValue):
1492         (WebCore::CSSParser::parseShadow):
1493         (WebCore::CSSParser::parseReflect):
1494         (WebCore::CSSParser::parseFlex):
1495         (WebCore::BorderImageParseContext::commitImage):
1496         (WebCore::BorderImageParseContext::commitImageSlice):
1497         (WebCore::BorderImageParseContext::commitBorderWidth):
1498         (WebCore::BorderImageParseContext::commitBorderOutset):
1499         (WebCore::BorderImageParseContext::commitRepeat):
1500         (WebCore::BorderImageParseContext::commitWebKitBorderImage):
1501         (WebCore::BorderImageParseContext::commitBorderImageProperty):
1502         (WebCore::CSSParser::parseBorderImage):
1503         (WebCore::CSSParser::parseBorderImageRepeat):
1504         (WebCore::BorderImageQuadParseContext::setTop):
1505         (WebCore::CSSParser::parseCounter):
1506         (WebCore::CSSParser::parseDeprecatedGradient):
1507         (WebCore::CSSParser::parseDeprecatedLinearGradient):
1508         (WebCore::CSSParser::parseDeprecatedRadialGradient):
1509         (WebCore::CSSParser::parseLinearGradient):
1510         (WebCore::CSSParser::parseRadialGradient):
1511         (WebCore::CSSParser::parseFilterImage):
1512         (WebCore::CSSParser::parseCrossfade):
1513         (WebCore::CSSParser::parseImageResolution):
1514         (WebCore::CSSParser::parseImageSet):
1515         (WebCore::CSSParser::parseTransform):
1516         (WebCore::CSSParser::parseTransformValue):
1517         (WebCore::CSSParser::parseFilter):
1518         (WebCore::CSSParser::parseTextDecoration):
1519         (WebCore::CSSParser::parseTextEmphasisStyle):
1520         (WebCore::CSSParser::parseTextEmphasisPosition):
1521         (WebCore::CSSParser::parseTextIndent):
1522         (WebCore::CSSParser::parseHangingPunctuation):
1523         (WebCore::CSSParser::parseFontFeatureSettings):
1524         (WebCore::CSSParser::parseWillChange):
1525         (WebCore::CSSParser::createImportRule):
1526         (WebCore::CSSParser::createMediaRule):
1527         (WebCore::CSSParser::createEmptyMediaRule):
1528         (WebCore::CSSParser::createSupportsRule):
1529         (WebCore::CSSParser::markSupportsRuleHeaderStart):
1530         (WebCore::CSSParser::popSupportsRuleData):
1531         (WebCore::CSSParser::processAndAddNewRuleToSourceTreeIfNeeded):
1532         (WebCore::CSSParser::addNewRuleToSourceTree):
1533         (WebCore::CSSParser::popRuleData):
1534         (WebCore::CSSParser::createKeyframesRule):
1535         (WebCore::CSSParser::createStyleRule):
1536         (WebCore::CSSParser::createFontFaceRule):
1537         (WebCore::CSSParser::createPageRule):
1538         (WebCore::CSSParser::createRegionRule):
1539         (WebCore::CSSParser::endDeclarationsForMarginBox):
1540         (WebCore::CSSParser::createKeyframe):
1541         (WebCore::CSSParser::updateLastMediaLine):
1542         (WebCore::fixUnparsedProperties):
1543         (WebCore::CSSParser::fixUnparsedPropertyRanges):
1544         (WebCore::CSSParser::parseViewportProperty):
1545         (WebCore::cssPropertyNameIOSAliasing):
1546         (WebCore::isAppleLegacyCssValueKeyword):
1547         (WebCore::quoteCSSString):
1548         (WebCore::AnimationParseContext::commitFirstAnimation): Deleted.
1549         (WebCore::strictCSSParserContext): Deleted.
1550         (WebCore::CSSParser::~CSSParser): Deleted.
1551         (WebCore::convertToASCIILowercaseInPlace): Deleted.
1552         (WebCore::CSSParserString::convertToASCIILowercaseInPlace): Deleted.
1553         (WebCore::CSSParser::setupParser): Deleted.
1554         (WebCore::isSimpleLengthPropertyID): Deleted.
1555         (WebCore::isValidKeywordPropertyAndValue): Deleted.
1556         (WebCore::parseTransformTranslateArguments): Deleted.
1557         (WebCore::CSSParser::parseColor): Deleted.
1558         (WebCore::CSSParser::parseMediaQuery): Deleted.
1559         (WebCore::CSSParser::parseSizesAttribute): Deleted.
1560         (WebCore::CSSParser::addProperty): Deleted.
1561         (WebCore::CSSParser::validateCalculationUnit): Deleted.
1562         (WebCore::isItemPositionKeyword): Deleted.
1563         (WebCore::CSSParser::parseShorthand): Deleted.
1564         (WebCore::CSSParser::parseSizeParameter): Deleted.
1565         (WebCore::CSSParser::parseFillImage): Deleted.
1566         (WebCore::CSSParser::parsePositionY): Deleted.
1567         (WebCore::CSSParser::parse2ValuesFillPosition): Deleted.
1568         (WebCore::CSSParser::parseTransformOriginShorthand): Deleted.
1569         (WebCore::CSSParser::parseAnimationTimingFunction): Deleted.
1570         (WebCore::CSSParser::parseGridTemplateColumns): Deleted.
1571         (WebCore::CSSParser::parseSingleGridAreaLonghand): Deleted.
1572         (WebCore::allTracksAreFixedSized): Deleted.
1573         (WebCore::CSSParser::parseGridBreadth): Deleted.
1574         (WebCore::CSSParser::parseGridTemplateAreasRow): Deleted.
1575         (WebCore::completeBorderRadii): Deleted.
1576         (WebCore::CSSParser::parseShapeRadius): Deleted.
1577         (WebCore::isBoxValue): Deleted.
1578         (WebCore::CSSParser::parseShapeProperty): Deleted.
1579         (WebCore::CSSParser::parseClipPath): Deleted.
1580         (WebCore::CSSParser::parseBasicShape): Deleted.
1581         (WebCore::FontFamilyValueBuilder::commit): Deleted.
1582         (WebCore::CSSParser::parseFontWeight): Deleted.
1583         (WebCore::CSSParser::parseFontFaceSrcLocal): Deleted.
1584         (WebCore::parseDouble): Deleted.
1585         (WebCore::mightBeRGBA): Deleted.
1586         (WebCore::mightBeRGB): Deleted.
1587         (WebCore::ShadowParseContext::commitColor): Deleted.
1588         (WebCore::BorderImageParseContext::BorderImageParseContext): Deleted.
1589         (WebCore::BorderImageParseContext::commitForwardSlashOperator): Deleted.
1590         (WebCore::BorderImageParseContext::commitBorderImage): Deleted.
1591         (WebCore::isBorderImageRepeatKeyword): Deleted.
1592         (WebCore::BorderImageSliceParseContext::commitBorderImageSlice): Deleted.
1593         (WebCore::CSSParser::parseBorderImageQuad): Deleted.
1594         (WebCore::parseDeprecatedGradientColorStop): Deleted.
1595         (WebCore::valueFromSideKeyword): Deleted.
1596         (WebCore::CSSParser::isGeneratedImageValue): Deleted.
1597         (WebCore::CSSParser::parseCanvas): Deleted.
1598         (WebCore::CSSParser::parseNamedImage): Deleted.
1599         (WebCore::TransformOperationInfo::TransformOperationInfo): Deleted.
1600         (WebCore::CSSParser::isBlendMode): Deleted.
1601         (WebCore::filterInfoForName): Deleted.
1602         (WebCore::CSSParser::parseFlowThread): Deleted.
1603         (WebCore::CSSParser::parseRegionThread): Deleted.
1604         (WebCore::CSSParser::parseLineBoxContain): Deleted.
1605         (WebCore::CSSParser::parseFontFeatureTag): Deleted.
1606         (WebCore::CSSParser::parseFontVariantLigatures): Deleted.
1607         (WebCore::isCSSLetter): Deleted.
1608         (WebCore::CSSParser::markSupportsRuleHeaderEnd): Deleted.
1609         (WebCore::CSSParser::syntaxError): Deleted.
1610         (WebCore::CSSParser::logError): Deleted.
1611         (WebCore::CSSParser::rewriteSpecifiersWithElementName): Deleted.
1612         (WebCore::CSSParser::rewriteSpecifiers): Deleted.
1613         (WebCore::CSSParser::invalidBlockHit): Deleted.
1614         (WebCore::CSSParser::markRuleHeaderStart): Deleted.
1615         (WebCore::CSSParser::setRuleHeaderEnd): Deleted.
1616         (WebCore::CSSParser::markRuleHeaderEnd): Deleted.
1617         (WebCore::CSSParser::markRuleBodyStart): Deleted.
1618         (WebCore::cssPropertyID): Deleted.
1619         (WebCore::isCSSTokenizerIdentifier): Deleted.
1620         * css/CSSParser.h:
1621         (WebCore::CSSParser::ValueWithCalculation::setCalculation): Deleted.
1622         * css/CSSPrimitiveValue.cpp:
1623         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1624         * css/CSSPrimitiveValue.h:
1625         * css/CSSPropertySourceData.h:
1626         * css/CSSReflectValue.cpp:
1627         (WebCore::CSSReflectValue::equals):
1628         * css/CSSReflectValue.h:
1629         (WebCore::CSSReflectValue::create):
1630         (WebCore::CSSReflectValue::direction):
1631         (WebCore::CSSReflectValue::offset):
1632         (WebCore::CSSReflectValue::CSSReflectValue):
1633         * css/CSSShadowValue.cpp:
1634         (WebCore::CSSShadowValue::CSSShadowValue):
1635         (WebCore::CSSShadowValue::customCSSText): Deleted.
1636         * css/CSSShadowValue.h:
1637         (WebCore::CSSShadowValue::create):
1638         * css/CSSValue.h:
1639         (WebCore::compareCSSValueVector):
1640         * css/CSSVariableDependentValue.cpp:
1641         (WebCore::CSSVariableDependentValue::checkVariablesForCycles):
1642         * css/CSSVariableDependentValue.h:
1643         (WebCore::CSSVariableDependentValue::create):
1644         (WebCore::CSSVariableDependentValue::customCSSText):
1645         (WebCore::CSSVariableDependentValue::valueList):
1646         (WebCore::CSSVariableDependentValue::CSSVariableDependentValue):
1647         * css/CSSVariableValue.cpp:
1648         (WebCore::CSSVariableValue::buildParserValueListSubstitutingVariables):
1649         * css/Counter.h:
1650         (WebCore::Counter::create):
1651         (WebCore::Counter::identifier):
1652         (WebCore::Counter::listStyle):
1653         (WebCore::Counter::separator):
1654         (WebCore::Counter::listStyleIdent):
1655         (WebCore::Counter::setIdentifier):
1656         (WebCore::Counter::setListStyle):
1657         (WebCore::Counter::setSeparator):
1658         (WebCore::Counter::cloneForCSSOM):
1659         (WebCore::Counter::Counter):
1660         * css/DOMCSSNamespace.cpp:
1661         (WebCore::DOMCSSNamespace::supports):
1662         * css/FontFace.cpp:
1663         (WebCore::FontFace::parseString):
1664         (WebCore::FontFace::setVariant):
1665         * css/Rect.h:
1666         (WebCore::RectBase::RectBase):
1667         * css/SVGCSSParser.cpp:
1668         (WebCore::CSSParser::parseSVGStrokeDasharray):
1669         (WebCore::CSSParser::parseSVGPaint):
1670         (WebCore::CSSParser::parseSVGColor):
1671         (WebCore::CSSParser::parsePaintOrder):
1672         * css/StyleBuilderConverter.h:
1673         (WebCore::StyleBuilderConverter::convertReflection):
1674         * css/StyleProperties.cpp:
1675         (WebCore::MutableStyleProperties::setProperty):
1676         (WebCore::MutableStyleProperties::setCustomProperty):
1677         (WebCore::MutableStyleProperties::parseDeclaration):
1678         * css/StyleResolver.cpp:
1679         (WebCore::StyleResolver::keyframeStylesForAnimation):
1680         (WebCore::StyleResolver::cachedOrPendingFromValue):
1681         * css/StyleResolver.h:
1682         * css/WebKitCSSMatrix.cpp:
1683         (WebCore::WebKitCSSMatrix::setMatrixValue):
1684         * html/canvas/CanvasRenderingContext2D.cpp:
1685         (WebCore::CanvasRenderingContext2D::setFont):
1686         * inspector/InspectorStyleSheet.cpp:
1687         (flattenSourceData):
1688         (ParsedStyleSheet::setSourceData):
1689         (ParsedStyleSheet::ruleSourceDataAt):
1690         (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
1691         * page/PageSerializer.cpp:
1692         (WebCore::PageSerializer::retrieveResourcesForProperties):
1693         * page/animation/CSSPropertyAnimation.cpp:
1694         (WebCore::crossfadeBlend):
1695         * rendering/style/RenderStyle.cpp:
1696         (WebCore::RenderStyle::checkVariablesInCustomProperties):
1697
1698 2016-05-22  Brady Eidson  <beidson@apple.com>
1699
1700         Move to C++14.
1701         https://bugs.webkit.org/show_bug.cgi?id=157948
1702
1703         Reviewed by Michael Catanzaro.
1704
1705         No new tests (No change in behavior).
1706
1707         * Configurations/Base.xcconfig:
1708         
1709         Replace time literal suffixes that have underscores to the forms without
1710         (e.g. 0_ms becomes 0ms):
1711         * page/mac/ServicesOverlayController.mm:
1712         (WebCore::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
1713         * platform/graphics/cg/IOSurfacePool.cpp:
1714
1715 2016-05-22  Chris Dumez  <cdumez@apple.com>
1716
1717         Remove uses of PassRefPtr in JS bindings code
1718         https://bugs.webkit.org/show_bug.cgi?id=157949
1719
1720         Reviewed by Andreas Kling.
1721
1722         Remove uses of PassRefPtr in JS bindings code.
1723
1724         * bindings/js/JSDOMBinding.cpp:
1725         (WebCore::jsArray):
1726         * bindings/js/JSDOMBinding.h:
1727         * bindings/js/JSDOMGlobalObject.cpp:
1728         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
1729         * bindings/js/JSDOMGlobalObject.h:
1730         * bindings/js/JSDOMGlobalObjectTask.cpp:
1731         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
1732         * bindings/js/JSDOMGlobalObjectTask.h:
1733         * bindings/js/JSDOMWindowBase.cpp:
1734         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
1735         (WebCore::JSDOMWindowMicrotaskCallback::create):
1736         (WebCore::JSDOMWindowMicrotaskCallback::call):
1737         (WebCore::JSDOMWindowMicrotaskCallback::JSDOMWindowMicrotaskCallback):
1738         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
1739         * bindings/js/JSDOMWindowBase.h:
1740         * bindings/js/JSDOMWindowShell.cpp:
1741         (WebCore::JSDOMWindowShell::finishCreation):
1742         (WebCore::JSDOMWindowShell::setWindow):
1743         * bindings/js/JSDOMWindowShell.h:
1744         (WebCore::JSDOMWindowShell::create):
1745         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1746         (WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
1747         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
1748         * bindings/js/JSWorkerGlobalScopeBase.h:
1749         * bindings/objc/DOMCustomXPathNSResolver.h:
1750         * bindings/scripts/CodeGeneratorJS.pm:
1751         (GetNativeTypeForCallbacks):
1752         * bindings/scripts/test/JS/JSTestCallback.cpp:
1753         (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
1754         (WebCore::JSTestCallback::callbackWithStringList):
1755         * bindings/scripts/test/JS/JSTestCallback.h:
1756         * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
1757         (WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
1758         (WebCore::JSTestCallbackFunction::callbackWithStringList):
1759         * bindings/scripts/test/JS/JSTestCallbackFunction.h:
1760
1761 2016-05-20  Dan Bernstein  <mitz@apple.com>
1762
1763         Fixed USE(APPLE_INTERNAL_SDK) builds.
1764
1765         * platform/cocoa/ThemeCocoa.mm:
1766         (WebCore::fitContextToBox):
1767
1768 2016-05-20  Joseph Pecoraro  <pecoraro@apple.com>
1769
1770         Remove LegacyProfiler
1771         https://bugs.webkit.org/show_bug.cgi?id=153565
1772
1773         Reviewed by Mark Lam.
1774
1775         * ForwardingHeaders/profiler/Profile.h: Removed.
1776         * ForwardingHeaders/profiler/ProfileNode.h: Removed.
1777         * testing/js/WebCoreTestSupport.cpp:
1778         * xml/XSLStyleSheetLibxslt.cpp:
1779         * xml/XSLTProcessorLibxslt.cpp:
1780
1781 2016-05-20  Joseph Pecoraro  <pecoraro@apple.com>
1782
1783         Remove LegacyProfiler
1784         https://bugs.webkit.org/show_bug.cgi?id=153565
1785
1786         Reviewed by Saam Barati.
1787
1788         JavaScriptCore now provides a sampling profiler and it is enabled
1789         by all ports. Web Inspector switched months ago to using the
1790         sampling profiler and displaying its data. Remove the legacy
1791         profiler, as it is no longer being used by anything other then
1792         console.profile and tests. We will update console.profile's
1793         behavior soon to have new behavior and use the sampling data.
1794
1795         * CMakeLists.txt:
1796         * DerivedSources.cpp:
1797         * DerivedSources.make:
1798         * ForwardingHeaders/profiler/LegacyProfiler.h: Removed.
1799         * WebCore.xcodeproj/project.pbxproj:
1800         * bindings/js/JSCustomXPathNSResolver.cpp:
1801         * bindings/js/JSDOMWindowBase.cpp:
1802         (WebCore::JSDOMWindowBase::supportsLegacyProfiling): Deleted.
1803         (WebCore::JSDOMWindowBase::supportsRichSourceInfo): Deleted.
1804         * bindings/js/JSDOMWindowBase.h:
1805         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1806         (WebCore::JSWorkerGlobalScopeBase::supportsLegacyProfiling): Deleted.
1807         * bindings/js/JSWorkerGlobalScopeBase.h:
1808         * bindings/js/ScriptCachedFrameData.cpp:
1809         * bindings/js/ScriptController.cpp:
1810         (WebCore::ScriptController::clearWindowShell): Deleted.
1811         * bindings/js/ScriptProfile.h: Removed.
1812         * bindings/js/ScriptProfileNode.h: Removed.
1813         * bindings/scripts/CodeGeneratorJS.pm:
1814         (AddClassForwardIfNeeded): Deleted.
1815         * bindings/scripts/test/JS/JSTestObj.cpp:
1816         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg): Deleted.
1817         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence): Deleted.
1818         * bindings/scripts/test/TestObj.idl:
1819         * css/CSSParser.cpp:
1820         * dom/Document.cpp:
1821         * inspector/InspectorConsoleInstrumentation.h:
1822         (WebCore::InspectorInstrumentation::stopProfiling):
1823         * inspector/InspectorController.cpp:
1824         (WebCore::InspectorController::InspectorController):
1825         (WebCore::InspectorController::legacyProfilerEnabled): Deleted.
1826         (WebCore::InspectorController::setLegacyProfilerEnabled): Deleted.
1827         * inspector/InspectorController.h:
1828         * inspector/InspectorInstrumentation.cpp:
1829         (WebCore::InspectorInstrumentation::stopProfilingImpl):
1830         * inspector/InspectorInstrumentation.h:
1831         * inspector/InspectorTimelineAgent.cpp:
1832         (WebCore::InspectorTimelineAgent::startFromConsole):
1833         (WebCore::InspectorTimelineAgent::stopFromConsole):
1834         * inspector/InspectorTimelineAgent.h:
1835         * inspector/PageDebuggerAgent.cpp:
1836         * inspector/PageRuntimeAgent.cpp:
1837         * inspector/ScriptProfile.idl: Removed.
1838         * inspector/ScriptProfileNode.idl: Removed.
1839         * inspector/TimelineRecordFactory.cpp:
1840         (WebCore::buildAggregateCallInfoInspectorObject): Deleted.
1841         (WebCore::buildInspectorObject): Deleted.
1842         (WebCore::buildProfileInspectorObject): Deleted.
1843         (WebCore::TimelineRecordFactory::appendProfile): Deleted.
1844         * inspector/TimelineRecordFactory.h:
1845         * page/DOMWindow.cpp:
1846         * page/Page.cpp:
1847         * page/PageConsoleClient.cpp:
1848         (WebCore::PageConsoleClient::profileEnd):
1849         (WebCore::PageConsoleClient::clearProfiles): Deleted.
1850         * page/PageConsoleClient.h:
1851         * testing/Internals.cpp:
1852         (WebCore::Internals::resetToConsistentState): Deleted.
1853         (WebCore::Internals::consoleProfiles): Deleted.
1854         (WebCore::Internals::setLegacyJavaScriptProfilingEnabled): Deleted.
1855         * testing/Internals.h:
1856         * testing/Internals.idl:
1857
1858 2016-05-20  Zalan Bujtas  <zalan@apple.com>
1859
1860         `width: 1%` on nested table cell causes its table to hog horizontal space
1861         https://bugs.webkit.org/show_bug.cgi?id=144696
1862         <rdar://problem/20839572>
1863
1864         Reviewed by David Hyatt and Tim Horton.
1865         
1866         This patch is based on https://chromium.googlesource.com/chromium/src/+/9428cfb16993a2329e87c65da096ca295132ef0f
1867
1868         Tests: fast/table/inner-percent-width-affects-outer-floated-div.html
1869                fast/table/inner-percent-width-doesnt-affect-ancestor-columns.html
1870
1871         * rendering/AutoTableLayout.cpp:
1872         (WebCore::shouldScaleColumnsForParent):
1873         (WebCore::shouldScaleColumnsForSelf):
1874         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
1875         (WebCore::shouldScaleColumns): Deleted.
1876         * rendering/AutoTableLayout.h:
1877         * rendering/RenderTable.cpp:
1878         (WebCore::RenderTable::updateLogicalWidth):
1879         * rendering/TableLayout.h:
1880         (WebCore::TableLayout::scaledWidthFromPercentColumns):
1881
1882 2016-05-20  Jer Noble  <jer.noble@apple.com>
1883
1884         Inconsistent state in playback controls
1885         https://bugs.webkit.org/show_bug.cgi?id=157962
1886         <rdar://problem/26397571>
1887
1888         Reviewed by Beth Dakin.
1889
1890         Do not use the playbackSessionManager() as the model, that's what the model is for.
1891
1892         * platform/mac/WebPlaybackSessionInterfaceMac.mm:
1893         (WebCore::WebPlaybackSessionInterfaceMac::setClient):
1894
1895 2016-05-20  Brady Eidson  <beidson@apple.com>
1896
1897         Modern IDB: Properly handle blobs in Workers.
1898         https://bugs.webkit.org/show_bug.cgi?id=157947
1899
1900         Reviewed by Alex Christensen.
1901
1902         Test: storage/indexeddb/modern/blob-simple-workers.html
1903
1904         * Modules/indexeddb/IDBTransaction.cpp:
1905         (WebCore::IDBTransaction::putOrAddOnServer): Use writeBlobsToDiskForIndexedDBSynchronously from
1906           background threads instead of the asynchronous form.
1907         
1908         Add ability to set an existing empty IDBValue to be an isolated copy of a different IDBValue:
1909         * Modules/indexeddb/IDBValue.cpp:
1910         (WebCore::IDBValue::setAsIsolatedCopy):
1911         (WebCore::IDBValue::isolatedCopy):
1912         * Modules/indexeddb/IDBValue.h:
1913         
1914         Add a method - only to be called from a non-main thread - that synchronously writes blobs to disk:
1915         * bindings/js/SerializedScriptValue.cpp:
1916         (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDBSynchronously):
1917         * bindings/js/SerializedScriptValue.h:
1918         
1919 2016-05-20  Anders Carlsson  <andersca@apple.com>
1920
1921         Allow named images on iOS
1922         https://bugs.webkit.org/show_bug.cgi?id=157960
1923         rdar://problem/26396532
1924
1925         Reviewed by Dean Jackson.
1926
1927         USE(NEW_THEME) is false on iOS so force named images to be drawn by checking PLATFORM(IOS) as well.
1928
1929         * platform/graphics/NamedImageGeneratedImage.cpp:
1930         (WebCore::NamedImageGeneratedImage::draw):
1931
1932 2016-05-20  Myles C. Maxfield  <mmaxfield@apple.com>
1933
1934         [Cocoa] REGRESSION(r184899): Ascent adjustments are applied to web fonts
1935         https://bugs.webkit.org/show_bug.cgi?id=157954
1936         <rdar://problem/24204349>
1937
1938         Reviewed by Dean Jackson.
1939
1940         There are a few specific fonts which exist on Windows and Cocoa OSes, and we will adjust
1941         the ascents of these fonts to better match their counterparts on Windows. However, in
1942         r184899, we started applying this adjustment to web fonts too.
1943
1944         Test: fast/text/ascent-adjustment-webfont.html
1945
1946         * platform/graphics/cocoa/FontCocoa.mm:
1947         (WebCore::Font::platformInit):
1948         * svg/SVGToOTFFontConversion.cpp: We were reporting the length of font names wrong, so
1949         it made the test pass without this patch even when it shouldn't have. Previously, we
1950         were recording the number of characters in the font, not the number of bytes (each
1951         character is 2 bytes).
1952
1953 2016-05-20  John Wilander  <wilander@apple.com>
1954
1955         Remove unnecessary PageOverlay client function pageOverlayDestroyed
1956         https://bugs.webkit.org/show_bug.cgi?id=157388
1957         <rdar://problem/25471523>
1958
1959         Reviewed by Tim Horton.
1960
1961         Remove dead PageOverlay code. Almost all of these overrides were empty and
1962         never called. In the case of WebPageOverlay it was never called but had a
1963         function body, causing confusion. There was a fear of dangling pointers in
1964         WebPageOverlay's static hash map between PageOverlays and WebPageOverlays.
1965         Only WebPageOverlay's constructor creates its PageOverlay object and adds it
1966         to the hash map. Its client object is kept in a unique pointer member which
1967         is automatically deleted when the WebPageOverlay object itself is deleted.
1968         This explains why PageOverlayClientImpl::pageOverlayDestroyed in
1969         WKBundlePageOverlay can safely be removed. Finally, WebPageOverlay's
1970         destructor clears the hash map entry for its PageOverlay object. Thus, there
1971         is no need to call WebPageOverlay::pageOverlayDestroyed nor a need for
1972         WebPageOverlay's destructor to call pageOverlayDestroyed on its client.
1973
1974         No new tests. I tried to come up with a WebKit API test for this but I
1975         wasn't able to test presence/absence of WebPageOverlay's map entries since
1976         the map is not exposed.
1977
1978         * page/DebugPageOverlays.cpp:
1979         (WebCore::RegionOverlay::pageOverlayDestroyed): Deleted.
1980         * page/PageOverlay.h:
1981         (WebCore::PageOverlay::Client::pageOverlayDestroyed): Deleted.
1982         * page/ResourceUsageOverlay.h:
1983         (WebCore::ResourceUsageOverlay::pageOverlayDestroyed): Deleted.
1984         * page/mac/ServicesOverlayController.h:
1985         * page/mac/ServicesOverlayController.mm:
1986         (WebCore::ServicesOverlayController::pageOverlayDestroyed): Deleted.
1987         * testing/MockPageOverlayClient.cpp:
1988         * testing/MockPageOverlayClient.h:
1989         (WebCore::MockPageOverlayClient::pageOverlayDestroyed): Deleted.
1990
1991 2016-05-20  Alex Christensen  <achristensen@webkit.org>
1992
1993         Fix null dereferencing in CSSAnimationTriggerScrollValue::equals
1994         https://bugs.webkit.org/show_bug.cgi?id=157930
1995
1996         Reviewed by Dean Jackson.
1997
1998         Test: fast/css/compare-animation-trigger.html
1999
2000         * css/CSSAnimationTriggerScrollValue.cpp:
2001         (WebCore::CSSAnimationTriggerScrollValue::equals):
2002         * css/CSSAnimationTriggerScrollValue.h:
2003         (WebCore::CSSAnimationTriggerScrollValue::create):
2004         (WebCore::CSSAnimationTriggerScrollValue::startValue):
2005         (WebCore::CSSAnimationTriggerScrollValue::endValue):
2006         (WebCore::CSSAnimationTriggerScrollValue::hasEndValue):
2007         (WebCore::CSSAnimationTriggerScrollValue::operator==):
2008         (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
2009         * css/CSSToStyleMap.cpp:
2010         (WebCore::CSSToStyleMap::mapAnimationTrigger):
2011         * css/CSSValue.h:
2012         (WebCore::CSSValue::operator==):
2013
2014 2016-05-20  Dave Hyatt  <hyatt@apple.com>
2015
2016         Scrolling broken in iTunes connect pages
2017         https://bugs.webkit.org/show_bug.cgi?id=157678
2018
2019         Reviewed by Zalan Bujtas.
2020
2021         Added fast/flexbox/nested-columns-min-intrinsic-disabled.html
2022
2023         Turn off minimum intrinsic size adjustment for flexboxes. This violates the spec,
2024         but until we can produce good results that is what we need to do. Blink has also
2025         turned off nested columns intrinsic sizing as well, so we match them with this
2026         change.
2027
2028         * rendering/RenderFlexibleBox.cpp:
2029         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
2030
2031 2016-05-20  Rawinder Singh  <rawinder.singh-webkit@cisra.canon.com.au>
2032
2033         Implement operator== for WeakPtr
2034         https://bugs.webkit.org/show_bug.cgi?id=157883
2035
2036         Reviewed by Chris Dumez.
2037
2038         Implement operator== and operator!= for WeakPtr and update code to use the operators.
2039
2040         * page/EventHandler.cpp:
2041         (WebCore::EventHandler::handleMousePressEvent):
2042         (WebCore::EventHandler::updateLastScrollbarUnderMouse):
2043         * page/mac/EventHandlerMac.mm:
2044         (WebCore::EventHandler::platformCompleteWheelEvent):
2045
2046 2016-05-19  Tim Horton  <timothy_horton@apple.com>
2047
2048         REGRESSION (r200638): -[DOMHTMLVideoElement play] disappeared from ObjC bindings
2049         https://bugs.webkit.org/show_bug.cgi?id=157940
2050         <rdar://problem/26385907>
2051
2052         Reviewed by Dan Bernstein.
2053
2054         * html/HTMLMediaElement.idl:
2055         Drop the return value of play from the ObjC bindings, because the bindings
2056         generator doesn't seem to know what to do with a Promise.
2057
2058 2016-05-19  Chris Dumez  <cdumez@apple.com>
2059
2060         Improve compile-time assertions in is<>() / downcast<>()
2061         https://bugs.webkit.org/show_bug.cgi?id=157817
2062
2063         Reviewed by Darin Adler.
2064
2065         Add missing includes and drop unnecessary is<WebVTTElement>() check
2066         in SharingResolver::canShareStyleWithElement() that was identified
2067         by the new assertions. WebVTTElement inherits Element but the check
2068         was done on a StyledElement.
2069
2070         * accessibility/AccessibilityRenderObject.cpp:
2071         * accessibility/AccessibilitySVGElement.cpp:
2072         * css/CSSDefaultStyleSheets.cpp:
2073         * css/CSSParser.cpp:
2074         * css/CSSStyleSheet.cpp:
2075         * css/StyleResolver.cpp:
2076         * cssjit/SelectorCompiler.cpp:
2077         * dom/Document.cpp:
2078         * dom/Element.cpp:
2079         * dom/Node.cpp:
2080         * dom/Position.cpp:
2081         * editing/ApplyStyleCommand.cpp:
2082         * editing/FrameSelection.cpp:
2083         * editing/ReplaceSelectionCommand.cpp:
2084         * editing/TextIterator.cpp:
2085         * editing/VisiblePosition.cpp:
2086         * editing/VisibleUnits.cpp:
2087         * editing/cocoa/HTMLConverter.mm:
2088         * editing/htmlediting.cpp:
2089         * editing/markup.cpp:
2090         * html/GenericCachedHTMLCollection.cpp:
2091         * html/HTMLBodyElement.cpp:
2092         * html/HTMLFormElement.cpp:
2093         * html/HTMLLIElement.cpp:
2094         * html/HTMLNameCollection.cpp:
2095         * html/HTMLSelectElement.cpp:
2096         * html/parser/HTMLTreeBuilder.cpp:
2097         * inspector/InspectorDOMAgent.cpp:
2098         * inspector/InspectorStyleSheet.cpp:
2099         * loader/SubframeLoader.cpp:
2100         * loader/archive/cf/LegacyWebArchive.cpp:
2101         * mathml/MathMLElement.cpp:
2102         * page/EventHandler.cpp:
2103         * page/FrameView.cpp:
2104         * page/PageSerializer.cpp:
2105         * page/SpatialNavigation.cpp:
2106         * page/mac/EventHandlerMac.mm:
2107         * rendering/HitTestResult.cpp:
2108         * rendering/RenderBlockFlow.cpp:
2109         * rendering/RenderBox.cpp:
2110         * rendering/RenderBoxModelObject.cpp:
2111         * rendering/RenderElement.cpp:
2112         * rendering/RenderFieldset.cpp:
2113         * rendering/RenderLayer.cpp:
2114         * rendering/svg/RenderSVGTransformableContainer.cpp:
2115         * style/StyleSharingResolver.cpp:
2116         (WebCore::Style::SharingResolver::canShareStyleWithElement):
2117         * svg/SVGAnimationElement.cpp:
2118         * svg/SVGFELightElement.cpp:
2119         * svg/SVGTextPositioningElement.cpp:
2120
2121 2016-05-19  Zalan Bujtas  <zalan@apple.com>
2122
2123         Cleanup RenderObject::container()
2124         https://bugs.webkit.org/show_bug.cgi?id=157914
2125
2126         Reviewed by David Hyatt.
2127
2128         1. Now we have a dedicated method for the optional, repaintContainerSkipped branch. The container finding
2129         logic is moved to a static inline function so the compiler can optimize out the repaintContainerSkipped branches, when
2130         container() is called instead of container(repaintContainer, isRepaintContainerSkipped).
2131         2. Use helper functions like canContainAbsolutelyPositionedObjects()
2132         3. Remove stale comments.
2133
2134         No behaviour change.
2135
2136         * rendering/RenderBox.cpp:
2137         (WebCore::RenderBox::mapLocalToContainer):
2138         (WebCore::RenderBox::pushMappingToContainer):
2139         (WebCore::RenderBox::computeRectForRepaint):
2140         * rendering/RenderInline.cpp:
2141         (WebCore::RenderInline::computeRectForRepaint):
2142         (WebCore::RenderInline::mapLocalToContainer):
2143         (WebCore::RenderInline::pushMappingToContainer):
2144         * rendering/RenderObject.cpp:
2145         (WebCore::containerForElement):
2146         (WebCore::RenderObject::container):
2147         * rendering/RenderObject.h:
2148         * rendering/RenderText.h:
2149
2150 2016-05-16  Enrica Casucci  <enrica@apple.com>
2151
2152         No candidate punctuation when typing punctuation in WK2 text field.
2153         https://bugs.webkit.org/show_bug.cgi?id=157773
2154         rdar://problem/23084603
2155
2156         Reviewed by Sam Weinig.
2157
2158         We need to keep the inputManagerHint as part of the platform key event
2159         information. Adding a new initializer for the task and a property to retrieve
2160         the stored hint.
2161
2162         * platform/ios/WebEvent.h:
2163         * platform/ios/WebEvent.mm:
2164         (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:keyCode:isTabKey:characterSet:]):
2165         (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:withInputManagerHint:keyCode:isTabKey:]):
2166         (-[WebEvent dealloc]):
2167         (-[WebEvent inputManagerHint]):
2168
2169 2016-05-19  Brady Eidson  <beidson@apple.com>
2170
2171         Finishing off: Modern IDB: Website data store management.
2172         https://bugs.webkit.org/show_bug.cgi?id=157626
2173
2174         Reviewed by Alex Christensen.
2175
2176         Test: storage/indexeddb/modern/new-database-after-user-delete.html
2177
2178         This patch does two primary things:
2179         1 - Implements the actual "delete files on disk" code for unopened databases,
2180             taken from existing WK2 code.
2181
2182         2 - When a UniqueIBDDatabase is told to close immediately for user delete, it also
2183             queues up a "delete backing store unconditionally" operation in the database task queue.
2184
2185             That way, all of the open databases are deleted before the primary "delete all files"
2186             pass, and they are also deleted before any future openDB requests are handled that might
2187             recreate the files.
2188
2189         * Modules/indexeddb/server/IDBServer.cpp:
2190         (WebCore::IDBServer::IDBServer::getOrCreateUniqueIDBDatabase):
2191         (WebCore::IDBServer::IDBServer::deleteDatabase):
2192         (WebCore::IDBServer::IDBServer::closeUniqueIDBDatabase):
2193         (WebCore::IDBServer::IDBServer::openDBRequestCancelled):
2194         (WebCore::IDBServer::removeAllDatabasesForOriginPath):
2195         (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince):
2196         (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins):
2197
2198         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2199         (WebCore::IDBServer::UniqueIDBDatabase::performUnconditionalDeleteBackingStore):
2200         (WebCore::IDBServer::UniqueIDBDatabase::doneWithHardClose):
2201         (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
2202         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2203
2204 2016-05-19  Brady Eidson  <beidson@apple.com>
2205
2206         REGRESSION(201098) GuardMalloc / ASan crashes in WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTaskReply
2207         https://bugs.webkit.org/show_bug.cgi?id=157917
2208
2209         Reviewed by Alex Christensen.
2210
2211         No new tests (Covered by all existing tests in Gmalloc/ASAN configs).
2212
2213         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2214         (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
2215         (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTaskReply): Protect this from deletion before executing the task.
2216
2217 2016-05-19  Jer Noble  <jer.noble@apple.com>
2218
2219         [IOS] Add setting to allow playback to continue inline after exiting fullscreen.
2220         https://bugs.webkit.org/show_bug.cgi?id=157912
2221
2222         Reviewed by Eric Carlson.
2223
2224         Test: media/media-fullscreen-return-to-inline.html
2225
2226         Allow playback to continue when exiting fullscreen via settings.
2227
2228         * html/HTMLMediaElement.cpp:
2229         (WebCore::HTMLMediaElement::exitFullscreen):
2230         * page/Settings.in:
2231
2232 2016-05-19  Dave Hyatt  <hyatt@apple.com>
2233
2234         Fix childrenInline() check in markAllDescendantsWithFloatsForLayout()
2235         https://bugs.webkit.org/show_bug.cgi?id=157866
2236
2237         Reviewed by Zalan Bujtas.
2238
2239         * rendering/RenderBlockFlow.cpp:
2240         (WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout):
2241
2242 2016-05-19  Chris Dumez  <cdumez@apple.com>
2243
2244         Update RenderBlockFlow::adjustComputedFontSizes() to use RenderObjectTraversal
2245         https://bugs.webkit.org/show_bug.cgi?id=157784
2246
2247         Reviewed by Zalan Bujtas.
2248
2249         Update RenderBlockFlow::adjustComputedFontSizes() to use RenderObjectTraversal
2250         instead of having its own Renderer tree traversal API, specifically for iOS
2251         text autosizing.
2252
2253         * rendering/RenderBlockFlow.cpp:
2254         (WebCore::isVisibleRenderText):
2255         (WebCore::resizeTextPermitted):
2256         (WebCore::isNonBlocksOrNonFixedHeightListItems):
2257         (WebCore::RenderBlockFlow::adjustComputedFontSizes):
2258         * rendering/RenderIterator.h:
2259         (WebCore::RenderObjectTraversal::nextSkippingChildren):
2260         * rendering/RenderObject.cpp:
2261         (WebCore::RenderObject::traverseNext): Deleted.
2262         (WebCore::RenderObject::enclosingBox): Deleted.
2263         (WebCore::RenderObject::enclosingBoxModelObject): Deleted.
2264         (WebCore::RenderObject::fixedPositionedWithNamedFlowContainingBlock): Deleted.
2265         (WebCore::hasFixedPosInNamedFlowContainingBlock): Deleted.
2266         (WebCore::RenderObject::firstLineBlock): Deleted.
2267         (WebCore::objectIsRelayoutBoundary): Deleted.
2268         * rendering/RenderObject.h:
2269
2270 2016-05-19  Csaba Osztrogonác  <ossy@webkit.org>
2271
2272         Fix the build with GCC 4.9 in CSSParser.cpp
2273         https://bugs.webkit.org/show_bug.cgi?id=157887
2274
2275         Reviewed by Chris Dumez.
2276
2277         * css/CSSParser.cpp:
2278         (WebCore::CSSParser::createViewportRule):
2279         * css/CSSParser.h:
2280
2281 2016-05-18  Brian Burg  <bburg@apple.com>
2282
2283         Web Inspector: use a consistent prefix for injected scripts
2284         https://bugs.webkit.org/show_bug.cgi?id=157715
2285         <rdar://problem/26287188>
2286
2287         Reviewed by Timothy Hatcher.
2288
2289         * CMakeLists.txt:
2290         * DerivedSources.make:
2291         * inspector/CommandLineAPIModuleSource.js:
2292
2293 2016-05-18  Jer Noble  <jer.noble@apple.com>
2294
2295         Playback controls should not be active for muted media elements.
2296         https://bugs.webkit.org/show_bug.cgi?id=157876
2297         <rdar://problem/26007525>
2298
2299         Reviewed by Eric Carlson.
2300
2301         Consolidate calls to setUpPlaybackControlsManager() and clearUpPlaybackControlsManager()
2302         into a new method, updatePlaybackControlsManager(), which checks with the MediaElementSession
2303         whether the media element can currently control the playback controls manager, and call
2304         one or the other method conditionally.
2305
2306         That means more logic needs to be moved into MediaElementSession::canControlControlsManager(),
2307         such as whether the element is muted(), has ended(), or whether the element's document has
2308         been suspended.
2309
2310         * html/HTMLMediaElement.cpp:
2311         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2312         (WebCore::HTMLMediaElement::setMuted):
2313         (WebCore::HTMLMediaElement::updatePlayState):
2314         (WebCore::HTMLMediaElement::clearMediaPlayer):
2315         (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
2316         (WebCore::HTMLMediaElement::createMediaPlayer):
2317         (WebCore::HTMLMediaElement::updatePlaybackControlsManager):
2318         * html/HTMLMediaElement.h:
2319         * html/MediaElementSession.cpp:
2320         (WebCore::MediaElementSession::canControlControlsManager):
2321
2322 2016-05-19  Chris Dumez  <cdumez@apple.com>
2323
2324         Kill JSDOMBindings' createNewWrapper()
2325         https://bugs.webkit.org/show_bug.cgi?id=157842
2326
2327         Reviewed by Youenn Fablet.
2328
2329         Kill JSDOMBindings' createNewWrapper() as it is identical to createWrapper().
2330
2331         * bindings/js/JSDOMBinding.h:
2332         (WebCore::createNewWrapper): Deleted.
2333         * bindings/js/JSDocumentFragmentCustom.cpp:
2334         (WebCore::toJSNewlyCreated):
2335         * bindings/js/JSNodeListCustom.cpp:
2336         (WebCore::createWrapper):
2337         * bindings/scripts/CodeGeneratorJS.pm:
2338         (GenerateImplementation):
2339         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2340         (WebCore::toJSNewlyCreated):
2341         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
2342         (WebCore::toJSNewlyCreated):
2343         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2344         (WebCore::toJSNewlyCreated):
2345         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2346         (WebCore::toJSNewlyCreated):
2347         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2348         (WebCore::toJSNewlyCreated):
2349         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2350         (WebCore::toJSNewlyCreated):
2351         * bindings/scripts/test/JS/JSTestException.cpp:
2352         (WebCore::toJSNewlyCreated):
2353         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2354         (WebCore::toJSNewlyCreated):
2355         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
2356         (WebCore::toJSNewlyCreated):
2357         * bindings/scripts/test/JS/JSTestInterface.cpp:
2358         (WebCore::toJSNewlyCreated):
2359         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2360         (WebCore::toJSNewlyCreated):
2361         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2362         (WebCore::toJSNewlyCreated):
2363         * bindings/scripts/test/JS/JSTestNode.cpp:
2364         (WebCore::toJSNewlyCreated):
2365         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2366         (WebCore::toJSNewlyCreated):
2367         * bindings/scripts/test/JS/JSTestObj.cpp:
2368         (WebCore::toJSNewlyCreated):
2369         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2370         (WebCore::toJSNewlyCreated):
2371         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2372         (WebCore::toJSNewlyCreated):
2373         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2374         (WebCore::toJSNewlyCreated):
2375         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2376         (WebCore::toJSNewlyCreated):
2377         * bindings/scripts/test/JS/JSattribute.cpp:
2378         (WebCore::toJSNewlyCreated):
2379         * bindings/scripts/test/JS/JSreadonly.cpp:
2380         (WebCore::toJSNewlyCreated):
2381
2382 2016-05-18  Jer Noble  <jer.noble@apple.com>
2383
2384         Playback controls still valid after navigating back after watching YouTube video.
2385         https://bugs.webkit.org/show_bug.cgi?id=157874
2386         <rdar://problem/25993063>
2387
2388         Reviewed by Eric Carlson.
2389
2390         YouTube uses window.onpopstate to "navigate" backwards from a video page to the main page
2391         (or other video page). This causes the playback controls to not be cleared (since no
2392         navigation actually occured). Instead, clear the playback controls when we clear our
2393         MediaPlayer due to load() being called, when the src= attribute is changed, or when a
2394         <source> element is added to the <video>.
2395
2396         * html/HTMLMediaElement.cpp:
2397         (WebCore::HTMLMediaElement::clearMediaPlayer):
2398         (WebCore::HTMLMediaElement::createMediaPlayer):
2399
2400 2016-05-19  Philippe Normand  <pnormand@igalia.com>
2401
2402         [GStreamer] unrelated codecs required to play videos
2403         https://bugs.webkit.org/show_bug.cgi?id=135972
2404
2405         Reviewed by Michael Catanzaro.
2406
2407         Instead of hard-coding the list of supported mime-types, check the
2408         decoder and demuxer GStreamer elements available and dynamically
2409         build the list of mime-types accordingly. This patch also removes
2410         support for under-used and exotic mime-types.
2411
2412         Based on a patch by Mario Sanchez Prada.
2413
2414         No new tests, existing media tests cover this change.
2415
2416         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
2417         (WebCore::gstRegistryHasElementForMediaType): New function
2418         checking the elements registered in the factories have a sink pad
2419         matching the caps specified as second argument of the function.
2420         * platform/graphics/gstreamer/GStreamerUtilities.h:
2421         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2422         (WebCore::mimeTypeSet): Hard-coded list of mime-types replaced by
2423         runtime-built list of mime-types that can be supported by the
2424         GStreamer decoders and demuxers available on the host machine.
2425         (WebCore::MediaPlayerPrivateGStreamer::getSupportedTypes):
2426         mimeTypeCache renamed to mimeTypeSet.
2427         (WebCore::MediaPlayerPrivateGStreamer::supportsType): Ditto.
2428
2429 2016-05-19  Csaba Osztrogonác  <ossy@webkit.org>
2430
2431         [ARM] Fix Wformat warning in MemoryPressureHandler.cpp
2432         https://bugs.webkit.org/show_bug.cgi?id=157892
2433
2434         Reviewed by Michael Saboff.
2435
2436         * platform/MemoryPressureHandler.cpp:
2437         (WebCore::MemoryPressureHandler::ReliefLogger::logMemoryUsageChange):
2438
2439 2016-05-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2440
2441         Remove castDOMMobjectForWrapperCreation(T&)
2442         https://bugs.webkit.org/show_bug.cgi?id=157886
2443
2444         Reviewed by Andreas Kling.
2445
2446         No change of behavior.
2447
2448         * bindings/js/JSDOMBinding.h:
2449         (WebCore::castDOMObjectForWrapperCreation): Deleted.
2450
2451 2016-05-18  Antti Koivisto  <antti@apple.com>
2452
2453         Style resolution for explicitly inherited properties is inefficient
2454         https://bugs.webkit.org/show_bug.cgi?id=157860
2455
2456         Reviewed by Andreas Kling.
2457
2458         We mark the parent style with hasExplicitlyInheritedProperties bit rather than the style that is actually
2459         affected by inherited properties. This leads to various inefficiencies including unnecessarily wide style recalcs.
2460
2461         * css/StyleResolver.cpp:
2462         (WebCore::isCacheableInMatchedPropertiesCache):
2463
2464             Check the style itself rather than the parent. This allows more caching.
2465
2466         (WebCore::StyleResolver::applyProperty):
2467
2468             Mark the style rather than the parent.
2469
2470         * style/StyleChange.cpp:
2471         (WebCore::Style::determineChange):
2472
2473             Remove hasExplicitlyInheritedProperties test and just return NoInherit. Having explicitly inherited
2474             properties doesn't make the children inherit them automatically.
2475
2476             This allows smaller style recalcs.
2477
2478         * style/StyleTreeResolver.cpp:
2479         (WebCore::Style::TreeResolver::resolveElement):
2480
2481             This patch exposed a bug with appearance property in meter and progress elements.
2482             They may construct different renderer based on appearance so we need to force
2483             render tree reconstruction when it changes.
2484
2485         (WebCore::Style::TreeResolver::popParentsToDepth):
2486         (WebCore::Style::shouldResolvePseudoElement):
2487
2488             Don't clear the style recalc bits here.
2489
2490         (WebCore::Style::shouldResolveElement):
2491
2492             Add a helper.
2493             If the parent had a NoInherit style change, test if the element has existing style with
2494             hasExplicitlyInheritedProperties bit. If so we need to re-resolve this element.
2495
2496         (WebCore::Style::clearNeedsStyleResolution):
2497
2498             Also clear pseudo elements.
2499
2500         (WebCore::Style::TreeResolver::resolveComposedTree):
2501
2502 2016-05-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2503
2504         Refactor toJS functions to use toJSNewlyCreated
2505         https://bugs.webkit.org/show_bug.cgi?id=157835
2506
2507         Reviewed by Chris Dumez.
2508
2509         Moving checks generated by binding generator from toJS to toJSNewlyCreated.
2510         Changing wrap template function to use toJSNewlyCreated function.
2511         This allows DOMClass toJS() to be equivalent to wrap template function.
2512
2513         Refactored custom binding code to take benefit of this.
2514
2515         Covered by existing tests.
2516
2517         * bindings/js/JSAnimationTimelineCustom.cpp:
2518         (WebCore::toJSNewlyCreated):
2519         (WebCore::toJS):
2520         * bindings/js/JSBlobCustom.cpp:
2521         (WebCore::toJSNewlyCreated):
2522         (WebCore::toJS):
2523         * bindings/js/JSCSSRuleCustom.cpp:
2524         (WebCore::toJSNewlyCreated):
2525         (WebCore::toJS):
2526         * bindings/js/JSCSSValueCustom.cpp:
2527         (WebCore::toJSNewlyCreated):
2528         (WebCore::toJS):
2529         * bindings/js/JSCanvasRenderingContextCustom.cpp:
2530         (WebCore::toJSNewlyCreated):
2531         (WebCore::toJS):
2532         * bindings/js/JSDOMBinding.h:
2533         (WebCore::wrap):
2534         (WebCore::toJS):
2535         * bindings/js/JSDocumentCustom.cpp:
2536         (WebCore::toJS):
2537         (WebCore::cachedDocumentWrapper): Deleted.
2538         * bindings/js/JSDocumentFragmentCustom.cpp:
2539         (WebCore::toJSNewlyCreated):
2540         (WebCore::toJS):
2541         * bindings/js/JSEventCustom.cpp:
2542         (WebCore::toJSNewlyCreated):
2543         (WebCore::toJS):
2544         * bindings/js/JSHTMLCollectionCustom.cpp:
2545         (WebCore::toJSNewlyCreated):
2546         (WebCore::toJS):
2547         * bindings/js/JSHTMLDocumentCustom.cpp:
2548         (WebCore::toJSNewlyCreated):
2549         (WebCore::toJS):
2550         * bindings/js/JSHTMLTemplateElementCustom.cpp:
2551         (WebCore::JSHTMLTemplateElement::content):
2552         * bindings/js/JSIDBCursorCustom.cpp:
2553         (WebCore::toJSNewlyCreated):
2554         (WebCore::toJS):
2555         * bindings/js/JSImageDataCustom.cpp:
2556         (WebCore::toJSNewlyCreated):
2557         (WebCore::toJS):
2558         * bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
2559         (WebCore::toJSNewlyCreated):
2560         (WebCore::toJS):
2561         * bindings/js/JSNodeListCustom.h:
2562         (WebCore::toJS):
2563         * bindings/js/JSPerformanceEntryCustom.cpp:
2564         (WebCore::toJSNewlyCreated):
2565         (WebCore::toJS):
2566         * bindings/js/JSSVGPathSegCustom.cpp:
2567         (WebCore::toJSNewlyCreated):
2568         (WebCore::toJS):
2569         * bindings/js/JSStyleSheetCustom.cpp:
2570         (WebCore::toJSNewlyCreated):
2571         (WebCore::toJS):
2572         * bindings/js/JSTextCustom.cpp:
2573         (WebCore::toJSNewlyCreated):
2574         (WebCore::toJS):
2575         * bindings/js/JSTextTrackCueCustom.cpp:
2576         (WebCore::toJSNewlyCreated):
2577         (WebCore::toJS):
2578         * bindings/js/JSTrackCustom.cpp:
2579         (WebCore::toJS):
2580         * bindings/js/JSXMLDocumentCustom.cpp:
2581         (WebCore::toJSNewlyCreated):
2582         (WebCore::toJS):
2583         * bindings/scripts/CodeGeneratorJS.pm:
2584         (GenerateImplementation):
2585         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2586         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
2587         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2588         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2589         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2590         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2591         * bindings/scripts/test/JS/JSTestException.cpp:
2592         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2593         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
2594         * bindings/scripts/test/JS/JSTestInterface.cpp:
2595         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2596         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2597         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2598         * bindings/scripts/test/JS/JSTestObj.cpp:
2599         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2600         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2601         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2602         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2603         * bindings/scripts/test/JS/JSattribute.cpp:
2604         * bindings/scripts/test/JS/JSreadonly.cpp:
2605
2606 2016-05-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2607
2608         Make binding DOM constructor use toJSNewlyCreated instead of toJS
2609         https://bugs.webkit.org/show_bug.cgi?id=157832
2610
2611         Reviewed by Chris Dumez.
2612
2613         Using toJSNewlyCreated in generated constructors instead of toJS.
2614         Enabling generation of toJS and toJSNewlyCreated for constructable DOM objects.
2615         This ensures that toJSNewlyCreated call in constructor will compile properly.
2616
2617         Updating some custom code to implement toJSNewlyCreated.
2618
2619         Covered by existing tests.
2620
2621         * bindings/js/JSImageDataCustom.cpp:
2622         (WebCore::toJSNewlyCreated):
2623         (WebCore::toJS):
2624         * bindings/js/JSTextTrackCueCustom.cpp:
2625         (WebCore::toJSNewlyCreated):
2626         (WebCore::toJS):
2627         * bindings/scripts/CodeGeneratorJS.pm:
2628         (ShouldGenerateToJSDeclaration):
2629         (GenerateConstructorDefinition):
2630         * bindings/scripts/test/JS/JSTestInterface.cpp:
2631         (WebCore::JSTestInterfaceConstructor::construct):
2632         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2633         (WebCore::JSTestNamedConstructorNamedConstructor::construct):
2634         * bindings/scripts/test/JS/JSTestNode.cpp:
2635         (WebCore::JSTestNodeConstructor::construct):
2636         (WebCore::toJSNewlyCreated):
2637         (WebCore::toJS):
2638         * bindings/scripts/test/JS/JSTestNode.h:
2639         (WebCore::toJS):
2640         (WebCore::toJSNewlyCreated):
2641         * bindings/scripts/test/JS/JSTestObj.cpp:
2642         (WebCore::JSTestObjConstructor::construct):
2643         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2644         (WebCore::constructJSTestOverloadedConstructors1):
2645         (WebCore::constructJSTestOverloadedConstructors2):
2646         (WebCore::constructJSTestOverloadedConstructors3):
2647         (WebCore::constructJSTestOverloadedConstructors4):
2648         (WebCore::constructJSTestOverloadedConstructors5):
2649         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2650         (WebCore::JSTestTypedefsConstructor::construct):
2651
2652 2016-05-18  Zalan Bujtas  <zalan@apple.com>
2653
2654         Make LayoutUnit::operator bool() explicit.
2655         https://bugs.webkit.org/show_bug.cgi?id=157871
2656
2657         Reviewed by Simon Fraser.
2658
2659         This is in preparation for getting LayoutUnit::operator int() removed.
2660
2661         No behaviour change.
2662
2663         * platform/LayoutUnit.h:
2664         (WebCore::LayoutUnit::operator bool):
2665         * rendering/RenderView.cpp:
2666         (WebCore::RenderView::initializeLayoutState): Negative page height is invalid.
2667
2668 2016-05-18  Eric Carlson  <eric.carlson@apple.com>
2669
2670         [iOS] Fullscreen video playback broken in WK1 apps
2671         https://bugs.webkit.org/show_bug.cgi?id=157847
2672         <rdar://problem/25879521>
2673
2674         Reviewed by Jer Noble.
2675
2676         * platform/cocoa/WebVideoFullscreenModelVideoElement.h:
2677         (WebCore::WebVideoFullscreenModelVideoElement::playbackSessionModel): New, model accessor.
2678         * platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
2679         (WebVideoFullscreenModelVideoElement::setWebVideoFullscreenInterface): Set model's playback interface.
2680         (WebVideoFullscreenModelVideoElement::setVideoElement): Set model's video element.
2681
2682         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2683         (WebVideoFullscreenControllerContext::didCleanupFullscreen): Clear m_sessionModel.
2684         (WebVideoFullscreenControllerContext::setVideoDimensions): This is called from both the UI and
2685           Web threads, so dispatch to the UI thread when necessary.
2686         (WebVideoFullscreenControllerContext::play): Call the model's playback session on the Web thread.
2687         (WebVideoFullscreenControllerContext::pause): Ditto.
2688         (WebVideoFullscreenControllerContext::togglePlayState): Ditto.
2689         (WebVideoFullscreenControllerContext::beginScrubbing): Ditto.
2690         (WebVideoFullscreenControllerContext::endScrubbing): Ditto.
2691         (WebVideoFullscreenControllerContext::seekToTime): Ditto.
2692         (WebVideoFullscreenControllerContext::fastSeek): Ditto.
2693         (WebVideoFullscreenControllerContext::beginScanningForward): Ditto.
2694         (WebVideoFullscreenControllerContext::beginScanningBackward): Ditto.
2695         (WebVideoFullscreenControllerContext::endScanning): Ditto.
2696         (WebVideoFullscreenControllerContext::selectAudioMediaOption): Ditto.
2697         (WebVideoFullscreenControllerContext::selectLegibleMediaOption): Ditto.
2698         (WebVideoFullscreenControllerContext::setUpFullscreen): Create and configure a session model.
2699         (WebVideoFullscreenSessionModel::play): Pass call back to the controller.
2700         (WebVideoFullscreenSessionModel::pause): Ditto.
2701         (WebVideoFullscreenSessionModel::togglePlayState): Ditto.
2702         (WebVideoFullscreenSessionModel::beginScrubbing): Ditto.
2703         (WebVideoFullscreenSessionModel::endScrubbing): Ditto.
2704         (WebVideoFullscreenSessionModel::seekToTime): Ditto.
2705         (WebVideoFullscreenSessionModel::fastSeek): Ditto.
2706         (WebVideoFullscreenSessionModel::beginScanningForward): Ditto.
2707         (WebVideoFullscreenSessionModel::beginScanningBackward): Ditto.
2708         (WebVideoFullscreenSessionModel::endScanning): Ditto.
2709         (WebVideoFullscreenSessionModel::selectAudioMediaOption): Ditto.
2710         (WebVideoFullscreenSessionModel::selectLegibleMediaOption): Ditto.
2711
2712 2016-05-18  Zalan Bujtas  <zalan@apple.com>
2713
2714         Remove LayoutUnit::operator unsigned().
2715         https://bugs.webkit.org/show_bug.cgi?id=157856
2716
2717         Reviewed by Simon Fraser.
2718
2719         Converting LayoutUnit values to unsigned is lossy. We should avoid
2720         such implicit conversions. 
2721
2722         No behaviour change.
2723
2724         * html/ImageInputType.cpp:
2725         (WebCore::ImageInputType::height):
2726         (WebCore::ImageInputType::width):
2727         * page/EventHandler.cpp:
2728         (WebCore::EventHandler::hitTestResultAtPoint):
2729         * platform/LayoutUnit.h:
2730         (WebCore::LayoutUnit::operator unsigned): Deleted.
2731         * rendering/RenderBlockFlow.cpp:
2732         (WebCore::RenderBlockFlow::computeColumnCountAndWidth):
2733
2734 2016-05-18  Alex Christensen  <achristensen@webkit.org>
2735
2736         Clean up CSS code
2737         https://bugs.webkit.org/show_bug.cgi?id=157808
2738
2739         Reviewed by Chris Dumez.
2740
2741         No new tests. Just cleaning up and modernizing code.
2742
2743         * css/BasicShapeFunctions.cpp:
2744         (WebCore::convertToCenterCoordinate):
2745         (WebCore::cssValueToBasicShapeRadius):
2746         (WebCore::basicShapeForValue):
2747         * css/BasicShapeFunctions.h:
2748         * css/CSSAnimationTriggerScrollValue.h:
2749         (WebCore::CSSAnimationTriggerScrollValue::create):
2750         (WebCore::CSSAnimationTriggerScrollValue::startValue):
2751         (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
2752         * css/CSSAspectRatioValue.h:
2753         * css/CSSBasicShapes.h:
2754         * css/CSSBorderImage.cpp:
2755         (WebCore::createBorderImageValue):
2756         * css/CSSBorderImage.h:
2757         * css/CSSBorderImageSliceValue.h:
2758         (WebCore::CSSBorderImageSliceValue::create):
2759         * css/CSSCalculationValue.h:
2760         * css/CSSCanvasValue.h:
2761         (WebCore::CSSCanvasValue::CSSCanvasValue):
2762         * css/CSSComputedStyleDeclaration.cpp:
2763         (WebCore::valueForNinePieceImageSlice):
2764         (WebCore::valueForNinePieceImageQuad):
2765         (WebCore::valueForNinePieceImage):
2766         (WebCore::zoomAdjustedPixelValue):
2767         * css/CSSComputedStyleDeclaration.h:
2768         * css/CSSFontFaceLoadEvent.cpp:
2769         (WebCore::CSSFontFaceLoadEvent::CSSFontFaceLoadEvent):
2770         * css/CSSFontFaceLoadEvent.h:
2771         * css/CSSFontValue.h:
2772         * css/CSSFunctionValue.h:
2773         * css/CSSGradientValue.h:
2774         (WebCore::CSSGradientValue::setFirstX):
2775         (WebCore::CSSGradientValue::setFirstY):
2776         (WebCore::CSSGradientValue::setSecondX):
2777         (WebCore::CSSGradientValue::setSecondY):
2778         (WebCore::CSSGradientValue::addStop):
2779         (WebCore::CSSLinearGradientValue::create):
2780         (WebCore::CSSLinearGradientValue::setAngle):
2781         (WebCore::CSSRadialGradientValue::setFirstRadius):
2782         (WebCore::CSSRadialGradientValue::setSecondRadius):
2783         (WebCore::CSSRadialGradientValue::setShape):
2784         (WebCore::CSSRadialGradientValue::setSizingBehavior):
2785         (WebCore::CSSRadialGradientValue::setEndHorizontalSize):
2786         (WebCore::CSSRadialGradientValue::setEndVerticalSize):
2787         * css/CSSGroupingRule.cpp:
2788         (WebCore::CSSGroupingRule::item):
2789         (WebCore::CSSGroupingRule::cssRules):
2790         * css/CSSKeyframesRule.cpp:
2791         (WebCore::CSSKeyframesRule::cssRules):
2792         * css/CSSParser.cpp:
2793         (WebCore::CSSParser::addProperty):
2794         (WebCore::CSSParser::rollbackLastProperties):
2795         (WebCore::CSSParser::parseDashboardRegions):
2796         (WebCore::CSSParser::parseClipShape):
2797         (WebCore::CSSParser::parseBasicShapeCircle):
2798         (WebCore::BorderImageParseContext::commitWebKitBorderImage):
2799         (WebCore::BorderImageParseContext::commitBorderImage):
2800         (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
2801         (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
2802         (WebCore::CSSParser::parseDeprecatedRadialGradient):
2803         (WebCore::CSSParser::parseRadialGradient):
2804         * css/CSSParser.h:
2805         (WebCore::cssyylex):
2806         * css/CSSPrimitiveValue.h:
2807         * css/CSSProperty.cpp:
2808         * css/CSSProperty.h:
2809         (WebCore::CSSProperty::CSSProperty):
2810         * css/CSSRule.h:
2811         * css/CSSRuleList.h:
2812         * css/CSSSegmentedFontFace.h:
2813         * css/Counter.h:
2814         (WebCore::Counter::create):
2815         (WebCore::Counter::identifier):
2816         (WebCore::Counter::listStyleIdent):
2817         (WebCore::Counter::setIdentifier):
2818         (WebCore::Counter::setListStyle):
2819         (WebCore::Counter::setSeparator):
2820         (WebCore::Counter::equals):
2821         (WebCore::Counter::cloneForCSSOM):
2822         (WebCore::Counter::Counter):
2823         * css/Pair.h:
2824         * css/Rect.h:
2825         (WebCore::RectBase::bottom):
2826         (WebCore::RectBase::left):
2827         (WebCore::RectBase::setTop):
2828         (WebCore::RectBase::setRight):
2829         (WebCore::RectBase::setBottom):
2830         (WebCore::RectBase::setLeft):
2831         (WebCore::RectBase::equals):
2832         * css/SVGCSSComputedStyleDeclaration.cpp:
2833         (WebCore::strokeDashArrayToCSSValueList):
2834         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
2835         * css/StyleBuilderConverter.h:
2836         (WebCore::StyleBuilderConverter::convertClipPath):
2837         (WebCore::StyleBuilderConverter::convertShapeValue):
2838         * css/StyleProperties.cpp:
2839         (WebCore::StyleProperties::borderPropertyValue):
2840         (WebCore::StyleProperties::getPropertyCSSValue):
2841         (WebCore::StyleProperties::getPropertyCSSValueInternal):
2842         (WebCore::MutableStyleProperties::setCustomProperty):
2843         (WebCore::MutableStyleProperties::setProperty):
2844         * css/StyleProperties.h:
2845         (WebCore::StyleProperties::isEmpty):
2846         (isType):
2847         * css/StylePropertyShorthand.cpp:
2848         * css/StylePropertyShorthand.h:
2849         (WebCore::StylePropertyShorthand::StylePropertyShorthand):
2850         (WebCore::StylePropertyShorthand::id):
2851         * css/StyleResolver.cpp:
2852         (WebCore::StyleResolver::appendAuthorStyleSheets):
2853         (WebCore::StyleResolver::addKeyframeStyle):
2854         (WebCore::StyleResolver::~StyleResolver):
2855         (WebCore::StyleResolver::resolvedVariableValue):
2856         (WebCore::StyleResolver::styleImage):
2857         (WebCore::StyleResolver::cachedOrPendingFromValue):
2858         (WebCore::StyleResolver::generatedOrPendingFromValue):
2859         (WebCore::StyleResolver::createFilterOperations):
2860         (WebCore::StyleResolver::loadPendingImage):
2861         * css/StyleResolver.h:
2862         (WebCore::StyleResolver::hasViewportDependentMediaQueries):
2863         (WebCore::StyleResolver::state):
2864         (WebCore::checkRegionSelector):
2865         * css/StyleSheetList.h:
2866         * css/WebKitCSSFilterValue.cpp:
2867         * css/WebKitCSSFilterValue.h:
2868         * css/WebKitCSSTransformValue.cpp:
2869         * css/WebKitCSSTransformValue.h:
2870         * rendering/shapes/Shape.cpp:
2871
2872 2016-05-18  Jer Noble  <jer.noble@apple.com>
2873
2874         webkitEnterFullscreen() does not require a user gesture when RequireUserGestureForAudioRateChange is set.
2875         https://bugs.webkit.org/show_bug.cgi?id=157803
2876
2877         Reviewed by Eric Carlson.
2878
2879         Test: media/video-play-audio-require-user-gesture.html
2880
2881         Refactor the setting of restrictions in the HTMLMediaElement constructor, and in so doing, only
2882         relax the RequireUserGestureForFullscreen restriction if both videoPlaybackRequiresUserGesture()
2883         and audioPlaybackRequiresUserGesture() settings are not set.
2884
2885         * html/HTMLMediaElement.cpp:
2886         (WebCore::HTMLMediaElement::HTMLMediaElement):
2887
2888 2016-05-18  Jer Noble  <jer.noble@apple.com>
2889
2890         Playback session sends audio and text track lists when media does not have audio or text tracks.
2891         https://bugs.webkit.org/show_bug.cgi?id=157865
2892         <rdar://problem/25992750>
2893
2894         Reviewed by Beth Dakin.
2895
2896         Only send across the CaptionUserPreferences-generated list of audio and text tracks if those
2897         text tracks exist in the first place. This matches the behavior of the built-in controls.
2898
2899         * platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
2900         (WebPlaybackSessionModelMediaElement::updateLegibleOptions):
2901
2902 2016-05-18  Chris Dumez  <cdumez@apple.com>
2903
2904         Clean up / Modernize TextAutoSizingValue::adjustNodeSizes()
2905         https://bugs.webkit.org/show_bug.cgi?id=157861
2906
2907         Reviewed by Alex Christensen.
2908
2909         Clean up / Modernize TextAutoSizingValue::adjustNodeSizes(), and
2910         use tighter typing for autosizing nodes.
2911
2912         * dom/Document.cpp:
2913         (WebCore::Document::addAutoSizingNode):
2914         * dom/Document.h:
2915         * rendering/RenderBlockFlow.cpp:
2916         (WebCore::RenderBlockFlow::adjustComputedFontSizes):
2917         * rendering/TextAutoSizing.cpp:
2918         (WebCore::TextAutoSizingValue::addNode):
2919         (WebCore::TextAutoSizingValue::adjustNodeSizes):
2920         (WebCore::TextAutoSizingValue::reset):
2921         * rendering/TextAutoSizing.h:
2922
2923 2016-05-18  Simon Fraser  <simon.fraser@apple.com>
2924
2925         Remove logging inadvertently committed in r201090.
2926
2927         * css/CSSParser.cpp:
2928         (WebCore::CSSParserContext::CSSParserContext): Deleted.
2929
2930 2016-05-18  Brady Eidson  <beidson@apple.com>
2931
2932         Modern IDB: Add support for server side closing of open database connections.
2933         https://bugs.webkit.org/show_bug.cgi?id=157843
2934
2935         Reviewed by Alex Christensen.
2936
2937         Test: storage/indexeddb/modern/handle-user-delete.html
2938
2939         In order to support deleting IndexedDB databases, the IDB server needs the ability to 
2940         "immediately" close a currently open IDB connection.
2941         
2942         To do so cleanly, the server has to:
2943         - Error out all requests it knows about
2944         - Abort all transactions it knows about
2945         - Tell the connection that it is being closed
2946         - Wait for the connection to acknowledge that it was closed on the server
2947         
2948         And then the client has to:
2949         - Error out all requests it hasn't sent to the server
2950         - Abort all transactions that haven't already been aborted by the server
2951         - Send acknowledgement to the server that it has been closed.
2952
2953         Finally, because the status of a given request might be "in flight" somewhere between the 
2954         server and the client, some design assumptions change. This requires reworking some ASSERTS,
2955         null checks, etc.
2956
2957         * Modules/indexeddb/IDBDatabase.cpp:
2958         (WebCore::IDBDatabase::didCloseFromServer): Do the heavy lifting for the immediate close on
2959           the client side.
2960         * Modules/indexeddb/IDBDatabase.h:
2961         
2962         * Modules/indexeddb/IDBDatabaseIdentifier.h:
2963         (WebCore::IDBDatabaseIdentifier::isRelatedToOrigin):
2964         
2965         * Modules/indexeddb/IDBTransaction.cpp:
2966         (WebCore::IDBTransaction::connectionClosedFromServer): Error out all outstanding operations
2967           and fire the abort error on itself.
2968         * Modules/indexeddb/IDBTransaction.h:
2969         
2970         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
2971         (WebCore::IDBClient::IDBConnectionProxy::completeOperation):
2972         (WebCore::IDBClient::IDBConnectionProxy::didCloseFromServer):
2973         (WebCore::IDBClient::IDBConnectionProxy::confirmDidCloseFromServer):
2974         (WebCore::IDBClient::IDBConnectionProxy::forgetActiveOperations):
2975         * Modules/indexeddb/client/IDBConnectionProxy.h:
2976         
2977         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2978         (WebCore::IDBClient::IDBConnectionToServer::didCloseFromServer):
2979         (WebCore::IDBClient::IDBConnectionToServer::confirmDidCloseFromServer):
2980         * Modules/indexeddb/client/IDBConnectionToServer.h:
2981         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2982         
2983         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
2984         (WebCore::IDBServer::IDBConnectionToClient::didCloseFromServer):
2985         * Modules/indexeddb/server/IDBConnectionToClient.h:
2986         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
2987         
2988         * Modules/indexeddb/server/IDBServer.cpp:
2989         (WebCore::IDBServer::IDBServer::confirmDidCloseFromServer):
2990         (WebCore::IDBServer::generateDeleteCallbackID):
2991         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
2992         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesForOrigins):
2993         (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince):
2994         (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins):
2995         (WebCore::IDBServer::IDBServer::didPerformCloseAndDeleteDatabases):
2996         * Modules/indexeddb/server/IDBServer.h:
2997         
2998         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2999         (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase):
3000         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
3001         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
3002         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
3003         (WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation):
3004         (WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
3005         (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
3006         (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
3007         (WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
3008         (WebCore::IDBServer::UniqueIDBDatabase::createIndex):
3009         (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
3010         (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
3011         (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
3012         (WebCore::IDBServer::UniqueIDBDatabase::getCount):
3013         (WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
3014         (WebCore::IDBServer::UniqueIDBDatabase::openCursor):
3015         (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
3016         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
3017         (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
3018         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
3019         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromServer):
3020         (WebCore::IDBServer::UniqueIDBDatabase::confirmDidCloseFromServer):
3021         (WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction):
3022         (WebCore::IDBServer::UniqueIDBDatabase::isCurrentlyInUse):
3023         (WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer):
3024         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
3025         (WebCore::IDBServer::UniqueIDBDatabase::activateTransactionInBackingStore):
3026         (WebCore::IDBServer::UniqueIDBDatabase::transactionCompleted):
3027         (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTask):
3028         (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply):
3029         (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTask):
3030         (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTaskReply):
3031         (WebCore::IDBServer::UniqueIDBDatabase::doneWithHardClose):
3032         (WebCore::IDBServer::errorOpenDBRequestForUserDelete):
3033         (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete): Do the heavy lifting
3034           for the immediate close on the server side.
3035         (WebCore::IDBServer::UniqueIDBDatabase::performErrorCallback):
3036         (WebCore::IDBServer::UniqueIDBDatabase::performKeyDataCallback):
3037         (WebCore::IDBServer::UniqueIDBDatabase::performGetResultCallback):
3038         (WebCore::IDBServer::UniqueIDBDatabase::performCountCallback):
3039         (WebCore::IDBServer::UniqueIDBDatabase::storeCallback): Deleted.
3040         (WebCore::IDBServer::UniqueIDBDatabase::storeCallbackOrFireError): If the database has been
3041           hard stopped, immediately fire and error for the callback and return a 0-identifier to
3042           reflect this.
3043         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3044         
3045         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
3046         (WebCore::IDBServer::UniqueIDBDatabaseConnection::confirmDidCloseFromServer):
3047         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
3048         
3049         * Modules/indexeddb/shared/IDBError.cpp:
3050         (WebCore::IDBError::toDOMError):
3051         * Modules/indexeddb/shared/IDBError.h:
3052         (WebCore::IDBError::userDeleteError):
3053         
3054         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
3055         (WebCore::InProcessIDBServer::didCloseFromServer):
3056         (WebCore::InProcessIDBServer::confirmDidCloseFromServer):
3057         * Modules/indexeddb/shared/InProcessIDBServer.h:
3058         
3059         * platform/CrossThreadCopier.cpp:
3060         (WebCore::std::chrono::system_clock::time_point>::copy):
3061         * platform/CrossThreadCopier.h:
3062
3063 2016-05-18  Simon Fraser  <simon.fraser@apple.com>
3064
3065         REGRESSION (r200534) Command-+ no longer zooms pages 
3066         https://bugs.webkit.org/show_bug.cgi?id=157826
3067         rdar://problem/26334636
3068
3069         Reviewed by Dean Jackson.
3070
3071         When text autosizing was enabled on Mac, we started to parse and respect
3072         -webkit-text-size-adjust. Fix by cutting this off in CSSParser if the feature
3073         is disabled.
3074
3075         Also fix InternalSettings to reset page and text zoom, since WebKit1 aliases
3076         the zoom levels causing DRT to fail to reset them between tests.
3077
3078         Test: fast/text-autosizing/mac/text-size-adjust-text-zoom.html
3079
3080         * css/CSSParser.cpp:
3081         (WebCore::CSSParserContext::CSSParserContext):
3082         (WebCore::isValidKeywordPropertyAndValue):
3083         (WebCore::CSSParser::parseValue):
3084         (WebCore::CSSParser::isTextAutosizingEnabled):
3085         * css/CSSParser.h:
3086         * css/CSSParserMode.h:
3087         * testing/InternalSettings.cpp:
3088         (WebCore::InternalSettings::resetToConsistentState):
3089
3090 2016-05-18  Dave Hyatt  <hyatt@apple.com>
3091
3092         markAllDescendantsWithFloatsForLayout should not drill into blocks with
3093         inline children. It was sufficient to mark ourselves as needing layout.
3094
3095         https://bugs.webkit.org/show_bug.cgi?id=157845
3096
3097         Reviewed by Simon Fraser.
3098
3099         * rendering/RenderBlockFlow.cpp:
3100         (WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout):
3101
3102 2016-05-18  Joanmarie Diggs  <jdiggs@igalia.com>
3103
3104         [GTK] accessibility/meter-element.html is failing
3105         https://bugs.webkit.org/show_bug.cgi?id=115633
3106
3107         Reviewed by Chris Fleizach.
3108
3109         The meter's value description should be exposed in the same fashion
3110         as (we should have been exposing) aria-valuetext, namely through the
3111         "valuetext" AtkObject attribute. This exposure is now in place. Also
3112         implement AccessibilityProgressIndicator::valueDescription() so that
3113         the ports do not have to special-case meter in the platform wrappers.
3114         Map the meter element to the correct role (ATK_ROLE_LEVEL_BAR), and
3115         ignore a previously-included accessible object resulting from the
3116         use of the title attribute on a meter. Finally, do not expose the
3117         meter's title as the accessible name because the HTML spec suggests
3118         authors can supply the numeric unit as the value of title.
3119
3120         No new test file as the failure was identified by meter-element.html.
3121         Seven new test cases were added for additional coverage. Also updated
3122         the ATK expectations for spinbutton-value.html to reflect that we are now
3123         exposing the value of aria-valuetext.
3124
3125         * accessibility/AccessibilityNodeObject.cpp:
3126         (WebCore::AccessibilityNodeObject::helpText):
3127         (WebCore::AccessibilityNodeObject::accessibilityDescriptionForChildren):
3128         (WebCore::AccessibilityNodeObject::visibleText):
3129         * accessibility/AccessibilityNodeObject.h:
3130         * accessibility/AccessibilityProgressIndicator.cpp:
3131         (WebCore::AccessibilityProgressIndicator::valueDescription):
3132         * accessibility/AccessibilityProgressIndicator.h:
3133         * accessibility/AccessibilityRenderObject.cpp:
3134         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3135         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3136         (webkitAccessibleGetAttributes):
3137         (atkRole):
3138         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3139         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3140
3141 2016-05-18  Antti Koivisto  <antti@apple.com>
3142
3143         Allow RenderStyles marked unique in matched properties cache
3144         https://bugs.webkit.org/show_bug.cgi?id=157844
3145
3146         Reviewed by Andreas Kling.
3147
3148         Depending on content this can improve matched properties cache hit rate quite a bit and so reduce
3149         time spent building styles.
3150
3151         * css/StyleBuilderCustom.h:
3152         (WebCore::StyleBuilderCustom::applyValueContent):
3153
3154             Set the attr bit on render style.
3155
3156         * css/StyleResolver.cpp:
3157         (WebCore::isCacheableInMatchedPropertiesCache):
3158
3159             Allow caching of styles marked "unique". It only means that they are not shareable by style
3160             sharing code because there were some complex selectors in the rules used for building them. It
3161             doesn't affect matched properties cache the cache how the properties were resolved.
3162
3163             We still need to test against "content: attr()" as that makes the style depend on the element
3164             being matched. It now has a separate bit in RenderStyle.
3165
3166         * rendering/style/RenderStyle.cpp:
3167         (WebCore::RenderStyle::setHasAttrContent):
3168
3169             Bit for "content: attr()". It also sets unique() to keep style sharing code happy.
3170
3171         (WebCore::requireTransformOrigin):
3172         * rendering/style/RenderStyle.h:
3173         (WebCore::RenderStyle::hasAttrContent):
3174         * rendering/style/StyleRareNonInheritedData.cpp:
3175         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3176         (WebCore::StyleRareNonInheritedData::operator==):
3177         * rendering/style/StyleRareNonInheritedData.h:
3178
3179 2016-05-18  Csaba Osztrogonác  <ossy@webkit.org>
3180
3181         Fix the allinone-build on Linux in Source/WebCore/html/HTMLElementsAllInOne.cpp
3182         https://bugs.webkit.org/show_bug.cgi?id=157800
3183
3184         Reviewed by Alex Christensen.
3185
3186         * html/HTMLElementsAllInOne.cpp:
3187
3188 2016-05-18  Brady Eidson  <beidson@apple.com>
3189
3190         Modern IDB: Make TestRunner.clearAllDatabases also delete IndexedDB databases (once doing so is supported).
3191         https://bugs.webkit.org/show_bug.cgi?id=157823
3192
3193         Reviewed by Alex Christensen.
3194
3195         No new tests (No current behavior change, will be tested with b/157626's resolution).
3196
3197         * Modules/indexeddb/server/IDBServer.cpp:
3198         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince): Stub this out for now.
3199         * Modules/indexeddb/server/IDBServer.h:
3200         * Modules/indexeddb/shared/InProcessIDBServer.h:
3201
3202 2016-05-18  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3203
3204         Sync DOM exception types with WebIDL and update promise rejections
3205         https://bugs.webkit.org/show_bug.cgi?id=157792
3206
3207         Reviewed by Eric Carlson.
3208
3209         Updating ExceptionCode with WebIDL latest exception types.
3210         Updating promise rejection code to use those types as per the latest specifications.
3211
3212         Updating getUserMedia error handling by removing NavigatorUserMediaError which no long exists.
3213
3214         Covered by rebased tests.
3215
3216         * CMakeLists.txt:
3217         * DerivedSources.cpp:
3218         * DerivedSources.make:
3219         * Modules/mediastream/MediaDevices.h:
3220         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
3221         (WebCore::MediaEndpointPeerConnection::createAnswer):
3222         (WebCore::MediaEndpointPeerConnection::setLocalDescription):
3223         (WebCore::MediaEndpointPeerConnection::setRemoteDescription):
3224         (WebCore::MediaEndpointPeerConnection::addIceCandidate):
3225         (WebCore::MediaEndpointPeerConnection::getStats):
3226         (WebCore::MediaEndpointPeerConnection::replaceTrack):
3227         * Modules/mediastream/NavigatorUserMediaError.cpp: Removed.
3228         * Modules/mediastream/NavigatorUserMediaError.h: Removed.
3229         * Modules/mediastream/NavigatorUserMediaError.idl: Removed.
3230         * Modules/mediastream/RTCPeerConnection.cpp:
3231         (WebCore::RTCPeerConnection::queuedCreateOffer):
3232         (WebCore::RTCPeerConnection::queuedCreateAnswer):
3233         (WebCore::RTCPeerConnection::queuedSetLocalDescription):
3234         (WebCore::RTCPeerConnection::queuedSetRemoteDescription):
3235         (WebCore::RTCPeerConnection::queuedAddIceCandidate):
3236         * Modules/mediastream/RTCRtpSender.cpp:
3237         (WebCore::RTCRtpSender::replaceTrack):
3238         * Modules/mediastream/UserMediaRequest.cpp:
3239         (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError):
3240         (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError):
3241         * WebCore.xcodeproj/project.pbxproj:
3242         * bindings/js/JSDOMBinding.cpp:
3243         (WebCore::createDOMException):
3244         * bindings/js/JSDOMBinding.h:
3245         * bindings/js/JSDOMPromise.cpp:
3246         (WebCore::DeferredWrapper::reject):
3247         * bindings/js/JSDOMPromise.h:
3248         (WebCore::DeferredWrapper::reject):
3249         (WebCore::DOMPromise::reject):
3250         * css/FontFaceSet.cpp:
3251         (WebCore::FontFaceSet::load):
3252         (WebCore::FontFaceSet::faceFinished):
3253         * dom/DOMCoreException.cpp:
3254         * dom/ExceptionCode.h:
3255         * html/HTMLMediaElement.cpp:
3256         (WebCore::HTMLMediaElement::play):
3257
3258 2016-05-18  Philippe Normand  <pnormand@igalia.com>
3259
3260         [GStreamer] webaudio crash on ARM platforms
3261         https://bugs.webkit.org/show_bug.cgi?id=157838
3262
3263         Reviewed by Michael Catanzaro.
3264
3265         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
3266         (webKitWebAudioSrcConstructed): Explicitely cast the integer value
3267         of the max-bytes property to guint64 which is the expected type of
3268         this property. The compiler can't guess this on its own.
3269
3270 2016-05-18  Philippe Normand  <pnormand@igalia.com>
3271
3272         [GStreamer] webaudio playback improvements
3273         https://bugs.webkit.org/show_bug.cgi?id=155228
3274
3275         Reviewed by Michael Catanzaro.
3276
3277         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
3278         (WebCore::autoAudioSinkChildAddedCallback): Fix sink buffer-time
3279         to 100ms to reduce playback latency.
3280         (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
3281         Connect to child-added signal of autoaudiosink to be notified when
3282         a real sink is added into the bin.
3283         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
3284         (webKitWebAudioSrcConstructed): Fine-tune blocksize of appsrc
3285         according to the buffer size already configured on the src element.
3286
3287 2016-05-18  Gwang Yoon Hwang  <yoon@igalia.com>
3288
3289         [GStreamer] Use FakeSink to get a decoded texture from a pipeline
3290         https://bugs.webkit.org/show_bug.cgi?id=153641
3291
3292         Reviewed by Philippe Normand.
3293
3294         Relying on GstGLImageSink to use GStreamerGL brings a lot of overheads such as
3295         window handling, context switching and overlay handling which are not needed in
3296         our case.
3297
3298         This patch replaces GstGLImageSink with a custom GstBin which has a
3299         GstGLUpload, GstGLColorConvert, and GstFakeSink.
3300
3301         GstFakeSink sends decoded frames via handoff signal from the vqueue thread of
3302         GStreamer. Previously,  GstGLImageSink passes frames through GStreamer's GL
3303         thread, which adds additional overhead.
3304
3305         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3306         (WebCore::GstVideoFrameHolder::~GstVideoFrameHolder): Modified to
3307         unmap GstVideoFrame without async call. GstGLMemory will unmap itself
3308         in gl-thread.
3309         (WebCore::MediaPlayerPrivateGStreamerBase::drawCallback):
3310         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL): Split
3311         out creating of the gst-gl video sink into the separte method.
3312         (WebCore::MediaPlayerPrivateGStreamerBase::paint): Remove assertion
3313         for the threaded compositor. It can be called by focusing event.
3314         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
3315
3316 2016-05-18  Antti Koivisto  <antti@apple.com>
3317
3318         Resolve !important properties from different shadow trees in a single pass.
3319         https://bugs.webkit.org/show_bug.cgi?id=157836
3320
3321         Reviewed by Andreas Kling.
3322
3323         * css/StyleResolver.cpp:
3324         (WebCore::StyleResolver::CascadedProperties::addImportantMatches):
3325
3326         Instead of doing multiple passes over increasing tree context ordinals collect matches with
3327         non-zero ordinals to a vector and sort it to ascending order.
3328
3329 2016-05-18  Csaba Osztrogonác  <ossy@webkit.org>
3330
3331         Fix the allinone-build after r198669
3332         https://bugs.webkit.org/show_bug.cgi?id=157798
3333
3334         Reviewed by Michael Catanzaro.
3335
3336         * CMakeLists.txt: Use DerivedSources.cpp only on Windows, it's broken everywhere else.
3337
3338 2016-05-17  Antti Koivisto  <antti@apple.com>
3339
3340         Cascading order for !important properties in ::slotted and ::host rules is incorrect
3341         https://bugs.webkit.org/show_bug.cgi?id=157789
3342         <rdar://problem/26318781>
3343
3344         Reviewed by Andreas Kling.
3345
3346         https://drafts.csswg.org/css-scoping-1/#shadow-cascading
3347
3348         "When comparing two declarations that have different tree contexts, then for normal rules the declaration earlier
3349         in the shadow-including tree order wins, and for important rules the declaration coming later in the shadow-including
3350         tree order wins."
3351
3352         * css/ElementRuleCollector.cpp:
3353         (WebCore::MatchRequest::MatchRequest):
3354         (WebCore::ElementRuleCollector::ElementRuleCollector):
3355         (WebCore::ElementRuleCollector::matchedRuleList):
3356         (WebCore::ElementRuleCollector::addMatchedRule):
3357         (WebCore::ElementRuleCollector::clearMatchedRules):
3358         (WebCore::ElementRuleCollector::addElementStyleProperties):
3359         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
3360
3361             Pass the tree context ordinal onwards so we can implement the order reversal semantics for !important properties.
3362
3363         (WebCore::ElementRuleCollector::matchAuthorRules):
3364         (WebCore::ElementRuleCollector::matchHostPseudoClassRules):
3365         (WebCore::ElementRuleCollector::matchSlottedPseudoElementRules):
3366
3367             Don't flush the matched rules immediately to get the right ordering. Instead compute tree context ordinal
3368             that is then used as a sorting criteria.
3369
3370         (WebCore::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot):
3371         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
3372         (WebCore::compareRules):
3373
3374             Sort regular rules so that earlier shadow trees win.
3375
3376         (WebCore::ElementRuleCollector::sortMatchedRules):
3377         * css/ElementRuleCollector.h:
3378         * css/StyleResolver.cpp:
3379         (WebCore::StyleResolver::State::clear):
3380         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
3381         (WebCore::StyleResolver::CascadedProperties::addMatch): Added.
3382
3383             Add a helper.
3384
3385         (WebCore::StyleResolver::CascadedProperties::addNormalMatches):
3386
3387             Split normal and important to different functions for clarity.
3388
3389         (WebCore::StyleResolver::CascadedProperties::addImportantMatches):
3390
3391             For !important properties a later shadow tree wins. Do multiple passes to apply in correct order if needed.
3392
3393         * css/StyleResolver.h:
3394         (WebCore::StyleResolver::MatchResult::matchedProperties):
3395
3396 2016-05-18  Joanmarie Diggs  <jdiggs@igalia.com>
3397
3398         AX: [ATK] Use WebCore Accessibility's AccessibilityText for AtkObject name and description
3399         https://bugs.webkit.org/show_bug.cgi?id=157822
3400
3401         Reviewed by Chris Fleizach.
3402
3403         Remove the old code which was overriding WebCore Accessibility and always use
3404         AccessibilityText.
3405
3406         If the AccessibilityText's textSource is HelpText or SummaryText, it should be exposed
3407         as the AtkObject description. If the textSource is TitleTagText and there is no other
3408         text alternative, the value should also be exposed in this fashion. Note that AtkObject's
3409         description property is equivalent to AXAPI's AXHelp property.
3410
3411         If the AccessibilityText's textSource is anything other than the above, the first
3412         non-empty value should be exposed as the AtkObject name. Depending on the source of
3413         the name content, AtkObject's name property can be the equivalent of AXAPI's AXTitle.
3414         However, most of the time, AtkObject's name property is equivalent to AXAPI's
3415         AXDescription property.
3416
3417         By making these changes, what WebKit exposes for ATK is now extremely similar to what
3418         WebKit exposes on the Mac (modulo the property names) and also with what is defined in
3419         the HTML Accessibility and Accessible Name and Description Computation API mappings specs.
3420
3421         Now that the exposure is correct, the Layout Tests needed to be adjusted accordingly because
3422         asking for the "AXDescription" gives you the AXDescription on the Mac and the AtkObject
3423         description in GNU/Linux. But as indicated above, what ATK calls a "description" is what
3424         the Mac calls "help."
3425
3426         Ultimately our Layout Tests and/or our platform TestRunner API should be modified to deal
3427         with these differences more gracefully. (Bug https://bugs.webkit.org/show_bug.cgi?id=157187
3428         has been opened for that task.) In the meantime, the existing tests have been given platform
3429         checks to ask for the right property on each platform. This was done in such a way as to not
3430         require other (non-ATK) platforms change their current expectations files.
3431
3432         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3433         (webkitAccessibleGetName):
3434         (webkitAccessibleGetDescription):
3435
3436 2016-05-17  Zalan Bujtas  <zalan@apple.com>
3437
3438         Add LayerListMutationDetector to hittesting.
3439         https://bugs.webkit.org/show_bug.cgi?id=157758
3440
3441         Reviewed by Simon Fraser.
3442
3443         Hittesting is supposed to be readonly.
3444
3445         * rendering/RenderLayer.cpp:
3446         (WebCore::RenderLayer::hitTestLayer):
3447         * rendering/RenderLayer.h:
3448         (WebCore::RenderLayer::clearZOrderLists):
3449
3450 2016-05-17  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3451
3452         Remove toJS template methods taking const Ref and const RefPtr
3453         https://bugs.webkit.org/show_bug.cgi?id=157791
3454
3455         Reviewed by Chris Dumez.
3456
3457         Updating toJS template method taking a const Ref<T>& to take a Ref<T>&&.
3458         Updating toJS template method taking a const RefPtr<T>& to take a RefPtr<T>&&.
3459         Updating binding generator to generate rvalue references.
3460
3461         Covered by existing tests.
3462
3463         * bindings/js/JSDOMBinding.h:
3464         (WebCore::toJS):
3465         * bindings/scripts/CodeGeneratorJS.pm:
3466         (GenerateConstructorDefinition):
3467         * bindings/scripts/test/JS/JSTestInterface.cpp:
3468         (WebCore::JSTestInterfaceConstructor::construct):
3469         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3470         (WebCore::JSTestNamedConstructorNamedConstructor::construct):
3471         * bindings/scripts/test/JS/JSTestNode.cpp:
3472         (WebCore::JSTestNodeConstructor::construct):
3473         * bindings/scripts/test/JS/JSTestObj.cpp:
3474         (WebCore::JSTestObjConstructor::construct):
3475         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3476         (WebCore::constructJSTestOverloadedConstructors1):
3477         (WebCore::constructJSTestOverloadedConstructors2):
3478         (WebCore::constructJSTestOverloadedConstructors3):
3479         (WebCore::constructJSTestOverloadedConstructors4):
3480         (WebCore::constructJSTestOverloadedConstructors5):
3481         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3482         (WebCore::JSTestTypedefsConstructor::construct):
3483         * html/HTMLMediaElement.cpp:
3484         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
3485
3486 2016-05-17  Nan Wang  <n_wang@apple.com>
3487
3488         AX: Adding children incorrectly when there are nested inline continuations
3489         https://bugs.webkit.org/show_bug.cgi?id=157818
3490
3491         Reviewed by Chris Fleizach.
3492
3493         When getting the inline element continuation's next sibling, if we fall back on to the parent
3494         case, we might end up adding the same node repeatedly. Fixed it by skipping this case.
3495
3496         Test: accessibility/mac/nested-inline-elements-children.html
3497
3498         * accessibility/AccessibilityRenderObject.cpp:
3499         (WebCore::AccessibilityRenderObject::nextSibling):
3500
3501 2016-05-17  Dean Jackson  <dino@apple.com>
3502
3503         Add media query support for wide gamut displays on Mac
3504         https://bugs.webkit.org/show_bug.cgi?id=157824
3505         <rdar://problem/26333137>
3506
3507         Reviewed by Simon Fraser.
3508
3509         Implement the Mac version of the color-gamut media query
3510         by filling out the screenSupportsExtendedColor function.
3511
3512         On Yosemite, we always return false. On El Capitan, we
3513         can check the ColorProfile via ColorSync to see if the
3514         screen is wide gamut.
3515
3516         There is already a test in fast/media/mq-color-gamut.html
3517
3518         * css/MediaQueryEvaluator.cpp:
3519         (WebCore::color_gamutMediaFeatureEval): Pass the mainFrame's view
3520         to screenSupportsExtendedColor, so that it can fetch the NSScreen.
3521         * platform/PlatformScreen.h: screenSupportsExtendedColor now takes
3522         an optional Widget parameter.
3523         * platform/ios/PlatformScreenIOS.mm:
3524         (WebCore::screenSupportsExtendedColor): Add empty parameter.
3525         * platform/mac/PlatformScreenMac.mm:
3526         (WebCore::screenSupportsExtendedColor): Get the NSWindow, then the
3527         NSScreen, then the ColorSpace, then the ColorSyncProfile, and
3528         check if it is a wide gamut profile.
3529         * platform/spi/cg/CoreGraphicsSPI.h: Add the SPI declarations.
3530
3531 2016-05-17  Chris Dumez  <cdumez@apple.com>
3532
3533         Unreviewed, fix Darin's post-mortem review comments for r201052.
3534
3535         * rendering/RenderFieldset.cpp:
3536         (WebCore::RenderFieldset::findLegend):
3537         * rendering/svg/SVGRenderSupport.cpp:
3538         (WebCore::SVGRenderSupport::layoutChildren):
3539
3540 2016-05-17  Beth Dakin  <bdakin@apple.com>
3541
3542         Make handleAcceptedCandidate a public function
3543         https://bugs.webkit.org/show_bug.cgi?id=157763
3544         -and corresponding-
3545         rdar://problem/26206397
3546
3547         Reviewed by Tim Horton.
3548
3549         Define handleAcceptedCandidateWithSoftSpaces on EditorClient so that it can 
3550         be invoked on any EditorClient. 
3551         * loader/EmptyClients.h:
3552         * page/EditorClient.h:
3553         (WebCore::EditorClient::handleAcceptedCandidateWithSoftSpaces):
3554
3555 2016-05-17  Chris Dumez  <cdumez@apple.com>
3556
3557         Unreviewed debug build fix after r201052.
3558
3559         * rendering/svg/RenderSVGText.cpp:
3560         (WebCore::findPreviousAndNextAttributes): Deleted.
3561
3562 2016-05-17  Chris Dumez  <cdumez@apple.com>
3563
3564         Use RenderChildIterator more for traversing a renderer's children
3565         https://bugs.webkit.org/show_bug.cgi?id=157811
3566
3567         Reviewed by Antti Koivisto.
3568
3569         Use RenderChildIterator more for traversing a renderer's children.
3570
3571         * inspector/InspectorLayerTreeAgent.cpp:
3572         (WebCore::InspectorLayerTreeAgent::layersForNode):
3573         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
3574         * inspector/InspectorLayerTreeAgent.h:
3575         * rendering/AutoTableLayout.cpp:
3576         (WebCore::AutoTableLayout::recalcColumn):
3577         * rendering/InlineIterator.h:
3578         (WebCore::isEmptyInline):
3579         * rendering/RenderBlock.cpp:
3580         (WebCore::RenderBlock::addFocusRingRects):
3581         * rendering/RenderBox.cpp:
3582         (WebCore::RenderBox::positionForPoint):
3583         * rendering/RenderElement.cpp:
3584         (WebCore::RenderElement::updateOutlineAutoAncestor):
3585         * rendering/RenderElement.h:
3586         * rendering/RenderFieldset.cpp:
3587         (WebCore::RenderFieldset::findLegend):
3588         * rendering/RenderFieldset.h:
3589         * rendering/RenderInline.cpp:
3590         (WebCore::RenderInline::generateCulledLineBoxRects):
3591         (WebCore::RenderInline::culledInlineFirstLineBox):
3592         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
3593         (WebCore::RenderInline::dirtyLineBoxes):
3594         * rendering/RenderListItem.cpp:
3595         (WebCore::getParentOfFirstLineBox):
3596         * rendering/RenderObject.cpp:
3597         (WebCore::RenderObject::setFlowThreadStateIncludingDescendants):
3598         (WebCore::RenderObject::addAbsoluteRectForLayer):
3599         (WebCore::RenderObject::paintingRootRect):
3600         (WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):
3601         (WebCore::RenderObject::invalidateFlowThreadContainingBlockIncludingDescendants):
3602         (WebCore::RenderObject::updateDragState):
3603         * rendering/RenderTable.cpp:
3604         (WebCore::RenderTable::firstColumn):
3605         * rendering/RenderTableCol.cpp:
3606         (WebCore::RenderTableCol::clearPreferredLogicalWidthsDirtyBits):
3607         * rendering/RenderTableSection.cpp:
3608         (WebCore::RenderTableSection::layoutRows):
3609         * rendering/RenderTreeAsText.cpp:
3610         (WebCore::write):
3611         * rendering/svg/RenderSVGText.cpp:
3612         (WebCore::findPreviousAndNextAttributes):
3613         (WebCore::RenderSVGText::subtreeChildWasAdded):
3614         (WebCore::RenderSVGText::subtreeChildWillBeRemoved):
3615         * rendering/svg/SVGRenderSupport.cpp:
3616         (WebCore::updateObjectBoundingBox):
3617         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
3618         (WebCore::SVGRenderSupport::layoutChildren):
3619         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
3620         (WebCore::SVGTextLayoutAttributesBuilder::collectTextPositioningElements):
3621         * rendering/svg/SVGTextMetricsBuilder.cpp:
3622         (WebCore::SVGTextMetricsBuilder::walkTree):
3623
3624 2016-05-17  Dean Jackson  <dino@apple.com>
3625
3626         Remove ES6_GENERATORS flag
3627         https://bugs.webkit.org/show_bug.cgi?id=157815
3628         <rdar://problem/26332894>
3629
3630         Reviewed by Geoffrey Garen.
3631
3632         This flag isn't needed. Generators are enabled everywhere and
3633         part of a stable specification.
3634
3635         * Configurations/FeatureDefines.xcconfig:
3636
3637 2016-05-16  Simon Fraser  <simon.fraser@apple.com>
3638
3639         BitmapImage::destroyDecodedDataIfNecessary() should only count frames with image data
3640         https://bugs.webkit.org/show_bug.cgi?id=157779
3641
3642         Reviewed by Tim Horton.
3643
3644         BitmapImage::destroyDecodedDataIfNecessary() throws away all frames of an image if the
3645         decoded frame size exceeds a threshold. However, it counts all frames, whether or not
3646         they have an image (some frames may only have metadata, but m_frameBytes still returns
3647         height*width*4).
3648
3649         Fix by only count m_frameBytes for frames that have an image.
3650
3651         * platform/graphics/BitmapImage.cpp:
3652         (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
3653         * platform/graphics/BitmapImage.h:
3654         (WebCore::FrameData::FrameData):
3655         (WebCore::FrameData::usedFrameBytes):
3656
3657 2016-05-17  Dave Hyatt  <hyatt@apple.com>
3658
3659         Optimize layer repaint rect computation and painting.
3660         https://bugs.webkit.org/show_bug.cgi?id=157631
3661
3662         Reviewed by Zalan Bujtas.
3663
3664         This patch changes the computation of repaint rects to be for self-painting layers
3665         only. In addition, hasBoxDecorations() has been changed to hasVisibleBoxDecorations(),
3666         and it will no longer be set for transparent borders.
3667
3668         For scrolling layer position updating, visually empty layers have their repaint rects
3669         cleared, and we don't compute repaint rects during the scroll. We would like to do this
3670         all the time, but computeRepaintRects can be called at times when the visually empty
3671         state is stale/unknown. For now we limit it to scrolling, since we know that the layer's
3672         visually empty state is correct.
3673
3674         * rendering/InlineFlowBox.cpp:
3675         (WebCore::InlineFlowBox::paintBoxDecorations):
3676         * rendering/RenderBlock.cpp:
3677         (WebCore::RenderBlock::paintObject):
3678         * rendering/RenderBlockLineLayout.cpp:
3679         (WebCore::RenderBlockFlow::layoutRunsAndFloats):
3680         * rendering/RenderBox.cpp:
3681         (WebCore::RenderBox::updateFromStyle):
3682         (WebCore::RenderBox::paintBoxDecorations):
3683         * rendering/RenderBoxModelObject.cpp:
3684         (WebCore::RenderBoxModelObject::willBeDestroyed):
3685         (WebCore::RenderBoxModelObject::hasVisibleBoxDecorationStyle):
3686         (WebCore::RenderBoxModelObject::updateFromStyle):
3687         (WebCore::RenderBoxModelObject::hasBoxDecorationStyle): Deleted.
3688         * rendering/RenderBoxModelObject.h:
3689         * rendering/RenderElement.cpp:
3690         (WebCore::RenderElement::styleWillChange):
3691         (WebCore::mustRepaintBackgroundOrBorder):
3692         * rendering/RenderImage.cpp:
3693         (WebCore::RenderImage::imageChanged):
3694         * rendering/RenderInline.cpp:
3695         (WebCore::RenderInline::styleDidChange):
3696         * rendering/RenderLayer.cpp:
3697         (WebCore::RenderLayer::RenderLayer):
3698         (WebCore::RenderLayer::updateLayerPositions):
3699         (WebCore::RenderLayer::repaintRectIncludingNonCompositingDescendants):
3700         (WebCore::RenderLayer::computeRepaintRects):
3701         (WebCore::RenderLayer::clearRepaintRects):
3702         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
3703         (WebCore::RenderLayer::scrollTo):
3704         (WebCore::RenderLayer::calculateClipRects):
3705         * rendering/RenderLayer.h:
3706         * rendering/RenderLayerBacking.cpp:
3707         (WebCore::RenderLayerBacking::updateDrawsContent):
3708         (WebCore::RenderLayerBacking::compositingOpacity):
3709         (WebCore::hasVisibleBoxDecorations):
3710         (WebCore::canCreateTiledImage):
3711         (WebCore::hasVisibleBoxDecorationsOrBackgroundImage):
3712         (WebCore::supportsDirectBoxDecorationsComposition):
3713         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
3714         (WebCore::RenderLayerBacking::containsPaintedContent):
3715         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
3716         (WebCore::hasBoxDecorations): Deleted.
3717         (WebCore::hasBoxDecorationsOrBackgroundImage): Deleted.
3718         * rendering/RenderLayerModelObject.cpp:
3719         (WebCore::RenderLayerModelObject::styleDidChange):
3720         * rendering/RenderNamedFlowFragment.cpp:
3721         (WebCore::RenderNamedFlowFragment::setObjectStyleInRegion):
3722         * rendering/RenderObject.h:
3723         (WebCore::RenderObject::hasVisibleBoxDecorations):
3724         (WebCore::RenderObject::setFloating):
3725         (WebCore::RenderObject::setInline):
3726         (WebCore::RenderObject::computeBackgroundIsKnownToBeObscured):
3727         (WebCore::RenderObject::setSelectionStateIfNeeded):
3728         (WebCore::RenderObject::setHasVisibleBoxDecorations):
3729         (WebCore::RenderObject::invalidateBackgroundObscurationStatus):
3730         (WebCore::RenderObject::hasBoxDecorations): Deleted.
3731         (WebCore::RenderObject::setHasBoxDecorations): Deleted.
3732         * rendering/RenderReplaced.cpp:
3733         (WebCore::RenderReplaced::paint):
3734         * rendering/RenderTable.cpp:
3735         (WebCore::RenderTable::paintObject):
3736         (WebCore::RenderTable::paintBoxDecorations):
3737         * rendering/RenderTableCell.cpp:
3738         (WebCore::RenderTableCell::styleDidChange):
3739         * rendering/RenderWidget.cpp:
3740         (WebCore::RenderWidget::paint):
3741         * rendering/style/BorderData.h:
3742         (WebCore::BorderData::hasBorder):
3743         (WebCore::BorderData::hasVisibleBorder):
3744         (WebCore::BorderData::hasFill):
3745         (WebCore::BorderData::hasBorderRadius):
3746         * rendering/style/RenderStyle.h:
3747         * rendering/svg/RenderSVGRoot.cpp:
3748         (WebCore::RenderSVGRoot::layout):
3749         (WebCore::RenderSVGRoot::styleDidChange):
3750
3751 2016-05-17  Filip Pizlo  <fpizlo@apple.com>
3752
3753         WTF should know about Language
3754         https://bugs.webkit.org/show_bug.cgi?id=157756
3755
3756         Reviewed by Geoffrey Garen.
3757
3758         No new tests because this does not change behavior.
3759
3760         This change is all about moving some language functionality to WTF. Quoting the WTF
3761         ChangeLog, this contains two changes:
3762
3763         - Move everything that WebCore's logic for getting the platform user preferred language
3764           depended on into WTF. This means CFBundleSPI.h and BlockObjCExceptions.h|cpp.
3765
3766         - Move WebCore::platformUserPreferredLanguages() to WTF::platformUserPreferredLanguages().
3767           This is needed by https://bugs.webkit.org/show_bug.cgi?id=157755, which will make JSC
3768           use this to detect the platform user preferred language when running standalone.
3769
3770         The changes in WebCore are mostly about rewiring #includes and #imports and removing the
3771         code that we moved to WTF. But there is one logic change: previously,
3772         platformUserPreferredLanguages() would call WebCore::languageDidChange(). It can't do that
3773         directly anymore, but WTF gives WebCore some API for registering the callback. So in
3774         Language.cpp we now register languageDidChange anytime we do something that would
3775         necessitate it, like calling platformUserPreferredLanguages(). This also registers the
3776         callback inside addLanguageChangeObserver(), since it's possible for that to be called
3777         after JSC had called platformUserPreferredLanguages() but before WebCore does so.
3778
3779         * PlatformEfl.cmake:
3780         * PlatformGTK.cmake:
3781         * PlatformMac.cmake:
3782         * PlatformWin.cmake:
3783         * WebCore.xcodeproj/project.pbxproj:
3784         * bindings/objc/DOMCustomXPathNSResolver.mm:
3785         * editing/ios/EditorIOS.mm:
3786         * editing/mac/DictionaryLookup.mm:
3787         * editing/mac/EditorMac.mm:
3788         * page/CaptionUserPreferencesMediaAF.cpp:
3789         * page/ios/EventHandlerIOS.mm:
3790         * page/ios/FrameIOS.mm:
3791         * page/mac/ChromeMac.mm:
3792         * page/mac/EventHandlerMac.mm:
3793         * platform/Language.cpp:
3794         (WebCore::registerLanguageDidChangeCallbackIfNecessary):
3795         (WebCore::observerMap):
3796         (WebCore::addLanguageChangeObserver):
3797         (WebCore::overrideUserPreferredLanguages):
3798         (WebCore::userPreferredLanguages):
3799         * platform/Language.h:
3800         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
3801         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
3802         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3803         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3804         * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
3805         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
3806         * platform/graphics/cocoa/FontCocoa.mm:
3807         * platform/graphics/mac/ColorMac.mm:
3808         * platform/graphics/mac/GraphicsContext3DMac.mm:
3809         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3810         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
3811         * platform/ios/ScrollViewIOS.mm:
3812         * platform/ios/WidgetIOS.mm:
3813         * platform/mac/BlockExceptions.h: Removed.
3814         * platform/mac/BlockExceptions.mm: Removed.
3815         * platform/mac/CursorMac.mm:
3816         * platform/mac/Language.mm: Removed.
3817         * platform/mac/ScrollAnimatorMac.mm:
3818         * platform/mac/ScrollViewMac.mm:
3819         * platform/mac/ScrollbarThemeMac.mm:
3820         * platform/mac/ThemeMac.mm:
3821         * platform/mac/WidgetMac.mm:
3822         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3823         * platform/network/mac/CookieJarMac.mm:
3824         * platform/network/mac/ResourceErrorMac.mm:
3825         * platform/network/mac/ResourceHandleMac.mm:
3826         * platform/spi/cf/CFBundleSPI.h: Removed.
3827         * platform/unix/LanguageUnix.cpp: Removed.
3828         * platform/win/LanguageWin.cpp: Removed.
3829
3830 2016-05-16  Dean Jackson  <dino@apple.com>
3831
3832         Tidy unused parameters with build flags in isValidKeywordPropertyAndValue
3833         https://bugs.webkit.org/show_bug.cgi?id=157780
3834         <rdar://problem/26327312>
3835
3836         Reviewed by Alex Christensen.
3837
3838         CSS_COMPOSITING and CSS_REGIONS aren't runtime flags any more, so
3839         don't need a parser context. Meanwhile CSS_GRID_LAYOUT does, even
3840         though it wasn't in the condition for the UNUSED_PARAM.
3841
3842         * css/CSSParser.cpp:
3843         (WebCore::isValidKeywordPropertyAndValue):
3844
3845 2016-05-17  Chris Dumez  <cdumez@apple.com>
3846
3847         Regression(r177786): GlyphMetricsMap<T>::locatePageSlowCase() fills existing pages with unknown metrics
3848         https://bugs.webkit.org/show_bug.cgi?id=157749
3849
3850         Reviewed by Antti Koivisto.
3851
3852         After r177786, GlyphMetricsMap<T>::locatePageSlowCase() would unconditionally fill
3853         pages with unknown metrics. This patch updates the code to do so only if the page
3854         is new, thus restoring the pre-r177786 behavior.
3855
3856         * platform/graphics/GlyphMetricsMap.h:
3857         (WebCore::GlyphMetricsMap::metricsForGlyph):
3858         (WebCore::GlyphMetricsMap::setMetricsForGlyph):
3859         (WebCore::GlyphMetricsMap::GlyphMetricsPage::GlyphMetricsPage):
3860         (WebCore::GlyphMetricsMap::GlyphMetricsPage::fill):
3861         (WebCore::GlyphMetricsMap::locatePage):
3862         (WebCore::GlyphMetricsMap<T>::locatePageSlowCase):
3863         (WebCore::GlyphMetricsMap::GlyphMetricsPage::metricsForGlyph): Deleted.
3864         (WebCore::GlyphMetricsMap::GlyphMetricsPage::setMetricsForGlyph): Deleted.
3865         (WebCore::GlyphMetricsMap::GlyphMetricsPage::setMetricsForIndex): Deleted.
3866         (WebCore::GlyphMetricsMap<float>::unknownMetrics): Deleted.
3867         (WebCore::GlyphMetricsMap<FloatRect>::unknownMetrics): Deleted.
3868
3869 2016-05-17  Csaba Osztrogonác  <ossy@webkit.org>
3870
3871         Fix the !ENABLE(WEB_TIMING) build after r200887
3872         https://bugs.webkit.org/show_bug.cgi?id=157796
3873
3874         Reviewed by Chris Dumez.
3875
3876         * loader/DocumentThreadableLoader.cpp:
3877         (WebCore::DocumentThreadableLoader::didFinishLoading):
3878         (WebCore::DocumentThreadableLoader::loadRequest):
3879         * loader/DocumentThreadableLoader.h:
3880         * loader/cache/CachedResourceLoader.cpp:
3881         (WebCore::CachedResourceLoader::requestResource):
3882         (WebCore::CachedResourceLoader::revalidateResource):
3883         (WebCore::CachedResourceLoader::loadResource):
3884         * loader/cache/CachedResourceLoader.h:
3885
3886 2016-05-17  Myles C. Maxfield  <mmaxfield@apple.com>
3887
3888         REGRESSION(r54729): Line breaking in complex mixed-direction text is inconsistent across page refreshes
3889         https://bugs.webkit.org/show_bug.cgi?id=157783
3890         <rdar://problem/22908924>
3891
3892         Reviewed by Zalan Bujtas.
3893
3894         mappedIndices is uninitialized.
3895
3896         Test: fast/text/complex-mixed-direction-line-breaking.html
3897
3898         * platform/graphics/mac/ComplexTextController.cpp:
3899         (WebCore::ComplexTextController::ComplexTextRun::setIsNonMonotonic):
3900
3901 2016-05-17  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3902
3903         DOMPromise should only restrict the resolution type
3904         https://bugs.webkit.org/show_bug.cgi?id=157307
3905
3906         Reviewed by Darin Adler.
3907
3908         Removing from DOMPromise the rejection template parameter.
3909         Supported rejection types are integers (Exception codes) and DOM objects (DOMError typically).
3910
3911         Updated DeferredWrapper to accept Ref<>&& and RefPtr<>&&.
3912         Relanding without touching JSDOMBinding.h as this seemed to be impacting performances.
3913
3914         Changes also allow in most cases to remove the need for explictly declaring the
3915         rejection/resolution type.
3916
3917         Minor refactoring of FontFaceSet promise handling to use DOMPromise in lieu of DeferredWrapper.
3918
3919         Covered by existing tests.
3920         Changes should not be visible from user scripts.
3921
3922         * Modules/fetch/FetchBody.cpp:
3923         (WebCore::FetchBody::consume):
3924         (WebCore::FetchBody::consumeText):
3925         (WebCore::blobFromArrayBuffer):
3926         (WebCore::FetchBody::loadingFailed):
3927         * Modules/fetch/FetchBody.h:
3928         (WebCore::FetchBody::formData):
3929         * Modules/fetch/FetchBodyOwner.cpp:
3930         (WebCore::FetchBodyOwner::arrayBuffer):
3931         (WebCore::FetchBodyOwner::blob):
3932         (WebCore::FetchBodyOwner::formData):
3933         (WebCore::FetchBodyOwner::json):
3934         (WebCore::FetchBodyOwner::text):
3935         * Modules/fetch/FetchResponse.cpp:
3936         (WebCore::FetchResponse::BodyLoader::didReceiveResponse):
3937         * Modules/fetch/FetchResponse.h:
3938         * Modules/mediastream/MediaDevices.h:
3939         * Modules/mediastream/PeerConnectionBackend.h:
3940         * Modules/mediastream/UserMediaRequest.cpp:
3941         (WebCore::UserMediaRequest::didCreateStream):
3942         * Modules/streams/ReadableStreamSource.h:
3943         * Modules/webaudio/AudioContext.h:
3944         * bindings/js/JSDOMPromise.cpp:
3945         (WebCore::fulfillPromiseWithJSON):
3946         * bindings/js/JSDOMPromise.h:
3947         (WebCore::TypeInspector::decltype):
3948         (WebCore::TypeInspector::testIsVector):
3949         (WebCore::TypeInspector::testIsRefOrRefPtr):
3950         (WebCore::DeferredWrapper::resolve):
3951         (WebCore::DeferredWrapper::reject):
3952         (WebCore::DOMPromise::resolve):
3953         (WebCore::DOMPromise::reject):
3954         (WebCore::DeferredWrapper::resolveWithValue):
3955         (WebCore::DeferredWrapper::rejectWithValue):
3956         (WebCore::callPromiseFunction):
3957         * bindings/js/JSSubtleCryptoCustom.cpp:
3958         (WebCore::JSSubtleCrypto::importKey):
3959         (WebCore::JSSubtleCrypto::unwrapKey):
3960         * css/FontFace.h:
3961         * css/FontFaceSet.cpp:
3962         (WebCore::FontFaceSet::PendingPromise::PendingPromise):
3963         (WebCore::FontFaceSet::load):
3964         (WebCore::FontFaceSet::registerReady):
3965         * css/FontFaceSet.h:
3966         * html/HTMLMediaElement.h:
3967
3968 2016-05-16  Alex Christensen  <achristensen@webkit.org>
3969
3970         Modernize CSS Parser
3971         https://bugs.webkit.org/show_bug.cgi?id=157772
3972
3973         Reviewed by Brady Eidson.
3974
3975         No new tests.  This patch just replaces PassRefPtr with RefPtr&&.
3976
3977         * css/CSSParser.cpp:
3978         (WebCore::CSSParser::parseDeclaration):
3979         (WebCore::CSSParser::SourceSize::SourceSize):
3980         (WebCore::CSSParser::createStyleProperties):
3981         (WebCore::CSSParser::addProperty):
3982         (WebCore::CSSParser::parseValidPrimitive):
3983         (WebCore::CSSParser::addExpandedPropertyForValue):
3984         (WebCore::CSSParser::parseVariableDependentValue):
3985         (WebCore::CSSParser::parseValue):
3986         (WebCore::CSSParser::parseColumnsShorthand):
3987         (WebCore::CSSParser::parseGridItemPositionShorthand):
3988         (WebCore::CSSParser::parseGridAreaShorthand):
3989         (WebCore::CSSParser::parseInsetRoundedCorners):
3990         (WebCore::CSSParser::parseBasicShapeInset):
3991         (WebCore::ShadowParseContext::commitLength):
3992         (WebCore::ShadowParseContext::commitColor):
3993         (WebCore::BorderImageParseContext::requireWidth):
3994         (WebCore::BorderImageParseContext::requireOutset):
3995         (WebCore::BorderImageParseContext::commitImage):
3996         (WebCore::BorderImageParseContext::commitImageSlice):
3997         (WebCore::BorderImageParseContext::commitForwardSlashOperator):
3998         (WebCore::BorderImageParseContext::commitBorderWidth):
3999         (WebCore::BorderImageParseContext::commitBorderOutset):
4000         (WebCore::BorderImageParseContext::commitRepeat):
4001         (WebCore::BorderImageParseContext::commitWebKitBorderImage):
4002         (WebCore::BorderImageParseContext::commitBorderImage):
4003         (WebCore::BorderImageParseContext::commitBorderImageProperty):
4004         (WebCore::BorderImageSliceParseContext::commitFill):
4005         (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
4006         (WebCore::BorderImageQuadParseContext::commitNumber):
4007         (WebCore::BorderImageQuadParseContext::setAllowFinalCommit):
4008         (WebCore::BorderImageQuadParseContext::setTop):
4009         (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
4010         (WebCore::CSSParser::parseCounter):
4011         (WebCore::parseDeprecatedGradientPoint):
4012         (WebCore::CSSParser::parseDeprecatedGradient):
4013         (WebCore::valueFromSideKeyword):
4014         (WebCore::parseGradientColorOrKeyword):
4015         (WebCore::CSSParser::parsePerspectiveOrigin):
4016         (WebCore::CSSParser::addTextDecorationProperty):
4017         (WebCore::CSSParser::parseTextDecoration):
4018         (WebCore::CSSParser::realLex):
4019         (WebCore::CSSParser::createImportRule):
4020         (WebCore::CSSParser::createMediaRule):
4021         (WebCore::CSSParser::processAndAddNewRuleToSourceTreeIfNeeded):
4022         (WebCore::CSSParser::addNewRuleToSourceTree):
4023         * css/CSSParser.h:
4024         (WebCore::CSSParser::hasProperties):
4025         (WebCore::CSSParser::resetPropertyRange):
4026         (WebCore::CSSParser::isExtractingSourceData):
4027
4028 2016-05-16  Chris Dumez  <cdumez@apple.com>
4029
4030         Add RenderDescendantIterator to traverse a RenderObject's descendants
4031         https://bugs.webkit.org/show_bug.cgi?id=157785
4032
4033         Reviewed by Zalan Bujtas.
4034
4035         Add RenderDescendantIterator to traverse a RenderObject's descendants. I
4036         am planning to use it in the iOS Text Autosizing code (See Bug 157784).
4037
4038         * WebCore.xcodeproj/project.pbxproj:
4039         * rendering/RenderDescendantIterator.h: Added.
4040         (WebCore::RenderDescendantIterator<T>::RenderDescendantIterator):