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