[CSS Parser] Miscellaneous bug fixes
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-10-30  Dave Hyatt  <hyatt@apple.com>
2
3         [CSS Parser] Miscellaneous bug fixes
4         https://bugs.webkit.org/show_bug.cgi?id=164211
5
6         Reviewed by Darin Adler.
7
8         * css/parser/CSSPropertyParser.cpp:
9         (WebCore::CSSPropertyParser::consumeTransformOrigin):
10         Make sure to properly reject invalid transform-origin-z values.
11
12         * css/parser/CSSSelectorParser.cpp:
13         (WebCore::CSSSelectorParser::consumeAttribute):
14         Make attribute selector parsing strict about requiring a ] to end
15         the selector.
16
17         (WebCore::CSSSelectorParser::consumePseudo):
18         Force the nth-child "of" syntax to have whitespace after "of" but
19         before the selector. It is unclear if this should be a requirement
20         or not (spec is ambiguous), but for now we match the old parser.
21
22         (WebCore::CSSSelectorParser::consumeCombinator):
23         Fix a bug that caused the double child combinator to match even
24         when there was whitespace between the two > symbols.
25
26 2016-10-31  Youenn Fablet  <youenn@apple.com>
27
28         RTCOfferAnswerOptions does not need to be refcounted
29         https://bugs.webkit.org/show_bug.cgi?id=164216
30
31         Reviewed by Darin Adler.
32
33         Covered by existing tests.
34
35         Making RTCOffer/Answer options dictionaries as per specification.
36         Removing code that handles RTCOffer/Answer options dictionary since this is done by the binding generator.
37         Updated users of the options accordingly.
38
39         * CMakeLists.txt:
40         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
41         (WebCore::MediaEndpointPeerConnection::createOffer):
42         (WebCore::MediaEndpointPeerConnection::createOfferTask):
43         (WebCore::MediaEndpointPeerConnection::createAnswer):
44         (WebCore::MediaEndpointPeerConnection::createAnswerTask):
45         * Modules/mediastream/MediaEndpointPeerConnection.h:
46         * Modules/mediastream/PeerConnectionBackend.h:
47         * Modules/mediastream/RTCOfferAnswerOptions.cpp: Removed.
48         * Modules/mediastream/RTCOfferAnswerOptions.h:
49         * Modules/mediastream/RTCPeerConnection.cpp:
50         (WebCore::RTCPeerConnection::queuedCreateOffer):
51         (WebCore::RTCPeerConnection::queuedCreateAnswer):
52         * Modules/mediastream/RTCPeerConnection.h:
53         * Modules/mediastream/RTCPeerConnection.idl:
54         * WebCore.xcodeproj/project.pbxproj:
55
56 2016-10-31  Youenn Fablet  <youenn@apple.com>
57
58         fast/mediastream/RTCPeerConnection-* tests crashing under ASan
59         https://bugs.webkit.org/show_bug.cgi?id=164215
60
61         Reviewed by Philippe Normand.
62
63         Covered by ASAN bot tests.
64
65         * platform/mediastream/SDPProcessorScriptResource.cpp:
66         (WebCore::SDPProcessorScriptResource::scriptString):
67
68 2016-10-28  Philippe Normand  <pnormand@igalia.com>
69
70         [OpenWebRTC] Initialize library one time only
71         https://bugs.webkit.org/show_bug.cgi?id=164118
72
73         Reviewed by Darin Adler.
74
75         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp:
76         (WebCore::initializeOpenWebRTC): Prevent multiple initialisations of the library.
77
78 2016-10-30  Brent Fulgham  <bfulgham@apple.com>
79
80         Unreviewed fix: Correct ChangeLog after my bad merge.
81
82         * ChangeLog
83
84 2016-10-30  Darin Adler  <darin@apple.com>
85
86         Move Element, NamedNodeMap, and DOMStringMap from ExceptionCode to Exception
87         https://bugs.webkit.org/show_bug.cgi?id=164206
88
89         Reviewed by Chris Dumez.
90
91         * bindings/js/JSDOMStringMapCustom.cpp:
92         (WebCore::JSDOMStringMap::getOwnPropertyNames): Use modern for loop, and
93         updates since the names function now returns a vector.
94         (WebCore::JSDOMStringMap::putDelegate): Use propagateException. Also return
95         true any time an exception is raised. Since true tells the caller to return
96         without doing any work, we always want to return that on an exception.
97         * dom/DatasetDOMStringMap.cpp:
98         (WebCore::DatasetDOMStringMap::names): Renamed from getNames and made this
99         return a Vector instead of populating a passed-in vector.
100         (WebCore::DatasetDOMStringMap::setItem): Use ExceptionOr.
101         * dom/DatasetDOMStringMap.h: Updated for above.
102
103         * dom/Document.cpp:
104         (WebCore::Document::adoptNode): Updated to use ExceptionOr for
105         removeAttributeNode. Changed to use remove rather than removeChild for
106         better clarity.
107
108         * dom/Element.cpp:
109         (WebCore::Element::setAttribute): Use ExceptionOr.
110         (WebCore::Element::createShadowRoot): Deleted. Unused.
111         (WebCore::Element::attachShadow): Use ExceptionOr.
112         (WebCore::Element::shadowRootForBindings): Tweaked a bit.
113         (WebCore::Element::userAgentShadowRoot): Removed unneeded if statemment.
114         (WebCore::Element::ensureUserAgentShadowRoot): Tweaked a bit.
115         (WebCore::Element::setAttributeNode): Use ExceptionOr.
116         (WebCore::Element::setAttributeNodeNS): Ditto.
117         (WebCore::Element::removeAttributeNode): Ditto.
118         (WebCore::Element::parseAttributeName): Ditto. Also changed return result
119         to be a QualifiedName instead of using an out argument.
120         (WebCore::Element::setAttributeNS): Ditto.
121         (WebCore::Element::mergeWithNextTextNode): Ditto.
122         (WebCore::Element::setOuterHTML): Ditto.
123         (WebCore::Element::setInnerHTML): Ditto.
124         (WebCore::Element::matches): Ditto.
125         (WebCore::Element::closest): Ditto.
126         (WebCore::Element::insertAdjacent): Ditto.
127         (WebCore::Element::insertAdjacentElement): Ditto.
128         (WebCore::contextNodeForInsertion): Ditto.
129         (WebCore::contextElementForInsertion): Added. Helper for the
130         insertAdjacentHTML function to eliminate a local variable.
131         (WebCore::Element::insertAdjacentHTML): Use ExceptionOr.
132         (WebCore::Element::insertAdjacentText): Ditto.
133         * dom/Element.h: Updated for above.
134         * dom/Element.idl: Use non-legacy exceptions.
135
136         * dom/NamedNodeMap.cpp:
137         (WebCore::NamedNodeMap::removeNamedItem): Use ExceptionOr.
138         (WebCore::NamedNodeMap::supportedPropertyNames): Updated to check
139         which strings should be removed without copying the strings.
140         (WebCore::NamedNodeMap::removeNamedItemNS): Use ExceptionOr.
141         (WebCore::NamedNodeMap::setNamedItem): Ditto. Removed overload for
142         legacy bindings; move that to the bindings themselves.
143         * dom/NamedNodeMap.h: Updated for above.
144         * dom/NamedNodeMap.idl: Use non-legacy exceptions.
145
146         * html/HTMLElement.cpp:
147         (WebCore::HTMLElement::setOuterText): Updated since mergeWithNextTextNode
148         now uses ExceptionOr.
149
150         * inspector/DOMEditor.cpp: Updated to use ExceptionOr.
151
152         * inspector/InspectorDOMAgent.cpp:
153         (WebCore::InspectorDOMAgent::toErrorString): Added an overload for
154         Exception.
155         (WebCore::InspectorDOMAgent::setAttributesAsText): Updated to use ExceptionOr.
156         * inspector/InspectorDOMAgent.h: Updated for above.
157
158         * inspector/InspectorStyleSheet.cpp:
159         (WebCore::InspectorStyleSheetForInlineStyle::setStyleText): Updated to
160         use the correct version of setAttribute; there was never a risk that there
161         would be an exception, but now that's clearer.
162
163         * testing/Internals.cpp:
164         (WebCore::Internals::ensureShadowRoot): Deleted. Was unused.
165         (WebCore::Internals::createShadowRoot): Ditto.
166         * testing/Internals.idl: Updated for above.
167
168         * xml/parser/XMLDocumentParserLibxml2.cpp:
169         (WebCore::handleNamespaceAttributes): Use updated parseAttributeName,
170         which uses ExceptionOr and a return value instead of an out argument.
171         (WebCore::handleElementAttributes): Ditto.
172
173 2016-10-30  Sam Weinig  <sam@webkit.org>
174
175         [WebIDL] Restructure IDLParser structs to better match modern WebIDL concepts
176         https://bugs.webkit.org/show_bug.cgi?id=164208
177
178         Reviewed by Darin Adler.
179
180         Restructure IDLParsers structs to match modern WebIDL conventions:
181         - Rename structs to have more WebCore like naming, consistently using
182           the prefix IDL.
183         - Remove domSignature. Sinking it's properties into the structs that
184           contained it.
185         - Add IDLArgument, replacing the use of domSignatures for arguments.
186           IDLArgument is the subset of domSignatures needed for arguments.
187         - Rename domFunction to IDLOperation (matching WebILD nomenclature),
188           replace signature with its own name, type (for returnType), specials,
189           and extended attributes properties.
190         - Give IDLAttribute it's own name, type and extended attributes properties.
191         - Add IDLDictionaryMember, replacing the use of domSignature as the
192           type of members in IDLDictionary. Give it name, type, isRequired,
193           default and extendedAttributes properties.
194         - Renamed Typedef to be IDLTypedef. Remove the extended attributes 
195           property as those are not allowed in typedefs per-PebIDL.
196
197         Also fix some parsing issues:
198         - Stop parsing 'in' directives in function arguments.
199         - Stop parsing extended attributes in typedefs.
200         - Support applying typedefs to types deep in aggregate types
201           (e.g. (sequence<(LONG or STRING)> or DOMString)?).
202
203         * bindings/scripts/CodeGenerator.pm:
204         * bindings/scripts/IDLParser.pm:
205         * bindings/scripts/generate-bindings.pl:
206         Update for new struct types.
207
208         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
209         * bindings/scripts/test/TestTypedefs.idl:
210         Remove test which tested extended attributes in typedefs,
211         and add a test which tests typedefs used in deep type structures.
212
213         * page/make_settings.pl:
214         Don't generate the 'in' prefix for arguments in IDL files.
215
216 2016-10-30  Dave Hyatt  <hyatt@apple.com>
217
218         [CSS Parser] Fix nth-child serialization
219         https://bugs.webkit.org/show_bug.cgi?id=164210
220
221         Reviewed by Darin Adler.
222
223         Our nth-child serialization preserves what the author originally
224         typed. Even though this is not spec-compliant (the latest CSS Syntax
225         spec has a dumbed down serialization process that doesn't preserve what
226         the author originally typed), I think it's better behavior to preserve
227         this text.
228
229         * css/parser/CSSParserToken.cpp:
230         (WebCore::CSSParserToken::serialize):
231         Fix a bug in the serialization of number tokens that started with
232         a plus sign. Make sure the plus sign is preserved.
233
234         * css/parser/CSSSelectorParser.cpp:
235         (WebCore::CSSSelectorParser::consumePseudo):
236         Grab the range of tokens from after the ( and up to the ) or the "of"
237         and then serialize them. Strip whitepsace from the ends and set that
238         as the selector argument.
239
240 2016-10-30  Brent Fulgham  <bfulgham@apple.com>
241
242         [Win][Direct2D] Correct bookkeeping for begin/end draw pairs
243         https://bugs.webkit.org/show_bug.cgi?id=163898
244
245         Reviewed by Darin Adler.
246
247         Simon pointed out that GraphicsContext objects are generally only created at
248         the time we intend to do drawing, so calling 'BeginDraw' as part of object
249         construction, and 'EndDraw' at time of destruction should be sufficient.
250
251         As usual, he was correct.
252         
253         This patch gets rid of unneeded code and greatly simplifies the Direct2D
254         drawing path.
255         
256         Tested by existing layout tests.
257
258         * platform/graphics/GraphicsContext.h:
259         * platform/graphics/win/GradientDirect2D.cpp:
260         (WebCore::Gradient::fill):Remove unneeded use
261         of 'RenderTargetScopedDrawing.h'.
262         * platform/graphics/win/GraphicsContextDirect2D.cpp:
263         (WebCore::GraphicsContext::releaseWindowsContext): Remove unneeded use
264         of RenderTargetScopedDrawing class.
265         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): Enter
266         the 'BeginDraw' state at object creation.
267         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): End
268         draw state at object destruction.
269         (WebCore::GraphicsContextPlatformPrivate::clip): Remove unneeded call to 'beginDraw'.
270         (WebCore::GraphicsContextPlatformPrivate::beginDraw): Renamed from 'beginDrawIfNeeded'.
271         (WebCore::GraphicsContextPlatformPrivate::endDraw): Get rid of draw state flags.
272         (WebCore::GraphicsContext::beginDraw): Renamed from 'beginDrawIfNeeded'.
273         (WebCore::GraphicsContext::flush): Added.
274         (WebCore::GraphicsContext::drawWithoutShadow): Remove unneeded use of
275         RenderTargetScopedDrawing class.
276         (WebCore::GraphicsContext::drawWithShadow): Ditto.
277         (WebCore::GraphicsContext::platformFillRoundedRect): Ditto.
278         (WebCore::GraphicsContext::fillRectWithRoundedHole): Ditto.
279         (WebCore::GraphicsContext::didBeginDraw): Deleted.
280         (WebCore::GraphicsContextPlatformPrivate::beginDrawIfNeeded): Deleted.
281         (WebCore::GraphicsContext::beginDrawIfNeeded): Deleted.
282         * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
283         (WebCore::GraphicsContextPlatformPrivate::didBeginDraw): Deleted.
284         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
285         (WebCore::ImageBufferData::getData): Remove unneeded use of RenderTargetScopedDrawing class.
286         (WebCore::ImageBufferData::putData):
287         * platform/graphics/win/ImageBufferDirect2D.cpp:
288         (WebCore::ImageBuffer::flushContext): Call new GraphicsContext 'flush' command.
289         (WebCore::ImageBuffer::draw): Remove unneeded use of RenderTargetScopedDrawing class.
290         * platform/graphics/win/NativeImageDirect2D.cpp: Ditto.
291         * platform/graphics/win/RenderTargetScopedDrawing.h: Removed.
292         * svg/graphics/SVGImage.cpp:
293         (WebCore::SVGImage::nativeImage): Remove unneeded use of RenderTargetScopedDrawing class.
294
295 2016-10-30  Dave Hyatt  <hyatt@apple.com> 
296
297         [CSS Parser] Clean up the two types of descendant relations in CSSSelector 
298         https://bugs.webkit.org/show_bug.cgi?id=164203 
299
300         Reviewed by Zalan Bujtas. 
301
302         This patch gets rid of the separate boolean for double child and allows it 
303         to be a unique relation type. Rename Descendant to DescendantSpace and 
304         name the new relation DescendantDoubleChild. 
305
306         * css/CSSSelector.cpp: 
307         (WebCore::CSSSelector::CSSSelector): 
308         (WebCore::CSSSelector::selectorText): 
309         * css/CSSSelector.h: 
310         (WebCore::CSSSelector::hasDescendantRelation): 
311         (WebCore::CSSSelector::hasDescendantOrChildRelation): 
312         (WebCore::CSSSelector::CSSSelector): 
313         (WebCore::CSSSelector::setDescendantUseDoubleChildSyntax): Deleted. 
314         * css/RuleFeature.cpp: 
315         (WebCore::RuleFeatureSet::recursivelyCollectFeaturesFromSelector): 
316         * css/SelectorChecker.cpp: 
317         (WebCore::SelectorChecker::matchRecursively): 
318         (WebCore::SelectorChecker::determineLinkMatchType): 
319         * css/SelectorFilter.cpp: 
320         (WebCore::SelectorFilter::collectIdentifierHashes): 
321         * css/parser/CSSParserValues.cpp: 
322         (WebCore::CSSParserSelector::appendTagHistory): 
323         * css/parser/CSSParserValues.h: 
324         (WebCore::CSSParserSelector::setDescendantUseDoubleChildSyntax): Deleted. 
325         * css/parser/CSSSelectorParser.cpp: 
326         (WebCore::isDescendantCombinator): 
327         (WebCore::CSSSelectorParser::consumeComplexSelector): 
328         (WebCore::CSSSelectorParser::consumeCombinator): 
329         * cssjit/SelectorCompiler.cpp: 
330         (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation): 
331
332 2016-10-30  Frederic Wang  <fwang@igalia.com> 
333
334         Unreviewed gardening 
335
336         Fix build error on WinCairo. 
337
338         * platform/graphics/opentype/OpenTypeMathData.cpp: 
339
340 2016-10-30  Frederic Wang  <fwang@igalia.com> 
341
342         Use HarfBuzz ot-math API to parse the OpenType MATH table 
343         https://bugs.webkit.org/show_bug.cgi?id=162671 
344
345         Reviewed by Michael Catanzaro. 
346
347         No new tests, already covered by existing tests. 
348
349         * platform/graphics/opentype/OpenTypeMathData.cpp: Add alternative implementation relying on 
350         HarfBuzz's new OpenType MATH API. 
351         * platform/graphics/opentype/OpenTypeMathData.h: Ditto. 
352         (WebCore::OpenTypeMathData::hasMathData): 
353         (WebCore::OpenTypeMathData::HbFontDeleter::operator()): 
354
355 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
356
357         [CSS Parser] Support unprefixed image-sets 
358         https://bugs.webkit.org/show_bug.cgi?id=164198 
359
360         Reviewed by Dean Jackson. 
361
362         * css/CSSValueKeywords.in: 
363         * css/parser/CSSPropertyParserHelpers.cpp: 
364         (WebCore::CSSPropertyParserHelpers::consumeImage): 
365
366 2016-10-30  Yusuke Suzuki  <utatane.tea@gmail.com> 
367
368         [DOM] Introduce WebCore::jsDynamicDowncast 
369         https://bugs.webkit.org/show_bug.cgi?id=164137 
370  
371         Reviewed by Darin Adler. 
372
373         In WebCore, we have several extended JSTypes, like JSElementType. 
374         For these types, WebCore offers the faster casting function compared 
375         to JSC::jsDynamicCast. For example, for JSElementType, we have 
376         jsElementCast. 
377
378         The problem is that we may fall into the slow code if we choose 
379         JSC::jsDynamicCast by accident. Selecting the appropriate function 
380         requires special care in the IDL code generator when we would like 
381         to use faster casting functions. 
382
383         This patch implements a new casting function, WebCore::jsDynamicDowncast. 
384         It is a thin wrapper to the JSC::jsDynamicCast. But it selects the 
385         faster casting functions correctly by template specialization. 
386
387         We do not choose the way specializing JSC::jsDynamicCast directly. 
388         If we forget to include the header that specializes JSC::jsDyanmicCast, 
389         it does not cause any compile errors, but it causes performance regression. 
390         This bug is hard to figure out. To avoid this problem, we add a new function. 
391
392         Outside JSC, only Tools' DumpRenderTree uses JSC::jsDynamicCast. 
393         This code has FIXME that we should use JSC APIs instead of directly calling 
394         JSC thingy. So this should be solved in the layer of JSC APIs and changing 
395         this jsDynamicCast to WebCore's jsDynamicDowncast and exposing WebCore's thingy 
396         are not good change. So we leave the code as is. 
397
398         * WebCore.xcodeproj/project.pbxproj: 
399         * bindings/js/JSApplePaySessionCustom.cpp: 
400         (WebCore::JSApplePaySession::completeShippingMethodSelection): 
401         (WebCore::JSApplePaySession::completeShippingContactSelection): 
402         (WebCore::JSApplePaySession::completePaymentMethodSelection): 
403         * bindings/js/JSDOMBinding.cpp: 
404         (WebCore::reportException): 
405         * bindings/js/JSDOMBinding.h: 
406         (WebCore::castThisValue): 
407         (WebCore::toArrayBufferView): 
408         * bindings/js/JSDOMIterator.h: 
409         (WebCore::IteratorTraits>::next): 
410         * bindings/js/JSDOMWindowShell.cpp: 
411         (WebCore::JSDOMWindowShell::toWrapped): 
412         * bindings/js/JSDictionary.cpp: 
413         (WebCore::JSDictionary::convertValue): 
414         * bindings/js/JSDocumentCustom.h: 
415         (WebCore::jsDocumentCast): 
416         * bindings/js/JSDynamicDowncast.h: Added. 
417         (WebCore::JSDynamicCastTrait::cast): 
418         (WebCore::JSDynamicCastTrait<JSNode>::cast): 
419         (WebCore::JSDynamicCastTrait<JSElement>::cast): 
420         (WebCore::JSDynamicCastTrait<JSDocument>::cast): 
421         (WebCore::JSDynamicCastTrait<JSEvent>::cast): 
422         (WebCore::jsDynamicDowncast): 
423         * bindings/js/JSElementCustom.h: 
424         (WebCore::jsElementCast): 
425         * bindings/js/JSEventCustom.h: 
426         (WebCore::jsEventCast): 
427         * bindings/js/JSEventListener.cpp: 
428         (WebCore::setDocumentEventHandlerAttribute): 
429         * bindings/js/JSEventTargetCustom.cpp: 
430         (WebCore::jsEventTargetCast): 
431         * bindings/js/JSMediaStreamTrackCustom.cpp: 
432         (WebCore::JSMediaStreamTrack::getSettings): 
433         (WebCore::JSMediaStreamTrack::getCapabilities): 
434         * bindings/js/JSNodeCustom.h: 
435         (WebCore::jsNodeCast): 
436         * bindings/js/JSPluginElementFunctions.cpp: 
437         (WebCore::pluginElementPropertyGetter): 
438         * bindings/js/JSReadableStreamPrivateConstructors.cpp: 
439         (WebCore::constructJSReadableStreamDefaultReader): 
440         * bindings/js/JSReadableStreamSourceCustom.cpp: 
441         (WebCore::startReadableStream): 
442         (WebCore::JSReadableStreamSource::start): 
443         (WebCore::pullReadableStream): 
444         * bindings/js/JSWorkerGlobalScopeBase.cpp: 
445         (WebCore::toJSDedicatedWorkerGlobalScope): 
446         * bindings/js/ScriptModuleLoader.cpp: 
447         (WebCore::ScriptModuleLoader::evaluate): 
448         * bindings/js/SerializedScriptValue.cpp: 
449         (WebCore::CloneSerializer::serialize): 
450         * bindings/js/StructuredClone.cpp: 
451         (WebCore::structuredCloneArrayBufferView): 
452         * bindings/scripts/CodeGeneratorJS.pm: 
453         (GetCastingHelperForThisObject): 
454         (GenerateImplementation): 
455         * bindings/scripts/test/JS/JSInterfaceName.cpp: 
456         (WebCore::jsInterfaceNameConstructor): 
457         (WebCore::setJSInterfaceNameConstructor): 
458         (WebCore::JSInterfaceName::toWrapped): 
459         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: 
460         (WebCore::BindingCaller<JSTestActiveDOMObject>::castForAttribute): 
461         (WebCore::BindingCaller<JSTestActiveDOMObject>::castForOperation): 
462         (WebCore::jsTestActiveDOMObjectConstructor): 
463         (WebCore::setJSTestActiveDOMObjectConstructor): 
464         (WebCore::JSTestActiveDOMObject::toWrapped): 
465         * bindings/scripts/test/JS/JSTestCEReactions.cpp: 
466         (WebCore::BindingCaller<JSTestCEReactions>::castForAttribute): 
467         (WebCore::BindingCaller<JSTestCEReactions>::castForOperation): 
468         (WebCore::jsTestCEReactionsConstructor): 
469         (WebCore::setJSTestCEReactionsConstructor): 
470         (WebCore::JSTestCEReactions::toWrapped): 
471         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: 
472         (WebCore::BindingCaller<JSTestCEReactionsStringifier>::castForAttribute): 
473         (WebCore::BindingCaller<JSTestCEReactionsStringifier>::castForOperation): 
474         (WebCore::jsTestCEReactionsStringifierConstructor): 
475         (WebCore::setJSTestCEReactionsStringifierConstructor): 
476         (WebCore::JSTestCEReactionsStringifier::toWrapped): 
477         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: 
478         (WebCore::jsTestClassWithJSBuiltinConstructorConstructor): 
479         (WebCore::setJSTestClassWithJSBuiltinConstructorConstructor): 
480         (WebCore::JSTestClassWithJSBuiltinConstructor::toWrapped): 
481         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: 
482         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor): 
483         (WebCore::setJSTestCustomConstructorWithNoInterfaceObjectConstructor): 
484         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped): 
485         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: 
486         (WebCore::BindingCaller<JSTestCustomNamedGetter>::castForOperation): 
487         (WebCore::jsTestCustomNamedGetterConstructor): 
488         (WebCore::setJSTestCustomNamedGetterConstructor): 
489         (WebCore::JSTestCustomNamedGetter::toWrapped): 
490         * bindings/scripts/test/JS/JSTestDOMJIT.cpp: 
491         (WebCore::BindingCaller<JSTestDOMJIT>::castForAttribute): 
492         (WebCore::jsTestDOMJITConstructor): 
493         (WebCore::setJSTestDOMJITConstructor): 
494         * bindings/scripts/test/JS/JSTestEventConstructor.cpp: 
495         (WebCore::BindingCaller<JSTestEventConstructor>::castForAttribute): 
496         (WebCore::jsTestEventConstructorConstructor): 
497         (WebCore::setJSTestEventConstructorConstructor): 
498         * bindings/scripts/test/JS/JSTestEventTarget.cpp: 
499         (WebCore::BindingCaller<JSTestEventTarget>::castForOperation): 
500         (WebCore::jsTestEventTargetConstructor): 
501         (WebCore::setJSTestEventTargetConstructor): 
502         (WebCore::JSTestEventTarget::toWrapped): 
503         * bindings/scripts/test/JS/JSTestException.cpp: 
504         (WebCore::BindingCaller<JSTestException>::castForAttribute): 
505         (WebCore::jsTestExceptionConstructor): 
506         (WebCore::setJSTestExceptionConstructor): 
507         (WebCore::JSTestException::toWrapped): 
508         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: 
509         (WebCore::jsTestGenerateIsReachableConstructor): 
510         (WebCore::setJSTestGenerateIsReachableConstructor): 
511         (WebCore::JSTestGenerateIsReachable::toWrapped): 
512         * bindings/scripts/test/JS/JSTestGlobalObject.cpp: 
513         (WebCore::BindingCaller<JSTestGlobalObject>::castForAttribute): 
514         (WebCore::BindingCaller<JSTestGlobalObject>::castForOperation): 
515         (WebCore::jsTestGlobalObjectConstructor): 
516         (WebCore::setJSTestGlobalObjectConstructor): 
517         (WebCore::JSTestGlobalObject::toWrapped): 
518         * bindings/scripts/test/JS/JSTestInterface.cpp: 
519         (WebCore::BindingCaller<JSTestInterface>::castForAttribute): 
520         (WebCore::BindingCaller<JSTestInterface>::castForOperation): 
521         (WebCore::jsTestInterfaceConstructor): 
522         (WebCore::setJSTestInterfaceConstructor): 
523         (WebCore::JSTestInterface::toWrapped): 
524         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp: 
525         (WebCore::BindingCaller<JSTestInterfaceLeadingUnderscore>::castForAttribute): 
526         (WebCore::jsTestInterfaceLeadingUnderscoreConstructor): 
527         (WebCore::setJSTestInterfaceLeadingUnderscoreConstructor): 
528         (WebCore::JSTestInterfaceLeadingUnderscore::toWrapped): 
529         * bindings/scripts/test/JS/JSTestIterable.cpp: 
530         (WebCore::BindingCaller<JSTestIterable>::castForOperation): 
531         (WebCore::jsTestIterableConstructor): 
532         (WebCore::setJSTestIterableConstructor): 
533         (WebCore::JSTestIterable::toWrapped): 
534         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: 
535         (WebCore::BindingCaller<JSTestJSBuiltinConstructor>::castForAttribute): 
536         (WebCore::BindingCaller<JSTestJSBuiltinConstructor>::castForOperation): 
537         (WebCore::jsTestJSBuiltinConstructorConstructor): 
538         (WebCore::setJSTestJSBuiltinConstructorConstructor): 
539         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: 
540         (WebCore::BindingCaller<JSTestMediaQueryListListener>::castForOperation): 
541         (WebCore::jsTestMediaQueryListListenerConstructor): 
542         (WebCore::setJSTestMediaQueryListListenerConstructor): 
543         (WebCore::JSTestMediaQueryListListener::toWrapped): 
544         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: 
545         (WebCore::jsTestNamedConstructorConstructor): 
546         (WebCore::setJSTestNamedConstructorConstructor): 
547         (WebCore::JSTestNamedConstructor::toWrapped): 
548         * bindings/scripts/test/JS/JSTestNode.cpp: 
549         (WebCore::BindingCaller<JSTestNode>::castForAttribute): 
550         (WebCore::BindingCaller<JSTestNode>::castForOperation): 
551         (WebCore::jsTestNodeConstructor): 
552         (WebCore::setJSTestNodeConstructor): 
553         * bindings/scripts/test/JS/JSTestNondeterministic.cpp: 
554         (WebCore::BindingCaller<JSTestNondeterministic>::castForAttribute): 
555         (WebCore::BindingCaller<JSTestNondeterministic>::castForOperation): 
556         (WebCore::jsTestNondeterministicConstructor): 
557         (WebCore::setJSTestNondeterministicConstructor): 
558         (WebCore::JSTestNondeterministic::toWrapped): 
559         * bindings/scripts/test/JS/JSTestObj.cpp: 
560         (WebCore::BindingCaller<JSTestObj>::castForAttribute): 
561         (WebCore::BindingCaller<JSTestObj>::castForOperation): 
562         (WebCore::jsTestObjConstructor): 
563         (WebCore::setJSTestObjConstructor): 
564         (WebCore::JSTestObj::toWrapped): 
565         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: 
566         (WebCore::jsTestOverloadedConstructorsConstructor): 
567         (WebCore::setJSTestOverloadedConstructorsConstructor): 
568         (WebCore::JSTestOverloadedConstructors::toWrapped): 
569         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: 
570         (WebCore::jsTestOverloadedConstructorsWithSequenceConstructor): 
571         (WebCore::setJSTestOverloadedConstructorsWithSequenceConstructor): 
572         (WebCore::JSTestOverloadedConstructorsWithSequence::toWrapped): 
573         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: 
574         (WebCore::BindingCaller<JSTestOverrideBuiltins>::castForOperation): 
575         (WebCore::jsTestOverrideBuiltinsConstructor): 
576         (WebCore::setJSTestOverrideBuiltinsConstructor): 
577         (WebCore::JSTestOverrideBuiltins::toWrapped): 
578         * bindings/scripts/test/JS/JSTestSerialization.cpp: 
579         (WebCore::BindingCaller<JSTestSerialization>::castForAttribute): 
580         (WebCore::BindingCaller<JSTestSerialization>::castForOperation): 
581         (WebCore::jsTestSerializationConstructor): 
582         (WebCore::setJSTestSerializationConstructor): 
583         (WebCore::JSTestSerialization::toWrapped): 
584         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 
585         (WebCore::BindingCaller<JSTestSerializedScriptValueInterface>::castForAttribute): 
586         (WebCore::jsTestSerializedScriptValueInterfaceConstructor): 
587         (WebCore::setJSTestSerializedScriptValueInterfaceConstructor): 
588         (WebCore::JSTestSerializedScriptValueInterface::toWrapped): 
589         * bindings/scripts/test/JS/JSTestTypedefs.cpp: 
590         (WebCore::BindingCaller<JSTestTypedefs>::castForAttribute): 
591         (WebCore::BindingCaller<JSTestTypedefs>::castForOperation): 
592         (WebCore::jsTestTypedefsConstructor): 
593         (WebCore::setJSTestTypedefsConstructor): 
594         (WebCore::JSTestTypedefs::toWrapped): 
595         * bridge/objc/WebScriptObject.mm: 
596         (-[WebScriptObject setValue:forKey:]): 
597         * bridge/runtime_array.cpp: 
598         (JSC::RuntimeArray::lengthGetter): 
599         * bridge/runtime_method.cpp: 
600         (JSC::RuntimeMethod::lengthGetter): 
601         * html/HTMLMediaElement.cpp: 
602         (WebCore::controllerJSValue): 
603         (WebCore::HTMLMediaElement::updateCaptionContainer): 
604         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): 
605         * inspector/InspectorDOMAgent.cpp: 
606         (WebCore::InspectorDOMAgent::buildObjectForEventListener): 
607
608 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
609
610         [CSS Parser] Add font-variant-* keyword property support 
611         https://bugs.webkit.org/show_bug.cgi?id=164195 
612  
613         Reviewed by Zalan Bujtas. 
614  
615         * css/parser/CSSParserFastPaths.cpp: 
616         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): 
617
618 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
619
620         [CSS Parser] Fix text-emphasis-position parsing 
621         https://bugs.webkit.org/show_bug.cgi?id=164197 
622
623         Reviewed by Zalan Bujtas. 
624
625         * css/parser/CSSParserFastPaths.cpp: 
626         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): 
627         (WebCore::CSSParserFastPaths::isKeywordPropertyID): 
628         * css/parser/CSSPropertyParser.cpp: 
629         (WebCore::consumeTextEmphasisPosition): 
630         (WebCore::CSSPropertyParser::parseSingleValue): 
631
632 2016-10-29  Darin Adler  <darin@apple.com> 
633
634         Convert more of DOM from ExceptionCode to Exception 
635         https://bugs.webkit.org/show_bug.cgi?id=164173 
636  
637         Reviewed by Ryosuke Niwa. 
638  
639         * Modules/mediastream/MediaDevices.cpp: 
640         (WebCore::MediaDevices::getUserMedia): Use ExceptionOr. 
641         (WebCore::MediaDevices::enumerateDevices): Ditto. 
642         * Modules/mediastream/MediaDevices.h: Updated for above. 
643         * Modules/mediastream/MediaDevices.idl: Use non-legacy exceptions. 
644  
645         * Modules/mediastream/MediaEndpointSessionDescription.cpp: 
646         Added now-needed include of ExceptionCode.h. 
647  
648         * Modules/mediastream/RTCConfiguration.cpp: 
649         (WebCore::parseIceServer): Use ExceptionOr. 
650         (WebCore::RTCConfiguration::create): Ditto. 
651         (WebCore::RTCConfiguration::initialize): Ditto. 
652         * Modules/mediastream/RTCConfiguration.h: Updated for above. 
653         * Modules/mediastream/RTCConfiguration.idl: Use non-legacy exceptions. 
654  
655         * Modules/mediastream/RTCDTMFSender.cpp: 
656         (WebCore::RTCDTMFSender::create): Use ExceptionOr. 
657         (WebCore::RTCDTMFSender::insertDTMF): Ditto. 
658         * Modules/mediastream/RTCDTMFSender.h: Updated for above. 
659         * Modules/mediastream/RTCDTMFSender.idl: Use non-legacy exceptions. 
660  
661         * Modules/mediastream/RTCDataChannel.cpp: 
662         (WebCore::RTCDataChannel::create): Use ExceptionOr. 
663         (WebCore::RTCDataChannel::setBinaryType): Ditto. 
664         (WebCore::RTCDataChannel::send): Ditto. 
665         (WebCore::RTCDataChannel::didReceiveRawData): Ditto. 
666         * Modules/mediastream/RTCDataChannel.h: Updated for above. 
667         Also changed return values to use const AtomicString& and 
668         unsigned instead of unsigned long. Also made more private. 
669         Also changed BinaryType into an enum class. 
670         * Modules/mediastream/RTCDataChannel.idl: Use non-legacy exceptions. 
671  
672         * Modules/mediastream/RTCIceCandidate.cpp: 
673         (WebCore::RTCIceCandidate::create): Use ExceptionOr. 
674         * Modules/mediastream/RTCIceCandidate.h: Updated for above. 
675         * Modules/mediastream/RTCIceCandidate.idl: Use non-legacy exception. 
676  
677         * Modules/mediastream/RTCOfferAnswerOptions.cpp: 
678         (WebCore::RTCOfferOptions::create): Use ExceptionOr. 
679         (WebCore::RTCAnswerOptions::create): Ditto. 
680         * Modules/mediastream/RTCOfferAnswerOptions.h: Updated for above. 
681         Also removed all virtual functions since nothing here is polymorphic 
682         and initalized data members in the header. 
683  
684         * Modules/mediastream/RTCPeerConnection.cpp: 
685         (WebCore::RTCPeerConnection::initializeWith): Use ExceptionOr. 
686         (WebCore::RTCPeerConnection::addTrack): Ditto. 
687         (WebCore::RTCPeerConnection::removeTrack): Ditto. 
688         (WebCore::RTCPeerConnection::addTransceiver): Ditto. 
689         (WebCore::RTCPeerConnection::completeAddTransceiver): Ditto. 
690         (WebCore::RTCPeerConnection::queuedCreateOffer): Ditto. 
691         (WebCore::RTCPeerConnection::queuedCreateAnswer): Ditto. 
692         (WebCore::RTCPeerConnection::setConfiguration): Ditto. 
693         (WebCore::RTCPeerConnection::createDataChannel): Ditto. 
694         * Modules/mediastream/RTCPeerConnection.h: Updated for above. 
695         * Modules/mediastream/RTCPeerConnection.idl: Use non-legacy exceptions. 
696  
697         * Modules/mediastream/RTCRtpSender.cpp: 
698         (WebCore::RTCRtpSender::replaceTrack): Use ExceptionOr. 
699         * Modules/mediastream/RTCRtpSender.h: Updated for above. 
700         * Modules/mediastream/RTCRtpSender.idl: Use non-legacy exception. 
701  
702         * Modules/mediastream/RTCSessionDescription.cpp: 
703         (WebCore::RTCSessionDescription::create): Use ExceptoinOr. 
704         * Modules/mediastream/RTCSessionDescription.h: Updated for above. 
705         (WebCore::RTCSessionDescription::~RTCSessionDescription): 
706         * Modules/mediastream/RTCSessionDescription.idl: Use non-legacy exceptions. 
707  
708         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp: 
709         (WebCore::verifyCustomHandlerURL): Just return a boolean, no exception. 
710         (WebCore::verifyProtocolHandlerScheme): Ditto. 
711         (WebCore::NavigatorContentUtils::registerProtocolHandler): Use ExceptionOr. 
712         (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered): Ditto. 
713         (WebCore::NavigatorContentUtils::unregisterProtocolHandler): Ditto. 
714         * Modules/navigatorcontentutils/NavigatorContentUtils.h: Updated for above. 
715         * Modules/navigatorcontentutils/NavigatorContentUtils.idl: Use non-legacy exceptions. 
716  
717         * bindings/js/JSMediaDevicesCustom.cpp: 
718         (WebCore::JSMediaDevicesGetUserMediaPromiseFunction): Use propagateException. 
719  
720         * bindings/scripts/CodeGeneratorJS.pm: 
721         (NeedsExplicitPropagateExceptionCall): Added. Helper function to decide whether 
722         we need to call propagateException explicitly, if return value processing is not 
723         going to propagate the exception for us. 
724         (GenerateParametersCheck): Moved the code from GenerateReturnParameters inline 
725         because it's almost as short as the function call. Use the newly created 
726         NeedsExplicitPropagateExceptionCall function, which properly handles the case 
727         where the return value is a promise. 
728         (GenerateReturnParameters): Deleted. 
729  
730         * dom/CharacterData.cpp: 
731         (WebCore::CharacterData::substringData): Use ExceptionOr. 
732         (WebCore::CharacterData::insertData): Ditto. 
733         (WebCore::CharacterData::deleteData): Ditto. 
734         (WebCore::CharacterData::replaceData): Ditto. 
735         * dom/CharacterData.h: Updated for above. 
736         * dom/CharacterData.idl: Use non-legacy exceptions. 
737  
738         * dom/DataTransferItemList.h: Tried to use ExceptionOr, but this seems 
739         like dead code that doesn't compile. 
740         * dom/DataTransferItemList.idl: Use non-legacy exceptions. 
741  
742         * dom/MessagePort.idl: Use non-legacy exceptions, except this has 
743         already been converted and was a custom binding. 
744  
745         * dom/MutationObserver.cpp: 
746         (WebCore::MutationObserver::observe): Use ExceptionOr. 
747         * dom/MutationObserver.h: Updated for above. 
748         * dom/MutationObserver.idl: Use non-legacy exception. 
749  
750         * dom/Range.cpp: 
751         (WebCore::deleteCharacterData): Updated use of calls that now use 
752         ExceptionOr. 
753         (WebCore::Range::processContentsBetweenOffsets): Ditto. 
754         (WebCore::Range::insertNode): Ditto. 
755  
756         * dom/ShadowRoot.cpp: 
757         (WebCore::ShadowRoot::setInnerHTML): Use ExceptionOr. 
758         * dom/ShadowRoot.h: Updated for above. 
759         * dom/ShadowRoot.idl: Use non-legacy exception. 
760  
761         * dom/Text.cpp: 
762         (WebCore::Text::splitText): Use ExceptionOr. 
763         (WebCore::Text::replaceWholeText): Removed unused ExceptionCode&. 
764         * dom/Text.h: Updated for above. 
765         * dom/Text.idl: Use non-legacy exception. 
766  
767         * editing/ApplyBlockElementCommand.cpp: 
768         (WebCore::isNewLineAtPosition): Rewrote to use data rather than 
769         substringData; more efficient. 
770  
771         * editing/DeleteFromTextNodeCommand.cpp: 
772         (WebCore::DeleteFromTextNodeCommand::doApply): Updated to work with 
773         functions that return ExceptionOr. 
774         (WebCore::DeleteFromTextNodeCommand::doUnapply): Removed IGNORE_EXCEPTION. 
775  
776         * editing/InsertIntoTextNodeCommand.cpp: 
777         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand): 
778         Use WTFMove to avoid a little bit of reference count churn. 
779         (WebCore::InsertIntoTextNodeCommand::doApply): Removed IGNORE_EXCEPTION. 
780         (WebCore::InsertIntoTextNodeCommand::doReapply): Removed ExceptionCode. 
781         (WebCore::InsertIntoTextNodeCommand::doUnapply): Removed IGNORE_EXCEPTION. 
782  
783         * editing/SplitTextNodeCommand.cpp: 
784         (WebCore::SplitTextNodeCommand::doApply): Updated to work with functions 
785         that return ExceptionCode. 
786         (WebCore::SplitTextNodeCommand::doUnapply): Removed ASSERT_NO_EXCEPTION. 
787         (WebCore::SplitTextNodeCommand::insertText1AndTrimText2): Updated to work 
788         with functions that return ExceptionCode. 
789  
790         * html/HTMLTextFormControlElement.cpp: 
791         Added now-needed include of ExceptionCode.h. 
792  
793         * inspector/DOMEditor.cpp: Removed ExceptionCode out argument from calls 
794         to replaceWholeText, which never throws an exception. 
795  
796 2016-10-29  Dean Jackson  <dino@apple.com> 
797  
798         Parse color() function 
799         https://bugs.webkit.org/show_bug.cgi?id=164146 
800         <rdar://problems/29007218> 
801  
802         Reviewed by Darin Adler. 
803  
804         Support the new CSS color() function: 
805         https://drafts.csswg.org/css-color/#color-function 
806  
807         There are separate code paths for the old and new CSS parser. 
808  
809         Tests: css3/color/color-function-computed-style.html 
810                css3/color/color-function-parsing.html 
811  
812         * css/CSSComputedStyleDeclaration.cpp: Use Color directly, not via rgb(). 
813         (WebCore::ComputedStyleExtractor::currentColorOrValidColor): 
814         (WebCore::ComputedStyleExtractor::valueForShadow): 
815         (WebCore::ComputedStyleExtractor::propertyValue): 
816  
817         * css/CSSValueKeywords.in: Note that there is a color function, but the 
818         keyword is already defined. Also add keywords for the color spaces. 
819         * css/SVGCSSValueKeywords.in: sRGB is used outside of SVG now. 
820  
821         * css/parser/CSSParser.cpp: Old CSS parser code to handle color(). 
822         (WebCore::isPercent): Helper to tell if a ValueWithCalculation is a percentage or not. 
823         (WebCore::CSSParser::parseColorInt): Renamed. 
824         (WebCore::CSSParser::parseColorDouble): Helper to get a Number/Percentage into a double 
825         (WebCore::CSSParser::parseRGBParameters): 
826         (WebCore::CSSParser::parseColorFunctionParameters): 
827         (WebCore::CSSParser::parseHSLParameters): 
828         (WebCore::CSSParser::parseColorFromValue): 
829         (WebCore::CSSParser::colorIntFromValue): Deleted. 
830         * css/parser/CSSParser.h: 
831  
832         * css/parser/CSSPropertyParserHelpers.cpp: New CSS parser code to handle color(). 
833         (WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters): 
834         (WebCore::CSSPropertyParserHelpers::parseColorFunction): 
835  
836         * platform/graphics/Color.h: 
837         (WebCore::Color::isValid): An extended color is valid. 
838         (WebCore::Color::rgb): Move the code to a standalone inline 
839         so that I could add a longer comment. 
840  
841         * platform/graphics/ExtendedColor.cpp: 
842         (WebCore::ExtendedColor::cssText): Alpha output is only needed if != 1. 
843  
844         * platform/graphics/cg/ColorCG.cpp: Handle ExtendedColor -> CGColor. 
845         (WebCore::leakCGColor): 
846         (WebCore::cachedCGColor): 
847  
848 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
849  
850         [CSS Parser] Disable -webkit-text-size-adjust when the context says to. 
851         https://bugs.webkit.org/show_bug.cgi?id=164191 
852  
853         Reviewed by Dean Jackson. 
854  
855         * css/parser/CSSPropertyParser.cpp: 
856         (WebCore::CSSPropertyParser::parseSingleValue): 
857  
858 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
859  
860         [CSS Parser] Match old parser's image-rendering values 
861         https://bugs.webkit.org/show_bug.cgi?id=164190 
862  
863         Reviewed by Dean Jackson. 
864  
865         * css/parser/CSSParserFastPaths.cpp: 
866         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): 
867  
868 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
869  
870         [CSS Parser] Support -webkit-text value for background-clip and -webkit-background-clip 
871         https://bugs.webkit.org/show_bug.cgi?id=164189 
872  
873         Reviewed by Dean Jackson. 
874  
875         * css/parser/CSSPropertyParser.cpp: 
876         (WebCore::consumeBackgroundBox): 
877         (WebCore::consumePrefixedBackgroundBox): 
878  
879 2016-10-29  Joseph Pecoraro  <pecoraro@apple.com> 
880  
881         Remove some unnecessary includes 
882         https://bugs.webkit.org/show_bug.cgi?id=164174 
883  
884         Reviewed by Darin Adler. 
885  
886 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
887  
888         [CSS Parser] Support -webkit-aspect-ratio 
889         https://bugs.webkit.org/show_bug.cgi?id=164187 
890  
891         Reviewed by Simon Fraser. 
892  
893         * css/parser/CSSPropertyParser.cpp: 
894         (WebCore::consumeWebkitAspectRatio): 
895         (WebCore::CSSPropertyParser::parseSingleValue): 
896  
897 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
898  
899         [CSS Parser] Support the caps lock indicator appearance 
900         https://bugs.webkit.org/show_bug.cgi?id=164186 
901  
902         Reviewed by Simon Fraser. 
903  
904         * css/parser/CSSParserFastPaths.cpp: 
905         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): 
906  
907 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
908  
909         [CSS Parser] Support the alt property 
910         https://bugs.webkit.org/show_bug.cgi?id=164184 
911  
912         Reviewed by Simon Fraser. 
913  
914         * css/parser/CSSPropertyParser.cpp: 
915         (WebCore::consumeAlt): 
916         (WebCore::CSSPropertyParser::parseSingleValue): 
917  
918 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
919  
920         [CSS Parser] Add support for -webkit-hyphenate-limit-* properties 
921         https://bugs.webkit.org/show_bug.cgi?id=164183 
922  
923         Reviewed by Simon Fraser. 
924  
925         * css/parser/CSSPropertyParser.cpp: 
926         (WebCore::consumeHyphenateLimit): 
927         (WebCore::CSSPropertyParser::parseSingleValue): 
928  
929 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
930  
931         [CSS Parser] Fix transform-origin and perspective-origin to parse as shorthands 
932         https://bugs.webkit.org/show_bug.cgi?id=164178 
933  
934         Reviewed by Zalan Bujtas. 
935  
936         * css/CSSPropertyNames.in: 
937         Patch the transform-origin-x/y and perspective-origin-x/y properties 
938         to use new converters that can handle keywords. 
939  
940         * css/StyleBuilderConverter.h: 
941         (WebCore::StyleBuilderConverter::convertPositionComponentX): 
942         (WebCore::StyleBuilderConverter::convertPositionComponentY): 
943         Add the new converters. They just call convertPositionComponent method 
944         that we already use for object-position and background-position. 
945  
946         * css/parser/CSSPropertyParser.cpp: 
947         (WebCore::CSSPropertyParser::consumeTransformOrigin): 
948         (WebCore::CSSPropertyParser::consumePerspectiveOrigin): 
949         Changed to treat the properties as shorthands and add the longhand 
950         properties once parsed. 
951  
952         (WebCore::CSSPropertyParser::parseSingleValue): 
953         (WebCore::CSSPropertyParser::parseShorthand): 
954         * css/parser/CSSPropertyParser.h: 
955         Move the parsing into the shorthand method, since we're still treating 
956         these properties as shorthands. 
957  
958 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
959  
960         [CSS Parser] Support -webkit-background-composite 
961         https://bugs.webkit.org/show_bug.cgi?id=164179 
962  
963         Reviewed by Zalan Bujtas. 
964  
965         * css/parser/CSSPropertyParser.cpp: 
966         (WebCore::consumeBackgroundComponent): 
967         (WebCore::CSSPropertyParser::parseSingleValue): 
968  
969 2016-10-29  Youenn Fablet  <youenn@apple.com> 
970  
971         REGRESSION (r207754): LayoutTest http/tests/security/svg-image-with-css-cross-domain.html is a flaky failure 
972         https://bugs.webkit.org/show_bug.cgi?id=163922 
973  
974         Reviewed by Alex Christensen. 
975  
976         Test: http/tests/security/cached-svg-image-with-css-cross-domain.html 
977  
978         Raw data was not copied in cloned CachedCSSStyleSheet while it is used by some of its clients. 
979         Updated CachedCSSStyleSheet and CachedImage cloning to copy its raw data. 
980  
981         * loader/cache/CachedCSSStyleSheet.cpp: 
982         (WebCore::CachedCSSStyleSheet::setBodyDataFrom): 
983         * loader/cache/CachedImage.cpp: 
984         (WebCore::CachedImage::setBodyDataFrom): 
985         * loader/cache/CachedResource.h: 
986         (WebCore::CachedResource::mayTryReplaceEncodedData): 
987  
988 2016-10-29  Youenn Fablet  <youenn@apple.com> 
989  
990         REGRESSION (Safari 10 / r189445): WKWebView and WebView no longer allow async XMLHttpRequest timeout to exceed 60 seconds 
991         https://bugs.webkit.org/show_bug.cgi?id=163814 
992         <rdar://problem/28917420> 
993  
994         Reviewed by Darin Adler. 
995  
996         Tests: http/tests/xmlhttprequest/resetting-timeout-to-zero.html 
997                http/tests/xmlhttprequest/timeout-greater-than-default-network-timeout.html 
998  
999         * xml/XMLHttpRequest.cpp: 
1000         (WebCore::XMLHttpRequest::setTimeout): If the XHR timeout is active, resetting the timeout to zero should lead to using the default network timeout. 
1001         Since it is difficult to update the timeout once the request is sent, we mimic the default network timeout with a 60 seconds XHR timeout. 
1002         (WebCore::XMLHttpRequest::createRequest): Setting network timeout to infinity if the XHR timeout is active. 
1003  
1004 2016-10-29  Youenn Fablet  <youenn@apple.com> 
1005  
1006         MediaEndpoint::generateDtlsInfo is not needed 
1007         https://bugs.webkit.org/show_bug.cgi?id=164130 
1008  
1009         Reviewed by Eric Carlson. 
1010  
1011         No change of behavior. 
1012  
1013         Removing MediaEndpoint::generateDtlsInfo as it can be called directly from createMediaEndpointOwr. 
1014  
1015         * Modules/mediastream/MediaEndpointPeerConnection.cpp: 
1016         (WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection): 
1017         * platform/mediastream/MediaEndpoint.cpp: 
1018         * platform/mediastream/MediaEndpoint.h: 
1019         * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp: 
1020         (WebCore::createMediaEndpointOwr): 
1021         * platform/mediastream/openwebrtc/MediaEndpointOwr.h: 
1022         * platform/mock/MockMediaEndpoint.cpp: 
1023         (WebCore::MockMediaEndpoint::MockMediaEndpoint): 
1024         (WebCore::MockMediaEndpoint::generateDtlsInfo): Deleted. 
1025         * platform/mock/MockMediaEndpoint.h: 
1026  
1027 2016-10-28  Wenson Hsieh  <wenson_hsieh@apple.com> 
1028  
1029         Unreviewed, add Input Events to the features list. 
1030  
1031         * features.json: 
1032  
1033 2016-10-28  Darin Adler  <darin@apple.com> 
1034  
1035         Fix mismerge that broke a CEReactions test. 
1036  
1037         * html/HTMLOptionsCollection.idl: Add back CEReactions to the remove function. 
1038  
1039 2016-10-28  Darin Adler  <darin@apple.com> 
1040  
1041         Move all classes in the HTML directory from ExceptionCode to Exception 
1042         https://bugs.webkit.org/show_bug.cgi?id=163876 
1043  
1044         Reviewed by Sam Weinig. 
1045  
1046         * bindings/js/JSDOMBinding.cpp: 
1047         (WebCore::shouldAllowAccessToNode): Deleted. 
1048         (WebCore::BindingSecurity::shouldAllowAccessToFrame): Moved function into the 
1049         BindingSecurity namespace. Also changed arguments to references. 
1050         (WebCore::BindingSecurity::shouldAllowAccessToDOMWindow): Ditto. 
1051         (WebCore::BindingSecurity::shouldAllowAccessToNode): Changed argument type 
1052         from pointer to reference. 
1053  
1054         * bindings/js/JSDOMBinding.h: Removed top level shouldAllowAccessTo functions, 
1055         moving all of them into the BindingSecurity namespace. Changed BindingSecurity 
1056         from a class into a namespace. Added new checkSecurityForNode functions that 
1057         can be used directly to implement CheckSecurityForNode; they turn the node 
1058         into a null, which is no change in behavior from what bindings already did. 
1059  
1060         * bindings/js/JSDOMWindowCustom.cpp: 
1061         (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess): Changed argument 
1062         type for passed-in string to const String& instead of String&. 
1063         (WebCore::JSDOMWindow::getOwnPropertySlot): Updated for BindingSecurity changes. 
1064         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex): Ditto. 
1065         (WebCore::JSDOMWindow::put): Ditto. 
1066  
1067         * bindings/js/JSHTMLCanvasElementCustom.cpp: 
1068         (WebCore::attributesFor3DContext): Renamed from get3DContextAttributes and 
1069         changed to use a return value instead of an out argument. 
1070         (WebCore::JSHTMLCanvasElement::getContext): Updated for the above. 
1071         (WebCore::JSHTMLCanvasElement::toDataURL): Rewrote to handle ExceptionOr 
1072         and also to use Optional<double> instead of const double*. 
1073  
1074         * bindings/js/JSHTMLFrameElementCustom.cpp: 
1075         (WebCore::JSHTMLFrameElement::setLocation): Moved the logic from 
1076         allowSettingJavascriptURL in here and updated for BindingSecurity changes. 
1077  
1078         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: 
1079         (WebCore::JSHTMLOptionsCollection::setLength): Use propagateException. 
1080         Also streamlined the code a bit. 
1081         (WebCore::JSHTMLOptionsCollection::indexSetter): Updated for new name and 
1082         argument types for selectElementIndexSetter. 
1083  
1084         * bindings/js/JSHTMLSelectElementCustom.cpp: 
1085         (WebCore::selectElementIndexSetter): Updated name and argument types and 
1086         to use propagateException. 
1087         (WebCore::JSHTMLSelectElement::indexSetter): Updated for above. 
1088         * bindings/js/JSHTMLSelectElementCustom.h: Ditto. 
1089  
1090         * bindings/js/JSLocationCustom.cpp: 
1091         (WebCore::JSLocation::getOwnPropertySlotDelegate): Updated for changes to 
1092         BindingSecurity. 
1093         (WebCore::JSLocation::putDelegate): Ditto. Also rearranged logic a bit. 
1094  
1095         * bindings/js/ScriptController.cpp: 
1096         (WebCore::ScriptController::canAccessFromCurrentOrigin): Updated for 
1097         changes to BindingSecurity. 
1098  
1099         * bindings/scripts/CodeGeneratorJS.pm: 
1100         (GenerateImplementation): Removed old support for CheckSecurityForNode. 
1101         (NativeToJSValue): Added new support for CheckSecurityForNode, which uses 
1102         the new checkSecurityForNode function, and works properly with ExceptionOr. 
1103  
1104         * bindings/scripts/test/JS/JSTestObj.cpp: Updated for change below. 
1105  
1106         * dom/ChildNode.idl: Move the remove function to non-legacy exception. 
1107         Needed now because this needs to match the one in HTMLSelectElement. 
1108  
1109         * dom/Element.cpp: 
1110         (WebCore::Element::dispatchMouseForceWillBegin): Refactored a little bit. 
1111         (WebCore::Element::mergeWithNextTextNode): Support ExceptionOr for remove. 
1112         (WebCore::Element::setOuterHTML): Support ExceptionOr for 
1113         createFragmentForInnerOuterHTML. 
1114         (WebCore::Element::setInnerHTML): Ditto. 
1115         (WebCore::Element::insertAdjacentHTML): Ditto. 
1116  
1117         * dom/Node.cpp: 
1118         (WebCore::Node::remove): Use ExceptionOr. 
1119         (WebCore::Node::normalize): Remove use of IGNORE_EXCEPTION. 
1120         * dom/Node.h: Use ExceptionOr for remove. 
1121  
1122         * dom/Range.cpp: 
1123         (WebCore::Range::insertNode): Updated for change to remove. 
1124         (WebCore::Range::createContextualFragment): Updated for change 
1125         to WebCore::createContextualFragment. 
1126  
1127         * dom/ShadowRoot.cpp: 
1128         (WebCore::ShadowRoot::setInnerHTML): Use ExceptionOr for 
1129         createFragmentForInnerOuterHTML and replaceChildrenWithFragment. 
1130  
1131         * editing/AppendNodeCommand.cpp: 
1132         (WebCore::AppendNodeCommand::doUnapply): Remove IGNORE_EXCEPTION. 
1133         * editing/InsertNodeBeforeCommand.cpp: 
1134         (WebCore::InsertNodeBeforeCommand::doUnapply): Ditto. 
1135         * editing/MergeIdenticalElementsCommand.cpp: 
1136         (WebCore::MergeIdenticalElementsCommand::doApply): Ditto. 
1137         * editing/RemoveNodeCommand.cpp: 
1138         (WebCore::RemoveNodeCommand::doApply): Ditto. 
1139         * editing/SplitElementCommand.cpp: 
1140         (WebCore::SplitElementCommand::doUnapply): Ditto. 
1141         * editing/SplitTextNodeCommand.cpp: 
1142         (WebCore::SplitTextNodeCommand::doUnapply): Ditto. 
1143         * editing/WrapContentsInDummySpanCommand.cpp: 
1144         (WebCore::WrapContentsInDummySpanCommand::doUnapply): Ditto. 
1145  
1146         * editing/Editor.cpp: 
1147         (WebCore::Editor::insertDictationPhrases): Deleted. Moved this 
1148         iOS-specific function to EditorIOS.mm. 
1149         (WebCore::Editor::setDictationPhrasesAsChildOfElement): Ditto. 
1150         (WebCore::Editor::confirmMarkedText): Ditto. 
1151         (WebCore::Editor::setTextAsChildOfElement): Ditto. 
1152         (WebCore::Editor::ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTyping): Ditto. 
1153  
1154         * editing/ios/EditorIOS.mm: 
1155         (WebCore::Editor::fontForSelection): Remove ASSERT_NO_EXCEPTION. 
1156         (WebCore::Editor::fontAttributesForSelectionStart): Ditto. 
1157         (WebCore::Editor::insertDictationPhrases): Moved here from Editor.cpp. 
1158         (WebCore::Editor::setDictationPhrasesAsChildOfElement): Ditto. Also 
1159         updated code that used remove to not pass an ExceptionCode. 
1160         (WebCore::Editor::confirmMarkedText): Ditto. 
1161         (WebCore::Editor::setTextAsChildOfElement): Ditto. 
1162         (WebCore::Editor::ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTyping): Ditto. 
1163  
1164         * editing/mac/EditorMac.mm: 
1165         (WebCore::Editor::fontForSelection): Remove ASSERT_NO_EXCEPTION. 
1166         (WebCore::Editor::fontAttributesForSelectionStart): Ditto. 
1167  
1168         * editing/markup.cpp: 
1169         (WebCore::createFragmentForInnerOuterHTML): Use ExceptionOr. 
1170         (WebCore::createContextualFragment): Ditto. 
1171         (WebCore::replaceChildrenWithFragment): Ditto. 
1172         (WebCore::replaceChildrenWithText): Ditto. 
1173         * editing/markup.h: Updated for above changes. 
1174  
1175         * html/BaseChooserOnlyDateAndTimeInputType.cpp: 
1176         (WebCore::BaseChooserOnlyDateAndTimeInputType::updateAppearance): 
1177         Removed ASSERT_NO_EXCEPTION. 
1178  
1179         * html/BaseDateAndTimeInputType.cpp: 
1180         (WebCore::BaseDateAndTimeInputType::setValueAsDate): Use ExceptionOr. 
1181         (WebCore::BaseDateAndTimeInputType::setValueAsDecimal): Ditto. 
1182         * html/BaseDateAndTimeInputType.h: Updated for above changes. 
1183  
1184         * html/DateTimeLocalInputType.cpp: 
1185         (WebCore::DateTimeLocalInputType::setValueAsDate): Use ExceptionOr. 
1186         * html/DateTimeLocalInputType.h: Updated for above changes. 
1187  
1188         * html/DOMTokenList.cpp: 
1189         (WebCore::DOMTokenList::validateToken): Use ExceptionOr. 
1190         (WebCore::DOMTokenList::validateTokens): Ditto. 
1191         (WebCore::DOMTokenList::addInternal): Ditto. 
1192         (WebCore::DOMTokenList::add): Ditto. 
1193         (WebCore::DOMTokenList::removeInternal): Ditto. 
1194         (WebCore::DOMTokenList::remove): Ditto. 
1195         (WebCore::DOMTokenList::toggle): Ditto. 
1196         (WebCore::DOMTokenList::replace): Ditto. 
1197         (WebCore::DOMTokenList::supports): Ditto. 
1198         * html/DOMTokenList.h: Updated for above changes. 
1199         * html/DOMTokenList.idl: Use non-legacy exceptions. 
1200  
1201         * html/DOMURL.cpp: 
1202         (WebCore::DOMURL::DOMURL): Just take the two URL objects and let 
1203         the create functions do all the processing. 
1204         (WebCore::DOMURL::create): Use ExceptionOr, and move the processing 
1205         of the URLs here out of the constructors. 
1206         (WebCore::DOMURL::setHref): Use ExceptionOr. 
1207         * html/DOMURL.h: Updated for above changes. 
1208         * html/DOMURL.idl: Use non-legacy exceptions. 
1209  
1210         * html/FTPDirectoryDocument.cpp: 
1211         (WebCore::FTPDirectoryDocumentParser::appendEntry): Remove 
1212         IGNORE_EXCEPTION and use releaseReturnValue(). 
1213  
1214         * html/HTMLCanvasElement.cpp: 
1215         (WebCore::HTMLCanvasElement::toDataURL): Use ExceptionOr. 
1216         * html/HTMLCanvasElement.h: Updated for above changes. 
1217         * html/HTMLCanvasElement.idl: Use non-legacy exception. 
1218  
1219         * html/HTMLElement.cpp: 
1220         (WebCore::HTMLElement::textToFragment): Use ExceptionOr. 
1221         (WebCore::HTMLElement::setInnerText): Ditto. 
1222         (WebCore::HTMLElement::setOuterText): Ditto. 
1223         (WebCore::HTMLElement::setContentEditable): Ditto. 
1224         (WebCore::HTMLElement::translateAttributeMode): Deleted. 
1225         (WebCore::HTMLElement::translate): Moved the logic from the 
1226         translateAttributeMode function in here. 
1227         * html/HTMLElement.h: Updated for above changes. 
1228         * html/HTMLElement.idl: Use non-legacy exceptions. 
1229  
1230         * html/HTMLEmbedElement.idl: Use non-legacy exception. 
1231         * html/HTMLFrameElement.idl: Ditto. 
1232  
1233         * html/HTMLFrameOwnerElement.cpp: 
1234         (WebCore::HTMLFrameOwnerElement::getSVGDocument): Use ExceptionOr. 
1235         * html/HTMLFrameOwnerElement.h: Updated for above. 
1236  
1237         * html/HTMLIFrameElement.idl: Use non-legacy exception. 
1238  
1239         * html/HTMLInputElement.cpp: 
1240         (WebCore::HTMLInputElement::stepUp): Use ExceptionOr. 
1241         (WebCore::HTMLInputElement::stepDown): Ditto. 
1242         (WebCore::HTMLInputElement::setValue): Ditto. 
1243         (WebCore::HTMLInputElement::setValueAsDate): Ditto. 
1244         (WebCore::HTMLInputElement::setValueAsNumber): Ditto. 
1245         (WebCore::HTMLInputElement::setSize): Ditto. 
1246         (WebCore::HTMLInputElement::maxLengthAttributeChanged): Use the 
1247         new internalSetMaxLength function; old code relied on a setMaxLength 
1248         that was different from the one exposed to bindings. 
1249         (WebCore::HTMLInputElement::minLengthAttributeChanged): Ditto. 
1250         (WebCore::HTMLInputElement::setRangeText): Use ExceptionOr. 
1251         * html/HTMLInputElement.h: Updated for above changes. Also use 
1252         data member initialization for InputElementClickState instead of 
1253         a constructor. 
1254         * html/HTMLInputElement.idl: Use non-legacy exception. 
1255  
1256         * html/HTMLMarqueeElement.cpp: 
1257         (WebCore::HTMLMarqueeElement::setLoop): Use ExceptionOr. 
1258         (WebCore::HTMLMarqueeElement::renderMarquee): Tweaked. 
1259         * html/HTMLMarqueeElement.h: Updated for above changes. 
1260         * html/HTMLMarqueeElement.idl: Ditto. 
1261  
1262         * html/HTMLMediaElement.cpp: 
1263         (WebCore::HTMLMediaElement::TrackGroup::TrackGroup): 
1264         Initialize most data members in class definition rather than 
1265         the constructor. 
1266         (WebCore::HTMLMediaElement::HTMLMediaElement): Ditto. 
1267         (WebCore::HTMLMediaElement::~HTMLMediaElement): Updated since 
1268         removeMediaElement now takes a reference. 
1269         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Use 
1270         a modern for loop to streamline code. 
1271         (WebCore::HTMLMediaElement::textTrackModeChanged): Updated since 
1272         track now returns a reference. 
1273         (WebCore::HTMLMediaElement::setCurrentTimeForBindings): Renamed 
1274         to prevent ambiguity with the other version that has slightly 
1275         different semantics and overloading and changed to use ExceptionOr. 
1276         (WebCore::HTMLMediaElement::playInternal): Updated to use reference. 
1277         (WebCore::HTMLMediaElement::setVolume): Use ExceptionOr. 
1278         (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Take a 
1279         reference instead of a PassRefPtr. 
1280         (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Ditto. 
1281         (WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack): Ditto. 
1282         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveAudioTrack): Ditto. 
1283         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveTextTrack): Ditto. 
1284         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveVideoTrack): Ditto. 
1285         (WebCore::HTMLMediaElement::addTextTrack): Use ExceptionOr. 
1286         (WebCore::HTMLMediaElement::didAddTextTrack): Use a reference. 
1287         (WebCore::HTMLMediaElement::didRemoveTextTrack): Ditto. 
1288         (WebCore::HTMLMediaElement::maxBufferedTime): Update to use different 
1289         interface to time ranges that does not need to deal with exceptions. 
1290         (WebCore::HTMLMediaElement::setController): Pass references. 
1291         (WebCore::HTMLMediaElement::outOfBandTrackSources): Use reference. 
1292         * html/HTMLMediaElement.h: Updated for above. 
1293         * html/HTMLMediaElement.idl: Use non-legacy exceptions. 
1294
1295         * html/HTMLObjectElement.idl: Use non-legacy exception. 
1296      
1297         * html/HTMLOptionElement.cpp: 
1298         (WebCore::HTMLOptionElement::createForJSConstructor): Use ExceptionOr. 
1299         * html/HTMLOptionElement.h: Updated for above change. 
1300         * html/HTMLOptionElement.idl: Use non-legacy exception. 
1301
1302         * html/HTMLOptionsCollection.cpp: 
1303         (WebCore::HTMLOptionsCollection::setLength): Use ExceptionOr. 
1304         * html/HTMLOptionsCollection.h: Updated for above change. 
1305         * html/HTMLOptionsCollection.idl: Use non-legacy exception. 
1306  
1307         * html/HTMLProgressElement.cpp: 
1308         (WebCore::HTMLProgressElement::setValue): Removed non-finite handling 
1309         because that is now handled by the bindings. 
1310         (WebCore::HTMLProgressElement::setMax): Ditto. 
1311         * html/HTMLProgressElement.h: Updated for above. 
1312         * html/HTMLProgressElement.idl: Changed attributes to be double instead 
1313         of unrestricted double, and this was able to remove exceptions. 
1314  
1315         * html/HTMLSelectElement.cpp: 
1316         (WebCore::HTMLSelectElement::removeByIndex): Drop IGNORE_EXCEPTION. 
1317         (WebCore::HTMLSelectElement::remove): Use ExceptionOr. 
1318         (WebCore::HTMLSelectElement::setOption): Ditto. 
1319         (WebCore::HTMLSelectElement::setLength): Ditto. 
1320         * html/HTMLSelectElement.h: Updated for above changes. 
1321         * html/HTMLSelectElement.idl: Use non-legacy exceptions. 
1322  
1323         * html/HTMLTableElement.cpp: 
1324         (WebCore::HTMLTableElement::setCaption): Use ExceptionOr. 
1325         (WebCore::HTMLTableElement::setTHead): Ditto. 
1326         (WebCore::HTMLTableElement::setTFoot): Ditto. 
1327         (WebCore::HTMLTableElement::createTHead): Streamline a bit. 
1328         (WebCore::HTMLTableElement::deleteTHead): Ditto. 
1329         (WebCore::HTMLTableElement::createTFoot): Ditto. 
1330         (WebCore::HTMLTableElement::deleteTFoot): Ditto. 
1331         (WebCore::HTMLTableElement::createTBody): Ditto. 
1332         (WebCore::HTMLTableElement::createCaption): Ditto. 
1333         (WebCore::HTMLTableElement::insertRow): Use ExceptionOr. 
1334         (WebCore::HTMLTableElement::deleteRow): Ditto. 
1335         * html/HTMLTableElement.h: Updated for above changes. 
1336         * html/HTMLTableElement.idl: Use non-legacy exceptions. 
1337  
1338         * html/HTMLTableRowElement.cpp: 
1339         (WebCore::findTable): Added. 
1340         (WebCore::HTMLTableRowElement::rowIndex): Streamline a bit using the 
1341         findTable function above. 
1342         (WebCore::findRows): Added. 
1343         (WebCore::HTMLTableRowElement::sectionRowIndex): Streamline a bit using 
1344         the findRows function above. 
1345         (WebCore::HTMLTableRowElement::insertCell): Use ExceptionOr. 
1346         (WebCore::HTMLTableRowElement::deleteCell): Ditto. 
1347         (WebCore::HTMLTableRowElement::setCells): Deleted. 
1348         * html/HTMLTableRowElement.h: Updated for the above. The setCells function 
1349         was dead code. 
1350         * html/HTMLTableRowElement.idl: Use non-legacy exceptions. 
1351  
1352         * html/HTMLTableSectionElement.cpp: 
1353         (WebCore::HTMLTableSectionElement::additionalPresentationAttributeStyle): 
1354         Tweaked a bit to use early return. 
1355         (WebCore::HTMLTableSectionElement::insertRow): Use ExceptionOr. 
1356         (WebCore::HTMLTableSectionElement::deleteRow): Ditto. 
1357         (WebCore::HTMLTableSectionElement::numRows): Use childrenOfType. 
1358         (WebCore::HTMLTableSectionElement::align): Deleted. 
1359         (WebCore::HTMLTableSectionElement::setAlign): Deleted. 
1360         (WebCore::HTMLTableSectionElement::ch): Deleted. 
1361         (WebCore::HTMLTableSectionElement::setCh): Deleted. 
1362         (WebCore::HTMLTableSectionElement::chOff): Deleted. 
1363         (WebCore::HTMLTableSectionElement::setChOff): Deleted. 
1364         (WebCore::HTMLTableSectionElement::vAlign): Deleted. 
1365         (WebCore::HTMLTableSectionElement::setVAlign): Deleted. 
1366         * html/HTMLTableSectionElement.h: Updated for the above. 
1367         * html/HTMLTableSectionElement.idl: Use non-legacy exception. 
1368  
1369         * html/HTMLTextAreaElement.cpp: 
1370         (WebCore::HTMLTextAreaElement::maxLengthAttributeChanged): Use the new 
1371         internalSetMaxLength function; old code relied on a setMaxLength 
1372         that was different from the one exposed to bindings. 
1373         (WebCore::HTMLTextAreaElement::minLengthAttributeChanged): Ditto. 
1374         (WebCore::HTMLTextAreaElement::updatePlaceholderText): Removed 
1375         ASSERT_NO_EXCEPTION. 
1376         * html/HTMLTextAreaElement.idl: Use non-legacy exceptions. 
1377  
1378         * html/HTMLTextFormControlElement.cpp: 
1379         (WebCore::HTMLTextFormControlElement::setRangeText): Use ExceptionOr. 
1380         (WebCore::HTMLTextFormControlElement::setInnerTextValue): Ditto. 
1381         (WebCore::HTMLTextFormControlElement::setMaxLength): Ditto. 
1382         (WebCore::HTMLTextFormControlElement::setMinLength): Ditto. 
1383         * html/HTMLTextFormControlElement.h: Updated for above changes. 
1384         Also renamed the setMin/MaxLength function overloads for internal use 
1385         to internSetMin/MaxLength and made them protected. 
1386  
1387         * html/HTMLTrackElement.cpp: 
1388         (WebCore::HTMLTrackElement::~HTMLTrackElement): Call clearElement on the 
1389         track to break the connection. Before this was done as a side effect of 
1390         clearClient, but that is called in other cases where we do not want to 
1391         clear the link back to the track element. 
1392         (WebCore::HTMLTrackElement::insertedInto): Removed code that uses the 
1393         track function for its side effect of creating a track; no longer needed. 
1394         Rewrote this so it's more symmetric with removedFrom. 
1395         (WebCore::HTMLTrackElement::removedFrom): Pass reference. Also reordered 
1396         and removed an unnecessary check for null parent. 
1397         (WebCore::HTMLTrackElement::parseAttribute): Use track. 
1398         (WebCore::HTMLTrackElement::kind): Ditto. 
1399         (WebCore::HTMLTrackElement::track): Renamed ensureTrack to this. Also 
1400         removed the redundant code to call setTrackElement; we no longer change 
1401         the track element on a track until the track element is destroyed. 
1402         (WebCore::HTMLTrackElement::scheduleLoad): Use track. 
1403         (WebCore::HTMLTrackElement::loadTimerFired): Ditto. 
1404         (WebCore::HTMLTrackElement::setReadyState): Ditto. 
1405         (WebCore::HTMLTrackElement::readyState): Ditto. 
1406         (WebCore::HTMLTrackElement::mediaElement): Rearranged to use early return. 
1407         * html/HTMLTrackElement.h: Updated for above changes. 
1408  
1409         * html/HTMLVideoElement.cpp: 
1410         (WebCore::HTMLVideoElement::webkitEnterFullscreen): Use ExceptionOr. 
1411         * html/HTMLVideoElement.h: Removed the functions used just for 
1412         capitalization reasons; that's now handled in the bindings. 
1413         * html/HTMLVideoElement.idl: Use non-legacy bindings and ImplementedAs. 
1414  
1415         * html/ImageData.cpp: 
1416         (WebCore::ImageData::create): Return ExceptionOr. 
1417         * html/ImageData.h: Updated for above changes. 
1418         * html/ImageData.idl: Use non-legacy exceptions. 
1419  
1420         * html/InputType.cpp: 
1421         (WebCore::InputType::setValueAsDate): Use ExceptionOr. 
1422         (WebCore::InputType::setValueAsDouble): Ditto. 
1423         (WebCore::InputType::setValueAsDecimal): Ditto. 
1424         (WebCore::InputType::applyStep): Ditto. 
1425         (WebCore::InputType::stepUp): Ditto. 
1426         (WebCore::InputType::stepUpFromRenderer): Removed IGNORE_EXCEPTION. 
1427         * html/InputType.h: Updated for the above. 
1428  
1429         * html/MediaController.cpp: 
1430         (MediaController::addMediaElement): Take a reference instead of a pointer. 
1431         (MediaController::removeMediaElement): Ditto. 
1432         (MediaController::containsMediaElement): Ditto. 
1433         (MediaController::setVolume): Use ExceptionOr. 
1434         (MediaController::bringElementUpToSpeed): Take a reference. 
1435         * html/MediaController.h: Updated for above changes. Also made lots of 
1436         function overrides private. 
1437         * html/MediaController.idl: Use non-legacy exception. 
1438  
1439         * html/MediaControllerInterface.h: Use ExceptionOr for setVolume. 
1440  
1441         * html/NumberInputType.cpp: 
1442         (WebCore::RealNumberRenderSize::max): Use aggregate initialization instead 
1443         of a constructor. 
1444         (WebCore::calculateRenderSize): Ditto. 
1445         (WebCore::NumberInputType::setValueAsDouble): Use ExceptionOr. 
1446         (WebCore::NumberInputType::setValueAsDecimal): Ditto. 
1447         * html/NumberInputType.h: Updated for above changes. 
1448  
1449         * html/RangeInputType.cpp: 
1450         (WebCore::RangeInputType::RangeInputType): Initialize scalar data member 
1451         in class definition instead of here. 
1452         (WebCore::RangeInputType::setValueAsDecimal): Use ExceptionOr. 
1453         (WebCore::RangeInputType::handleKeydownEvent): Removed IGNORE_EXCEPTION. 
1454         * html/RangeInputType.h: Updated for above changes. 
1455  
1456         * html/TextFieldInputType.cpp: 
1457         (WebCore::TextFieldInputType::updatePlaceholderText): Removed 
1458         ASSERT_NO_EXCEPTION. 
1459  
1460         * html/TimeRanges.cpp: 
1461         (WebCore::TimeRanges::start): Use ExceptionOr. 
1462         (WebCore::TimeRanges::end): Ditto. 
1463         * html/TimeRanges.h: Updated for the above. 
1464         * html/TimeRanges.idl: Use non-legacy exceptions. 
1465  
1466         * html/URLUtils.idl: Use non-legacy exception. 
1467  
1468         * html/ValidationMessage.cpp: 
1469         (WebCore::ValidationMessage::setMessageDOMAndStartTimer): Removed 
1470         ASSERT_NO_EXCEPTION, IGNORE_EXCEPTION, and other exception-ignoring idioms. 
1471         * html/parser/HTMLTreeBuilder.cpp: 
1472         (WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto. 
1473         * html/shadow/MediaControlElementTypes.cpp: 
1474         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Ditto. 
1475         * html/shadow/MediaControlElements.cpp: 
1476         (WebCore::MediaControlPanelElement::setPosition): Ditto. 
1477         (WebCore::MediaControlPanelElement::resetPosition): Ditto. 
1478         (WebCore::MediaControlStatusDisplayElement::update): Ditto. 
1479         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Ditto. 
1480         (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): Ditto. 
1481         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): Ditto. 
1482         * html/shadow/MediaControls.cpp: 
1483         (WebCore::MediaControls::updateCurrentTimeDisplay): Ditto. 
1484         * html/shadow/MediaControlsApple.cpp: 
1485         (WebCore::MediaControlsApple::updateCurrentTimeDisplay): Ditto. 
1486  
1487         * html/track/LoadableTextTrack.cpp: 
1488         (WebCore::LoadableTextTrack::LoadableTextTrack): Take reference. 
1489         (WebCore::LoadableTextTrack::~LoadableTextTrack): Deleted. 
1490         (WebCore::LoadableTextTrack::clearClient): Deleted override. We no longer 
1491         want to clear m_trackElement when clearing the client. 
1492         (WebCore::LoadableTextTrack::setTrackElement): Deleted. 
1493         (WebCore::LoadableTextTrack::id): Changed to use 
1494         attributeWithoutSynchronization for better performance and idAttr instead 
1495         of a string constant. 
1496         * html/track/LoadableTextTrack.h: Updated for above changes. Added a new 
1497         clearElement function. Made the element and isDefault functions private. 
1498  
1499         * html/track/VTTCue.cpp: 
1500         (WebCore::VTTCue::~VTTCue): Removed ASSERT_NO_EXCEPTION, IGNORE_EXCEPTION, 
1501         and other exception-ignoring idioms. 
1502         (WebCore::VTTCue::removeDisplayTree): Ditto. 
1503         * html/track/VTTRegion.cpp: 
1504         (WebCore::VTTRegion::displayLastTextTrackCueBox): Ditto. 
1505         (WebCore::VTTRegion::willRemoveTextTrackCueBox): Ditto. 
1506  
1507         * inspector/InspectorDOMAgent.cpp: 
1508         (WebCore::InspectorDOMAgent::pushNodeByBackendIdToFrontend): 
1509         Rewrote to avoid multiplehash table lookups and added a FIXME about 
1510         the peculiar code here. 
1511         (WebCore::InspectorDOMAgent::resolveNode): Streamlined. 
1512         (WebCore::InspectorDOMAgent::nodeAsScriptValue): Use the new 
1513         checkSecurityForNode instead of the old shouldAllowAccessToNode. 
1514  
1515         * platform/graphics/ImageBuffer.h: Take Optional<double> instead of 
1516         const double* in toDataURL. Renamed ImageDataToDataURL to just dataURL. 
1517  
1518         * platform/graphics/MediaPlayer.cpp: 
1519         (WebCore::MediaPlayer::addAudioTrack): Take a reference instead of PassRefPtr. 
1520         (WebCore::MediaPlayer::removeAudioTrack): Ditto. 
1521         (WebCore::MediaPlayer::addTextTrack): Ditto. 
1522         (WebCore::MediaPlayer::removeTextTrack): Ditto. 
1523         (WebCore::MediaPlayer::addVideoTrack): Ditto. 
1524         (WebCore::MediaPlayer::removeVideoTrack): Ditto. 
1525         * platform/graphics/MediaPlayer.h: Updated for the above. 
1526  
1527         * platform/graphics/PlatformTimeRanges.h: Exported a couple of functions 
1528         that are now used in WebKit. 
1529  
1530         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: 
1531         (WebCore::MediaPlayerPrivateAVFoundation::clearTextTracks): Use a modern for loop. 
1532         (WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks): 
1533         Fixed a bug that would cause this function to fail to process half the tracks. 
1534         Also updated for the change from PassRefPtr to references. 
1535  
1536         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 
1537         (WebCore::determineChangedTracksFromNewTracksAndOldItems): Pass references. 
1538         (WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider): Ditto. 
1539         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): Ditto. 
1540         (WebCore::assetMetadataKeyNames): Tweaked formatting. 
1541         (WebCore::itemKVOProperties): Ditto. 
1542         (WebCore::playerKVOProperties): Ditto. 
1543  
1544         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: 
1545         (WebCore::updateTracksOfType): Pass references. 
1546  
1547         * platform/graphics/cairo/ImageBufferCairo.cpp: 
1548         (WebCore::ImageBuffer::toDataURL): Use Optional<double> 
1549  
1550         * platform/graphics/cg/ImageBufferCG.cpp: 
1551         (WebCore::createBitmapImageAfterScalingIfNeeded): Use auto. 
1552         (WebCore::encodeImage): Ditto. Also renamed from CGImageEncodeToData. 
1553         (WebCore::dataURL): Ditto. Also renamed from CGImageToDataURL and from 
1554         ImageDataToDataURL. 
1555         (WebCore::ImageBuffer::toDataURL): Ditto. 
1556  
1557         * platform/graphics/efl/ImageBufferEfl.cpp: 
1558         (WebCore::encodeImageJPEG): Use Optional<double> 
1559         (WebCore::ImageBuffer::toDataURL): Ditto. 
1560  
1561         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 
1562         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): Pass 
1563         a reference instead of pointer. 
1564         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Ditto. 
1565         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Ditto. 
1566         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection): Ditto. 
1567         (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Ditto. 
1568  
1569         * platform/graphics/gtk/ImageBufferGtk.cpp: 
1570         (WebCore::encodeImage): Use Optional<double> 
1571         (WebCore::ImageBuffer::toDataURL): Ditto. 
1572  
1573 2016-10-28  Dave Hyatt  <hyatt@apple.com> 
1574  
1575         [CSS Parser] Allow @font-face src descriptor's format function to contain identifiers 
1576         https://bugs.webkit.org/show_bug.cgi?id=164169 
1577  
1578         Reviewed by Simon Fraser. 
1579  
1580         * css/parser/CSSPropertyParser.cpp: 
1581         (WebCore::consumeFontFaceSrcURI): 
1582  
1583 2016-10-28  Jer Noble  <jer.noble@apple.com> 
1584  
1585         WebAudio does not resume when moving from background to foreground tab. 
1586         https://bugs.webkit.org/show_bug.cgi?id=164043 
1587  
1588         Reviewed by Darin Adler. 
1589  
1590         Test: webaudio/page-canstartmedia.html 
1591  
1592         * Modules/webaudio/AudioContext.cpp: 
1593         (WebCore::AudioContext::mediaCanStart): 
1594  
1595 2016-10-28  Wenson Hsieh  <wenson_hsieh@apple.com> 
1596  
1597         iOS autocorrection does not trigger an input event of inputType "insertReplacementText" 
1598         https://bugs.webkit.org/show_bug.cgi?id=164077 
1599         <rdar://problem/28987810> 
1600  
1601         Reviewed by Simon Fraser. 
1602  
1603         Fixes candidate insertion on iOS, so that it fires input events of type "insertReplacementText" and adds two 
1604         iOS unit tests covering this change as well as the test infrastructure needed to support these tests. See 
1605         comments below for more details. 
1606  
1607         Tests: fast/events/ios/before-input-events-prevent-candidate-insertion.html 
1608                fast/events/ios/input-events-insert-replacement-text.html 
1609  
1610         * dom/TextEvent.h: 
1611  
1612         Adds isAutocompletion() to TextEvent, as well as the TextEventInputAutocompletion text input type. When the 
1613         Editor handles this TextEvent, it will use this information when creating or modifying the corresponding typing 
1614         command. 
1615  
1616         * dom/TextEventInputType.h: 
1617         * editing/Editor.cpp: 
1618         (WebCore::Editor::insertText): 
1619         (WebCore::Editor::insertTextWithoutSendingTextEvent): 
1620         * editing/Editor.h: 
1621         * editing/TypingCommand.cpp: 
1622         (WebCore::editActionForTypingCommand): 
1623  
1624         Now takes whether the command is autocorrection into account. If so, the corresponding edit action should be 
1625         EditActionInsertReplacement rather than EditActionTypingInsertText. 
1626  
1627         (WebCore::TypingCommand::TypingCommand): 
1628         (WebCore::TypingCommand::deleteSelection): 
1629         (WebCore::TypingCommand::deleteKeyPressed): 
1630         (WebCore::TypingCommand::forwardDeleteKeyPressed): 
1631         (WebCore::TypingCommand::insertText): 
1632         (WebCore::TypingCommand::insertLineBreak): 
1633         (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent): 
1634         (WebCore::TypingCommand::insertParagraphSeparator): 
1635         (WebCore::TypingCommand::inputEventData): 
1636         (WebCore::TypingCommand::willAddTypingToOpenCommand): 
1637         * editing/TypingCommand.h: 
1638  
1639         Adds a new TypingCommand option, IsAutocompletion. 
1640  
1641 2016-10-28  Commit Queue  <commit-queue@webkit.org> 
1642  
1643         Unreviewed, rolling out r207700. 
1644         https://bugs.webkit.org/show_bug.cgi?id=164168 
1645  
1646         We are ready after r208086 (Requested by alexchristensen on 
1647         #webkit). 
1648  
1649         Reverted changeset: 
1650  
1651         "Unreviewed, rolling out r207582." 
1652         https://bugs.webkit.org/show_bug.cgi?id=163819 
1653         http://trac.webkit.org/changeset/207700 
1654  
1655 2016-10-28  Dave Hyatt  <hyatt@apple.com> 
1656  
1657         [CSS Parser] Allow unknown properties in will-change 
1658         https://bugs.webkit.org/show_bug.cgi?id=164165 
1659  
1660         Reviewed by Simon Fraser. 
1661  
1662         * css/parser/CSSPropertyParser.cpp: 
1663         (WebCore::consumeWillChange): 
1664  
1665 2016-10-28  Alex Christensen  <achristensen@webkit.org> 
1666  
1667         Partially revert 207805 after resolution in URL spec issue 87 
1668         https://bugs.webkit.org/show_bug.cgi?id=164142 
1669  
1670         Reviewed by Andy Estes. 
1671  
1672         Covered by updated layout tests and API tests. 
1673  
1674         * platform/URLParser.cpp: 
1675         (WebCore::URLParser::isSingleDotPathSegment): 
1676         (WebCore::URLParser::isDoubleDotPathSegment): 
1677         (WebCore::URLParser::consumeSingleDotPathSegment): 
1678         (WebCore::URLParser::consumeDoubleDotPathSegment): 
1679         Treat %2e%2e as .. and %2e as . but only if it is entirety of the path segment. 
1680         There are tests for URLs like http://host/abc%2edef which have not changed because 
1681         the %2e is not the entirety of the path segment. 
1682  
1683 2016-10-28  Alex Christensen  <achristensen@webkit.org> 
1684  
1685         URLParser should not try to interpret host of URLs with unrecognized schemes as IPv4 address 
1686         https://bugs.webkit.org/show_bug.cgi?id=164154 
1687  
1688         Reviewed by Andy Estes. 
1689  
1690         This is needed to match behavior of all browsers. 
1691         This is being discussed in the spec at https://github.com/whatwg/url/issues/148 
1692  
1693         Covered by new API tests. 
1694  
1695         * platform/URLParser.cpp: 
1696         (WebCore::URLParser::parseHostAndPort): 
1697         Only try to parse and canonicalize the host as an IPv4 address if the scheme is special (http, wss, etc.) 
1698  
1699 2016-10-28  Chris Dumez  <cdumez@apple.com> 
1700  
1701         DOMStringMap reports properties as non-enumerable 
1702         https://bugs.webkit.org/show_bug.cgi?id=164114 
1703  
1704         Reviewed by Sam Weinig. 
1705  
1706         DOMStringMap's named properties should be configurable, enumerable 
1707         and writable as per: 
1708         - https://heycam.github.io/webidl/#getownproperty-guts (2.7-9) 
1709         - https://html.spec.whatwg.org/multipage/dom.html#domstringmap 
1710  
1711         Firefox and Chrome agree with the specification. However, WebKit 
1712         was doing the complete opposite. 
1713  
1714         No new tests, updated existing test. 
1715  
1716         * bindings/js/JSDOMStringMapCustom.cpp: 
1717         (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate): 
1718  
1719 2016-10-28  Ryosuke Niwa  <rniwa@webkit.org> 
1720  
1721         Add CEReactions to the remaining HTML DOM APIs 
1722         https://bugs.webkit.org/show_bug.cgi?id=163969 
1723  
1724         Reviewed by Chris Dumez. 
1725  
1726         Added CEReactions to the remaining DOM and HTML APIs as needed. 
1727  
1728         Tests: fast/custom-elements/reactions-for-indieui.html 
1729                fast/custom-elements/reactions/Document.html 
1730                fast/custom-elements/reactions/HTMLAnchorElement.html 
1731                fast/custom-elements/reactions/HTMLOptionElement.html 
1732                fast/custom-elements/reactions/HTMLOptionsCollection.html 
1733                fast/custom-elements/reactions/HTMLOutputElement.html 
1734                fast/custom-elements/reactions/HTMLSelectElement.html 
1735                fast/custom-elements/reactions/HTMLTableElement.html 
1736                fast/custom-elements/reactions/HTMLTableRowElement.html 
1737                fast/custom-elements/reactions/HTMLTableSectionElement.html 
1738                fast/custom-elements/reactions/HTMLTitleElement.html 
1739                fast/custom-elements/reactions/ShadowRoot.html 
1740  
1741         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: 
1742         (WebCore::JSHTMLOptionsCollection::setLength): 
1743         (WebCore::JSHTMLOptionsCollection::indexSetter): 
1744         * bindings/js/JSHTMLSelectElementCustom.cpp: 
1745         (WebCore::JSHTMLSelectElement::indexSetter): 
1746         * dom/CharacterData.idl: 
1747         * dom/Document.idl: 
1748         * dom/Element.idl: 
1749         * dom/ShadowRoot.idl: 
1750         * html/HTMLAnchorElement.idl: 
1751         * html/HTMLDocument.idl: 
1752         * html/HTMLOptionElement.idl: 
1753         * html/HTMLOptionsCollection.idl: 
1754         * html/HTMLOutputElement.idl: 
1755         * html/HTMLSelectElement.idl: 
1756         * html/HTMLTableElement.idl: 
1757         * html/HTMLTableRowElement.idl: 
1758         * html/HTMLTableSectionElement.idl: 
1759         * html/HTMLTitleElement.idl: 
1760  
1761 2016-10-28  Antoine Quint  <graouts@apple.com> 
1762  
1763         [Modern Media Controls] Media Controller: volume control support 
1764         https://bugs.webkit.org/show_bug.cgi?id=163727 
1765  
1766         Reviewed by Dean Jackson. 
1767  
1768         We introduce the VolumeSupport class which brings support for modifying the media 
1769         volume by interacting with the mute volume slider in the media controls and correctly 
1770         reflecting the media's volume should it be changed via the media API. 
1771  
1772         Tests: media/modern-media-controls/volume-support/volume-support-click.html 
1773                media/modern-media-controls/volume-support/volume-support-drag.html 
1774                media/modern-media-controls/volume-support/volume-support-media-api-mute.html 
1775                media/modern-media-controls/volume-support/volume-support-media-api.html 
1776  
1777         * Modules/modern-media-controls/js-files: 
1778         * Modules/modern-media-controls/media/media-controller.js: 
1779         (MediaController): 
1780         * Modules/modern-media-controls/media/volume-support.js: Added. 
1781         (VolumeSupport.prototype.get control): 
1782         (VolumeSupport.prototype.get mediaEvents): 
1783         (VolumeSupport.prototype.controlValueWillStartChanging): 
1784         (VolumeSupport.prototype.controlValueDidChange): 
1785         (VolumeSupport.prototype.syncControl): 
1786         (VolumeSupport): 
1787         * WebCore.xcodeproj/project.pbxproj: 
1788  
1789 2016-10-28  Yusuke Suzuki  <utatane.tea@gmail.com> 
1790  
1791         [DOMJIT] Rename CallDOM to CallDOMGetter 
1792         https://bugs.webkit.org/show_bug.cgi?id=164157 
1793  
1794         Reviewed by Keith Miller. 
1795  
1796         No behavior change. 
1797  
1798         * bindings/scripts/CodeGeneratorJS.pm: 
1799         (GenerateHeader): 
1800         * bindings/scripts/test/JS/JSTestDOMJIT.h: 
1801         * domjit/JSDocumentDOMJIT.cpp: 
1802         (WebCore::DocumentDocumentElementDOMJIT::callDOMGetter): 
1803         (WebCore::DocumentDocumentElementDOMJIT::callDOM): Deleted. 
1804         * domjit/JSNodeDOMJIT.cpp: 
1805         (WebCore::createCallDOMGetterForOffsetAccess): 
1806         (WebCore::NodeFirstChildDOMJIT::callDOMGetter): 
1807         (WebCore::NodeLastChildDOMJIT::callDOMGetter): 
1808         (WebCore::NodeNextSiblingDOMJIT::callDOMGetter): 
1809         (WebCore::NodePreviousSiblingDOMJIT::callDOMGetter): 
1810         (WebCore::NodeParentNodeDOMJIT::callDOMGetter): 
1811         (WebCore::NodeNodeTypeDOMJIT::callDOMGetter): 
1812         (WebCore::NodeOwnerDocumentDOMJIT::callDOMGetter): 
1813         (WebCore::createCallDOMForOffsetAccess): Deleted. 
1814         (WebCore::NodeFirstChildDOMJIT::callDOM): Deleted. 
1815         (WebCore::NodeLastChildDOMJIT::callDOM): Deleted. 
1816         (WebCore::NodeNextSiblingDOMJIT::callDOM): Deleted. 
1817         (WebCore::NodePreviousSiblingDOMJIT::callDOM): Deleted. 
1818         (WebCore::NodeParentNodeDOMJIT::callDOM): Deleted. 
1819         (WebCore::NodeNodeTypeDOMJIT::callDOM): Deleted. 
1820         (WebCore::NodeOwnerDocumentDOMJIT::callDOM): Deleted. 
1821  
1822 2016-10-28  Dave Hyatt  <hyatt@apple.com> 
1823  
1824         [CSS Parser] Fix font-family parsing inside @font-face 
1825         https://bugs.webkit.org/show_bug.cgi?id=164155 
1826  
1827         Reviewed by Simon Fraser. 
1828  
1829         * css/parser/CSSPropertyParser.cpp: 
1830         (WebCore::CSSPropertyParser::parseFontFaceDescriptor): 
1831         Use the full font-family parsing that returns a CSSValueList, 
1832         since we can handle multiple families. 
1833  
1834 2016-10-28  Per Arne Vollan  <pvollan@apple.com> 
1835  
1836         [Win][Direct2D] Implement ImageBufferData::putData. 
1837         https://bugs.webkit.org/show_bug.cgi?id=164151 
1838  
1839         Reviewed by Brent Fulgham. 
1840  
1841         * platform/graphics/win/ImageBufferDataDirect2D.cpp: 
1842         (WebCore::ImageBufferData::getData): 
1843         (WebCore::ImageBufferData::putData): 
1844  
1845 2016-10-28  Dave Hyatt  <hyatt@apple.com> 
1846  
1847         [CSS Parser] Support hanging-punctuation 
1848         https://bugs.webkit.org/show_bug.cgi?id=164153 
1849  
1850         Reviewed by Simon Fraser. 
1851  
1852         * css/parser/CSSPropertyParser.cpp: 
1853         (WebCore::consumeHangingPunctuation): 
1854         (WebCore::CSSPropertyParser::parseSingleValue): 
1855
1856 2016-10-28  Yusuke Suzuki  <utatane.tea@gmail.com>
1857
1858         [DOMJIT] Implement Document::documentElement
1859         https://bugs.webkit.org/show_bug.cgi?id=164113
1860
1861         Reviewed by Sam Weinig.
1862
1863         Test: js/dom/domjit-accessor-document-element.html
1864
1865         This patch implements document.documentElement DOMJIT accessor.
1866         Similar to ownerDocument accessor, the way to access to document.documentElement
1867         from JIT code is already prepared for CSSJIT. DOMJIT just utilizes the existing
1868         functionality: using documentElementMemoryOffset().
1869
1870         document.documentElement is frequently called in jQuery. Especially, every time
1871         we call jQuery.attr(), this is called.
1872
1873         To implement Document accessor, we clean up some code in DOMJITHelpers.
1874         We create the cpp file for DOMJITHelpers and move some helpers to it.
1875         And we also implement DOMJIT::checkDOM<DOMInterface> for convenience.
1876         It returns appropriate CheckDOM patchpoint implementation.
1877
1878         This patch improves Dromaeo jslib-attr-jquery.html 10% (481.64 v.s. 532.54).
1879
1880         * CMakeLists.txt:
1881         * WebCore.xcodeproj/project.pbxproj:
1882         * cssjit/SelectorCompiler.cpp:
1883         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsScopeRoot):
1884         * dom/Document.idl:
1885         * domjit/DOMJITAbstractHeapRepository.h:
1886         * domjit/DOMJITCheckDOM.h: Copied from Source/WebCore/domjit/DOMJITAbstractHeapRepository.h.
1887         (WebCore::DOMJIT::TypeChecker<Node>::branchIfFail):
1888         (WebCore::DOMJIT::TypeChecker<Document>::branchIfFail):
1889         (WebCore::DOMJIT::TypeChecker<Event>::branchIfFail):
1890         (WebCore::DOMJIT::TypeChecker<Element>::branchIfFail):
1891         (WebCore::DOMJIT::checkDOM):
1892         * domjit/DOMJITHelpers.cpp: Copied from Source/WebCore/domjit/DOMJITAbstractHeapRepository.h.
1893         (WebCore::DOMJIT::loadDocument):
1894         (WebCore::DOMJIT::loadDocumentElement):
1895         * domjit/DOMJITHelpers.h:
1896         (WebCore::DOMJIT::toWrapperSlow):
1897         (WebCore::DOMJIT::loadDocument): Deleted.
1898         * domjit/JSDocumentDOMJIT.cpp: Added.
1899         (WebCore::DocumentDocumentElementDOMJIT::checkDOM):
1900         (WebCore::DocumentDocumentElementDOMJIT::callDOM):
1901         * domjit/JSNodeDOMJIT.cpp:
1902         (WebCore::createCallDOMForOffsetAccess):
1903         (WebCore::NodeFirstChildDOMJIT::checkDOM):
1904         (WebCore::NodeLastChildDOMJIT::checkDOM):
1905         (WebCore::NodeNextSiblingDOMJIT::checkDOM):
1906         (WebCore::NodePreviousSiblingDOMJIT::checkDOM):
1907         (WebCore::NodeParentNodeDOMJIT::checkDOM):
1908         (WebCore::NodeNodeTypeDOMJIT::checkDOM):
1909         (WebCore::NodeOwnerDocumentDOMJIT::checkDOM):
1910         (WebCore::NodeOwnerDocumentDOMJIT::callDOM):
1911         (WebCore::toWrapperSlow): Deleted.
1912         (WebCore::checkNode): Deleted.
1913
1914 2016-10-28  Dave Hyatt  <hyatt@apple.com>
1915
1916         [CSS Parser] Support initial-letter
1917         https://bugs.webkit.org/show_bug.cgi?id=164150
1918
1919         Reviewed by Simon Fraser.
1920
1921         * css/parser/CSSPropertyParser.cpp:
1922         (WebCore::consumeInitialLetter):
1923         (WebCore::CSSPropertyParser::parseSingleValue):
1924
1925 2016-10-28  Simon Fraser  <simon.fraser@apple.com>
1926
1927         Remove some unused code in RenderLayerCompositor::computeExtent()
1928         https://bugs.webkit.org/show_bug.cgi?id=163934
1929
1930         Reviewed by Zalan Bujtas.
1931
1932         viewportRect was never used.
1933
1934         * rendering/RenderLayerCompositor.cpp:
1935         (WebCore::RenderLayerCompositor::computeExtent):
1936
1937 2016-10-28  Sam Weinig  <sam@webkit.org>
1938
1939         [WebIDL] Update parser and code generators to only access type information through the type property
1940         https://bugs.webkit.org/show_bug.cgi?id=164141
1941
1942         Reviewed by Anders Carlsson.
1943
1944         Update IDLParser structs:
1945         - domSignature: Rename idlType to type. Specify that type is a domType.
1946         - domInterface: Remove name and parent. Specify that type and parentType are a domTypes.
1947         - domFunction: Specify that signature is a domSignature.
1948         - domAttribute: Remove unused type. Specify that signature is a domSignature.
1949         - domIterable: Remove idlKeyType and valueKeyType. Specify that keyType and valueType are a domTypes
1950         - domConstant: Specify that type is a domType.
1951         - domEnum: Specify that type is a domType.
1952         - domDictionary: Remove name and parent. Specify that type and parentType are a domTypes.
1953         - Typedef: Rename idlType to type and specify that it is a domType.
1954
1955         * bindings/scripts/IDLParser.pm:
1956         Remove redundant properties and specify type info in structs where possible.
1957
1958         * bindings/scripts/CodeGenerator.pm:
1959         (IsSVGTypeNeedingTearOffForType): Renamed to remove ForType suffix.
1960         (IsSVGTypeWithWritablePropertiesNeedingTearOffForType): Renamed to remove ForType suffix.
1961         (GetSVGTypeNeedingTearOffForType): Renamed to remove ForType suffix.
1962         (GetSVGWrappedTypeNeedingTearOffForType): Renamed to remove ForType suffix.
1963
1964         Update to always access type information through type accessors. Remove use of removed
1965         properties.
1966
1967         * bindings/scripts/CodeGeneratorJS.pm:
1968         (IsNullableType): Deleted.
1969         (StripNullable): Deleted.
1970         Remove unused functions.
1971
1972         Update to always access type information through type accessors. Remove use of removed
1973         properties.
1974
1975         * bindings/scripts/generate-bindings.pl:
1976         Update to always access type information through type accessors. Remove use of removed
1977         properties.
1978
1979 2016-10-28  Dave Hyatt  <hyatt@apple.com>
1980
1981         [CSS Parser] Support bopomofo Ruby
1982         https://bugs.webkit.org/show_bug.cgi?id=164148
1983
1984         Reviewed by Simon Fraser.
1985
1986         * css/parser/CSSParserFastPaths.cpp:
1987         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
1988
1989 2016-10-28  Dave Hyatt  <hyatt@apple.com>
1990
1991         [CSS Parser] Add support for -webkit-canvas images
1992         https://bugs.webkit.org/show_bug.cgi?id=164144
1993
1994         Reviewed by Simon Fraser.
1995
1996         * css/CSSValueKeywords.in:
1997         * css/parser/CSSParser.cpp:
1998         (WebCore::CSSParserContext::CSSParserContext):
1999         * css/parser/CSSPropertyParserHelpers.cpp:
2000         (WebCore::CSSPropertyParserHelpers::consumeWebkitCanvas):
2001         (WebCore::CSSPropertyParserHelpers::consumeGeneratedImage):
2002         (WebCore::CSSPropertyParserHelpers::isGeneratedImage):
2003
2004 2016-10-27  Geoffrey Garen  <ggaren@apple.com>
2005
2006         One file per class for Executable.h/.cpp
2007         https://bugs.webkit.org/show_bug.cgi?id=164099
2008
2009         Reviewed by Saam Barati.
2010
2011         * ForwardingHeaders/runtime/Executable.h: Removed.
2012         * ForwardingHeaders/runtime/FunctionExecutable.h: Copied from Source/WebCore/ForwardingHeaders/runtime/Executable.h.
2013         * bindings/js/JSLazyEventListener.cpp:
2014         * bindings/js/JSMainThreadExecStateInstrumentation.h:
2015
2016 2016-10-28  Dave Hyatt  <hyatt@apple.com>
2017
2018         [CSS Parser] Clean up gradient parsing
2019         https://bugs.webkit.org/show_bug.cgi?id=164139
2020
2021         Reviewed by Dean Jackson.
2022
2023         * css/CSSGradientValue.cpp:
2024         (WebCore::positionFromValue):
2025         (WebCore::CSSGradientValue::computeEndPoint):
2026         * css/parser/CSSPropertyParserHelpers.cpp:
2027         (WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradient):
2028         (WebCore::CSSPropertyParserHelpers::consumeGradientColorStops):
2029         (WebCore::CSSPropertyParserHelpers::consumeDeprecatedRadialGradient):
2030         (WebCore::CSSPropertyParserHelpers::consumeRadialGradient):
2031         (WebCore::CSSPropertyParserHelpers::consumeLinearGradient):
2032
2033 2016-10-28  Dean Jackson  <dino@apple.com>
2034
2035         New CSS Parser should use Colors not RGBA32s
2036         https://bugs.webkit.org/show_bug.cgi?id=164124
2037         <rdar://problem/29000373>
2038
2039         Reviewed by Darin Adler.
2040
2041         The old parser has moved from using RGBA32 values to using
2042         Colors directly. This was so we could support ExtendedColors
2043         via the new color() syntax.
2044
2045         Update the new CSS parser to do the same.
2046
2047         * css/parser/CSSPropertyParserHelpers.cpp:
2048         (WebCore::CSSPropertyParserHelpers::parseRGBParameters):
2049         (WebCore::CSSPropertyParserHelpers::parseHSLParameters):
2050         (WebCore::CSSPropertyParserHelpers::parseHexColor):
2051         (WebCore::CSSPropertyParserHelpers::parseColorFunction):
2052         (WebCore::CSSPropertyParserHelpers::consumeColor):
2053
2054 2016-10-28  Dean Jackson  <dino@apple.com>
2055
2056         Allow new CSS parser to handle insertRule, etc via parseRule
2057         https://bugs.webkit.org/show_bug.cgi?id=164122
2058         <rdar://problem/29000101>
2059
2060         Reviewed by Darin Adler.
2061
2062         Call the new CSS parser from CSSParser::parseRule if enabled. This
2063         allows style added via the CSSOM insertRule to go through
2064         the parser.
2065
2066         I tested this across our layout tests that use insertRule. It
2067         works fine, but does cause some filter tests to fail. This is
2068         because the new parser does not generate WebKitCSSFilterValues,
2069         but I think the CSSFunctionValue is good enough. I'll remove
2070         WebKitCSSFilterValue separately.
2071
2072         * css/parser/CSSParser.cpp:
2073         (WebCore::CSSParser::parseRule): Call CSSParserImpl::parseRule.
2074
2075 2016-10-28  Simon Fraser  <simon.fraser@apple.com>
2076
2077         Wrong blur radius for filter: drop-shadow()
2078         https://bugs.webkit.org/show_bug.cgi?id=163667
2079
2080         Reviewed by Darin Adler.
2081         
2082         The "stdDev" parameter to <feDropShadow> and <feGaussianBlur> represents the standard
2083         deviation (σ) of the Gaussian blur function. CSS filters drop-shadow() and blur() follow
2084         this with their radius parameter.
2085         
2086         However, CSS box-shadow and text-shadow use 2σ to describe the blur radius, since this
2087         is conveniently close to the number of pixels the effect of the blur extends out.
2088         
2089         feDropShadow, which is used by non-accelerated filter: drop-shadow(), was using
2090         the wrong blur radius because it passed its stdDev directly to ShadowBlur. ShadowBlur
2091         was written for CSS box-shadow, so expected its input "blur radius" to be twice the
2092         stdDev.
2093         
2094         Tests: css3/filters/drop-shadow-blur-radius.html
2095                svg/filters/feDropShadow-blur-radius.html
2096
2097         * platform/graphics/filters/FEDropShadow.cpp:
2098         (WebCore::FEDropShadow::platformApplySoftware):
2099
2100 2016-10-28  Youenn Fablet  <youenn@apple.com>
2101
2102         Expose RTCPeerConnection unprefixed
2103         https://bugs.webkit.org/show_bug.cgi?id=164060
2104
2105         Reviewed by Darin Adler.
2106
2107         Covered by rebased and activated tests.
2108
2109         * Modules/mediastream/RTCPeerConnection.idl:
2110
2111 2016-10-28  Dave Hyatt  <hyatt@apple.com>
2112
2113         [CSS Parser] Support the marquee properties
2114         https://bugs.webkit.org/show_bug.cgi?id=164132
2115
2116         Reviewed by Zalan Bujtas.
2117
2118         * css/parser/CSSParserFastPaths.cpp:
2119         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
2120         * css/parser/CSSPropertyParser.cpp:
2121         (WebCore::consumeWebkitMarqueeIncrement):
2122         (WebCore::consumeWebkitMarqueeRepetition):
2123         (WebCore::consumeWebkitMarqueeSpeed):
2124         (WebCore::CSSPropertyParser::parseSingleValue):
2125         (WebCore::CSSPropertyParser::parseShorthand):
2126
2127 2016-10-28  Dave Hyatt  <hyatt@apple.com>
2128
2129         [CSS Parser] Miscellaneous bug fixes
2130         https://bugs.webkit.org/show_bug.cgi?id=164131
2131
2132         Reviewed by Zalan Bujtas.
2133
2134         * css/CSSComputedStyleDeclaration.cpp:
2135         (WebCore::ComputedStyleExtractor::propertyValue):
2136         * css/CSSPropertyNames.in:
2137         The prefix was incorrectly dropped from -webkit-column-progression.
2138         Put it back.
2139
2140         * css/StyleBuilderConverter.h:
2141         (WebCore::StyleBuilderConverter::convertPositionComponent):
2142         (WebCore::StyleBuilderConverter::convertObjectPosition):
2143         Fix object-position parsing so that the position components can
2144         be ids.
2145
2146         * css/StyleBuilderCustom.h:
2147         (WebCore::StyleBuilderCustom::applyValueContent):
2148         The new parser doesn't make a list for content:none, since none can't be
2149         a component of a list anyway. Add code to handle this case in the
2150         apply function.
2151
2152         * css/parser/CSSParser.cpp:
2153         (WebCore::isValidKeywordPropertyAndValue):
2154         Put the prefix back on -webkit-column-progression.
2155
2156         * css/parser/CSSParserFastPaths.cpp:
2157         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
2158         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
2159         Same.
2160
2161         * css/parser/CSSParserImpl.cpp:
2162         (WebCore::CSSParserImpl::parsePageSelector):
2163         Make sure match type is checked, since our code asserts if it isn't.
2164
2165         * css/parser/CSSPropertyParser.cpp:
2166         (WebCore::validWidthOrHeightKeyword):
2167         (WebCore::consumeLineGrid):
2168         (WebCore::CSSPropertyParser::parseSingleValue):
2169         Add support for the line-grid properties and for -webkit-nbsp-mode.
2170
2171 2016-10-28  Antti Koivisto  <antti@apple.com>
2172
2173         Always use iOS preload behavior
2174         https://bugs.webkit.org/show_bug.cgi?id=164127
2175
2176         Reviewed by Andreas Kling.
2177
2178         On non-iOS platforms we were delaying issuing lower priority preload (images mostly) until document has body.
2179         This should be unnecessary as networking layer prioritization should ensure higher priority resources are
2180         loaded earlier. Testing on iOS has showed that more aggressive behavior is a win.
2181
2182         This patch switches to iOS behavior on all platforms (and simplified the logic).
2183
2184         * html/parser/HTMLResourcePreloader.cpp:
2185         (WebCore::HTMLResourcePreloader::preload):
2186         * loader/LinkLoader.cpp:
2187         (WebCore::LinkLoader::preloadIfNeeded):
2188         * loader/cache/CachedResourceLoader.cpp:
2189         (WebCore::CachedResourceLoader::performPostLoadActions):
2190         (WebCore::CachedResourceLoader::preload):
2191         (WebCore::CachedResourceLoader::isPreloaded):
2192         (WebCore::CachedResourceLoader::checkForPendingPreloads): Deleted.
2193         (WebCore::CachedResourceLoader::requestPreload): Deleted.
2194         (WebCore::CachedResourceLoader::clearPendingPreloads): Deleted.
2195         * loader/cache/CachedResourceLoader.h:
2196
2197 2016-10-28  Youenn Fablet  <youenn@apple.com>
2198
2199         [Fetch] Ensure redirection count is no more than 20 in case of cross origin requests
2200         https://bugs.webkit.org/show_bug.cgi?id=164117
2201
2202         Reviewed by Sam Weinig.
2203
2204         Tests: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin-worker.html
2205                imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin.html
2206
2207         Introducing a ResourceLoaderOptions that defines the maximum redirection count.
2208         By default, it is set to 20 as per fetch specification.
2209
2210         This option is used by SubresourceLoader to cancel load if its redirection count is above that maximum.
2211         DocumentThreadableLoader stopping redirections to make preflight if needed, it now uses the maxRedirectCount loader option to ensure
2212         that the total number of redirections is 20.
2213
2214         * loader/DocumentThreadableLoader.cpp:
2215         (WebCore::DocumentThreadableLoader::redirectReceived):
2216         * loader/ResourceLoaderOptions.h:
2217         * loader/SubresourceLoader.cpp:
2218         (WebCore::SubresourceLoader::willSendRequestInternal):
2219         * loader/SubresourceLoader.h:
2220
2221 2016-10-28  Fujii Hironori  <Hironori.Fujii@sony.com>
2222
2223         generate-bindings-all.pl should recompile supplemented IDL if its supplemental IDL are added or removed
2224         https://bugs.webkit.org/show_bug.cgi?id=164054
2225
2226         Reviewed by Michael Catanzaro.
2227
2228         generate-bindings-all.pl determines which IDL to recompile by
2229         comparing timestamps of generated files, source IDL and its
2230         dependencies.  But this is not enough. If a new supplemental IDL
2231         is added, its supplemented IDL needs to be recompiled even though
2232         the timestamp of the supplemental IDL is older than the
2233         generated files.
2234
2235         * bindings/scripts/generate-bindings-all.pl: Read supplemental
2236         dependency file both before and after invoking preprocess-idls.pl.
2237         Recompile IDL files if its supplemental dependencies are added or
2238         removed.
2239
2240 2016-10-28  Youenn Fablet  <youenn@apple.com>
2241
2242         PeerMediaDescription does not need to be refcounted
2243         https://bugs.webkit.org/show_bug.cgi?id=164059
2244
2245         Reviewed by Darin Adler.
2246
2247         No change of behavior.
2248
2249         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
2250         (WebCore::MediaEndpointPeerConnection::createOfferTask):
2251         (WebCore::MediaEndpointPeerConnection::createAnswerTask):
2252         (WebCore::createSourceMap):
2253         (WebCore::MediaEndpointPeerConnection::setLocalDescriptionTask):
2254         (WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask):
2255         (WebCore::MediaEndpointPeerConnection::addIceCandidateTask):
2256         (WebCore::MediaEndpointPeerConnection::gotIceCandidate):
2257         * Modules/mediastream/MediaEndpointPeerConnection.h:
2258         * Modules/mediastream/SDPProcessor.cpp:
2259         (WebCore::configurationFromJSON):
2260         (WebCore::configurationToJSON):
2261         (WebCore::SDPProcessor::generateCandidateLine):
2262         (WebCore::SDPProcessor::parseCandidateLine):
2263         * platform/mediastream/IceCandidate.h:
2264         * platform/mediastream/MediaEndpointSessionConfiguration.h:
2265         (WebCore::MediaEndpointSessionConfiguration::mediaDescriptions):
2266         (WebCore::MediaEndpointSessionConfiguration::addMediaDescription):
2267         (WebCore::MediaEndpointSessionConfiguration::clone):
2268         * platform/mediastream/PeerMediaDescription.h:
2269         (WebCore::PeerMediaDescription::addPayload):
2270         (WebCore::PeerMediaDescription::addSsrc):
2271         (WebCore::PeerMediaDescription::clearSsrcs):
2272         (WebCore::PeerMediaDescription::addIceCandidate):
2273         (WebCore::PeerMediaDescription::create): Deleted.
2274         (WebCore::PeerMediaDescription::~PeerMediaDescription): Deleted.
2275         (WebCore::PeerMediaDescription::type): Deleted.
2276         (WebCore::PeerMediaDescription::setType): Deleted.
2277         (WebCore::PeerMediaDescription::port): Deleted.
2278         (WebCore::PeerMediaDescription::setPort): Deleted.
2279         (WebCore::PeerMediaDescription::address): Deleted.
2280         (WebCore::PeerMediaDescription::setAddress): Deleted.
2281         (WebCore::PeerMediaDescription::mode): Deleted.
2282         (WebCore::PeerMediaDescription::setMode): Deleted.
2283         (WebCore::PeerMediaDescription::mid): Deleted.
2284         (WebCore::PeerMediaDescription::setMid): Deleted.
2285         (WebCore::PeerMediaDescription::payloads): Deleted.
2286         (WebCore::PeerMediaDescription::setPayloads): Deleted.
2287         (WebCore::PeerMediaDescription::rtcpMux): Deleted.
2288         (WebCore::PeerMediaDescription::setRtcpMux): Deleted.
2289         (WebCore::PeerMediaDescription::rtcpAddress): Deleted.
2290         (WebCore::PeerMediaDescription::setRtcpAddress): Deleted.
2291         (WebCore::PeerMediaDescription::rtcpPort): Deleted.
2292         (WebCore::PeerMediaDescription::setRtcpPort): Deleted.
2293         (WebCore::PeerMediaDescription::mediaStreamId): Deleted.
2294         (WebCore::PeerMediaDescription::setMediaStreamId): Deleted.
2295         (WebCore::PeerMediaDescription::mediaStreamTrackId): Deleted.
2296         (WebCore::PeerMediaDescription::setMediaStreamTrackId): Deleted.
2297         (WebCore::PeerMediaDescription::dtlsSetup): Deleted.
2298         (WebCore::PeerMediaDescription::setDtlsSetup): Deleted.
2299         (WebCore::PeerMediaDescription::dtlsFingerprintHashFunction): Deleted.
2300         (WebCore::PeerMediaDescription::setDtlsFingerprintHashFunction): Deleted.
2301         (WebCore::PeerMediaDescription::dtlsFingerprint): Deleted.
2302         (WebCore::PeerMediaDescription::setDtlsFingerprint): Deleted.
2303         (WebCore::PeerMediaDescription::cname): Deleted.
2304         (WebCore::PeerMediaDescription::setCname): Deleted.
2305         (WebCore::PeerMediaDescription::ssrcs): Deleted.
2306         (WebCore::PeerMediaDescription::iceUfrag): Deleted.
2307         (WebCore::PeerMediaDescription::setIceUfrag): Deleted.
2308         (WebCore::PeerMediaDescription::icePassword): Deleted.
2309         (WebCore::PeerMediaDescription::setIcePassword): Deleted.
2310         (WebCore::PeerMediaDescription::iceCandidates): Deleted.
2311         (WebCore::PeerMediaDescription::clone): Deleted.
2312         (WebCore::PeerMediaDescription::PeerMediaDescription): Deleted.
2313         * platform/mediastream/mac/MediaEndpointMac.cpp:
2314         (WebCore::MediaEndpointMac::addRemoteCandidate):
2315         (WebCore::MediaEndpointMac::OnIceCandidate):
2316         * platform/mediastream/mac/MediaEndpointMac.h:
2317         * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
2318         (WebCore::MediaEndpointOwr::updateSendConfiguration):
2319         * platform/mediastream/openwebrtc/MediaEndpointOwr.h:
2320         * platform/mock/MockMediaEndpoint.cpp:
2321         (WebCore::MockMediaEndpoint::updateConfigurationMids):
2322
2323 2016-10-28  Antoine Quint  <graouts@apple.com>
2324
2325         [Modern Media Controls] Media Controller: scrubbing support
2326         https://bugs.webkit.org/show_bug.cgi?id=163726
2327         <rdar://problem/27989481>
2328
2329         Reviewed by Dean Jackson.
2330
2331         We introduce the ScrubberSupport class which brings support for scrubbing the media
2332         by interacting with the scrubber in the media controls and correctly reflecting
2333         the media's current time as set via the media API.
2334
2335         Tests: media/modern-media-controls/scrubber-support/scrubber-support-click.html
2336                media/modern-media-controls/scrubber-support/scrubber-support-drag.html
2337                media/modern-media-controls/scrubber-support/scrubber-support-media-api.html
2338
2339         * Modules/modern-media-controls/js-files:
2340         * Modules/modern-media-controls/media/media-controller.js:
2341         (MediaController):
2342         * Modules/modern-media-controls/media/scrubbing-support.js: Added.
2343         (ScrubbingSupport.prototype.get control):
2344         (ScrubbingSupport.prototype.get mediaEvents):
2345         (ScrubbingSupport.prototype.controlValueWillStartChanging):
2346         (ScrubbingSupport.prototype.controlValueDidChange):
2347         (ScrubbingSupport.prototype.controlValueDidStopChanging):
2348         (ScrubbingSupport.prototype.syncControl):
2349         (ScrubbingSupport):
2350         * WebCore.xcodeproj/project.pbxproj:
2351
2352 2016-10-28  Alex Christensen  <achristensen@webkit.org>
2353
2354         Fix Windows WebGL build after r208022
2355         https://bugs.webkit.org/show_bug.cgi?id=164091
2356
2357         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
2358         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
2359         (WebCore::Extensions3DOpenGLES::Extensions3DOpenGLES):
2360         * platform/graphics/opengl/Extensions3DOpenGLES.h:
2361         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2362         (WebCore::GraphicsContext3D::getExtensions):
2363
2364 2016-10-27  Youenn Fablet  <youenn@apple.com>
2365
2366         [Fetch API] Fetch ReadableStream should only clone the second branch
2367         https://bugs.webkit.org/show_bug.cgi?id=164058
2368
2369         Reviewed by Darin Adler.
2370
2371         Covered by rebased tests.
2372
2373         * Modules/streams/ReadableStreamInternals.js:
2374         (readableStreamTeePullFunction):
2375
2376 2016-10-27  Alex Christensen  <achristensen@webkit.org>
2377
2378         Update ANGLE
2379         https://bugs.webkit.org/show_bug.cgi?id=164101
2380
2381         Reviewed by Darin Adler.
2382
2383         ShCheckVariablesWithinPackingLimits has changed signatures from taking a ShVariableInfo* and length
2384         to taking a std::vector<sh::ShaderVariable> which requires more information about the shader variables
2385         than we kept in GraphicsContext3D::SymbolInfo.  I removed the SymbolInfo class because it was redundant
2386         with ANGLE's sh::ShaderVariable and now unused.
2387
2388         Covered by existing WebGL tests.
2389
2390         * CMakeLists.txt:
2391         * PlatformMac.cmake:
2392         * PlatformWin.cmake:
2393         * platform/graphics/ANGLEWebKitBridge.cpp:
2394         (WebCore::appendSymbol):
2395         (WebCore::getStructInfo):
2396         (WebCore::getSymbolInfo):
2397         (WebCore::ANGLEWebKitBridge::compileShaderSource):
2398         * platform/graphics/ANGLEWebKitBridge.h:
2399         (WebCore::ANGLEShaderSymbol::isSampler): Deleted.
2400         * platform/graphics/GraphicsContext3D.h:
2401         (WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo): Deleted.
2402         (WebCore::GraphicsContext3D::SymbolInfo::operator==): Deleted.
2403         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2404         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
2405         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2406         (WebCore::GraphicsContext3D::checkVaryingsPacking):
2407         (WebCore::GraphicsContext3D::precisionsMatch):
2408         (WebCore::GraphicsContext3D::mappedSymbolName):
2409         (WebCore::GraphicsContext3D::originalSymbolName):
2410
2411 2016-10-27  Simon Fraser  <simon.fraser@apple.com>
2412
2413         Remove RenderStyle::isRunningAcceleratedAnimation()
2414         https://bugs.webkit.org/show_bug.cgi?id=164109
2415
2416         Reviewed by David Hyatt.
2417
2418         RenderStyle::isRunningAcceleratedAnimation() was added in r40876 to handle interrupted
2419         accelerated transitions, and to allow RenderLayer::currentTransform() to know when it
2420         has to manually get the animated style.
2421         
2422         The latter can now use isRunningAcceleratedAnimationOnRenderer(), and interrupting
2423         accelerated transitions seems to work fine without it, so remove it.
2424
2425         * page/animation/ImplicitAnimation.cpp:
2426         (WebCore::ImplicitAnimation::animate):
2427         * page/animation/KeyframeAnimation.cpp:
2428         (WebCore::KeyframeAnimation::animate):
2429         * rendering/RenderLayer.cpp:
2430         (WebCore::RenderLayer::currentTransform):
2431         * rendering/style/RenderStyle.h:
2432         (WebCore::RenderStyle::isRunningAcceleratedAnimation): Deleted.
2433         (WebCore::RenderStyle::setIsRunningAcceleratedAnimation): Deleted.
2434         * rendering/style/StyleRareNonInheritedData.cpp:
2435         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2436         (WebCore::StyleRareNonInheritedData::operator==):
2437         * rendering/style/StyleRareNonInheritedData.h:
2438
2439 2016-10-27  Myles C. Maxfield  <mmaxfield@apple.com>
2440
2441         Teach WebGL code about new buffer targets in WebGL2
2442         https://bugs.webkit.org/show_bug.cgi?id=163924
2443
2444         Reviewed by Dean Jackson.
2445
2446         WebGL 2 adds new buffer targets. Instead of completely reimplementing
2447         the functions again for WebGL 2, we can simply check if we are using
2448         a new kind of context to conditionally enable support.
2449
2450         Test: fast/canvas/webgl/webgl2-buffer-targets.html
2451
2452         * html/canvas/WebGL2RenderingContext.h:
2453         * html/canvas/WebGL2RenderingContext.idl:
2454         * html/canvas/WebGLBuffer.cpp:
2455         (WebCore::WebGLBuffer::associateBufferDataImpl):
2456         (WebCore::WebGLBuffer::associateBufferSubDataImpl):
2457         (WebCore::WebGLBuffer::setTarget):
2458         * html/canvas/WebGLBuffer.h:
2459         * html/canvas/WebGLRenderingContextBase.cpp:
2460         (WebCore::WebGLRenderingContextBase::bindBuffer):
2461         (WebCore::WebGLRenderingContextBase::getBufferParameter):
2462         (WebCore::WebGLRenderingContextBase::validateBufferDataParameters):
2463         * html/canvas/WebGLRenderingContextBase.h:
2464
2465 2016-10-27  Dave Hyatt  <hyatt@apple.com>
2466
2467         [CSS Parser] Enhance grid-auto-flow parsing to allow dense first.
2468         https://bugs.webkit.org/show_bug.cgi?id=164110
2469
2470         Reviewed by Simon Fraser.
2471
2472         * css/StyleBuilderConverter.h:
2473         (WebCore::StyleBuilderConverter::convertGridAutoFlow):
2474
2475 2016-10-27  Simon Fraser  <simon.fraser@apple.com>
2476
2477         constify the CSSValue arguments to StyleBuilderConverter functions
2478         https://bugs.webkit.org/show_bug.cgi?id=164106
2479
2480         Reviewed by Zalan Bujtas.
2481
2482         Make almost all the CSSValue& arguments const (this makes it clear that they
2483         are in params, not out params). Only a few that are CSSImageValues are non-const,
2484         because they fall into a non-const code path.
2485
2486         * css/StyleBuilderConverter.h:
2487         (WebCore::StyleBuilderConverter::convertLengthOrAuto):
2488         (WebCore::StyleBuilderConverter::convertLengthSizing):
2489         (WebCore::StyleBuilderConverter::convertLengthMaxSizing):
2490         (WebCore::StyleBuilderConverter::convertComputedLength):
2491         (WebCore::StyleBuilderConverter::convertLineWidth):
2492         (WebCore::StyleBuilderConverter::convertSpacing):
2493         (WebCore::StyleBuilderConverter::convertToRadiusLength):
2494         (WebCore::StyleBuilderConverter::convertRadius):
2495         (WebCore::StyleBuilderConverter::convertObjectPosition):
2496         (WebCore::StyleBuilderConverter::convertTextDecoration):
2497         (WebCore::StyleBuilderConverter::convertNumber):
2498         (WebCore::StyleBuilderConverter::convertNumberOrAuto):
2499         (WebCore::StyleBuilderConverter::convertWebkitHyphenateLimitLines):
2500         (WebCore::StyleBuilderConverter::convertTransform):
2501         (WebCore::StyleBuilderConverter::convertString):
2502         (WebCore::StyleBuilderConverter::convertStringOrAuto):
2503         (WebCore::StyleBuilderConverter::convertStringOrNone):
2504         (WebCore::StyleBuilderConverter::valueToEmphasisPosition):
2505         (WebCore::StyleBuilderConverter::convertTextEmphasisPosition):
2506         (WebCore::StyleBuilderConverter::convertTextAlign):
2507         (WebCore::StyleBuilderConverter::convertClipPath):
2508         (WebCore::StyleBuilderConverter::convertResize):
2509         (WebCore::StyleBuilderConverter::convertMarqueeRepetition):
2510         (WebCore::StyleBuilderConverter::convertMarqueeSpeed):
2511         (WebCore::StyleBuilderConverter::convertQuotes):
2512         (WebCore::StyleBuilderConverter::convertTextUnderlinePosition):
2513         (WebCore::StyleBuilderConverter::convertReflection):
2514         (WebCore::StyleBuilderConverter::convertInitialLetter):
2515         (WebCore::StyleBuilderConverter::convertTextStrokeWidth):
2516         (WebCore::StyleBuilderConverter::convertLineBoxContain):
2517         (WebCore::StyleBuilderConverter::convertTextDecorationSkip):
2518         (WebCore::StyleBuilderConverter::convertScrollSnapPoints):
2519         (WebCore::StyleBuilderConverter::convertSnapCoordinatePair):
2520         (WebCore::StyleBuilderConverter::convertScrollSnapCoordinates):
2521         (WebCore::StyleBuilderConverter::createGridTrackBreadth):
2522         (WebCore::StyleBuilderConverter::createGridTrackSize):
2523         (WebCore::StyleBuilderConverter::createGridTrackList):
2524         (WebCore::StyleBuilderConverter::createGridPosition):
2525         (WebCore::StyleBuilderConverter::convertGridTrackSizeList):
2526         (WebCore::StyleBuilderConverter::convertGridTrackSize):
2527         (WebCore::StyleBuilderConverter::convertGridPosition):
2528         (WebCore::StyleBuilderConverter::convertGridAutoFlow):
2529         (WebCore::StyleBuilderConverter::convertWordSpacing):
2530         (WebCore::StyleBuilderConverter::convertPerspective):
2531         (WebCore::StyleBuilderConverter::convertMarqueeIncrement):
2532         (WebCore::StyleBuilderConverter::convertFilterOperations):
2533         (WebCore::StyleBuilderConverter::convertFontFeatureSettings):
2534         (WebCore::StyleBuilderConverter::convertFontVariationSettings):
2535         (WebCore::StyleBuilderConverter::convertTouchCallout):
2536         (WebCore::StyleBuilderConverter::convertTapHighlightColor):
2537         (WebCore::StyleBuilderConverter::convertOverflowScrolling):
2538         (WebCore::StyleBuilderConverter::convertSVGLength):
2539         (WebCore::StyleBuilderConverter::convertSVGLengthVector):
2540         (WebCore::StyleBuilderConverter::convertStrokeDashArray):
2541         (WebCore::StyleBuilderConverter::convertPaintOrder):
2542         (WebCore::StyleBuilderConverter::convertOpacity):
2543         (WebCore::StyleBuilderConverter::convertSVGURIReference):
2544         (WebCore::StyleBuilderConverter::convertSVGColor):
2545         (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
2546         (WebCore::StyleBuilderConverter::convertContentAlignmentData):
2547         (WebCore::StyleBuilderConverter::convertGlyphOrientation):
2548         (WebCore::StyleBuilderConverter::convertGlyphOrientationOrAuto):
2549         (WebCore::StyleBuilderConverter::convertLineHeight):
2550         (WebCore::StyleBuilderConverter::convertFontSynthesis):
2551         (WebCore::StyleBuilderConverter::convertPageBreakBetween):
2552         (WebCore::StyleBuilderConverter::convertPageBreakInside):
2553         (WebCore::StyleBuilderConverter::convertColumnBreakBetween):
2554         (WebCore::StyleBuilderConverter::convertColumnBreakInside):
2555         (WebCore::StyleBuilderConverter::convertRegionBreakBetween):
2556         (WebCore::StyleBuilderConverter::convertRegionBreakInside):
2557         (WebCore::StyleBuilderConverter::convertHangingPunctuation):
2558
2559 2016-10-27  Dave Hyatt  <hyatt@apple.com>
2560
2561         [CSS Parser] Add support for a reference box to -webkit-clip-path
2562         https://bugs.webkit.org/show_bug.cgi?id=164107
2563
2564         Reviewed by Simon Fraser.
2565
2566         * css/parser/CSSPropertyParser.cpp:
2567         (WebCore::consumeBasicShape):
2568         (WebCore::consumeBasicShapeOrBox):
2569         (WebCore::consumeWebkitClipPath):
2570
2571 2016-10-27  Yusuke Suzuki  <utatane.tea@gmail.com>
2572
2573         [DOM] Add JSEventType
2574         https://bugs.webkit.org/show_bug.cgi?id=164096
2575
2576         Reviewed by Darin Adler.
2577
2578         Event is inherited by many Event classes. But, Event's accessors and interfaces are
2579         frequently called. For example, event.{type, target, srcElement} for accessors. And
2580         event.stopPropagation() and event.preventDefault() functions.
2581
2582         However, since the user-visible event instance is typically the instance of the subclass,
2583         jsDynamicCast<JSEvent*>() walks several classes before it succeeds. It is costly.
2584
2585         In this patch, we add a new WebCore JSType JSEventType for JSEvent and add a new
2586         function jsEventCast. That supports a super fast cast operation. And it paves the way
2587         for implementing DOM accessors of Event in DOMJIT.
2588
2589         No behavior change.
2590
2591         * WebCore.xcodeproj/project.pbxproj:
2592         * bindings/js/JSDOMWrapper.h:
2593         * bindings/js/JSEventCustom.h: Added.
2594         (WebCore::jsEventCast):
2595         * bindings/scripts/CodeGeneratorJS.pm:
2596         (GetJSTypeForNode):
2597         (GenerateHeader):
2598         (GetCastingHelperForThisObject):
2599         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2600         (WebCore::JSTestEventConstructor::createStructure):
2601         * dom/Event.idl:
2602         * domjit/DOMJITHelpers.h:
2603         (WebCore::DOMJIT::branchIfEvent):
2604         (WebCore::DOMJIT::branchIfNotEvent):
2605
2606 2016-10-27  Simon Fraser  <simon.fraser@apple.com>
2607
2608         Rename StyleRareNonInheritedData::opacity to m_opacity
2609         https://bugs.webkit.org/show_bug.cgi?id=164104
2610
2611         Reviewed by Dave Hyatt.
2612
2613         Pure rename.
2614
2615         * rendering/style/RenderStyle.cpp:
2616         (WebCore::RenderStyle::changeRequiresLayerRepaint):
2617         * rendering/style/RenderStyle.h:
2618         (WebCore::RenderStyle::opacity):
2619         (WebCore::RenderStyle::setOpacity):
2620         * rendering/style/StyleRareNonInheritedData.cpp:
2621         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2622         (WebCore::StyleRareNonInheritedData::operator==):
2623         * rendering/style/StyleRareNonInheritedData.h:
2624         (WebCore::StyleRareNonInheritedData::hasOpacity):
2625
2626 2016-10-27  Simon Fraser  <simon.fraser@apple.com>
2627
2628         If an animation's keyframes affect stacking context properties, create stacking context while the animation is running
2629         https://bugs.webkit.org/show_bug.cgi?id=164094
2630
2631         Reviewed by Dean Jackson.
2632
2633         The CSS animations spec <https://drafts.csswg.org/css-animations-1/> now makes it
2634         clear that a keyframe animation animating properties which can affect stacking context
2635         should establish stacking context while it's running, or filling-forwards. This is part
2636         of the "the user agent must act as if the will-change property...includes all the properties
2637         animated by the animation" clause.
2638
2639         Implement by having CompositeAnimation::animate() track whether running animations should
2640         create stacking context, replacing existing code in AnimationController::updateAnimations()
2641         which only looked at opacity and transform. Transitions are also checked to see if they need
2642         to trigger stacking context.
2643
2644         This allows for the removal of a 0.9999 hack when blending opacity.
2645
2646         Tests: animations/stacking-context-fill-forwards.html
2647                animations/stacking-context-not-fill-forwards.html
2648                animations/stacking-context-unchanged-while-running.html
2649
2650         * page/animation/AnimationController.cpp:
2651         (WebCore::AnimationController::updateAnimations):
2652         * page/animation/CSSPropertyAnimation.cpp:
2653         * page/animation/CompositeAnimation.cpp:
2654         (WebCore::CompositeAnimation::animate):
2655         * page/animation/KeyframeAnimation.cpp:
2656         (WebCore::KeyframeAnimation::KeyframeAnimation):
2657         (WebCore::KeyframeAnimation::computeStackingContextImpact):
2658         (WebCore::KeyframeAnimation::animate):
2659         * page/animation/KeyframeAnimation.h:
2660         * rendering/RenderLayer.cpp:
2661         (WebCore::RenderLayer::currentTransform):
2662         * rendering/style/WillChangeData.cpp:
2663         (WebCore::WillChangeData::propertyCreatesStackingContext):
2664         (WebCore::propertyCreatesStackingContext): Deleted.
2665         * rendering/style/WillChangeData.h:
2666
2667 2016-10-27  Sam Weinig  <sam@webkit.org>
2668
2669         [WebIDL] Move code generators off of domSignature::type and onto domSignature::idlType
2670         https://bugs.webkit.org/show_bug.cgi?id=164089
2671
2672         Reviewed by Alex Christensen.
2673
2674         Make more IDLParser structures contain domTypes for type descriptions, rather than strings:
2675         - domInterface gains type and parentType.
2676         - domConstant gains type.
2677         - domEnum gains type.
2678         - domDictionary gains type and parentType.
2679
2680         With these structs now containing domTypes, we can update the CodeGenerators to operate on
2681         domTypes exclusively, rather than types as strings. This allows us to consistently have access
2682         to information such as subtypes and nullability.
2683
2684         * bindings/scripts/CodeGenerator.pm:
2685         Update helpers to operate of domTypes. The one exception is SkipIncludeHeader, which
2686         still operates on a type name, since it is called late in code generation on the textual
2687         form of type names in the include list. 
2688
2689         * bindings/scripts/CodeGeneratorJS.pm:
2690         Update to use domTypes.
2691
2692         * bindings/scripts/IDLParser.pm:
2693         - Add domType accessors to domInterface, domConstant, domEnum, and domDictionary
2694           and populate them.
2695         - Remove type accessors from domSignature (domType is accessible from idlType).
2696         - Remove special cases for sequence and FrozenArray, now that they are always
2697           accessed as domTypes.
2698
2699         * html/HTMLEmbedElement.idl:
2700         * html/HTMLFrameElement.idl:
2701         * html/HTMLFrameOwnerElement.cpp:
2702         (WebCore::HTMLFrameOwnerElement::getSVGDocument):
2703         * html/HTMLFrameOwnerElement.h:
2704         * html/HTMLIFrameElement.idl:
2705         * html/HTMLObjectElement.idl:
2706         Fix interfaces declaring getSVGDocument() to correctly have it return
2707         a Document, rather than an SVGDocument, which does exist anymore. To
2708         make the bindings happy, also change the signature of HTMLFrameOwnerElement::getSVGDocument
2709         to return a Document.
2710
2711         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2712         * bindings/scripts/test/JS/JSTestInterface.cpp:
2713         * bindings/scripts/test/JS/JSTestObj.cpp:
2714         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
2715         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2716         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2717         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2718         Update test results to remove some redundant headers (Already included JSFoo.h, so no need for Foo.h).
2719
2720 2016-10-27  Myles C. Maxfield  <mmaxfield@apple.com>
2721
2722         [macOS] [WebGL2] Temporarily upgrade WebGL 2's internal OpenGL context from version 2.1 to 3.2
2723         https://bugs.webkit.org/show_bug.cgi?id=164091
2724
2725         Reviewed by Dean Jackson.
2726
2727         In order to test WebGL2 correctly, I had to upgrade the macOS's OpenGL 
2728         context to a 3.2-compatible context to make sure the new symbols are
2729         accepted. Eventually, this 3.2-compatible context will have to be
2730         reverted and replaced with an ANGLE context. The current 3.2-compatible
2731         context is just for testing.
2732
2733         Test: fast/canvas/webgl/webgl2-context-creation.html
2734
2735         * html/canvas/WebGLBuffer.cpp: Use "nullptr" instead of 0.
2736         (WebCore::WebGLBuffer::associateBufferData):
2737         * html/canvas/WebGLRenderingContextBase.cpp: Use make_unique() instead
2738         of the unique_ptr constructor.
2739         (WebCore::WebGLRenderingContextBase::create):
2740         * platform/graphics/GraphicsContext3D.h: GraphicsContext should know
2741         if it is using a 3.2-compatible context because some parts of 2.1 are
2742         removed in these contexts, and replaced with new things which aren't
2743         in 2.1.
2744         * platform/graphics/mac/GraphicsContext3DMac.mm:
2745         (WebCore::setPixelFormat): Use kCGLPFAOpenGLProfile to specify an
2746         OpenGL 3.2 context.
2747         (WebCore::GraphicsContext3D::GraphicsContext3D): GL_CLAMP is deprecated
2748         in OpenGL 3.2. Fortunately, GL_CLAMP_TO_EDGE isn't deprecated and does
2749         exactly what we want. In OpenGL3.2, point sprites are always enabled,
2750         so there's no need to enable them in those contexts.
2751         (WebCore::GraphicsContext3D::isGLES2Compliant):
2752         * platform/graphics/opengl/Extensions3DOpenGL.cpp: In OpenGL 3.2,
2753         glGetString() no longer accepts GL_EXTENSIONS. Instead, glGetStringi()
2754         is used instead. Unfortunately, glGetString() is not available in
2755         OpenGL 2.1 contexts, so we need to use one or the other based on the
2756         version of the context we're using.
2757         (WebCore::Extensions3DOpenGL::Extensions3DOpenGL):
2758         (WebCore::Extensions3DOpenGL::getExtensions):
2759         * platform/graphics/opengl/Extensions3DOpenGL.h:
2760         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2761         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
2762         (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):
2763         Instead of modifying getExtensions() to use glGetStringi(), it makes
2764         better sense to modify this function because getExtensions() returns
2765         a string. Building up a string just to split it up again is silly, so
2766         modifying this function instead makes more sense.
2767         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
2768         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2769         (WebCore::GraphicsContext3D::getIntegerv): GL_MAX_VARYING_FLOATS is
2770         removed in OpenGL 3.2 contexts. However, it is replaced by
2771         GL_MAX_VARYING_COMPONENTS, though this is deprecated but not removed.
2772         In the more recent OpenGL context versions, GL_MAX_VARYING_VECTORS is
2773         recommended instead, but that isn't available in OpenGL 3.2.
2774         (WebCore::GraphicsContext3D::getExtensions):
2775
2776 2016-10-27  Megan Gardner  <megan_gardner@apple.com>
2777
2778         Add support for wide gamut for ShareableBitmap for image popovers
2779         https://bugs.webkit.org/show_bug.cgi?id=164001
2780
2781         Reviewed by Simon Fraser.
2782
2783         Add a function to return a CGColorSpaceRef for extended sRGB.
2784
2785         This is currently untestable, so no tests added.
2786
2787         * platform/graphics/cg/GraphicsContextCG.cpp:
2788         (WebCore::extendedSRGBColorSpaceRef):
2789
2790 2016-10-25  Brent Fulgham  <bfulgham@apple.com>
2791
2792         [Win][Direct2D] Create a RAII Helper Class for the Render Target
2793         https://bugs.webkit.org/show_bug.cgi?id=164005
2794
2795         Reviewed by Alex Christensen.
2796
2797         Tested by existing SVG, image, and Canvas layout tests.
2798
2799         * platform/graphics/GraphicsContext.h:
2800         * platform/graphics/win/GradientDirect2D.cpp:
2801         (WebCore::Gradient::fill): Use new convenience helper class.
2802         * platform/graphics/win/GraphicsContextDirect2D.cpp:
2803         (WebCore::GraphicsContext::didBeginDraw):
2804         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
2805         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): Add an
2806         assertion that we are in a valid state when cleaning up the graphics context.
2807         (WebCore::GraphicsContextPlatformPrivate::clip): Clipping can only happen in a Draw operation.
2808         Open a new BeginDraw if asked to Clip. The Begin must stay active when this method returns,
2809         as the Clip layer is only valid during a Draw operation.
2810         (WebCore::GraphicsContextPlatformPrivate::beginDraw): Added.
2811         (WebCore::GraphicsContextPlatformPrivate::endDraw): Added.
2812         (WebCore::GraphicsContext::beginDrawIfNeeded): Added.
2813         (WebCore::GraphicsContext::endDraw): Added.
2814         (WebCore::GraphicsContext::drawWithoutShadow): Revise to use new RenderTargetHelper class.
2815         (WebCore::GraphicsContext::drawWithShadow): Ditto.
2816         (WebCore::GraphicsContext::platformFillRoundedRect): Ditto.
2817         (WebCore::GraphicsContext::fillRectWithRoundedHole): Ditto.
2818         (WebCore::GraphicsContext::setDidBeginDraw): Deleted.
2819         * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
2820         (WebCore::GraphicsContextPlatformPrivate::didBeginDraw): Revise to use count instead of
2821         a separate boolean.
2822         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
2823         (WebCore::ImageBufferData::getData): Revise to use new RenderTargetHelper class.
2824         * platform/graphics/win/NativeImageDirect2D.cpp:
2825         (WebCore::drawNativeImage): Ditto.
2826         * platform/graphics/win/RenderTargetHelper.h: Added.
2827         (WebCore::RenderTargetHelper::RenderTargetHelper):
2828         (WebCore::RenderTargetHelper::~RenderTargetHelper):
2829         (WebCore::RenderTargetHelper::endDraw):
2830         * svg/graphics/SVGImage.cpp:
2831         (WebCore::SVGImage::nativeImage): Revise to use new RenderTargetHelper class.
2832
2833 2016-10-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2834
2835         Support "insertFromDrop" and "deleteByDrag" for the InputEvent spec
2836         https://bugs.webkit.org/show_bug.cgi?id=163948
2837         <rdar://problem/28921433>
2838
2839         Reviewed by Darin Adler.
2840
2841         Implements support for "insertFromDrop" and "deleteByDrag" inputTypes. These are fired when dragging and
2842         dropping text in editable areas. To do this, we introduce EditActionInsertFromDrop and EditActionDeleteByDrag
2843         (renamed from EditActionDrag, which is no longer necessary after this patch).
2844
2845         When moving text from an editable element to another, we will use a DeleteSelectionCommand to delete the text
2846         from the source element and a ReplaceSelectionCommand to insert the text into the destination element. This
2847         means that we currently fire two input events on the source and destination elements (i.e. given by the start
2848         and end selections) after both child editing commands of the MoveSelectionCommand have been applied. Instead, we
2849         need to fire events in this order:
2850
2851         1. beforeinput ("deleteByDrag") on the source
2852         2. Update DOM
2853         3. input ("deleteByDrag") on the source
2854
2855         4. beforeinput ("insertFromDrop") on the destination
2856         5. Update DOM
2857         6. input ("insertFromDrop") on the destination
2858
2859         To accomplish this, we allow an edit command to defer dispatching input events to its child commands via
2860         CompositeEditCommand::shouldDispatchInputEvents, which the MoveSelectionCommand overrides. Additionally,
2861         when applying the MoveSelectionCommand, we now apply() the child DeleteSelectionCommand and
2862         ReplaceSelectionCommand instead of using doApply(). This allows these children to separately dispatch input
2863         events, and also handle preventDefault() separately.
2864
2865         Tests: fast/events/before-input-events-prevent-drag-and-drop.html
2866                fast/events/input-events-drag-and-drop.html
2867                fast/events/input-events-insert-by-drop.html
2868
2869         * editing/CompositeEditCommand.cpp:
2870         (WebCore::CompositeEditCommand::apply):
2871         (WebCore::CompositeEditCommand::composition):
2872
2873         Searches for the top-level command and returns its composition. Also ASSERTs that the m_command of all child
2874         commands along the way is null. In places where we used to ASSERT that command.composition() should be null, we
2875         now perform the assertion here instead.
2876
2877         * editing/CompositeEditCommand.h:
2878         (WebCore::CompositeEditCommand::shouldDispatchInputEvents):
2879
2880         This is true by default, which means that if apply() is called for a composite edit command that does not
2881         override this to return false, it will try to dispatch input events. In most cases, the parent command will call
2882         on the child command to doApply(), bypassing this check.
2883
2884         (WebCore::CompositeEditCommand::composition): Deleted.
2885         * editing/EditAction.h:
2886         * editing/EditCommand.cpp:
2887         (WebCore::inputTypeNameForEditingAction):
2888         (WebCore::EditCommand::isEditingTextAreaOrTextInput):
2889         (WebCore::EditCommand::setStartingSelection):
2890         (WebCore::EditCommand::setEndingSelection):
2891         (WebCore::EditCommand::setParent):
2892         * editing/Editor.cpp:
2893         (WebCore::Editor::willApplyEditing):
2894         (WebCore::Editor::appliedEditing):
2895
2896         After applying editing, only adjust the current selection and notify clients of selection change if the applied
2897         command was a top-level command; otherwise, these actions should wait until all child commands of the top-level
2898         command have been applied. In particular, we should not register the applied command as an undo step.
2899
2900         * editing/MoveSelectionCommand.cpp:
2901         (WebCore::MoveSelectionCommand::doApply):
2902         (WebCore::MoveSelectionCommand::editingAction):
2903         * editing/MoveSelectionCommand.h:
2904         * page/DragController.cpp:
2905         (WebCore::DragController::concludeEditDrag):
2906
2907         For the cases where we're not deleting text from the drag source (i.e. we're just applying a
2908         ReplaceSelectionCommand) pass in EditActionInsertFromDrop as the EditAction when creating the command.
2909
2910 2016-10-27  Per Arne Vollan  <pvollan@apple.com>
2911
2912         [Win][Direct2D] Implement GraphicsContext::releaseWindowsContext.
2913         https://bugs.webkit.org/show_bug.cgi?id=163988
2914
2915         Reviewed by Brent Fulgham.
2916
2917         This method is needed to draw native controls.
2918
2919         * platform/graphics/win/GraphicsContextDirect2D.cpp:
2920         (WebCore::GraphicsContext::releaseWindowsContext):
2921
2922 2016-10-27  Joseph Pecoraro  <pecoraro@apple.com>
2923
2924         Web Inspector: Worker should recover if Inspector is closed and never sent Worker.initialized command
2925         https://bugs.webkit.org/show_bug.cgi?id=164073
2926
2927         Reviewed by Brian Burg.
2928
2929         Test: inspector/worker/worker-recover-if-inspector-close.html
2930
2931         * workers/WorkerInspectorProxy.cpp:
2932         (WebCore::WorkerInspectorProxy::disconnectFromWorkerInspectorController):
2933         Ensure we stop the debugger only task loop if needed when the last debugger
2934         message comes in.
2935
2936 2016-10-27  Joseph Pecoraro  <pecoraro@apple.com>
2937
2938         Web Inspector: Include ConsoleAgent in Workers - real console.log support
2939         https://bugs.webkit.org/show_bug.cgi?id=163844
2940         <rdar://problem/28903328>
2941
2942         Reviewed by Brian Burg.
2943
2944         Test: inspector/worker/console-basic.html
2945
2946         This introduces a real ConsoleAgent in the Worker InspectorController.
2947         We no longer need to pass partial ConsoleMessage objects to be logged
2948         through the Page, we can just send the full ConsoleMessages to a
2949         frontend once it connects to the Worker.
2950
2951         In order to guarantee that the Worker InspectorController is properly
2952         all Workers will start paused if there is an Inspector attached to
2953         the Page. The frontend _must_ call the new Worker.initialized method
2954         after sending its setup commands to the Worker. This ensures we get
2955         handle all initialization commands (like Agent.enable(), and
2956         setting state like breakpoints) before any script executes in the
2957         Worker. This mirrors the Inspector.initialized method that does the
2958         same thing for JSContext auto-attach of the Main target.
2959
2960         In the backend, the wait until initialized state is just running
2961         the WorkerThread's RunLoop in a special debugger mode to only process
2962         debugger commands until we are ready. This will effectively be
2963         the same as pausing so it is generalized into WorkerThread.
2964
2965         * CMakeLists.txt:
2966         * WebCore.xcodeproj/project.pbxproj:
2967         * inspector/InspectorAllInOne.cpp:
2968         New files.
2969
2970         * inspector/InspectorWorkerAgent.cpp:
2971         (WebCore::InspectorWorkerAgent::initialized):
2972         (WebCore::InspectorWorkerAgent::shouldWaitForDebuggerOnStart):
2973         * inspector/InspectorWorkerAgent.h:
2974         Add the new initialized method. This just uses the proxy to send
2975         a message to be handled on the Worker Thread and unpause.
2976
2977         * inspector/WorkerConsoleAgent.cpp:
2978         (WebCore::WorkerConsoleAgent::WorkerConsoleAgent):
2979         (WebCore::WorkerConsoleAgent::addInspectedNode):
2980         * inspector/WorkerConsoleAgent.h:
2981         * inspector/WorkerInspectorController.cpp:
2982         (WebCore::WorkerInspectorController::WorkerInspectorController):
2983         Add a ConsoleAgent to WorkerInspectorController.
2984
2985         * workers/WorkerInspectorProxy.h:
2986         * workers/WorkerInspectorProxy.cpp:
2987         (WebCore::WorkerInspectorProxy::workerStartMode):
2988         (WebCore::WorkerInspectorProxy::resumeWorkerIfPaused):
2989         (WebCore::WorkerInspectorProxy::connectToWorkerInspector):
2990         (WebCore::WorkerInspectorProxy::disconnectFromWorkerInspector):
2991         (WebCore::WorkerInspectorProxy::sendMessageToWorkerInspector):
2992         Use the debugger mode when sending messages to the WorkerThread.
2993
2994         * workers/Worker.cpp:
2995         (WebCore::Worker::notifyFinished):
2996         * workers/WorkerMessagingProxy.cpp:
2997         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
2998         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject): Deleted.
2999         * workers/WorkerMessagingProxy.h:
3000         * workers/WorkerReportingProxy.h:
3001         * workers/WorkerGlobalScope.cpp:
3002         (WebCore::WorkerGlobalScope::addConsoleMessage):
3003         (WebCore::WorkerGlobalScope::addMessage):
3004         * workers/WorkerGlobalScope.h:
3005         * workers/WorkerGlobalScopeProxy.h:
3006         Remove legacy partial console support.
3007
3008         * workers/WorkerRunLoop.h:
3009         * workers/WorkerRunLoop.cpp:
3010         (WebCore::WorkerRunLoop::debuggerMode):
3011         * workers/WorkerThread.h:
3012         * workers/WorkerThread.cpp:
3013         (WebCore::WorkerThread::workerThread):
3014         (WebCore::WorkerThread::startRunningDebuggerTasks):
3015         (WebCore::WorkerThread::stopRunningDebuggerTasks):
3016         General code for spinning the WorkerThread and only processing debugger
3017         (Inspector) commands. Use this when starting the thread to ensure the
3018         frontend initializes the Worker's Agents before any JavaScript executes.
3019
3020         * page/PageConsoleClient.cpp:
3021         * workers/WorkerConsoleClient.cpp:
3022         (WebCore::WorkerConsoleClient::count):
3023         (WebCore::WorkerConsoleClient::time):
3024         (WebCore::WorkerConsoleClient::timeEnd):
3025         * inspector/InspectorConsoleInstrumentation.h: Removed.
3026         * inspector/InspectorInstrumentation.cpp:
3027         (WebCore::InspectorInstrumentation::startConsoleTimingImpl):
3028         (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
3029         (WebCore::InspectorInstrumentation::shouldWaitForDebuggerOnStartImpl):
3030         * inspector/InspectorInstrumentation.h:
3031         (WebCore::InspectorInstrumentation::shouldWaitForDebuggerOnStart):
3032         (WebCore::InspectorInstrumentation::addMessageToConsole):
3033         (WebCore::InspectorInstrumentation::consoleCount):
3034         (WebCore::InspectorInstrumentation::takeHeapSnapshot):
3035         (WebCore::InspectorInstrumentation::startConsoleTiming):
3036         (WebCore::InspectorInstrumentation::stopConsoleTiming):
3037         (WebCore::InspectorInstrumentation::consoleTimeStamp):
3038         (WebCore::InspectorInstrumentation::startProfiling):
3039         (WebCore::InspectorInstrumentation::stopProfiling):
3040         Implement a few more basic console APIs that required ConsoleAgent.
3041
3042 2016-10-27  Joseph Pecoraro  <pecoraro@apple.com>
3043
3044         Web Inspector: Include RuntimeAgent in Workers - evaluate in Worker context
3045         https://bugs.webkit.org/show_bug.cgi?id=163835
3046         <rdar://problem/28901465>
3047
3048         Reviewed by Brian Burg.
3049
3050         Tests: inspector/unit-tests/target-manager.html
3051                inspector/worker/runtime-basic.html
3052
3053         * CMakeLists.txt:
3054         * WebCore.xcodeproj/project.pbxproj:
3055         * inspector/InspectorAllInOne.cpp:
3056         New file.
3057
3058         * inspector/InspectorWebAgentBase.h:
3059         (WebCore::WorkerAgentContext::WorkerAgentContext):
3060         New agent context creation struct for Workers.
3061
3062         * inspector/WorkerInspectorController.cpp:
3063         (WebCore::WorkerInspectorController::WorkerInspectorController):
3064         Create a RuntimeAgent for Workers.
3065
3066         * inspector/WorkerRuntimeAgent.cpp: Added.
3067         (WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
3068         (WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
3069         (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
3070         (WebCore::WorkerRuntimeAgent::injectedScriptForEval):
3071         * inspector/WorkerRuntimeAgent.h: Added.
3072         Workers currently only ever have a single execution context.
3073
3074 2016-10-27  Joseph Pecoraro  <pecoraro@apple.com>
3075
3076         Web Inspector: Introduce Page WorkerAgent and Worker InspectorController
3077         https://bugs.webkit.org/show_bug.cgi?id=163817
3078         <rdar://problem/28899063>
3079
3080         Reviewed by Brian Burg.
3081
3082         Test: inspector/worker/worker-create-and-terminate.html
3083
3084         From the perspective of an Inspector frontend, Workers are
3085         like a special JavaScript context, separate from the page, that
3086         may have its own set of Agents. This patch adds the necessary
3087         backend infrastructure to provide WorkerGlobalObject with an
3088         InspectorController and the means to communicate with a frontend
3089         through a Page's WorkerAgent.
3090
3091         Pages now get a WorkerAgent. This informs the frontend about
3092         created and terminated Workers. It also provides a communication
3093         channel to dispatch and return inspector protocol messages to
3094         each of the Workers. The Page side always interacts with the
3095         WorkerInspectorProxy on the main thread. The Page's Worker Agent
3096         can sends and receives messages to WorkerInspectorControllers.
3097
3098         WorkerGlobalScopes now get a WorkerInspectorController which
3099         will eventually contain its own set of agents. There are no
3100         agents yet, but they will be added individually in follow-up
3101         patches. The Worker side always interacts with the
3102         WorkerGlobalScope on the worker thread. WorkerInspectorController
3103         dispatches messages on its agents.
3104
3105         All communication with Worker agents goes through Worker.sendMessageToWorker,
3106         which tunnels the command request to the Worker's InspectorController
3107         and agents. At the protocol level, worker agent command responses and
3108         worker agent events are sent as events through Worker.dispatchMessageFromWorker.
3109         On the frontend, the message dispatcher code will pair up replies with
3110         their commands, and no-reply messages as events, like normal. So calling
3111         worker agent methods in the frontend will be no different from the
3112         existing callback/promise-based ways.
3113
3114         * CMakeLists.txt:
3115         * WebCore.xcodeproj/project.pbxproj:
3116         * inspector/InspectorAllInOne.cpp:
3117         Add new files.
3118
3119         * bindings/js/WorkerScriptController.cpp:
3120         (WebCore::WorkerScriptController::WorkerScriptController):
3121         (WebCore::WorkerScriptController::initScript):
3122         * bindings/js/WorkerScriptController.h:
3123         Some cleanup.
3124
3125         * inspector/InspectorController.cpp:
3126         (WebCore::InspectorController::InspectorController):
3127         * inspector/InspectorController.h:
3128         * inspector/InstrumentingAgents.cpp:
3129         (WebCore::InstrumentingAgents::reset):
3130         * inspector/InstrumentingAgents.h:
3131         (WebCore::InstrumentingAgents::inspectorWorkerAgent):
3132         (WebCore::InstrumentingAgents::setInspectorWorkerAgent):
3133         * inspector/InspectorInstrumentation.cpp:
3134         (WebCore::InspectorInstrumentation::workerStartedImpl):
3135         (WebCore::InspectorInstrumentation::workerTerminatedImpl):
3136         (WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
3137         * inspector/InspectorInstrumentation.h:
3138         (WebCore::InspectorInstrumentation::workerStarted):
3139         (WebCore::InspectorInstrumentation::workerTerminated):
3140         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
3141         Give the Page a WorkerAgent and Instrumentation methods for
3142         Worker creation and termination.
3143
3144         * inspector/InspectorWorkerAgent.h: Added.
3145         * inspector/InspectorWorkerAgent.cpp: Added.
3146         (WebCore::InspectorWorkerAgent::InspectorWorkerAgent):
3147         (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
3148         (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
3149         (WebCore::InspectorWorkerAgent::enable):
3150         (WebCore::InspectorWorkerAgent::disable):
3151         (WebCore::InspectorWorkerAgent::workerStarted):
3152         (WebCore::InspectorWorkerAgent::workerTerminated):
3153         (WebCore::InspectorWorkerAgent::connectToAllWorkerInspectorProxiesForPage):
3154         (WebCore::InspectorWorkerAgent::disconnectFromAllWorkerInspectorProxies):
3155         (WebCore::InspectorWorkerAgent::connectToWorkerInspectorProxy):
3156         (WebCore::InspectorWorkerAgent::disconnectFromWorkerInspectorProxy):
3157         Handle connecting to Workers. This performs the "connectFrontend"
3158         and "disconnectFrontend" dance with each Worker's InspectorController.
3159         We only connect to workers when the Worker domain is enabled.
3160
3161         (WebCore::InspectorWorkerAgent::sendMessageToWorker):
3162         (WebCore::InspectorWorkerAgent::sendMessageFromWorkerToFrontend):
3163         Proxying messages to individual messages happens through the
3164         WorkerInspectorProxy. That takes care of passing messages
3165         across threads for us.
3166
3167         * workers/WorkerInspectorProxy.cpp: Added.
3168         (WebCore::WorkerInspectorProxy::allWorkerInspectorProxies):
3169         (WebCore::WorkerInspectorProxy::WorkerInspectorProxy):
3170         (WebCore::WorkerInspectorProxy::~WorkerInspectorProxy):
3171         (WebCore::WorkerInspectorProxy::workerStarted):
3172         (WebCore::WorkerInspectorProxy::workerTerminated):
3173         (WebCore::WorkerInspectorProxy::connectToWorkerInspector):
3174         (WebCore::WorkerInspectorProxy::disconnectFromWorkerInspector):
3175         (WebCore::WorkerInspectorProxy::sendMessageToWorkerInspector):
3176         (WebCore::WorkerInspectorProxy::sendMessageFromWorkerToFrontend):
3177         * workers/WorkerInspectorProxy.h: Added.
3178         (WebCore::WorkerInspectorProxy::PageChannel::~PageChannel):
3179         (WebCore::WorkerInspectorProxy::url):
3180         (WebCore::WorkerInspectorProxy::identifier):
3181         (WebCore::WorkerInspectorProxy::scriptExecutionContext):
3182         The WorkerInspectorProxy simplifies the cross thread communication
3183         between the Page Inspector and Worker Inspector. It also provides
3184         a clean interface between the two sides.
3185
3186         * inspector/WorkerToPageFrontendChannel.h: Added.
3187         * inspector/WorkerInspectorController.h: Added.
3188         * inspector/WorkerInspectorController.cpp: Added.
3189         (WebCore::WorkerInspectorController::WorkerInspectorController):
3190         (WebCore::WorkerInspectorController::~WorkerInspectorController):
3191         (WebCore::WorkerInspectorController::workerTerminating):
3192         (WebCore::WorkerInspectorController::connectFrontend):
3193         (WebCore::WorkerInspectorController::disconnectFrontend):
3194         (WebCore::WorkerInspectorController::dispatchMessageFromFrontend):
3195         (WebCore::WorkerInspectorController::functionCallHandler):
3196         (WebCore::WorkerInspectorController::evaluateHandler):
3197         (WebCore::WorkerInspectorController::vm):
3198         A basic InspectorController for a WorkerGlobalScope.
3199         No agents yet, they will come soon.
3200
3201         * inspector/WorkerScriptDebugServer.h:
3202         * inspector/WorkerScriptDebugServer.cpp:
3203         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
3204         (WebCore::WorkerScriptDebugServer::attachDebugger):
3205         (WebCore::WorkerScriptDebugServer::detachDebugger):
3206         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
3207         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
3208         (WebCore::WorkerScriptDebugServer::reportException):
3209         (WebCore::WorkerScriptDebugServer::interruptAndRunTask):
3210         A basic WorkerScriptDebug server for a WorkerGlobalScope.
3211         Not really used until we implement DebuggerAgent, but needed for InspectorEnvironment.
3212
3213         * workers/WorkerGlobalScope.cpp:
3214         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
3215         * workers/WorkerGlobalScope.h:
3216         (WebCore::WorkerGlobalScope::inspectorController):
3217         Give the WorkerGlobalScope an InspectorController.
3218
3219         * workers/WorkerThread.cpp:
3220         (WebCore::WorkerThread::stop):
3221         Ensure the Worker InspectorController is immediately on
3222         the WorkerThread when it is about to be closed.
3223
3224         * workers/WorkerMessagingProxy.cpp:
3225         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
3226         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
3227         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
3228         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyedInternal):
3229         (WebCore::WorkerMessagingProxy::terminateWorkerGlobalScope):
3230         * workers/WorkerMessagingProxy.h:
3231         * workers/WorkerReportingProxy.h:
3232         Call into the WorkerInspectorProxy for any inspector related logic,
3233         such as creation, termination, and messages received from the Worker.
3234
3235 2016-10-27  Dave Hyatt  <hyatt@apple.com>
3236
3237         [CSS Parser] Implement CSS variables
3238         https://bugs.webkit.org/show_bug.cgi?id=164075
3239
3240         Reviewed by Dean Jackson.
3241
3242         * CMakeLists.txt:
3243         * WebCore.xcodeproj/project.pbxproj:
3244         Add CSSCustomPropertyValue.cpp to the project.
3245
3246         * css/CSSCustomPropertyValue.cpp: Added.
3247         (WebCore::CSSCustomPropertyValue::checkVariablesForCycles):
3248         (WebCore::CSSCustomPropertyValue::resolveVariableReferences):
3249         * css/CSSCustomPropertyValue.h:
3250         These functions abstract the old and new implementations of CSS
3251         variables so that the callers don't have to worry about it.
3252
3253         * css/CSSValue.cpp:
3254         (WebCore::CSSValue::equals):
3255         Make sure CSSVariableReferenceValue and CSSPendingSubstitutionValue
3256         have equals implemented.
3257
3258         (WebCore::CSSValue::isInvalidCustomPropertyValue): Deleted.
3259         This code was dead and never called.
3260
3261         * css/CSSValue.h:
3262         (WebCore::CSSValue::isCustomPropertyValue):
3263         (WebCore::CSSValue::hasVariableReferences):
3264         Add a helper function for asking if a CSSValue has variable references.
3265         This abstracts the old and new implementations so that callers can
3266         ask if the value has variables without caring which implementation is
3267         being used.
3268
3269         * css/CSSValueList.cpp:
3270         (WebCore::CSSValueList::checkVariablesForCycles):
3271         * css/CSSValueList.h:
3272         In order to abstract the old and new variables implementations, custom
3273         properties now store CSSCustomPropertyValue as their values instead of
3274         raw values. The old implementation needs to be patched to deal with this
3275         wrapper being present now.
3276
3277         * css/CSSVariableData.cpp:
3278         (WebCore::CSSVariableData::checkVariablesForCycles):
3279         (WebCore::CSSVariableData::checkVariablesForCyclesWithRange):
3280         (WebCore::CSSVariableData::resolveVariableFallback):
3281         (WebCore::CSSVariableData::resolveVariableReference):
3282         (WebCore::CSSVariableData::resolveVariableReferences):
3283         (WebCore::CSSVariableData::resolveTokenRange):
3284         * css/CSSVariableData.h:
3285         Implementation of cycle checking and variable resolution. The logic of
3286         this implementation is the same as the old. It walks CSSParserTokens
3287         instead of the old CSSParser structures.
3288
3289         * css/CSSVariableReferenceValue.cpp:
3290         (WebCore::CSSVariableReferenceValue::customCSSText):
3291         Add support for serialization caching, just like the old implementation
3292         had in CSSVariableDependentValue.
3293
3294         (WebCore::CSSVariableReferenceValue::checkVariablesForCycles):
3295         * css/CSSVariableReferenceValue.h:
3296         Add cycle checking and variable resolution helper functions.
3297
3298         * css/CSSVariableValue.cpp:
3299         (WebCore::CSSVariableValue::buildParserValueListSubstitutingVariables):
3300         Patched to account for the change in storage of custom properties to
3301         have custom property value wrappers.
3302
3303         * css/StyleProperties.cpp:
3304         (WebCore::StyleProperties::getPropertyValue):
3305         (WebCore::StyleProperties::borderSpacingValue):
3306         (WebCore::StyleProperties::getLayeredShorthandValue):
3307         (WebCore::StyleProperties::getShorthandValue):
3308         (WebCore::StyleProperties::getCommonValue):
3309         (WebCore::StyleProperties::getPropertyCSSValue):
3310         (WebCore::StyleProperties::asText):
3311         Clean up the resolution of pending substitution values. Instead of hacking
3312         it into every possible StyleShorthandProperty crawling function, obtain
3313         the shorthand for the property up front, access the first longhand, and
3314         if we see a pending substitution value, perform the substitution.
3315
3316         * css/StyleResolver.cpp:
3317         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
3318         (WebCore::StyleResolver::applyProperty):
3319         (WebCore::StyleResolver::resolvedVariableValue):
3320         * css/StyleResolver.h:
3321         Add support for the new implementation in all the same places as the old.
3322
3323         * css/parser/CSSParser.cpp:
3324         (WebCore::CSSParser::parseInlineStyleDeclaration):
3325         (WebCore::CSSParser::parseValueWithVariableReferences):
3326         (WebCore::CSSParser::parseVariableDependentValue): Deleted.
3327         * css/parser/CSSParser.h:
3328         Rename parseVariableDependentValue to parseValueWithVariableReferences,
3329         since it is operating on three distinct value types now. Turn on new
3330         parser support for parseInlineStyleDeclaration.
3331
3332         * css/parser/CSSParserImpl.cpp:
3333         (WebCore::filterProperties):
3334         (WebCore::CSSParserImpl::parseVariableValue): Deleted.
3335         (WebCore::CSSParserImpl::parseCustomPropertySet): Deleted.
3336         * css/parser/CSSParserImpl.h:
3337         Remove parser functions that aren't relevant to our implementation
3338         of CSS variables.
3339
3340         * css/parser/CSSVariableParser.cpp:
3341         (WebCore::classifyVariableRange):
3342         Add support for the CSS4 'revert' keyword to the new variable parser.
3343
3344         * rendering/style/RenderStyle.cpp:
3345         (WebCore::RenderStyle::checkVariablesInCustomProperties):
3346         Modified to store CSSCustomPropertyValues as the values always now and
3347         to use the method abstractions on CSSCustomPropertyValue to resolve
3348         cycles and perform substitutions.
3349
3350         * rendering/style/RenderStyle.h:
3351         (WebCore::RenderStyle::setCustomPropertyValue):
3352         (WebCore::RenderStyle::getCustomPropertyValue):
3353         * rendering/style/StyleCustomPropertyData.h:
3354         (WebCore::StyleCustomPropertyData::operator==):
3355         (WebCore::StyleCustomPropertyData::setCustomPropertyValue):
3356         (WebCore::StyleCustomPropertyData::getCustomPropertyValue):
3357         Tighten up the map to store CSSCustomPropertyValue instead of just
3358         CSSValue.
3359
3360 2016-10-27  Zalan Bujtas  <zalan@apple.com>
3361
3362         RenderMultiColumnFlowThread::processPossibleSpannerDescendant should take RenderObject& instead of RenderObject*
3363         https://bugs.webkit.org/show_bug.cgi?id=164072
3364
3365         Reviewed by Simon Fraser.
3366
3367         No change in functionality.
3368
3369         * rendering/RenderFlowThread.h:
3370         * rendering/RenderMultiColumnFlowThread.cpp:
3371         (WebCore::findSetRendering):
3372         (WebCore::isValidColumnSpanner):
3373         (WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant):
3374         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
3375         (WebCore::RenderMultiColumnFlowThread::findSetRendering): Deleted.
3376         * rendering/RenderMultiColumnFlowThread.h:
3377         * rendering/RenderMultiColumnSet.cpp:
3378         (WebCore::precedesRenderer):
3379         (WebCore::RenderMultiColumnSet::containsRendererInFlowThread):
3380         * rendering/RenderMultiColumnSet.h:
3381         * rendering/RenderMultiColumnSpannerPlaceholder.cpp:
3382         (WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):
3383         (WebCore::RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder):
3384         * rendering/RenderMultiColumnSpannerPlaceholder.h:
3385         * rendering/RenderObject.cpp:
3386         (WebCore::RenderObject::insertedIntoTree):
3387
3388 2016-10-27  Brent Fulgham  <bfulgham@apple.com>
3389
3390         Prevent hit tests from being performed on an invalid render tree
3391         https://bugs.webkit.org/show_bug.cgi?id=163877
3392         <rdar://problem/28675761>
3393
3394         Reviewed by Simon Fraser.
3395
3396         Changeset r200971 added code to ensure that layout is up-to-date before hit testing, but did
3397         so only for the main frame. It was still possible to enter cross-frame hit testing with a
3398         subframe needing style recalc. In that situation, the subframe's updateLayout() would get
3399         called, which could trigger a compositing change that marked the parent frame as needing style
3400         recalc. A subsequent layout on the parent frame (for example by hit testing traversing into
3401         a second subframe) could then mutate the parent frame's layer tree while hit testing was
3402         traversing it.
3403         
3404         This patch modifies the hit test logic to ensure that a recursive layout is performed so that
3405         we always perform hit tests on a clean set of frames. It also adds some assertions to warn
3406         us if we encounter this invalid state.
3407
3408         Tested by fast/layers/prevent-hit-test-during-layout.html.
3409
3410         * dom/Document.cpp:
3411         (WebCore::Document::scheduleStyleRecalc): Assert that we are not hit testing
3412         during style recalculation.
3413         * page/EventHandler.cpp:
3414         (WebCore::EventHandler::hitTestResultAtPoint): Ensure that we have a clean render tree
3415         when hit testing.
3416         * page/FrameView.cpp:
3417         (WebCore::FrameView::setNeedsLayout): Assert that we are not in the process of hit testing
3418         when we schedule a layout.
3419         * rendering/RenderView.cpp:
3420         (WebCore::RenderView::hitTest): Mark RenderView as in an active hit test.
3421         * rendering/RenderView.h:
3422
3423 2016-10-27  Zan Dobersek  <zdobersek@igalia.com>
3424
3425         BufferSource should behave as an union
3426         https://bugs.webkit.org/show_bug.cgi?id=164056
3427
3428         Reviewed by Chris Dumez.
3429
3430         WebIDL typedefs BufferSource as (ArrayBufferView or ArrayBuffer).
3431         To follow that definition, IDLBufferSource is now type-aliased
3432         to IDLUnion<IDLInterface<ArrayBufferView>, IDLInterface<ArrayBuffer>>.
3433
3434         Converter<IDLBufferSource> template specialization can now be
3435         removed since the default specialization for IDLUnion will be
3436         used.
3437
3438         C++ implementations still work through a BufferSource object.
3439         That class now has an implicit constructor that consumes the
3440         Variant object. The data() and length() methods on the class
3441         now iterate the variant to find an existing object that can
3442         provide a pointer to the data or the length of it.
3443
3444         * Modules/mediasource/SourceBuffer.cpp:
3445         (WebCore::SourceBuffer::appendBuffer):
3446         * bindings/generic/IDLTypes.h:
3447         * bindings/js/BufferSource.h:
3448         (WebCore::BufferSource::BufferSource):
3449         (WebCore::BufferSource::data):
3450         (WebCore::BufferSource::length):
3451         * bindings/js/JSDOMConvert.h:
3452         (WebCore::Converter<IDLBufferSource>::convert): Deleted.
3453
3454 2016-10-27  Chris Dumez  <cdumez@apple.com>
3455
3456         Merge Element::ShadowRootMode and ShadowRoot::Mode enumerations
3457         https://bugs.webkit.org/show_bug.cgi?id=164063
3458
3459         Reviewed by Sam Weinig.
3460
3461         Merge Element::ShadowRootMode and ShadowRoot::Mode enumerations now
3462         that we support having IDL string enumerations in their own IDL file.
3463
3464         No new tests, no Web-exposed behavior change.
3465
3466         * CMakeLists.txt:
3467         * DerivedSources.cpp:
3468         * DerivedSources.make:
3469         * WebCore.xcodeproj/project.pbxproj:
3470         * css/ElementRuleCollector.cpp:
3471         (WebCore::ElementRuleCollector::collectMatchingRules):
3472         (WebCore::ElementRuleCollector::matchAuthorShadowPseudoElementRules):
3473         (WebCore::ElementRuleCollector::collectMatchingShadowPseudoElementRules):
3474         * css/SelectorChecker.cpp:
3475         (WebCore::SelectorChecker::matchRecursively):
3476         * dom/CustomElementRegistry.cpp:
3477         (WebCore::enqueueUpgradeInShadowIncludingTreeOrder):
3478         * dom/Element.cpp:
3479         (WebCore::Element::bindingsOffsetParent):
3480         (WebCore::Element::addShadowRoot):
3481         (WebCore::Element::attachShadow):
3482         (WebCore::Element::shadowRootForBindings):
3483         (WebCore::Element::userAgentShadowRoot):
3484         (WebCore::Element::ensureUserAgentShadowRoot):
3485         * dom/Element.h:
3486         * dom/Element.idl:
3487         * dom/InlineStyleSheetOwner.cpp:
3488         (WebCore::parserContextForElement):
3489         * dom/Node.cpp:
3490         (WebCore::Node::isUnclosedNode):
3491         (WebCore::Node::assignedSlotForBindings):
3492         (WebCore::Node::isInUserAgentShadowTree):
3493         * dom/ShadowRoot.cpp:
3494         (WebCore::ShadowRoot::ShadowRoot):
3495         * dom/ShadowRoot.h:
3496         * dom/ShadowRoot.idl:
3497         * dom/ShadowRootMode.h: Added.
3498         * dom/ShadowRootMode.idl: Copied from Source/WebCore/dom/ShadowRoot.idl.
3499         * dom/SlotAssignment.cpp:
3500         (WebCore::SlotAssignment::didChangeSlot):
3501         * html/HTMLSummaryElement.cpp:
3502         (WebCore::HTMLSummaryElement::create):
3503         * inspector/InspectorDOMAgent.cpp:
3504         (WebCore::shadowRootType):
3505         * rendering/HitTestResult.cpp:
3506         (WebCore::moveOutOfUserAgentShadowTree):
3507         * rendering/RenderElement.cpp:
3508         (WebCore::RenderElement::selectionPseudoStyle):
3509         * rendering/RenderLayer.cpp:
3510         (WebCore::rendererForScrollbar):
3511         * style/StyleScope.cpp:
3512         (WebCore::Style::Scope::shouldUseSharedUserAgentShadowTreeStyleResolver):
3513         (WebCore::Style::Scope::didChangeStyleSheetEnvironment):
3514         * svg/SVGElement.cpp:
3515         (WebCore::SVGElement::correspondingUseElement):
3516         * testing/Internals.cpp:
3517         (WebCore::Internals::shadowRootType):
3518
3519 2016-10-27  Chris Dumez  <cdumez@apple.com>
3520
3521         Element parameter to CanvasRenderingContext2D.drawFocusIfNeeded() should not be nullable
3522         https://bugs.webkit.org/show_bug.cgi?id=164062
3523
3524         Reviewed by Darin Adler.
3525
3526         Element parameter to CanvasRenderingContext2D.drawFocusIfNeeded() should not be nullable:
3527         - https://html.spec.whatwg.org/#canvasuserinterface
3528
3529         Firefox and Chrome agree with the specification.
3530
3531         Test: fast/canvas/draw-focus-if-needed-null-element.html
3532
3533         * html/canvas/CanvasRenderingContext2D.cpp:
3534         (WebCore::CanvasRenderingContext2D::drawFocusIfNeeded):
3535         (WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):
3536         * html/canvas/CanvasRenderingContext2D.h:
3537         * html/canvas/CanvasRenderingContext2D.idl:
3538
3539 2016-10-27  Yusuke Suzuki  <utatane.tea@gmail.com>
3540
3541         [DOMJIT][CSSJIT] Share code with DOMJIT
3542         https://bugs.webkit.org/show_bug.cgi?id=164006
3543
3544         Reviewed by Mark Lam.
3545
3546         Move CSSJIT's getDocument function to DOMJIT and share it with DOMJIT.
3547         And rename it to "loadDocument", it is closer name to the JSC's convention.
3548
3549         No behavior change.
3550
3551         * cssjit/SelectorCompiler.cpp:
3552         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSpecialFailureInQuirksModeForActiveAndHoverIfNeeded):
3553         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
3554         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasTagName):
3555         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsRoot):
3556         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsScopeRoot):
3557         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsTarget):
3558         (WebCore::SelectorCompiler::getDocument): Deleted.
3559         * domjit/DOMJITHelpers.h:
3560         (WebCore::DOMJIT::loadDocument):
3561         * domjit/JSNodeDOMJIT.cpp:
3562         (WebCore::NodeOwnerDocumentDOMJIT::callDOM):
3563
3564 2016-10-27  Youenn Fablet  <youenn@apple.com>
3565
3566         REGRESSION(r207753-207755): ASSERTION FAILED: m_parsedStyleSheetCache->isInMemoryCache()
3567         https://bugs.webkit.org/show_bug.cgi?id=163905
3568
3569         Reviewed by Antti Koivisto.
3570
3571         Covered by existing tests and http/tests/security/cached-cross-origin-shared-css-stylesheet.html
3572
3573         Small refactoring to do more member fields initialization in StyleSheetContents header.
3574         Refactored StyleSheetContents::m_isInMemoryCache to be a counter instead of a boolean.
3575         This allows StyleSheetContents to be linked to several CachedCSSStyleSheets.
3576
3577         * css/StyleSheetContents.cpp:
3578         (WebCore::StyleSheetContents::StyleSheetContents):
3579         (WebCore::StyleSheetContents::addedToMemoryCache):
3580         (WebCore::StyleSheetContents::removedFromMemoryCache):
3581         * css/StyleSheetContents.h:
3582         * loader/cache/CachedCSSStyleSheet.cpp:
3583         (WebCore::CachedCSSStyleSheet::setBodyDataFrom): Making reuse of saveParsedStyleSheet to handle update of StyleSheetContents cache count.
3584
3585 2016-10-27  Sergio Villar Senin  <svillar@igalia.com>
3586
3587         Unreviewed. Build fix for gcc.
3588
3589         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
3590         (WebCore::MediaPlayerPrivateGStreamerMSE::maxTimeSeekable):
3591
3592 2016-10-27  Youenn Fablet  <youenn@apple.com>
3593
3594         MediaPayload does not need to be refcounted
3595         https://bugs.webkit.org/show_bug.cgi?id=164015
3596
3597         Reviewed by Eric Carlson.
3598
3599         No change of behavior.
3600         Making MediaPayload a struct and no-longer ref-counted.
3601         Small performance improvements in MediaEndpointOwr.
3602
3603         * Modules/mediastream/MediaEndpointPeerConnection.h:
3604         * Modules/mediastream/SDPProcessor.cpp:
3605         (WebCore::configurationFromJSON):
3606         (WebCore::configurationToJSON):
3607         * platform/mediastream/MediaEndpoint.h:
3608         * platform/mediastream/MediaPayload.h:
3609         (WebCore::MediaPayload::addParameter):
3610         (WebCore::MediaPayload::create): Deleted.
3611         (WebCore::MediaPayload::~MediaPayload): Deleted.
3612         (WebCore::MediaPayload::type): Deleted.
3613         (WebCore::MediaPayload::setType): Deleted.
3614         (WebCore::MediaPayload::encodingName): Deleted.
3615         (WebCore::MediaPayload::setEncodingName): Deleted.
3616         (WebCore::MediaPayload::clockRate): Deleted.
3617         (WebCore::MediaPayload::setClockRate): Deleted.
3618         (WebCore::MediaPayload::channels): Deleted.
3619         (WebCore::MediaPayload::setChannels): Deleted.
3620         (WebCore::MediaPayload::ccmfir): Deleted.
3621         (WebCore::MediaPayload::setCcmfir): Deleted.
3622         (WebCore::MediaPayload::nackpli): Deleted.
3623         (WebCore::MediaPayload::setNackpli): Deleted.
3624         (WebCore::MediaPayload::nack): Deleted.
3625         (WebCore::MediaPayload::setNack): Deleted.
3626         (WebCore::MediaPayload::parameters): Deleted.
3627         (WebCore::MediaPayload::clone): Deleted.
3628         (WebCore::MediaPayload::MediaPayload): Deleted.
3629         * platform/mediastream/PeerMediaDescription.h:
3630         (WebCore::PeerMediaDescription::payloads):
3631         (WebCore::PeerMediaDescription::addPayload):
3632         (WebCore::PeerMediaDescription::setPayloads):
3633         (WebCore::PeerMediaDescription::clone):
3634         * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
3635         (WebCore::MediaEndpointOwr::getDefaultAudioPayloads):
3636         (WebCore::MediaEndpointOwr::getDefaultVideoPayloads):
3637         (WebCore::MediaEndpointOwr::filterPayloads):
3638         * platform/mock/MockMediaEndpoint.cpp:
3639         (WebCore::MockMediaEndpoint::getDefaultAudioPayloads):
3640         (WebCore::MockMediaEndpoint::getDefaultVideoPayloads):
3641         (WebCore::MockMediaEndpoint::filterPayloads):
3642
3643 2016-10-26  Dan Bernstein  <mitz@apple.com>
3644
3645         Improved the last build fix.
3646
3647         Darin pointed out I could have kept the function inline and just removed the WEBCORE_EXPORT.
3648
3649         * Modules/mediastream/UserMediaRequest.cpp:
3650         (WebCore::UserMediaRequest::document): Deleted.
3651         * Modules/mediastream/UserMediaRequest.h:
3652         (WebCore::UserMediaRequest::document):
3653
3654 2016-10-26  Chris Dumez  <cdumez@apple.com>
3655
3656         [Web IDL] Add support for having string enumerations in their own IDL file
3657         https://bugs.webkit.org/show_bug.cgi?id=164025
3658
3659         Reviewed by Darin Adler.
3660
3661         Add support for having string enumerations in their own IDL file to facilitate
3662         sharing them. Use this new support to implement IDBTransactionMode enumeration
3663         for IndexedDB:
3664         - https://www.w3.org/TR/IndexedDB/#idl-def-IDBTransactionMode
3665
3666         No new tests, rebaselined existing tests.
3667
3668         * CMakeLists.txt:
3669         * DerivedSources.cpp:
3670         * DerivedSources.make:
3671         * Modules/indexeddb/IDBDatabase.cpp:
3672         (WebCore::IDBDatabase::transaction):
3673         (WebCore::IDBDatabase::startVersionChangeTransaction):
3674         * Modules/indexeddb/IDBDatabase.h:
3675         * Modules/indexeddb/IDBDatabase.idl:
3676         * Modules/indexeddb/IDBOpenDBRequest.cpp:
3677         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
3678         * Modules/indexeddb/IDBTransaction.cpp:
3679         (WebCore::IDBTransaction::IDBTransaction):
3680         * Modules/indexeddb/IDBTransaction.h:
3681         (WebCore::IDBTransaction::mode):
3682         (WebCore::IDBTransaction::isVersionChange):
3683         (WebCore::IDBTransaction::isReadOnly):
3684         * Modules/indexeddb/IDBTransaction.idl:
3685         * Modules/indexeddb/IDBTransactionMode.h: Added.
3686         * Modules/indexeddb/IDBTransactionMode.idl: Copied from Source/WebCore/Modules/indexeddb/IDBTransaction.idl.
3687         * Modules/indexeddb/IndexedDB.h:
3688         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
3689         (WebCore::IDBServer::MemoryBackingStoreTransaction::MemoryBackingStoreTransaction):
3690         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreRenamed):
3691         (WebCore::IDBServer::MemoryBackingStoreTransaction::indexRenamed):
3692         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
3693         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
3694         (WebCore::IDBServer::MemoryBackingStoreTransaction::isVersionChange):
3695         (WebCore::IDBServer::MemoryBackingStoreTransaction::isWriting):
3696         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
3697         (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
3698         (WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
3699         (WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
3700         (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
3701         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
3702         (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
3703         (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
3704         (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
3705         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
3706         (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
3707         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord):
3708         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
3709         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
3710         (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
3711         (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
3712         (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
3713         * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
3714         (WebCore::IDBServer::SQLiteIDBTransaction::begin):
3715         * Modules/indexeddb/server/SQLiteIDBTransaction.h:
3716         (WebCore::IDBServer::SQLiteIDBTransaction::mode):
3717         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3718         (WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction):
3719         (WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction):
3720         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
3721         (WebCore::IDBServer::UniqueIDBDatabaseConnection::establishTransaction):
3722         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
3723         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::UniqueIDBDatabaseTransaction):
3724         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::originalDatabaseInfo):
3725         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::isVersionChange):
3726         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::isReadOnly):
3727         * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
3728         (WebCore::IDBTransactionInfo::clientTransaction):
3729         (WebCore::IDBTransactionInfo::versionChange):
3730         (WebCore::IDBTransactionInfo::loggingString):
3731         * Modules/indexeddb/shared/IDBTransactionInfo.h:
3732         (WebCore::IDBTransactionInfo::mode):
3733         * WebCore.xcodeproj/project.pbxproj:
3734         * bindings/scripts/CodeGenerator.pm:
3735         (ProcessDocument):
3736         (IsEnumType):
3737         (GetEnumByName):
3738         (IsExternalEnumType):
3739         (ValidEnumValues):
3740         * bindings/scripts/CodeGeneratorJS.pm:
3741         (GenerateEnumeration):
3742         (AddToImplIncludesForIDLType):
3743         (GetEnumerationClassName):
3744         (GenerateEnumerationHeader):
3745         (GenerateEnumerationImplementation):
3746         (GenerateEnumerationImplementationContent):
3747         (GenerateEnumerationsImplementationContent):
3748         (GenerateEnumerationHeaderContent):
3749         (GenerateEnumerationsHeaderContent):
3750         * bindings/scripts/test/JS/JSTestObj.cpp:
3751         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArgCaller):
3752         (WebCore::jsTestObjPrototypeFunctionMethodWithStandaloneEnumArg):
3753         (WebCore::jsTestObjPrototypeFunctionMethodWithStandaloneEnumArgCaller):
3754         * bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp: Added.
3755         (WebCore::convertEnumerationToJS):
3756         (WebCore::parseEnumeration<TestStandaloneEnumeration>):
3757         (WebCore::convertEnumeration<TestStandaloneEnumeration>):
3758         (WebCore::expectedEnumerationValues<TestStandaloneEnumeration>):
3759         * bindings/scripts/test/JS/JSTestStandaloneEnumeration.h: Added.
3760         * bindings/scripts/test/TestObj.idl:
3761         * bindings/scripts/test/TestStandaloneEnumeration.idl: Copied from Source/WebCore/Modules/indexeddb/IDBTransaction.idl.
3762         * inspector/InspectorIndexedDBAgent.cpp:
3763
3764 2016-10-26  Dan Bernstein  <mitz@apple.com>
3765
3766         Fixed the WebKit2 build.
3767
3768         * Modules/mediastream/UserMediaRequest.cpp:
3769         (WebCore::UserMediaRequest::document): Moved the definition of this function to here from…
3770         * Modules/mediastream/UserMediaRequest.h:
3771         (WebCore::UserMediaRequest::document): …here, so that the WebKit2 build doesn’t encounter an
3772           exported inline function.
3773
3774 2016-10-26  Yusuke Suzuki  <utatane.tea@gmail.com>
3775
3776         [DOMJIT] Implement Node::ownerDocument
3777         https://bugs.webkit.org/show_bug.cgi?id=164004
3778
3779         Reviewed by Darin Adler.
3780
3781         Test: js/dom/domjit-accessor-owner-document.html
3782
3783         Implement Node.ownerDocument DOMJIT accessor.
3784         According to the result of the profiler, jQuery's prop()
3785         function is frequently called in Ember.js SpeedoMeter.
3786         And this function calls jQuery.isXMLDoc(). And this isXMLDoc()
3787         function calls element.ownerDocument accessor. And our WebKit
3788         inspector also uses ownerDocument accessor frequently.
3789
3790         Interesting thing is this ownerDocument functionality is used
3791         in CSSJIT, so CSSJIT has similar helper function to look up the
3792         owner document of the element. As a result, all the necessary
3793         functionality is already implemented, DOMJIT just utilizes it.
3794         For example, Node::treeScopeMemoryOffset() and
3795         TreeScope::documentScopeMemoryOffset() is implemented before this
3796         patch.
3797
3798         In the future, we will convert CSSJIT's Assembler& to CCallHelpers&
3799         and share the code with DOMJIT[1].
3800
3801         [1]: https://bugs.webkit.org/show_bug.cgi?id=164006
3802
3803         * dom/Node.idl:
3804         * domjit/DOMJITAbstractHeapRepository.h:
3805         * domjit/JSNodeDOMJIT.cpp:
3806         (WebCore::NodeOwnerDocumentDOMJIT::checkDOM):
3807         (WebCore::NodeOwnerDocumentDOMJIT::callDOM):
3808
3809 2016-10-26  Chris Dumez  <cdumez@apple.com>
3810
3811         Replace IDBKeyPath with a WTF::Variant
3812         https://bugs.webkit.org/show_bug.cgi?id=163909
3813
3814         Reviewed by Darin Adler.
3815
3816         Replace IDBKeyPath class with the IDBKeyPathVariant type entirely
3817         and rename IDBKeyPathVariant to IDBKeyPath.
3818
3819         Unfortunately, IDBKeyPath still needs some special handling when
3820         returned to the JavaScript because we do not have a toJS() accepting
3821         a WTF::Variant as input yet.
3822
3823         There should be no significant behavior change except that
3824         IDBIndex.keyPath / IDBObjectStore.keyPath now returns an array of
3825         Strings instead of a DOMStringList object when the IDBKeyPath
3826         contains a vector. This is a progression and matches the
3827         specification:
3828         - https://www.w3.org/TR/IndexedDB/#widl-IDBIndex-keyPath
3829         - https://www.w3.org/TR/IndexedDB/#widl-IDBObjectStore-keyPath
3830
3831         No new tests, rebaselined existing tests.
3832
3833         * Modules/indexeddb/IDBCursor.cpp:
3834         (WebCore::IDBCursor::update):
3835         * Modules/indexeddb/IDBDatabase.h:
3836         * Modules/indexeddb/IDBGetResult.cpp:
3837         (WebCore::IDBGetResult::isolatedCopy):
3838         * Modules/indexeddb/IDBKeyPath.cpp:
3839         (WebCore::isIDBKeyPathValid):
3840         (WebCore::IDBKeyPathIsolatedCopy):
3841         * Modules/indexeddb/IDBKeyPath.h:
3842         (WebCore::IDBKeyPathIsolatedCopy):
3843         * Modules/indexeddb/IDBObjectStore.cpp:
3844         (WebCore::IDBObjectStore::keyPath):
3845         (WebCore::IDBObjectStore::putOrAdd):
3846         (WebCore::IDBObjectStore::createIndex):
3847         * Modules/indexeddb/IDBObjectStore.h:
3848         * Modules/indexeddb/server/IDBSerialization.cpp:
3849         (WebCore::serializeIDBKeyPath):
3850         (WebCore::deserializeIDBKeyPath):
3851         * Modules/indexeddb/server/IDBSerialization.h:
3852         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
3853         (WebCore::IDBServer::SQLiteIDBBackingStore::extractExistingDatabaseInfo):
3854         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3855         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
3856         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
3857         (WebCore::IDBDatabaseInfo::createNewObjectStore):
3858         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
3859         * Modules/indexeddb/shared/IDBIndexInfo.cpp:
3860         (WebCore::IDBIndexInfo::IDBIndexInfo):
3861         (WebCore::IDBIndexInfo::isolatedCopy):
3862         * Modules/indexeddb/shared/IDBIndexInfo.h:
3863         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
3864         (WebCore::IDBObjectStoreInfo::IDBObjectStoreInfo):
3865         (WebCore::IDBObjectStoreInfo::createNewIndex):
3866         (WebCore::IDBObjectStoreInfo::isolatedCopy):
3867         * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
3868         (WebCore::IDBObjectStoreInfo::keyPath):
3869         * bindings/js/IDBBindingUtilities.cpp:
3870         (WebCore::injectIDBKeyIntoScriptValue):
3871         (WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath):
3872         (WebCore::canInjectIDBKeyIntoScriptValue):
3873         (WebCore::createKeyPathArray):
3874         (WebCore::toJS):
3875         * bindings/js/IDBBindingUtilities.h:
3876         * inspector/InspectorIndexedDBAgent.cpp:
3877
3878 2016-10-26  Zalan Bujtas  <zalan@apple.com>
3879
3880         Ignore out-of-flow siblings when searching for a spanner candidate.
3881         https://bugs.webkit.org/show_bug.cgi?id=164042.
3882         <rdar://problem/28758456>
3883
3884         Reviewed by Simon Fraser.
3885
3886         While searching for the spanner candidates in a flow thread, we have to take into account
3887         whether renderers are in- or out-of-flow.
3888         What it means is that while traversing the renderer tree to find the the candidate
3889         renderer (next sibling/ancestor's next child in pre-order traversal), we have to check if the candidate
3890         is in the same layout context too.
3891
3892         Test: fast/multicol/crash-when-spanner-candidate-is-out-of-flow.html
3893
3894         * rendering/RenderMultiColumnFlowThread.cpp:
3895         (WebCore::spannerPlacehoderCandidate):
3896         (WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant):
3897
3898 2016-10-26  Brian Burg  <bburg@apple.com>
3899
3900         Web Inspector: remove unused bool return value from FrontendChannel::sendMessageToFrontend
3901         https://bugs.webkit.org/show_bug.cgi?id=164046
3902
3903         Reviewed by Joseph Pecoraro.
3904
3905         * inspector/InspectorClient.cpp:
3906         (WebCore::InspectorClient::doDispatchMessageOnFrontendPage):
3907         * inspector/InspectorClient.h:
3908         * testing/Internals.cpp:
3909         (WebCore::InspectorStubFrontend::sendMessageToFrontend):
3910
3911 2016-10-26  Chris Dumez  <cdumez@apple.com>
3912
3913         The URLSearchParams constructor should take a union in parameter
3914         https://bugs.webkit.org/show_bug.cgi?id=163906
3915
3916         Reviewed by Darin Adler.
3917
3918         The URLSearchParams constructor should take a union in parameter:
3919         - https://url.spec.whatwg.org/#urlsearchparams
3920
3921         No new tests, no web-exposed behavior change.
3922
3923         * html/URLSearchParams.h:
3924         (WebCore::URLSearchParams::create):
3925         * html/URLSearchParams.idl:
3926
3927 2016-10-26  Sam Weinig  <sam@webkit.org>
3928