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