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