Remove flex and bison build dependencies; commit generated XPath parser
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-12-15  Alex Christensen  <achristensen@webkit.org>
2
3         Remove flex and bison build dependencies; commit generated XPath parser
4         https://bugs.webkit.org/show_bug.cgi?id=165783
5
6         Reviewed by Brent Fulgham.
7
8         flex and bison are annoying to install and use, especially on Windows.
9         Since only XPathGrammar uses them and that's not actively developed, let's just check in the one generated file
10         and make building WebKit easier forever!
11
12         * CMakeLists.txt:
13         * DerivedSources.make:
14         * WebCore.xcodeproj/project.pbxproj:
15         * css/makegrammar.pl: Removed.
16         * xml/XPathGrammar.cpp: Added.
17         (xpathyylex):
18         (xpathyyerror):
19         (yysyntax_error):
20         * xml/XPathGrammar.h: Added.
21         * xml/XPathGrammar.y: Rename TEXT to TEXT_ to fix a build error on Windows.  TEXT is already defined.
22
23 2016-12-15  Brady Eidson  <beidson@apple.com>
24
25         Enhance some of the logging statements just added for IndexedDB Operation scheduling.
26
27         Rubberstamped by Tim Horton.
28
29         No new tests (No behavior change).
30
31         * Modules/indexeddb/IDBTransaction.cpp:
32         (WebCore::IDBTransaction::iterateCursor):
33         (WebCore::IDBTransaction::requestGetRecord):
34         (WebCore::IDBTransaction::requestIndexRecord):
35         (WebCore::IDBTransaction::requestPutOrAdd):
36         
37         * Modules/indexeddb/shared/IDBCursorInfo.cpp:
38         (WebCore::IDBCursorInfo::loggingString):
39         
40         * Modules/indexeddb/shared/IDBIterateCursorData.cpp:
41         (WebCore::IDBIterateCursorData::loggingString):
42
43 2016-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
44
45         [Cocoa] Implement font-synthesis: small-caps
46         https://bugs.webkit.org/show_bug.cgi?id=165892
47
48         Reviewed by David Hyatt.
49
50         The CSS Fonts level 4 spec adds a new value to the "font-synthesis"
51         property which controls whether or not small-caps is allowed to be
52         synthesized. Luckily, we already have an implementation of this
53         straightforward, so the implementation is quite simple.
54
55         Tests: css3/font-synthesis-small-caps.html
56                fast/text/font-synthesis-parsing.html
57
58         * css/CSSComputedStyleDeclaration.cpp:
59         (WebCore::fontSynthesisFromStyle):
60         * css/StyleBuilderConverter.h:
61         (WebCore::StyleBuilderConverter::convertFontSynthesis):
62         * css/parser/CSSPropertyParser.cpp:
63         (WebCore::consumeFontSynthesis):
64         * platform/graphics/FontCache.h:
65         (WebCore::FontDescriptionKey::makeFlagsKey):
66         * platform/graphics/FontDescription.cpp:
67         (WebCore::FontDescription::FontDescription):
68         * platform/graphics/FontDescription.h:
69         (WebCore::FontCascadeDescription::initialFontSynthesis):
70         * platform/graphics/mac/ComplexTextController.cpp:
71         (WebCore::shouldSynthesize):
72         (WebCore::ComplexTextController::collectComplexTextRuns):
73
74 2016-12-15  Brady Eidson  <beidson@apple.com>
75
76         Add a new Logging Channel for IndexedDB Operation scheduling.
77         https://bugs.webkit.org/show_bug.cgi?id=165912
78
79         Reviewed by Alex Christensen.
80
81         No new tests (No behavior change).
82
83         * Modules/indexeddb/IDBDatabase.cpp:
84         (WebCore::IDBDatabase::transaction):
85         
86         * Modules/indexeddb/IDBFactory.cpp:
87         (WebCore::IDBFactory::openInternal):
88         (WebCore::IDBFactory::deleteDatabase):
89         
90         * Modules/indexeddb/IDBTransaction.cpp:
91         (WebCore::IDBTransaction::internalAbort):
92         (WebCore::IDBTransaction::commit):
93         (WebCore::IDBTransaction::createObjectStore):
94         (WebCore::IDBTransaction::renameObjectStore):
95         (WebCore::IDBTransaction::createIndex):
96         (WebCore::IDBTransaction::renameIndex):
97         (WebCore::IDBTransaction::doRequestOpenCursor):
98         (WebCore::IDBTransaction::iterateCursor):
99         (WebCore::IDBTransaction::requestGetAllObjectStoreRecords):
100         (WebCore::IDBTransaction::requestGetAllIndexRecords):
101         (WebCore::IDBTransaction::requestGetRecord):
102         (WebCore::IDBTransaction::requestIndexRecord):
103         (WebCore::IDBTransaction::requestCount):
104         (WebCore::IDBTransaction::requestDeleteRecord):
105         (WebCore::IDBTransaction::requestClearObjectStore):
106         (WebCore::IDBTransaction::requestPutOrAdd):
107         (WebCore::IDBTransaction::deleteObjectStore):
108         (WebCore::IDBTransaction::deleteIndex):
109         
110         * Modules/indexeddb/shared/IDBCursorInfo.cpp:
111         (WebCore::IDBCursorInfo::loggingString):
112         * Modules/indexeddb/shared/IDBCursorInfo.h:
113         
114         * Modules/indexeddb/shared/IDBGetAllRecordsData.cpp:
115         (WebCore::IDBGetAllRecordsData::loggingString):
116         * Modules/indexeddb/shared/IDBGetAllRecordsData.h:
117         
118         * Modules/indexeddb/shared/IDBGetRecordData.cpp:
119         (WebCore::IDBGetRecordData::loggingString):
120         * Modules/indexeddb/shared/IDBGetRecordData.h:
121         
122         * Modules/indexeddb/shared/IDBIndexInfo.cpp:
123         (WebCore::IDBIndexInfo::condensedLoggingString):
124         * Modules/indexeddb/shared/IDBIndexInfo.h:
125         
126         * Modules/indexeddb/shared/IDBIterateCursorData.cpp:
127         (WebCore::IDBIterateCursorData::loggingString):
128         * Modules/indexeddb/shared/IDBIterateCursorData.h:
129         
130         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
131         (WebCore::IDBObjectStoreInfo::condensedLoggingString):
132         * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
133         
134         * platform/Logging.h:
135
136 2016-12-15  Konstantin Tokarev  <annulen@yandex.ru>
137
138         Added missing override and final specifiers
139         https://bugs.webkit.org/show_bug.cgi?id=165903
140
141         Reviewed by Darin Adler.
142
143         No new tests needed.
144
145         * Modules/mediastream/OverconstrainedErrorEvent.h:
146         * bindings/js/JSCallbackData.h:
147         * bindings/js/JSCustomXPathNSResolver.h:
148         * bindings/js/JSErrorHandler.h:
149         * css/StyleRuleImport.h:
150         * dom/SecurityPolicyViolationEvent.h:
151         * editing/CreateLinkCommand.h:
152         * editing/DeleteSelectionCommand.h:
153         * editing/DictationCommand.h:
154         * editing/Editor.cpp:
155         * editing/FormatBlockCommand.h:
156         * editing/IndentOutdentCommand.h:
157         * editing/InsertLineBreakCommand.h:
158         * editing/InsertParagraphSeparatorCommand.h:
159         * editing/ModifySelectionListLevel.h:
160         * editing/MoveSelectionCommand.h:
161         * editing/RemoveFormatCommand.h:
162         * editing/RemoveNodePreservingChildrenCommand.h:
163         * editing/ReplaceSelectionCommand.h:
164         * editing/SimplifyMarkupCommand.h:
165         * editing/SplitTextNodeContainingElementCommand.h:
166         * editing/UnlinkCommand.h:
167         * fileapi/FileReaderLoader.h:
168         * html/canvas/ANGLEInstancedArrays.h:
169         * html/canvas/WebGLVertexArrayObjectBase.h:
170         * loader/SinkDocument.h:
171         * loader/archive/mhtml/MHTMLArchive.h:
172         * page/animation/CSSPropertyAnimation.cpp:
173         * platform/audio/MultiChannelResampler.cpp:
174         * platform/audio/SincResampler.cpp:
175         * platform/audio/gstreamer/AudioDestinationGStreamer.h:
176         * platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
177         * platform/graphics/TextTrackRepresentation.cpp:
178         * platform/graphics/displaylists/DisplayListItems.h:
179         * platform/graphics/filters/FEBlend.h:
180         * platform/graphics/filters/FEColorMatrix.h:
181         * platform/graphics/filters/FEComponentTransfer.h:
182         * platform/graphics/filters/FEConvolveMatrix.h:
183         * platform/graphics/filters/FEDiffuseLighting.h:
184         * platform/graphics/filters/FEDropShadow.h:
185         * platform/graphics/filters/FEGaussianBlur.h:
186         * platform/graphics/filters/FELighting.h:
187         * platform/graphics/filters/FEMerge.h:
188         * platform/graphics/filters/FEMorphology.h:
189         * platform/graphics/filters/FEOffset.h:
190         * platform/graphics/filters/FESpecularLighting.h:
191         * platform/graphics/filters/FETile.h:
192         * platform/graphics/filters/FETurbulence.h:
193         * platform/graphics/filters/SourceAlpha.h:
194         * platform/graphics/filters/SourceGraphic.h:
195         * platform/graphics/opengl/Extensions3DOpenGL.h:
196         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
197         * platform/graphics/texmap/TextureMapperBackingStore.h:
198         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
199         * platform/mock/GeolocationClientMock.h:
200         * platform/text/TextCodecICU.h:
201         * platform/text/TextCodecLatin1.h:
202         * platform/text/TextCodecUTF16.h:
203         * platform/text/TextCodecUTF8.h:
204         * platform/text/TextCodecUserDefined.h:
205         * rendering/RenderFullScreen.cpp:
206         * storage/StorageEvent.h:
207         * svg/properties/SVGListProperty.h:
208         * svg/properties/SVGStaticListPropertyTearOff.h:
209         * svg/properties/SVGStaticPropertyTearOff.h:
210         * xml/NativeXPathNSResolver.h:
211         * xml/XMLHttpRequestProgressEvent.h:
212         * xml/XMLHttpRequestProgressEventThrottle.h:
213         * xml/XPathVariableReference.h:
214         * xml/XSLImportRule.h:
215
216 2016-12-15  Chris Dumez  <cdumez@apple.com>
217
218         Inline Document::existingAXObjectCache()
219         https://bugs.webkit.org/show_bug.cgi?id=165906
220
221         Reviewed by Darin Adler.
222
223         Inline Document::existingAXObjectCache() to avoid paying function call
224         cost in the common case where AX is disabled.
225
226         * dom/Document.cpp:
227         (WebCore::Document::existingAXObjectCacheSlow):
228         (WebCore::Document::existingAXObjectCache): Deleted.
229         * dom/Document.h:
230         (WebCore::Document::existingAXObjectCache):
231
232 2016-12-15  Ryan Haddad  <ryanhaddad@apple.com>
233
234         Rebaseline bindings tests after r209864.
235
236         Unreviewed test gardening.
237
238         * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
239         (WebCore::convertDictionary<DictionaryImplName>):
240
241 2016-12-15  Andreas Kling  <akling@apple.com>
242
243         Always clear RenderLayer backing stores when going into page cache.
244         <https://webkit.org/b/165901>
245
246         Reviewed by Simon Fraser.
247
248         We were already doing this for the iOS and GTK+ ports, let's do it everywhere
249         for consistency, and a bit of memory usage improvement.
250
251         This patch just removes the setting and always calls FrameView::clearBackingStores()
252         when there is composited content going into page cache.
253
254         * history/CachedFrame.cpp:
255         (WebCore::CachedFrame::CachedFrame):
256         * history/PageCache.h:
257         (WebCore::PageCache::shouldClearBackingStores): Deleted.
258         (WebCore::PageCache::setShouldClearBackingStores): Deleted.
259
260 2016-12-15  Darin Adler  <darin@apple.com>
261
262         Remove custom binding for MediaDevices
263         https://bugs.webkit.org/show_bug.cgi?id=165894
264
265         Reviewed by Eric Carlson.
266
267         Removes the explicit code to parse the MediaStreamConstraints and
268         MediaTrackConstraints. Next step could be to change the internal
269         code to use the structs from bindings directly so we don't need
270         code to convert to an internal format.
271
272         * CMakeLists.txt: Added MediaTrackConstraints.idl and MediaTrackConstraints.cpp,
273         removed JSMediaDevicesCustom.cpp.
274
275         * DerivedSources.make: Added MediaTrackConstraints.idl.
276         Also sorted list of IDL files and fixed use of tabs.
277
278         * Modules/mediastream/MediaDevices.cpp:
279         (WebCore::createMediaConstraintsImpl): Added.
280         (WebCore::MediaDevices::getUserMedia): Changed this function to take arguments that
281         are generated by the bindings script, and call createMediaConstraintsImpl to convert
282         into the internal data structure.
283         * Modules/mediastream/MediaDevices.h: Added StreamConstraints struct and changed
284         getUserMedia to take that as specified in the IDL.
285         * Modules/mediastream/MediaDevices.idl: Added definition of the MediaStreamConstraints
286         dictionary. Removed [Custom] from getUserMedia.
287
288         * Modules/mediastream/MediaStream.cpp:
289         (WebCore::MediaStream::MediaStream): Pass a reference to addObserver.
290         (WebCore::MediaStream::~MediaStream): Pass a rference to removeObserver.
291         (WebCore::MediaStream::internalAddTrack): Ditto.
292         (WebCore::MediaStream::internalRemoveTrack): Ditto.
293
294         * Modules/mediastream/MediaStreamTrack.cpp:
295         (WebCore::createMediaConstraintsImpl): Added.
296         (WebCore::MediaStreamTrack::applyConstraints): Changed to take an optional
297         MediaTrackConstraints argument and call createMediaConstraintsImpl to convert
298         into the internal data structure. Also merged the multiple overloads of this
299         all into a single function, used auto to make the code easier to read, and
300         moved the code that stores new constrains into the success handling, since the
301         specification says that's the only case where we should store it.
302         (WebCore::MediaStreamTrack::addObserver): Take a reference instead of a pointer.
303         (WebCore::MediaStreamTrack::removeObserver): Ditto.
304         * Modules/mediastream/MediaStreamTrack.h: Removed many unneeded includes.
305         Changed getConstraints to return const MediaTrackConstraints&, applyConstraints
306         to take an optional MediaTrackConstraints, add/removeObserver to take a reference
307         rather than a pointer, and changed m_constraints to be a MediaTrackConstraints
308         instead of a RefPtr<MediaConstraints>.
309         * Modules/mediastream/MediaStreamTrack.idl: Removed [Custom] from getConstraints
310         and applyConstraints.
311
312         * Modules/mediastream/MediaTrackConstraints.cpp: Added.
313         (WebCore::set): Overloaded function to set constriaints in a
314         MediaTrackConstraintSetMap.
315         (WebCore::convertToInternalForm): Helper function that takes a
316         MediaTrackConstraintSet and turns it into a MediaTrackConstraintSetMap.
317         (WebCore::convertAdvancedToInternalForm): More of the same, but for vectors.
318         (WebCore::createMediaConstraintsImpl): Top level function. Calls the other
319         functions and then MediaConstraintsImpl::create.
320         * Modules/mediastream/MediaTrackConstraints.h: Added. Contains all the structures
321         and type definitions for the dictionaries defined in the IDL file, and also the
322         createMediaConstraintsImpl function declaration.
323         * Modules/mediastream/MediaTrackConstraints.idl: Added. Contains the
324         MediaTrackConstraints and all the other dictionaries and typedefs that are needed
325         to define that dictionary.
326         * Modules/mediastream/UserMediaRequest.cpp:
327         (WebCore::UserMediaRequest::start): Changed to not depend on MediaDevices::Promise.
328         (WebCore::UserMediaRequest::UserMediaRequest): Ditto.
329         (WebCore::isSecure): Rearranged to be easier to understand.
330         (WebCore::UserMediaRequest::start): Removed a local variable for simplicity.
331         (WebCore::UserMediaRequest::document): Removed a redundant null check.
332         * Modules/mediastream/UserMediaRequest.h: Reduced includes, changed to not depend
333         on MediaDevices::Promise, removing the reason to include MediaDevices.h.
334
335         * WebCore.xcodeproj/project.pbxproj: Updated to remove old files and add new ones.
336
337         * bindings/js/JSBindingsAllInOne.cpp: Removed JSMediaDevicesCustom.cpp.
338
339         * bindings/js/JSMediaDevicesCustom.cpp: Removed.
340         * bindings/js/JSMediaDevicesCustom.h: Removed.
341
342         * bindings/js/JSMediaStreamTrackCustom.cpp:
343         (WebCore::JSMediaStreamTrack::applyConstraints): Deleted.
344         (WebCore::JSMediaStreamTrack::getConstraints): Deleted.
345
346         * bindings/scripts/CodeGenerator.pm:
347         (ProcessDocument): Updated to allow multiple standalone dictionaries, as long as
348         the name of one of the dictionaries matches the name of the file.
349
350         * bindings/scripts/CodeGeneratorJS.pm:
351         (GenerateDictionary): Added "other dictionaries" argument so we can support
352         files with multiple dictionaries in them.
353         (GenerateDictionariesHeaderContent): Completed support for dictionaries that
354         are not named after a top level interface by added one more check for a missing
355         $interface in a place that otherwise would not handle it correctly.
356         (GenerateImplementation): Removed code that set $currentCachedAttribute and
357         $cacheIndex, since no was reading the value of either any longer.
358         (GenerateDictionaryHeader): Added "other dictionaries".
359         (GenerateDictionaryImplementation): Ditto.
360         (WriteData): Removed unnnecessarily indirect code that was using FileNamePrefix
361         and a local variable named $prefix instead of just writing "JS".
362
363         * bindings/scripts/generate-bindings.pl: Corrected the use of the fileparse
364         function from the Path::Basename module; after reading the documentation for
365         this it is clear that there is no need to first call basename, and fileparse
366         should also be used instead of basename.
367
368         * platform/mediastream/MediaConstraints.h: Removed unneeded includes.
369         (WebCore::StringConstraint::appendExact): Removed an incorrect use of clear
370         here that would mess up cases where there is supposed to be more than one
371         exact value.
372
373         * platform/mediastream/MediaStreamTrackPrivate.cpp: Remvoed unneeded includes.
374         (WebCore::MediaStreamTrackPrivate::clone): Removed code to copy m_constraints.
375         (WebCore::MediaStreamTrackPrivate::constraints): Deleted.
376         * platform/mediastream/MediaStreamTrackPrivate.h: Removed the constraints
377         function member and the m_constraints data member.
378
379 2016-12-15  Dave Hyatt  <hyatt@apple.com>
380
381         [CSS Parser] Enable CSS Deferred Parsing
382         https://bugs.webkit.org/show_bug.cgi?id=165869
383
384         Reviewed by Sam Weinig.
385
386         Enable CSS deferred parsing once again. It's now behind a pref,
387         so it's easy to flip off and on.
388
389         To address the memory regression that caused the previous rollout,
390         the tokenizer is no longer retained. Instead the sheet text and escaped
391         strings are retained by CSSDeferredParser, and then DeferredStyleProperties
392         and DeferredStyleGroupRuleList make copies of the tokens from the original
393         tokenization process. As the rules get parsed, these tokens get thrown
394         away.
395
396         This means that instead of the entire set of tokens staying in memory
397         as long as even one unparsed rule remained, now only the tokens that
398         still need parsing will remain alive.
399
400         Unparsed rules will consume slightly more memory than parsed rules, but
401         the more unparsed rules you have, the bigger the performance win as
402         well, so this is a tradeoff. Given that the parsing speed is going up
403         by anywhere from 25-40% on cold loads of pages (where all stylesheets
404         have to parse), this seems worth it to me.
405
406         * css/parser/CSSParserMode.h:
407         * page/Settings.in:
408
409 2016-12-15  Alejandro G. Castro  <alex@igalia.com>
410
411         [OWR] Unskip fast/mediastream/MediaStream-video-element-track-stop.html
412         https://bugs.webkit.org/show_bug.cgi?id=165316
413
414         Reviewed by Philippe Normand.
415
416         Fixed the ended support of the video element in the OWR player and
417         fixed the videoTracks support. Now the OW player properly adds and
418         removes the audio and video tracks. Added the getSettings support
419         to the mediastream interface. Solved also the size handling in
420         some of the enable/muted situations.
421
422         Unskipping fast/mediastream/MediaStream-video-element-track-stop.html.
423
424         * platform/GStreamer.cmake: Added the new
425         RealtimeMediaSourceOwr.cpp with the new code handling the
426         settings.
427         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
428         (WebCore::MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr):
429         Release the new video and audio maps that creates a relationship
430         of the mediastream tracks with the mediatracks of the video element.
431         (WebCore::MediaPlayerPrivateGStreamerOwr::play): Set ended to
432         false when we start playing.
433         (WebCore::MediaPlayerPrivateGStreamerOwr::load): Create the media
434         tracks to the player so that the videoTracks API returns it, and
435         add an entry in the map to be able to restore it using the
436         mediastream track.
437         (WebCore::MediaPlayerPrivateGStreamerOwr::disableMediaTracks):
438         Move some part of the stop function to this one in order to use it
439         in pause method and avoid changing the video selection in that
440         case.
441         (WebCore::MediaPlayerPrivateGStreamerOwr::stop): Now we call the
442         function disableMediaTracks and we also change teh selected
443         videoTrack.
444         (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded): For
445         videoTrack reset the size and the selected element. In case there
446         is no media playing we Make sure we set the ended variable to true
447         and call the timeChange to modify the state of the player.
448         (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged):
449         Handle properly the situation when the user changed the enabled
450         value, we disable the media.
451         (WebCore::MediaPlayerPrivateGStreamerOwr::setSize): Modify the
452         size of the source.
453         (WebCore::MediaPlayerPrivateGStreamerOwr::naturalSize): Overrided
454         to make sure we return a size even when the sample is not ready
455         for gst.
456         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
457         Added the ended attribute and the maps.
458         * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
459         (WebCore::MediaEndpointOwr::createMutedRemoteSource): Use the new
460         realtime video and audio sources classes, this new classes
461         implement the settings of each type of media element.
462         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
463         (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
464         Use the new audio and video source classes instead of the general
465         one in order to handle the settings properly.
466         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp: Added
467         (WebCore::RealtimeMediaSourceOwr::settings): Initialize using the
468         subclass and return the new currentSettings attribute.
469         (WebCore::RealtimeMediaSourceOwr::supportedConstraints): Call the
470         subclass initialization of the supportedSettings.
471         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
472         (WebCore::RealtimeMediaSourceOwr::initializeSettings): Added to
473         initialize the settings before returning the value. Implemented in
474         the subclass.
475         (WebCore::RealtimeMediaSourceOwr::initializeSupportedConstraints):
476         Added to initialize the supported settings of the
477         media. Implemented in the subclass.
478         (WebCore::RealtimeMediaSourceOwr::settings): Moved to the cpp
479         file, implemented using the initialize functions of the subclass
480         * platform/mediastream/openwebrtc/RealtimeVideoSourceOwr.h: Added
481         this new class to handle the settings of the video elements. The
482         class initializes the settings and the supportedSettings.
483         * platform/mediastream/openwebrtc/RealtimeAudioSourceOwr.h: Added
484         this new class to handle the settings of the audio elements. The
485         class initializes the settings and the supportedSettings.
486
487
488 2016-12-15  Alex Christensen  <achristensen@webkit.org>
489
490         REGRESSION (r208902) Null pointer dereference in wkIsPublicSuffix
491         https://bugs.webkit.org/show_bug.cgi?id=165885
492         <rdar://problem/29476917>
493
494         Reviewed by Darin Adler.
495
496         wkIsPublicSuffix crashes if you give it a nil NSString*.
497         This was possible before IDN2008 adoption, but it's more common now
498         because domains like "r4---asdf.example.com" fail in uidna_nameToASCII but not in uidna_IDNToASCII.
499         decodeHostName can return a nil NSString.  We can't use it unchecked, so instead we use an algorithm that allows
500         for decoding failures while still finding top privately controlled domains correctly.
501
502         Tested by new API tests which crash before this change and verify the behavior matches behavior before r208902.
503
504         * platform/mac/PublicSuffixMac.mm:
505         (WebCore::isPublicSuffix):
506         (WebCore::topPrivatelyControlledDomain):
507
508 2016-12-15  Alex Christensen  <achristensen@webkit.org>
509
510         Fix Windows WebGL build after r209832
511
512         * CMakeLists.txt:
513
514 2016-12-14  Hunseop Jeong  <hs85.jeong@samsung.com>
515
516         Unreviewed build fix after r209832
517
518         * platform/graphics/PlatformDisplay.cpp: 
519         (WebCore::PlatformDisplay::sharedDisplay): Added the guard for the clang
520
521 2016-12-14  Yusuke Suzuki  <utatane.tea@gmail.com>
522
523         [GTK] Support latest SubtleCrypto HMAC APIs
524         https://bugs.webkit.org/show_bug.cgi?id=165863
525
526         Reviewed by Sam Weinig.
527
528         SubtleCrypto spec is updated, and new delegate implementations are required to support these interfaces.
529         This patch implements platformSign and platformVerify with WorkQueues for gcrypt backend.
530
531         * crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp:
532         (WebCore::calculateSignature):
533         (WebCore::CryptoAlgorithmHMAC::platformSign):
534         (WebCore::CryptoAlgorithmHMAC::platformVerify):
535
536 2016-12-14  Chris Dumez  <cdumez@apple.com>
537
538         Unreviewed, rolling out r209415.
539
540         This workaround is no longer needed now that
541         <rdar://problem/29518605> has been fixed
542
543         Reverted changeset:
544
545         "Add HTML interactive form validation blacklist for some
546         WebKit-specific sites"
547         https://bugs.webkit.org/show_bug.cgi?id=165470
548         http://trac.webkit.org/changeset/209415
549
550 2016-12-14  Dean Jackson  <dino@apple.com>
551
552         Update prefers-reduced-motion syntax
553         https://bugs.webkit.org/show_bug.cgi?id=165880
554         <rdar://problems/29671807>
555
556         Reviewed by Sam Weinig.
557
558         After discussion in:
559         https://github.com/w3c/csswg-drafts/issues/442
560         ... the syntax of prefers-reduced-motion was changed
561         to accept "reduce" or "no-preference".
562
563         Updated the tests in fast/media.
564
565         * css/CSSValueKeywords.in: Add no-preference keyword.
566         * css/MediaQueryEvaluator.cpp:
567         (WebCore::prefersReducedMotionEvaluate):
568
569 2016-12-14  Sam Weinig  <sam@webkit.org>
570
571         REGRESSION (204679): Google notifications never load (expecting DOMStringList rather than JS array for Location.ancestorOrigins)
572         <rdar://problem/29573563>
573         https://bugs.webkit.org/show_bug.cgi?id=165872
574
575         Reviewed by Chris Dumez.
576
577         Revert the Location.ancestorOrigins part of r204679 because google.com is relying on
578         it returning a DOMStringList (or at least something with a .item() function), rather
579         than a frozen javascript array.
580         
581         Spec changes are tracked with https://github.com/whatwg/html/issues/2179.
582
583         * page/Location.cpp:
584         (WebCore::Location::ancestorOrigins):
585         * page/Location.h:
586         * page/Location.idl:
587         Change Location.ancestorOrigins back to returning a DOMStringList.
588
589 2016-12-14  Dave Hyatt  <hyatt@apple.com>
590
591         [CSS Parser] Rename StyleKeyframe to StyleRuleKeyframe
592         https://bugs.webkit.org/show_bug.cgi?id=165876
593
594         Reviewed by Simon Fraser.
595
596         * css/CSSKeyframeRule.cpp:
597         (WebCore::StyleRuleKeyframe::StyleRuleKeyframe):
598         (WebCore::StyleRuleKeyframe::~StyleRuleKeyframe):
599         (WebCore::StyleRuleKeyframe::mutableProperties):
600         (WebCore::StyleRuleKeyframe::keyText):
601         (WebCore::StyleRuleKeyframe::setKeyText):
602         (WebCore::StyleRuleKeyframe::cssText):
603         (WebCore::CSSKeyframeRule::CSSKeyframeRule):
604         (WebCore::StyleKeyframe::StyleKeyframe): Deleted.
605         (WebCore::StyleKeyframe::~StyleKeyframe): Deleted.
606         (WebCore::StyleKeyframe::mutableProperties): Deleted.
607         (WebCore::StyleKeyframe::keyText): Deleted.
608         (WebCore::StyleKeyframe::setKeyText): Deleted.
609         (WebCore::StyleKeyframe::cssText): Deleted.
610         * css/CSSKeyframeRule.h:
611         * css/CSSKeyframesRule.cpp:
612         (WebCore::StyleRuleKeyframes::keyframes):
613         (WebCore::StyleRuleKeyframes::parserAppendKeyframe):
614         (WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
615         (WebCore::CSSKeyframesRule::appendRule):
616         (WebCore::CSSKeyframesRule::item):
617         * css/CSSKeyframesRule.h:
618         * css/StyleResolver.cpp:
619         (WebCore::StyleResolver::styleForKeyframe):
620         (WebCore::StyleResolver::keyframeStylesForAnimation):
621         * css/StyleResolver.h:
622         * css/StyleRule.cpp:
623         (WebCore::StyleRuleBase::destroy):
624         * css/StyleRule.h:
625         * css/parser/CSSParser.cpp:
626         (WebCore::CSSParser::parseKeyframeRule):
627         * css/parser/CSSParser.h:
628         * css/parser/CSSParserImpl.cpp:
629         (WebCore::CSSParserImpl::parseDeferredKeyframeList):
630         (WebCore::CSSParserImpl::consumeKeyframesRule):
631         (WebCore::CSSParserImpl::consumeKeyframeStyleRule):
632         * css/parser/CSSParserImpl.h:
633
634 2016-12-14  Dave Hyatt  <hyatt@apple.com>
635
636         [CSS Parser] Make deferred parsing retain the sheet text. Fix invalidation to avoid deferred parsing.
637         https://bugs.webkit.org/show_bug.cgi?id=165868
638
639         Reviewed by Simon Fraser.
640
641         With this new model of token copying, the sheet text needs to be retained. The tokenizer did this,
642         but we're no longer keeping it around.
643
644         StyleInvalidation is also aggressively crawling media rules, even unsupported ones, so fix it
645         to avoid deferred parsing.
646
647         * css/StyleInvalidationAnalysis.cpp:
648         (WebCore::shouldDirtyAllStyle):
649         * css/parser/CSSDeferredParser.cpp:
650         (WebCore::CSSDeferredParser::CSSDeferredParser):
651         * css/parser/CSSDeferredParser.h:
652         (WebCore::CSSDeferredParser::create):
653         * css/parser/CSSParserImpl.cpp:
654         (WebCore::CSSParserImpl::CSSParserImpl):
655
656 2016-12-14  Ryosuke Niwa  <rniwa@webkit.org>
657
658         iOS: An element with tabindex is not focusable unless there is no mouse event handler
659         https://bugs.webkit.org/show_bug.cgi?id=165843
660
661         Reviewed by Antti Koivisto.
662
663         The bug was caused by ancestorRespondingToClickEvents not checking the precense of tabindex attribute.
664         Check that condition along with event listeners.
665
666         Test: fast/events/focusing-element-with-tabindex-by-tap-or-click.html
667
668         * page/ios/FrameIOS.mm:
669         (WebCore::ancestorRespondingToClickEvents):
670
671 2016-12-14  Alex Christensen  <achristensen@webkit.org>
672
673         Progress towards using ANGLE to do WebGL rendering
674         https://bugs.webkit.org/show_bug.cgi?id=165864
675
676         Reviewed by Dean Jackson.
677
678         No new tests, no change in behavior.
679         Just compile fixes for a configuration that will soon be standard
680         that can be landed now without breaking anything.
681
682         * platform/graphics/PlatformDisplay.cpp:
683         (WebCore::PlatformDisplay::sharedDisplay):
684         Ignore some clang warnings that will cause problems when this is compiled on Mac.
685
686 2016-12-14  Dean Jackson  <dino@apple.com>
687
688         [iOS] MediaDocuments have controls on the bottom of the page
689         https://bugs.webkit.org/show_bug.cgi?id=165865
690         <rdar://problem/28757268>
691
692         Reviewed by Jon Lee.
693
694         MediaDocuments on iOS are incorrectly placing the controls at
695         the bottom of the page. This is due to the <video> element
696         getting a height of 100%. It should be "auto" instead.
697
698         * html/MediaDocument.cpp:
699         (WebCore::MediaDocumentParser::createDocumentStructure):
700
701 2016-12-14  Dave Hyatt  <hyatt@apple.com>
702
703         [CSS Parser] Implement deferred parsing of properties, @media, @supports and @keyframes
704         https://bugs.webkit.org/show_bug.cgi?id=165743
705
706         Reviewed by Dean Jackson.
707
708         Added new tests in fast/css/deferred-parsing.
709
710         This patch implements deferred parsing in CSS. By default, when parsing
711         author stylesheets, the parser goes into a deferred mode where it leaves
712         the declaration block of all style rules unparsed initially. Instead of
713         creating and setting an ImmutableStyleProperties object on the StyleRule,
714         the parser creates a DeferredStyleProperties object instead that is
715         capable of calling into CSSDeferredParser to parse the properties and values
716         only when the properties are finally asked for.
717
718         In addition, this patch defers the parsing of the interior of @media,
719         @supports, and @keyframes rules. @media blocks that are never matched will
720         never parse any of the rules inside. @supports conditions for unsupported
721         features will also not be parsed. For @keyframes, if the animation is never
722         referenced/used, then the @keyframes child rules will never be parsed.
723
724         * CMakeLists.txt:
725         * WebCore.xcodeproj/project.pbxproj:
726         Add CSSDeferredParser to the build.
727
728         * css/CSSFontFaceSet.cpp:
729         (WebCore::CSSFontFaceSet::matchingFaces):
730         Patched to drop the StyleSheetContents* argument from parseValue, since it
731         is no longer needed.
732
733         * css/CSSKeyframesRule.cpp:
734         (WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
735         (WebCore::StyleRuleKeyframes::parseDeferredRulesIfNeeded):
736         (WebCore::StyleRuleKeyframes::keyframes):
737         (WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
738         (WebCore::StyleRuleKeyframes::wrapperRemoveKeyframe):
739         (WebCore::StyleRuleKeyframes::findKeyframeIndex):
740         * css/CSSKeyframesRule.h:
741         Keyframes now hold both a keyframes Vector and a DeferredStyleGroupRuleList
742         object. The keyframes vector won't be populated until it is needed, and the
743         population is done by DeferredStyleGroupRuleList, which holds both the original
744         tokens of the keyframes rule interior, and a references to the
745         CSSDeferredParser that will do the parsing.
746
747         * css/DOMCSSNamespace.cpp:
748         (WebCore::DOMCSSNamespace::supports):
749         Patched to drop the StyleSheetContents* argument from parseValue, since it
750         is no longer needed.
751
752         * css/ElementRuleCollector.cpp:
753         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
754         ElementRuleCollector tests to see if a rule is empty by counting properties(),
755         but we don't want to initiate deferred parsing just to check this. Instead we
756         invoke propertiesWithoutDeferredParsing, which will hand back a nullptr if
757         the properties haven't been parsed yet. In order to ensure this optimization
758         continues to work, any rules whose interiors consist of only whitespace do
759         not get deferred.
760
761         * css/FontFace.cpp:
762         (WebCore::FontFace::setVariant):
763         * css/PropertySetCSSStyleDeclaration.cpp:
764         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
765         (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
766         Patched to drop the StyleSheetContents* argument from parseValue, since it
767         is no longer needed.
768
769         * css/StyleProperties.cpp:
770         (WebCore::MutableStyleProperties::MutableStyleProperties):
771         (WebCore::MutableStyleProperties::setProperty):
772         (WebCore::DeferredStyleProperties::create):
773         (WebCore::DeferredStyleProperties::DeferredStyleProperties):
774         (WebCore::DeferredStyleProperties::~DeferredStyleProperties):
775         (WebCore::DeferredStyleProperties::parseDeferredProperties):
776         * css/StyleProperties.h:
777         (WebCore::StylePropertiesBase::type):
778         (WebCore::StylePropertiesBase::cssParserMode):
779         (WebCore::StylePropertiesBase::StylePropertiesBase):
780         (WebCore::StyleProperties::isMutable):
781         (WebCore::StyleProperties::StyleProperties):
782         (WebCore::StylePropertiesBase::deref):
783         (isType):
784         (WebCore::StyleProperties::cssParserMode): Deleted.
785         (WebCore::StyleProperties::deref): Deleted.
786         Right now StyleProperties has two subclasses, ImmutableStyleProperties (which
787         is created by the parser when not deferring), and MutableStyleProperties (used
788         when making changes and doing DOM Manipulations).
789
790         This patch adds a new base class called StylePropertiesBase, and StyleProperties
791         now derives from it. DeferredStyleProperties derives from this base. The members
792         of StyleProperties have been moved up into StylePropertiesBase.
793
794         The m_isMutable bit, used to determine the type for downcasting has been enhanced
795         to m_type (2 bits), since there are now three possible subclasses.
796
797         * css/StyleRule.cpp:
798         (WebCore::StyleRule::StyleRule):
799         (WebCore::StyleRule::properties):
800         (WebCore::StyleRule::mutableProperties):
801         (WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
802         Patched to ensure that when properties() are accessed, that if the current
803         stored StylePropertyBase in the rule is a DeferredStyleProperties, we then
804         parse and replace DeferredStyleProperties with ImmutableStyleProperties on the
805         rule. By using a common base class, we avoid increasing memory usage in
806         StyleRule.
807
808         (WebCore::DeferredStyleGroupRuleList::create):
809         (WebCore::DeferredStyleGroupRuleList::DeferredStyleGroupRuleList):
810         (WebCore::DeferredStyleGroupRuleList::parseDeferredRules):
811         (WebCore::DeferredStyleGroupRuleList::parseDeferredKeyframes):
812         DeferredStyleGroupList is used to handle deferred parsing of objects with
813         child rules. These include @media, @supports and @keyframes.
814
815         (WebCore::StyleRuleGroup::StyleRuleGroup):
816         (WebCore::StyleRuleGroup::childRules):
817         (WebCore::StyleRuleGroup::wrapperInsertRule):
818         (WebCore::StyleRuleGroup::wrapperRemoveRule):
819         (WebCore::StyleRuleGroup::parseDeferredRulesIfNeeded):
820         (WebCore::StyleRuleMedia::StyleRuleMedia):
821         (WebCore::StyleRuleSupports::StyleRuleSupports):
822         StyleRuleGroup now holds both a child rules Vector and a
823         DeferredStyleGroupRuleList. If DeferredStyleGroupRuleList is set, then
824         when the childRules are finally accessed, we will populate the childRules
825         Vector and then null out the DeferredStyleGroupRuleList.
826
827         * css/StyleRule.h:
828         (WebCore::StyleRule::propertiesWithoutDeferredParsing):
829         (WebCore::StyleRuleGroup::childRulesWithoutDeferredParsing):
830         (WebCore::StyleRuleGroup::childRules): Deleted.
831         Add new accesors for fetching properties and child rules without causing
832         deferred parsing to happen.
833
834         * css/StyleSheetContents.cpp:
835         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
836         (WebCore::StyleSheetContents::parseString):
837         Patched to turn on deferred parsing for author sheets and for all
838         non-UA stylesheets parsed from a string (e.g., <style>).
839
840         (WebCore::traverseSubresourcesInRules):
841         The broken resource check was aggressively accessing properties(). Patch
842         it to call propertiesWithoutDeferredParsing() instead so that it doesn't
843         defeat the new optimization.
844
845         * css/WebKitCSSMatrix.cpp:
846         (WebCore::WebKitCSSMatrix::setMatrixValue):
847         Patched to drop the StyleSheetContents* argument from parseValue, since it
848         is no longer needed.
849
850         * css/parser/CSSDeferredParser.cpp: Added.
851         (WebCore::CSSDeferredParser::CSSDeferredParser):
852         (WebCore::CSSDeferredParser::parseDeclaration):
853         (WebCore::CSSDeferredParser::parseRuleList):
854         (WebCore::CSSDeferredParser::parseKeyframeList):
855         * css/parser/CSSDeferredParser.h: Added.
856         (WebCore::CSSDeferredParser::create):
857         (WebCore::CSSDeferredParser::tokenizer):
858         (WebCore::CSSDeferredParser::mode):
859         (WebCore::CSSDeferredParser::context):
860         (WebCore::CSSDeferredParser::styleSheet):
861         The CSSDeferredParser. It caches the original tokenizer's' escaped strings. Because
862         the CSSDeferredParser is referenced by all the rules that have yet to parse,
863         it will stay alive until all rules in the stylesheet has been fully parsed.
864
865         The parser receives CSSParserTokenRanges from DeferredStyleProperties or
866         DeferredStyleGroupRuleList and feeds them to CSSParserImpl, which then
867         is able to do the parsing as it would have occurred originally had the
868         range not been deferred.
869
870         * css/parser/CSSParser.cpp:
871         (WebCore::CSSParser::parseSheet):
872         (WebCore::CSSParser::parseSupportsCondition):
873         (WebCore::CSSParser::parseSingleValue):
874         (WebCore::CSSParser::parseValue):
875         * css/parser/CSSParser.h:
876         * css/parser/CSSParserFastPaths.cpp:
877         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
878         (WebCore::parseKeywordValue):
879         (WebCore::CSSParserFastPaths::maybeParseValue):
880         * css/parser/CSSParserFastPaths.h:
881         Drop the StyleSheetContents* argument from the methods that no longer need
882         them.
883
884         * css/parser/CSSParserImpl.cpp:
885         (WebCore::CSSParserImpl::CSSParserImpl):
886         (WebCore::CSSParserImpl::tokenizer):
887         (WebCore::CSSParserImpl::parseValue):
888         (WebCore::CSSParserImpl::parseCustomPropertyValue):
889         (WebCore::CSSParserImpl::parseDeclarationList):
890         (WebCore::CSSParserImpl::parseInlineStyleDeclaration):
891         (WebCore::CSSParserImpl::parseRule):
892         (WebCore::CSSParserImpl::parseStyleSheet):
893         (WebCore::CSSParserImpl::parseDeclarationListForInspector):
894         (WebCore::CSSParserImpl::parseStyleSheetForInspector):
895         (WebCore::CSSParserImpl::consumeQualifiedRule):
896         (WebCore::CSSParserImpl::consumeMediaRule):
897         (WebCore::CSSParserImpl::consumeSupportsRule):
898         (WebCore::CSSParserImpl::consumeKeyframesRule):
899         (WebCore::CSSParserImpl::consumeStyleRule):
900         Drop the StyleSheetContents* argument from the methods that no longer need
901         them.
902
903         (WebCore::CSSParserImpl::createDeferredStyleProperties):
904         (WebCore::CSSParserImpl::parseDeferredDeclaration):
905         (WebCore::CSSParserImpl::parseDeferredRuleList):
906         (WebCore::CSSParserImpl::parseDeferredKeyframeList):
907         The methods that handle deferred parsing. They make sure to initialize
908         new CSSParserImpls with the original deferred parser, and then call existing
909         methods to do the parsing.
910
911         * css/parser/CSSParserImpl.h:
912         Patched to remove StyleSheetContents* arguments from some methods and
913         to add the new deferred parsing methods.
914
915         * css/parser/CSSParserTokenRange.cpp:
916         (WebCore::CSSParserTokenRange::consumeBlockCheckingForEditability):
917         * css/parser/CSSParserTokenRange.h:
918         In order to preserve the editability optimization from r180867, when
919         a style rule's block is consumed, we use a special method that looks
920         for -webkit-user-modify tokens. If one is seen, then the editability
921         optimization is turned off. Because we do this at the token level,
922         the optimization keeps working even if properties don't get parsed.
923
924         * css/parser/CSSPropertyParser.cpp:
925         (WebCore::CSSPropertyParser::parseSingleValue):
926         (WebCore::CSSPropertyParser::parseFontFaceDescriptor):
927         (WebCore::CSSPropertyParser::consumeFont):
928         (WebCore::CSSPropertyParser::parseShorthand):
929         Patched to remove StyleSheetContents* arguments now that the editability
930         check is in CSSTokenizer instead.
931
932         * css/parser/CSSTokenizer.cpp:
933         (WebCore::CSSTokenizer::tokenRange):
934         * css/parser/CSSTokenizer.h:
935         Make tokenRange() const.
936
937         * html/canvas/CanvasRenderingContext2D.cpp:
938         (WebCore::CanvasRenderingContext2D::setFont):
939         Patched to drop the StyleSheetContents* argument.
940
941         * testing/Internals.cpp:
942         (WebCore::deferredStyleRulesCountForList):
943         (WebCore::Internals::deferredStyleRulesCount):
944         (WebCore::deferredGroupRulesCountForList):
945         (WebCore::Internals::deferredGroupRulesCount):
946         (WebCore::deferredKeyframesRulesCountForList):
947         (WebCore::Internals::deferredKeyframesRulesCount):
948         * testing/Internals.h:
949         * testing/Internals.idl:
950         Add new testing methods that can count the deferred style rules and
951         group child rule lists. These methods are used by the new layout tests.
952
953 2016-12-14  Brady Eidson  <beidson@apple.com>
954
955         IndexedDB 2.0: Massively speedup IDBIndex.get().
956         https://bugs.webkit.org/show_bug.cgi?id=165802
957
958         Reviewed by Alex Christensen.
959
960         No new tests (No behavior change to Javascript, table upgrade change covered by API test).
961
962         This change upgrades the IndexRecords schema to include the ObjectStore record ID for the referenced record.
963         It also adds a SQLite Index-by-key on IndexRecords.
964
965         This speeds up PerformanceTests/IndexedDB/index-get.html by 15-20x.
966
967         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
968         (WebCore::IDBServer::v3IndexRecordsTableSchema):
969         (WebCore::IDBServer::v3IndexRecordsTableSchemaAlternate):
970         (WebCore::IDBServer::v1IndexRecordsIndexSchema):
971         (WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsTable):
972         (WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsIndex):
973         (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
974         (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
975         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey):
976         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
977         (WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
978         (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
979         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
980         (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
981         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
982         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
983
984         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
985         (WebCore::IDBServer::SQLiteIDBCursor::markAsErrored):
986         (WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
987         * Modules/indexeddb/server/SQLiteIDBCursor.h:
988         (WebCore::IDBServer::SQLiteIDBCursor::currentRecordRowID):
989
990 2016-12-14  Sam Weinig  <sam@webkit.org>
991
992         Actually set the shipping contact when validating the payment request
993
994         Reviewed by Anders Carlsson.
995
996         * Modules/applepay/ApplePaySession.cpp:
997         (WebCore::convertAndValidate):
998         Fix typo.
999
1000 2016-12-14  John Wilander  <wilander@apple.com>
1001
1002         Handle key generation with empty challenge string
1003         https://bugs.webkit.org/show_bug.cgi?id=165835
1004         <rdar://problem/29128710>
1005
1006         Reviewed by Anders Carlsson.
1007
1008         https://bugs.webkit.org/show_bug.cgi?id=160945 didn't set the challenge length to
1009         1 for empty challenge strings. Thus the null terminator was not included. Empty
1010         challenge strings are allowed:
1011         "If the element has a challenge attribute, then let challenge be that attribute's
1012         value. Otherwise, let challenge be the empty string."
1013         https://www.w3.org/TR/html5/forms.html#the-keygen-element (fetched 2016-12-13)
1014
1015         Email certificate generation at
1016         https://www.comodo.com/home/email-security/free-email-certificate.php broke
1017         because of https://bugs.webkit.org/show_bug.cgi?id=160945.
1018
1019         No new tests. The original patch did not have tests and the breakage was in the
1020         produced key material so a test would have to validate the crypto output.
1021
1022         * platform/mac/SSLKeyGeneratorMac.mm:
1023         (WebCore::signedPublicKeyAndChallengeString):
1024             Now adds 1 to the length of the challenge to account for its null terminator.
1025             This matches the old behavior.
1026
1027 2016-12-14  Daniel Bates  <dabates@apple.com>
1028
1029         CSP: Allow HTTPS URL to match HTTP source expression
1030         https://bugs.webkit.org/show_bug.cgi?id=159520
1031         <rdar://problem/27287177>
1032
1033         Reviewed by Brent Fulgham.
1034
1035         Test: http/tests/security/contentSecurityPolicy/script-src-parsing-implicit-and-explicit-port-number.html
1036
1037         * page/csp/ContentSecurityPolicySource.cpp:
1038         (WebCore::ContentSecurityPolicySource::schemeMatches):
1039         (WebCore::ContentSecurityPolicySource::portMatches):
1040
1041 2016-12-14  Alex Christensen  <achristensen@webkit.org>
1042
1043         REGRESSION (r209776): [ios-simulator] LayoutTest http/tests/xmlhttprequest/on-network-timeout-error-during-preflight.html is timing out
1044         https://bugs.webkit.org/show_bug.cgi?id=165836
1045
1046         Reviewed by Brady Eidson.
1047
1048         * loader/CrossOriginAccessControl.cpp:
1049         (WebCore::createAccessControlPreflightRequest):
1050         Use the platform default timeout for CORS preflight requests.
1051
1052 2016-12-14  Antti Koivisto  <antti@apple.com>
1053
1054         WebContent crash under WebCore::CachedResource::load in WebCore::FrameLoader::outgoingReferrer const
1055         https://bugs.webkit.org/show_bug.cgi?id=165852
1056         <rdar://problem/27297153>
1057
1058         Reviewed by Chris Dumez.
1059
1060         There appears to be some path where we get here with a null frame.
1061         No test, don't know how exactly this happens.
1062
1063         * loader/FrameLoader.cpp:
1064         (WebCore::FrameLoader::outgoingReferrer):
1065
1066             Null check the frame.
1067
1068 2016-12-14  Chris Dumez  <cdumez@apple.com>
1069
1070         Unreviewed, rolling out r209766.
1071
1072         Regressed Dromaeo JSLib by ~50%
1073
1074         Reverted changeset:
1075
1076         "Make opaque root scanning truly constraint-based"
1077         https://bugs.webkit.org/show_bug.cgi?id=165760
1078         http://trac.webkit.org/changeset/209766
1079
1080 2016-12-14  Andy Estes  <aestes@apple.com>
1081
1082         EventDispatcher::dispatchEvent() should take its Node by reference
1083         https://bugs.webkit.org/show_bug.cgi?id=165840
1084
1085         Reviewed by Andreas Kling.
1086
1087         No new tests. No change in behavior.
1088
1089         * dom/Element.cpp:
1090         (WebCore::Element::dispatchWheelEvent): Dereferenced |this| when calling
1091         EventDispatcher::dispatchEvent().
1092         (WebCore::Element::dispatchKeyEvent): Ditto.
1093         (WebCore::Element::dispatchFocusEvent): Ditto.
1094         (WebCore::Element::dispatchBlurEvent): Ditto.
1095         * dom/EventDispatcher.cpp:
1096         (WebCore::EventDispatcher::dispatchEvent): Changed |origin| from a Node* to a Node&, renamed
1097         it to |node|, and protected it with a Ref called |protectedNode| to match our preferred
1098         style.
1099         * dom/EventDispatcher.h: Changed dispatchEvent's first parameter type from Node* to Node&.
1100         * dom/Node.cpp:
1101         (WebCore::Node::dispatchEvent): Dereferenced |this| when calling
1102         EventDispatcher::dispatchEvent().
1103         (WebCore::Node::dispatchTouchEvent): Ditto.
1104         (WebCore::Node::dispatchUIRequestEvent): Ditto.
1105         * dom/ScopedEventQueue.cpp:
1106         (WebCore::ScopedEventQueue::dispatchEvent): Dereferenced |node| when calling
1107         EventDispatcher::dispatchEvent().
1108         * dom/SimulatedClick.cpp:
1109         (WebCore::simulateMouseEvent): Passed |element| as a reference to
1110         EventDispatcher::dispatchEvent().
1111
1112 2016-12-14  Chris Dumez  <cdumez@apple.com>
1113
1114         Remove Unicode case-insensitive matching for usemap=""
1115         https://bugs.webkit.org/show_bug.cgi?id=163894
1116
1117         Reviewed by Antti Koivisto.
1118
1119         Remove Unicode case-insensitive matching for usemap="" as this no longer
1120         matches the specification [1] or Firefox. Also align our parsing logic for
1121         the usemap attribute to match the specification [2].
1122
1123         This simplifies the code a bit, is more efficient and the compatibility
1124         risk should be low based on Firefox's behavior and Chome's usage data.
1125
1126         [1] https://github.com/whatwg/html/commit/6acdb2122298d2bb7bb839c0a61b4e1f9b0f9bc9
1127         [2] https://html.spec.whatwg.org/#rules-for-parsing-a-hash-name-reference
1128
1129         Test: fast/images/image-usemap-parsing.html
1130
1131         * dom/Document.cpp:
1132         (WebCore::Document::addImageElementByUsemap):
1133         (WebCore::Document::removeImageElementByUsemap):
1134         (WebCore::Document::imageElementByUsemap):
1135         * dom/Document.h:
1136         * dom/DocumentOrderedMap.cpp:
1137         (WebCore::DocumentOrderedMap::getElementByUsemap):
1138         * dom/DocumentOrderedMap.h:
1139         * dom/TreeScope.cpp:
1140         (WebCore::TreeScope::getImageMap):
1141         * html/HTMLImageElement.cpp:
1142         (WebCore::HTMLImageElement::parseAttribute):
1143         (WebCore::HTMLImageElement::insertedInto):
1144         (WebCore::HTMLImageElement::removedFrom):
1145         (WebCore::HTMLImageElement::matchesUsemap):
1146         * html/HTMLImageElement.h:
1147         * html/HTMLMapElement.cpp:
1148         (WebCore::HTMLMapElement::imageElement):
1149         (WebCore::HTMLMapElement::parseAttribute):
1150         * html/parser/HTMLParserIdioms.cpp:
1151         (WebCore::parseHTMLHashNameReference):
1152         * html/parser/HTMLParserIdioms.h:
1153
1154 2016-12-14  Ryan Haddad  <ryanhaddad@apple.com>
1155
1156         Attempt to fix the Windows build after r209805.
1157
1158         Unreviewed build fix.
1159
1160         * css/CSSAllInOne.cpp:
1161
1162 2016-12-14  Dave Hyatt  <hyatt@apple.com>
1163
1164         [CSS Parser] Remove WebkitCSSTransformValue
1165         https://bugs.webkit.org/show_bug.cgi?id=165844
1166
1167         Reviewed by Zalan Bujtas.
1168
1169         Remove WebkitCSSTransformValue and just use a CSSFunctionValue instead. No other
1170         browsers support it, and the information it provides is easily obtainable from cssText.
1171
1172         * CMakeLists.txt:
1173         * DerivedSources.cpp:
1174         * DerivedSources.make:
1175         * WebCore.xcodeproj/project.pbxproj:
1176         * bindings/js/JSCSSValueCustom.cpp:
1177         (WebCore::toJSNewlyCreated):
1178         * css/CSSComputedStyleDeclaration.cpp:
1179         (WebCore::matrixTransformValue):
1180         * css/CSSValue.cpp:
1181         (WebCore::CSSValue::equals):
1182         (WebCore::CSSValue::cssText):
1183         (WebCore::CSSValue::destroy):
1184         (WebCore::CSSValue::cloneForCSSOM):
1185         * css/CSSValue.h:
1186         (WebCore::CSSValue::isSpringTimingFunctionValue):
1187         (WebCore::CSSValue::isWebKitCSSTransformValue): Deleted.
1188         * css/StyleResolver.cpp:
1189         * css/TransformFunctions.cpp:
1190         (WebCore::transformOperationType):
1191         (WebCore::transformsForValue):
1192         * css/TransformFunctions.h:
1193         * css/WebKitCSSTransformValue.cpp: Removed.
1194         * css/WebKitCSSTransformValue.h: Removed.
1195         * css/WebKitCSSTransformValue.idl: Removed.
1196         * css/parser/CSSParserFastPaths.cpp:
1197         (WebCore::parseTransformTranslateArguments):
1198         (WebCore::parseTransformNumberArguments):
1199         (WebCore::parseSimpleTransformValue):
1200         (WebCore::parseSimpleTransformList):
1201         * css/parser/CSSPropertyParser.cpp:
1202         (WebCore::consumeTranslate3d):
1203         (WebCore::consumeNumbers):
1204         (WebCore::consumePerspective):
1205         (WebCore::consumeTransformValue):
1206         (WebCore::transformOperationForCSSValueID): Deleted.
1207
1208 2016-12-14  Antti Koivisto  <antti@apple.com>
1209
1210         Make Style::Update const in RenderTreeUpdater
1211         https://bugs.webkit.org/show_bug.cgi?id=165845
1212
1213         Reviewed by Andreas Kling.
1214
1215         Moving style away from unique_ptrs leaves them in weird state.
1216
1217         * style/RenderTreeUpdater.cpp:
1218         (WebCore::findRenderingRoots):
1219         (WebCore::RenderTreeUpdater::commit):
1220         (WebCore::RenderTreeUpdater::updateElementRenderer):
1221
1222             Clone the style instead of moving it. This is not meaningfully more expensive.
1223             Remove null checks, style is never null.
1224
1225         * style/RenderTreeUpdater.h:
1226
1227 2016-12-13  Yusuke Suzuki  <utatane.tea@gmail.com>
1228
1229         Use JSValue::toWTFString instead of calling toString(exec) and value(exec)
1230         https://bugs.webkit.org/show_bug.cgi?id=165795
1231
1232         Reviewed by Saam Barati.
1233
1234         * bindings/js/IDBBindingUtilities.cpp:
1235         (WebCore::createIDBKeyFromValue):
1236         * bindings/js/JSAudioTrackCustom.cpp:
1237         (WebCore::JSAudioTrack::setKind):
1238         (WebCore::JSAudioTrack::setLanguage):
1239         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
1240         (WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier):
1241         * bindings/js/JSCustomXPathNSResolver.cpp:
1242         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1243         * bindings/js/JSDOMWindowCustom.cpp:
1244         (WebCore::JSDOMWindow::setLocation):
1245         * bindings/js/JSDeviceMotionEventCustom.cpp:
1246         (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
1247         * bindings/js/JSDeviceOrientationEventCustom.cpp:
1248         (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
1249         * bindings/js/JSEventListener.cpp:
1250         (WebCore::JSEventListener::handleEvent):
1251         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1252         (WebCore::callHTMLAllCollection):
1253         (WebCore::JSHTMLAllCollection::namedItem):
1254         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
1255         (WebCore::JSHTMLFormControlsCollection::namedItem):
1256         * bindings/js/JSHTMLInputElementCustom.cpp:
1257         (WebCore::JSHTMLInputElement::setSelectionDirection):
1258         * bindings/js/JSInspectorFrontendHostCustom.cpp:
1259         (WebCore::populateContextMenuItems):
1260         * bindings/js/JSMessageEventCustom.cpp:
1261         (WebCore::handleInitMessageEvent):
1262         * bindings/js/JSSQLTransactionCustom.cpp:
1263         (WebCore::JSSQLTransaction::executeSql):
1264         * bindings/js/JSTextTrackCustom.cpp:
1265         (WebCore::JSTextTrack::setLanguage):
1266         * bindings/js/JSVideoTrackCustom.cpp:
1267         (WebCore::JSVideoTrack::setKind):
1268         (WebCore::JSVideoTrack::setLanguage):
1269         * bindings/js/JSWebKitSubtleCryptoCustom.cpp:
1270         (WebCore::cryptoKeyFormatFromJSValue):
1271         (WebCore::cryptoKeyUsagesFromJSValue):
1272         * bindings/js/JSXMLHttpRequestCustom.cpp:
1273         (WebCore::JSXMLHttpRequest::send):
1274         * bindings/js/JSXSLTProcessorCustom.cpp:
1275         (WebCore::JSXSLTProcessor::setParameter):
1276         (WebCore::JSXSLTProcessor::getParameter):
1277         (WebCore::JSXSLTProcessor::removeParameter):
1278         * bindings/js/ScheduledAction.cpp:
1279         (WebCore::ScheduledAction::create):
1280         * bridge/c/c_utility.cpp:
1281         (JSC::Bindings::convertValueToNPVariant):
1282         * bridge/testbindings.cpp:
1283         (main):
1284
1285 2016-12-14  Joonghun Park  <jh718.park@samsung.com>
1286
1287         [EFL] Fix debug build break since r207192. Unreviewed.
1288         https://bugs.webkit.org/show_bug.cgi?id=165847
1289
1290         No new tests, no new behaviours.
1291
1292         In JSDOMBinding.h, JSClass::info() returns each js class's
1293         "static const JSC::ClassInfo s_info"'s address.
1294         It's static variable's address, so always non-null.
1295
1296         * bindings/js/JSDOMBinding.h:
1297         (WebCore::BindingCaller::callPromiseOperation):
1298         (WebCore::BindingCaller::callOperation):
1299         (WebCore::BindingCaller::setAttribute):
1300         (WebCore::BindingCaller::attribute):
1301
1302 2016-12-14  Enrique Ocaña González  <eocanha@igalia.com>
1303
1304         REGRESSION(r207879-207891): [GStreamer] Introduced many layout test failures and crashes, bots exiting early
1305         https://bugs.webkit.org/show_bug.cgi?id=164022
1306
1307         Reviewed by Xabier Rodriguez-Calvar.
1308
1309         Covered by existing tests.
1310
1311         * page/Settings.cpp:
1312         Added new setting to disable GStreamer players, so the selection of
1313         MockMediaPlayerMediaSource can be forced for some tests, just like
1314         it's already being done for the AVFoundation player in Mac.
1315         (WebCore::Settings::setGStreamerEnabled):
1316         * page/Settings.h:
1317         (WebCore::Settings::isGStreamerEnabled):
1318         * platform/graphics/MediaPlayer.cpp:
1319         (WebCore::buildMediaEnginesVector):
1320         Don't register GStreamer players when they're disabled.
1321         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1322         (WebCore::MediaPlayerPrivateGStreamer::durationMediaTime):
1323         Use doubles instead of floats.
1324         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1325         Use doubles instead of floats for m_durationAtEOS.
1326         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1327         Don't reset m_sample on videoSink drain, it causes too many problems.
1328         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
1329         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1330         Removed unused methods.
1331         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1332         Keep releasing m_sample on drain, but don't report the event
1333         externally via signal anymore. The base player private isn't
1334         listening to it anymore.
1335         (webkitVideoSinkEvent):
1336         (webkit_video_sink_class_init):
1337         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
1338         (WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
1339         Check if the demuxer caps correspond to a supported codec.
1340         (WebCore::AppendPipeline::didReceiveInitializationSegment):
1341         Empty m_track is now legal and means unsupported codec.
1342         (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
1343         Warn about more than one stream, but "support" it by ignoring it using
1344         a black hole probe.
1345         (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink):
1346         Also report the duration when it's detected for the first time. Invalid
1347         stream types now mean that unsupported codecs have been detected.
1348         Complete init segment processing in that case.
1349         (WebCore::AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread):
1350         Disconnect black hole probe.
1351         (WebCore::appendPipelineDemuxerBlackHolePadProbe): Ignore buffers.
1352         (WebCore::appendPipelineDemuxerPadRemoved): New parameter used.
1353         * platform/graphics/gstreamer/mse/AppendPipeline.h:
1354         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
1355         (WebCore::MediaPlayerPrivateGStreamerMSE::supportsCodecs):
1356         Check supported codecs by matching against wildcard expressions.
1357         (WebCore::MediaPlayerPrivateGStreamerMSE::supportsType):
1358         Check for supported codecs.
1359         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
1360         New supportsCodecs() method.
1361         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
1362         (WebCore::MediaSourceClientGStreamerMSE::resetParserState):
1363         Implemented parser resetting by aborting the AppendPipeline.
1364         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h:
1365         Added resetParserState().
1366         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
1367         (WebCore::SourceBufferPrivateGStreamer::resetParserState):
1368         Implemented it.
1369         * testing/Internals.cpp:
1370         (WebCore::Internals::initializeMockMediaSource):
1371         Disable the GStreamer players when initializing the mock media source,
1372         like it's already done for the AVFoundation player to force the
1373         selection of MockMediaPlayerMediaSource.
1374
1375 2016-12-14  Enrique Ocaña González  <eocanha@igalia.com>
1376
1377         [GStreamer][MSE] Fix player private selection when MSE is enabled
1378         https://bugs.webkit.org/show_bug.cgi?id=164116
1379
1380         Reviewed by Philippe Normand.
1381
1382         Covered by existing tests.
1383
1384         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1385         (WebCore::MediaPlayerPrivateGStreamer::load):
1386         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
1387         (WebCore::MediaPlayerPrivateGStreamerMSE::load):
1388
1389 2016-12-13  Commit Queue  <commit-queue@webkit.org>
1390
1391         Unreviewed, rolling out r209792.
1392         https://bugs.webkit.org/show_bug.cgi?id=165841
1393
1394         Cause build failures (Requested by yusukesuzuki on #webkit).
1395
1396         Reverted changeset:
1397
1398         "Use JSValue::toWTFString instead of calling toString(exec)
1399         and value(exec)"
1400         https://bugs.webkit.org/show_bug.cgi?id=165795
1401         http://trac.webkit.org/changeset/209792
1402
1403 2016-12-13  Yusuke Suzuki  <utatane.tea@gmail.com>
1404
1405         Use JSValue::toWTFString instead of calling toString(exec) and value(exec)
1406         https://bugs.webkit.org/show_bug.cgi?id=165795
1407
1408         Reviewed by Saam Barati.
1409
1410         * bindings/js/IDBBindingUtilities.cpp:
1411         (WebCore::createIDBKeyFromValue):
1412         (WebCore::getNthValueOnKeyPath): Deleted.
1413         (WebCore::internalCreateIDBKeyFromScriptValueAndKeyPath): Deleted.
1414         (WebCore::ensureNthValueOnKeyPath): Deleted.
1415         (WebCore::canInjectNthValueOnKeyPath): Deleted.
1416         (WebCore::injectIDBKeyIntoScriptValue): Deleted.
1417         (WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath): Deleted.
1418         (WebCore::canInjectIDBKeyIntoScriptValue): Deleted.
1419         (WebCore::deserializeIDBValueToJSValue): Deleted.
1420         (WebCore::scriptValueToIDBKey): Deleted.
1421         (WebCore::idbKeyDataToScriptValue): Deleted.
1422         (WebCore::createKeyPathArray): Deleted.
1423         (WebCore::generateIndexKeyForValue): Deleted.
1424         * bindings/js/JSAudioTrackCustom.cpp:
1425         (WebCore::JSAudioTrack::setKind):
1426         (WebCore::JSAudioTrack::setLanguage):
1427         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
1428         (WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier):
1429         * bindings/js/JSCustomXPathNSResolver.cpp:
1430         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1431         * bindings/js/JSDOMWindowCustom.cpp:
1432         (WebCore::JSDOMWindow::setLocation):
1433         * bindings/js/JSDeviceMotionEventCustom.cpp:
1434         (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
1435         * bindings/js/JSDeviceOrientationEventCustom.cpp:
1436         (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
1437         * bindings/js/JSEventListener.cpp:
1438         (WebCore::JSEventListener::handleEvent):
1439         (WebCore::JSEventListener::virtualisAttribute): Deleted.
1440         (WebCore::JSEventListener::operator==): Deleted.
1441         (WebCore::eventHandlerAttribute): Deleted.
1442         (WebCore::createEventListenerForEventHandlerAttribute): Deleted.
1443         (WebCore::setEventHandlerAttribute): Deleted.
1444         (WebCore::windowEventHandlerAttribute): Deleted.
1445         (WebCore::setWindowEventHandlerAttribute): Deleted.
1446         (WebCore::documentEventHandlerAttribute): Deleted.
1447         (WebCore::setDocumentEventHandlerAttribute): Deleted.
1448         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1449         (WebCore::callHTMLAllCollection):
1450         (WebCore::JSHTMLAllCollection::namedItem):
1451         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
1452         (WebCore::JSHTMLFormControlsCollection::namedItem):
1453         * bindings/js/JSHTMLInputElementCustom.cpp:
1454         (WebCore::JSHTMLInputElement::setSelectionDirection):
1455         (WebCore::JSHTMLInputElement::setSelectionRange): Deleted.
1456         * bindings/js/JSInspectorFrontendHostCustom.cpp:
1457         (WebCore::populateContextMenuItems):
1458         (WebCore::JSInspectorFrontendHost::showContextMenu): Deleted.
1459         * bindings/js/JSMessageEventCustom.cpp:
1460         (WebCore::handleInitMessageEvent):
1461         * bindings/js/JSSQLTransactionCustom.cpp:
1462         (WebCore::JSSQLTransaction::executeSql):
1463         * bindings/js/JSTextTrackCustom.cpp:
1464         (WebCore::JSTextTrack::setLanguage):
1465         * bindings/js/JSVideoTrackCustom.cpp:
1466         (WebCore::JSVideoTrack::setKind):
1467         (WebCore::JSVideoTrack::setLanguage):
1468         * bindings/js/JSWebKitSubtleCryptoCustom.cpp:
1469         (WebCore::cryptoKeyFormatFromJSValue):
1470         (WebCore::cryptoKeyUsagesFromJSValue):
1471         * bindings/js/JSXMLHttpRequestCustom.cpp:
1472         (WebCore::JSXMLHttpRequest::send):
1473         (WebCore::JSXMLHttpRequest::responseText): Deleted.
1474         (WebCore::JSXMLHttpRequest::retrieveResponse): Deleted.
1475         * bindings/js/JSXSLTProcessorCustom.cpp:
1476         (WebCore::JSXSLTProcessor::setParameter):
1477         (WebCore::JSXSLTProcessor::getParameter):
1478         (WebCore::JSXSLTProcessor::removeParameter):
1479         * bindings/js/ScheduledAction.cpp:
1480         (WebCore::ScheduledAction::create):
1481         * bridge/c/c_utility.cpp:
1482         (JSC::Bindings::convertValueToNPVariant):
1483         * bridge/testbindings.cpp:
1484         (main):
1485         * inspector/InspectorDOMAgent.cpp:
1486         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1487
1488 2016-12-13  Yusuke Suzuki  <utatane.tea@gmail.com>
1489
1490         ASSERTION FAILED: hasParserBlockingScript() seen with js/dom/modules/module-will-fire-beforeload.html
1491         https://bugs.webkit.org/show_bug.cgi?id=164883
1492
1493         Reviewed by Ryosuke Niwa.
1494
1495         This is *attempt to fix* patch since I cannot reproduce the crash reported in this issue.
1496         One possible scenario of this crash is the following.
1497
1498         1. There is pending deferred scripts, that is not fetched yet.
1499         2. Then, we start watching on the script. And stop document parser.
1500         3. The document parser is stopped/detached by calling finishJSTest in beforeload.
1501         4. At this critical timing, (2)'s script is fetched, and notifyFinished is called since it is watched.
1502
1503         In this patch, we ignore the script execution if the document parser is stopped / detached.
1504         Previously, it goes into the wrong path. And it causes assertion failure.
1505
1506         * html/parser/HTMLDocumentParser.cpp:
1507         (WebCore::HTMLDocumentParser::notifyFinished):
1508
1509 2016-12-13  Keith Rollin  <krollin@apple.com>
1510
1511         Memory warning logging appears to capture resident footprint, missing compress/swap.
1512         https://bugs.webkit.org/show_bug.cgi?id=165533
1513         <rdar://problem/29318410>
1514
1515         Reviewed by Daniel Bates.
1516
1517         Fix GTK build by adding an explicit constructor.
1518
1519         * platform/MemoryPressureHandler.h:
1520         (WebCore::MemoryPressureHandler::ReliefLogger::MemoryUsage::MemoryUsage):
1521
1522 2016-12-13  Daniel Bates  <dabates@apple.com>
1523
1524         CSP: ws: and wss: blocked with connect-src *
1525         https://bugs.webkit.org/show_bug.cgi?id=165804
1526         <rdar://problem/28563643>
1527
1528         Reviewed by David Kilzer.
1529
1530         Allow * to match ws: and wss:. This will make our behavior of * more closely conform
1531         the behavior of * in the Content Security Policy Level 3 spec.,
1532         <https://w3c.github.io/webappsec-csp/#match-url-to-source-expression> (Editor's Draft, 2 December 2016).
1533
1534         Tests: http/tests/security/contentSecurityPolicy/connect-src-star-secure-websocket-allowed.html
1535                http/tests/security/contentSecurityPolicy/connect-src-star-websocket-allowed.html
1536                http/tests/security/contentSecurityPolicy/default-src-star-secure-websocket-allowed.html
1537                http/tests/security/contentSecurityPolicy/default-src-star-websocket-allowed.html
1538
1539         * page/csp/ContentSecurityPolicySourceList.cpp:
1540         (WebCore::ContentSecurityPolicySourceList::isProtocolAllowedByStar):
1541
1542 2016-12-13  Dave Hyatt  <hyatt@apple.com>
1543
1544         [CSS Parser] Make CSSFunctionValue derive from CSSValueList
1545         https://bugs.webkit.org/show_bug.cgi?id=165832
1546
1547         Reviewed by Dean Jackson.
1548
1549         With the old parser gone, we can now shrink CSSFunctionValue a bit by
1550         having it derive from CSSValueList instead of having an extra member
1551         that holds a value list of arguments. This is similar to the trick
1552         already employed by WebkitCSSTransformValue.
1553
1554         * css/CSSComputedStyleDeclaration.cpp:
1555         (WebCore::specifiedValueForGridTrackSize):
1556         * css/CSSFunctionValue.cpp:
1557         (WebCore::CSSFunctionValue::customCSSText):
1558         (WebCore::CSSFunctionValue::CSSFunctionValue): Deleted.
1559         (WebCore::CSSFunctionValue::equals): Deleted.
1560         (WebCore::CSSFunctionValue::append): Deleted.
1561         * css/CSSFunctionValue.h:
1562         * css/StyleBuilderConverter.h:
1563         (WebCore::StyleBuilderConverter::convertScrollSnapPoints):
1564         (WebCore::StyleBuilderConverter::createGridTrackSize):
1565         * css/StyleResolver.cpp:
1566         (WebCore::StyleResolver::createFilterOperations):
1567         * css/parser/CSSPropertyParser.cpp:
1568         (WebCore::isGridTrackFixedSized):
1569
1570 2016-12-13  Chris Dumez  <cdumez@apple.com>
1571
1572         Make Document a FrameDestructionObserver
1573         https://bugs.webkit.org/show_bug.cgi?id=165810
1574         <rdar://problem/29157645>
1575
1576         Reviewed by Ryosuke Niwa.
1577
1578         Make Document a FrameDestructionObserver to make sure Document::m_frame
1579         is properly nulled out when a Frame gets destroyed.
1580         Document::disconnectFromFrame() is supposed to be called before the Frame
1581         gets destroyed so this also adds an assertion to try and identify places
1582         where we fail to call it.
1583
1584         No new tests, no known reproduction case.
1585
1586         * dom/Document.cpp:
1587         (WebCore::Document::Document):
1588         (WebCore::Document::disconnectFromFrame):
1589         (WebCore::Document::frameDestroyed):
1590         * dom/Document.h:
1591         (WebCore::Document::frame): Deleted.
1592
1593 2016-12-13  Joseph Pecoraro  <pecoraro@apple.com>
1594
1595         REGRESSION(r204163): Web Inspector: Page crashes when Inspector tries to load insecure SourceMap
1596         https://bugs.webkit.org/show_bug.cgi?id=165806
1597         <rdar://problem/28169025>
1598
1599         Reviewed by Alex Christensen.
1600
1601         Test: http/tests/inspector/network/loadResource-insecure-resource.html
1602
1603         * inspector/InspectorNetworkAgent.cpp:
1604         (WebCore::InspectorNetworkAgent::loadResource):
1605         DocumentThreadableLoader now triggers the ThreadableLoaderClient's didFail
1606         callback, so this didFailLoaderCreation is now redundent and incorrect.
1607
1608 2016-12-13  Dave Hyatt  <hyatt@apple.com>
1609
1610         [CSS Parser] Enhance fast path translate transforms to allow percentages
1611         https://bugs.webkit.org/show_bug.cgi?id=165822
1612
1613         Reviewed by Simon Fraser.
1614
1615         * css/parser/CSSParserFastPaths.cpp:
1616         (WebCore::parseTransformTranslateArguments):
1617
1618 2016-12-13  Ryosuke Niwa  <rniwa@webkit.org>
1619
1620         :hover rule causes a single tap to not activate a slotted anchor element
1621         https://bugs.webkit.org/show_bug.cgi?id=165551
1622
1623         Reviewed by Antti Koivisto.
1624
1625         Fixed a bug in ancestorRespondingToClickEvents that we were traversing the ancestor nodes without taking
1626         shadow roots and slots into account. This prevented tapping on a text node assigned to a slot inside
1627         an anchor element to activate the hyperlink on iOS.
1628
1629         This bug was supposed to be fixed in r206605, and it was still broken on iOS due to the bug in
1630         ancestorRespondingToClickEvents. It is now tested by click-text-inside-linked-slot.html.
1631
1632         Tests: fast/shadow-dom/click-on-slotted-anchor-with-hover.html
1633                fast/shadow-dom/click-text-inside-linked-slot.html
1634
1635         * page/ios/FrameIOS.mm:
1636         (WebCore::ancestorRespondingToClickEvents):
1637         (WebCore::Frame::qualifyingNodeAtViewportLocation):
1638
1639 2016-12-13  Dave Hyatt  <hyatt@apple.com>
1640
1641         [CSS Parser] Eliminate SVGPaint and SVGColor
1642         https://bugs.webkit.org/show_bug.cgi?id=165819
1643
1644         Reviewed by Dean Jackson.
1645
1646         Remove SVGColor and SVGPaint CSS values from the tree. The new parser
1647         already stopped making these values when parsing, so all that's left
1648         is to make sure computed style doesn't use these values either.
1649
1650         We are the only browser engine to support these CSS values, they see no use
1651         on the Web, and they're already gone at the parsing level, so it's time
1652         to remove these interfaces from our tree.
1653
1654         * CMakeLists.txt:
1655         * DerivedSources.make:
1656         * WebCore.xcodeproj/project.pbxproj:
1657         * bindings/js/JSCSSValueCustom.cpp:
1658         (WebCore::toJSNewlyCreated):
1659         * css/CSSComputedStyleDeclaration.h:
1660         * css/CSSValue.cpp:
1661         (WebCore::CSSValue::equals):
1662         (WebCore::CSSValue::cssText):
1663         (WebCore::CSSValue::destroy):
1664         (WebCore::CSSValue::cloneForCSSOM):
1665         * css/CSSValue.h:
1666         (WebCore::CSSValue::isSubtypeExposedToCSSOM):
1667         (WebCore::CSSValue::isSVGColor): Deleted.
1668         (WebCore::CSSValue::isSVGPaint): Deleted.
1669         * css/SVGCSSComputedStyleDeclaration.cpp:
1670         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
1671         (WebCore::ComputedStyleExtractor::svgPropertyValue):
1672         * css/StyleBuilderConverter.h:
1673         (WebCore::StyleBuilderConverter::convertSVGColor):
1674         * css/StyleBuilderCustom.h:
1675         (WebCore::StyleBuilderCustom::applyValueFill):
1676         (WebCore::StyleBuilderCustom::applyValueStroke):
1677         * page/animation/CSSPropertyAnimation.cpp:
1678         (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint):
1679         * rendering/style/RenderStyle.h:
1680         (WebCore::RenderStyle::fillPaintType):
1681         (WebCore::RenderStyle::setFillPaintColor):
1682         (WebCore::RenderStyle::strokePaintType):
1683         (WebCore::RenderStyle::setStrokePaintColor):
1684         * rendering/style/SVGRenderStyle.h:
1685         (WebCore::SVGRenderStyle::initialFillPaintType):
1686         (WebCore::SVGRenderStyle::initialStrokePaintType):
1687         (WebCore::SVGRenderStyle::setFillPaint):
1688         (WebCore::SVGRenderStyle::setStrokePaint):
1689         (WebCore::SVGRenderStyle::fillPaintType):
1690         (WebCore::SVGRenderStyle::strokePaintType):
1691         (WebCore::SVGRenderStyle::visitedLinkFillPaintType):
1692         (WebCore::SVGRenderStyle::visitedLinkStrokePaintType):
1693         (WebCore::SVGRenderStyle::hasStroke):
1694         (WebCore::SVGRenderStyle::hasFill):
1695         * rendering/style/SVGRenderStyleDefs.h:
1696         * rendering/svg/RenderSVGResource.cpp:
1697         (WebCore::requestPaintingResource):
1698         * rendering/svg/SVGResources.cpp:
1699         (WebCore::paintingResourceFromSVGPaint):
1700         * svg/SVGAllInOne.cpp:
1701         * svg/SVGAnimatedColor.cpp:
1702         (WebCore::SVGAnimatedColorAnimator::constructFromString):
1703         (WebCore::parseColorFromString):
1704         (WebCore::SVGAnimatedColorAnimator::calculateDistance):
1705         * svg/SVGAnimatedType.cpp:
1706         (WebCore::SVGAnimatedType::setValueAsString):
1707         * svg/SVGAnimatedType.h:
1708         * svg/SVGColor.cpp: Removed.
1709         * svg/SVGColor.h: Removed.
1710         * svg/SVGColor.idl: Removed.
1711         * svg/SVGFEDiffuseLightingElement.cpp:
1712         * svg/SVGFESpecularLightingElement.cpp:
1713         * svg/SVGPaint.cpp: Removed.
1714         * svg/SVGPaint.h: Removed.
1715         * svg/SVGPaint.idl: Removed.
1716
1717 2016-12-13  Alex Christensen  <achristensen@webkit.org>
1718
1719         Restore NSURLRequest's default time interval to match behavior before NSURLSession adoption
1720         https://bugs.webkit.org/show_bug.cgi?id=165821
1721         <rdar://problem/28492939>
1722
1723         Reviewed by Brady Eidson.
1724
1725         Before adopting NSURLSession, iOS used CFURLConnection, not NSURLConnection.
1726         iOS used to have a default timeout of INT_MAX and it now has a default timeout of 0, which means use the 
1727         default NSURLRequest timeout, which is 60 seconds.  This is not enough for some slow mobile networks,
1728         so we want to match behavior of our CFURLConnection code here.
1729
1730         * platform/network/ResourceRequestBase.cpp:
1731         Use INT_MAX as the default timeout of requests on iOS.
1732
1733 2016-12-13  Filip Pizlo  <fpizlo@apple.com>
1734
1735         Make opaque root scanning truly constraint-based
1736         https://bugs.webkit.org/show_bug.cgi?id=165760
1737
1738         Reviewed by Saam Barati.
1739
1740         No new tests yet. I think that writing tests for this is a big investigation:
1741         https://bugs.webkit.org/show_bug.cgi?id=165808
1742         
1743         Remove the previous advancing wavefront DOM write barrier. I don't think this will scale
1744         very well. It's super confusing.
1745         
1746         This change makes it so that visitChildren can become a GC constraint that executes as
1747         part of the fixpoint. This changes all WebCore visitChildren methods that do opaque
1748         roots into constraints.
1749
1750         * bindings/js/CommonVM.cpp:
1751         (WebCore::commonVMSlow):
1752         (WebCore::writeBarrierOpaqueRootSlow): Deleted.
1753         * bindings/js/CommonVM.h:
1754         (WebCore::writeBarrierOpaqueRoot): Deleted.
1755         * bindings/js/JSAttrCustom.cpp:
1756         (WebCore::JSAttr::visitAdditionalChildren):
1757         * bindings/js/JSDOMWindowCustom.cpp:
1758         (WebCore::JSDOMWindow::visitAdditionalChildren):
1759         * bindings/js/JSIDBCursorCustom.cpp:
1760         (WebCore::JSIDBCursor::visitAdditionalChildren):
1761         * bindings/js/JSMessageChannelCustom.cpp:
1762         (WebCore::JSMessageChannel::visitAdditionalChildren):
1763         * bindings/js/JSMessagePortCustom.cpp:
1764         (WebCore::JSMessagePort::visitAdditionalChildren):
1765         * bindings/js/JSNodeIteratorCustom.cpp:
1766         (WebCore::JSNodeIterator::visitAdditionalChildren):
1767         * bindings/js/JSTextTrackCueCustom.cpp:
1768         (WebCore::JSTextTrackCue::visitAdditionalChildren):
1769         * bindings/js/JSTreeWalkerCustom.cpp:
1770         (WebCore::JSTreeWalker::visitAdditionalChildren):
1771         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1772         (WebCore::JSWorkerGlobalScope::visitAdditionalChildren):
1773         * bindings/js/JSXMLHttpRequestCustom.cpp:
1774         (WebCore::JSXMLHttpRequest::visitAdditionalChildren):
1775         * bindings/js/JSXPathResultCustom.cpp:
1776         (WebCore::JSXPathResult::visitAdditionalChildren):
1777         * dom/ContainerNodeAlgorithms.cpp:
1778         (WebCore::notifyChildNodeInserted):
1779         (WebCore::notifyChildNodeRemoved):
1780
1781 2016-12-12  Sam Weinig  <sam@webkit.org>
1782
1783         [WebIDL] Remove use of Dictionary in ApplePaySession
1784         https://bugs.webkit.org/show_bug.cgi?id=165787
1785
1786         Reviewed by Anders Carlsson.
1787
1788         First take at generating the bindings for ApplePaySession and removing
1789         all use of Dictionary.
1790         
1791         - Removes all use of Dictionary!
1792         - Removes use of logging errors to the console with improved Exception messages.
1793         - Use ExceptionOr extensively to pass exception state.
1794         
1795         Still to do:
1796             - Reconcile / merge ApplePaySession::PaymentRequest with WebCore::PaymentRequest
1797               and all the sub-objects held within.
1798             - Remove PaymentRequestValidator entirely, merging validation into the validation
1799               we already do in ApplePaySession.cpp
1800             - Make ApplePayEvents use generated dictionary creation code.
1801
1802         Test: http/tests/ssl/applepay/ApplePaySession.html
1803
1804         * Modules/applepay/ApplePaySession.cpp:
1805         (WebCore::convertAndValidate):
1806         (WebCore::canCallApplePaySessionAPIs):
1807         (WebCore::ApplePaySession::create):
1808         (WebCore::ApplePaySession::ApplePaySession):
1809         (WebCore::ApplePaySession::supportsVersion):
1810         (WebCore::ApplePaySession::canMakePayments):
1811         (WebCore::ApplePaySession::canMakePaymentsWithActiveCard):
1812         (WebCore::ApplePaySession::openPaymentSetup):
1813         (WebCore::ApplePaySession::begin):
1814         (WebCore::ApplePaySession::completeMerchantValidation):
1815         (WebCore::ApplePaySession::completeShippingMethodSelection):
1816         (WebCore::ApplePaySession::completeShippingContactSelection):
1817         (WebCore::ApplePaySession::completePaymentMethodSelection):
1818         (WebCore::ApplePaySession::didSelectShippingMethod):
1819         (WebCore::createContactFields): Deleted.
1820         (WebCore::toLineItemType): Deleted.
1821         (WebCore::isValidLineItemPropertyName): Deleted.
1822         (WebCore::createLineItem): Deleted.
1823         (WebCore::createLineItems): Deleted.
1824         (WebCore::createMerchantCapabilities): Deleted.
1825         (WebCore::createSupportedNetworks): Deleted.
1826         (WebCore::toShippingType): Deleted.
1827         (WebCore::isValidShippingMethodPropertyName): Deleted.
1828         (WebCore::createShippingMethod): Deleted.
1829         (WebCore::createShippingMethods): Deleted.
1830         (WebCore::isValidPaymentRequestPropertyName): Deleted.
1831         (WebCore::createPaymentRequest): Deleted.
1832         * Modules/applepay/ApplePaySession.h:
1833         Replace hand written dictionary extraction code with autogenerated code
1834         and hand written additional validation.
1835
1836         * Modules/applepay/ApplePaySession.idl:
1837         Add helper dictionaries and enums.
1838
1839         * Modules/applepay/PaymentRequestValidator.cpp:
1840         (WebCore::PaymentRequestValidator::validate):
1841         (WebCore::PaymentRequestValidator::validateTotal):
1842         (WebCore::validateCountryCode):
1843         (WebCore::validateCurrencyCode):
1844         (WebCore::validateMerchantCapabilities):
1845         (WebCore::validateSupportedNetworks):
1846         (WebCore::validateShippingMethod):
1847         (WebCore::validateShippingMethods):
1848         (WebCore::PaymentRequestValidator::PaymentRequestValidator): Deleted.
1849         (WebCore::PaymentRequestValidator::~PaymentRequestValidator): Deleted.
1850         (WebCore::PaymentRequestValidator::validateCountryCode): Deleted.
1851         (WebCore::PaymentRequestValidator::validateCurrencyCode): Deleted.
1852         (WebCore::PaymentRequestValidator::validateMerchantCapabilities): Deleted.
1853         (WebCore::PaymentRequestValidator::validateShippingMethod): Deleted.
1854         (WebCore::PaymentRequestValidator::validateSupportedNetworks): Deleted.
1855         (WebCore::PaymentRequestValidator::validateShippingMethods): Deleted.
1856         * Modules/applepay/PaymentRequestValidator.h:
1857         Instead of reporting the validation errors to the console, pass them in the exception.
1858         This allows us to remove the window member, and move the helpers to the implementation
1859         file as statics.
1860
1861         * WebCore.xcodeproj/project.pbxproj:
1862         Remove file.
1863
1864         * bindings/generic/IDLTypes.h:
1865         (WebCore::IDLObject::nullValue):
1866         (WebCore::IDLObject::isNullValue):
1867         (WebCore::IDLObject::extractValueFromNullable):
1868         Add nullability traits for IDLObject.
1869         
1870         * bindings/js/JSApplePaySessionCustom.cpp:
1871         Removed.
1872
1873 2016-12-13  Daniel Bates  <dabates@apple.com>
1874
1875         CSP: Teach the preload scanner about the 'nonce' attribute
1876         https://bugs.webkit.org/show_bug.cgi?id=161192
1877         <rdar://problem/28010354>
1878
1879         Reviewed by Darin Adler.
1880
1881         This patch was inspired by a similar Blink change:
1882         <https://chromium.googlesource.com/chromium/src/+/dde5487f380cf774e4c0e96ba7f88ea68e723907>
1883
1884         Preload external scripts and stylesheets whose HTML script and link elements have a nonce
1885         attribute that is listed in the Content Security Policy (CSP) of the page.
1886
1887         Currently the preload scanner ignores the nonce attribute on HTML script and link elements.
1888         So, WebKit does not preload their associated subresources unless the value of the src
1889         attribute or href attribute is whitelisted in the CSP of the page for script and link
1890         elements, respectively. Instead the preload scanner should recognize the nonce attribute on
1891         script and link elements and query the CSP of the page with it. If the nonce attribute is
1892         whitelisted then the request should be preloaded.
1893
1894         Tests: http/tests/loading/do-not-preload-css-blocked-by-csp.html
1895                http/tests/loading/do-not-preload-script-src-blocked-by-csp.html
1896                http/tests/loading/preload-css-with-csp-nonce.html
1897                http/tests/loading/preload-script-src-with-csp-nonce.html
1898
1899         * html/parser/HTMLPreloadScanner.cpp:
1900         (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest): Set the nonce on the
1901         PreloadRequest to the nonce that we found during the scan.
1902         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): For script and link tag names,
1903         save the value of the nonce attribute (if it has one).
1904         * html/parser/HTMLResourcePreloader.cpp:
1905         (WebCore::PreloadRequest::resourceRequest): Skip CSP policy check if the nonce is listed in
1906         the CSP of the page.
1907         * html/parser/HTMLResourcePreloader.h:
1908         (WebCore::PreloadRequest::setNonce): Added.
1909
1910 2016-12-13  Dave Hyatt  <hyatt@apple.com>
1911
1912         [CSS Parser] Rename CSSPrimitiveValue::UnitTypes to CSSPrimitiveValue::UnitType
1913         https://bugs.webkit.org/show_bug.cgi?id=165776
1914
1915         Reviewed by Zalan Bujtas.
1916
1917         * css/CSSCalculationValue.cpp:
1918         (WebCore::unitCategory):
1919         (WebCore::hasDoubleValue):
1920         (WebCore::determineCategory):
1921         (WebCore::CSSCalcExpressionNodeParser::parseValue):
1922         * css/CSSCalculationValue.h:
1923         * css/CSSPrimitiveValue.cpp:
1924         (WebCore::isValidCSSUnitTypeForDoubleConversion):
1925         (WebCore::isStringType):
1926         (WebCore::CSSPrimitiveValue::unitCategory):
1927         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1928         (WebCore::CSSPrimitiveValue::cleanup):
1929         (WebCore::CSSPrimitiveValue::computeLengthDouble):
1930         (WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
1931         (WebCore::CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor):
1932         (WebCore::CSSPrimitiveValue::getFloatValue):
1933         (WebCore::CSSPrimitiveValue::doubleValue):
1934         (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory):
1935         (WebCore::CSSPrimitiveValue::doubleValueInternal):
1936         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1937         * css/CSSPrimitiveValue.h:
1938         (WebCore::CSSPrimitiveValue::isFontRelativeLength):
1939         (WebCore::CSSPrimitiveValue::isLength):
1940         (WebCore::CSSPrimitiveValue::isResolution):
1941         (WebCore::CSSPrimitiveValue::createAllowingMarginQuirk):
1942         * css/CSSValue.h:
1943         * css/CSSValuePool.cpp:
1944         (WebCore::CSSValuePool::createValue):
1945         * css/CSSValuePool.h:
1946         (WebCore::CSSValuePool::createValue):
1947         * css/MediaQueryExp.cpp:
1948         (WebCore::featureWithValidDensity):
1949         (WebCore::MediaQueryExpression::MediaQueryExpression):
1950         * css/parser/CSSParserFastPaths.cpp:
1951         (WebCore::parseSimpleLength):
1952         (WebCore::parseSimpleLengthValue):
1953         (WebCore::parseColorIntOrPercentage):
1954         (WebCore::fastParseColorInternal):
1955         (WebCore::parseTransformTranslateArguments):
1956         (WebCore::parseTransformNumberArguments):
1957         * css/parser/CSSParserToken.cpp:
1958         (WebCore::cssPrimitiveValueUnitFromTrie):
1959         (WebCore::stringToUnitType):
1960         (WebCore::CSSParserToken::CSSParserToken):
1961         (WebCore::CSSParserToken::convertToPercentage):
1962         * css/parser/CSSParserToken.h:
1963         (WebCore::CSSParserToken::unitType):
1964         * css/parser/CSSPropertyParser.cpp:
1965         (WebCore::CSSPropertyParser::consumeTransformOrigin):
1966         (WebCore::consumeCounter):
1967         (WebCore::consumeAnimationName):
1968         (WebCore::consumePerspective):
1969         (WebCore::consumePositionLonghand):
1970         (WebCore::consumeCounterContent):
1971         (WebCore::consumeReflect):
1972         (WebCore::consumeGridBreadth):
1973         (WebCore::CSSPropertyParser::consumeFlex):
1974         * css/parser/CSSPropertyParserHelpers.cpp:
1975         (WebCore::CSSPropertyParserHelpers::CalcParser::consumeNumber):
1976         (WebCore::CSSPropertyParserHelpers::consumeInteger):
1977         (WebCore::CSSPropertyParserHelpers::consumeLength):
1978         (WebCore::CSSPropertyParserHelpers::consumePercent):
1979         (WebCore::CSSPropertyParserHelpers::consumeAngle):
1980         (WebCore::CSSPropertyParserHelpers::consumeTime):
1981         (WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
1982         (WebCore::CSSPropertyParserHelpers::consumeString):
1983         (WebCore::CSSPropertyParserHelpers::consumeUrl):
1984         (WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientPoint):
1985         (WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientColorStop):
1986         (WebCore::CSSPropertyParserHelpers::consumeCrossFade):
1987         (WebCore::CSSPropertyParserHelpers::consumeImageSet):
1988         (WebCore::CSSPropertyParserHelpers::consumeFilterFunction):
1989         * css/parser/MediaQueryParser.cpp:
1990         (WebCore::MediaQueryParser::readFeatureValue):
1991         * css/parser/SizesAttributeParser.cpp:
1992         (WebCore::SizesAttributeParser::computeLength):
1993         * css/parser/SizesAttributeParser.h:
1994         * dom/StyledElement.cpp:
1995         (WebCore::StyledElement::setInlineStyleProperty):
1996         (WebCore::StyledElement::addPropertyToPresentationAttributeStyle):
1997         * dom/StyledElement.h:
1998         * svg/SVGLengthValue.cpp:
1999         (WebCore::SVGLengthValue::toCSSPrimitiveValue):
2000
2001 2016-12-13  Eric Carlson  <eric.carlson@apple.com>
2002
2003         Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
2004         https://bugs.webkit.org/show_bug.cgi?id=165251
2005
2006         Reviewed by Youenn Fablet.
2007
2008         No new tests, fixes an API test.
2009
2010         * page/Settings.in: Delete mediaStreamEnabled and peerConnectionEnabled, we don't need a
2011         setting and a runtime feature.
2012
2013 2016-12-13  Antti Koivisto  <antti@apple.com>
2014
2015         REGRESSION (r198990): Cannot edit content inside <details> in wysiwyg editor
2016         https://bugs.webkit.org/show_bug.cgi?id=165757
2017
2018         Reviewed by Andreas Kling.
2019
2020         Test: fast/html/details-edit.html
2021
2022         -webkit-user-modify is reset on shadow boundary so it doesn't go through <details> shadow tree.
2023
2024         * css/StyleResolver.cpp:
2025         (WebCore::StyleResolver::styleForElement):
2026         (WebCore::StyleResolver::pseudoStyleForElement):
2027         (WebCore::StyleResolver::styleForPage):
2028         (WebCore::StyleResolver::applyMatchedProperties):
2029         * dom/Node.cpp:
2030         (WebCore::computeEditabilityFromComputedStyle):
2031         (WebCore::Node::computeEditability):
2032
2033             Make -webkit-user-modify (which we would want to get rid of completely eventually) have no effect in shadow trees.
2034             Check for contenteditable directly instead.
2035
2036         * html/HTMLInputElement.cpp:
2037         (WebCore::HTMLInputElement::createInnerTextStyle):
2038         * html/HTMLTextAreaElement.cpp:
2039         (WebCore::HTMLTextAreaElement::createInnerTextStyle):
2040         * html/shadow/TextControlInnerElements.cpp:
2041         * rendering/RenderFlowThread.cpp:
2042         (WebCore::RenderFlowThread::createFlowThreadStyle):
2043         * rendering/RenderLayer.cpp:
2044         (WebCore::RenderLayer::calculateClipRects):
2045         * rendering/RenderListItem.cpp:
2046         (WebCore::RenderListItem::styleDidChange):
2047         * rendering/style/RenderStyle.cpp:
2048         (WebCore::RenderStyle::createAnonymousStyleWithDisplay):
2049         (WebCore::RenderStyle::createStyleInheritingFromPseudoStyle):
2050         (WebCore::RenderStyle::inheritFrom):
2051
2052             Let -webkit-user-modify inherit through shadow boundary as normal.
2053
2054         * rendering/style/RenderStyle.h:
2055
2056 2016-12-12  Darin Adler  <darin@apple.com>
2057
2058         Remove bindings generation support for legacy WebCore::Dictionary
2059         https://bugs.webkit.org/show_bug.cgi?id=165762
2060
2061         Reviewed by Sam Weinig.
2062
2063         After this patch, all use of legacy WebCore::Dictionary is within custom bindings or
2064         inside the DOM code itself. Bindings generation machinery no longer has a special
2065         type named "Dictionary" but has increasingly good support for IDL-defined dictionaries.
2066
2067         * Modules/applepay/ApplePaySession.cpp:
2068         (WebCore::ApplePaySession::create): Take ExecState and a JSValue rather than a Dictionary.
2069         (WebCore::ApplePaySession::completeMerchantValidation): Ditto.
2070         * Modules/applepay/ApplePaySession.h: Updated for the above changes.
2071         * Modules/applepay/ApplePaySession.idl: For this last file using Dictionary in IDL, move
2072         to "[CallWith=ScriptState]" and "any" as a stopgap. Later we can return and use IDL
2073         dictionaries or other more modern solutions.
2074
2075         * Modules/mediastream/MediaDevices.idl: For the custom binding written in JavaScript,
2076         use the type mentioned in the specification rather than Dictionary. The bindings generator
2077         ignores the type, so this is more like changing a comment rather than changing source code.
2078
2079         * Modules/mediastream/RTCPeerConnection.js:
2080         (initializeRTCPeerConnection): Refer to a non-object as not a valid "dictionary", lowercase
2081         rather than "Dictionary".
2082         * Modules/mediastream/RTCPeerConnectionInternals.js:
2083         (callbacksAndDictionaryOverload): Ditto.
2084
2085         * bindings/generic/IDLTypes.h: Removed IDLLegacyDictionary.
2086
2087         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
2088         (WebCore::getHashAlgorithm): Fixed a comment.
2089
2090         * bindings/js/JSDOMConvert.h:
2091         (WebCore::Converter<IDLLegacyDictionary<T>>::convert): Deleted.
2092
2093         * bindings/scripts/CodeGenerator.pm:
2094         (IsBuiltinType): Removed special case for "Dictionary".
2095         * bindings/scripts/CodeGeneratorJS.pm:
2096         (AddToIncludesForIDLType): Ditto.
2097         (AreTypesDistinguishableForOverloadResolution): Ditto.
2098         (GenerateOverloadedFunctionOrConstructor): Ditto.
2099         (GenerateParametersCheck): Ditto.
2100         (GetBaseIDLType): Ditto.
2101
2102         * bindings/scripts/test/JS/JSTestObj.cpp: Regenerated results.
2103         * bindings/scripts/test/TestObj.idl: Removed test case for Dictionary.
2104
2105 2016-12-12  Chris Dumez  <cdumez@apple.com>
2106
2107         Drop unnecessary null check in removeDetachedChildrenInContainer()
2108         https://bugs.webkit.org/show_bug.cgi?id=165778
2109
2110         Reviewed by Alex Christensen.
2111
2112         Drop unnecessary null check in removeDetachedChildrenInContainer().
2113         Node cannot be null but we do an implicit null check.
2114
2115         No new tests, no Web-exposed behavior change.
2116
2117         * dom/ContainerNodeAlgorithms.cpp:
2118         (WebCore::removeDetachedChildrenInContainer):
2119
2120 2016-12-12  Chris Dumez  <cdumez@apple.com>
2121
2122         Add Document.onvisibilitychange event handler attribute
2123         https://bugs.webkit.org/show_bug.cgi?id=165784
2124
2125         Reviewed by Daniel Bates.
2126
2127         Add Document.onvisibilitychange event handler attribute as per Page
2128         Visibility Level 2 API:
2129         - http://w3c.github.io/page-visibility/#onvisiblitychange-event-handler
2130
2131         Test: fast/events/page-visibility-onvisibilitychange.html
2132
2133         * dom/Document.idl:
2134
2135 2016-12-12  Dean Jackson  <dino@apple.com>
2136
2137         [iOS] MediaDocument "Done" button should navigate the page back
2138         https://bugs.webkit.org/show_bug.cgi?id=165779
2139
2140         Reviewed by Sam Weinig.
2141
2142         Detect if the exit from fullscreen was caused by the Done button,
2143         and if so, tell the page to navigate back.
2144
2145         Unfortunately this is not yet testable. It's waiting on the
2146         UI-based device testing in development by the media team.
2147
2148         * platform/cocoa/WebVideoFullscreenModel.h: Add a finishedWithMedia parameter to
2149         requestFullscreenMode, to indicate if the change in mode is associated with
2150         the closing of the media document.
2151         * platform/cocoa/WebVideoFullscreenModelVideoElement.h:
2152         * platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
2153         (WebVideoFullscreenModelVideoElement::requestFullscreenMode): If we're a media
2154         document, and we say we're finished with the media, tell the document
2155         to navigate back a page.
2156         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2157         (WebVideoFullscreenControllerContext::requestFullscreenMode):
2158         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2159         (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):
2160
2161 2016-12-12  Zalan Bujtas  <zalan@apple.com>
2162
2163         Infinite recursion when viewport is set to the size of the content but the content overflows the viewport.
2164         https://bugs.webkit.org/show_bug.cgi?id=165775
2165         rdar://problem/29366628
2166
2167         Reviewed by Simon Fraser.
2168
2169         In certain cases when the viewport is sized to accomodate the content and
2170         the content always overflows the viewport, we might end up in recursive FrameView::layout calls.
2171         This is specific to content with viewport units, because we always invalidate elements with vw/vh units on
2172         viewport size change. However if this viewport size change is in response to content size change (layout), 
2173         invalidating elements could trigger synchronous layout, while we are still inside this current layout.
2174         This is very similar to the m_setNeedsLayoutWasDeferred case and they should eventually be merged.
2175         It also means that we might be behind by one layout on elements with vw/vh units (fixed layout only though).
2176
2177         Currently not testable.
2178
2179         * page/FrameView.cpp:
2180         (WebCore::FrameView::availableContentSizeChanged):
2181
2182 2016-12-12  Keith Rollin  <krollin@apple.com>
2183
2184         Memory warning logging appears to capture resident footprint, missing compress/swap.
2185         https://bugs.webkit.org/show_bug.cgi?id=165533
2186         <rdar://problem/29318410>
2187
2188         Reviewed by Andreas Kling.
2189
2190         Have platformMemoryUsage return both resident and resident + swapped
2191         values. This is now returned as a struct in a std::optional to better
2192         support cases where values cannot or are not returned. Report these
2193         values in logMemoryUsageChange.
2194
2195         Remove most of the ReliefLogger instances and their messages. We no
2196         longer free up fastMalloc memory after each memory-release operation,
2197         so there are no memory regions returned to the OS. Instead, we now
2198         free up fastMalloc memory regions at the end of all memory-releasing
2199         operations in one fell swoop and report a grand total of memory
2200         returned.
2201
2202         No new tests -- no changes to user accessible functionality.
2203
2204         * page/MemoryRelease.cpp:
2205         (WebCore::releaseNoncriticalMemory):
2206         (WebCore::releaseCriticalMemory):
2207         (WebCore::releaseMemory):
2208         * page/cocoa/MemoryReleaseCocoa.mm:
2209         (WebCore::platformReleaseMemory):
2210         * platform/MemoryPressureHandler.cpp:
2211         (WebCore::MemoryPressureHandler::releaseMemory):
2212         (WebCore::MemoryPressureHandler::ReliefLogger::logMemoryUsageChange):
2213         (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
2214         * platform/MemoryPressureHandler.h:
2215         (WebCore::MemoryPressureHandler::ReliefLogger::ReliefLogger):
2216         (WebCore::MemoryPressureHandler::ReliefLogger::~ReliefLogger):
2217         (WebCore::MemoryPressureHandler::ReliefLogger::loggingEnabled):
2218         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2219         (WebCore::MemoryPressureHandler::platformReleaseMemory):
2220         (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
2221         * platform/linux/MemoryPressureHandlerLinux.cpp:
2222         * platform/win/MemoryPressureHandlerWin.cpp:
2223         (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
2224
2225 2016-12-12  Chris Dumez  <cdumez@apple.com>
2226
2227         Document.visibilityState should use an IDL string enumeration
2228         https://bugs.webkit.org/show_bug.cgi?id=165774
2229
2230         Reviewed by Daniel Bates.
2231
2232         Document.visibilityState should use an IDL string enumeration:
2233         - http://w3c.github.io/page-visibility/#extensions-to-the-document-interface
2234
2235         No new tests, there should be no Web-exposed behavior change.
2236
2237         * CMakeLists.txt:
2238         * Modules/vibration/NavigatorVibration.cpp:
2239         (WebCore::NavigatorVibration::vibrate):
2240         * WebCore.xcodeproj/project.pbxproj:
2241         * dom/Document.cpp:
2242         (WebCore::Document::hidden):
2243         (WebCore::Document::pageVisibilityState): Deleted.
2244         (WebCore::Document::visibilityState): Deleted.
2245         * dom/Document.h:
2246         * dom/Document.idl:
2247         * page/Page.cpp:
2248         (WebCore::Page::visibilityState):
2249         * page/PageVisibilityState.cpp: Removed.
2250         * page/PageVisibilityState.h:
2251         (): Deleted.
2252
2253 2016-12-12  Jer Noble  <jer.noble@apple.com>
2254
2255         Remove implementation of legacy Mozilla-based Fullscreen API.
2256         https://bugs.webkit.org/show_bug.cgi?id=165689
2257
2258         Reviewed by Eric Carlson.
2259
2260         Alias the legacy webkitRequestFull_S_creen() function on Element to webkitRequestFull_s_creen().
2261         Remove the custom behavior in Document::requestFullScreenForElement() to handle the legacy path.
2262
2263         * dom/Document.cpp:
2264         (WebCore::Document::requestFullScreenForElement):
2265         * dom/Document.h:
2266         * dom/Element.cpp:
2267         (WebCore::Element::webkitRequestFullscreen):
2268         (WebCore::Element::webkitRequestFullScreen): Deleted.
2269         * dom/Element.h:
2270         * dom/Element.idl:
2271         * html/HTMLMediaElement.cpp:
2272         (WebCore::HTMLMediaElement::enterFullscreen):
2273         * html/shadow/MediaControlElements.cpp:
2274         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
2275
2276 2016-12-12  Zalan Bujtas  <zalan@apple.com>
2277
2278         The CSS 'columns' property when set on the <body> element makes short columns
2279         https://bugs.webkit.org/show_bug.cgi?id=164891
2280
2281         Reviewed by Darin Adler and David Hyatt.
2282
2283         Currently when the body has auto height, we use the height of the viewport as
2284         the available height for the columns defined on the body element.
2285         This is the desired behaviour for paginated content.
2286         However in case of a simple, non-paginated multicolumn context, we should let the columns grow beyond
2287         the viewport vertically. This is also what other browsers do.
2288         This patch sets the available height on columns (in non-paginated context) only if the logical height
2289         is defined (we are right before layout, so applying non-defined values does not make much sense anyway).
2290         The reason why it is only broken on the <body> is because it stretches to the viewport by
2291         default (see stretchesToViewport()) while other block renderers do not.
2292
2293         Test: fast/multicol/columns-on-body.html
2294
2295         * rendering/RenderBlockFlow.cpp:
2296         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
2297
2298 2016-12-09  Dean Jackson  <dino@apple.com>
2299
2300         Autoplay isn't working in iPhone MediaDocuments
2301         https://bugs.webkit.org/show_bug.cgi?id=165710
2302         <rdar://problems/29606761>
2303
2304         Reviewed by Darin Adler.
2305
2306         Our silent video autoplay detection disabled autoplay
2307         of videos in MediaDocuments.
2308
2309         Test: media/ios/autoplay-only-in-main-document.html
2310
2311         * html/MediaElementSession.cpp:
2312         (WebCore::MediaElementSession::playbackPermitted):
2313         Return true if we're in a top-level media document.
2314
2315 2016-12-12  Zan Dobersek  <zdobersek@igalia.com>
2316
2317         Unreviewed. Fixing build breakage in GStreamer's WebKitCommonEncryptionDecryptorGStreamer.
2318
2319         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
2320         (webkitMediaCommonEncryptionDecryptTransformInPlace):
2321         WTF::Seconds should be used instead of std::chrono::seconds.
2322
2323 2016-12-11  Simon Fraser  <simon.fraser@apple.com>
2324
2325         REGRESSION (r200283): Transform, overflow hidden and filter combination completely hides the element
2326         https://bugs.webkit.org/show_bug.cgi?id=161509
2327
2328         Reviewed by David Hyatt.
2329         
2330         When the filter painting code needs to recompute a paintDirtyRect, it was using selfClipRect() 
2331         which is obviously wrong because it returns a rect in absolute coordinates. Use code factored
2332         out of localClipRect() instead, which returns a rect relative to the painting root.
2333
2334         Test: css3/filters/filter-on-overflow-hidden.html
2335
2336         * rendering/RenderLayer.cpp:
2337         (WebCore::RenderLayer::paintLayerContents):
2338
2339 2016-12-11  Saam Barati  <sbarati@apple.com>
2340
2341         We should be able to throw exceptions from Wasm code and when Wasm frames are on the stack
2342         https://bugs.webkit.org/show_bug.cgi?id=165429
2343
2344         Reviewed by Keith Miller.
2345
2346         * bindings/js/JSDOMBinding.cpp:
2347         (WebCore::GetCallerGlobalObjectFunctor::operator()):
2348
2349 2016-12-11  Darin Adler  <darin@apple.com>
2350
2351         Remove uses of Dictionary in WebRTC IDL files
2352         https://bugs.webkit.org/show_bug.cgi?id=165736
2353
2354         Reviewed by Sam Weinig.
2355
2356         Also removed quite a bit of unused code. There were some mocks that were out of date and
2357         no longer matched the types used in the real code, that also were no longer hooked up,
2358         and other types of dead code. We will have to implement anew when we want to restore tests
2359         like the ones these were intended to enable.
2360
2361         * CMakeLists.txt: Updated for all the removed files.
2362
2363         * Modules/mediastream/MediaEndpointPeerConnection.cpp: Moved some types in here
2364         that don't need to be in the header.
2365         (WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection): Use make_unique.
2366         (WebCore::MediaEndpointPeerConnection::setConfiguration): Changed argument type,
2367         obviating the need for most of the code that was here.
2368         * Modules/mediastream/MediaEndpointPeerConnection.h: Updated for the above. Made more
2369         things private and final. Marked the constructor explicit. Removed unneeded includes.
2370
2371         * Modules/mediastream/PeerConnectionBackend.h: Removed unneeded includes and forward
2372         declarations. Changed the argument type for setConfiguration (see above).
2373
2374         * Modules/mediastream/RTCConfiguration.cpp: Removed.
2375         None of the code here was needed except for the ICE server validation, and that was
2376         moved into RTCPeerConnection::setConfiguration.
2377         * Modules/mediastream/RTCConfiguration.h: Changed this from a class to a struct since
2378         this is now a dictionary rather than an interface.
2379         * Modules/mediastream/RTCConfiguration.idl: Changed this from an interface to a dictionary.
2380
2381         * Modules/mediastream/RTCDTMFSender.cpp: Removed some of the code from this file. This
2382         class currently isn't implemented, but was depending on RTCPeerConnectionHandler. I removed
2383         some of the dead code. Someone will have to straighten this out so we can turn it back on.
2384         * Modules/mediastream/RTCDTMFSender.h: Ditto.
2385
2386         * Modules/mediastream/RTCDataChannel.cpp: Updated includes.
2387
2388         * Modules/mediastream/RTCIceCandidate.cpp:
2389         (WebCore::RTCIceCandidate::create): Removed most of the code, since this now takes
2390         a structure rather than a WebCore::Dictionary, and so the bindings take care of the work.
2391         * Modules/mediastream/RTCIceCandidate.h: Updated for the above.
2392         * Modules/mediastream/RTCIceCandidate.idl: Changed the constructor to take a
2393         RTCIceCandidateInit instead of a Dictionary.
2394
2395         * Modules/mediastream/RTCIceServer.h: Changed this from a class to a struct since
2396         this is now a dictionary rather than an interface.
2397         * Modules/mediastream/RTCIceServer.idl: Changed this from an interface to a dictionary.
2398
2399         * Modules/mediastream/RTCPeerConnection.cpp:
2400         (WebCore::RTCPeerConnection::initializeWith): Take an RTCConfiguration rather than
2401         a Dictionary.
2402         (WebCore::RTCPeerConnection::getConfiguration): Moved to header, now an inline.
2403         (WebCore::RTCPeerConnection::setConfiguration): Use the configuration dictionary now instead
2404         of the configuration class. Also moved validation of server URLs here, formerly in the
2405         RTCConfiguration RTCConfiguration::initialize function. Also moved code to convert from
2406         RTCConfiguration to MediaEndpointConfiguration here, formerly in
2407         MediaEndpointPeerConnection::setConfiguration.
2408         * Modules/mediastream/RTCPeerConnection.h: Updated for the above.
2409         * Modules/mediastream/RTCPeerConnection.idl: Changed argument to initializeWith and
2410         setConfiguration from Dictionary to RTCConfiguration.
2411
2412         * Modules/mediastream/RTCSessionDescription.cpp:
2413         (WebCore::parseTypeString): Deleted.
2414         (WebCore::RTCSessionDescription::create): Changed to take struct instead of Dictionary.
2415         * Modules/mediastream/RTCSessionDescription.h: Added Init struct and changed create to
2416         take it.
2417         * Modules/mediastream/RTCSessionDescription.idl: Changed constructor argument to take
2418         RTCSessionDescriptionInit dictionary instead of Dictionary.
2419
2420         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp: Updated includes.
2421
2422         * WebCore.xcodeproj/project.pbxproj: Updated for all the removed files.
2423
2424         * bindings/scripts/CodeGeneratorJS.pm:
2425         (GenerateDictionaryImplementationContent): Fixed convertDictionaryToJS to work with other
2426         nullable types besides RefPtr.
2427         * bindings/scripts/test/JS/JSTestObj.cpp: Regenerated.
2428
2429         * platform/mediastream/RTCConfigurationPrivate.h: Removed.
2430         * platform/mediastream/RTCIceServerPrivate.h: Removed.
2431         * platform/mediastream/RTCPeerConnectionHandler.cpp: Removed.
2432         * platform/mediastream/RTCPeerConnectionHandler.h: Removed.
2433         * platform/mock/RTCDTMFSenderHandlerMock.cpp: Removed.
2434         * platform/mock/RTCDTMFSenderHandlerMock.h: Removed.
2435
2436         * platform/mock/RTCDataChannelHandlerMock.h: Updated includes, made more things private and final.
2437
2438         * platform/mock/RTCPeerConnectionHandlerMock.cpp: Removed.
2439         * platform/mock/RTCPeerConnectionHandlerMock.h: Removed.
2440
2441         * testing/Internals.cpp:
2442         (WebCore::Internals::Internals): Removed call to enableMockRTCPeerConnectionHandler.
2443         (WebCore::Internals::enableMockRTCPeerConnectionHandler): Deleted.
2444
2445 2016-12-11  Darin Adler  <darin@apple.com>
2446
2447         Use std::vsnprintf instead of vasprintf
2448         https://bugs.webkit.org/show_bug.cgi?id=165740
2449
2450         Reviewed by Sam Weinig.
2451
2452         * platform/FileHandle.cpp:
2453         (WebCore::FileHandle::printf): Use vsnprintf, including StringExtras.h to
2454         ensure compatibility with older versions of the Visual Studio library,
2455         and Vector for the buffer. Use inline capacity in the vector so we normally
2456         don't need to allocate any memory on the heap.
2457         * xml/XSLTUnicodeSort.cpp:
2458         (xsltTransformErrorTrampoline): Ditto.
2459         * xml/parser/XMLDocumentParserLibxml2.cpp:
2460         (WebCore::XMLDocumentParser::error): Ditto.
2461
2462 2016-12-11  Darin Adler  <darin@apple.com>
2463
2464         Make some refinements to HTMLPlugInImageElement
2465         https://bugs.webkit.org/show_bug.cgi?id=165742
2466
2467         Reviewed by Sam Weinig.
2468
2469         * html/HTMLPlugInImageElement.cpp: Removed many unneeded includes.
2470         (WebCore::titleText): Use HashMap::ensure, correct argument types.
2471         (WebCore::subtitleText): Ditto.
2472         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Moved
2473         initialization of most scalars to the class definition.
2474         (WebCore::HTMLPlugInImageElement::isImageType): Use auto.
2475         (WebCore::HTMLPlugInImageElement::wouldLoadAsPlugIn): Removed
2476         unneeded local variable and if statement.
2477         (WebCore::HTMLPlugInImageElement::willDetachRenderers): Use auto.
2478         (WebCore::HTMLPlugInImageElement::updateSnapshot): Do not call
2479         renderer twice unnecessarily.
2480         (WebCore::plugInImageElementIsolatedWorld): Use auto.
2481         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Use auto.
2482         (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay): Use auto.
2483         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns): Got rid of
2484         unnecessary typedef.
2485         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Take a
2486         reference rather than PassRefPtr.
2487         (WebCore::documentHadRecentUserGesture): Removed unneeded if.
2488         (WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting): Use auto.
2489         (WebCore::isSmallerThanTinySizingThreshold): Use auto.
2490         (WebCore::HTMLPlugInImageElement::isTopLevelFullPagePlugin): Use auto.
2491         (WebCore::HTMLPlugInImageElement::checkSnapshotStatus): Use auto.
2492         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Got rid
2493         of unnecessary local variable. Use auto.
2494         (WebCore::HTMLPlugInImageElement::requestObject): Got rid of unnecessary
2495         local variable.
2496         * html/HTMLPlugInImageElement.h: Updated for the above. Removed incorrect
2497         use of const. Initialized all scalars. Made function private and final.
2498
2499         * rendering/RenderSnapshottedPlugIn.cpp:
2500         (WebCore::RenderSnapshottedPlugIn::handleEvent): Pass reference instead
2501         of pointer.
2502
2503 2016-12-11  Joseph Pecoraro  <pecoraro@apple.com>
2504
2505         Web Inspector: Cleanup some InspectorInstrumentation network loading notifications
2506         https://bugs.webkit.org/show_bug.cgi?id=165688
2507
2508         Reviewed by Brian Burg.
2509
2510         Eliminate InspectorInstrumentation::willReceiveResourceResponse by folding
2511         it into InspectorInstrumentation::didReceiveResourceResponse. Simplify other
2512         related InspectorInstrumentation calls by using references and using more
2513         consistent InspectorInstrumentation patterns.
2514
2515         * inspector/InspectorInstrumentation.cpp:
2516         (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
2517         (WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl): Deleted.
2518         (WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl): Deleted.
2519         (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl): Deleted.
2520         (WebCore::InspectorInstrumentation::continueWithPolicyDownloadImpl): Deleted.
2521         (WebCore::InspectorInstrumentation::continueWithPolicyIgnoreImpl): Deleted.
2522         * inspector/InspectorInstrumentation.h:
2523         (WebCore::InspectorInstrumentation::didReceiveResourceResponse):
2524         (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
2525         (WebCore::InspectorInstrumentation::continueWithPolicyDownload):
2526         (WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
2527         (WebCore::InspectorInstrumentation::willReceiveResourceResponse): Deleted.
2528         * loader/CrossOriginPreflightChecker.cpp:
2529         (WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
2530         * loader/DocumentLoader.cpp:
2531         (WebCore::DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied):
2532         (WebCore::DocumentLoader::continueAfterContentPolicy):
2533         * loader/ResourceLoadNotifier.cpp:
2534         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
2535         * loader/appcache/ApplicationCacheGroup.cpp:
2536         (WebCore::ApplicationCacheGroup::didReceiveResponse):
2537
2538 2016-12-11  Eric Carlson  <eric.carlson@apple.com>
2539
2540         [MediaStream] Protect MediaDevicesRequest during callback
2541         https://bugs.webkit.org/show_bug.cgi?id=165711
2542         <rdar://problem/28400468>
2543
2544         Reviewed by Sam Weinig.
2545
2546         No new tests, I was unable to create a reproducible test but this fix avoids
2547         an occasional crash in existing tests.
2548
2549         * Modules/mediastream/MediaDevicesEnumerationRequest.cpp:
2550         (WebCore::MediaDevicesEnumerationRequest::start): Take a reference to the object
2551         before calling the controller in case the completion handler is called synchronously.
2552
2553 2016-12-09  Filip Pizlo  <fpizlo@apple.com>
2554
2555         The DOM should have an advancing wavefront opaque root barrier
2556         https://bugs.webkit.org/show_bug.cgi?id=165712
2557
2558         Reviewed by Yusuke Suzuki.
2559
2560         No new tests because this was covered by crashing tests.
2561         
2562         Consider these two cases:
2563         
2564            Removal:
2565            1) DOM at start: D->X->Y
2566            2) Mark X, X->visitChildren, addOpaqueRoot(D)
2567            3) remove X
2568            4) Y thinks it's not reachable (its opaque root, X, is not in the set).
2569            
2570            Insertion:
2571            1) DOM at start: D, X->Y
2572            2) Mark X, X->visitChildren, addOpaqueRoot(X)
2573            3) insert X into D
2574            4) Y thinks it's not reachable (its opaque root, D, is not in the set).
2575         
2576         We can fix this with two barriers:
2577         
2578            Removal: add X (the removed child) to the opaque root set.
2579            Insertion: add D (the insertion point) to the opaque root set.
2580         
2581         Thanks Rysosuke for coming up with this idea!
2582         
2583         Both barriers advance the wavefront. We could consider retreating wavefront barriers in
2584         the future (where we cause visitChildren to be called again on wrappers that belonged to
2585         roots that got affected by insertion/removal) but those would probably require more
2586         bookkeeping.
2587         
2588         To make this barrier very fast, the WebCore caches the JSC VM's barrier state in
2589         its own global variable for very fast access. This variable will be false most of the
2590         time. It's false when there is no VM, so triggering the barrier won't cause the VM to be
2591         created. It's only true when GC is running, which is rare by design.
2592         
2593         To make that caching more sensible, I finally gave WebCore a central header for
2594         the common VM (CommonVM.h).
2595
2596         * CMakeLists.txt:
2597         * Modules/mediastream/SDPProcessor.cpp:
2598         (WebCore::SDPProcessor::callScript):
2599         * WebCore.xcodeproj/project.pbxproj:
2600         * bindings/js/CommonVM.cpp: Added.
2601         (WebCore::commonVMSlow):
2602         (WebCore::writeBarrierOpaqueRootSlow):
2603         * bindings/js/CommonVM.h: Added.
2604         (WebCore::commonVM):
2605         (WebCore::writeBarrierOpaqueRoot):
2606         * bindings/js/DOMWrapperWorld.cpp:
2607         (WebCore::mainThreadNormalWorld):
2608         * bindings/js/GCController.cpp:
2609         (WebCore::collect):
2610         (WebCore::GCController::garbageCollectSoon):
2611         (WebCore::GCController::garbageCollectNow):
2612         (WebCore::GCController::garbageCollectNowIfNotDoneRecently):
2613         (WebCore::GCController::setJavaScriptGarbageCollectorTimerEnabled):
2614         (WebCore::GCController::deleteAllCode):
2615         (WebCore::GCController::deleteAllLinkedCode):
2616         * bindings/js/JSCustomXPathNSResolver.cpp:
2617         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2618         * bindings/js/JSDOMBinding.cpp:
2619         (WebCore::addImpureProperty):
2620         * bindings/js/JSDOMWindowBase.cpp:
2621         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
2622         (WebCore::JSDOMWindowBase::commonVM): Deleted.
2623         * bindings/js/JSDOMWindowBase.h:
2624         * bindings/js/JSDOMWindowShell.cpp:
2625         (WebCore::JSDOMWindowShell::setWindow):
2626         * bindings/js/JSNodeCustom.h:
2627         (WebCore::root):
2628         * bindings/js/ScriptCachedFrameData.cpp:
2629         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
2630         (WebCore::ScriptCachedFrameData::restore):
2631         (WebCore::ScriptCachedFrameData::clear):
2632         * bindings/js/ScriptController.cpp:
2633         (WebCore::ScriptController::~ScriptController):
2634         (WebCore::ScriptController::createWorld):
2635         (WebCore::ScriptController::getAllWorlds):
2636         (WebCore::ScriptController::clearWindowShell):
2637         (WebCore::ScriptController::cacheableBindingRootObject):
2638         (WebCore::ScriptController::bindingRootObject):
2639         (WebCore::ScriptController::windowScriptNPObject):
2640         (WebCore::ScriptController::jsObjectForPluginElement):
2641         (WebCore::ScriptController::clearScriptObjects):
2642         * dom/CollectionIndexCache.cpp:
2643         (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
2644         * dom/ContainerNode.cpp:
2645         * dom/ContainerNodeAlgorithms.cpp:
2646         (WebCore::notifyChildNodeInserted):
2647         (WebCore::notifyChildNodeRemoved):
2648         * dom/Document.cpp:
2649         (WebCore::Document::shouldBypassMainWorldContentSecurityPolicy):
2650         * dom/Node.h:
2651         (WebCore::Node::opaqueRoot):
2652         * dom/ScriptExecutionContext.cpp:
2653         (WebCore::ScriptExecutionContext::vm):
2654         * html/HTMLImageLoader.cpp:
2655         (WebCore::HTMLImageLoader::notifyFinished):
2656         * html/HTMLMediaElement.cpp:
2657         (WebCore::HTMLMediaElement::pauseAfterDetachedTask):
2658         (WebCore::HTMLMediaElement::ensureIsolatedWorld):
2659         * html/HTMLPlugInImageElement.cpp:
2660         (WebCore::plugInImageElementIsolatedWorld):
2661         * inspector/InspectorController.cpp:
2662         (WebCore::InspectorController::vm):
2663         * inspector/PageScriptDebugServer.cpp:
2664         (WebCore::PageScriptDebugServer::PageScriptDebugServer):
2665         * page/PerformanceLogging.cpp:
2666         (WebCore::PerformanceLogging::memoryUsageStatistics):
2667         (WebCore::PerformanceLogging::javaScriptObjectCounts):
2668         * page/ResourceUsageThread.cpp:
2669         (WebCore::ResourceUsageThread::createThreadIfNeeded):
2670         * svg/graphics/SVGImage.cpp:
2671         (WebCore::SVGImage::reportApproximateMemoryCost):
2672         * testing/MemoryInfo.h:
2673         (WebCore::MemoryInfo::MemoryInfo):
2674
2675 2016-12-11  Dan Bernstein  <mitz@apple.com>
2676
2677         [Cocoa] NSAttributedString representation of text copied from -webkit-nbsp-mode:space element contains non-breaking space characters, but shouldn’t
2678         https://bugs.webkit.org/show_bug.cgi?id=165515
2679         <rdar://problem/4108460>
2680
2681         Reviewed by Darin Adler.
2682
2683         Test: platform/mac/fast/text/attributed-substring-from-range.html
2684
2685         * editing/cocoa/HTMLConverter.mm:
2686         (HTMLConverter::_processText): Emit a space instead of a non-breaking space if the text node
2687           is styled with -webkit-nbsp-mode:space.
2688         (WebCore::editingAttributedStringFromRange): Replace all non-breaking spaces with spaces if
2689           they come from a text node with -webkit-nbsp-mode:space.
2690
2691 2016-12-11  Konstantin Tokarev  <annulen@yandex.ru>
2692
2693         Unreviewed, add KHR include dir to fix ANGLE build after r209665
2694         https://bugs.webkit.org/show_bug.cgi?id=165686
2695
2696         * CMakeLists.txt:
2697
2698 2016-12-10  Dave Hyatt  <hyatt@apple.com>
2699
2700         Rolling out 165737, since it broke layout tests. I need to find a 
2701         different place to put the init.
2702
2703         * contentextensions/ContentExtensionParser.cpp:
2704         (WebCore::ContentExtensions::isValidSelector):
2705
2706 2016-12-10  Simon Fraser  <simon.fraser@apple.com>
2707
2708         Support the deprecated dictionary constructor for DOMPointReadOnly and DOMPoint
2709         https://bugs.webkit.org/show_bug.cgi?id=165732
2710
2711         Reviewed by Sam Weinig.
2712         
2713         For compatibility with other browsers, support the DOMPointInit constructor to
2714         DOMPoint and DOMPointReadOnly per <https://www.w3.org/TR/geometry-1/#DOMPoint>
2715
2716         Extended geometry/DOMPoint-001.html to test.
2717
2718         * dom/DOMPoint.h:
2719         * dom/DOMPoint.idl:
2720         * dom/DOMPointReadOnly.h:
2721         (WebCore::DOMPointReadOnly::create):
2722         * dom/DOMPointReadOnly.idl:
2723
2724 2016-12-10  Dave Hyatt  <hyatt@apple.com>
2725
2726         [CSS Parser] Make sure content extensions initialize AtomicString
2727         https://bugs.webkit.org/show_bug.cgi?id=165737
2728
2729         Reviewed by Simon Fraser.
2730
2731         Fixes two broken tests in TestWebkitAPI.
2732
2733         * contentextensions/ContentExtensionParser.cpp:
2734         (WebCore::ContentExtensions::isValidSelector):
2735
2736 2016-12-10  Simon Fraser  <simon.fraser@apple.com>
2737
2738         Animation followed by transition doesn't always fire transitionend event
2739         https://bugs.webkit.org/show_bug.cgi?id=165731
2740         rdar://problem/28471240
2741
2742         Reviewed by Zalan Bujtas.
2743         
2744         After r200047, a keyframe animation of an accelerated property followed by a
2745         transition didn't always fire a transitionend event.
2746         
2747         This happened if CompositeAnimation::timeToNextService() happend to be called
2748         when the transitions's timeToNextService() returned a positive value, but the
2749         keyframe animation still existed, but its timeToNextService() returned -1. In
2750         this case that -1 would clobber the positing minT.
2751
2752         Fix by just continuing in each loop when the timeToNextService() returns -1.
2753
2754         This code should probably be rewritten to use std::optional<double> rather than
2755         magic values.
2756
2757         Test: animations/animation-followed-by-transition.html
2758
2759         * page/animation/CompositeAnimation.cpp:
2760         (WebCore::CompositeAnimation::timeToNextService):
2761         * platform/graphics/ca/GraphicsLayerCA.cpp:
2762         (WebCore::GraphicsLayerCA::addAnimation):
2763         (WebCore::GraphicsLayerCA::pauseAnimation):
2764         (WebCore::GraphicsLayerCA::removeAnimation):
2765         (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
2766         (WebCore::GraphicsLayerCA::platformCALayerAnimationEnded):
2767
2768 2016-12-10  Sam Weinig  <sam@webkit.org>
2769
2770         [WebIDL] Merge JSDictionary into Dictionary, and remove unused bits
2771         https://bugs.webkit.org/show_bug.cgi?id=165641
2772
2773         Reviewed by Dan Bernstein.
2774
2775         * CMakeLists.txt:
2776         * WebCore.xcodeproj/project.pbxproj:
2777         * bindings/js/JSBindingsAllInOne.cpp:
2778         Remove JSDictionary.h/cpp
2779
2780         * Modules/mediastream/RTCDataChannel.cpp:
2781         Remove unused #include of Dictionary.h
2782
2783         * Modules/mediastream/RTCPeerConnection.cpp:
2784         * Modules/mediastream/RTCPeerConnection.h:
2785         Replace unnecessary #include of Dictionary in a header with forward declaration.
2786
2787         * bindings/js/Dictionary.cpp:
2788         (WebCore::Dictionary::Dictionary):
2789         (WebCore::Dictionary::tryGetProperty):
2790         (WebCore::Dictionary::getOwnPropertyNames):
2791         (WebCore::Dictionary::convertValue):
2792         (WebCore::Dictionary::asJSObject<Notification>): Deleted.
2793         (WebCore::Dictionary::getOwnPropertiesAsStringHashMap): Deleted.
2794         (WebCore::Dictionary::getWithUndefinedOrNullCheck): Deleted.
2795         * bindings/js/Dictionary.h:
2796         (WebCore::Dictionary::isObject):
2797         (WebCore::Dictionary::isUndefinedOrNull):
2798         (WebCore::Dictionary::execState):
2799         (WebCore::Dictionary::initializerObject):
2800         (WebCore::Dictionary::isValid):
2801         (WebCore::Dictionary::convertValue):
2802         (WebCore::Dictionary::get):
2803         (WebCore::Dictionary::tryGetPropertyAndResult):
2804         (WebCore::Dictionary::getEventListener): Deleted.
2805         Merge JSDictionary into Dictionary. Remove all unused functions (some getters, lots
2806         of convertValue overrides). Modernize to taste.
2807
2808         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
2809         (WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier):
2810         (WebCore::getHashAlgorithm):
2811         (WebCore::createHmacParams):
2812         (WebCore::createHmacKeyParams):
2813         (WebCore::createRsaKeyGenParams):
2814         (WebCore::createRsaOaepParams):
2815         (WebCore::createRsaSsaParams):
2816         Update for rename. JSDictionary is now Dictionary.
2817
2818         * bindings/js/JSDictionary.cpp: Removed.
2819         * bindings/js/JSDictionary.h: Removed.
2820
2821         * dom/MutationObserver.cpp:
2822         Remove unused #include of Dictionary.h
2823
2824 2016-12-10  Dave Hyatt  <hyatt@apple.com>
2825
2826         [CSS Parser] Move CSSParserValues.h/.cpp to CSSParserSelector.h/.cpp
2827         https://bugs.webkit.org/show_bug.cgi?id=165730
2828
2829         Reviewed by Simon Fraser.
2830
2831         * WebCore.xcodeproj/project.pbxproj:
2832         * css/CSSCustomPropertyValue.cpp:
2833         * css/CSSPrimitiveValue.cpp:
2834         * css/CSSSelectorList.cpp:
2835         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
2836         * css/parser/CSSParserImpl.cpp:
2837         * css/parser/CSSParserSelector.cpp: Copied from Source/WebCore/css/parser/CSSParserValues.cpp.
2838         * css/parser/CSSParserSelector.h: Copied from Source/WebCore/css/parser/CSSParserValues.h.
2839         * css/parser/CSSParserValues.cpp: Removed.
2840         * css/parser/CSSParserValues.h: Removed.
2841         * css/parser/CSSSelectorParser.h:
2842
2843 2016-12-10  Dave Hyatt  <hyatt@apple.com>
2844
2845         [CSS Parser] Remove the pseudoclass/element hacks
2846         https://bugs.webkit.org/show_bug.cgi?id=165729
2847
2848         Reviewed by Sam Weinig.
2849
2850         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
2851         * css/SelectorPseudoElementTypeMap.in:
2852         * css/parser/CSSSelectorParser.cpp:
2853         (WebCore::CSSSelectorParser::consumePseudo):
2854
2855 2016-12-09  Sam Weinig  <sam@webkit.org>
2856
2857         [WebIDL] Remove custom bindings for Geolocation
2858         https://bugs.webkit.org/show_bug.cgi?id=165625
2859
2860         Reviewed by Alex Christensen.
2861
2862         * CMakeLists.txt:
2863         * DerivedSources.cpp:
2864         * DerivedSources.make:
2865         * WebCore.xcodeproj/project.pbxproj:
2866         * bindings/js/JSBindingsAllInOne.cpp:
2867         Add/remove files.
2868
2869         * Modules/geolocation/GeoNotifier.cpp:
2870         (WebCore::GeoNotifier::GeoNotifier):
2871         (WebCore::GeoNotifier::hasZeroTimeout):
2872         (WebCore::GeoNotifier::startTimerIfNeeded):
2873         * Modules/geolocation/GeoNotifier.h:
2874         (WebCore::GeoNotifier::create):
2875         (WebCore::GeoNotifier::options):
2876         Update to store PositionOptions as a value, and pass the PositionCallback
2877         as a Ref, rather than a RefPtr, since it is not optional.
2878
2879         * Modules/geolocation/Geolocation.cpp:
2880         (WebCore::createGeoposition):
2881         Use auto, to get the good type for Coordinates (Ref).
2882
2883         (WebCore::Geolocation::getCurrentPosition):
2884         (WebCore::Geolocation::watchPosition):
2885         (WebCore::Geolocation::haveSuitableCachedPosition):
2886         (WebCore::Geolocation::startUpdating):
2887         * Modules/geolocation/Geolocation.h:
2888         Update to pass PositionOptions itself now that it is a plain struct.
2889
2890         * Modules/geolocation/Geolocation.idl:
2891         Remove [Custom] extended attribute and add FIXME about nullable annotation. 
2892
2893         * Modules/geolocation/Geoposition.h:
2894         Pass/store Coordinates as a Ref.
2895  
2896         * Modules/geolocation/PositionOptions.h:
2897         Convert to be a simple struct.
2898
2899         * Modules/geolocation/PositionOptions.idl:
2900         Added.
2901         
2902         * bindings/js/JSGeolocationCustom.cpp:
2903         Removed.
2904
2905 2016-12-09  Dave Hyatt  <hyatt@apple.com>
2906
2907         [CSS Parser] Remove the old CSS Parser
2908         https://bugs.webkit.org/show_bug.cgi?id=165645
2909
2910         Reviewed by Daniel Bates.
2911
2912         Remove the old CSS parser code. In doing so, code that used documentless
2913         CSSParserContexts is now going through the new parser. This resulted in
2914         some additional changes. These include:
2915
2916         (1) Canvas color parsing switched to new parser's code. This resulted in
2917         progressions on canvas tests.
2918
2919         (2) Support for CSSNamespaceRule in the CSS OM, since the Inspector's
2920         creation of CSS OM wrappers made it necessary to add this in. The old parser
2921         did not create style rules for namespaces, but the new one (and other browsers)
2922         did.
2923
2924         (3) <font face="X"> now uses the new parser's font-family parsing code. This
2925         change was made in createFontFaceValue in CSSValuePool.
2926
2927         (4) FontFace now uses a new function on the new parser called
2928         parseFontFaceDescriptor. This function sets things up so that parsing occurs
2929         as though you are inside a @font-face. The old parser let you call parseValue
2930         to parse "properties", but descriptors need to be handled differently in the
2931         new parser.
2932
2933         (5) Illegal CSS rules in mediaControlsApple/ios.css forced me to add a quirk
2934         to handle chained shadow DOM pseudo-elements. This should not be allowed, but
2935         for now it is.
2936
2937         * CMakeLists.txt:
2938         * DerivedSources.make:
2939         * WebCore.xcodeproj/project.pbxproj:
2940         * bindings/js/JSCSSRuleCustom.cpp:
2941         (WebCore::toJSNewlyCreated):
2942         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2943         * css/CSSCalculationValue.cpp:
2944         (WebCore::unitCategory):
2945         (WebCore::hasDoubleValue):
2946         (WebCore::checkDepthAndIndexDeprecated): Deleted.
2947         (WebCore::CSSCalcExpressionNodeParserDeprecated::parseCalc): Deleted.
2948         (WebCore::CSSCalcExpressionNodeParserDeprecated::operatorValue): Deleted.
2949         (WebCore::CSSCalcExpressionNodeParserDeprecated::parseValue): Deleted.
2950         (WebCore::CSSCalcExpressionNodeParserDeprecated::parseValueTerm): Deleted.
2951         (WebCore::CSSCalcExpressionNodeParserDeprecated::parseValueMultiplicativeExpression): Deleted.
2952         (WebCore::CSSCalcExpressionNodeParserDeprecated::parseAdditiveValueExpression): Deleted.
2953         (WebCore::CSSCalcExpressionNodeParserDeprecated::parseValueExpression): Deleted.
2954         * css/CSSCalculationValue.h:
2955         * css/CSSComputedStyleDeclaration.cpp:
2956         (WebCore::specifiedValueForGridTrackSize):
2957         * css/CSSCustomPropertyValue.cpp:
2958         (WebCore::CSSCustomPropertyValue::checkVariablesForCycles):
2959         (WebCore::CSSCustomPropertyValue::resolveVariableReferences):
2960         * css/CSSCustomPropertyValue.h:
2961         * css/CSSFunctionValue.cpp:
2962         (WebCore::CSSFunctionValue::CSSFunctionValue):
2963         (WebCore::CSSFunctionValue::customCSSText):
2964         (WebCore::CSSFunctionValue::append):
2965         (WebCore::CSSFunctionValue::buildParserValueSubstitutingVariables): Deleted.
2966         * css/CSSFunctionValue.h:
2967         * css/CSSGrammar.y.in: Removed.
2968         * css/CSSGrammar.y.includes: Removed.
2969         * css/CSSGroupingRule.cpp:
2970         (WebCore::CSSGroupingRule::insertRule):
2971         * css/CSSKeyframeRule.h:
2972         * css/CSSKeyframesRule.cpp:
2973         (WebCore::CSSKeyframesRule::appendRule):
2974         * css/CSSNamespaceRule.cpp: Added.
2975         (WebCore::CSSNamespaceRule::CSSNamespaceRule):
2976         (WebCore::CSSNamespaceRule::~CSSNamespaceRule):
2977         (WebCore::CSSNamespaceRule::namespaceURI):
2978         (WebCore::CSSNamespaceRule::prefix):
2979         (WebCore::CSSNamespaceRule::cssText):
2980         (WebCore::CSSNamespaceRule::reattach):
2981         * css/CSSNamespaceRule.h: Added.
2982         * css/CSSNamespaceRule.idl: Added.
2983         * css/CSSPrimitiveValue.cpp:
2984         (WebCore::isValidCSSUnitTypeForDoubleConversion):
2985         (WebCore::isStringType):
2986         (WebCore::CSSPrimitiveValue::cleanup):
2987         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
2988         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
2989         (WebCore::CSSPrimitiveValue::equals):
2990         (WebCore::CSSPrimitiveValue::buildParserValue): Deleted.
2991         * css/CSSPrimitiveValue.h:
2992         * css/CSSRule.h:
2993         * css/CSSRule.idl:
2994         * css/CSSStyleSheet.cpp:
2995         (WebCore::CSSStyleSheet::insertRule):
2996         * css/CSSValue.cpp:
2997         (WebCore::CSSValue::equals):
2998         (WebCore::CSSValue::cssText):
2999         (WebCore::CSSValue::destroy):
3000         * css/CSSValue.h:
3001         (WebCore::CSSValue::isCustomPropertyValue):
3002         (WebCore::CSSValue::hasVariableReferences):
3003         (WebCore::CSSValue::isVariableDependentValue): Deleted.
3004         (WebCore::CSSValue::isVariableValue): Deleted.
3005         * css/CSSValueList.cpp:
3006         (WebCore::CSSValueList::customCSSText):
3007         (WebCore::CSSValueList::containsVariables): Deleted.
3008         (WebCore::CSSValueList::checkVariablesForCycles): Deleted.
3009         (WebCore::CSSValueList::buildParserValueSubstitutingVariables): Deleted.
3010         (WebCore::CSSValueList::buildParserValueListSubstitutingVariables): Deleted.
3011         * css/CSSValueList.h:
3012         (WebCore::CSSValueList::createSlashSeparated):
3013         (WebCore::CSSValueList::createFromParserValueList): Deleted.
3014         * css/CSSValuePool.cpp:
3015         (WebCore::CSSValuePool::createFontFaceValue):
3016         * css/CSSVariableData.cpp:
3017         * css/CSSVariableDependentValue.cpp: Removed.
3018         * css/CSSVariableDependentValue.h: Removed.
3019         * css/CSSVariableValue.cpp: Removed.
3020         * css/CSSVariableValue.h: Removed.
3021         * css/DOMCSSNamespace.cpp:
3022         * css/FontFace.cpp:
3023         (WebCore::FontFace::parseString):
3024         * css/InspectorCSSOMWrappers.cpp:
3025         * css/MediaQueryExp.cpp:
3026         (WebCore::isFeatureValidWithIdentifier): Deleted.
3027         (WebCore::isFeatureValidWithNonNegativeLengthOrNumber): Deleted.
3028         (WebCore::isFeatureValidWithDensity): Deleted.
3029         (WebCore::isFeatureValidWithNonNegativeInteger): Deleted.
3030         (WebCore::isFeatureValidWithNonNegativeNumber): Deleted.
3031         (WebCore::isFeatureValidWithZeroOrOne): Deleted.
3032         (WebCore::isFeatureValidWithNumberWithUnit): Deleted.
3033         (WebCore::isFeatureValidWithNumber): Deleted.
3034         (WebCore::isSlash): Deleted.
3035         (WebCore::isPositiveIntegerValue): Deleted.
3036         * css/MediaQueryExp.h:
3037         * css/PropertySetCSSStyleDeclaration.cpp:
3038         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
3039         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
3040         * css/SelectorPseudoTypeMap.h:
3041         * css/StyleProperties.cpp:
3042         (WebCore::StyleProperties::getPropertyValue):
3043         (WebCore::StyleProperties::getPropertyCSSValue):
3044         (WebCore::MutableStyleProperties::setCustomProperty):
3045         (WebCore::MutableStyleProperties::parseDeclaration):
3046         (WebCore::StyleProperties::asText):
3047         * css/StyleProperties.h:
3048         * css/StyleResolver.cpp:
3049         (WebCore::StyleResolver::applyProperty):
3050         * css/StyleResolver.h:
3051         * css/StyleRule.cpp:
3052         (WebCore::StyleRuleBase::createCSSOMWrapper):
3053         * css/StyleSheetContents.cpp:
3054         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
3055         (WebCore::StyleSheetContents::parseString):
3056         (WebCore::StyleSheetContents::completeURL):
3057         (WebCore::StyleSheetContents::parseStringAtPosition): Deleted.
3058         * css/StyleSheetContents.h:
3059         * css/WebKitCSSMatrix.cpp:
3060         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
3061         * css/parser/CSSParser.cpp:
3062         (WebCore::CSSParserContext::CSSParserContext):
3063         (WebCore::CSSParser::CSSParser):
3064         (WebCore::CSSParser::parseSheet):
3065         (WebCore::CSSParser::parseRule):
3066         (WebCore::CSSParser::parseKeyframeRule):
3067         (WebCore::CSSParser::parseSupportsCondition):
3068         (WebCore::CSSParser::parseColor):
3069         (WebCore::CSSParser::parseSystemColor):
3070         (WebCore::CSSParser::parseSingleValue):
3071         (WebCore::CSSParser::parseValue):
3072         (WebCore::CSSParser::parseCustomPropertyValue):
3073         (WebCore::CSSParser::parseSelector):
3074         (WebCore::CSSParser::parseInlineStyleDeclaration):
3075         (WebCore::CSSParser::parseDeclaration):
3076         (WebCore::CSSParser::parseValueWithVariableReferences):
3077         (WebCore::CSSParser::parseKeyframeKeyList):
3078         (WebCore::CSSParser::parseFontFaceDescriptor):
3079         (WebCore::equalLettersIgnoringASCIICase): Deleted.
3080         (WebCore::hasPrefix): Deleted.
3081         (WebCore::createPrimitiveValuePair): Deleted.
3082         (WebCore::AnimationParseContext::commitFirstAnimation): Deleted.
3083         (WebCore::AnimationParseContext::hasCommittedFirstAnimation): Deleted.
3084         (WebCore::AnimationParseContext::commitAnimationPropertyKeyword): Deleted.
3085         (WebCore::AnimationParseContext::animationPropertyKeywordAllowed): Deleted.
3086         (WebCore::AnimationParseContext::hasSeenAnimationPropertyKeyword): Deleted.
3087         (WebCore::AnimationParseContext::sawAnimationPropertyKeyword): Deleted.
3088         (): Deleted.
3089         (WebCore::convertToASCIILowercaseInPlace): Deleted.
3090         (WebCore::CSSParserString::convertToASCIILowercaseInPlace): Deleted.
3091         (WebCore::CSSParser::setupParser): Deleted.
3092         (WebCore::isColorPropertyID): Deleted.
3093         (WebCore::CSSParser::isValidSystemColorValue): Deleted.
3094         (WebCore::validPrimitiveValueColor): Deleted.
3095         (WebCore::parseColorValue): Deleted.
3096         (WebCore::isSimpleLengthPropertyID): Deleted.
3097         (WebCore::parseSimpleLength): Deleted.
3098         (WebCore::parseSimpleLengthValue): Deleted.
3099         (WebCore::isValidKeywordPropertyAndValue): Deleted.
3100         (WebCore::isUniversalKeyword): Deleted.
3101         (WebCore::isKeywordPropertyID): Deleted.
3102         (WebCore::parseKeywordValue): Deleted.
3103         (WebCore::parseTransformTranslateArguments): Deleted.
3104         (WebCore::parseTranslateTransformValue): Deleted.
3105         (WebCore::CSSParser::parseFontFaceValue): Deleted.
3106         (WebCore::CSSParser::parseColorFromString): Deleted.
3107         (WebCore::CSSParser::parseDeclarationDeprecated): Deleted.
3108         (WebCore::filterProperties): Deleted.
3109         (WebCore::CSSParser::createStyleProperties): Deleted.
3110         (WebCore::CSSParser::addProperty): Deleted.
3111         (WebCore::CSSParser::rollbackLastProperties): Deleted.
3112         (WebCore::CSSParser::clearProperties): Deleted.
3113         (WebCore::CSSParser::completeURL): Deleted.
3114         (WebCore::CSSParser::validateCalculationUnit): Deleted.
3115         (WebCore::CSSParser::shouldAcceptUnitLessValues): Deleted.
3116         (WebCore::CSSParser::validateUnit): Deleted.
3117         (WebCore::CSSParser::createPrimitiveNumericValue): Deleted.
3118         (WebCore::CSSParser::createPrimitiveStringValue): Deleted.
3119         (WebCore::isComma): Deleted.
3120         (WebCore::isForwardSlashOperator): Deleted.
3121         (WebCore::CSSParser::isValidSize): Deleted.
3122         (WebCore::CSSParser::parseValidPrimitive): Deleted.
3123         (WebCore::CSSParser::addExpandedPropertyForValue): Deleted.
3124         (WebCore::isImageSetFunctionValue): Deleted.
3125         (WebCore::CSSParser::addFillValue): Deleted.
3126         (WebCore::isContentDistributionKeyword): Deleted.
3127         (WebCore::isContentPositionKeyword): Deleted.
3128         (WebCore::isBaselinePositionKeyword): Deleted.
3129         (WebCore::isAlignmentOverflowKeyword): Deleted.
3130         (WebCore::isItemPositionKeyword): Deleted.
3131         (WebCore::CSSParser::parseLegacyPosition): Deleted.
3132         (WebCore::CSSParser::parseContentDistributionOverflowPosition): Deleted.
3133         (WebCore::CSSParser::parseItemPositionOverflowPosition): Deleted.
3134         (WebCore::parseBackgroundClip): Deleted.
3135         (WebCore::CSSParser::useLegacyBackgroundSizeShorthandBehavior): Deleted.
3136         (WebCore::CSSParser::parseNonElementSnapPoints): Deleted.
3137         (WebCore::CSSParser::parseScrollSnapPositions): Deleted.
3138         (WebCore::CSSParser::parseScrollSnapDestination): Deleted.
3139         (WebCore::CSSParser::parseScrollSnapCoordinate): Deleted.
3140         (WebCore::CSSParser::parseFillShorthand): Deleted.
3141         (WebCore::CSSParser::addAnimationValue): Deleted.
3142         (WebCore::CSSParser::parseAnimationShorthand): Deleted.
3143         (WebCore::CSSParser::parseColumnWidth): Deleted.
3144         (WebCore::CSSParser::parseColumnCount): Deleted.
3145         (WebCore::CSSParser::parseColumnsShorthand): Deleted.
3146         (WebCore::CSSParser::parseTransitionShorthand): Deleted.
3147         (WebCore::CSSParser::parseShorthand): Deleted.
3148         (WebCore::CSSParser::parse4Values): Deleted.
3149         (WebCore::CSSParser::parsePage): Deleted.
3150         (WebCore::CSSParser::parseSize): Deleted.
3151         (WebCore::CSSParser::parseSizeParameter): Deleted.
3152         (WebCore::CSSParser::parseQuotes): Deleted.
3153         (WebCore::CSSParser::parseAlt): Deleted.
3154         (WebCore::CSSParser::parseCustomPropertyDeclaration): Deleted.
3155         (WebCore::CSSParser::parseContent): Deleted.
3156         (WebCore::CSSParser::parseAttr): Deleted.
3157         (WebCore::CSSParser::parseBackgroundColor): Deleted.
3158         (WebCore::CSSParser::parseFillImage): Deleted.
3159         (WebCore::CSSParser::parsePositionX): Deleted.
3160         (WebCore::CSSParser::parsePositionY): Deleted.
3161         (WebCore::CSSParser::parseFillPositionComponent): Deleted.
3162         (WebCore::isValueConflictingWithCurrentEdge): Deleted.
3163         (WebCore::isFillPositionKeyword): Deleted.
3164         (WebCore::CSSParser::parse4ValuesFillPosition): Deleted.
3165         (WebCore::CSSParser::parse3ValuesFillPosition): Deleted.
3166         (WebCore::CSSParser::isPotentialPositionValue): Deleted.
3167         (WebCore::CSSParser::parseFillPosition): Deleted.
3168         (WebCore::CSSParser::parse2ValuesFillPosition): Deleted.
3169         (WebCore::CSSParser::parseFillRepeat): Deleted.
3170         (WebCore::CSSParser::parseFillSize): Deleted.
3171         (WebCore::CSSParser::parseFillProperty): Deleted.
3172         (WebCore::CSSParser::parseAnimationDelay): Deleted.
3173         (WebCore::CSSParser::parseAnimationDirection): Deleted.
3174         (WebCore::CSSParser::parseAnimationDuration): Deleted.
3175         (WebCore::CSSParser::parseAnimationFillMode): Deleted.
3176         (WebCore::CSSParser::parseAnimationIterationCount): Deleted.
3177         (WebCore::CSSParser::parseAnimationName): Deleted.
3178         (WebCore::CSSParser::parseAnimationPlayState): Deleted.
3179         (WebCore::CSSParser::parseAnimationTrigger): Deleted.
3180         (WebCore::CSSParser::parseAnimationProperty): Deleted.
3181         (WebCore::CSSParser::parseTransformOriginShorthand): Deleted.
3182         (WebCore::CSSParser::isSpringTimingFunctionEnabled): Deleted.
3183         (WebCore::CSSParser::parseCubicBezierTimingFunctionValue): Deleted.
3184         (WebCore::CSSParser::parseSpringTimingFunctionValue): Deleted.
3185         (WebCore::CSSParser::parseAnimationTimingFunction): Deleted.
3186         (WebCore::isValidGridPositionCustomIdent): Deleted.
3187         (WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition): Deleted.
3188         (WebCore::CSSParser::parseGridPosition): Deleted.
3189         (WebCore::gridMissingGridPositionValue): Deleted.
3190         (WebCore::CSSParser::parseGridItemPositionShorthand): Deleted.
3191         (WebCore::CSSParser::parseGridGapShorthand): Deleted.
3192         (WebCore::CSSParser::parseGridTemplateColumns): Deleted.
3193         (WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns): Deleted.
3194         (WebCore::CSSParser::parseGridTemplateShorthand): Deleted.
3195         (WebCore::parseImplicitAutoFlow): Deleted.
3196         (WebCore::CSSParser::parseGridShorthand): Deleted.
3197         (WebCore::CSSParser::parseGridAreaShorthand): Deleted.
3198         (WebCore::CSSParser::parseSingleGridAreaLonghand): Deleted.
3199         (WebCore::CSSParser::parseGridLineNames): Deleted.
3200         (WebCore::isGridTrackFixedSized): Deleted.
3201         (WebCore::CSSParser::parseGridTrackList): Deleted.
3202         (WebCore::CSSParser::parseGridTrackRepeatFunction): Deleted.
3203         (WebCore::CSSParser::parseGridTrackSize): Deleted.
3204         (WebCore::CSSParser::parseGridBreadth): Deleted.
3205         (WebCore::isValidGridAutoFlowId): Deleted.
3206         (WebCore::CSSParser::parseGridAutoFlow): Deleted.
3207         (WebCore::skipCommaInDashboardRegion): Deleted.
3208         (WebCore::CSSParser::parseDashboardRegions): Deleted.
3209         (WebCore::parseGridTemplateAreasColumnNames): Deleted.
3210         (WebCore::CSSParser::parseGridTemplateAreasRow): Deleted.
3211         (WebCore::CSSParser::parseGridTemplateAreas): Deleted.
3212         (WebCore::CSSParser::parseCounterContent): Deleted.
3213         (WebCore::CSSParser::parseClipShape): Deleted.
3214         (WebCore::completeBorderRadii): Deleted.
3215         (WebCore::CSSParser::parseInsetRoundedCorners): Deleted.
3216         (WebCore::CSSParser::parseBasicShapeInset): Deleted.
3217         (WebCore::CSSParser::parseShapeRadius): Deleted.
3218         (WebCore::CSSParser::parseBasicShapeCircle): Deleted.
3219         (WebCore::CSSParser::parseBasicShapeEllipse): Deleted.
3220         (WebCore::CSSParser::parseBasicShapePolygon): Deleted.
3221         (WebCore::CSSParser::parseBasicShapePath): Deleted.
3222         (WebCore::isBoxValue): Deleted.
3223         (WebCore::CSSParser::parseBasicShapeAndOrBox): Deleted.
3224         (WebCore::CSSParser::parseShapeProperty): Deleted.
3225         (WebCore::CSSParser::parseClipPath): Deleted.
3226         (WebCore::CSSParser::parseBasicShape): Deleted.
3227         (WebCore::CSSParser::parseFont): Deleted.
3228         (WebCore::CSSParser::parseSystemFont): Deleted.
3229         (WebCore::FontFamilyValueBuilder::FontFamilyValueBuilder): Deleted.
3230         (WebCore::FontFamilyValueBuilder::add): Deleted.
3231         (WebCore::FontFamilyValueBuilder::commit): Deleted.
3232         (WebCore::valueIsCSSKeyword): Deleted.
3233         (WebCore::CSSParser::parseFontFamily): Deleted.
3234         (WebCore::CSSParser::parseLineHeight): Deleted.
3235         (WebCore::CSSParser::parseFontSize): Deleted.
3236         (WebCore::createFontWeightValueKeyword): Deleted.
3237         (WebCore::CSSParser::parseFontWeight): Deleted.
3238         (WebCore::CSSParser::parseFontSynthesis): Deleted.
3239         (WebCore::CSSParser::parseFontFaceSrcURI): Deleted.
3240         (WebCore::CSSParser::parseFontFaceSrcLocal): Deleted.
3241         (WebCore::CSSParser::parseFontFaceSrc): Deleted.
3242         (WebCore::CSSParser::parseFontFaceUnicodeRange): Deleted.
3243         (WebCore::checkForValidDouble): Deleted.
3244         (WebCore::parseDouble): Deleted.
3245         (WebCore::parseColorIntOrPercentage): Deleted.
3246         (WebCore::isTenthAlpha): Deleted.
3247         (WebCore::parseAlphaValue): Deleted.
3248         (WebCore::mightBeRGBA): Deleted.
3249         (WebCore::mightBeRGB): Deleted.
3250         (WebCore::fastParseColorInternal): Deleted.
3251         (WebCore::CSSParser::fastParseColor): Deleted.
3252         (WebCore::CSSParser::parsedDouble): Deleted.
3253         (WebCore::CSSParser::isCalculation): Deleted.
3254         (WebCore::isPercent): Deleted.
3255         (WebCore::CSSParser::parseColorInt): Deleted.
3256         (WebCore::CSSParser::parseColorDouble): Deleted.
3257         (WebCore::CSSParser::parseRGBParameters): Deleted.
3258         (WebCore::CSSParser::parseColorFunctionParameters): Deleted.
3259         (WebCore::CSSParser::parseHSLParameters): Deleted.
3260         (WebCore::CSSParser::parseColorFromValue): Deleted.
3261         (WebCore::ShadowParseContext::ShadowParseContext): Deleted.
3262         (WebCore::ShadowParseContext::allowLength): Deleted.
3263         (WebCore::ShadowParseContext::commitValue): Deleted.
3264         (WebCore::ShadowParseContext::commitLength): Deleted.
3265         (WebCore::ShadowParseContext::commitColor): Deleted.
3266         (WebCore::ShadowParseContext::commitStyle): Deleted.
3267         (WebCore::CSSParser::parseShadow): Deleted.
3268         (WebCore::CSSParser::parseReflect): Deleted.
3269         (WebCore::CSSParser::parseFlex): Deleted.
3270         (WebCore::BorderImageParseContext::BorderImageParseContext): Deleted.
3271         (WebCore::BorderImageParseContext::canAdvance): Deleted.
3272         (WebCore::BorderImageParseContext::setCanAdvance): Deleted.
3273         (WebCore::BorderImageParseContext::allowCommit): Deleted.
3274         (WebCore::BorderImageParseContext::allowImage): Deleted.
3275         (WebCore::BorderImageParseContext::allowImageSlice): Deleted.
3276         (WebCore::BorderImageParseContext::allowRepeat): Deleted.
3277         (WebCore::BorderImageParseContext::allowForwardSlashOperator): Deleted.
3278         (WebCore::BorderImageParseContext::requireWidth): Deleted.
3279         (WebCore::BorderImageParseContext::requireOutset): Deleted.
3280         (WebCore::BorderImageParseContext::commitImage): Deleted.
3281         (WebCore::BorderImageParseContext::commitImageSlice): Deleted.
3282         (WebCore::BorderImageParseContext::commitForwardSlashOperator): Deleted.
3283         (WebCore::BorderImageParseContext::commitBorderWidth): Deleted.
3284         (WebCore::BorderImageParseContext::commitBorderOutset): Deleted.
3285         (WebCore::BorderImageParseContext::commitRepeat): Deleted.
3286         (WebCore::BorderImageParseContext::commitWebKitBorderImage): Deleted.
3287         (WebCore::BorderImageParseContext::commitBorderImage): Deleted.
3288         (WebCore::BorderImageParseContext::commitBorderImageProperty): Deleted.
3289         (WebCore::CSSParser::parseBorderImage): Deleted.
3290         (WebCore::isBorderImageRepeatKeyword): Deleted.
3291         (WebCore::CSSParser::parseBorderImageRepeat): Deleted.
3292         (WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext): Deleted.
3293         (WebCore::BorderImageSliceParseContext::allowNumber): Deleted.
3294         (WebCore::BorderImageSliceParseContext::allowFill): Deleted.
3295         (WebCore::BorderImageSliceParseContext::allowFinalCommit): Deleted.
3296         (WebCore::BorderImageSliceParseContext::top): Deleted.
3297         (WebCore::BorderImageSliceParseContext::commitNumber): Deleted.
3298         (WebCore::BorderImageSliceParseContext::commitFill): Deleted.
3299         (WebCore::BorderImageSliceParseContext::commitBorderImageSlice): Deleted.
3300         (WebCore::CSSParser::parseBorderImageSlice): Deleted.
3301         (WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext): Deleted.
3302         (WebCore::BorderImageQuadParseContext::allowNumber): Deleted.
3303         (WebCore::BorderImageQuadParseContext::allowFinalCommit): Deleted.
3304         (WebCore::BorderImageQuadParseContext::top): Deleted.
3305         (WebCore::BorderImageQuadParseContext::commitNumber): Deleted.
3306         (WebCore::BorderImageQuadParseContext::setAllowFinalCommit): Deleted.
3307         (WebCore::BorderImageQuadParseContext::setTop): Deleted.
3308         (WebCore::BorderImageQuadParseContext::commitBorderImageQuad): Deleted.
3309         (WebCore::CSSParser::parseBorderImageQuad): Deleted.
3310         (WebCore::CSSParser::parseBorderImageWidth): Deleted.
3311         (WebCore::CSSParser::parseBorderImageOutset): Deleted.
3312         (WebCore::CSSParser::parseBorderRadius): Deleted.
3313         (WebCore::CSSParser::parseAspectRatio): Deleted.
3314         (WebCore::CSSParser::parseCounter): Deleted.
3315         (WebCore::parseDeprecatedGradientPoint): Deleted.
3316         (WebCore::parseDeprecatedGradientColorStop): Deleted.
3317         (WebCore::CSSParser::parseDeprecatedGradient): Deleted.
3318         (WebCore::valueFromSideKeyword): Deleted.
3319         (WebCore::parseGradientColorOrKeyword): Deleted.
3320         (WebCore::CSSParser::parseDeprecatedLinearGradient): Deleted.
3321         (WebCore::CSSParser::parseDeprecatedRadialGradient): Deleted.
3322         (WebCore::CSSParser::parseLinearGradient): Deleted.
3323         (WebCore::CSSParser::parseRadialGradient): Deleted.
3324         (WebCore::CSSParser::parseGradientColorStops): Deleted.
3325         (WebCore::CSSParser::isGeneratedImageValue): Deleted.
3326         (WebCore::CSSParser::parseGeneratedImage): Deleted.
3327         (WebCore::CSSParser::parseFilterImage): Deleted.
3328         (WebCore::CSSParser::parseCrossfade): Deleted.
3329         (WebCore::CSSParser::parseCanvas): Deleted.
3330         (WebCore::CSSParser::parseNamedImage): Deleted.
3331         (WebCore::CSSParser::parseImageResolution): Deleted.
3332         (WebCore::CSSParser::parseImageSet): Deleted.
3333         (WebCore::TransformOperationInfo::TransformOperationInfo): Deleted.
3334         (WebCore::TransformOperationInfo::type): Deleted.
3335         (WebCore::TransformOperationInfo::argCount): Deleted.
3336         (WebCore::TransformOperationInfo::unit): Deleted.
3337         (WebCore::TransformOperationInfo::unknown): Deleted.
3338         (WebCore::TransformOperationInfo::hasCorrectArgCount): Deleted.
3339         (WebCore::CSSParser::parseTransform): Deleted.
3340         (WebCore::CSSParser::parseTransformValue): Deleted.
3341         (WebCore::CSSParser::isBlendMode): Deleted.
3342         (WebCore::CSSParser::isCompositeOperator): Deleted.
3343         (WebCore::isValidPrimitiveFilterFunction): Deleted.
3344         (WebCore::CSSParser::parseBuiltinFilterArguments): Deleted.
3345         (WebCore::cssValueKeywordIDForFunctionName): Deleted.
3346         (WebCore::CSSParser::parseFilter): Deleted.
3347         (WebCore::validFlowName): Deleted.
3348         (WebCore::CSSParser::isTextAutosizingEnabled): Deleted.
3349         (WebCore::CSSParser::isCSSGridLayoutEnabled): Deleted.
3350         (WebCore::CSSParser::parseFlowThread): Deleted.
3351         (WebCore::CSSParser::parseRegionThread): Deleted.
3352         (WebCore::CSSParser::parseTransformOrigin): Deleted.
3353         (WebCore::CSSParser::parsePerspectiveOrigin): Deleted.
3354         (WebCore::CSSParser::addTextDecorationProperty): Deleted.
3355         (WebCore::CSSParser::parseTextDecoration): Deleted.
3356         (WebCore::CSSParser::parseTextDecorationSkip): Deleted.
3357         (WebCore::CSSParser::parseTextUnderlinePosition): Deleted.
3358         (WebCore::CSSParser::parseTextEmphasisStyle): Deleted.
3359         (WebCore::CSSParser::parseTextEmphasisPosition): Deleted.
3360         (WebCore::CSSParser::parseTextIndent): Deleted.
3361         (WebCore::CSSParser::parseHangingPunctuation): Deleted.
3362         (WebCore::CSSParser::parseLineBoxContain): Deleted.
3363         (WebCore::CSSParser::parseFontFeatureTag): Deleted.
3364         (WebCore::CSSParser::parseFontFeatureSettings): Deleted.
3365         (WebCore::CSSParser::parseFontVariationTag): Deleted.
3366         (WebCore::CSSParser::parseFontVariationSettings): Deleted.
3367         (WebCore::CSSParser::parseFontVariantLigatures): Deleted.
3368         (WebCore::CSSParser::parseFontVariantNumeric): Deleted.
3369         (WebCore::CSSParser::parseFontVariantEastAsian): Deleted.
3370         (WebCore::CSSParser::parseFontVariant): Deleted.
3371         (WebCore::isValidWillChangeAnimatableFeature): Deleted.
3372         (WebCore::CSSParser::parseWillChange): Deleted.
3373         (WebCore::CSSParser::parseCalculation): Deleted.
3374         (WebCore::isCSSLetter): Deleted.
3375         (WebCore::isCSSEscape): Deleted.
3376         (WebCore::isURILetter): Deleted.
3377         (WebCore::isIdentifierStartAfterDash): Deleted.
3378         (WebCore::isCustomPropertyIdentifier): Deleted.
3379         (WebCore::isEqualToCSSIdentifier): Deleted.
3380         (WebCore::isEqualToCSSCaseSensitiveIdentifier): Deleted.
3381         (WebCore::checkAndSkipEscape): Deleted.
3382         (WebCore::skipWhiteSpace): Deleted.
3383         (WebCore::CSSParserString::characters<LChar>): Deleted.
3384         (WebCore::CSSParserString::characters<UChar>): Deleted.
3385         (WebCore::CSSParser::currentCharacter<LChar>): Deleted.
3386         (WebCore::CSSParser::currentCharacter<UChar>): Deleted.
3387         (WebCore::CSSParser::currentCharacter16): Deleted.
3388         (WebCore::CSSParser::tokenStart<LChar>): Deleted.
3389         (WebCore::CSSParser::tokenStart<UChar>): Deleted.
3390         (WebCore::CSSParser::currentLocation): Deleted.
3391         (WebCore::CSSParser::isIdentifierStart): Deleted.
3392         (WebCore::checkAndSkipString): Deleted.
3393         (WebCore::CSSParser::parseEscape): Deleted.
3394         (WebCore::CSSParser::UnicodeToChars<LChar>): Deleted.
3395         (WebCore::CSSParser::UnicodeToChars<UChar>): Deleted.
3396         (WebCore::CSSParser::parseIdentifierInternal): Deleted.
3397         (Web