[Bindings] Start using signature->idlType instead of signature->type in the overload...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-10-20  Chris Dumez  <cdumez@apple.com>
2
3         [Bindings] Start using signature->idlType instead of signature->type in the overload resolution code
4         https://bugs.webkit.org/show_bug.cgi?id=163767
5
6         Reviewed by Darin Adler.
7
8         Start using signature->idlType instead of signature->type in the overload resolution code
9         to prepare for union type support.
10
11         * bindings/scripts/CodeGeneratorJS.pm:
12         (ComputeEffectiveOverloadSet):
13         (AreTypesDistinguishableForOverloadResolution):
14         (GetDistinguishingArgumentIndex):
15         (GetOverloadThatMatches):
16         (GenerateOverloadedFunctionOrConstructor):
17
18 2016-10-20  Myles C. Maxfield  <mmaxfield@apple.com>
19
20         Implement WebGL2 bufferData() and bufferSubData() methods
21         https://bugs.webkit.org/show_bug.cgi?id=163759
22
23         Reviewed by Dean Jackson.
24
25         These new overloads simply clip the input array buffer.
26
27         Test: fast/canvas/webgl/bufferData-offset-length.html
28
29         * html/canvas/WebGL2RenderingContext.cpp:
30         (WebCore::WebGL2RenderingContext::bufferData):
31         (WebCore::WebGL2RenderingContext::bufferSubData):
32         * html/canvas/WebGL2RenderingContext.h:
33         * html/canvas/WebGL2RenderingContext.idl:
34
35 2016-10-20  Chris Dumez  <cdumez@apple.com>
36
37         "Download Linked File" context menu action should use 'download' attribute as suggested filename
38         https://bugs.webkit.org/show_bug.cgi?id=163742
39         <rdar://problem/28840734>
40
41         Reviewed by Darin Adler.
42
43         Add convenience method to HitTestResult to return the URL element's
44         download attribute.
45
46         * rendering/HitTestResult.cpp:
47         (WebCore::HitTestResult::URLElementDownloadAttribute):
48         * rendering/HitTestResult.h:
49
50 2016-10-20  Nan Wang  <n_wang@apple.com>
51
52         AX: VoiceOver is not detecting ARIA treeview if it contains role="presentation"
53         https://bugs.webkit.org/show_bug.cgi?id=163763
54
55         Reviewed by Chris Fleizach.
56
57         Test: accessibility/mac/aria-tree-with-presentation-role.html
58
59         Web authors sometimes use presentation role in the aria tree to hide elements. We should
60         consider this a valid case if they specify tree items and groups correctly.
61
62         * accessibility/AccessibilityNodeObject.cpp:
63         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
64         * accessibility/AccessibilityTree.cpp:
65         (WebCore::AccessibilityTree::nodeHasTreeItemChild):
66         (WebCore::AccessibilityTree::isTreeValid):
67         * accessibility/AccessibilityTree.h:
68
69 2016-10-20  Myles C. Maxfield  <mmaxfield@apple.com>
70
71         Many WebGL functions which don't throw are marked as possibly throwing
72         https://bugs.webkit.org/show_bug.cgi?id=163747
73
74         Reviewed by Dean Jackson.
75
76         Mechanically remove the exception code.
77
78         No new tests because there is no behavior change.
79
80         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
81         (WebCore::getObjectParameter):
82         (WebCore::JSWebGLRenderingContextBase::getAttachedShaders):
83         (WebCore::JSWebGLRenderingContextBase::getProgramParameter):
84         (WebCore::JSWebGLRenderingContextBase::getShaderParameter):
85         (WebCore::JSWebGLRenderingContextBase::getUniform):
86         (WebCore::dataFunctionf):
87         (WebCore::dataFunctioni):
88         (WebCore::dataFunctionMatrix):
89         * html/canvas/WebGL2RenderingContext.cpp:
90         (WebCore::WebGL2RenderingContext::texSubImage2D):
91         * html/canvas/WebGLRenderingContext.cpp:
92         (WebCore::WebGLRenderingContext::texSubImage2D):
93         * html/canvas/WebGLRenderingContextBase.cpp:
94         (WebCore::WebGLRenderingContextBase::activeTexture):
95         (WebCore::WebGLRenderingContextBase::attachShader):
96         (WebCore::WebGLRenderingContextBase::bindAttribLocation):
97         (WebCore::WebGLRenderingContextBase::bindBuffer):
98         (WebCore::WebGLRenderingContextBase::bindFramebuffer):
99         (WebCore::WebGLRenderingContextBase::bindRenderbuffer):
100         (WebCore::WebGLRenderingContextBase::bindTexture):
101         (WebCore::WebGLRenderingContextBase::bufferData):
102         (WebCore::WebGLRenderingContextBase::bufferSubData):
103         (WebCore::WebGLRenderingContextBase::compileShader):
104         (WebCore::WebGLRenderingContextBase::createShader):
105         (WebCore::WebGLRenderingContextBase::detachShader):
106         (WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
107         (WebCore::WebGLRenderingContextBase::drawArrays):
108         (WebCore::WebGLRenderingContextBase::drawElements):
109         (WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
110         (WebCore::WebGLRenderingContextBase::framebufferRenderbuffer):
111         (WebCore::WebGLRenderingContextBase::framebufferTexture2D):
112         (WebCore::WebGLRenderingContextBase::getActiveAttrib):
113         (WebCore::WebGLRenderingContextBase::getActiveUniform):
114         (WebCore::WebGLRenderingContextBase::getAttachedShaders):
115         (WebCore::WebGLRenderingContextBase::getBufferParameter):
116         (WebCore::WebGLRenderingContextBase::getProgramParameter):
117         (WebCore::WebGLRenderingContextBase::getProgramInfoLog):
118         (WebCore::WebGLRenderingContextBase::getRenderbufferParameter):
119         (WebCore::WebGLRenderingContextBase::getShaderParameter):
120         (WebCore::WebGLRenderingContextBase::getShaderInfoLog):
121         (WebCore::WebGLRenderingContextBase::getShaderPrecisionFormat):
122         (WebCore::WebGLRenderingContextBase::getShaderSource):
123         (WebCore::WebGLRenderingContextBase::getTexParameter):
124         (WebCore::WebGLRenderingContextBase::getUniform):
125         (WebCore::WebGLRenderingContextBase::getUniformLocation):
126         (WebCore::WebGLRenderingContextBase::getVertexAttrib):
127         (WebCore::WebGLRenderingContextBase::linkProgram):
128         (WebCore::WebGLRenderingContextBase::readPixels):
129         (WebCore::WebGLRenderingContextBase::shaderSource):
130         (WebCore::WebGLRenderingContextBase::videoFrameToImage):
131         (WebCore::WebGLRenderingContextBase::texImage2D):
132         (WebCore::WebGLRenderingContextBase::uniform1f):
133         (WebCore::WebGLRenderingContextBase::uniform1fv):
134         (WebCore::WebGLRenderingContextBase::uniform1i):
135         (WebCore::WebGLRenderingContextBase::uniform1iv):
136         (WebCore::WebGLRenderingContextBase::uniform2f):
137         (WebCore::WebGLRenderingContextBase::uniform2fv):
138         (WebCore::WebGLRenderingContextBase::uniform2i):
139         (WebCore::WebGLRenderingContextBase::uniform2iv):
140         (WebCore::WebGLRenderingContextBase::uniform3f):
141         (WebCore::WebGLRenderingContextBase::uniform3fv):
142         (WebCore::WebGLRenderingContextBase::uniform3i):
143         (WebCore::WebGLRenderingContextBase::uniform3iv):
144         (WebCore::WebGLRenderingContextBase::uniform4f):
145         (WebCore::WebGLRenderingContextBase::uniform4fv):
146         (WebCore::WebGLRenderingContextBase::uniform4i):
147         (WebCore::WebGLRenderingContextBase::uniform4iv):
148         (WebCore::WebGLRenderingContextBase::uniformMatrix2fv):
149         (WebCore::WebGLRenderingContextBase::uniformMatrix3fv):
150         (WebCore::WebGLRenderingContextBase::uniformMatrix4fv):
151         (WebCore::WebGLRenderingContextBase::useProgram):
152         (WebCore::WebGLRenderingContextBase::validateProgram):
153         (WebCore::WebGLRenderingContextBase::vertexAttribPointer):
154         (WebCore::WebGLRenderingContextBase::restoreCurrentFramebuffer):
155         (WebCore::WebGLRenderingContextBase::restoreCurrentTexture2D):
156         * html/canvas/WebGLRenderingContextBase.h:
157         * html/canvas/WebGLRenderingContextBase.idl:
158
159 2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
160
161         [macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
162         https://bugs.webkit.org/show_bug.cgi?id=163374
163
164         Reviewed by Darin Adler.
165
166         Because of platform lack of support for variations in in-memory fonts,
167         this feature should be disabled on the affected OSes.
168
169         No tests because there is no behavior change (on the relevant platforms).
170
171         * Configurations/FeatureDefines.xcconfig:
172
173 2016-10-20  Brady Eidson  <beidson@apple.com>
174
175         IndexedDB 2.0: Support IDBObjectStore name assignment.
176         <rdar://problem/28806931> and https://bugs.webkit.org/show_bug.cgi?id=163749
177
178         Reviewed by Alex Christensen.
179
180         Tests: storage/indexeddb/modern/objectstore-rename-1-private.html
181                storage/indexeddb/modern/objectstore-rename-1.html
182
183         Touches a *lot* of code sites, but none of them are particularly interesting.
184         They are all just getting the new name spread out to all of the various objects that need it.
185
186         * Modules/indexeddb/IDBDatabase.cpp:
187         (WebCore::IDBDatabase::renameObjectStore):
188         * Modules/indexeddb/IDBDatabase.h:
189
190         * Modules/indexeddb/IDBObjectStore.cpp:
191         (WebCore::IDBObjectStore::setName):
192         * Modules/indexeddb/IDBObjectStore.h:
193         * Modules/indexeddb/IDBObjectStore.idl:
194
195         * Modules/indexeddb/IDBTransaction.cpp:
196         (WebCore::IDBTransaction::renameObjectStore):
197         (WebCore::IDBTransaction::renameObjectStoreOnServer):
198         (WebCore::IDBTransaction::didRenameObjectStoreOnServer):
199         * Modules/indexeddb/IDBTransaction.h:
200
201         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
202         (WebCore::IDBClient::IDBConnectionProxy::renameObjectStore):
203         * Modules/indexeddb/client/IDBConnectionProxy.h:
204
205         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
206         (WebCore::IDBClient::IDBConnectionToServer::renameObjectStore):
207         (WebCore::IDBClient::IDBConnectionToServer::didRenameObjectStore):
208         * Modules/indexeddb/client/IDBConnectionToServer.h:
209         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
210
211         * Modules/indexeddb/server/IDBBackingStore.h:
212
213         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
214         (WebCore::IDBServer::IDBConnectionToClient::didDeleteObjectStore):
215         (WebCore::IDBServer::IDBConnectionToClient::didRenameObjectStore):
216         * Modules/indexeddb/server/IDBConnectionToClient.h:
217         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
218
219         * Modules/indexeddb/server/IDBServer.cpp:
220         (WebCore::IDBServer::IDBServer::renameObjectStore):
221         * Modules/indexeddb/server/IDBServer.h:
222
223         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
224         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreRenamed):
225         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
226         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
227
228         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
229         (WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore):
230         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
231
232         * Modules/indexeddb/server/MemoryObjectStore.h:
233         (WebCore::IDBServer::MemoryObjectStore::rename):
234
235         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
236         (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
237         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
238
239         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
240         (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
241         (WebCore::IDBServer::UniqueIDBDatabase::performRenameObjectStore):
242         (WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameObjectStore):
243         * Modules/indexeddb/server/UniqueIDBDatabase.h:
244
245         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
246         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameObjectStore):
247         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
248
249         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
250         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameObjectStore):
251         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
252
253         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
254         (WebCore::IDBDatabaseInfo::renameObjectStore):
255         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
256
257         * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
258         (WebCore::IDBObjectStoreInfo::rename):
259
260         * Modules/indexeddb/shared/IDBResultData.cpp:
261         (WebCore::IDBResultData::renameObjectStoreSuccess):
262         * Modules/indexeddb/shared/IDBResultData.h:
263
264         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
265         (WebCore::InProcessIDBServer::didRenameObjectStore):
266         (WebCore::InProcessIDBServer::renameObjectStore):
267         * Modules/indexeddb/shared/InProcessIDBServer.h:
268
269 2016-10-20  Chris Dumez  <cdumez@apple.com>
270
271         Make table.deleteRow(-1) a no-op when there are no rows
272         https://bugs.webkit.org/show_bug.cgi?id=163746
273
274         Reviewed by Alex Christensen.
275
276         Make table.deleteRow(-1) a no-op when there are no rows, instead of throwing:
277         - https://github.com/whatwg/html/pull/1924
278
279         This is more consistent with the behavior of tbody.deleteRow(-1) and
280         tr.deleteCell(-1). This is also consistent with Gecko. Blink is doing the
281         same change via:
282         - https://codereview.chromium.org/2427963004/
283
284         No new tests, updated existing tests.
285
286         * html/HTMLTableElement.cpp:
287         (WebCore::HTMLTableElement::deleteRow):
288
289 2016-10-20  Dave Hyatt  <hyatt@apple.com>
290
291         [CSS Parser] Make sure to handle prefixed transform-style
292         https://bugs.webkit.org/show_bug.cgi?id=163756
293
294         Reviewed by Dean Jackson.
295
296         * css/parser/CSSParserFastPaths.cpp:
297         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
298
299 2016-10-20  Dave Hyatt  <hyatt@apple.com>
300
301         [CSS Parser] Fix crash when parsing -webkit-margin-collapse
302         https://bugs.webkit.org/show_bug.cgi?id=163753
303
304         Reviewed by Dean Jackson.
305
306         * css/parser/CSSPropertyParser.cpp:
307         (WebCore::CSSPropertyParser::parseShorthand):
308
309 2016-10-20  Chris Dumez  <cdumez@apple.com>
310
311         Passing a number as the pixel parameter to texImage2D() doesn't thrown an exception
312         https://bugs.webkit.org/show_bug.cgi?id=163715
313
314         Reviewed by Darin Adler.
315
316         Enable strict type checking for typed arrays in the bindings, similarly
317         do what we do for other wrapper types, as per Web IDL.
318
319         No new tests, updated existing tests.
320
321         * bindings/scripts/CodeGeneratorJS.pm:
322         (GenerateImplementation):
323         (GenerateParametersCheck):
324
325 2016-10-20  Myles C. Maxfield  <mmaxfield@apple.com>
326
327         Improve error message when passing a null ArrayBuffer to bufferData()
328         https://bugs.webkit.org/show_bug.cgi?id=163745
329
330         Reviewed by Dean Jackson.
331
332         Test: fast/canvas/webgl/bufferData-nullable-array-buffer-view.html
333
334         Update the idl file to accept a nullable ArrayBuffer, and throw
335         the relevant error with a more helpful error string.
336
337         * html/canvas/WebGLRenderingContextBase.cpp:
338         (WebCore::WebGLRenderingContextBase::bufferData):
339         * html/canvas/WebGLRenderingContextBase.h:
340         * html/canvas/WebGLRenderingContextBase.idl:
341
342 2016-10-20  Zalan Bujtas  <zalan@apple.com>
343
344         Stop searching for first-letter containers at multi-column boundary.
345         https://bugs.webkit.org/show_bug.cgi?id=163739
346         <rdar://problem/28810750>
347
348         We should not cross the multi-column boundary while searching for the first-letter container.
349         While moving first-letter renderers to a multi-column parent, it could result in finding the wrong
350         container and end up adding a new wrapper under the original container (from where we are moving the renderers).    
351
352         Reviewed by David Hyatt.
353
354         Test: fast/css-generated-content/first-letter-move-to-multicolumn-crash.html
355
356         * rendering/RenderBoxModelObject.cpp:
357         (WebCore::RenderBoxModelObject::moveChildrenTo):
358         * rendering/RenderTextFragment.cpp:
359         (WebCore::RenderTextFragment::blockForAccompanyingFirstLetter):
360
361 2016-10-19  Dean Jackson  <dino@apple.com>
362
363         Support CSS Shapes Level 1 without a prefix
364         https://bugs.webkit.org/show_bug.cgi?id=163709
365         <rdar://problem/28859369>
366
367         Reviewed by Myles Maxfield.
368
369         Support the unprefixed form of CSS Shapes, now that
370         it is in CR.
371
372         We have a few failing tests:
373
374         - Some image-based shaping failures, now skipped.
375           https://bugs.webkit.org/show_bug.cgi?id=163706
376
377         - Some false negatives, where my understanding
378           of the CSS OM seems to suggest that the W3C tests
379           are incorrect.
380           https://bugs.webkit.org/show_bug.cgi?id=163708
381
382         Tests: imported/w3c/csswg-test/css-shapes-1
383
384         * css/CSSComputedStyleDeclaration.cpp:
385         (WebCore::ComputedStyleExtractor::propertyValue):
386         * css/CSSPropertyNames.in:
387         * css/CSSValueKeywords.in:
388         * css/parser/CSSParser.cpp:
389         (WebCore::isSimpleLengthPropertyID):
390         (WebCore::CSSParser::parseValue):
391         * css/parser/CSSPropertyParser.cpp:
392         (WebCore::CSSPropertyParser::parseSingleValue):
393         * page/animation/CSSPropertyAnimation.cpp:
394         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
395
396 2016-10-20  Dave Hyatt  <hyatt@apple.com>
397
398         [CSS Parser] Fix region, column and page break parsing
399         https://bugs.webkit.org/show_bug.cgi?id=163743
400
401         Reviewed by Simon Fraser.
402
403         * css/parser/CSSParserFastPaths.cpp:
404         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
405         Add the missing values for break support.
406
407         * css/parser/CSSPropertyParser.cpp:
408         (WebCore::isLegacyBreakProperty):
409         (WebCore::CSSPropertyParser::parseValueStart):
410         Add a special case for handling legacy break properties. Blink treats them like
411         shorthands, but we can't do that without breaking the old parser, so for now
412         we add a special case.
413
414         (WebCore::mapFromPageBreakBetween):
415         (WebCore::mapFromColumnBreakBetween):
416         (WebCore::mapFromRegionBreakBetween):
417         Updated to have the AvoidXXX values (where XXX is Column/Page/Region).
418
419         (WebCore::CSSPropertyParser::parseShorthand):
420         Remove the consumeLegacyBreak from the shorthand function, since we can't treat
421         the legacy break properties as shorthands yet.
422
423 2016-10-20  Sam Weinig  <sam@webkit.org>
424
425         Add convenience function that combines WTF::visit(...) with WTF::makeVisitor(...)
426         https://bugs.webkit.org/show_bug.cgi?id=163713
427
428         Reviewed by Dan Bernstein.
429
430         Switch uses of WTF::visit to use WTF::switchOn.
431
432         * dom/MessageEvent.cpp:
433         (WebCore::MessageEvent::source):
434         * dom/Node.cpp:
435         (WebCore::nodeSetPreTransformedFromNodeOrStringVector):
436         (WebCore::Node::convertNodesOrStringsIntoNode):
437         * html/HTMLSelectElement.cpp:
438         (WebCore::HTMLSelectElement::add):
439         * html/track/TrackEvent.cpp:
440         (WebCore::TrackEvent::TrackEvent):
441         * testing/TypeConversions.h:
442         (WebCore::TypeConversions::typeConversionsDictionaryUnionType):
443
444 2016-10-20  Dave Hyatt  <hyatt@apple.com>
445
446         [CSS Parser] Fix font family parsing and add CSS region property parsing
447         https://bugs.webkit.org/show_bug.cgi?id=163741
448
449         Reviewed by Zalan Bujtas.
450
451         * css/parser/CSSParser.cpp:
452         (WebCore::isKeywordPropertyID):
453         (WebCore::parseKeywordValue):
454         (WebCore::CSSParser::parseValue):
455         Modify the old CSSParser to have its own keyword check, since keywords were
456         incorrectly added to the new parser when this check was consolidated. Column
457         and region breaks are considered keyword properties by the old parser, but
458         not by the new parser, since the new parser special cases them and maps them
459         into the generic break property.
460
461         * css/parser/CSSParserFastPaths.cpp:
462         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
463         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
464         Update for regions to make sure all the region properties are there. Remove the
465         column and region break properties, since they're not supposed to be here in the
466         new parser.
467
468         * css/parser/CSSPropertyParser.cpp:
469         (WebCore::consumeFamilyName):
470         Fix font parsing to make font family values so that fonts work.
471
472         (WebCore::consumeFlowProperty):
473         Add a function for handling -webkit-flow-from and -webkit-flow-into.
474
475         (WebCore::CSSPropertyParser::parseSingleValue):
476         Add support for the region properties.
477
478         (WebCore::mapFromRegionBreakBetween):
479         (WebCore::mapFromColumnRegionOrPageBreakInside):
480         (WebCore::mapFromLegacyBreakProperty):
481         (WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
482         (WebCore::mapFromColumnOrPageBreakInside): Deleted.
483         Update to handle the region break properties in the same way that column break
484         properties are handled.
485
486 2016-10-20  Jer Noble  <jer.noble@apple.com>
487
488         CRASH in WebCore::MediaSource::seekToTime + 185
489         https://bugs.webkit.org/show_bug.cgi?id=163652
490
491         Reviewed by Eric Carlson.
492
493         Test: media/media-source/media-source-seek-detach-crash.html
494
495         Add isClosed() checks (which are effectively m_private null-checks) everywhere m_private is
496         dereferenced. The one place where m_private is cleared without setting the state to closed
497         is stop(), so make stop() set the state to closed as well (without firing any events).
498
499         * Modules/mediasource/MediaSource.cpp:
500         (WebCore::MediaSource::seekToTime):
501         (WebCore::MediaSource::completeSeek):
502         (WebCore::MediaSource::monitorSourceBuffers):
503         (WebCore::MediaSource::streamEndedWithError):
504         (WebCore::MediaSource::stop):
505
506 2016-10-20  Andreas Kling  <akling@apple.com>
507
508         Drop StyleResolver and SelectorQueryCache when entering PageCache.
509         <https://webkit.org/b/154238>
510
511         Reviewed by Antti Koivisto.
512
513         Stop keeping these around for cached pages to save lots of memory.
514         We can easily rebuild them if a cached navigation occurs, and this
515         way we also don't need to worry about invalidating style for cached
516         pages in all the right places.
517
518         Restoring a cached page will now lead to a forced style recalc.
519         We don't try to defer this (beyond a zero-timer) since it's going
520         to happen anyway, and it's nicer to front-load the cost rather than
521         stuttering on the first user content interaction.
522
523         * dom/Document.cpp:
524         (WebCore::Document::setPageCacheState):
525         * history/CachedPage.cpp:
526         (WebCore::CachedPage::restore):
527         (WebCore::CachedPage::clear):
528         * history/CachedPage.h:
529         (WebCore::CachedPage::markForVisitedLinkStyleRecalc): Deleted.
530         (WebCore::CachedPage::markForFullStyleRecalc): Deleted.
531         * history/PageCache.cpp:
532         (WebCore::PageCache::markPagesForVisitedLinkStyleRecalc): Deleted.
533         (WebCore::PageCache::markPagesForFullStyleRecalc): Deleted.
534         * history/PageCache.h:
535         * page/Frame.cpp:
536         (WebCore::Frame::setPageAndTextZoomFactors):
537         * page/Page.cpp:
538         (WebCore::Page::setViewScaleFactor):
539         (WebCore::Page::setDeviceScaleFactor):
540         (WebCore::Page::setPagination):
541         (WebCore::Page::setPaginationLineGridEnabled):
542         (WebCore::Page::setVisitedLinkStore):
543
544 2016-10-20  Carlos Alberto Lopez Perez  <clopez@igalia.com>
545
546         [GTK] Build fix after r207616
547         https://bugs.webkit.org/show_bug.cgi?id=163333
548
549         Reviewed by Carlos Garcia Campos.
550
551         EGL_PLATFORM_X11_KHR and EGL_PLATFORM_WAYLAND_KHR are not defined
552         on the EGL headers shipped by Mesa 10.3 (shipped by Debian 8)
553
554         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
555         (WebCore::PlatformDisplayWayland::initialize):
556         * platform/graphics/x11/PlatformDisplayX11.cpp:
557         (WebCore::PlatformDisplayX11::initializeEGLDisplay):
558
559 2016-10-20  Fujii Hironori  <Hironori.Fujii@sony.com>
560
561         [CMake] CMake does not support the dep files for implicit dependency
562         https://bugs.webkit.org/show_bug.cgi?id=161433
563
564         Reviewed by Brent Fulgham.
565
566         Created a Perl script to generate all IDL bindings for CMake.
567         This script can regenerate outdated bindings by based on the
568         supplemental dependency and dep files created by
569         '--write-dependencies' switch of generate-bindings.pl.
570
571         add_custom_target is used to invoke the script instead of
572         add_custom_command because Ninja deletes all output files before
573         executing the command in case of add_custom_command.
574
575         USES_TERMINAL option of add_custom_target has two effects:
576         1) Not buffering output of the command
577         2) Invoking the command in the special Ninja pool which inhibits parallel build
578         One needs to use CMake 3.2 or later to enable this feature.
579
580         * CMakeLists.txt: Specified target names for
581         GENERATE_BINDINGS. Added dependency for the targets.
582         * bindings/scripts/generate-bindings-all.pl: Added.
583
584 2016-10-20  Adam Jackson  <ajax@redhat.com>
585
586         Prefer eglGetPlatformDisplay to eglGetDisplay
587         https://bugs.webkit.org/show_bug.cgi?id=163333
588
589         Reviewed by Carlos Garcia Campos.
590
591         eglGetDisplay forces the implementation to guess what kind of void* it's been handed. Different implementations
592         do different things, in particular glvnd and Mesa behave differently. Fortunately there exists API to tell EGL
593         what kind of display it is, so let's use it.
594
595         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
596         (WebCore::PlatformDisplayWayland::initialize):
597         * platform/graphics/x11/PlatformDisplayX11.cpp:
598         (WebCore::PlatformDisplayX11::initializeEGLDisplay):
599
600 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
601
602         [GTK] Avoid including egl.h headers in internal headers
603         https://bugs.webkit.org/show_bug.cgi?id=163722
604
605         Reviewed by Žan Doberšek.
606
607         egl.h includes eglplatform.h that decides the native types for the platform at compile time. However, we support
608         to build with X11 and Wayland at the same time and decide what to use at runtime. Currently GLContext.h includes
609         eglplatform.h after wayland-egl.h if Wayland is enabled. That means that the wayland native types are used by
610         default from all cpp files including GLContext.h. It currently works in X11 because we cast the value anyway and
611         for example EGLNativeWindowType is a pointer in Wayland that can be casted to unsigned long in X11 to represent
612         the X Window. This is very fragile in any case, we should avoid adding egl headers in our headers and only
613         include it in cpp files. But we also need to ensure we don't use X11 and Wayland in the same cpp file.
614
615         * PlatformGTK.cmake:
616         * platform/graphics/GLContext.cpp:
617         (WebCore::GLContext::createContextForWindow):
618         * platform/graphics/GLContext.h:
619         * platform/graphics/egl/GLContextEGL.cpp:
620         (WebCore::GLContextEGL::createWindowContext):
621         (WebCore::GLContextEGL::createContext):
622         (WebCore::GLContextEGL::~GLContextEGL):
623         * platform/graphics/egl/GLContextEGL.h:
624         * platform/graphics/egl/GLContextEGLWayland.cpp: Added.
625         (WebCore::GLContextEGL::GLContextEGL):
626         (WebCore::GLContextEGL::createWindowSurfaceWayland):
627         (WebCore::GLContextEGL::createWaylandContext):
628         (WebCore::GLContextEGL::destroyWaylandWindow):
629         * platform/graphics/egl/GLContextEGLX11.cpp: Added.
630         (WebCore::GLContextEGL::GLContextEGL):
631         (WebCore::GLContextEGL::createWindowSurfaceX11):
632         (WebCore::GLContextEGL::createPixmapContext):
633         * platform/graphics/glx/GLContextGLX.cpp:
634         (WebCore::GLContextGLX::createWindowContext):
635         (WebCore::GLContextGLX::createContext):
636         (WebCore::GLContextGLX::GLContextGLX):
637         * platform/graphics/glx/GLContextGLX.h:
638         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
639         * platform/graphics/x11/PlatformDisplayX11.cpp:
640
641 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
642
643         [GTK] Avoid strstr() when checking (E)GL extensions
644         https://bugs.webkit.org/show_bug.cgi?id=161958
645
646         Reviewed by Žan Doberšek.
647
648         Add static method GLContext::isExtensionSupported() to properly search extenstions in the given extension
649         list, and use it instead of strstr().
650
651         * platform/graphics/GLContext.cpp:
652         (WebCore::GLContext::isExtensionSupported):
653         * platform/graphics/GLContext.h:
654         * platform/graphics/egl/GLContextEGL.cpp:
655         (WebCore::GLContextEGL::createSurfacelessContext):
656         * platform/graphics/glx/GLContextGLX.cpp:
657         (WebCore::hasSGISwapControlExtension):
658
659 2016-10-20  Per Arne Vollan  <pvollan@apple.com>
660
661         [Win][Direct2D] Implement ImageBufferData::getData.
662         https://bugs.webkit.org/show_bug.cgi?id=163668
663
664         Reviewed by Brent Fulgham.
665
666         Render data to a bitmap in system memory, which data can be read from.
667
668         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
669         (WebCore::ImageBufferData::getData):
670         * platform/graphics/win/ImageBufferDirect2D.cpp:
671         (WebCore::ImageBuffer::ImageBuffer):
672
673 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
674
675         Wrong use of EGL_DEPTH_SIZE
676         https://bugs.webkit.org/show_bug.cgi?id=155536
677
678         Reviewed by Michael Catanzaro.
679
680         What happens here is that the driver doesn't implement EGL_DEPTH_SIZE and the default value, which is 0, is
681         returned. Then XCreatePixmap fails because 0 is not a valid depth. The thing is that even if EGL_DEPTH_SIZE or
682         EGL_BUFFER_SIZE returned a valid depth, it still might not be supported by the default screen and XCreatePixmap
683         can fail. What we need to ensure is that the depth we pass is compatible with the X display, not only with the
684         EGL config, to avoid failures when creating the pixmap. So, we can use EGL_NATIVE_VISUAL_ID instead, and
685         then ask X for the visual info for that id. If it isn't found then we just return before creating the pixmap,
686         but if the visual is found then we can be sure that the depth of the visual will not make the pixmap creation
687         fail. However, with the driver I'm using it doesn't matter how we create the pixmap that eglCreatePixmapSurface
688         always fails, again with X errors that are fatal by default. Since the driver is not free, I assume it doesn't
689         support eglCreatePixmapSurface or it's just buggy, so the only option we have here is trap the x errors and
690         ignore them. It turns out that the X errors are not fatal in this case, because eglCreatePixmapSurface ends up
691         returning a surface, and since these are offscreen contexts, it doesn't really matter if they contain an
692         invalid pixmap, because we never do swap buffer on them, so just ignoring the X errors fixes the crashes and
693         makes everythig work. This patch adds a helper class XErrorTrapper that allows to trap XErrors and decide what
694         to do with them (ignore, warn or crash) or even not consider a particular set of errors as errors.
695
696         * PlatformEfl.cmake: Add new file to compilation.
697         * PlatformGTK.cmake: Ditto.
698         * platform/graphics/egl/GLContextEGL.cpp:
699         (WebCore::GLContextEGL::createPixmapContext): Use EGL_NATIVE_VISUAL_ID instead of EGL_DEPTH_SIZE to figure out
700         the depth to be passed to XCreatePixmap. Also use the XErrorTrapper class to ignore all BadDrawable errors
701         produced by eglCreatePixmapSurface() and only show a warning about all other X errors.
702         * platform/graphics/x11/XErrorTrapper.cpp: Added.
703         (WebCore::xErrorTrappersMap):
704         (WebCore::XErrorTrapper::XErrorTrapper):
705         (WebCore::XErrorTrapper::~XErrorTrapper):
706         (WebCore::XErrorTrapper::errorCode):
707         (WebCore::XErrorTrapper::errorEvent):
708         * platform/graphics/x11/XErrorTrapper.h: Added.
709         (WebCore::XErrorTrapper::XErrorTrapper):
710
711 2016-10-20  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
712
713         WebRTC: The MediaStreamTrackEvent init dictionary needs a required track member
714         https://bugs.webkit.org/show_bug.cgi?id=146232
715
716         Update MediaStreamTrackEvent IDL as per specification.
717
718         Reviewed by Darin Adler.
719
720         No additional test required, rebase existings tests.
721
722         * Modules/mediastream/MediaStreamTrackEvent.idl:
723
724 2016-10-19  Antoine Quint  <graouts@apple.com>
725
726         [Modern Media Controls] Media Controller: mute support
727         https://bugs.webkit.org/show_bug.cgi?id=163677
728         <rdar://problem/28851582>
729
730         Reviewed by Dean Jackson.
731
732         We introduce the MuteSupport class which brings support for muting the media
733         by clicking on the mute button in the media controls and correctly reflecting
734         the media's muted state should the media be muted via the media API.
735
736         Tests: media/modern-media-controls/mute-support/mute-support-button-click.html
737                media/modern-media-controls/mute-support/mute-support-media-api.html
738                media/modern-media-controls/mute-support/mute-support-muted.html
739
740         * Modules/modern-media-controls/media/media-controller.js:
741         (MediaController):
742         * Modules/modern-media-controls/media/mute-support.js: Copied from Source/WebCore/Modules/modern-media-controls/media/media-controller.js.
743         (MuteSupport.prototype.get control):
744         (MuteSupport.prototype.get mediaEvents):
745         (MuteSupport.prototype.buttonWasClicked):
746         (MuteSupport.prototype.syncControl):
747         (MuteSupport):
748         * WebCore.xcodeproj/project.pbxproj:
749         * rendering/RenderThemeMac.mm:
750         (WebCore::RenderThemeMac::mediaControlsScript):
751
752 2016-10-19  Alex Christensen  <achristensen@webkit.org>
753
754         Revert r207151
755         https://bugs.webkit.org/show_bug.cgi?id=163675
756
757         Reviewed by Brent Fulgham.
758
759         This code is still useful for comparison with Windows.  I'll remove it again soon.
760
761         No new tests.  No change in behavior.
762
763         * WebCore.xcodeproj/project.pbxproj:
764         * WebCorePrefix.h:
765         * loader/DocumentLoader.h:
766         * loader/EmptyClients.h:
767         * loader/FrameLoaderClient.h:
768         * loader/ResourceLoader.cpp:
769         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
770         * loader/ResourceLoader.h:
771         * loader/SubresourceLoader.h:
772         * loader/cf/ResourceLoaderCFNet.cpp:
773         * loader/cocoa/SubresourceLoaderCocoa.mm:
774         (WebCore::SubresourceLoader::willCacheResponse):
775         * loader/mac/DocumentLoaderMac.cpp:
776         * loader/mac/ResourceLoaderMac.mm:
777         (WebCore::ResourceLoader::willCacheResponse):
778         * page/mac/PageMac.mm:
779         (WebCore::Page::platformInitialize):
780         (WebCore::Page::addSchedulePair):
781         (WebCore::Page::removeSchedulePair):
782         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
783         (WebCore::WebCoreNSURLAuthenticationChallengeClient::create):
784         (WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient):
785         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
786         * platform/mac/WebCoreSystemInterface.h:
787         * platform/network/NetworkStorageSession.h:
788         * platform/network/ProtectionSpace.h:
789         * platform/network/ProtectionSpaceBase.cpp:
790         * platform/network/ResourceHandle.cpp:
791         * platform/network/ResourceHandle.h:
792         * platform/network/ResourceHandleClient.cpp:
793         * platform/network/ResourceHandleClient.h:
794         * platform/network/ResourceHandleInternal.h:
795         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
796         * platform/network/ResourceRequestBase.cpp:
797         * platform/network/cf/AuthenticationCF.cpp:
798         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
799         (WebCore::AuthenticationChallenge::setAuthenticationClient): Deleted.
800         (WebCore::AuthenticationChallenge::authenticationClient): Deleted.
801         (WebCore::AuthenticationChallenge::platformCompare): Deleted.
802         (WebCore::createCF): Deleted.
803         (WebCore::core): Deleted.
804         * platform/network/cf/AuthenticationCF.h:
805         * platform/network/cf/AuthenticationChallenge.h:
806         * platform/network/cf/CookieJarCFNet.cpp:
807         * platform/network/cf/CredentialStorageCFNet.cpp:
808         (WebCore::CredentialStorage::getFromPersistentStorage):
809         (WebCore::CredentialStorage::saveToPersistentStorage):
810         * platform/network/cf/LoaderRunLoopCF.cpp:
811         * platform/network/cf/LoaderRunLoopCF.h:
812         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
813         (WebCore::NetworkStorageSession::cookieStorage):
814         * platform/network/cf/ProtectionSpaceCFNet.cpp:
815         * platform/network/cf/ProtectionSpaceCFNet.h:
816         * platform/network/cf/ResourceError.h:
817         * platform/network/cf/ResourceErrorCF.cpp:
818         * platform/network/cf/ResourceHandleCFNet.cpp:
819         (WebCore::shouldSniffConnectionProperty):
820         (WebCore::ResourceHandle::createCFURLConnection):
821         (WebCore::ResourceHandle::start):
822         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
823         (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
824         (WebCore::ResourceHandle::receivedCredential):
825         (WebCore::ResourceHandle::schedule):
826         (WebCore::ResourceHandle::unschedule):
827         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
828         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
829         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
830         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
831         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
832         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
833         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
834         * platform/network/cf/ResourceRequest.h:
835         (WebCore::ResourceRequest::encodingRequiresPlatformData):
836         * platform/network/cf/ResourceRequestCFNet.cpp:
837         (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
838         (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
839         (WebCore::ResourceRequest::doUpdatePlatformRequest):
840         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
841         (WebCore::ResourceRequest::doUpdateResourceRequest):
842         (WebCore::ResourceRequest::setStorageSession):
843         * platform/network/cf/ResourceRequestCFNet.h:
844         * platform/network/cf/ResourceResponse.h:
845         * platform/network/cf/ResourceResponseCFNet.cpp:
846         (WebCore::ResourceResponse::cfURLResponse):
847         * platform/network/cf/SynchronousLoaderClientCFNet.cpp:
848         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
849         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
850         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling):
851         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
852         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
853         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
854         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
855         * platform/network/cocoa/CredentialCocoa.h:
856         * platform/network/cocoa/CredentialCocoa.mm:
857         (WebCore::Credential::Credential):
858         (WebCore::Credential::cfCredential):
859         * platform/network/cocoa/ProtectionSpaceCocoa.h:
860         * platform/network/cocoa/ProtectionSpaceCocoa.mm:
861         (WebCore::ProtectionSpace::ProtectionSpace):
862         (WebCore::ProtectionSpace::cfSpace):
863         * platform/network/cocoa/ResourceRequestCocoa.mm:
864         (WebCore::ResourceRequest::nsURLRequest):
865         * platform/network/cocoa/ResourceResponseCocoa.mm:
866         (WebCore::ResourceResponse::platformCertificateInfo):
867         (WebCore::ResourceResponse::nsURLResponse):
868         (WebCore::ResourceResponse::ResourceResponse):
869         * platform/network/ios/QuickLook.h:
870         * platform/network/ios/QuickLook.mm:
871         (-[WebQuickLookHandleAsDelegate initWithConnectionDelegate:]):
872         (-[WebQuickLookHandleAsDelegate connection:didReceiveDataArray:]):
873         (-[WebQuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:]):
874         (-[WebQuickLookHandleAsDelegate connectionDidFinishLoading:]):
875         (-[WebQuickLookHandleAsDelegate connection:didFailWithError:]):
876         (-[WebQuickLookHandleAsDelegate detachHandle]):
877         (WebCore::QuickLookHandle::create):
878         (WebCore::QuickLookHandle::cfResponse):
879         * platform/network/mac/AuthenticationMac.mm:
880         (-[WebCoreAuthenticationClientAsChallengeSender setCFChallenge:]):
881         (-[WebCoreAuthenticationClientAsChallengeSender cfChallenge]):
882         (WebCore::core):
883         (WebCore::mac):
884         * platform/network/mac/CookieJarMac.mm:
885         (WebCore::setCookiesFromDOM):
886         (WebCore::addCookie):
887         (WebCore::cookieStorage):
888         * platform/network/mac/CredentialStorageMac.mm:
889         * platform/network/mac/FormDataStreamMac.h:
890         * platform/network/mac/FormDataStreamMac.mm:
891         * platform/network/mac/ResourceErrorMac.mm:
892         (NSErrorFromCFError):
893         (WebCore::ResourceError::ResourceError):
894         (WebCore::ResourceError::nsError):
895         (WebCore::ResourceError::operator NSError *):
896         * platform/network/mac/ResourceHandleMac.mm:
897         (WebCore::ResourceHandle::getConnectionTimingData):
898         * platform/network/mac/ResourceRequestMac.mm: Added.
899         (WebCore::ResourceRequest::ResourceRequest):
900         (WebCore::ResourceRequest::updateNSURLRequest):
901         * platform/network/mac/SynchronousLoaderClient.mm:
902         * platform/network/mac/WebCoreResourceHandleAsDelegate.h:
903         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
904         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
905         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
906         * platform/network/mac/WebCoreURLResponse.mm:
907         * platform/win/TemporaryLinkStubs.cpp:
908         * testing/js/WebCoreTestSupportPrefix.h:
909
910 2016-10-19  Jer Noble  <jer.noble@apple.com>
911
912         REGRESSION (r206025): All YouTube videos play with black bars on all four sides
913         https://bugs.webkit.org/show_bug.cgi?id=163308
914
915         Reviewed by Darin Adler.
916
917         Test: media/media-source/media-source-resize.html
918
919         After r206025, we do not fire resize events when the size change notification happens equal-
920         to-or-before the current time, which can happen at the very beginning of a stream. Take care
921         of this case by checking that the target time isn't actually in the past inside of
922         sizeWillChangeAtTime(), and also always skip the boundary time observer when there was no
923         previous size (such as after a flush due to a seek).
924
925         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
926         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
927         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::sizeWillChangeAtTime):
928         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNaturalSize):
929         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
930         (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
931         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
932
933 2016-10-19  Nan Wang  <n_wang@apple.com>
934
935         AX: [Mac] Mark element AXAPI should comform to specs
936         https://bugs.webkit.org/show_bug.cgi?id=163707
937
938         Reviewed by Chris Fleizach.
939
940         Created a new role for mark elements on Mac and exposed the role
941         description.
942
943         Changes are covered in modified test expectaions.
944
945         * English.lproj/Localizable.strings:
946         * accessibility/AccessibilityObject.h:
947         * accessibility/AccessibilityRenderObject.cpp:
948         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
949         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
950         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
951         * accessibility/mac/AccessibilityObjectMac.mm:
952         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
953         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
954         (createAccessibilityRoleMap):
955         (-[WebAccessibilityObjectWrapper roleDescription]):
956         * platform/LocalizedStrings.cpp:
957         (WebCore::AXMarkText):
958         * platform/LocalizedStrings.h:
959
960 2016-10-19  Alex Christensen  <achristensen@webkit.org>
961
962         Re-enable URLParser for non-Safari Cocoa apps after r207321
963         https://bugs.webkit.org/show_bug.cgi?id=163690
964
965         Reviewed by Darin Adler.
966
967         I disabled the URLParser for non-Safari applications in r207305
968         to give me time to make URLParser more compatible, which I did in r207321
969
970         Updated some API tests which will be investigated in 
971         https://bugs.webkit.org/show_bug.cgi?id=163127
972
973         * platform/URLParser.cpp:
974         (WebCore::URLParser::setEnabled):
975         (WebCore::URLParser::enabled):
976         * testing/js/WebCoreTestSupport.cpp:
977         (WebCoreTestSupport::setURLParserEnabled): Deleted.
978         * testing/js/WebCoreTestSupport.h:
979
980 2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
981
982         CSS font-variation-settings does not handle uppercase axis names in variable fonts
983         https://bugs.webkit.org/show_bug.cgi?id=163546
984
985         Reviewed by Dean Jackson.
986
987         Remove the extra toASCIILower() call.
988
989         Test: fast/text/variations/case-axis-names.html
990
991         * css/parser/CSSParser.cpp:
992         (WebCore::CSSParser::parseFontVariationTag):
993
994 2016-10-19  Anders Carlsson  <andersca@apple.com>
995
996         Remove m_redirectURLs from HistoryItem
997         https://bugs.webkit.org/show_bug.cgi?id=163704
998
999         Reviewed by Dan Bernstein.
1000
1001         * history/HistoryItem.cpp:
1002         (WebCore::HistoryItem::HistoryItem):
1003         (WebCore::HistoryItem::reset):
1004         * history/HistoryItem.h:
1005
1006 2016-10-19  Joone Hur  <joone.hur@intel.com>
1007
1008         Add a plain space instead of &nbsp; between text nodes
1009         https://bugs.webkit.org/show_bug.cgi?id=123163
1010
1011         Reviewed by Ryosuke Niwa.
1012
1013         When we rebalance white spaces, &nbsp; can be added as space
1014         under some conditions. This patch adds a condition that the next
1015         sibling text node should not exist.
1016
1017         No new tests, updated existing test.
1018
1019         * editing/CompositeEditCommand.cpp:
1020         (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):
1021         * editing/htmlediting.cpp:
1022         (WebCore::stringWithRebalancedWhitespace):
1023         * editing/htmlediting.h:
1024
1025 2016-10-19  Sam Weinig  <sam@webkit.org>
1026
1027         Add support for sequences and dictionaries in unions
1028         https://bugs.webkit.org/show_bug.cgi?id=163695
1029
1030         Reviewed by Chris Dumez.
1031
1032         Tests:
1033          - Updated js/dom/webidl-type-mapping.html
1034
1035         * bindings/generic/IDLTypes.h:
1036         Add additional helper predicates and fix formatting.
1037
1038         * bindings/js/JSDOMBinding.h:
1039         Export hasIteratorMethod for use in testing.
1040
1041         * bindings/js/JSDOMConvert.h:
1042         - Change return type of Converter<IDLDictionary<T>> to T, from Optional<T>.
1043         - Add support for unions conversion step 12 (parts 1-3).
1044
1045         * bindings/scripts/CodeGeneratorJS.pm:
1046         (GenerateDefaultValue):
1047         Support complex default value computations for unions using the convert infrastructure.
1048
1049         (GenerateParametersCheck):
1050         (GenerateConstructorDefinition):
1051         Remove incorrect .value() calls now that Converter<IDLDictionary<T>> returns T.
1052
1053         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1054         * bindings/scripts/test/JS/JSTestObj.cpp:
1055         Update bindings test results.
1056
1057         * testing/TypeConversions.h:
1058         (WebCore::TypeConversions::setTypeConversionsDictionary):
1059         (WebCore::TypeConversions::typeConversionsDictionaryLongValue):
1060         (WebCore::TypeConversions::typeConversionsDictionaryStringValue):
1061         (WebCore::TypeConversions::typeConversionsDictionarySequenceValue):
1062         (WebCore::TypeConversions::typeConversionsDictionaryUnionType):
1063         * testing/TypeConversions.idl:
1064         Add some complex types to allow testing IDL conversions from tests.
1065
1066 2016-10-19  Ryosuke Niwa  <rniwa@webkit.org>
1067
1068         Annotate more DOM and HTML IDLs with CEReactions
1069         https://bugs.webkit.org/show_bug.cgi?id=163653
1070
1071         Reviewed by Darin Adler.
1072
1073         Added CEReactions to more IDL files.
1074
1075         Test: fast/custom-elements/reactions-for-webkit-extensions.html
1076
1077         * bindings/js/JSDOMStringMapCustom.cpp:
1078         (WebCore::JSDOMStringMap::deleteProperty): Instantiate CustomElementReactionStack, which is equivalent to
1079         adding CEReactions in IDL.
1080         (WebCore::JSDOMStringMap::putDelegate): Ditto.
1081         * dom/Document.idl:
1082         * dom/Element.idl:
1083         * html/HTMLElement.idl:
1084         * page/DOMSelection.idl:
1085
1086 2016-10-19  Ryan Haddad  <ryanhaddad@apple.com>
1087
1088         Unreviewed, rolling out r207557.
1089
1090         This change caused animations/font-variations tests to time
1091         out on pre-Sierra Macs.
1092
1093         Reverted changeset:
1094
1095         "[macOS] [iOS] Disable variation fonts on macOS El Capitan and
1096         iOS 9"
1097         https://bugs.webkit.org/show_bug.cgi?id=163374
1098         http://trac.webkit.org/changeset/207557
1099
1100 2016-10-19  Dave Hyatt  <hyatt@apple.com>
1101
1102         [CSS Parser] Support -webkit-border-fit
1103         https://bugs.webkit.org/show_bug.cgi?id=163687
1104
1105         Reviewed by Zalan Bujtas.
1106
1107         Add support for -webkit-border-fit to isValidKeywordPropertyAndValue.
1108
1109         * css/parser/CSSParserFastPaths.cpp:
1110         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
1111
1112 2016-10-19  Dave Hyatt  <hyatt@apple.com>
1113
1114         [CSS Parser] class and id parsing need to be case-insensitive in HTML quirks mode
1115         https://bugs.webkit.org/show_bug.cgi?id=163685
1116
1117         Reviewed by Zalan Bujtas.
1118
1119         Class and ID parsing should be case-insensitive in quirks mode. Apply the same hack
1120         that the old parser did and lowercase the class and ids in place.
1121
1122         * css/parser/CSSSelectorParser.cpp:
1123         (WebCore::CSSSelectorParser::consumeId):
1124         (WebCore::CSSSelectorParser::consumeClass):
1125
1126 2016-10-19  Nan Wang  <n_wang@apple.com>
1127
1128         AX: crash: com.apple.WebCore: WebCore::AccessibilityObject::findMatchingObjects + 600
1129         https://bugs.webkit.org/show_bug.cgi?id=163682
1130
1131         Reviewed by Chris Fleizach.
1132
1133         There's a null pointer crash when we ask for startObject->parentObjectUnignored() in
1134         AccessibilityObject::findMatchingObject. Added a null check for the startObject to fix that.
1135
1136         Test: accessibility/mac/search-predicate-crash.html
1137
1138         * accessibility/AccessibilityObject.cpp:
1139         (WebCore::AccessibilityObject::findMatchingObjects):
1140
1141 2016-10-19  David Kilzer  <ddkilzer@apple.com>
1142
1143         Bug 163670: Refine assertions in WebCore::ImageData constructors
1144         <https://webkit.org/b/163670>
1145         <rdar://problem/27497338>
1146
1147         Reviewed by Brent Fulgham.
1148
1149         No new tests because there is no change in nominal behavior.
1150
1151         * html/ImageData.cpp:
1152         (WebCore::ImageData::ImageData(const IntSize&)): Change to use
1153         ASSERT() since the worst-case scenario here is a nullptr deref.
1154         Switch to IntSize::area() to compute the area.
1155         (WebCore::ImageData::ImageData(const IntSize&, Ref<Uint8ClampedArray>&&)):
1156         Add ASSERT() identical to the previous constructor, and change
1157         ASSERT_WITH_SECURITY_IMPLICATION() to only fire when m_data is
1158         not nullptr and the length check fails.  Switch to
1159         IntSize::area() to compute the area.
1160
1161 2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
1162
1163         [macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
1164         https://bugs.webkit.org/show_bug.cgi?id=163374
1165
1166         Reviewed by Darin Adler.
1167
1168         Because of platform lack of support for variations in in-memory fonts,
1169         this feature should be disabled on the affected OSes.
1170
1171         No tests because there is no behavior change (on the relevant platforms).
1172
1173         * Configurations/FeatureDefines.xcconfig:
1174
1175 2016-10-19  Dave Hyatt  <hyatt@apple.com>
1176
1177         [CSS Parser] Fix background-position parsing
1178         https://bugs.webkit.org/show_bug.cgi?id=163681
1179
1180         Reviewed by Dean Jackson.
1181
1182         The new parser has a more efficient parsed representation of background positions. When
1183         background-position is "center" or when no length unit is specified for a dimension,
1184         then rather than creating a pair, the new parser makes a singleton primitive value.
1185
1186         Patch the StyleBuilder code to handle this case, resolving center to (left,50%) or
1187         (top,50%) as appropriate and also handling top/left without any associated length.
1188
1189         * css/CSSToStyleMap.cpp:
1190         (WebCore::CSSToStyleMap::mapFillXPosition):
1191         (WebCore::CSSToStyleMap::mapFillYPosition):
1192
1193 2016-10-19  Antoine Quint  <graouts@apple.com>
1194
1195         [Modern Media Controls] Media Controller: click-to-start support
1196         https://bugs.webkit.org/show_bug.cgi?id=163659
1197         <rdar://problem/28845656>
1198
1199         Reviewed by Dean Jackson.
1200
1201         We introduce the MediaControllerSupport class which will allow a number of media controller
1202         features to be implemented by subclasses each devoted to implementing a specific subset of
1203         media controller features. With this bug, we add the correct behavior for click-to-start,
1204         only showing the start button under the right circumstances.
1205
1206         A MediaController object indicates which media control to attach click event listeners to
1207         through the `control` property, and a list of media events it should register on the media
1208         element through the `mediaEvents` property. Then, as the user interacts with the specified
1209         control and the media, the Button delegation method `buttonWasClicked()` and the `syncControl()`
1210         methods are called to allow for the media state to be correctly set and represented in the
1211         media controls. Custom event handling for the specified events can also be achieved by
1212         subclassing the `handleEvent()` method.
1213
1214         Tests: media/modern-media-controls/start-support/start-support-audio.html
1215                media/modern-media-controls/start-support/start-support-autoplay.html
1216                media/modern-media-controls/start-support/start-support-click-to-start.html
1217                media/modern-media-controls/start-support/start-support-error.html
1218                media/modern-media-controls/start-support/start-support-fullscreen.html
1219                media/modern-media-controls/start-support/start-support-manual-play.html
1220                media/modern-media-controls/start-support/start-support-no-source.html
1221
1222         * Modules/modern-media-controls/media/media-controller-support.js: Added.
1223         (MediaControllerSupport):
1224         (MediaControllerSupport.prototype.get control):
1225         (MediaControllerSupport.prototype.get mediaEvents):
1226         (MediaControllerSupport.prototype.buttonWasClicked):
1227         (MediaControllerSupport.prototype.handleEvent):
1228         (MediaControllerSupport.prototype.syncControl):
1229         * Modules/modern-media-controls/media/media-controller.js:
1230         (MediaController):
1231         (MediaController.prototype.buttonWasClicked): Deleted.
1232         * Modules/modern-media-controls/media/start-support.js: Added.
1233         (StartSupport.prototype.get control):
1234         (StartSupport.prototype.get mediaEvents):
1235         (StartSupport.prototype.buttonWasClicked):
1236         (StartSupport.prototype.handleEvent):
1237         (StartSupport.prototype.syncControl):
1238         (StartSupport.prototype._shouldShowStartButton):
1239         (StartSupport):
1240
1241 2016-10-19  Aaron Chu  <aaron_chu@apple.com>
1242
1243         Web Inspector: AXI: expose computed tree node and heading level
1244         https://bugs.webkit.org/show_bug.cgi?id=130825
1245         <rdar://problem/16442349>
1246
1247         Reviewed by Joseph Pecoraro.
1248
1249         Exposing two new accessibility properties: Heading Level and Hierarchical Level.
1250
1251         Updated Test: LayoutTest/inspector/dom/getAccessibilityPropertiesForNode.html
1252
1253         * inspector/InspectorDOMAgent.cpp:
1254         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1255
1256 2016-10-19  Adam Bergkvist  <adam.bergkvist@ericsson.com>
1257
1258         WebRTC: Implement MediaEndpointPeerConnection::stop()
1259         https://bugs.webkit.org/show_bug.cgi?id=163660
1260
1261         Reviewed by Philippe Normand.
1262
1263         Make MediaEndpointPeerConnection::stop() stop its MediaEndpoint.
1264
1265         Testing: This fix deals with cleanup and tearing down resources down in the platform layer
1266         and is not covered by automated tests. It is however observable in the manual test added
1267         in [1] where the remote videos should stop when the connections are closed.
1268
1269         [1] http://webkit.org/b/163327
1270
1271         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
1272         (WebCore::MediaEndpointPeerConnection::stop):
1273
1274 2016-10-19  Dave Hyatt  <hyatt@apple.com>
1275
1276         [CSS Parser] Fix -webkit-mask-box-image parsing
1277         https://bugs.webkit.org/show_bug.cgi?id=163676
1278
1279         Reviewed by Dean Jackson.
1280
1281         -webkit-mask-box-image is not a shorthand in our current code, so treat it the same as the legacy
1282         -webkit-border-image.
1283
1284         * css/parser/CSSPropertyParser.cpp:
1285         (WebCore::CSSPropertyParser::parseSingleValue):
1286         (WebCore::CSSPropertyParser::parseShorthand):
1287
1288 2016-10-19  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1289
1290         [GTK][EFL] Build fix after r207543.
1291         https://bugs.webkit.org/show_bug.cgi?id=163671
1292
1293         Unreviewed.
1294
1295         Fix typo on the filename of the included header:
1296         Mac filesystem is case insensitive, but Linux filesystems are case sensitive.
1297
1298         * css/parser/CSSPropertyParser.cpp:
1299
1300 2016-10-19  Zalan Bujtas  <zalan@apple.com>
1301
1302         Use anonymous table row for new child at RenderTableRow::addChild() if available.
1303         https://bugs.webkit.org/show_bug.cgi?id=163651
1304         <rdar://problem/28705022>
1305
1306         Reviewed by David Hyatt.
1307
1308         We should try to prevent the continuation siblings from getting separated and inserted into
1309         wrapper renderers. It makes finding these continuation siblings difficult.
1310         This patch adds a checks for anonymous table rows so that we could find a closer common ancestor of
1311         beforeChild/new child. 
1312
1313         Test: fast/table/crash-when-table-has-continuation-and-content-inserted.html
1314
1315         * rendering/RenderObject.cpp:
1316         (WebCore::RenderObject::showRenderObject): Add continuation information.
1317         * rendering/RenderTableRow.cpp:
1318         (WebCore::RenderTableRow::addChild):
1319
1320 2016-10-19  Joseph Pecoraro  <pecoraro@apple.com>
1321
1322         Cleanup WebCore/workers
1323         https://bugs.webkit.org/show_bug.cgi?id=163635
1324
1325         Reviewed by Chris Dumez.
1326
1327         * workers/*:
1328         Cleanup like pragma once, nullptr, remove stale includes, declarations.
1329
1330 2016-10-19  Chris Dumez  <cdumez@apple.com>
1331
1332         MouseEvent's coordinates should be 0 for simulated clicks
1333         https://bugs.webkit.org/show_bug.cgi?id=163648
1334
1335         Reviewed by Darin Adler.
1336
1337         MouseEvent's coordinates should be 0 / 0 for simulated clicks triggered
1338         by JavaScript (i.e. via element.click()). This behavior matches Chrome
1339         and Firefox.
1340
1341         WebKit was computing actual coordinates for the element which was
1342         expensive, especially because computing  screenX / screenY required
1343         a synchronous IPC with the UI process.
1344
1345         Test: fast/events/element-click-no-coords.html
1346
1347         * dom/Element.cpp:
1348         (WebCore::Element::dispatchSimulatedClick):
1349         * dom/SimulatedClick.cpp:
1350         (WebCore::simulateMouseEvent):
1351         (WebCore::simulateClick):
1352         * dom/SimulatedClick.h:
1353         * html/HTMLElement.cpp:
1354         (WebCore::HTMLElement::click):
1355
1356 2016-10-19  Dave Hyatt  <hyatt@apple.com>
1357
1358         [CSS Parser] Fix transform parsing
1359         https://bugs.webkit.org/show_bug.cgi?id=163671
1360
1361         Reviewed by Dean Jackson.
1362
1363         The new parser turned function names into CSSValueIDs and made CSSFunctionValue store them. This
1364         meant it could be used to handle transform values, with the function name representing the
1365         transform operation efficiently as a CSSValueID.
1366
1367         The old parser, however, creates WebKitCSSTransformValues. This value does not exist in the new
1368         parser. Rather than forcing the old and new parser over to CSSFunctionValues, I opted to
1369         just make the new parser build WebkitCSSTransformValues too.
1370
1371         The main reason I did this is that WebkitCSSTransformValue is actually exposed to the Web via
1372         IDL. To be safe, I am not eliminating it (even though Blink has).
1373
1374         * css/parser/CSSPropertyParser.cpp:
1375         (WebCore::consumeTranslate3d):
1376         (WebCore::consumeNumbers):
1377         (WebCore::consumePerspective):
1378         (WebCore::transformOperationForCSSValueID):
1379         (WebCore::consumeTransformValue):
1380
1381 2016-10-19  Darin Adler  <darin@apple.com>
1382
1383         Move XPath from ExceptionCode to Exception
1384         https://bugs.webkit.org/show_bug.cgi?id=163656
1385
1386         Reviewed by Chris Dumez.
1387
1388         * dom/Document.cpp:
1389         (WebCore::Document::createExpression): Use ExceptionOr.
1390         (WebCore::Document::createNSResolver): Return Ref.
1391         (WebCore::Document::evaluate): Use ExceptionOr.
1392         * dom/Document.h: Updated for above changes.
1393         * dom/Document.idl: Use non-legacy exceptions for the functions above.
1394
1395         * inspector/InspectorNodeFinder.cpp:
1396         (WebCore::InspectorNodeFinder::searchUsingXPath): Call XPath functions
1397         with new interface.
1398
1399         * xml/DOMParser.cpp:
1400         (WebCore::DOMParser::DOMParser): Marked inline.
1401         (WebCore::DOMParser::create): Moved here from header.
1402         (WebCore::DOMParser::parseFromString): Use ExceptionOr.
1403         * xml/DOMParser.h: Updated for above changes.
1404         * xml/DOMParser.idl: Use non-legacy exception.
1405
1406         * xml/XPathEvaluator.cpp:
1407         (WebCore::XPathEvaluator::createExpression): Use ExceptionOr.
1408         (WebCore::XPathEvaluator::evaluate): Ditto.
1409         * xml/XPathEvaluator.h: Updated for above changes.
1410         * xml/XPathEvaluator.idl: Use non-legacy exceptions.
1411
1412         * xml/XPathExpression.cpp:
1413         (WebCore::XPathExpression::createExpression): Use ExceptionOr.
1414         (WebCore::XPathExpression::evaluate): Ditto.
1415         * xml/XPathExpression.h: Updated for above changes.
1416         * xml/XPathExpression.idl: Use non-legacy exceptions.
1417
1418         * xml/XPathGrammar.y: Added include of XPathStep.h.
1419
1420         * xml/XPathParser.cpp:
1421         (WebCore::XPath::Parser::Parser): Initialize three scalar data members
1422         in the class definition rather than here.
1423         (WebCore::XPath::Parser::parseStatement): Use ExceptionOr.
1424         * xml/XPathParser.h: Updated for above changes.
1425
1426         * xml/XPathResult.cpp:
1427         (WebCore::XPathResult::XPathResult): Use a reference rather than a
1428         pointer for the document. Alao initialize two scalar data members
1429         in the class definition rather than here.
1430         (WebCore::XPathResult::convertTo): Use ExceptionOr.
1431         (WebCore::XPathResult::numberValue): Ditto.
1432         (WebCore::XPathResult::stringValue): Ditto.
1433         (WebCore::XPathResult::booleanValue): Ditto.
1434         (WebCore::XPathResult::singleNodeValue): Ditto.
1435         (WebCore::XPathResult::snapshotLength): Ditto.
1436         (WebCore::XPathResult::iterateNext): Ditto.
1437         (WebCore::XPathResult::snapshotItem): Ditto.
1438         * xml/XPathResult.h: Updated for the changes above.
1439         * xml/XPathResult.idl: Use non-legacy exceptions.
1440
1441 2016-10-19  Nan Wang  <n_wang@apple.com>
1442
1443         AX: [Mac] Meter element should use AXValueDescription to descrbe the status of the value
1444         https://bugs.webkit.org/show_bug.cgi?id=163610
1445
1446         Reviewed by Chris Fleizach.
1447
1448         Exposed the goodness of the meter value in AXValueDescription.
1449
1450         Test: accessibility/mac/meter-gauge-value-description.html
1451
1452         * English.lproj/Localizable.strings:
1453         * accessibility/AccessibilityProgressIndicator.cpp:
1454         (WebCore::AccessibilityProgressIndicator::gaugeRegionValueDescription):
1455         * accessibility/AccessibilityProgressIndicator.h:
1456         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1457         (-[WebAccessibilityObjectWrapper valueDescriptionForMeter]):
1458         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1459         * platform/LocalizedStrings.cpp:
1460         (WebCore::AXMeterGaugeRegionOptimumText):
1461         (WebCore::AXMeterGaugeRegionSuboptimalText):
1462         (WebCore::AXMeterGaugeRegionLessGoodText):
1463         * platform/LocalizedStrings.h:
1464
1465 2016-10-19  Dave Hyatt  <hyatt@apple.com>
1466
1467         [CSS Parser] Fix named color parsing
1468         https://bugs.webkit.org/show_bug.cgi?id=163662
1469
1470         Reviewed by Zalan Bujtas.
1471
1472         Named color parsing in the old parser for extended colors relied on constructing a Color with the
1473         name and doing a lookup that way.
1474
1475         The new parser allows the back end to hold a primitive identifier value for extended colors.
1476
1477         StyleColor contains a helper function for looking up the correct color.
1478
1479         This patch switches both the old and the new parsers over to the new StyleColor function.
1480
1481         Also remove some asserts from the CSSSelectorList, since the new parser allows it to be empty and
1482         detects parsing failure that way.
1483
1484         * css/CSSSelectorList.cpp:
1485         (WebCore::CSSSelectorList::CSSSelectorList):
1486         (WebCore::CSSSelectorList::operator=):
1487         * css/StyleColor.cpp:
1488         (WebCore::StyleColor::isColorKeyword):
1489         * css/StyleResolver.cpp:
1490         (WebCore::StyleResolver::colorFromPrimitiveValue):
1491         (WebCore::colorForCSSValue): Deleted.
1492
1493 2016-10-19  Youenn Fablet  <youenn@apple.com>
1494
1495         Remove SecurityOrigin::taintsCanvas
1496         https://bugs.webkit.org/show_bug.cgi?id=163594
1497
1498         Reviewed by Darin Adler.
1499
1500         No change of behavior.
1501
1502         * html/canvas/CanvasRenderingContext.cpp:
1503         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
1504         * page/SecurityOrigin.cpp:
1505         (WebCore::SecurityOrigin::canReceiveDragData):
1506         (WebCore::SecurityOrigin::taintsCanvas): Deleted.
1507         * page/SecurityOrigin.h:
1508
1509 2016-10-18  Dave Hyatt  <hyatt@apple.com>
1510
1511         [CSS Parser] Fix compound selector parsing.
1512         https://bugs.webkit.org/show_bug.cgi?id=163649
1513
1514         Reviewed by Darin Adler.
1515
1516         The new CSS parser is failing to handle compound selectors. The code has an assumption that the
1517         first value in the RelationType enum is SubSelector. This patch changes the enum to have the same
1518         name used in Blink, RelationType, and to make the ordering be exactly the same.
1519
1520         * css/CSSSelector.h:
1521         (WebCore::CSSSelector::relation):
1522         (WebCore::CSSSelector::setRelation):
1523         * css/SelectorChecker.cpp:
1524         (WebCore::SelectorChecker::matchRecursively):
1525         (WebCore::canMatchHoverOrActiveInQuirksMode):
1526         (WebCore::SelectorChecker::determineLinkMatchType):
1527         * css/SelectorFilter.cpp:
1528         (WebCore::SelectorFilter::collectIdentifierHashes):
1529         * css/parser/CSSParserValues.cpp:
1530         (WebCore::CSSParserSelector::insertTagHistory):
1531         (WebCore::CSSParserSelector::appendTagHistory):
1532         * css/parser/CSSParserValues.h:
1533         (WebCore::CSSParserSelector::setRelation):
1534         * css/parser/CSSSelectorParser.cpp:
1535         (WebCore::CSSSelectorParser::consumeComplexSelector):
1536         (WebCore::CSSSelectorParser::consumeCombinator):
1537         * css/parser/CSSSelectorParser.h:
1538         * cssjit/SelectorCompiler.cpp:
1539         (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):
1540         (WebCore::SelectorCompiler::constructFragmentsInternal):
1541
1542 2016-10-19  Javier Fernandez  <jfernandez@igalia.com>
1543
1544         Web Inspector: Debugger buttons positioned incorrectly, align-content default value is unexpected
1545         https://bugs.webkit.org/show_bug.cgi?id=163572
1546
1547         Reviewed by Sergio Villar Senin.
1548
1549         We only allow the new CSS Box Alignment syntax when the Grid Layout
1550         feature is enabled. Due to flexbox backward compatibility we have
1551         implemented a different code path for the style initial/default values
1552         assignment. However, we have incorrectly resolved both align-content
1553         and justify-content to 'flex-start' when grid layout is disabled.
1554
1555         This patch changes the approach, so we set 'normal' (the value specified
1556         by the new syntax) for both properties, but using the values defined in
1557         the old syntax (Flexbox specification) at computed style resolution.
1558
1559         Since 'stretch' is the default value for the align-content property, this
1560         issue implies that any flexbox line with an undefined height will be
1561         laid out incorrectly, if not explicitly set via CSS, because flex items
1562         can't use the available height, even though they use 'stretch' for their
1563         'align-self' properties.
1564
1565         Test: css3/flexbox/flexbox-lines-must-be-stretched-by-default.html
1566
1567         * css/CSSComputedStyleDeclaration.cpp:
1568         (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
1569         (WebCore::ComputedStyleExtractor::propertyValue):
1570         * rendering/style/RenderStyle.h:
1571         (WebCore::RenderStyle::initialContentAlignment):
1572
1573 2016-10-19  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1574
1575         [GTK] REGRESSION(r207396) Build broken with Clang.
1576         https://bugs.webkit.org/show_bug.cgi?id=163599
1577
1578         Suggested and reviewed by Darin Adler.
1579
1580         * css/CSSPrimitiveValue.cpp:
1581         (WebCore::CSSPrimitiveValue::getStringValue):
1582
1583 2016-10-19  Darin Adler  <darin@apple.com>
1584
1585         Try to fix build.
1586
1587         * page/PerformanceUserTiming.cpp: Add back class name; needed by some compiler versions.
1588
1589 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1590
1591         Unreviewed. Fix the build after r207522.
1592
1593         * page/PerformanceUserTiming.cpp: Include PerformanceTiming.h.
1594
1595 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1596
1597         Unreviewed. Fix the build after r207519.
1598
1599         The build error is:
1600         IDL ATTRIBUTE CHECKER ERROR: Unknown IDL attribute [PassContext] is found at TestRunner.idl.
1601
1602         Because PassContext was removed from IDLAttributes.txt in rr207519, but it's implemented by
1603         CodeGeneratorTestRunner.pm and used by TestRunner.idl.
1604
1605         * bindings/scripts/IDLAttributes.txt: Bring back PassContext.
1606
1607 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1608
1609         Unreviewed. Fix the build with GCC 4.9 after r207463.
1610
1611         Add constructors to MediaConstraintsData.
1612
1613         * Modules/mediastream/MediaConstraintsImpl.h:
1614         (WebCore::MediaConstraintsData::MediaConstraintsData):
1615
1616 2016-10-19  Jer Noble  <jer.noble@apple.com>
1617
1618         [Mac][MSE] Movies with a 'mehd' box have a zero-duration
1619         https://bugs.webkit.org/show_bug.cgi?id=163641
1620
1621         Reviewed by Darin Adler.
1622
1623         Test: media/media-source/media-source-init-segment-duration.html
1624
1625         The canonical (ISO/IEC 14496-12:2012) way to signal the duration of a fragmented media file is to add a
1626         'mehd' box to the 'mvex' container box specifying the duration of the fragment. Support this through the
1627         AVAsset -overallDurationHint property.
1628
1629         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1630         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
1631         * platform/spi/mac/AVFoundationSPI.h:
1632
1633 2016-10-18  Darin Adler  <darin@apple.com>
1634
1635         Move many miscellaneous classes from ExceptionCode to Exception
1636         https://bugs.webkit.org/show_bug.cgi?id=163645
1637
1638         Reviewed by Ryosuke Niwa.
1639
1640         * bindings/js/JSCryptoCustom.cpp:
1641         (WebCore::JSCrypto::getRandomValues): Use propagateException.
1642         * bindings/js/JSDOMWindowCustom.cpp:
1643         (WebCore::handlePostMessage): Ditto.
1644         (WebCore::JSDOMWindow::setTimeout): Use toJSNumber.
1645         (WebCore::JSDOMWindow::setInterval): Ditto.
1646         * bindings/js/JSStorageCustom.cpp:
1647         (WebCore::JSStorage::nameGetter): Use propagateException.
1648         (WebCore::JSStorage::deleteProperty): Ditto.
1649         (WebCore::JSStorage::getOwnPropertyNames): Ditto.
1650         (WebCore::JSStorage::putDelegate): Ditto.
1651
1652         * loader/appcache/DOMApplicationCache.cpp:
1653         (WebCore::DOMApplicationCache::update): Use ExceptionOr.
1654         (WebCore::DOMApplicationCache::swapCache): Ditto.
1655         * loader/appcache/DOMApplicationCache.h: Update for above changes.
1656         * loader/appcache/DOMApplicationCache.idl: Use non-legacy exceptions.
1657
1658         * page/Crypto.cpp:
1659         (WebCore::Crypto::getRandomValues): Use ExceptionOr.
1660         (WebCore::Crypto::webkitSubtle): Ditto.
1661         * page/Crypto.h: Updated for above changes.
1662         * page/Crypto.idl: Use non-legacy exceptions.
1663
1664         * page/DOMWindow.cpp:
1665         (WebCore::DOMWindow::DOMWindow): Initialize many data members in
1666         the class definition instead of here.
1667         (WebCore::DOMWindow::page): Use nullptr.
1668         (WebCore::DOMWindow::screen): Ditto.
1669         (WebCore::DOMWindow::crypto): Ditto.
1670         (WebCore::DOMWindow::locationbar): Ditto.
1671         (WebCore::DOMWindow::menubar): Ditto.
1672         (WebCore::DOMWindow::personalbar): Ditto.
1673         (WebCore::DOMWindow::scrollbars): Ditto.
1674         (WebCore::DOMWindow::statusbar): Ditto.
1675         (WebCore::DOMWindow::toolbar): Ditto.
1676         (WebCore::DOMWindow::applicationCache): Ditto.
1677         (WebCore::DOMWindow::sessionStorage): Use ExceptionOr.
1678         (WebCore::DOMWindow::localStorage): Ditto.
1679         (WebCore::DOMWindow::postMessage): Ditto.
1680         (WebCore::DOMWindow::frameElement): Use nullptr.
1681         (WebCore::DOMWindow::self): Ditto.
1682         (WebCore::DOMWindow::opener): Ditto.
1683         (WebCore::DOMWindow::parent): Ditto.
1684         (WebCore::DOMWindow::top): Ditto.
1685         (WebCore::DOMWindow::getComputedStyle): Use Ref.
1686         (WebCore::DOMWindow::setTimeout): Use ExceptionOr.
1687         (WebCore::DOMWindow::setInterval): Ditto.
1688         (WebCore::didAddStorageEventListener): Use a reference instead of a
1689         pointer, and ignore return value instead of using IGNORE_EXCEPTION.
1690         (WebCore::DOMWindow::addEventListener): Pass reference to function above.
1691         (WebCore::DOMWindow::dispatchEvent): Use enum class version of PageStatus.
1692         * page/DOMWindow.h: Updated for changes above. Also changed indentatation.
1693         * page/DOMWindow.idl: Use non-legacy exceptions.
1694
1695         * page/EventSource.cpp:
1696         (WebCore::EventSource::create): Use ExceptionOr.
1697         * page/EventSource.h: Updated for change above.
1698         * page/EventSource.idl: Use non-legacy exception.
1699
1700         * page/Location.cpp:
1701         (WebCore::Location::setProtocol): Use ExceptionOr.
1702         * page/Location.h: Updated for change above.
1703         * page/Location.idl: Use non-legacy exception.
1704
1705         * page/Performance.cpp:
1706         (WebCore::Performance::Performance): Remove unnecessary initialization of
1707         smart pointer to null, and moved initialization of m_resourceTimingBufferSize
1708         to the header.
1709         (WebCore::Performance::navigation): Made non-const and return a reference.
1710         (WebCore::Performance::timing): Ditto.
1711         (WebCore::Performance::addResourceTiming): Change LoadTiming argument to use
1712         a const& instead of passing in a copy.
1713         (WebCore::Performance::webkitMark): Use ExceptionOr and make_unique.
1714         (WebCore::Performance::webkitClearMarks): Ditto.
1715         (WebCore::Performance::webkitMeasure): Ditto.
1716         (WebCore::Performance::webkitClearMeasures): Ditto.
1717         (WebCore::Performance::reduceTimeResolution): Use std::floor.
1718         * page/Performance.h: Updated for above changes. Removed unneeded includes.
1719         Made more things private. Removed unneeded reference counting of UserTiming.
1720         * page/Performance.idl: Use non-legacy exceptions.
1721
1722         * page/PerformanceUserTiming.cpp:
1723         (WebCore::restrictedMarkFunction): Removed unneeded class name.
1724         (WebCore::UserTiming::UserTiming): Take a reference instead of a pointer.
1725         (WebCore::UserTiming::mark): Use ExceptionOr.
1726         (WebCore::UserTiming::findExistingMarkStartTime): Ditto.
1727         (WebCore::UserTiming::measure): Ditto.
1728         (WebCore::getEntrySequenceByName): Simplified code using HashMap::get.
1729         * page/PerformanceUserTiming.h: Updated for above changes. Removed reference
1730         counting since this is a single-owner object.
1731
1732         * page/UserMessageHandler.cpp:
1733         (WebCore::UserMessageHandler::postMessage): Use ExceptionOr.
1734         * page/UserMessageHandler.h: Updated for above change.
1735         * page/UserMessageHandler.idl: Use non-legacy exception.
1736
1737         * storage/Storage.cpp:
1738         (WebCore::Storage::length): Use ExceptionOr.
1739         (WebCore::Storage::key): Ditto.
1740         (WebCore::Storage::getItem): Ditto.
1741         (WebCore::Storage::setItem): Ditto.
1742         (WebCore::Storage::removeItem): Ditto.
1743         (WebCore::Storage::clear): Ditto.
1744         (WebCore::Storage::contains): Ditto.
1745         * storage/Storage.h: Updated for above change.
1746         * storage/Storage.idl: Use non-legacy exceptions.
1747
1748         * storage/StorageEventDispatcher.cpp:
1749         (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
1750         Updated for ExceptionOr.
1751         (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames): Ditto.
1752
1753 2016-10-18  Darin Adler  <darin@apple.com>
1754
1755         Move internal testing classes from ExceptionCode to Exception
1756         https://bugs.webkit.org/show_bug.cgi?id=163553
1757
1758         Reviewed by Ryosuke Niwa.
1759
1760         * bindings/js/JSDOMBinding.h: Added toJSArray. Also exported a function that
1761         is now needed in the testing library.
1762         * bindings/scripts/CodeGeneratorJS.pm:
1763         (NativeToJSValue): Added code to handle the jsArray case with an exception.
1764
1765         * css/parser/CSSPropertyParser.cpp: Fix #if to make code compile when
1766         CSS_SCROLL_SNAP is not enabled.
1767
1768         * dom/Element.cpp:
1769         (WebCore::Element::createShadowRoot): Changed return type to a raw pointer.
1770         There is no reason it needs to be a RefPtr.
1771         * dom/Element.h: Updated for above change.
1772
1773         * svg/SVGPathStringBuilder.h: Exported class and made more public so it can
1774         be used in test code.
1775
1776         * svg/SVGPathUtilities.cpp:
1777         (WebCore::pathIteratorForBuildingString): Deleted. Needed only for test code,
1778         so moved into there.
1779         (WebCore::buildStringFromPath): Deleted. Ditto.
1780         * svg/SVGPathUtilities.h: Removed buildStringFromPath.
1781
1782         * testing/InternalSettings.cpp: Simplified the guard macro and used the all
1783         capitals style that our style guide prescribes for non-function-like macros.
1784         (WebCore::InternalSettings::create): Moved here, no longer inline Use m_page.
1785         (WebCore::InternalSettings::resetToConsistentState): Updated since settings
1786         returns a reference.
1787         (WebCore::InternalSettings::settings): Changed to return a reference and
1788         assert that m_page is not null; functions all check m_page for null first.
1789         (WebCore::InternalSettings::setTouchEventEmulationEnabled): Updated to use
1790         ExceptionOr, do an m_page check, and use settings that returns a reference.
1791         (WebCore::InternalSettings::setStandardFontFamily): Ditto.
1792         (WebCore::InternalSettings::setSerifFontFamily): Ditto.
1793         (WebCore::InternalSettings::setSansSerifFontFamily): Ditto.
1794         (WebCore::InternalSettings::setFixedFontFamily): Ditto.
1795         (WebCore::InternalSettings::setCursiveFontFamily): Ditto.
1796         (WebCore::InternalSettings::setFantasyFontFamily): Ditto.
1797         (WebCore::InternalSettings::setPictographFontFamily): Ditto.
1798         (WebCore::InternalSettings::setTextAutosizingEnabled): Ditto.
1799         (WebCore::InternalSettings::setTextAutosizingWindowSizeOverride): Ditto.
1800         (WebCore::InternalSettings::setMediaTypeOverride): Ditto.
1801         (WebCore::InternalSettings::setCanStartMedia): Ditto.
1802         (WebCore::InternalSettings::setAllowsAirPlayForMediaPlayback): Ditto.
1803         (WebCore::InternalSettings::setEditingBehavior): Ditto.
1804         (WebCore::InternalSettings::setShouldDisplayTrackKind): Ditto.
1805         (WebCore::InternalSettings::shouldDisplayTrackKind): Ditto.
1806         (WebCore::InternalSettings::setStorageBlockingPolicy): Ditto.
1807         (WebCore::InternalSettings::setPreferMIMETypeForImages): Ditto.
1808         (WebCore::InternalSettings::setImagesEnabled): Ditto.
1809         (WebCore::InternalSettings::setPDFImageCachingPolicy): Ditto.
1810         (WebCore::InternalSettings::setMinimumTimerInterval): Ditto.
1811         (WebCore::InternalSettings::setDefaultVideoPosterURL): Ditto.
1812         (WebCore::InternalSettings::setForcePendingWebGLPolicy): Ditto.
1813         (WebCore::InternalSettings::setTimeWithoutMouseMovementBeforeHidingControls): Ditto.
1814         (WebCore::InternalSettings::setUseLegacyBackgroundSizeShorthandBehavior): Ditto.
1815         (WebCore::InternalSettings::setAutoscrollForDragAndDropEnabled): Ditto.
1816         (WebCore::InternalSettings::setFontFallbackPrefersPictographs): Ditto.
1817         (WebCore::InternalSettings::setWebFontsAlwaysFallBack): Ditto.
1818         (WebCore::InternalSettings::setQuickTimePluginReplacementEnabled): Ditto.
1819         (WebCore::InternalSettings::setYouTubeFlashPluginReplacementEnabled): Ditto.
1820         (WebCore::InternalSettings::setBackgroundShouldExtendBeyondPage): Ditto.
1821         (WebCore::InternalSettings::setShouldConvertPositionStyleOnCopy): Ditto.
1822         (WebCore::InternalSettings::setScrollingTreeIncludesFrames): Ditto.
1823         (WebCore::InternalSettings::setAllowsInlineMediaPlayback): Ditto.
1824         (WebCore::InternalSettings::setAllowsInlineMediaPlaybackAfterFullscreen): Ditto.
1825         (WebCore::InternalSettings::setInlineMediaPlaybackRequiresPlaysInlineAttribute): Ditto.
1826         (WebCore::InternalSettings::setIndexedDBWorkersEnabled): Ditto.
1827         (WebCore::InternalSettings::userInterfaceDirectionPolicy): Ditto.
1828         (WebCore::InternalSettings::setUserInterfaceDirectionPolicy): Ditto.
1829         (WebCore::InternalSettings::systemLayoutDirection): Ditto.
1830         (WebCore::InternalSettings::setSystemLayoutDirection): Ditto.
1831         (WebCore::InternalSettings::variationFontsEnabled): Ditto.
1832         (WebCore::InternalSettings::setVariationFontsEnabled): Ditto.
1833         (WebCore::InternalSettings::forcedPrefersReducedMotionValue): Ditto.
1834         (WebCore::InternalSettings::setForcedPrefersReducedMotionValue): Ditto.
1835         * testing/InternalSettings.h: Updated for above changes. Also moved Backup to make
1836         it private instead of public.
1837         * testing/InternalSettings.idl: Use non-legacy execption. Also removed unneeded
1838         exception for setIndexedDBWorkersEnabled.
1839
1840         * testing/Internals.cpp: Marked InspectorStubFrontend final and made everything private.
1841         (WebCore::Internals::setCanShowModalDialogOverride): Use ExceptionOr.
1842         (WebCore::Internals::lastSpatialNavigationCandidateCount): Ditto.
1843         (WebCore::Internals::animationsAreSuspended): Ditto.
1844         (WebCore::Internals::suspendAnimations): Ditto.
1845         (WebCore::Internals::resumeAnimations): Ditto.
1846         (WebCore::Internals::pauseAnimationAtTimeOnElement): Ditto.
1847         (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): Ditto.
1848         (WebCore::Internals::pauseTransitionAtTimeOnElement): Ditto.
1849         (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): Ditto.
1850         (WebCore::Internals::elementRenderTreeAsText): Ditto.
1851         (WebCore::Internals::ensureShadowRoot): Ditto.
1852         (WebCore::Internals::createShadowRoot): Ditto.
1853         (WebCore::Internals::shadowRootType): Ditto.
1854         (WebCore::Internals::isTimerThrottled): Ditto.
1855         (WebCore::Internals::formControlStateOfPreviousHistoryItem): Ditto.
1856         (WebCore::Internals::setFormControlStateOfPreviousHistoryItem): Ditto.
1857         (WebCore::Internals::absoluteCaretBounds): Ditto.
1858         (WebCore::Internals::inspectorHighlightRects): Ditto.
1859         (WebCore::Internals::inspectorHighlightObject): Ditto.
1860         (WebCore::Internals::markerCountForNode): Ditto.
1861         (WebCore::Internals::markerAt): Ditto.
1862         (WebCore::Internals::markerRangeForNode): Ditto.
1863         (WebCore::Internals::markerDescriptionForNode): Ditto.
1864         (WebCore::Internals::dumpMarkerRects): Ditto.
1865         (WebCore::Internals::setMarkedTextMatchesAreHighlighted): Ditto.
1866         (WebCore::Internals::setScrollViewPosition): Ditto.
1867         (WebCore::Internals::setViewBaseBackgroundColor): Ditto.
1868         (WebCore::Internals::setPagination): Ditto.
1869         (WebCore::Internals::setPaginationLineGridEnabled): Ditto.
1870         (WebCore::Internals::configurationForViewport): Ditto.
1871         (WebCore::Internals::wasLastChangeUserEdit): Ditto.
1872         (WebCore::Internals::scrollElementToRect): Ditto.
1873         (WebCore::Internals::autofillFieldName): Ditto.
1874         (WebCore::Internals::paintControlTints): Ditto.
1875         (WebCore::Internals::rangeForDictionaryLookupAtLocation): Ditto.
1876         (WebCore::Internals::setDelegatesScrolling): Ditto.
1877         (WebCore::Internals::lastSpellCheckRequestSequence): Ditto.
1878         (WebCore::Internals::lastSpellCheckProcessedSequence): Ditto.
1879         (WebCore::Internals::wheelEventHandlerCount): Ditto.
1880         (WebCore::Internals::touchEventHandlerCount): Ditto.
1881         (WebCore::Internals::nodesFromRect): Ditto.
1882         (WebCore::Internals::setBatteryStatus): Ditto.
1883         (WebCore::Internals::setDeviceProximity): Ditto.
1884         (WebCore::Internals::hasSpellingMarker): Ditto.
1885         (WebCore::Internals::hasAutocorrectedMarker): Ditto.
1886         (WebCore::Internals::handleAcceptedCandidate): Ditto.
1887         (WebCore::Internals::isOverwriteModeEnabled): Ditto.
1888         (WebCore::Internals::toggleOverwriteModeEnabled): Ditto.
1889         (WebCore::Internals::countMatchesForText): Ditto.
1890         (WebCore::Internals::countFindMatches): Ditto.
1891         (WebCore::Internals::setInspectorIsUnderTest): Ditto.
1892         (WebCore::Internals::hasGrammarMarker): Ditto.
1893         (WebCore::Internals::numberOfScrollableAreas): Ditto.
1894         (WebCore::Internals::isPageBoxVisible): Ditto.
1895         (WebCore::Internals::layerTreeAsText): Ditto.
1896         (WebCore::Internals::repaintRectsAsText): Ditto.
1897         (WebCore::Internals::scrollingStateTreeAsText): Ditto.
1898         (WebCore::Internals::mainThreadScrollingReasons): Ditto.
1899         (WebCore::Internals::nonFastScrollableRects): Ditto.
1900         (WebCore::Internals::setElementUsesDisplayListDrawing): Ditto.
1901         (WebCore::Internals::setElementTracksDisplayListReplay): Ditto.
1902         (WebCore::Internals::displayListForElement): Ditto.
1903         (WebCore::Internals::replayDisplayListForElement): Ditto.
1904         (WebCore::Internals::garbageCollectDocumentResources): Ditto.
1905         (WebCore::Internals::insertAuthorCSS): Ditto.
1906         (WebCore::Internals::insertUserCSS): Ditto.
1907         (WebCore::Internals::pageProperty): Ditto.
1908         (WebCore::Internals::pageSizeAndMarginsInPixels): Ditto.
1909         (WebCore::Internals::setPageScaleFactor): Ditto.
1910         (WebCore::Internals::setPageZoomFactor): Ditto.
1911         (WebCore::Internals::setTextZoomFactor): Ditto.
1912         (WebCore::Internals::setUseFixedLayout): Ditto.
1913         (WebCore::Internals::setFixedLayoutSize): Ditto.
1914         (WebCore::Internals::setViewExposedRect): Ditto.
1915         (WebCore::Internals::setHeaderHeight): Ditto.
1916         (WebCore::Internals::setFooterHeight): Ditto.
1917         (WebCore::Internals::setTopContentInset): Ditto.
1918         (WebCore::Internals::setApplicationCacheOriginQuota): Ditto.
1919         (WebCore::Internals::startTrackingRepaints): Ditto.
1920         (WebCore::Internals::stopTrackingRepaints): Ditto.
1921         (WebCore::Internals::startTrackingLayerFlushes): Ditto.
1922         (WebCore::Internals::layerFlushCount): Ditto.
1923         (WebCore::Internals::startTrackingStyleRecalcs): Ditto.
1924         (WebCore::Internals::styleRecalcCount): Ditto.
1925         (WebCore::Internals::startTrackingCompositingUpdates): Ditto.
1926         (WebCore::Internals::compositingUpdateCount): Ditto.
1927         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks): Ditto.
1928         (WebCore::Internals::getCurrentCursorInfo): Ditto.
1929         (WebCore::Internals::mediaElementHasCharacteristic): Ditto.
1930         (WebCore::Internals::captionsStyleSheetOverride): Ditto.
1931         (WebCore::Internals::setCaptionsStyleSheetOverride): Ditto.
1932         (WebCore::Internals::setPrimaryAudioTrackLanguageOverride): Ditto.
1933         (WebCore::Internals::setCaptionDisplayMode): Ditto.
1934         (WebCore::Internals::selectionBounds): Ditto.
1935         (WebCore::Internals::isVibrating): Ditto.
1936         (WebCore::Internals::isPluginUnavailabilityIndicatorObscured): Ditto.
1937         (WebCore::Internals::beginMediaSessionInterruption): Ditto.
1938         (WebCore::Internals::setMediaSessionRestrictions): Ditto.
1939         (WebCore::Internals::postRemoteControlCommand): Ditto.
1940         (WebCore::Internals::setMockMediaPlaybackTargetPickerState): Ditto.
1941         (WebCore::Internals::installMockPageOverlay): Ditto.
1942         (WebCore::Internals::pageOverlayLayerTreeAsText): Ditto.
1943         (WebCore::Internals::scrollSnapOffsets): Ditto.
1944         (WebCore::Internals::pathStringWithShrinkWrappedRects): Moved the code that builds
1945         the path string in here for now since it's only used for this testing.
1946         (WebCore::Internals::resourceLoadStatisticsForOrigin): Take a const String&.
1947
1948         * testing/Internals.h: Updated for above changes.
1949         * testing/Internals.idl: Use non-legacy exceptions.
1950
1951 2016-10-18  Chris Dumez  <cdumez@apple.com>
1952
1953         [Web IDL] Drop webkit-specific extended attributes that are no longer useful
1954         https://bugs.webkit.org/show_bug.cgi?id=163643
1955
1956         Reviewed by Ryosuke Niwa.
1957
1958         Drop webkit-specific IDL extended attributes that are no longer useful:
1959         - [CustomReturn]: I believe this used to be for ObjC bindings. It has
1960           no impact in JS bindings.
1961         - [Deletable]: It only had an impact on static attributes and was only
1962           used on HTMLAllCollection.all, which is not static. I updated the
1963           bindings generator to so that static attributes are now configurable
1964           by default (unless marked as [Unforgeable], as per Web IDL [1]. This
1965           causes Notification.permission (This only static attribute we have)
1966           to become deletable. This behavior is consistent with the specification
1967           and with Chrome. I added test coverage for this.
1968         - [ImplementationNamespace]: Implemented but unused.
1969         - [PassContext]: Not implemented and unused.
1970         - [TypedArray=*]: Not implemented and unused.
1971
1972         [1] https://heycam.github.io/webidl/#es-attributes
1973
1974         Test: fast/notifications/notification-permisssion-deletable.html
1975
1976         * bindings/scripts/CodeGeneratorJS.pm:
1977         (GetNamespaceForInterface):
1978         (GenerateImplementation):
1979         * bindings/scripts/IDLAttributes.txt:
1980         * bindings/scripts/test/JS/JSTestInterface.cpp:
1981         * bindings/scripts/test/JS/JSTestObj.cpp:
1982         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1983         * dom/Node.idl:
1984         * html/HTMLDocument.idl:
1985
1986 2016-10-18  Sam Weinig  <sam@webkit.org>
1987
1988         Replace std::experimental::variant with WTF::Variant (or similar)
1989         https://bugs.webkit.org/show_bug.cgi?id=163626
1990
1991         Reviewed by Chris Dumez.
1992
1993         Rename std::experimental::variant, Variant. Move helpers get/holds_alternative/etc.
1994         into the WTF namespace.
1995
1996         * Modules/fetch/FetchBody.h:
1997         (WebCore::FetchBody::isBlob):
1998         (WebCore::FetchBody::isFormData):
1999         (WebCore::FetchBody::isArrayBuffer):
2000         (WebCore::FetchBody::isArrayBufferView):
2001         (WebCore::FetchBody::isURLSearchParams):
2002         (WebCore::FetchBody::isText):
2003         (WebCore::FetchBody::blobBody):
2004         (WebCore::FetchBody::formDataBody):
2005         (WebCore::FetchBody::arrayBufferBody):
2006         (WebCore::FetchBody::arrayBufferViewBody):
2007         (WebCore::FetchBody::textBody):
2008         (WebCore::FetchBody::urlSearchParamsBody):
2009         * bindings/generic/IDLTypes.h:
2010         * dom/ExceptionOr.h:
2011         (WebCore::ExceptionOr<ReturnType>::hasException):
2012         (WebCore::ExceptionOr<ReturnType>::releaseException):
2013         (WebCore::ExceptionOr<ReturnType>::releaseReturnValue):
2014         * dom/MessageEvent.cpp:
2015         (WebCore::MessageEvent::source):
2016         * dom/MessageEvent.h:
2017         * dom/Node.cpp:
2018         (WebCore::nodeSetPreTransformedFromNodeOrStringVector):
2019         (WebCore::Node::convertNodesOrStringsIntoNode):
2020         * dom/Node.h:
2021         * html/HTMLOptionsCollection.h:
2022         * html/HTMLSelectElement.cpp:
2023         (WebCore::HTMLSelectElement::add):
2024         * html/HTMLSelectElement.h:
2025         * html/track/TrackEvent.cpp:
2026         (WebCore::TrackEvent::TrackEvent):
2027         * html/track/TrackEvent.h:
2028
2029 2016-10-18  Chris Dumez  <cdumez@apple.com>
2030
2031         Unreviewed, rebaseline bindings tests after Sam's r207505.
2032
2033         * bindings/scripts/test/JS/JSTestCallback.cpp:
2034         (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
2035         * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
2036         (WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
2037         * bindings/scripts/test/JS/JSTestObj.cpp:
2038         (WebCore::jsTestObjPrototypeFunctionSerializedValueCaller):
2039         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2040         (WebCore::jsTestSerializedScriptValueInterfaceValueGetter):
2041         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValueGetter):
2042         (WebCore::jsTestSerializedScriptValueInterfaceCachedValueGetter):
2043         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter):
2044         (WebCore::setJSTestSerializedScriptValueInterfaceValueFunction):
2045         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValueFunction):
2046         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2047         (WebCore::jsTestTypedefsImmutableSerializedScriptValueGetter):
2048         (WebCore::setJSTestTypedefsImmutableSerializedScriptValueFunction):
2049
2050 2016-10-18  Chris Dumez  <cdumez@apple.com>
2051
2052         [Web IDL] Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor]
2053         https://bugs.webkit.org/show_bug.cgi?id=163630
2054
2055         Reviewed by Darin Adler.
2056
2057         Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor] in our
2058         IDL now that all our events use proper constructors instead.
2059
2060         * bindings/scripts/CodeGenerator.pm:
2061         * bindings/scripts/CodeGeneratorJS.pm:
2062         (GenerateHeader):
2063         (GenerateConstructorDefinition):
2064         (GenerateConstructorHelperMethods):
2065         (IsConstructable):
2066         * bindings/scripts/IDLAttributes.txt:
2067         * dom/Event.h:
2068         (WebCore::Event::create):
2069         * dom/Event.idl:
2070         * dom/UIEvent.h:
2071         (WebCore::UIEvent::create):
2072         * dom/UIEvent.idl:
2073
2074 2016-10-18  Chris Dumez  <cdumez@apple.com>
2075
2076         Changing details.open should cause a toggle event to be fired asynchronously
2077         https://bugs.webkit.org/show_bug.cgi?id=163568
2078
2079         Reviewed by Darin Adler.
2080
2081         Changing details.open should cause a toggle event to be fired asynchronously:
2082         - https://html.spec.whatwg.org/#details-notification-task-steps
2083
2084         Firefox and Chrome implement this, we don't.
2085
2086         Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html
2087
2088         * dom/EventNames.h:
2089         * dom/GlobalEventHandlers.idl:
2090         * html/HTMLAttributeNames.in:
2091         * html/HTMLDetailsElement.cpp:
2092         (WebCore::detailToggleEventSender):
2093         (WebCore::HTMLDetailsElement::~HTMLDetailsElement):
2094         (WebCore::HTMLDetailsElement::dispatchPendingEvent):
2095         (WebCore::HTMLDetailsElement::parseAttribute):
2096         * html/HTMLDetailsElement.h:
2097         * html/HTMLElement.cpp:
2098         (WebCore::HTMLElement::createEventHandlerNameMap):
2099
2100 2016-10-18  Dave Hyatt  <hyatt@apple.com>
2101
2102         [CSS Parser] Enable basic parser testing.
2103         https://bugs.webkit.org/show_bug.cgi?id=163639
2104
2105         Reviewed by Dean Jackson.
2106
2107         * css/SelectorChecker.cpp:
2108         (WebCore::SelectorChecker::matchRecursively):
2109         Remove the ASSERT_NOT_REACHED on the new shadow selectors. We need to implement this
2110         eventually, but it's better to not assert on that for now.
2111
2112         * css/parser/CSSParserValues.cpp:
2113         (WebCore::CSSParserSelector::isHostPseudoSelector):
2114         Make sure to check that we're a pseudoclass selector first, since otherwise we'll assert.
2115
2116         * css/parser/CSSParserValues.h:
2117         (WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching):
2118         Make sure to check that we're a pseudoelement selector first, since otherwise we'll assert.
2119
2120         * css/parser/CSSPropertyParser.cpp:
2121         (WebCore::CSSPropertyParser::addExpandedPropertyForValue):
2122         copyRef is needed here, since a singleton value is being propagated to all the expanded shorthand properties.
2123
2124         (WebCore::parseSingleShadow):
2125         (WebCore::CSSPropertyParser::consumeFont):
2126         Remove the font properties that aren't part of our shorthand. We will need to revisit this eventually as it seems
2127         some of the font properties should be reset as part of this shorthand but aren't.
2128 '
2129         * css/parser/CSSPropertyParserHelpers.cpp:
2130         (WebCore::CSSPropertyParserHelpers::consumeInteger):
2131         Just return a number for now instead of the parser_integer type.
2132
2133         * css/parser/CSSSelectorParser.cpp:
2134         (WebCore::CSSSelectorParser::consumePseudo):
2135         Clean this up so that it doesn't assert by making sure to add qualifying checks for the appropriate match type.
2136
2137 2016-10-18  Ryosuke Niwa  <rniwa@webkit.org>
2138
2139         Update the comment for HTML Imports as there is now a proposal to use ES6 Modules for this.
2140         Also replace the contact by me since I'm most familiar with this feature.
2141
2142         * features.json:
2143
2144 2016-10-18  Ryosuke Niwa  <rniwa@webkit.org>
2145
2146         Update the status of shadow DOM API to "Done" with a comment saying we're still fixing bugs.
2147
2148         Also update my contact information since I'm no longer on Twitter.
2149
2150         * features.json:
2151
2152 2016-10-18  Chris Dumez  <cdumez@apple.com>
2153
2154         Provide better form validation messages
2155         https://bugs.webkit.org/show_bug.cgi?id=163584
2156
2157         Reviewed by Darin Adler.
2158
2159         Provide better form validation messages that match more closely the ones
2160         from Chrome and Firefox.
2161
2162         No new tests, updated existing tests.
2163
2164         * English.lproj/Localizable.strings:
2165         * platform/LocalizedStrings.cpp:
2166         (WebCore::validationMessageValueMissingText):
2167         (WebCore::validationMessageValueMissingForCheckboxText):
2168         (WebCore::validationMessageValueMissingForFileText):
2169         (WebCore::validationMessageValueMissingForMultipleFileText):
2170         (WebCore::validationMessageValueMissingForRadioText):
2171         (WebCore::validationMessageValueMissingForSelectText):
2172         (WebCore::validationMessageTypeMismatchText):
2173         (WebCore::validationMessageTypeMismatchForEmailText):
2174         (WebCore::validationMessageTypeMismatchForMultipleEmailText):
2175         (WebCore::validationMessageTypeMismatchForURLText):
2176         (WebCore::validationMessagePatternMismatchText):
2177         (WebCore::validationMessageTooShortText):
2178         (WebCore::validationMessageTooLongText):
2179         (WebCore::validationMessageRangeUnderflowText):
2180         (WebCore::validationMessageRangeOverflowText):
2181         (WebCore::validationMessageStepMismatchText):
2182         (WebCore::validationMessageBadInputForNumberText):
2183
2184 2016-10-18  Dave Hyatt  <hyatt@apple.com>
2185
2186         Fix GTK build.
2187
2188         * css/parser/CSSPropertyParser.cpp:
2189         (WebCore::CSSPropertyParser::parseSingleValue):
2190
2191 2016-10-18  Sam Weinig  <sam@webkit.org>
2192
2193         Simplify SerializedScriptValue, MessagePortArray and ArrayBufferArray to ease generation
2194         https://bugs.webkit.org/show_bug.cgi?id=163625
2195
2196         Reviewed by Chris Dumez.
2197
2198         - Replace uses of MessagePortArray (a.k.a. Vector<RefPtr<MessagePort>, 1>) with Vector<RefPtr<MessagePort>>.
2199         - Replace uses of ArrayBufferArray (a.k.a. Vector<RefPtr<ArrayBuffer>, 1>) with Vector<RefPtr<ArrayBuffer>>.
2200         - Add convenience functions to SerializedScriptValue to allow calling with fewer parameters.
2201         - Move MessagePorts and ArrayBuffers more where possible.
2202
2203         * Modules/indexeddb/IDBObjectStore.cpp:
2204         (WebCore::IDBObjectStore::putOrAdd):
2205         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2206         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
2207         * bindings/js/IDBBindingUtilities.cpp:
2208         (WebCore::deserializeIDBValueToJSValue):
2209         * bindings/js/JSCustomEventCustom.cpp:
2210         (WebCore::JSCustomEvent::detail):
2211         * bindings/js/JSHistoryCustom.cpp:
2212         (WebCore::JSHistory::state):
2213         (WebCore::JSHistory::pushState):
2214         (WebCore::JSHistory::replaceState):
2215         * bindings/js/JSPopStateEventCustom.cpp:
2216         (WebCore::JSPopStateEvent::state):
2217         * dom/CustomEvent.cpp:
2218         (WebCore::CustomEvent::trySerializeDetail):
2219         * dom/ErrorEvent.cpp:
2220         (WebCore::ErrorEvent::sanitizedErrorValue):
2221         (WebCore::ErrorEvent::trySerializeError):
2222         * dom/PopStateEvent.cpp:
2223         (WebCore::PopStateEvent::trySerializeState):
2224         * page/DOMWindow.cpp:
2225         (WebCore::DOMWindow::postMessage):
2226         * page/DOMWindow.h:
2227         * workers/DedicatedWorkerGlobalScope.cpp:
2228         (WebCore::DedicatedWorkerGlobalScope::postMessage):
2229         * workers/DedicatedWorkerGlobalScope.h:
2230         * workers/Worker.cpp:
2231         (WebCore::Worker::postMessage):
2232         * workers/Worker.h:
2233         * bindings/js/JSDOMWindowCustom.cpp:
2234         (WebCore::handlePostMessage):
2235         * bindings/js/JSDictionary.cpp:
2236         (WebCore::JSDictionary::convertValue):
2237         * bindings/js/JSDictionary.h:
2238         Updated for new SerializedScriptValue interface/vector naming.
2239
2240         * bindings/js/JSMessageEventCustom.cpp:
2241         (WebCore::handleInitMessageEvent):
2242         Update handleInitMessageEvent to check for exceptions and use convert for the MessagePort sequence.
2243
2244         * bindings/js/JSMessagePortCustom.cpp:
2245         (WebCore::extractTransferables):
2246         (WebCore::fillMessagePortArray): Deleted.
2247         * bindings/js/JSMessagePortCustom.h:
2248         (WebCore::handlePostMessage):
2249         Rename fillMessagePortArray to extractTransferables to better express what it does.
2250
2251         * bindings/js/SerializedScriptValue.cpp:
2252         (WebCore::CloneSerializer::serialize):
2253         (WebCore::CloneSerializer::CloneSerializer):
2254         (WebCore::CloneSerializer::fillTransferMap):
2255         (WebCore::CloneSerializer::dumpIfTerminal):
2256         (WebCore::CloneDeserializer::deserialize):
2257         (WebCore::CloneDeserializer::CloneDeserializer):
2258         (WebCore::CloneDeserializer::readTerminal):
2259         (WebCore::SerializedScriptValue::transferArrayBuffers):
2260         (WebCore::SerializedScriptValue::create):
2261         (WebCore::SerializedScriptValue::deserialize):
2262         * bindings/js/SerializedScriptValue.h:
2263         Simplify interface to allow more callers to avoid passing default arguments. Use ExecState& more.
2264         * bindings/scripts/CodeGeneratorJS.pm:
2265         (GetNativeVectorType):
2266         Remove special case for MessagePort.
2267         (JSValueToNative):
2268         (NativeToJSValue):
2269         Updated for new SerializedScriptValue interface.
2270
2271         * dom/MessageEvent.cpp:
2272         (WebCore::MessageEvent::MessageEvent):
2273         (WebCore::MessageEvent::create):
2274         (WebCore::MessageEvent::initMessageEvent):
2275         (WebCore::MessageEvent::trySerializeData):
2276         * dom/MessageEvent.h:
2277         Store the MessagePort sequence as a Vector<RefPtr<MessagePort>> rather than in a unique_ptr.
2278
2279         * dom/MessageEvent.idl:
2280         Update last type in init functions to be sequence<MessagePort> rather than Array. They are still
2281         custom, as we don't quite generate these correctly yet. 
2282
2283         * dom/MessagePort.cpp:
2284         (WebCore::MessagePort::postMessage):
2285         (WebCore::MessagePort::dispatchMessages):
2286         (WebCore::MessagePort::disentanglePorts):
2287         (WebCore::MessagePort::entanglePorts):
2288         * dom/MessagePort.h:
2289         Update interface to take MessagePort vectors by rvalue reference.
2290
2291 2016-10-18  Chris Dumez  <cdumez@apple.com>
2292
2293         [iOS] Drop JSDictionary::convertValue() overload taking a TouchList
2294         https://bugs.webkit.org/show_bug.cgi?id=163620
2295
2296         Reviewed by Sam Weinig.
2297
2298         Drop JSDictionary::convertValue() overload taking a TouchList now that
2299         TouchEvent is using a proper constructor with a TouchEventInit
2300         dictionary on iOS.
2301
2302         * bindings/js/JSDictionary.cpp:
2303
2304 2016-10-18  Dean Jackson  <dino@apple.com>
2305
2306         Remove CSS_SHAPES feature definition. This should always be on.
2307         https://bugs.webkit.org/show_bug.cgi?id=163628
2308         <rdar://problem/28834613>
2309
2310         Reviewed by Tim Horton.
2311
2312         CSS Shapes is in Candidate Recommendation. It's a core part
2313         of CSS. It should always be enabled.
2314
2315         * Configurations/FeatureDefines.xcconfig:
2316         * css/CSSComputedStyleDeclaration.cpp:
2317         (WebCore::shapePropertyValue):
2318         (WebCore::ComputedStyleExtractor::propertyValue):
2319         * css/CSSPropertyNames.in:
2320         * css/CSSValueKeywords.in:
2321         * css/StyleBuilderConverter.h:
2322         (WebCore::StyleBuilderConverter::convertShapeValue):
2323         * css/parser/CSSParser.cpp:
2324         (WebCore::isSimpleLengthPropertyID):
2325         (WebCore::CSSParser::parseValue):
2326         (WebCore::CSSParser::parseShapeProperty):
2327         * css/parser/CSSParser.h:
2328         * inspector/InspectorOverlay.cpp:
2329         (WebCore::buildObjectForShapeOutside):
2330         (WebCore::buildObjectForElementData):
2331         * page/animation/CSSPropertyAnimation.cpp:
2332         (WebCore::blendFunc):
2333         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2334         * rendering/FloatingObjects.cpp:
2335         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
2336         (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
2337         (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
2338         * rendering/RenderBlock.cpp:
2339         * rendering/RenderBlockFlow.cpp:
2340         (WebCore::RenderBlockFlow::positionNewFloats):
2341         * rendering/RenderBox.cpp:
2342         (WebCore::RenderBox::~RenderBox):
2343         (WebCore::RenderBox::styleDidChange):
2344         (WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange):
2345         (WebCore::isCandidateForOpaquenessTest):
2346         (WebCore::RenderBox::imageChanged):
2347         * rendering/RenderBox.h:
2348         (WebCore::RenderBox::markShapeOutsideDependentsForLayout):
2349         * rendering/RenderElement.cpp:
2350         (WebCore::RenderElement::~RenderElement):
2351         (WebCore::RenderElement::updateShapeImage):
2352         (WebCore::RenderElement::initializeStyle):
2353         (WebCore::RenderElement::setStyle):
2354         * rendering/RenderElement.h:
2355         (WebCore::RenderElement::hasShapeOutside):
2356         * rendering/SimpleLineLayout.cpp:
2357         (WebCore::SimpleLineLayout::canUseForWithReason):
2358         * rendering/line/LineWidth.cpp:
2359         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2360         (WebCore::LineWidth::wrapNextToShapeOutside):
2361         (WebCore::LineWidth::fitBelowFloats):
2362         * rendering/line/LineWidth.h:
2363         * rendering/shapes/ShapeOutsideInfo.cpp:
2364         * rendering/shapes/ShapeOutsideInfo.h:
2365         * rendering/style/RenderStyle.cpp:
2366         (WebCore::RenderStyle::changeRequiresLayout):
2367         (WebCore::RenderStyle::changeRequiresRepaint):
2368         * rendering/style/RenderStyle.h:
2369         (WebCore::RenderStyle::initialShapeImageThreshold):
2370         * rendering/style/ShapeValue.cpp:
2371         * rendering/style/ShapeValue.h:
2372         * rendering/style/StyleRareNonInheritedData.cpp:
2373         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2374         (WebCore::StyleRareNonInheritedData::operator==):
2375         * rendering/style/StyleRareNonInheritedData.h:
2376         * style/StylePendingResources.cpp:
2377         (WebCore::Style::loadPendingResources):
2378
2379 2016-10-18  Chris Dumez  <cdumez@apple.com>
2380
2381         convertDictionary<>() no longer needs to return an Optional<> type
2382         https://bugs.webkit.org/show_bug.cgi?id=163624
2383
2384         Reviewed by Sam Weinig.
2385
2386         convertDictionary<>() no longer needs to return an Optional<> type now
2387         that our dictionary structures are all default constructible after
2388         <https://trac.webkit.org/changeset/206974>.
2389
2390         * bindings/js/JSDOMConvert.h:
2391         * bindings/scripts/CodeGeneratorJS.pm:
2392         (GenerateDictionaryHeaderContent):
2393         (GenerateDictionaryImplementationContent):
2394         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2395         (WebCore::convertDictionary<TestEventConstructor::Init>):
2396         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2397         * bindings/scripts/test/JS/JSTestObj.cpp:
2398         (WebCore::convertDictionary<TestObj::Dictionary>):
2399         (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
2400         (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
2401         (WebCore::convertDictionary<AlternateDictionaryName>):
2402         (WebCore::convertDictionary<TestObj::ParentDictionary>):
2403         (WebCore::convertDictionary<TestObj::ChildDictionary>):
2404         * bindings/scripts/test/JS/JSTestObj.h:
2405         * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
2406         (WebCore::convertDictionary<DictionaryImplName>):
2407         * bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
2408
2409 2016-10-18  Chris Dumez  <cdumez@apple.com>
2410
2411         Leverage new union type support for HTMLSelectElement.add() / HTMLOptionsCollection.add()
2412         https://bugs.webkit.org/show_bug.cgi?id=163608
2413
2414         Reviewed by Ryosuke Niwa.
2415
2416         Leverage new union type support for HTMLSelectElement.add() / HTMLOptionsCollection.add():
2417         - https://html.spec.whatwg.org/#htmlselectelement
2418         - https://html.spec.whatwg.org/#htmloptionscollection
2419
2420         No new tests, rebaseline existing test.
2421
2422         * bindings/scripts/CodeGeneratorJS.pm:
2423         (GenerateDefaultValue):
2424         (GenerateParametersCheck):
2425         * bindings/scripts/test/JS/JSTestObj.cpp:
2426         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyCaller):
2427         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
2428         (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
2429         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2430         (WebCore::jsTestTypedefsPrototypeFunctionFuncCaller):
2431         * html/HTMLOptGroupElement.idl:
2432         * html/HTMLOptionsCollection.cpp:
2433         (WebCore::HTMLOptionsCollection::add):
2434         * html/HTMLOptionsCollection.h:
2435         * html/HTMLOptionsCollection.idl:
2436         * html/HTMLSelectElement.cpp:
2437         (WebCore::HTMLSelectElement::add):
2438         (WebCore::HTMLSelectElement::setOption):
2439         (WebCore::HTMLSelectElement::setLength):
2440         * html/HTMLSelectElement.h:
2441         * html/HTMLSelectElement.idl:
2442
2443 2016-10-18  Aaron Chu  <aaron_chu@apple.com>
2444
2445         Web Inspector: AXI: focused/focusable state should be based on Accessibility Object instead of Element
2446         https://bugs.webkit.org/show_bug.cgi?id=163088
2447         <rdar://problem/16421985>
2448
2449         Reviewed by Darin Adler.
2450
2451         Changed code in InspectDOMAgent so that it determines the focusability of a Node based
2452         on the AccessibilityNodeObject and not the Element class.
2453
2454         Covered by existing tests: 
2455         LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html
2456
2457         * inspector/InspectorDOMAgent.cpp:
2458         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2459
2460 2016-10-18  Anders Carlsson  <andersca@apple.com>
2461
2462         Get rid of more WebHistoryItem cruft
2463         https://bugs.webkit.org/show_bug.cgi?id=163623
2464
2465         Reviewed by Tim Horton.
2466
2467         * history/HistoryItem.cpp:
2468         (WebCore::HistoryItem::HistoryItem):
2469         * history/HistoryItem.h:
2470         (WebCore::HistoryItem::setViewportArguments):
2471         (WebCore::HistoryItem::bookmarkID): Deleted.
2472         (WebCore::HistoryItem::setBookmarkID): Deleted.
2473         (WebCore::HistoryItem::sharedLinkUniqueIdentifier): Deleted.
2474         (WebCore::HistoryItem::setSharedLinkUniqueIdentifier): Deleted.
2475
2476 2016-10-18  Dave Hyatt  <hyatt@apple.com>
2477
2478         Fix Windows build.
2479  
2480         * css/parser/CSSPropertyParser.cpp:
2481         (WebCore::CSSPropertyParser::parseSingleValue):
2482
2483 2016-10-18  Antoine Quint  <graouts@apple.com>
2484
2485         Modern media controls don't update their rendering correctly
2486         https://bugs.webkit.org/show_bug.cgi?id=163603
2487         <rdar://problem/28826022>
2488
2489         Reviewed by Dean Jackson.
2490
2491         There are rendering issues when we use an absolutely-positioned element
2492         as the top-most element in a media element's shadow root (webkit.org/b/163592).
2493         Since we only need for that element to be positioned, we can use "position: relative"
2494         instead, which removes the rendering issues.
2495
2496         * Modules/modern-media-controls/controls/media-controls.css:
2497         (.media-controls):
2498         (.media-controls,): Deleted.
2499
2500 2016-10-18  Dean Jackson  <dino@apple.com>
2501
2502         Add preliminary support for extended colors to WebCore::Color
2503         https://bugs.webkit.org/show_bug.cgi?id=162878
2504         <rdar://problem/28596413>
2505
2506         Follow-up review comments from Darin Adler.
2507
2508         * html/canvas/CanvasGradient.cpp:
2509         (WebCore::CanvasGradient::addColorStop): Use nullptr.
2510         * platform/graphics/Color.cpp:
2511         (WebCore::Color::Color): Explicitly zero before assigning the pointer.
2512         * platform/graphics/Color.h: Add some comments about the failings of operator== and hash.
2513         (WebCore::Color::Color): Add some static_asserts to the constructors. Move the empty and deleted values
2514         to static constants.
2515         (WebCore::Color::isHashTableDeletedValue):
2516         (WebCore::Color::hash): Replacement for asUint64, which was only being used for a hash.
2517         (WebCore::Color::asUint64): Deleted.
2518         * platform/graphics/ColorHash.h: Use new hash functions. Use "using" instead of typedef.
2519         (WTF::ColorHash::hash):
2520
2521 2016-10-18  Ryosuke Niwa  <rniwa@webkit.org>
2522
2523         REGRESSION (r201471): Keyboard remains visible when swiping back on twitter.com
2524         https://bugs.webkit.org/show_bug.cgi?id=163581
2525         <rdar://problem/27739558>
2526
2527         Reviewed by Simon Fraser.
2528
2529         The bug was caused by Chrome::elementDidBlur not getting called, which resulted in
2530         StopAssistingNode not getting sent to the UI process.
2531
2532         Test: fast/forms/ios/hide-keyboard-on-node-removal.html
2533
2534         * dom/Document.cpp:
2535         (WebCore::Document::setFocusedElement): Restore the behavior prior to r201471 by calling
2536         Chrome::elementDidBlur explicitly.
2537         * html/HTMLTextFormControlElement.cpp:
2538         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent): Added a comment about ordering.
2539
2540 2016-10-17  Anders Carlsson  <andersca@apple.com>
2541
2542         Move some history specific HistoryItem code to WebHistoryItem
2543         https://bugs.webkit.org/show_bug.cgi?id=163567
2544
2545         Reviewed by Tim Horton.
2546
2547         * history/HistoryItem.cpp:
2548         (WebCore::HistoryItem::addRedirectURL): Deleted.
2549         (WebCore::HistoryItem::redirectURLs): Deleted.
2550         (WebCore::HistoryItem::setRedirectURLs): Deleted.
2551         * history/HistoryItem.h:
2552
2553 2016-10-18  Dave Hyatt  <hyatt@apple.com>
2554
2555         [CSS Parser] Get all the properties turned on
2556         https://bugs.webkit.org/show_bug.cgi?id=163605
2557
2558         Reviewed by Dean Jackson.
2559
2560         * WebCore.xcodeproj/project.pbxproj:
2561         * css/CSSFunctionValue.h:
2562         * css/CSSPendingSubstitutionValue.cpp: Added.
2563         (WebCore::CSSPendingSubstitutionValue::customCSSText):
2564         * css/CSSPendingSubstitutionValue.h: Added.
2565         (WebCore::CSSPendingSubstitutionValue::create):
2566         (WebCore::CSSPendingSubstitutionValue::shorthandValue):
2567         (WebCore::CSSPendingSubstitutionValue::shorthandPropertyId):
2568         (WebCore::CSSPendingSubstitutionValue::equals):
2569         (WebCore::CSSPendingSubstitutionValue::CSSPendingSubstitutionValue):
2570         * css/CSSValue.cpp:
2571         (WebCore::CSSValue::cssText):
2572         (WebCore::CSSValue::destroy):
2573         * css/CSSValue.h:
2574         (WebCore::CSSValue::isPendingSubstitutionValue):
2575         * css/CSSValueKeywords.in:
2576         * css/StylePropertyShorthand.cpp:
2577         (WebCore::transitionShorthandForParsing):
2578         * css/StylePropertyShorthand.h:
2579         * css/parser/CSSParser.cpp:
2580         (WebCore::CSSParser::completeURL):
2581         * css/parser/CSSParserImpl.cpp:
2582         (WebCore::CSSParserImpl::parseValue):
2583         (WebCore::CSSParserImpl::consumeDeclaration):
2584         (WebCore::CSSParserImpl::consumeDeclarationValue):
2585         * css/parser/CSSParserMode.h:
2586         (WebCore::CSSParserContext::completeURL):
2587         * css/parser/CSSParserToken.cpp:
2588         (WebCore::CSSParserToken::parseAsCSSPropertyID):
2589         (WebCore::CSSParserToken::parseAsUnresolvedCSSPropertyID): Deleted.
2590         * css/parser/CSSParserToken.h:
2591         * css/parser/CSSPropertyParser.cpp:
2592         (WebCore::cssPropertyID):
2593         (WebCore::CSSPropertyParser::addProperty):
2594         (WebCore::CSSPropertyParser::addExpandedPropertyForValue):
2595         (WebCore::CSSPropertyParser::parseValue):
2596         (WebCore::CSSPropertyParser::parseSingleValue):
2597         (WebCore::CSSPropertyParser::parseValueStart):
2598         (WebCore::CSSPropertyParser::consumeCSSWideKeyword):
2599         (WebCore::consumeTransformOrigin):
2600         (WebCore::consumeWillChange):
2601         (WebCore::consumeFontFeatureTag):
2602         (WebCore::consumeFontFeatureSettings):
2603         (WebCore::consumePage):
2604         (WebCore::consumeQuotes):
2605         (WebCore::FontVariantLigaturesParser::consumeLigature):
2606         (WebCore::FontVariantLigaturesParser::finalizeValue):
2607         (WebCore::consumeFontVariantLigatures):
2608         (WebCore::consumeFontVariantCaps):
2609         (WebCore::FontVariantNumericParser::consumeNumeric):
2610         (WebCore::FontVariantNumericParser::finalizeValue):
2611         (WebCore::consumeFontVariantNumeric):
2612         (WebCore::consumeFontVariantCSS21):
2613         (WebCore::consumeFontVariantList):
2614         (WebCore::consumeFontWeight):
2615         (WebCore::consumeFamilyName):
2616         (WebCore::consumeGenericFamily):
2617         (WebCore::consumeFontFamily):
2618         (WebCore::consumeSpacing):
2619         (WebCore::consumeTabSize):
2620         (WebCore::consumeTextSizeAdjust):
2621         (WebCore::consumeFontSize):
2622         (WebCore::consumeLineHeight):
2623         (WebCore::createPrimitiveValuePair):
2624         (WebCore::consumeCounter):
2625         (WebCore::consumePageSize):
2626         (WebCore::consumeSize):
2627         (WebCore::consumeTextIndent):
2628         (WebCore::validWidthOrHeightKeyword):
2629         (WebCore::consumeMaxWidthOrHeight):
2630         (WebCore::consumeWidthOrHeight):
2631         (WebCore::consumeMarginOrOffset):
2632         (WebCore::consumeClipComponent):
2633         (WebCore::consumeClip):
2634         (WebCore::consumeTouchAction):
2635         (WebCore::consumeLineClamp):
2636         (WebCore::consumeLocale):
2637         (WebCore::consumeColumnWidth):
2638         (WebCore::consumeColumnCount):
2639         (WebCore::consumeColumnGap):
2640         (WebCore::consumeColumnSpan):
2641         (WebCore::consumeZoom):
2642         (WebCore::consumeAnimationIterationCount):
2643         (WebCore::consumeAnimationName):
2644         (WebCore::consumeTransitionProperty):
2645         (WebCore::consumeCubicBezier):
2646         (WebCore::consumeAnimationTimingFunction):
2647         (WebCore::consumeAnimationValue):
2648         (WebCore::isValidAnimationPropertyList):
2649         (WebCore::consumeAnimationPropertyList):
2650         (WebCore::CSSPropertyParser::consumeAnimationShorthand):
2651         (WebCore::consumeZIndex):
2652         (WebCore::parseSingleShadow):
2653         (WebCore::consumeShadow):
2654         (WebCore::consumeFilterFunction):
2655         (WebCore::consumeFilter):
2656         (WebCore::consumeTextDecorationLine):
2657         (WebCore::consumeTextEmphasisStyle):
2658         (WebCore::consumeOutlineColor):
2659         (WebCore::consumeLineWidth):
2660         (WebCore::consumeBorderWidth):
2661         (WebCore::consumeTextStrokeWidth):
2662         (WebCore::consumeColumnRuleWidth):
2663         (WebCore::consumeTranslate3d):
2664         (WebCore::consumeNumbers):
2665         (WebCore::consumePerspective):
2666         (WebCore::consumeTransformValue):
2667         (WebCore::consumeTransform):
2668         (WebCore::consumePositionLonghand):
2669         (WebCore::consumePositionX):
2670         (WebCore::consumePositionY):
2671         (WebCore::consumePaintStroke):
2672         (WebCore::consumePaintOrder):
2673         (WebCore::consumeNoneOrURI):
2674         (WebCore::consumeFlexBasis):
2675         (WebCore::consumeStrokeDasharray):
2676         (WebCore::consumeBaselineShift):
2677         (WebCore::consumeRxOrRy):
2678         (WebCore::consumeCursor):
2679         (WebCore::consumeAttr):
2680         (WebCore::consumeCounterContent):
2681         (WebCore::consumeContent):
2682         (WebCore::consumePositionList):
2683         (WebCore::consumeScrollSnapCoordinate):
2684         (WebCore::consumeScrollSnapPoints):
2685         (WebCore::consumeBorderRadiusCorner):
2686         (WebCore::consumeVerticalAlign):
2687         (WebCore::consumeShapeRadius):
2688         (WebCore::consumeBasicShapeCircle):
2689         (WebCore::consumeBasicShapeEllipse):
2690         (WebCore::consumeBasicShapePolygon):
2691         (WebCore::complete4Sides):
2692         (WebCore::consumeRadii):
2693         (WebCore::consumeBasicShapeInset):
2694         (WebCore::consumeBasicShape):
2695         (WebCore::consumeWebkitClipPath):
2696         (WebCore::consumeShapeOutside):
2697         (WebCore::consumeContentDistributionOverflowPosition):
2698         (WebCore::consumeBorderImageRepeatKeyword):
2699         (WebCore::consumeBorderImageRepeat):
2700         (WebCore::consumeBorderImageSlice):
2701         (WebCore::consumeBorderImageOutset):
2702         (WebCore::consumeBorderImageWidth):
2703         (WebCore::consumeBorderImageComponents):
2704         (WebCore::consumeWebkitBorderImage):
2705         (WebCore::consumeReflect):
2706         (WebCore::consumeImageOrientation):
2707         (WebCore::consumeBackgroundBlendMode):
2708         (WebCore::consumeBackgroundAttachment):
2709         (WebCore::consumeBackgroundBox):
2710         (WebCore::consumeBackgroundComposite):
2711         (WebCore::consumePrefixedBackgroundBox):
2712         (WebCore::consumeBackgroundSize):
2713         (WebCore::consumeGridAutoFlow):
2714         (WebCore::consumeBackgroundComponent):
2715         (WebCore::addBackgroundValue):
2716         (WebCore::consumeCommaSeparatedBackgroundComponent):
2717         (WebCore::consumeSelfPositionKeyword):
2718         (WebCore::consumeSelfPositionOverflowPosition):
2719         (WebCore::consumeAlignItems):
2720         (WebCore::consumeJustifyItems):
2721         (WebCore::consumeFitContent):
2722         (WebCore::consumeCustomIdentForGridLine):
2723         (WebCore::consumeGridLine):
2724         (WebCore::isGridTrackFixedSized):
2725         (WebCore::consumeGridBreadth):
2726         (WebCore::consumeGridTrackSize):
2727         (WebCore::consumeGridLineNames):
2728         (WebCore::consumeGridTrackRepeatFunction):
2729         (WebCore::consumeGridTrackList):
2730         (WebCore::consumeGridTemplatesRowsOrColumns):
2731         (WebCore::consumeGridTemplateAreas):
2732         (WebCore::consumeFontFaceUnicodeRange):
2733         (WebCore::consumeFontFaceSrcURI):
2734         (WebCore::consumeFontFaceSrcLocal):
2735         (WebCore::consumeFontFaceSrc):
2736         (WebCore::CSSPropertyParser::parseFontFaceDescriptor):
2737         (WebCore::CSSPropertyParser::consumeSystemFont):
2738         (WebCore::CSSPropertyParser::consumeFont):
2739         (WebCore::CSSPropertyParser::consumeFontVariantShorthand):
2740         (WebCore::CSSPropertyParser::consumeBorderSpacing):
2741         (WebCore::consumeSingleViewportDescriptor):
2742         (WebCore::CSSPropertyParser::parseViewportDescriptor):
2743         (WebCore::consumeColumnWidthOrCount):
2744         (WebCore::CSSPropertyParser::consumeColumns):
2745         (WebCore::CSSPropertyParser::consumeShorthandGreedily):
2746         (WebCore::CSSPropertyParser::consumeFlex):
2747         (WebCore::CSSPropertyParser::consumeBorder):
2748         (WebCore::CSSPropertyParser::consume4Values):
2749         (WebCore::CSSPropertyParser::consumeBorderImage):
2750         (WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
2751         (WebCore::consumeBackgroundPosition):
2752         (WebCore::consumeRepeatStyleComponent):
2753         (WebCore::consumeRepeatStyle):
2754         (WebCore::CSSPropertyParser::consumeBackgroundShorthand):
2755         (WebCore::CSSPropertyParser::consumeGridItemPositionShorthand):
2756         (WebCore::CSSPropertyParser::consumeGridAreaShorthand):
2757         (WebCore::CSSPropertyParser::consumeGridTemplateRowsAndAreasAndColumns):
2758         (WebCore::CSSPropertyParser::consumeGridTemplateShorthand):
2759         (WebCore::CSSPropertyParser::consumeGridShorthand):
2760         (WebCore::CSSPropertyParser::parseShorthand):
2761         (WebCore::unresolvedCSSPropertyID): Deleted.
2762         * css/parser/CSSPropertyParser.h:
2763         * css/parser/CSSPropertyParserHelpers.cpp:
2764         (WebCore::CSSPropertyParserHelpers::consumeIdent):
2765         (WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
2766         (WebCore::CSSPropertyParserHelpers::consumeString):
2767         (WebCore::CSSPropertyParserHelpers::consumeImageSet):
2768         * css/parser/CSSPropertyParserHelpers.h:
2769
2770 2016-10-18  Brent Fulgham  <bfulgham@apple.com>
2771
2772         Correct Document::removeAllEventListeners
2773         https://bugs.webkit.org/show_bug.cgi?id=163558
2774         <rdar://problem/28716840>
2775
2776         Reviewed by Chris Dumez.
2777
2778         Tested by fast/dom/node-move-to-new-document-crash-main.html.
2779
2780         * dom/Document.cpp:
2781         (WebCore::Document::removeAllEventListeners): Clear out the wheel and
2782         touch event targets when clearing all data.
2783
2784 2016-10-18  Dean Jackson  <dino@apple.com>
2785
2786         Remove dependency cycle with UIKit
2787         https://bugs.webkit.org/show_bug.cgi?id=163577
2788         <rdar://problem/28786160>
2789
2790         Reviewed by Tim Horton.
2791
2792         Soft link against UIKit. Followup patch because
2793         I screwed up and forgot to edit the simulator
2794         configuration.
2795
2796         * Configurations/WebCoreTestSupport.xcconfig:
2797
2798 2016-10-18  Said Abou-Hallawa  <sabouhallawa@apple.com>
2799
2800         SVGCSSParser: m_implicitShorthand value is not reset after adding the shorthand property
2801         https://bugs.webkit.org/show_bug.cgi?id=116470
2802
2803         Reviewed by Simon Fraser.
2804
2805         When we encounter a shorthand css property, we set m_implicitShorthand
2806         to true to tell addProperty() later that the individual properties are
2807         all set through a short hand one. We need to make sure that setting 
2808         m_implicitShorthand to true will not be leaked after finishing parsing
2809         the short hand property.
2810
2811         Test: fast/css/implicit-property-restore.html
2812
2813         * css/parser/CSSParser.cpp:
2814         (WebCore::CSSParser::parseValue):
2815         (WebCore::CSSParser::parseFillShorthand):
2816         (WebCore::CSSParser::parseShorthand):
2817         (WebCore::CSSParser::parse4Values):
2818         (WebCore::CSSParser::parseBorderRadius):
2819         (WTF::ImplicitScope::ImplicitScope): Deleted.
2820         (WTF::ImplicitScope::~ImplicitScope): Deleted.
2821         Get rid of ImplicitScope and replace its calls by TemporaryChange<bool>.
2822         
2823         * css/parser/SVGCSSParser.cpp:
2824         (WebCore::CSSParser::parseSVGValue):
2825         Restore m_implicitShorthand value after setting it temporarily to true.
2826
2827 2016-10-18  Chris Dumez  <cdumez@apple.com>
2828
2829         Update TrackEvent to stop using legacy [ConstructorTemplate=Event]
2830         https://bugs.webkit.org/show_bug.cgi?id=163580
2831
2832         Reviewed by Sam Weinig.
2833
2834         Update TrackEvent to stop using legacy [ConstructorTemplate=Event]
2835         and use a regular constructor as in the specification:
2836         - https://html.spec.whatwg.org/#the-trackevent-interface
2837
2838         No new tests, updated existing tests.
2839
2840         * html/track/TrackEvent.cpp:
2841         (WebCore::TrackEvent::TrackEvent):
2842         * html/track/TrackEvent.h:
2843         * html/track/TrackEvent.idl:
2844
2845 2016-10-18  Commit Queue  <commit-queue@webkit.org>
2846
2847         Unreviewed, rolling out r207409.
2848         https://bugs.webkit.org/show_bug.cgi?id=163602
2849
2850         Introduced many test failures and timeouts, causing release
2851         bot to exit early (Requested by mcatanzaro on #webkit).
2852
2853         Reverted changeset:
2854
2855         "[GTK] Several tests crashing on debug bot in (anonymous
2856         namespace)::MediaPlayerPrivateGStreamerBase::repaint"
2857         https://bugs.webkit.org/show_bug.cgi?id=163511
2858         http://trac.webkit.org/changeset/207409
2859
2860 2016-10-18  Eric Carlson  <eric.carlson@apple.com>
2861
2862         [MediaStream] Resolve constraints and enumerate devices in the UI process
2863         https://bugs.webkit.org/show_bug.cgi?id=162147
2864         <rdar://problem/28803569>
2865
2866         Reviewed by Darin Adler.
2867
2868         Restructure gUM constraint validation and MediaDevices.enumerateDevices so all media device
2869         access happens in the UI process.
2870
2871         No new tests, updated results of existing tests.
2872
2873         * CMakeLists.txt: Add MediaDevicesEnumerationRequest.cpp, delete UserMediaPermissionCheck.cpp.
2874
2875         * Modules/mediastream/MediaConstraintsImpl.cpp:
2876         (WebCore::MediaConstraintsImpl::create): Only create from MediaConstraintsData.
2877         (WebCore::MediaConstraintsImpl::initialize): Deleted.
2878         * Modules/mediastream/MediaConstraintsImpl.h:
2879
2880         * Modules/mediastream/MediaDevicesEnumerationRequest.cpp: Added.
2881         (WebCore::MediaDevicesEnumerationRequest::create):
2882         (WebCore::MediaDevicesEnumerationRequest::MediaDevicesEnumerationRequest):
2883         (WebCore::MediaDevicesEnumerationRequest::~MediaDevicesEnumerationRequest):
2884         (WebCore::MediaDevicesEnumerationRequest::userMediaDocumentOrigin):
2885         (WebCore::MediaDevicesEnumerationRequest::topLevelDocumentOrigin):
2886         (WebCore::MediaDevicesEnumerationRequest::contextDestroyed):
2887         (WebCore::MediaDevicesEnumerationRequest::start):
2888         (WebCore::MediaDevicesEnumerationRequest::cancel):
2889         (WebCore::MediaDevicesEnumerationRequest::setDeviceInfo):
2890         (WebCore::MediaDevicesEnumerationRequest::finish):
2891         * Modules/mediastream/MediaDevicesEnumerationRequest.h: Added.
2892
2893         * Modules/mediastream/MediaDevicesRequest.cpp:
2894         (WebCore::MediaDevicesRequest::~MediaDevicesRequest): Clear the enumeration request.
2895         (WebCore::MediaDevicesRequest::contextDestroyed): Ditto.
2896         (WebCore::MediaDevicesRequest::start): Create and use a MediaDevicesEnumerationRequest.
2897         (WebCore::MediaDevicesRequest::didCompletePermissionCheck): Deleted.
2898         * Modules/mediastream/MediaDevicesRequest.h:
2899
2900         * Modules/mediastream/UserMediaClient.h:
2901         * Modules/mediastream/UserMediaController.h:
2902         (WebCore::UserMediaController::enumerateMediaDevices): New.
2903         (WebCore::UserMediaController::cancelMediaDevicesEnumerationRequest): New.
2904         (WebCore::UserMediaController::checkUserMediaPermission): Deleted.
2905         (WebCore::UserMediaController::cancelUserMediaPermissionCheck): Deleted.
2906
2907         * Modules/mediastream/UserMediaPermissionCheck.h: Deleted.
2908         * Modules/mediastream/UserMediaPermissionCheck.cpp: Deleted.
2909
2910         * Modules/mediastream/UserMediaRequest.cpp:
2911         (WebCore::UserMediaRequest::UserMediaRequest):
2912         (WebCore::UserMediaRequest::start):
2913         (WebCore::UserMediaRequest::allow):
2914         (WebCore::UserMediaRequest::deny):
2915         (WebCore::UserMediaRequest::constraintsValidated): Deleted.
2916         (WebCore::UserMediaRequest::userMediaAccessGranted): Deleted.
2917         (WebCore::UserMediaRequest::userMediaAccessDenied): Deleted.
2918         (WebCore::UserMediaRequest::constraintsInvalid): Deleted.
2919         (WebCore::UserMediaRequest::didCreateStream): Deleted.
2920         (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Deleted.
2921         (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Deleted.
2922         * Modules/mediastream/UserMediaRequest.h:
2923
2924         * WebCore.xcodeproj/project.pbxproj: Add MediaDevicesEnumerationRequest.*.
2925
2926         * platform/mediastream/CaptureDevice.h:
2927         (WebCore::CaptureDevice::CaptureDevice):
2928         (WebCore::CaptureDevice::setPersistentId): Add setter for argument decoder.
2929         (WebCore::CaptureDevice::setLabel): Ditto.
2930         (WebCore::CaptureDevice::setGroupId): Ditto.
2931         (WebCore::CaptureDevice::setKind): Ditto.
2932
2933         * platform/mediastream/CaptureDeviceManager.h: Remove unnecessary include.
2934
2935         * platform/mediastream/MediaConstraints.h:
2936         (WebCore::MediaConstraint::encode): New.
2937         (WebCore::MediaConstraint::decode): Ditto.
2938         (WebCore::NumericConstraint::encode): Ditto.
2939         (WebCore::NumericConstraint::decode): Ditto.
2940
2941         * platform/mediastream/MediaStreamCreationClient.h: Deleted.
2942
2943         * platform/mediastream/RealtimeMediaSourceCenter.h: Use completion handlers instead of client interface.
2944
2945         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2946         (WebCore::AVCaptureDeviceManager::refreshCaptureDeviceList): Drive-by fix: don't initialize
2947         group id, we don't support it.
2948
2949         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
2950         (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints): Update for interface change.
2951         (WebCore::RealtimeMediaSourceCenterMac::createMediaStream): Ditto.
2952         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
2953
2954         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
2955         (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints): Ditto.
2956         (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Ditto.
2957         (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable): Ditto.
2958         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
2959
2960         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
2961         (WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints): Ditto.
2962         (WebCore::MockRealtimeMediaSourceCenter::createMediaStream): Ditto.
2963         * platform/mock/MockRealtimeMediaSourceCenter.h:
2964
2965 2016-10-18  Zan Dobersek  <zdobersek@igalia.com>
2966
2967         [WebIDL] Support BufferSource
2968         https://bugs.webkit.org/show_bug.cgi?id=163541
2969
2970         Reviewed by Youenn Fablet.
2971
2972         Add support for the BufferSource typedef in WebIDL. The implementation
2973         adds the necessary handling for this type in the generator scripts and
2974         the specialization of the Converter<> template for the IDLBufferSource
2975         struct that enables exposing ArrayBuffer or ArrayBufferView objects by
2976         having WebCore::BufferSource objects pointing to their data.
2977
2978         The SourceBuffer interface in the MSE module has the appendBuffer()
2979         operation modified to accept a BufferSource parameter, instead of
2980         overloading it for ArrayBuffer and ArrayBufferView parameters.
2981
2982         The bindings generator tests cover BufferSource as both an operation
2983         parameter and as a dictionary member.
2984
2985         * Modules/mediasource/SourceBuffer.cpp:
2986         (WebCore::SourceBuffer::appendBuffer):
2987         (WebCore::SourceBuffer::appendBufferInternal):
2988         * Modules/mediasource/SourceBuffer.h:
2989         * Modules/mediasource/SourceBuffer.idl:
2990         * WebCore.xcodeproj/project.pbxproj:
2991         * bindings/generic/IDLTypes.h:
2992         * bindings/js/BufferSource.h: Added.
2993         * bindings/js/JSDOMConvert.h:
2994         (WebCore::Converter<IDLBufferSource>::convert):
2995         * bindings/scripts/CodeGenerator.pm:
2996         (SkipIncludeHeader):
2997         (IsWrapperType):
2998         * bindings/scripts/CodeGeneratorJS.pm:
2999         (AddClassForwardIfNeeded):
3000         (GetBaseIDLType):
3001         (IsHandledByDOMConvert):
3002         * bindings/scripts/test/JS/JSTestObj.cpp:
3003         (WebCore::convertDictionary<TestObj::Dictionary>):
3004         (WebCore::jsTestObjPrototypeFunctionBufferSourceParameter):
3005         (WebCore::jsTestObjPrototypeFunctionBufferSourceParameterCaller):
3006         * bindings/scripts/test/TestObj.idl:
3007
3008 2016-10-18  Javier Fernandez  <jfernandez@igalia.com>
3009
3010         [css-grid] Different width of grid container between initial load and refresh
3011         https://bugs.webkit.org/show_bug.cgi?id=163535
3012
3013         Reviewed by Manuel Rego Casasnovas.
3014
3015         Grid's layout logic manages two different override sizes; one it's
3016         designed to implement the grid item's stretching behavior, identified
3017         with the concept of 'overrideContentLogicalSize'; there is another
3018         override size, known as overrideContainingBlockContentLogicalSize,
3019         used to implement the Grid Area abstraction, which will behave as
3020         the actual containing block of any grid item.
3021
3022         During grid's layout logic these override sizes are set according
3023         to the CSS style rules. This affects how the grid container and its
3024         children are going to be sized during layout. Grid Tracks sizing
3025         algorithm depends on these override sizes.
3026
3027         In order to ensure that the tracks sizing algorithm produces the
3028         same results when it's run consecutively several times, we need to
3029         clear these override sizes and perform a layout of the affected grid
3030         items. Otherwise, the affected items will return sizing values which
3031         depend on the override values set in the previous layout, which in
3032         some cases, like orthogonal flows, may change through different runs
3033         of the sizing algorithm.
3034
3035         Test: fast/css-grid-layout/repeating-layout-must-produce-the-same-results.html
3036
3037         * rendering/RenderGrid.cpp:
3038         (WebCore::RenderGrid::layoutBlock):
3039
3040 2016-10-18  Youenn Fablet  <youenn@apple.com>
3041
3042         CachedResourceLoader should not need to remove fragment identifier
3043         https://bugs.webkit.org/show_bug.cgi?id=163015
3044
3045         Reviewed by Darin Adler.
3046
3047         No expected change for non-window port.
3048         For window port, CachedResourceLoader will strip the fragment identifier of the URL passed to subresourceForURL
3049         before querying the memory cache.
3050
3051         Removing the fragment identifier from the request stored in CachedResourceRequest.
3052         The fragment identifier is stored in a separate field.
3053
3054         This allows CachedResourceLoader to not care about fragment identifier.
3055         CachedResource can then get access to it.
3056
3057         * loader/cache/CachedResource.cpp:
3058         (WebCore::CachedResource::CachedResource):
3059         (WebCore::CachedResource::finishRequestInitialization): Deleted.
3060         * loader/cache/CachedResource.h:
3061         * loader/cache/CachedResourceLoader.cpp:
3062         (WebCore::CachedResourceLoader::cachedResource):
3063         Updated the method taking a const String& to strip the fragment identifier if needed.
3064         Updated the method taking a const URL& to assert if the fragment identifier is present.
3065         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
3066         (WebCore::CachedResourceLoader::requestResource):
3067         * loader/cache/CachedResourceRequest.cpp:
3068         (WebCore::CachedResourceRequest::CachedResourceRequest):
3069         (WebCore::CachedResourceRequest::splitFragmentIdentifierFromRequestURL):
3070         * loader/cache/CachedResourceRequest.h:
3071         (WebCore::CachedResourceRequest::releaseFragmentIdentifier):
3072         (WebCore::CachedResourceRequest::clearFragmentIdentifier):
3073         * loader/cache/MemoryCache.cpp:
3074         (WebCore::MemoryCache::shouldRemoveFragmentIdentifier):
3075         (WebCore::MemoryCache::removeFragmentIdentifierIfNeeded):
3076         (WebCore::MemoryCache::revalidationSucceeded):
3077         (WebCore::MemoryCache::resourceForRequest):
3078         * loader/cache/MemoryCache.h:
3079
3080 2016-10-18  Antti Koivisto  <antti@apple.com>
3081
3082         Rename setNeedsStyleRecalc to invalidateStyle
3083         https://bugs.webkit.org/show_bug.cgi?id=163542
3084
3085         Reviewed by Darin Adler.
3086
3087         Also rename StyleChangeType enum and some related functions for clarity. For example
3088
3089             element.setNeedsStyleRecalc(SyntheticStyleChange);
3090
3091         becomes
3092
3093             element.invalidateStyleAndLayerComposition();
3094
3095         * WebCore.xcodeproj/project.pbxproj:
3096         * css/StyleInvalidationAnalysis.cpp:
3097         (WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):
3098         * dom/Document.cpp:
3099         (WebCore::Document::recalcStyle):
3100         (WebCore::Document::updateViewportUnitsOnResize):
3101         (WebCore::Document::setCSSTarget):
3102         (WebCore::unwrapFullScreenRenderer):
3103         (WebCore::Document::setAnimatingFullScreen):
3104         * dom/Element.cpp:
3105         (WebCore::Element::setActive):
3106         (WebCore::Element::setFocus):
3107         (WebCore::Element::setHovered):
3108         (WebCore::Element::attributeChanged):
3109         (WebCore::Element::invalidateStyle):
3110         (WebCore::Element::invalidateStyleAndLayerComposition):
3111         (WebCore::Element::invalidateStyleForSubtree):
3112         (WebCore::Element::invalidateStyleAndRenderersForSubtree):
3113
3114             Move public invalidation functions to Element tightening typing.
3115             Use separate functions instead of enum values.
3116             This way the call sites look nicer and only useful combinations are exposed.
3117
3118         (WebCore::Element::addShadowRoot):
3119         (WebCore::checkForEmptyStyleChange):
3120         (WebCore::checkForSiblingStyleChanges):
3121         (WebCore::Element::needsStyleInvalidation):
3122         (WebCore::Element::setContainsFullScreenElement):
3123         * dom/Element.h:
3124         (WebCore::Element::setHasFocusWithin):
3125         * dom/Node.cpp:
3126         (WebCore::computeEditabilityFromComputedStyle):
3127         (WebCore::Node::adjustStyleValidity):
3128
3129             Update validity and mode separately. There was a potential bug here where
3130             SyntheticStyleChange could overwrite FullStyleChange (no known repro).
3131
3132         (WebCore::Node::updateAncestorsForStyleRecalc):
3133         (WebCore::Node::invalidateStyle):
3134         (WebCore::Node::insertedInto):
3135         (WebCore::Node::setNeedsStyleRecalc): Deleted.
3136         * dom/Node.h:
3137         (WebCore::Node::needsStyleRecalc):
3138         (WebCore::Node::styleValidity):
3139         (WebCore::Node::styleResolutionShouldRecompositeLayer):
3140         (WebCore::Node::setHasValidStyle):
3141         (WebCore::Node::styleChangeType): Deleted.
3142         (WebCore::Node::clearNeedsStyleRecalc): Deleted.
3143         (WebCore::Node::setStyleChange): Deleted.
3144         * dom/RadioButtonGroups.cpp:
3145         (WebCore::RadioButtonGroup::remove):
3146         (WebCore::RadioButtonGroup::setNeedsStyleRecalcForAllButtons):
3147         * dom/ShadowRoot.cpp:
3148         (WebCore::ShadowRoot::setResetStyleInheritance):
3149         * dom/SlotAssignment.cpp:
3150         (WebCore::SlotAssignment::addSlotElementByName):
3151         (WebCore::SlotAssignment::removeSlotElementByName):
3152         (WebCore::SlotAssignment::didChangeSlot):
3153         * dom/StyledElement.cpp:
3154         (WebCore::StyledElement::attributeChanged):
3155         (WebCore::StyledElement::styleAttributeChanged):
3156         (WebCore::StyledElement::invalidateStyleAttribute):
3157         * dom/Text.cpp:
3158         (WebCore::Text::updateRendererAfterContentChange):
3159         * dom/VisitedLinkState.cpp:
3160         (WebCore::VisitedLinkState::invalidateStyleForAllLinks):
3161         (WebCore::VisitedLinkState::invalidateStyleForLink):
3162         * editing/FrameSelection.cpp:
3163         (WebCore::FrameSelection::focusedOrActiveStateChanged):
3164         * html/BaseDateAndTimeInputType.cpp:
3165         (WebCore::BaseDateAndTimeInputType::minOrMaxAttributeChanged):
3166         * html/FileInputType.cpp:
3167         (WebCore::FileInputType::setValue):
3168         * html/HTMLAnchorElement.cpp:
3169         (WebCore::HTMLAnchorElement::parseAttribute):
3170         * html/HTMLBodyElement.cpp:
3171         (WebCore::HTMLBodyElement::parseAttribute):
3172         * html/HTMLCanvasElement.cpp:
3173         (WebCore::HTMLCanvasElement::getContext):
3174         (WebCore::HTMLCanvasElement::createImageBuffer):
3175         * html/HTMLElement.cpp:
3176         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
3177         (WebCore::HTMLElement::calculateAndAdjustDirectionality):
3178         * html/HTMLFieldSetElement.cpp:
3179         (WebCore::HTMLFieldSetElement::addInvalidDescendant):
3180         (WebCore::HTMLFieldSetElement::removeInvalidDescendant):
3181         * html/HTMLFormControlElement.cpp:
3182         (WebCore::HTMLFormControlElement::disabledStateChanged):
3183         (WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
3184         (WebCore::HTMLFormControlElement::requiredAttributeChanged):
3185         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
3186         (WebCore::HTMLFormControlElement::updateValidity):
3187         * html/HTMLFormElement.cpp:
3188         (WebCore::HTMLFormElement::registerFormElement):
3189         (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
3190         (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
3191         (WebCore::HTMLFormElement::resetDefaultButton):
3192         * html/HTMLFrameElementBase.cpp:
3193         (WebCore::HTMLFrameElementBase::finishedInsertingSubtree):
3194         * html/HTMLFrameOwnerElement.cpp:
3195         (WebCore::HTMLFrameOwnerElement::scheduleinvalidateStyleAndLayerComposition):
3196         (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Deleted.
3197         * html/HTMLFrameOwnerElement.h:
3198         * html/HTMLFrameSetElement.cpp:
3199         (WebCore::HTMLFrameSetElement::parseAttribute):
3200         (WebCore::HTMLFrameSetElement::willRecalcStyle):
3201         * html/HTMLInputElement.cpp:
3202         (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
3203         (WebCore::HTMLInputElement::parseAttribute):
3204         (WebCore::HTMLInputElement::setChecked):
3205         (WebCore::HTMLInputElement::setIndeterminate):
3206         (WebCore::HTMLInputElement::setAutoFilled):
3207         (WebCore::HTMLInputElement::maxLengthAttributeChanged):
3208         (WebCore::HTMLInputElement::minLengthAttributeChanged):
3209         * html/HTMLLinkElement.cpp:
3210         (WebCore::HTMLLinkElement::parseAttribute):
3211         * html/HTMLMediaElement.cpp:
3212         (WebCore::HTMLMediaElement::mediaPlayerRenderingModeChanged):
3213         (WebCore::HTMLMediaElement::setVideoFullscreenLayer):
3214         * html/HTMLObjectElement.cpp:
3215         (WebCore::HTMLObjectElement::parseAttribute):
3216         (WebCore::HTMLObjectElement::childrenChanged):
3217         (WebCore::HTMLObjectElement::renderFallbackContent):
3218         * html/HTMLOptGroupElement.cpp:
3219         (WebCore::HTMLOptGroupElement::parseAttribute):
3220         * html/HTMLOptionElement.cpp:
3221         (WebCore::HTMLOptionElement::parseAttribute):
3222         (WebCore::HTMLOptionElement::setSelectedState):
3223         * html/HTMLPlugInElement.cpp:
3224         (WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot):
3225         * html/HTMLPlugInImageElement.cpp:
3226         (WebCore::HTMLPlugInImageElement::setDisplayState):
3227         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
3228         (WebCore::HTMLPlugInImageElement::finishParsingChildren):
3229         (WebCore::HTMLPlugInImageElement::resumeFromDocumentSuspension):
3230         (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
3231         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
3232         * html/HTMLProgressElement.cpp:
3233         (WebCore::HTMLProgressElement::didElementStateChange):
3234         * html/HTMLSelectElement.cpp:
3235         (WebCore::HTMLSelectElement::parseAttribute):
3236         (WebCore::HTMLSelectElement::setRecalcListItems):
3237         (WebCore::HTMLSelectElement::parseMultipleAttribute):
3238         (WebCore::HTMLSelectElement::reset):
3239         * html/HTMLTableElement.cpp:
3240         (WebCore::isTableCellAncestor):
3241         (WebCore::setTableCellsChanged):
3242         (WebCore::HTMLTableElement::parseAttribute):
3243         * html/HTMLTextAreaElement.cpp:
3244         (WebCore::HTMLTextAreaElement::setValueCommon):
3245         * html/HTMLTextFormControlElement.cpp:
3246         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
3247         * html/InputType.cpp:
3248         (WebCore::InputType::setValue):
3249         * html/NumberInputType.cpp:
3250         (WebCore::NumberInputType::minOrMaxAttributeChanged):
3251         * html/TextFieldInputType.cpp:
3252         (WebCore::TextFieldInputType::subtreeHasChanged):
3253         * mathml/MathMLElement.cpp:
3254         (WebCore::MathMLElement::parseAttribute):
3255         * mathml/MathMLSelectElement.cpp:
3256         (WebCore::MathMLSelectElement::updateSelectedChild):
3257         * page/animation/AnimationBase.cpp:
3258         (WebCore::AnimationBase::setNeedsStyleRecalc):
3259         * page/animation/AnimationController.cpp:
3260         (WebCore::AnimationControllerPrivate::clear):
3261         (WebCore::AnimationControllerPrivate::updateAnimations):
3262         (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
3263         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
3264         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
3265         (WebCore::AnimationController::cancelAnimations):
3266         * rendering/RenderImage.cpp:
3267         (WebCore::RenderImage::imageChanged):
3268         * rendering/RenderLayer.cpp:
3269         (WebCore::RenderLayer::calculateClipRects):
3270         * rendering/RenderLayerCompositor.cpp:
3271         (WebCore::RenderLayerCompositor::attachRootLayer):
3272         (WebCore::RenderLayerCompositor::detachRootLayer):
3273         (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
3274         * rendering/RenderObject.cpp:
3275         (WebCore::RenderObject::updateDragState):
3276         * rendering/svg/SVGResourcesCache.cpp:
3277         (WebCore::SVGResourcesCache::clientStyleChanged):
3278         * style/AttributeChangeInvalidation.cpp:
3279         (WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
3280         * style/ClassChangeInvalidation.cpp:
3281         (WebCore::Style::ClassChangeInvalidation::invalidateStyle):
3282         * style/IdChangeInvalidation.cpp:
3283         (WebCore::Style::IdChangeInvalidation::invalidateStyle):
3284         * style/RenderTreeUpdater.cpp:
3285         (WebCore::RenderTreeUpdater::updateElementRenderer):
3286         * style/StyleScope.cpp:
3287         (WebCore::Style::Scope::updateActiveStyleSheets):
3288         * style/StyleTreeResolver.cpp:
3289         (WebCore::Style::resetStyleForNonRenderedDescendants):
3290         (WebCore::Style::TreeResolver::resolveElement):
3291         (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
3292         (WebCore::Style::TreeResolver::popParent):
3293         (WebCore::Style::clearNeedsStyleResolution):
3294         (WebCore::Style::TreeResolver::resolveComposedTree):
3295         * style/StyleUpdate.h:
3296         * style/StyleValidity.h: Added.
3297
3298             StyleChangeType enum splits into Style::Validity and Style::InvalidationMode.
3299             Move to a file of its own.
3300
3301         * svg/SVGAElement.cpp:
3302         (WebCore::SVGAElement::svgAttributeChanged):
3303         * svg/SVGAnimateElementBase.cpp:
3304         (WebCore::applyCSSPropertyToTarget):
3305         (WebCore::removeCSSPropertyFromTarget):
3306         * svg/SVGElement.cpp:
3307         (WebCore::SVGElement::willRecalcStyle):
3308         * svg/SVGElement.h:
3309         (WebCore::SVGElement::invalidateSVGPresentationAttributeStyle):
3310         * svg/SVGTests.cpp:
3311         (WebCore::SVGTests::handleAttributeChange):
3312         * svg/SVGUseElement.cpp:
3313         (WebCore::SVGUseElement::invalidateShadowTree):
3314         * testing/Internals.cpp:
3315         (WebCore::styleValidityToToString):
3316         (WebCore::Internals::styleChangeType):
3317         (WebCore::styleChangeTypeToString): Deleted.
3318
3319 2016-10-17  Sergio Villar Senin  <svillar@igalia.com>
3320
3321         [css-grid] Constrain by min|max-height on auto repeat computation
3322         https://bugs.webkit.org/show_bug.cgi?id=163540
3323
3324         Reviewed by Darin Adler.
3325
3326         The max-height (if definite) is used to compute the number of auto repeat rows whenever the
3327         height is indefinite. We were using the min-height only in case both values were indefinite.
3328
3329         Although not explicitly mentioned by grid specs, it's reasonable to assume that
3330         the min-height trumps the used value of height/max-height like it always does, per CSS
3331         2.2. Note that the number of rows still needs to fit within that size even if using
3332         min-height, because we're just using min-height to compute the used value of the height
3333         property. If both height and max-height are indefinite we keep doing the same, i.e., compute
3334         the minimum number of rows that fulfill min-height (if definite).
3335
3336         * rendering/RenderGrid.cpp:
3337         (WebCore::RenderGrid::computeAutoRepeatTracksCount):
3338
3339 2016-10-17  Yusuke Suzuki  <utatane.tea@gmail.com>
3340
3341         [DOMJIT] Use NativeCallFrameTracer for operations used for DOMJIT slow calls
3342         https://bugs.webkit.org/show_bug.cgi?id=163586
3343
3344         Reviewed by Saam Barati.
3345
3346         * domjit/JSNodeDOMJIT.cpp:
3347         (WebCore::toWrapperSlow):
3348
3349 2016-10-18  Ryuan Choi  <ryuan.choi@navercorp.com>
3350
3351         [EFL] Build break since r207442
3352         https://bugs.webkit.org/show_bug.cgi?id=163587
3353
3354         Unreviewed.
3355
3356         Since r207442, setRGB is moved to private.
3357
3358         * rendering/RenderThemeEfl.cpp:
3359         (WebCore::fillColorsFromEdjeClass):
3360
3361 2016-10-17  Dean Jackson  <dino@apple.com>
3362
3363         Remove dependency cycle with UIKit
3364         https://bugs.webkit.org/show_bug.cgi?id=163577
3365         <rdar://problem/28786160>
3366
3367         Reviewed by Tim Horton.
3368
3369         Soft link against UIKit.
3370
3371         * Configurations/WebCoreTestSupport.xcconfig:
3372         * testing/Internals.mm:
3373
3374 2016-10-17  Dean Jackson  <dino@apple.com>
3375
3376         Allow creation of ExtendedColors and make Color immutable
3377         https://bugs.webkit.org/show_bug.cgi?id=163557
3378         <rdar://problem/28805360>
3379
3380         Reviewed by Darin Adler and Dave Hyatt.
3381
3382         1. Support the creation of ExtendedColor objects via the
3383         Color class.
3384
3385         2. Fix the remaining few places where a Color object is
3386         modified after creation, instead creating a new Color.
3387         Move all the mutation methods into the private section,
3388         making Color now immutable.
3389
3390         Changes to Color are covered by existing tests. Changes
3391         to ExtendedColor are covered by the ExtendedColor API test.
3392
3393         * css/parser/CSSParser.cpp:
3394         (WebCore::CSSParser::fastParseColor): Return a new named Color.
3395
3396         * dom/Document.cpp:
3397         (WebCore::Document::resetActiveLinkColor): Set to be the named "red" color.
3398
3399         * html/HTMLElement.cpp:
3400         (WebCore::HTMLElement::addHTMLColorToStyle): Use the string-based constructor
3401         where possible.
3402
3403         * page/CaptionUserPreferencesMediaAF.cpp:
3404         (WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS): No need to
3405         use the string "black" here - we have a constant value.
3406
3407         * platform/graphics/cairo/GraphicsContextCairo.cpp: Don't use setRGB.
3408
3409         * platform/graphics/Color.cpp:
3410         (WebCore::findNamedColor): Move this up in the file.
3411         (WebCore::Color::Color): Copy in the code from setNamedColor. Also
3412         add a constructor for ExtendedColor.
3413         (WebCore::Color::serialized): Call ExtendedColor's serializer if necessary.
3414         (WebCore::Color::cssText): Ditto.
3415         (WebCore::Color::setNamedColor): Deleted.
3416         (WebCore::Color::tagAsExtended): Deleted.
3417
3418         * platform/graphics/Color.h: Add a new constructor.
3419         (WebCore::Color::setRGB): Move to private.
3420
3421         * platform/graphics/ExtendedColor.cpp:
3422         (WebCore::ExtendedColor::cssText): Implement serializer.
3423         * platform/graphics/ExtendedColor.h:
3424
3425         * rendering/style/RenderStyle.cpp:
3426         (WebCore::RenderStyle::colorIncludingFallback): Construct a new Color rather than changing an existing object.
3427
3428 2016-10-17  Simon Fraser  <simon.fraser@apple.com>
3429
3430         Implement DOMRect/DOMRectReadOnly
3431         https://bugs.webkit.org/show_bug.cgi?id=163464
3432
3433         Reviewed by Darin Adler.
3434         
3435         Implement the DOMRectInit/DOMRectReadOnly/DOMRect interfaces specified in
3436         https://dev.w3.org/fxtf/geometry/
3437         
3438         DOMRects allow negative height/width and require double storage, so we can't just
3439         use FloatRect for storage. They also require handling of NaN and Infinity.
3440         
3441         To have the left/right/top/bottom accessors follow IEEE NaN rules, we need to use
3442         custom min/max functions that return NaN if either argument is NaN, so add 
3443         nanPropagatingMin/nanPropagatingMax helpers to MathExtras.h.
3444
3445         Test: fast/dom/domrect.html
3446
3447         * CMakeLists.txt:
3448  &n