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