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