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