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