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