CSSStyleDeclaration should be annotated with CEReactions
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-10-31  Ryosuke Niwa  <rniwa@webkit.org>
2
3         CSSStyleDeclaration should be annotated with CEReactions
4         https://bugs.webkit.org/show_bug.cgi?id=163968
5
6         Reviewed by Antti Koivisto.
7
8         Added CEReactions to CSSStyleDeclaration.idl.
9
10         Test: fast/custom-elements/reactions/CSSStyleDeclaration.html
11
12         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
13         (WebCore::JSCSSStyleDeclaration::putDelegate):
14         * css/CSSStyleDeclaration.idl:
15         * css/PropertySetCSSStyleDeclaration.cpp:
16         (WebCore::StyleAttributeMutationScope::StyleAttributeMutationScope): Remember the old value when this is
17         an inline style declaration for a custom element. Also store m_oldValue and m_customElement instead of
18         a mutation record so that we don't create a superfluous mutation record for custom elements.
19         (WebCore::StyleAttributeMutationScope::~StyleAttributeMutationScope): Enqueue attributeChangedCallback
20         when m_customElement is not null.
21         * dom/CustomElementReactionQueue.cpp:
22         (WebCore::CustomElementReactionQueue::observesStyleAttribute):
23         * dom/CustomElementReactionQueue.h:
24
25 2016-10-31  Jer Noble  <jer.noble@apple.com>
26
27         Unreviewed build fix for the build fix; AVStreamDataParser not defined on iOS.
28
29         * platform/spi/mac/AVFoundationSPI.h:
30
31 2016-10-31  Zalan Bujtas  <zalan@apple.com>
32
33         LayoutTests/fast/frames/invalid-frameset.html is not clean by the end of FrameView::layout().
34         https://bugs.webkit.org/show_bug.cgi?id=164230
35
36         Reviewed by Simon Fraser.
37
38         When a <frameset> has invalid children, in addition to clear the needs layout flag on the children
39         we also need to do clear the descendants too.
40
41         Covered by LayoutTests/fast/frames/invalid-frameset.html.
42
43         * rendering/RenderFrameSet.cpp:
44         (WebCore::RenderFrameSet::positionFrames):
45
46 2016-10-31  Jer Noble  <jer.noble@apple.com>
47
48         Unreviewed build fix after r208151; outputMIMECodecParameterForInputMIMECodecParameter not
49         defined pre-Sierra.
50
51         * platform/spi/mac/AVFoundationSPI.h:
52
53 2016-10-31  Zalan Bujtas  <zalan@apple.com>
54
55         ASSERTION FAILED: !m_trailingWhitespaceWidth in WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace
56         https://bugs.webkit.org/show_bug.cgi?id=164076
57
58         Reviewed by Antti Koivisto.
59
60         FontCascade's text measure methods return NaN for zero sized fonts. We could actually early return and not
61         measure text with zero font size at all.
62
63         Test: fast/text/simple-line-layout-with-zero-sized-font.html
64
65         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
66         (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
67         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
68
69 2016-10-31  Dave Hyatt  <hyatt@apple.com>
70
71         [CSS Parser] Support -webkit-named-image
72         https://bugs.webkit.org/show_bug.cgi?id=164235
73
74         Reviewed by Dean Jackson.
75
76         * css/CSSValueKeywords.in:
77         * css/parser/CSSPropertyParserHelpers.cpp:
78         (WebCore::CSSPropertyParserHelpers::consumeWebkitNamedImage):
79         (WebCore::CSSPropertyParserHelpers::consumeGeneratedImage):
80         (WebCore::CSSPropertyParserHelpers::isGeneratedImage):
81
82 2016-10-28  Brent Fulgham  <bfulgham@apple.com>
83
84         Do a better job of protecting Frame objects in the context of JavaScript calls
85         https://bugs.webkit.org/show_bug.cgi?id=164163
86         <rdar://problem/28955249>
87
88         Reviewed by Darin Adler.
89
90         * editing/AlternativeTextController.cpp:
91         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection): Protected the Frame.
92         * editing/Editor.cpp:
93         (WebCore::Editor::setTextAsChildOfElement): Ditto.
94         * editing/EditorCommand.cpp:
95         (WebCore::executeSwapWithMark): Ditto.
96         * editing/TypingCommand.cpp:
97         (WebCore::TypingCommand::deleteKeyPressed): Ditto.
98         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
99         * editing/mac/EditorMac.mm:
100         (WebCore::Editor::replaceNodeFromPasteboard): Ditto.
101         * page/ContextMenuController.cpp:
102         (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
103         * page/DOMSelection.cpp:
104         (WebCore::DOMSelection::collapse): Ditto.
105         (WebCore::DOMSelection::collapseToEnd): Ditto.
106         (WebCore::DOMSelection::collapseToStart): Ditto.
107         (WebCore::DOMSelection::setBaseAndExtent): Ditto.
108         (WebCore::DOMSelection::setPosition): Ditto.
109         (WebCore::DOMSelection::modify): Ditto.
110         (WebCore::DOMSelection::extend): Ditto.
111         (WebCore::DOMSelection::addRange): Ditto.
112         (WebCore::DOMSelection::deleteFromDocument): Ditto.
113         * page/DragController.cpp:
114         (WebCore::setSelectionToDragCaret): Ditto.
115         (WebCore::DragController::startDrag): Ditto.
116         * page/Frame.cpp:
117         (WebCore::Frame::checkOverflowScroll): Ditto.
118         * page/TextIndicator.cpp:
119         (WebCore::TextIndicator::createWithRange): Ditto.
120
121 2016-10-31  Dave Hyatt  <hyatt@apple.com>
122
123         [CSS Parser] Make sure to fail on :role(a,b) and :dir(a,b)
124         https://bugs.webkit.org/show_bug.cgi?id=164233
125
126         Reviewed by Dean Jackson.
127
128         * css/parser/CSSSelectorParser.cpp:
129         (WebCore::CSSSelectorParser::consumePseudo):
130
131 2016-10-31  Dave Hyatt  <hyatt@apple.com>
132
133         [CSS Parser] Allow unitless values on background-size in quirks mode
134         https://bugs.webkit.org/show_bug.cgi?id=164232
135
136         Reviewed by Dean Jackson.
137
138         * css/parser/CSSPropertyParser.cpp:
139         (WebCore::consumeBackgroundSize):
140
141 2016-10-31  Jer Noble  <jer.noble@apple.com>
142
143         Unreviewed build fix after r208151; _setPreventsSleepDuringVideoPlayback: only defined in non-simulator SDKs.
144
145         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
146         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
147         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep):
148         * platform/spi/mac/AVFoundationSPI.h:
149
150 2016-10-31  Nan Wang  <n_wang@apple.com>
151
152         AX: iOS Voiceover does not announce previously selected value from input type="date" form field
153         https://bugs.webkit.org/show_bug.cgi?id=164176
154
155         Reviewed by Chris Fleizach.
156
157         Input type date is a popup button on iOS and its value was not exposed in stringValue() since
158         it's not considered a text control. Instead, the value was exposed in AXTitle. Fixed this by adding
159         the case in stringValue() and removing the AXTitle exposure.
160
161         Changes are covered in modified test.
162
163         * accessibility/AccessibilityObject.h:
164         * accessibility/AccessibilityRenderObject.cpp:
165         (WebCore::AccessibilityRenderObject::stringValue):
166         * accessibility/ios/AccessibilityObjectIOS.mm:
167         (WebCore::AccessibilityObject::isInputTypePopupButton):
168         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
169         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
170
171 2016-10-31  Simon Fraser  <simon.fraser@apple.com>
172
173         Add requestIdleCallback to features.json.
174
175         * features.json:
176
177 2016-10-31  Dave Hyatt  <hyatt@apple.com>
178
179         [CSS Parser] Fully support prefixed background-size and box-shadows
180         https://bugs.webkit.org/show_bug.cgi?id=164228
181
182         Reviewed by Zalan Bujtas.
183
184         * css/parser/CSSPropertyParser.cpp:
185         (WebCore::CSSPropertyParser::parseSingleValue):
186
187 2016-10-31  Dave Hyatt  <hyatt@apple.com>
188
189         [CSS Parser] Get rid of CSSCustomIdentValue::creates
190         https://bugs.webkit.org/show_bug.cgi?id=164225
191
192         Reviewed by Zalan Bujtas.
193
194         Get rid of all instances of CSSCustomIdent::create, since our style
195         resolution code isn't prepared to handle that value type yet.
196
197         * css/parser/CSSPropertyParser.cpp:
198         (WebCore::consumeAnimationName):
199         (WebCore::consumeTransitionProperty):
200         (WebCore::consumeAttr):
201
202 2016-10-31  Jer Noble  <jer.noble@apple.com>
203
204         Opt-out of AVPlayer automatic sleep disabling
205         https://bugs.webkit.org/show_bug.cgi?id=163983
206
207         Reviewed by Eric Carlson.
208
209         In addition to the DisplaySleepDisabler, notify the MediaPlayerPrivateAVFoundationObjC object whether
210         it should disable display sleep.  Provide all the necessary boilerplate to allow the media player private
211         to query the HTMLMediaPlayer so that the correct value can be set on AVPlayer upon creation.
212
213         * html/HTMLMediaElement.cpp:
214         (WebCore::HTMLMediaElement::updateSleepDisabling):
215         * html/HTMLMediaElement.h:
216         * platform/graphics/MediaPlayer.cpp:
217         (WebCore::MediaPlayer::setShouldDisableSleep):
218         (WebCore::MediaPlayer::shouldDisableSleep):
219         * platform/graphics/MediaPlayer.h:
220         (WebCore::MediaPlayerClient::mediaPlayerShouldDisableSleep):
221         * platform/graphics/MediaPlayerPrivate.h:
222         (WebCore::MediaPlayerPrivateInterface::setShouldDisableSleep):
223         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
224         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
225         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
226         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep):
227
228         Drive-by fix: Re-organize the contents of AVFoundationSPI.h so that there's a single top-level
229         #if USE(APPLE_INTERNAL_SDK) statement, rather than that conditional being sprinkled about the
230         file.
231
232         * platform/spi/mac/AVFoundationSPI.h:
233
234 2016-10-31  Jer Noble  <jer.noble@apple.com>
235
236         REGRESSION (r206300): LayoutTest media/media-source/media-source-duplicate-seeked.html timing out
237         https://bugs.webkit.org/show_bug.cgi?id=162496
238
239         Reviewed by Darin Adler.
240
241         The change to MockMediaSourcePrivate in r206300 revealed a true bug: seeks to the MediaSource's duration
242         will always fail. We should discard out of hand seeks which are greater than the duration, but allow seeks
243         directly to the duration.
244
245         * Modules/mediasource/MediaSource.cpp:
246         (WebCore::MediaSource::hasBufferedTime):
247
248 2016-10-31  Jer Noble  <jer.noble@apple.com>
249
250         Allow multiple playing videos on a page with 'autoplay' and 'playsinline' attributes
251         https://bugs.webkit.org/show_bug.cgi?id=162366
252         <rdar://problem/28639600>
253
254         Reviewed by Eric Carlson.
255
256         Tests: media/video-concurrent-visible-playback.html
257                media/video-multiple-concurrent-playback.html
258
259         Separate out the concept of "video-only" from "video-with-audio" in PlatformMediaSession::MediaType,
260         and only set the ConcurrentPlaybackNotPermitted restriction for "video-with-audio".  This allows multiple
261         silent video elements to play back simultaneously.
262
263         However, the bug in question also shows bad behavior when both concurrent playback and invisible playback
264         are not allowed. Namely, an invisible element will attempt to autoplay, interrupt visible elements, and
265         then fail to play due to it's non-visibility.  Add an extra check to canTransitionFromAutoplayToPlay()
266         which asks the session if autoplay is allowed (which will return false if the element is not visible).
267
268         * html/HTMLMediaElement.cpp:
269         (WebCore::HTMLMediaElement::canTransitionFromAutoplayToPlay):
270         (WebCore::HTMLMediaElement::mediaType):
271         (WebCore::HTMLMediaElement::presentationType):
272         (WebCore::HTMLMediaElement::updateShouldAutoplay):
273         (WebCore::mediaElementIsAllowedToAutoplay): Deleted.
274         * html/MediaElementSession.cpp:
275         (WebCore::MediaElementSession::autoplayPermitted):
276         * html/MediaElementSession.h:
277         * platform/audio/PlatformMediaSession.h:
278         * platform/audio/ios/MediaSessionManagerIOS.mm:
279         (WebCore::MediaSessionManageriOS::resetRestrictions):
280         * testing/Internals.cpp:
281         (WebCore::Internals::setMediaSessionRestrictions):
282
283 2016-10-31  Dave Hyatt  <hyatt@apple.com>
284
285         [CSS Parser] Support unprefixed cross-fade
286         https://bugs.webkit.org/show_bug.cgi?id=164224
287
288         Reviewed by Zalan Bujtas.
289
290         * css/CSSValueKeywords.in:
291         * css/parser/CSSPropertyParserHelpers.cpp:
292         (WebCore::CSSPropertyParserHelpers::consumeCrossFade):
293         (WebCore::CSSPropertyParserHelpers::consumeGeneratedImage):
294
295 2016-10-31  Dave Hyatt  <hyatt@apple.com>
296
297         [CSS Parser] Simplify background-position-x/y style mapping
298         https://bugs.webkit.org/show_bug.cgi?id=164223
299
300         Reviewed by Zalan Bujtas.
301
302         * css/CSSToStyleMap.cpp:
303         (WebCore::CSSToStyleMap::mapFillXPosition):
304         (WebCore::CSSToStyleMap::mapFillYPosition):
305         * css/StyleBuilderConverter.h:
306         (WebCore::StyleBuilderConverter::convertFontSynthesis):
307
308 2016-10-31  Darin Adler  <darin@apple.com>
309
310         Move ChildNode and ParentNode from ExceptionCode to Exception, add support for ExceptionOr<T&>
311         https://bugs.webkit.org/show_bug.cgi?id=164214
312
313         Reviewed by Alex Christensen.
314
315         * Modules/fetch/FetchRequest.cpp:
316         (WebCore::FetchRequest::initializeOptions): Use FetchHeaders& instead of
317         Ref<FetchHeaders> for return value.
318         (WebCore::FetchRequest::initializeWith): Ditto.
319         * Modules/fetch/FetchRequest.h: Updated for above.
320
321         * Modules/mediasource/MediaSource.cpp:
322         (WebCore::MediaSource::addSourceBuffer): Use SourceBuffer& instead of
323         SourceBuffer* for return value.
324         * Modules/mediasource/MediaSource.h: Updated for above.
325
326         * bindings/js/JSDOMBinding.h: Added overloads of checkSecurityForNode so
327         it works with a function returning a reference.
328
329         * css/CSSPrimitiveValue.cpp:
330         (WebCore::CSSPrimitiveValue::getCounterValue): Use Counter& instead of
331         Counter* for return value.
332         (WebCore::CSSPrimitiveValue::getRectValue): Use Rect& instead of
333         Rect* for return value.
334         * css/CSSPrimitiveValue.h: Updated for above.
335
336         * dom/ChildNode.idl: Use non-legacy exceptions.
337
338         * dom/ContainerNode.cpp:
339         (WebCore::ContainerNode::querySelector): Use ExceptionOr.
340         (WebCore::ContainerNode::querySelectorAll): Ditto.
341         (WebCore::ContainerNode::append): Ditto.
342         (WebCore::ContainerNode::prepend): Ditto.
343         * dom/ContainerNode.h: Updated for above.
344
345         * dom/Document.cpp:
346         (WebCore::Document::selectorQueryForString): Use ExceptionOr.
347         * dom/Document.h: Updated for above.
348
349         * dom/Element.cpp:
350         (WebCore::Element::attachShadow): Return ShadowRoot& instead of
351         Ref<ShadowRoot> since the shadow root is owned by the element, not
352         the caller.
353         (WebCore::Element::matches): Updated for change to make the
354         selectorQueryForString function use ExceptionOr.
355         (WebCore::Element::closest): Ditto.
356         (WebCore::contextNodeForInsertion): Return ContainerNode& instead of
357         ContainerNode*.
358         (WebCore::contextElementForInsertion): Updated for above.
359         * dom/Element.h: Updated for above.
360         * dom/Element.idl: Changed return type for closest and for
361         insertAdjacentElement to be nullable since both can return null.
362
363         * dom/ExceptionOr.h: Added a specialization for ExceptionOr<T&>.
364
365         * dom/Node.cpp:
366         (WebCore::Node::convertNodesOrStringsIntoNode): Use ExceptionOr.
367         (WebCore::Node::before): Ditto.
368         (WebCore::Node::after): Ditto.
369         (WebCore::Node::replaceWith): Ditto.
370         * dom/Node.h: Updated for above changes.
371
372         * dom/ParentNode.idl: Use non-legacy exceptions.
373
374         * dom/SelectorQuery.cpp:
375         (WebCore::SelectorDataList::queryAll): Changed return type to Ref.
376         (WebCore::SelectorQueryCache::add): Use ExceptionOr.
377         * dom/SelectorQuery.h: Updated for above changes.
378
379         * html/HTMLFrameOwnerElement.cpp:
380         (WebCore::HTMLFrameOwnerElement::getSVGDocument): Return
381         Document& instead of Document*.
382         * html/HTMLFrameOwnerElement.h: Updated for above change.
383
384         * html/HTMLMediaElement.cpp:
385         (WebCore::HTMLMediaElement::addTextTrack): Return TextTrack&
386         instead of Ref<TextTrack>.
387         * html/HTMLMediaElement.h: Updated for above.
388
389         * html/HTMLPlugInImageElement.cpp:
390         (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay):
391         Updated for new exceptions.
392         * inspector/InspectorDOMAgent.cpp:
393         (WebCore::InspectorDOMAgent::querySelector): Ditto.
394         (WebCore::InspectorDOMAgent::querySelectorAll): Ditto.
395         (WebCore::InspectorDOMAgent::performSearch): Ditto.
396         (WebCore::InspectorDOMAgent::highlightSelector): Ditto.
397
398         * inspector/InspectorNodeFinder.cpp:
399         (WebCore::InspectorNodeFinder::performSearch): Put a null check
400         here so callers don't have to do it. Pass references to the
401         individual functions since the pointer can't be null.
402         (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
403         Updated to use reference and streamlined code a bit, using
404         containsIgnoringASCIICase instead of findIgnoringCase.
405         (WebCore::InspectorNodeFinder::matchesAttribute): Ditto.
406         (WebCore::InspectorNodeFinder::matchesElement): Ditto.
407         (WebCore::InspectorNodeFinder::searchUsingXPath): Ditto.
408         (WebCore::InspectorNodeFinder::searchUsingCSSSelectors): Ditto.
409         Also updated  for new exceptions in querySelectorAll.
410         * inspector/InspectorNodeFinder.h: Updated for above.
411
412         * page/Crypto.cpp:
413         (WebCore::Crypto::webkitSubtle): Return WebKitSubtleCrypto&
414         insetad of WebKitSubtleCrypto*.
415         * page/Crypto.h: Updated for above.
416
417         * testing/Internals.h: Removed declarations for functions already
418         removed: ensureShadowRoot and createShadowRoot.
419
420 2016-10-31  Darin Adler  <darin@apple.com>
421
422         Convert Document from ExceptionCode to Exception
423         https://bugs.webkit.org/show_bug.cgi?id=164212
424
425         Reviewed by Alex Christensen.
426
427         * Modules/websockets/WebSocketChannel.cpp:
428         (WebCore::WebSocketChannel::processBuffer): Removed IGNORE_EXCEPTION.
429
430         * dom/ContainerNode.cpp:
431         (WebCore::ContainerNode::takeAllChildrenFrom): Use releaseReturnValue
432         instead of ASSERT_NO_EXCEPTION.
433         (WebCore::ContainerNode::parserInsertBefore): Removed ASSERT_NO_EXCEPTION.
434         (WebCore::ContainerNode::parserAppendChild): Ditto.
435
436         * dom/DOMImplementation.cpp:
437         (WebCore::DOMImplementation::createDocumentType): Updated for new
438         exception handling.
439         (WebCore::DOMImplementation::createDocument): Ditto.
440
441         * dom/Document.cpp:
442         (WebCore::createHTMLElementWithNameValidation): Return ExceptionOr.
443         (WebCore::Document::createElementForBindings): Ditto.
444         (WebCore::Document::createCDATASection): Ditto.
445         (WebCore::Document::createProcessingInstruction): Ditto.
446         (WebCore::Document::importNode): Ditto.
447         (WebCore::Document::adoptNode): Ditto.
448         (WebCore::Document::createElementNS): Ditto.
449         (WebCore::Document::setXMLVersion): Ditto.
450         (WebCore::Document::setBodyOrFrameset): Ditto.
451         (WebCore::Document::processHttpEquiv): Ditto.
452         (WebCore::Document::createEvent): Ditto.
453         (WebCore::Document::cookie): Ditto.
454         (WebCore::Document::setCookie): Ditto.
455         (WebCore::Document::setDomain): Ditto.
456         (WebCore::Document::parseQualifiedName): Ditto. Also added an overload
457         that constructs a QualifiedName directly that most call sites can use.
458         (WebCore::Document::createAttribute): Return ExceptionOr.
459         (WebCore::Document::createAttributeNS): Ditto.
460         (WebCore::Document::createTouch): Removed unneeded ExceptionCode&.
461         * dom/Document.h: Updated for above.
462         * dom/Document.idl: Use non-legacy exceptions. Removed exception
463         entirely from createTouch.
464
465         * dom/Element.cpp:
466         (WebCore::Element::parseAttributeName): Updated to use the new
467         Document::parseQualifiedName.
468         * editing/EditorCommand.cpp:
469         (WebCore::executeFormatBlock): Ditto.
470
471         * inspector/InspectorDOMAgent.cpp:
472         (WebCore::InspectorDOMAgent::setNodeName): Updated for the new
473         exception handling.
474         * inspector/InspectorPageAgent.cpp:
475         (WebCore::InspectorPageAgent::getCookies): Ditto.
476
477         * page/ios/FrameIOS.mm:
478         (WebCore::Frame::initWithSimpleHTMLDocument): Use the
479         HTMLHtmlElement::create and HTMLBodyElement::create instead of using
480         createElementNS to make the simple document.
481
482         * svg/animation/SVGSMILElement.cpp:
483         (WebCore::SVGSMILElement::constructAttributeName): Renamed, made this
484         a member function, updated to use the new Document::parseQualifiedName,
485         and also moved the code to get the attribute in here.
486         (WebCore::SVGSMILElement::constructAttributeName): Added. Helper function
487         for the two places we update the attribute name from attributeNameAttr.
488         (WebCore::SVGSMILElement::insertedInto): Use updateAttributeName.
489         (WebCore::SVGSMILElement::svgAttributeChanged): Ditto.
490         * svg/animation/SVGSMILElement.h: Updated for the above.
491
492         * xml/parser/XMLDocumentParserLibxml2.cpp:
493         (WebCore::XMLDocumentParser::processingInstruction): Updated to understand
494         ExceptionOr rather than an out argument.
495         (WebCore::XMLDocumentParser::startDocument): Removed ASSERT_NO_EXCEPTION.
496
497 2016-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
498
499         Holding down a key to choose an accented character should fire "insertReplacementText" input events
500         https://bugs.webkit.org/show_bug.cgi?id=164209
501         <rdar://problem/29019305>
502
503         Reviewed by Darin Adler.
504
505         For TypingCommands that correspond to "insertReplacementText" inputTypes, vend dataTransfers for resulting
506         beforeinput and input events if the edited area is not an input field or textarea. To do this, convert the plain
507         text representation of the content to be inserted to HTML text using a helper function,
508         MarkupAccumulator::appendCharactersReplacingEntities, that is used when creating markup for Text nodes.
509
510         Tests: fast/events/before-input-prevent-insert-replacement.html
511                fast/events/input-event-insert-replacement.html
512
513         * editing/TypingCommand.cpp:
514         (WebCore::TypingCommand::inputEventData):
515         (WebCore::TypingCommand::inputEventDataTransfer):
516         * editing/TypingCommand.h:
517
518 2016-10-30  Dave Hyatt  <hyatt@apple.com>
519
520         [CSS Parser] Miscellaneous bug fixes
521         https://bugs.webkit.org/show_bug.cgi?id=164211
522
523         Reviewed by Darin Adler.
524
525         * css/parser/CSSPropertyParser.cpp:
526         (WebCore::CSSPropertyParser::consumeTransformOrigin):
527         Make sure to properly reject invalid transform-origin-z values.
528
529         * css/parser/CSSSelectorParser.cpp:
530         (WebCore::CSSSelectorParser::consumeAttribute):
531         Make attribute selector parsing strict about requiring a ] to end
532         the selector.
533
534         (WebCore::CSSSelectorParser::consumePseudo):
535         Force the nth-child "of" syntax to have whitespace after "of" but
536         before the selector. It is unclear if this should be a requirement
537         or not (spec is ambiguous), but for now we match the old parser.
538
539         (WebCore::CSSSelectorParser::consumeCombinator):
540         Fix a bug that caused the double child combinator to match even
541         when there was whitespace between the two > symbols.
542
543 2016-10-31  Youenn Fablet  <youenn@apple.com>
544
545         RTCOfferAnswerOptions does not need to be refcounted
546         https://bugs.webkit.org/show_bug.cgi?id=164216
547
548         Reviewed by Darin Adler.
549
550         Covered by existing tests.
551
552         Making RTCOffer/Answer options dictionaries as per specification.
553         Removing code that handles RTCOffer/Answer options dictionary since this is done by the binding generator.
554         Updated users of the options accordingly.
555
556         * CMakeLists.txt:
557         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
558         (WebCore::MediaEndpointPeerConnection::createOffer):
559         (WebCore::MediaEndpointPeerConnection::createOfferTask):
560         (WebCore::MediaEndpointPeerConnection::createAnswer):
561         (WebCore::MediaEndpointPeerConnection::createAnswerTask):
562         * Modules/mediastream/MediaEndpointPeerConnection.h:
563         * Modules/mediastream/PeerConnectionBackend.h:
564         * Modules/mediastream/RTCOfferAnswerOptions.cpp: Removed.
565         * Modules/mediastream/RTCOfferAnswerOptions.h:
566         * Modules/mediastream/RTCPeerConnection.cpp:
567         (WebCore::RTCPeerConnection::queuedCreateOffer):
568         (WebCore::RTCPeerConnection::queuedCreateAnswer):
569         * Modules/mediastream/RTCPeerConnection.h:
570         * Modules/mediastream/RTCPeerConnection.idl:
571         * WebCore.xcodeproj/project.pbxproj:
572
573 2016-10-31  Youenn Fablet  <youenn@apple.com>
574
575         fast/mediastream/RTCPeerConnection-* tests crashing under ASan
576         https://bugs.webkit.org/show_bug.cgi?id=164215
577
578         Reviewed by Philippe Normand.
579
580         Covered by ASAN bot tests.
581
582         * platform/mediastream/SDPProcessorScriptResource.cpp:
583         (WebCore::SDPProcessorScriptResource::scriptString):
584
585 2016-10-28  Philippe Normand  <pnormand@igalia.com>
586
587         [OpenWebRTC] Initialize library one time only
588         https://bugs.webkit.org/show_bug.cgi?id=164118
589
590         Reviewed by Darin Adler.
591
592         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp:
593         (WebCore::initializeOpenWebRTC): Prevent multiple initialisations of the library.
594
595 2016-10-30  Brent Fulgham  <bfulgham@apple.com>
596
597         Unreviewed fix: Correct ChangeLog after my bad merge.
598
599         * ChangeLog
600
601 2016-10-30  Darin Adler  <darin@apple.com>
602
603         Move Element, NamedNodeMap, and DOMStringMap from ExceptionCode to Exception
604         https://bugs.webkit.org/show_bug.cgi?id=164206
605
606         Reviewed by Chris Dumez.
607
608         * bindings/js/JSDOMStringMapCustom.cpp:
609         (WebCore::JSDOMStringMap::getOwnPropertyNames): Use modern for loop, and
610         updates since the names function now returns a vector.
611         (WebCore::JSDOMStringMap::putDelegate): Use propagateException. Also return
612         true any time an exception is raised. Since true tells the caller to return
613         without doing any work, we always want to return that on an exception.
614         * dom/DatasetDOMStringMap.cpp:
615         (WebCore::DatasetDOMStringMap::names): Renamed from getNames and made this
616         return a Vector instead of populating a passed-in vector.
617         (WebCore::DatasetDOMStringMap::setItem): Use ExceptionOr.
618         * dom/DatasetDOMStringMap.h: Updated for above.
619
620         * dom/Document.cpp:
621         (WebCore::Document::adoptNode): Updated to use ExceptionOr for
622         removeAttributeNode. Changed to use remove rather than removeChild for
623         better clarity.
624
625         * dom/Element.cpp:
626         (WebCore::Element::setAttribute): Use ExceptionOr.
627         (WebCore::Element::createShadowRoot): Deleted. Unused.
628         (WebCore::Element::attachShadow): Use ExceptionOr.
629         (WebCore::Element::shadowRootForBindings): Tweaked a bit.
630         (WebCore::Element::userAgentShadowRoot): Removed unneeded if statemment.
631         (WebCore::Element::ensureUserAgentShadowRoot): Tweaked a bit.
632         (WebCore::Element::setAttributeNode): Use ExceptionOr.
633         (WebCore::Element::setAttributeNodeNS): Ditto.
634         (WebCore::Element::removeAttributeNode): Ditto.
635         (WebCore::Element::parseAttributeName): Ditto. Also changed return result
636         to be a QualifiedName instead of using an out argument.
637         (WebCore::Element::setAttributeNS): Ditto.
638         (WebCore::Element::mergeWithNextTextNode): Ditto.
639         (WebCore::Element::setOuterHTML): Ditto.
640         (WebCore::Element::setInnerHTML): Ditto.
641         (WebCore::Element::matches): Ditto.
642         (WebCore::Element::closest): Ditto.
643         (WebCore::Element::insertAdjacent): Ditto.
644         (WebCore::Element::insertAdjacentElement): Ditto.
645         (WebCore::contextNodeForInsertion): Ditto.
646         (WebCore::contextElementForInsertion): Added. Helper for the
647         insertAdjacentHTML function to eliminate a local variable.
648         (WebCore::Element::insertAdjacentHTML): Use ExceptionOr.
649         (WebCore::Element::insertAdjacentText): Ditto.
650         * dom/Element.h: Updated for above.
651         * dom/Element.idl: Use non-legacy exceptions.
652
653         * dom/NamedNodeMap.cpp:
654         (WebCore::NamedNodeMap::removeNamedItem): Use ExceptionOr.
655         (WebCore::NamedNodeMap::supportedPropertyNames): Updated to check
656         which strings should be removed without copying the strings.
657         (WebCore::NamedNodeMap::removeNamedItemNS): Use ExceptionOr.
658         (WebCore::NamedNodeMap::setNamedItem): Ditto. Removed overload for
659         legacy bindings; move that to the bindings themselves.
660         * dom/NamedNodeMap.h: Updated for above.
661         * dom/NamedNodeMap.idl: Use non-legacy exceptions.
662
663         * html/HTMLElement.cpp:
664         (WebCore::HTMLElement::setOuterText): Updated since mergeWithNextTextNode
665         now uses ExceptionOr.
666
667         * inspector/DOMEditor.cpp: Updated to use ExceptionOr.
668
669         * inspector/InspectorDOMAgent.cpp:
670         (WebCore::InspectorDOMAgent::toErrorString): Added an overload for
671         Exception.
672         (WebCore::InspectorDOMAgent::setAttributesAsText): Updated to use ExceptionOr.
673         * inspector/InspectorDOMAgent.h: Updated for above.
674
675         * inspector/InspectorStyleSheet.cpp:
676         (WebCore::InspectorStyleSheetForInlineStyle::setStyleText): Updated to
677         use the correct version of setAttribute; there was never a risk that there
678         would be an exception, but now that's clearer.
679
680         * testing/Internals.cpp:
681         (WebCore::Internals::ensureShadowRoot): Deleted. Was unused.
682         (WebCore::Internals::createShadowRoot): Ditto.
683         * testing/Internals.idl: Updated for above.
684
685         * xml/parser/XMLDocumentParserLibxml2.cpp:
686         (WebCore::handleNamespaceAttributes): Use updated parseAttributeName,
687         which uses ExceptionOr and a return value instead of an out argument.
688         (WebCore::handleElementAttributes): Ditto.
689
690 2016-10-30  Sam Weinig  <sam@webkit.org>
691
692         [WebIDL] Restructure IDLParser structs to better match modern WebIDL concepts
693         https://bugs.webkit.org/show_bug.cgi?id=164208
694
695         Reviewed by Darin Adler.
696
697         Restructure IDLParsers structs to match modern WebIDL conventions:
698         - Rename structs to have more WebCore like naming, consistently using
699           the prefix IDL.
700         - Remove domSignature. Sinking it's properties into the structs that
701           contained it.
702         - Add IDLArgument, replacing the use of domSignatures for arguments.
703           IDLArgument is the subset of domSignatures needed for arguments.
704         - Rename domFunction to IDLOperation (matching WebILD nomenclature),
705           replace signature with its own name, type (for returnType), specials,
706           and extended attributes properties.
707         - Give IDLAttribute it's own name, type and extended attributes properties.
708         - Add IDLDictionaryMember, replacing the use of domSignature as the
709           type of members in IDLDictionary. Give it name, type, isRequired,
710           default and extendedAttributes properties.
711         - Renamed Typedef to be IDLTypedef. Remove the extended attributes 
712           property as those are not allowed in typedefs per-PebIDL.
713
714         Also fix some parsing issues:
715         - Stop parsing 'in' directives in function arguments.
716         - Stop parsing extended attributes in typedefs.
717         - Support applying typedefs to types deep in aggregate types
718           (e.g. (sequence<(LONG or STRING)> or DOMString)?).
719
720         * bindings/scripts/CodeGenerator.pm:
721         * bindings/scripts/IDLParser.pm:
722         * bindings/scripts/generate-bindings.pl:
723         Update for new struct types.
724
725         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
726         * bindings/scripts/test/TestTypedefs.idl:
727         Remove test which tested extended attributes in typedefs,
728         and add a test which tests typedefs used in deep type structures.
729
730         * page/make_settings.pl:
731         Don't generate the 'in' prefix for arguments in IDL files.
732
733 2016-10-30  Dave Hyatt  <hyatt@apple.com>
734
735         [CSS Parser] Fix nth-child serialization
736         https://bugs.webkit.org/show_bug.cgi?id=164210
737
738         Reviewed by Darin Adler.
739
740         Our nth-child serialization preserves what the author originally
741         typed. Even though this is not spec-compliant (the latest CSS Syntax
742         spec has a dumbed down serialization process that doesn't preserve what
743         the author originally typed), I think it's better behavior to preserve
744         this text.
745
746         * css/parser/CSSParserToken.cpp:
747         (WebCore::CSSParserToken::serialize):
748         Fix a bug in the serialization of number tokens that started with
749         a plus sign. Make sure the plus sign is preserved.
750
751         * css/parser/CSSSelectorParser.cpp:
752         (WebCore::CSSSelectorParser::consumePseudo):
753         Grab the range of tokens from after the ( and up to the ) or the "of"
754         and then serialize them. Strip whitepsace from the ends and set that
755         as the selector argument.
756
757 2016-10-30  Brent Fulgham  <bfulgham@apple.com>
758
759         [Win][Direct2D] Correct bookkeeping for begin/end draw pairs
760         https://bugs.webkit.org/show_bug.cgi?id=163898
761
762         Reviewed by Darin Adler.
763
764         Simon pointed out that GraphicsContext objects are generally only created at
765         the time we intend to do drawing, so calling 'BeginDraw' as part of object
766         construction, and 'EndDraw' at time of destruction should be sufficient.
767
768         As usual, he was correct.
769         
770         This patch gets rid of unneeded code and greatly simplifies the Direct2D
771         drawing path.
772         
773         Tested by existing layout tests.
774
775         * platform/graphics/GraphicsContext.h:
776         * platform/graphics/win/GradientDirect2D.cpp:
777         (WebCore::Gradient::fill):Remove unneeded use
778         of 'RenderTargetScopedDrawing.h'.
779         * platform/graphics/win/GraphicsContextDirect2D.cpp:
780         (WebCore::GraphicsContext::releaseWindowsContext): Remove unneeded use
781         of RenderTargetScopedDrawing class.
782         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): Enter
783         the 'BeginDraw' state at object creation.
784         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): End
785         draw state at object destruction.
786         (WebCore::GraphicsContextPlatformPrivate::clip): Remove unneeded call to 'beginDraw'.
787         (WebCore::GraphicsContextPlatformPrivate::beginDraw): Renamed from 'beginDrawIfNeeded'.
788         (WebCore::GraphicsContextPlatformPrivate::endDraw): Get rid of draw state flags.
789         (WebCore::GraphicsContext::beginDraw): Renamed from 'beginDrawIfNeeded'.
790         (WebCore::GraphicsContext::flush): Added.
791         (WebCore::GraphicsContext::drawWithoutShadow): Remove unneeded use of
792         RenderTargetScopedDrawing class.
793         (WebCore::GraphicsContext::drawWithShadow): Ditto.
794         (WebCore::GraphicsContext::platformFillRoundedRect): Ditto.
795         (WebCore::GraphicsContext::fillRectWithRoundedHole): Ditto.
796         (WebCore::GraphicsContext::didBeginDraw): Deleted.
797         (WebCore::GraphicsContextPlatformPrivate::beginDrawIfNeeded): Deleted.
798         (WebCore::GraphicsContext::beginDrawIfNeeded): Deleted.
799         * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
800         (WebCore::GraphicsContextPlatformPrivate::didBeginDraw): Deleted.
801         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
802         (WebCore::ImageBufferData::getData): Remove unneeded use of RenderTargetScopedDrawing class.
803         (WebCore::ImageBufferData::putData):
804         * platform/graphics/win/ImageBufferDirect2D.cpp:
805         (WebCore::ImageBuffer::flushContext): Call new GraphicsContext 'flush' command.
806         (WebCore::ImageBuffer::draw): Remove unneeded use of RenderTargetScopedDrawing class.
807         * platform/graphics/win/NativeImageDirect2D.cpp: Ditto.
808         * platform/graphics/win/RenderTargetScopedDrawing.h: Removed.
809         * svg/graphics/SVGImage.cpp:
810         (WebCore::SVGImage::nativeImage): Remove unneeded use of RenderTargetScopedDrawing class.
811
812 2016-10-30  Dave Hyatt  <hyatt@apple.com> 
813
814         [CSS Parser] Clean up the two types of descendant relations in CSSSelector 
815         https://bugs.webkit.org/show_bug.cgi?id=164203 
816
817         Reviewed by Zalan Bujtas. 
818
819         This patch gets rid of the separate boolean for double child and allows it 
820         to be a unique relation type. Rename Descendant to DescendantSpace and 
821         name the new relation DescendantDoubleChild. 
822
823         * css/CSSSelector.cpp: 
824         (WebCore::CSSSelector::CSSSelector): 
825         (WebCore::CSSSelector::selectorText): 
826         * css/CSSSelector.h: 
827         (WebCore::CSSSelector::hasDescendantRelation): 
828         (WebCore::CSSSelector::hasDescendantOrChildRelation): 
829         (WebCore::CSSSelector::CSSSelector): 
830         (WebCore::CSSSelector::setDescendantUseDoubleChildSyntax): Deleted. 
831         * css/RuleFeature.cpp: 
832         (WebCore::RuleFeatureSet::recursivelyCollectFeaturesFromSelector): 
833         * css/SelectorChecker.cpp: 
834         (WebCore::SelectorChecker::matchRecursively): 
835         (WebCore::SelectorChecker::determineLinkMatchType): 
836         * css/SelectorFilter.cpp: 
837         (WebCore::SelectorFilter::collectIdentifierHashes): 
838         * css/parser/CSSParserValues.cpp: 
839         (WebCore::CSSParserSelector::appendTagHistory): 
840         * css/parser/CSSParserValues.h: 
841         (WebCore::CSSParserSelector::setDescendantUseDoubleChildSyntax): Deleted. 
842         * css/parser/CSSSelectorParser.cpp: 
843         (WebCore::isDescendantCombinator): 
844         (WebCore::CSSSelectorParser::consumeComplexSelector): 
845         (WebCore::CSSSelectorParser::consumeCombinator): 
846         * cssjit/SelectorCompiler.cpp: 
847         (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation): 
848
849 2016-10-30  Frederic Wang  <fwang@igalia.com> 
850
851         Unreviewed gardening 
852
853         Fix build error on WinCairo. 
854
855         * platform/graphics/opentype/OpenTypeMathData.cpp: 
856
857 2016-10-30  Frederic Wang  <fwang@igalia.com> 
858
859         Use HarfBuzz ot-math API to parse the OpenType MATH table 
860         https://bugs.webkit.org/show_bug.cgi?id=162671 
861
862         Reviewed by Michael Catanzaro. 
863
864         No new tests, already covered by existing tests. 
865
866         * platform/graphics/opentype/OpenTypeMathData.cpp: Add alternative implementation relying on 
867         HarfBuzz's new OpenType MATH API. 
868         * platform/graphics/opentype/OpenTypeMathData.h: Ditto. 
869         (WebCore::OpenTypeMathData::hasMathData): 
870         (WebCore::OpenTypeMathData::HbFontDeleter::operator()): 
871
872 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
873
874         [CSS Parser] Support unprefixed image-sets 
875         https://bugs.webkit.org/show_bug.cgi?id=164198 
876
877         Reviewed by Dean Jackson. 
878
879         * css/CSSValueKeywords.in: 
880         * css/parser/CSSPropertyParserHelpers.cpp: 
881         (WebCore::CSSPropertyParserHelpers::consumeImage): 
882
883 2016-10-30  Yusuke Suzuki  <utatane.tea@gmail.com> 
884
885         [DOM] Introduce WebCore::jsDynamicDowncast 
886         https://bugs.webkit.org/show_bug.cgi?id=164137 
887  
888         Reviewed by Darin Adler. 
889
890         In WebCore, we have several extended JSTypes, like JSElementType. 
891         For these types, WebCore offers the faster casting function compared 
892         to JSC::jsDynamicCast. For example, for JSElementType, we have 
893         jsElementCast. 
894
895         The problem is that we may fall into the slow code if we choose 
896         JSC::jsDynamicCast by accident. Selecting the appropriate function 
897         requires special care in the IDL code generator when we would like 
898         to use faster casting functions. 
899
900         This patch implements a new casting function, WebCore::jsDynamicDowncast. 
901         It is a thin wrapper to the JSC::jsDynamicCast. But it selects the 
902         faster casting functions correctly by template specialization. 
903
904         We do not choose the way specializing JSC::jsDynamicCast directly. 
905         If we forget to include the header that specializes JSC::jsDyanmicCast, 
906         it does not cause any compile errors, but it causes performance regression. 
907         This bug is hard to figure out. To avoid this problem, we add a new function. 
908
909         Outside JSC, only Tools' DumpRenderTree uses JSC::jsDynamicCast. 
910         This code has FIXME that we should use JSC APIs instead of directly calling 
911         JSC thingy. So this should be solved in the layer of JSC APIs and changing 
912         this jsDynamicCast to WebCore's jsDynamicDowncast and exposing WebCore's thingy 
913         are not good change. So we leave the code as is. 
914
915         * WebCore.xcodeproj/project.pbxproj: 
916         * bindings/js/JSApplePaySessionCustom.cpp: 
917         (WebCore::JSApplePaySession::completeShippingMethodSelection): 
918         (WebCore::JSApplePaySession::completeShippingContactSelection): 
919         (WebCore::JSApplePaySession::completePaymentMethodSelection): 
920         * bindings/js/JSDOMBinding.cpp: 
921         (WebCore::reportException): 
922         * bindings/js/JSDOMBinding.h: 
923         (WebCore::castThisValue): 
924         (WebCore::toArrayBufferView): 
925         * bindings/js/JSDOMIterator.h: 
926         (WebCore::IteratorTraits>::next): 
927         * bindings/js/JSDOMWindowShell.cpp: 
928         (WebCore::JSDOMWindowShell::toWrapped): 
929         * bindings/js/JSDictionary.cpp: 
930         (WebCore::JSDictionary::convertValue): 
931         * bindings/js/JSDocumentCustom.h: 
932         (WebCore::jsDocumentCast): 
933         * bindings/js/JSDynamicDowncast.h: Added. 
934         (WebCore::JSDynamicCastTrait::cast): 
935         (WebCore::JSDynamicCastTrait<JSNode>::cast): 
936         (WebCore::JSDynamicCastTrait<JSElement>::cast): 
937         (WebCore::JSDynamicCastTrait<JSDocument>::cast): 
938         (WebCore::JSDynamicCastTrait<JSEvent>::cast): 
939         (WebCore::jsDynamicDowncast): 
940         * bindings/js/JSElementCustom.h: 
941         (WebCore::jsElementCast): 
942         * bindings/js/JSEventCustom.h: 
943         (WebCore::jsEventCast): 
944         * bindings/js/JSEventListener.cpp: 
945         (WebCore::setDocumentEventHandlerAttribute): 
946         * bindings/js/JSEventTargetCustom.cpp: 
947         (WebCore::jsEventTargetCast): 
948         * bindings/js/JSMediaStreamTrackCustom.cpp: 
949         (WebCore::JSMediaStreamTrack::getSettings): 
950         (WebCore::JSMediaStreamTrack::getCapabilities): 
951         * bindings/js/JSNodeCustom.h: 
952         (WebCore::jsNodeCast): 
953         * bindings/js/JSPluginElementFunctions.cpp: 
954         (WebCore::pluginElementPropertyGetter): 
955         * bindings/js/JSReadableStreamPrivateConstructors.cpp: 
956         (WebCore::constructJSReadableStreamDefaultReader): 
957         * bindings/js/JSReadableStreamSourceCustom.cpp: 
958         (WebCore::startReadableStream): 
959         (WebCore::JSReadableStreamSource::start): 
960         (WebCore::pullReadableStream): 
961         * bindings/js/JSWorkerGlobalScopeBase.cpp: 
962         (WebCore::toJSDedicatedWorkerGlobalScope): 
963         * bindings/js/ScriptModuleLoader.cpp: 
964         (WebCore::ScriptModuleLoader::evaluate): 
965         * bindings/js/SerializedScriptValue.cpp: 
966         (WebCore::CloneSerializer::serialize): 
967         * bindings/js/StructuredClone.cpp: 
968         (WebCore::structuredCloneArrayBufferView): 
969         * bindings/scripts/CodeGeneratorJS.pm: 
970         (GetCastingHelperForThisObject): 
971         (GenerateImplementation): 
972         * bindings/scripts/test/JS/JSInterfaceName.cpp: 
973         (WebCore::jsInterfaceNameConstructor): 
974         (WebCore::setJSInterfaceNameConstructor): 
975         (WebCore::JSInterfaceName::toWrapped): 
976         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: 
977         (WebCore::BindingCaller<JSTestActiveDOMObject>::castForAttribute): 
978         (WebCore::BindingCaller<JSTestActiveDOMObject>::castForOperation): 
979         (WebCore::jsTestActiveDOMObjectConstructor): 
980         (WebCore::setJSTestActiveDOMObjectConstructor): 
981         (WebCore::JSTestActiveDOMObject::toWrapped): 
982         * bindings/scripts/test/JS/JSTestCEReactions.cpp: 
983         (WebCore::BindingCaller<JSTestCEReactions>::castForAttribute): 
984         (WebCore::BindingCaller<JSTestCEReactions>::castForOperation): 
985         (WebCore::jsTestCEReactionsConstructor): 
986         (WebCore::setJSTestCEReactionsConstructor): 
987         (WebCore::JSTestCEReactions::toWrapped): 
988         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: 
989         (WebCore::BindingCaller<JSTestCEReactionsStringifier>::castForAttribute): 
990         (WebCore::BindingCaller<JSTestCEReactionsStringifier>::castForOperation): 
991         (WebCore::jsTestCEReactionsStringifierConstructor): 
992         (WebCore::setJSTestCEReactionsStringifierConstructor): 
993         (WebCore::JSTestCEReactionsStringifier::toWrapped): 
994         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: 
995         (WebCore::jsTestClassWithJSBuiltinConstructorConstructor): 
996         (WebCore::setJSTestClassWithJSBuiltinConstructorConstructor): 
997         (WebCore::JSTestClassWithJSBuiltinConstructor::toWrapped): 
998         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: 
999         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor): 
1000         (WebCore::setJSTestCustomConstructorWithNoInterfaceObjectConstructor): 
1001         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped): 
1002         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: 
1003         (WebCore::BindingCaller<JSTestCustomNamedGetter>::castForOperation): 
1004         (WebCore::jsTestCustomNamedGetterConstructor): 
1005         (WebCore::setJSTestCustomNamedGetterConstructor): 
1006         (WebCore::JSTestCustomNamedGetter::toWrapped): 
1007         * bindings/scripts/test/JS/JSTestDOMJIT.cpp: 
1008         (WebCore::BindingCaller<JSTestDOMJIT>::castForAttribute): 
1009         (WebCore::jsTestDOMJITConstructor): 
1010         (WebCore::setJSTestDOMJITConstructor): 
1011         * bindings/scripts/test/JS/JSTestEventConstructor.cpp: 
1012         (WebCore::BindingCaller<JSTestEventConstructor>::castForAttribute): 
1013         (WebCore::jsTestEventConstructorConstructor): 
1014         (WebCore::setJSTestEventConstructorConstructor): 
1015         * bindings/scripts/test/JS/JSTestEventTarget.cpp: 
1016         (WebCore::BindingCaller<JSTestEventTarget>::castForOperation): 
1017         (WebCore::jsTestEventTargetConstructor): 
1018         (WebCore::setJSTestEventTargetConstructor): 
1019         (WebCore::JSTestEventTarget::toWrapped): 
1020         * bindings/scripts/test/JS/JSTestException.cpp: 
1021         (WebCore::BindingCaller<JSTestException>::castForAttribute): 
1022         (WebCore::jsTestExceptionConstructor): 
1023         (WebCore::setJSTestExceptionConstructor): 
1024         (WebCore::JSTestException::toWrapped): 
1025         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: 
1026         (WebCore::jsTestGenerateIsReachableConstructor): 
1027         (WebCore::setJSTestGenerateIsReachableConstructor): 
1028         (WebCore::JSTestGenerateIsReachable::toWrapped): 
1029         * bindings/scripts/test/JS/JSTestGlobalObject.cpp: 
1030         (WebCore::BindingCaller<JSTestGlobalObject>::castForAttribute): 
1031         (WebCore::BindingCaller<JSTestGlobalObject>::castForOperation): 
1032         (WebCore::jsTestGlobalObjectConstructor): 
1033         (WebCore::setJSTestGlobalObjectConstructor): 
1034         (WebCore::JSTestGlobalObject::toWrapped): 
1035         * bindings/scripts/test/JS/JSTestInterface.cpp: 
1036         (WebCore::BindingCaller<JSTestInterface>::castForAttribute): 
1037         (WebCore::BindingCaller<JSTestInterface>::castForOperation): 
1038         (WebCore::jsTestInterfaceConstructor): 
1039         (WebCore::setJSTestInterfaceConstructor): 
1040         (WebCore::JSTestInterface::toWrapped): 
1041         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp: 
1042         (WebCore::BindingCaller<JSTestInterfaceLeadingUnderscore>::castForAttribute): 
1043         (WebCore::jsTestInterfaceLeadingUnderscoreConstructor): 
1044         (WebCore::setJSTestInterfaceLeadingUnderscoreConstructor): 
1045         (WebCore::JSTestInterfaceLeadingUnderscore::toWrapped): 
1046         * bindings/scripts/test/JS/JSTestIterable.cpp: 
1047         (WebCore::BindingCaller<JSTestIterable>::castForOperation): 
1048         (WebCore::jsTestIterableConstructor): 
1049         (WebCore::setJSTestIterableConstructor): 
1050         (WebCore::JSTestIterable::toWrapped): 
1051         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: 
1052         (WebCore::BindingCaller<JSTestJSBuiltinConstructor>::castForAttribute): 
1053         (WebCore::BindingCaller<JSTestJSBuiltinConstructor>::castForOperation): 
1054         (WebCore::jsTestJSBuiltinConstructorConstructor): 
1055         (WebCore::setJSTestJSBuiltinConstructorConstructor): 
1056         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: 
1057         (WebCore::BindingCaller<JSTestMediaQueryListListener>::castForOperation): 
1058         (WebCore::jsTestMediaQueryListListenerConstructor): 
1059         (WebCore::setJSTestMediaQueryListListenerConstructor): 
1060         (WebCore::JSTestMediaQueryListListener::toWrapped): 
1061         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: 
1062         (WebCore::jsTestNamedConstructorConstructor): 
1063         (WebCore::setJSTestNamedConstructorConstructor): 
1064         (WebCore::JSTestNamedConstructor::toWrapped): 
1065         * bindings/scripts/test/JS/JSTestNode.cpp: 
1066         (WebCore::BindingCaller<JSTestNode>::castForAttribute): 
1067         (WebCore::BindingCaller<JSTestNode>::castForOperation): 
1068         (WebCore::jsTestNodeConstructor): 
1069         (WebCore::setJSTestNodeConstructor): 
1070         * bindings/scripts/test/JS/JSTestNondeterministic.cpp: 
1071         (WebCore::BindingCaller<JSTestNondeterministic>::castForAttribute): 
1072         (WebCore::BindingCaller<JSTestNondeterministic>::castForOperation): 
1073         (WebCore::jsTestNondeterministicConstructor): 
1074         (WebCore::setJSTestNondeterministicConstructor): 
1075         (WebCore::JSTestNondeterministic::toWrapped): 
1076         * bindings/scripts/test/JS/JSTestObj.cpp: 
1077         (WebCore::BindingCaller<JSTestObj>::castForAttribute): 
1078         (WebCore::BindingCaller<JSTestObj>::castForOperation): 
1079         (WebCore::jsTestObjConstructor): 
1080         (WebCore::setJSTestObjConstructor): 
1081         (WebCore::JSTestObj::toWrapped): 
1082         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: 
1083         (WebCore::jsTestOverloadedConstructorsConstructor): 
1084         (WebCore::setJSTestOverloadedConstructorsConstructor): 
1085         (WebCore::JSTestOverloadedConstructors::toWrapped): 
1086         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: 
1087         (WebCore::jsTestOverloadedConstructorsWithSequenceConstructor): 
1088         (WebCore::setJSTestOverloadedConstructorsWithSequenceConstructor): 
1089         (WebCore::JSTestOverloadedConstructorsWithSequence::toWrapped): 
1090         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: 
1091         (WebCore::BindingCaller<JSTestOverrideBuiltins>::castForOperation): 
1092         (WebCore::jsTestOverrideBuiltinsConstructor): 
1093         (WebCore::setJSTestOverrideBuiltinsConstructor): 
1094         (WebCore::JSTestOverrideBuiltins::toWrapped): 
1095         * bindings/scripts/test/JS/JSTestSerialization.cpp: 
1096         (WebCore::BindingCaller<JSTestSerialization>::castForAttribute): 
1097         (WebCore::BindingCaller<JSTestSerialization>::castForOperation): 
1098         (WebCore::jsTestSerializationConstructor): 
1099         (WebCore::setJSTestSerializationConstructor): 
1100         (WebCore::JSTestSerialization::toWrapped): 
1101         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 
1102         (WebCore::BindingCaller<JSTestSerializedScriptValueInterface>::castForAttribute): 
1103         (WebCore::jsTestSerializedScriptValueInterfaceConstructor): 
1104         (WebCore::setJSTestSerializedScriptValueInterfaceConstructor): 
1105         (WebCore::JSTestSerializedScriptValueInterface::toWrapped): 
1106         * bindings/scripts/test/JS/JSTestTypedefs.cpp: 
1107         (WebCore::BindingCaller<JSTestTypedefs>::castForAttribute): 
1108         (WebCore::BindingCaller<JSTestTypedefs>::castForOperation): 
1109         (WebCore::jsTestTypedefsConstructor): 
1110         (WebCore::setJSTestTypedefsConstructor): 
1111         (WebCore::JSTestTypedefs::toWrapped): 
1112         * bridge/objc/WebScriptObject.mm: 
1113         (-[WebScriptObject setValue:forKey:]): 
1114         * bridge/runtime_array.cpp: 
1115         (JSC::RuntimeArray::lengthGetter): 
1116         * bridge/runtime_method.cpp: 
1117         (JSC::RuntimeMethod::lengthGetter): 
1118         * html/HTMLMediaElement.cpp: 
1119         (WebCore::controllerJSValue): 
1120         (WebCore::HTMLMediaElement::updateCaptionContainer): 
1121         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): 
1122         * inspector/InspectorDOMAgent.cpp: 
1123         (WebCore::InspectorDOMAgent::buildObjectForEventListener): 
1124
1125 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
1126
1127         [CSS Parser] Add font-variant-* keyword property support 
1128         https://bugs.webkit.org/show_bug.cgi?id=164195 
1129  
1130         Reviewed by Zalan Bujtas. 
1131  
1132         * css/parser/CSSParserFastPaths.cpp: 
1133         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): 
1134
1135 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
1136
1137         [CSS Parser] Fix text-emphasis-position parsing 
1138         https://bugs.webkit.org/show_bug.cgi?id=164197 
1139
1140         Reviewed by Zalan Bujtas. 
1141
1142         * css/parser/CSSParserFastPaths.cpp: 
1143         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): 
1144         (WebCore::CSSParserFastPaths::isKeywordPropertyID): 
1145         * css/parser/CSSPropertyParser.cpp: 
1146         (WebCore::consumeTextEmphasisPosition): 
1147         (WebCore::CSSPropertyParser::parseSingleValue): 
1148
1149 2016-10-29  Darin Adler  <darin@apple.com> 
1150
1151         Convert more of DOM from ExceptionCode to Exception 
1152         https://bugs.webkit.org/show_bug.cgi?id=164173 
1153  
1154         Reviewed by Ryosuke Niwa. 
1155  
1156         * Modules/mediastream/MediaDevices.cpp: 
1157         (WebCore::MediaDevices::getUserMedia): Use ExceptionOr. 
1158         (WebCore::MediaDevices::enumerateDevices): Ditto. 
1159         * Modules/mediastream/MediaDevices.h: Updated for above. 
1160         * Modules/mediastream/MediaDevices.idl: Use non-legacy exceptions. 
1161  
1162         * Modules/mediastream/MediaEndpointSessionDescription.cpp: 
1163         Added now-needed include of ExceptionCode.h. 
1164  
1165         * Modules/mediastream/RTCConfiguration.cpp: 
1166         (WebCore::parseIceServer): Use ExceptionOr. 
1167         (WebCore::RTCConfiguration::create): Ditto. 
1168         (WebCore::RTCConfiguration::initialize): Ditto. 
1169         * Modules/mediastream/RTCConfiguration.h: Updated for above. 
1170         * Modules/mediastream/RTCConfiguration.idl: Use non-legacy exceptions. 
1171  
1172         * Modules/mediastream/RTCDTMFSender.cpp: 
1173         (WebCore::RTCDTMFSender::create): Use ExceptionOr. 
1174         (WebCore::RTCDTMFSender::insertDTMF): Ditto. 
1175         * Modules/mediastream/RTCDTMFSender.h: Updated for above. 
1176         * Modules/mediastream/RTCDTMFSender.idl: Use non-legacy exceptions. 
1177  
1178         * Modules/mediastream/RTCDataChannel.cpp: 
1179         (WebCore::RTCDataChannel::create): Use ExceptionOr. 
1180         (WebCore::RTCDataChannel::setBinaryType): Ditto. 
1181         (WebCore::RTCDataChannel::send): Ditto. 
1182         (WebCore::RTCDataChannel::didReceiveRawData): Ditto. 
1183         * Modules/mediastream/RTCDataChannel.h: Updated for above. 
1184         Also changed return values to use const AtomicString& and 
1185         unsigned instead of unsigned long. Also made more private. 
1186         Also changed BinaryType into an enum class. 
1187         * Modules/mediastream/RTCDataChannel.idl: Use non-legacy exceptions. 
1188  
1189         * Modules/mediastream/RTCIceCandidate.cpp: 
1190         (WebCore::RTCIceCandidate::create): Use ExceptionOr. 
1191         * Modules/mediastream/RTCIceCandidate.h: Updated for above. 
1192         * Modules/mediastream/RTCIceCandidate.idl: Use non-legacy exception. 
1193  
1194         * Modules/mediastream/RTCOfferAnswerOptions.cpp: 
1195         (WebCore::RTCOfferOptions::create): Use ExceptionOr. 
1196         (WebCore::RTCAnswerOptions::create): Ditto. 
1197         * Modules/mediastream/RTCOfferAnswerOptions.h: Updated for above. 
1198         Also removed all virtual functions since nothing here is polymorphic 
1199         and initalized data members in the header. 
1200  
1201         * Modules/mediastream/RTCPeerConnection.cpp: 
1202         (WebCore::RTCPeerConnection::initializeWith): Use ExceptionOr. 
1203         (WebCore::RTCPeerConnection::addTrack): Ditto. 
1204         (WebCore::RTCPeerConnection::removeTrack): Ditto. 
1205         (WebCore::RTCPeerConnection::addTransceiver): Ditto. 
1206         (WebCore::RTCPeerConnection::completeAddTransceiver): Ditto. 
1207         (WebCore::RTCPeerConnection::queuedCreateOffer): Ditto. 
1208         (WebCore::RTCPeerConnection::queuedCreateAnswer): Ditto. 
1209         (WebCore::RTCPeerConnection::setConfiguration): Ditto. 
1210         (WebCore::RTCPeerConnection::createDataChannel): Ditto. 
1211         * Modules/mediastream/RTCPeerConnection.h: Updated for above. 
1212         * Modules/mediastream/RTCPeerConnection.idl: Use non-legacy exceptions. 
1213  
1214         * Modules/mediastream/RTCRtpSender.cpp: 
1215         (WebCore::RTCRtpSender::replaceTrack): Use ExceptionOr. 
1216         * Modules/mediastream/RTCRtpSender.h: Updated for above. 
1217         * Modules/mediastream/RTCRtpSender.idl: Use non-legacy exception. 
1218  
1219         * Modules/mediastream/RTCSessionDescription.cpp: 
1220         (WebCore::RTCSessionDescription::create): Use ExceptoinOr. 
1221         * Modules/mediastream/RTCSessionDescription.h: Updated for above. 
1222         (WebCore::RTCSessionDescription::~RTCSessionDescription): 
1223         * Modules/mediastream/RTCSessionDescription.idl: Use non-legacy exceptions. 
1224  
1225         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp: 
1226         (WebCore::verifyCustomHandlerURL): Just return a boolean, no exception. 
1227         (WebCore::verifyProtocolHandlerScheme): Ditto. 
1228         (WebCore::NavigatorContentUtils::registerProtocolHandler): Use ExceptionOr. 
1229         (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered): Ditto. 
1230         (WebCore::NavigatorContentUtils::unregisterProtocolHandler): Ditto. 
1231         * Modules/navigatorcontentutils/NavigatorContentUtils.h: Updated for above. 
1232         * Modules/navigatorcontentutils/NavigatorContentUtils.idl: Use non-legacy exceptions. 
1233  
1234         * bindings/js/JSMediaDevicesCustom.cpp: 
1235         (WebCore::JSMediaDevicesGetUserMediaPromiseFunction): Use propagateException. 
1236  
1237         * bindings/scripts/CodeGeneratorJS.pm: 
1238         (NeedsExplicitPropagateExceptionCall): Added. Helper function to decide whether 
1239         we need to call propagateException explicitly, if return value processing is not 
1240         going to propagate the exception for us. 
1241         (GenerateParametersCheck): Moved the code from GenerateReturnParameters inline 
1242         because it's almost as short as the function call. Use the newly created 
1243         NeedsExplicitPropagateExceptionCall function, which properly handles the case 
1244         where the return value is a promise. 
1245         (GenerateReturnParameters): Deleted. 
1246  
1247         * dom/CharacterData.cpp: 
1248         (WebCore::CharacterData::substringData): Use ExceptionOr. 
1249         (WebCore::CharacterData::insertData): Ditto. 
1250         (WebCore::CharacterData::deleteData): Ditto. 
1251         (WebCore::CharacterData::replaceData): Ditto. 
1252         * dom/CharacterData.h: Updated for above. 
1253         * dom/CharacterData.idl: Use non-legacy exceptions. 
1254  
1255         * dom/DataTransferItemList.h: Tried to use ExceptionOr, but this seems 
1256         like dead code that doesn't compile. 
1257         * dom/DataTransferItemList.idl: Use non-legacy exceptions. 
1258  
1259         * dom/MessagePort.idl: Use non-legacy exceptions, except this has 
1260         already been converted and was a custom binding. 
1261  
1262         * dom/MutationObserver.cpp: 
1263         (WebCore::MutationObserver::observe): Use ExceptionOr. 
1264         * dom/MutationObserver.h: Updated for above. 
1265         * dom/MutationObserver.idl: Use non-legacy exception. 
1266  
1267         * dom/Range.cpp: 
1268         (WebCore::deleteCharacterData): Updated use of calls that now use 
1269         ExceptionOr. 
1270         (WebCore::Range::processContentsBetweenOffsets): Ditto. 
1271         (WebCore::Range::insertNode): Ditto. 
1272  
1273         * dom/ShadowRoot.cpp: 
1274         (WebCore::ShadowRoot::setInnerHTML): Use ExceptionOr. 
1275         * dom/ShadowRoot.h: Updated for above. 
1276         * dom/ShadowRoot.idl: Use non-legacy exception. 
1277  
1278         * dom/Text.cpp: 
1279         (WebCore::Text::splitText): Use ExceptionOr. 
1280         (WebCore::Text::replaceWholeText): Removed unused ExceptionCode&. 
1281         * dom/Text.h: Updated for above. 
1282         * dom/Text.idl: Use non-legacy exception. 
1283  
1284         * editing/ApplyBlockElementCommand.cpp: 
1285         (WebCore::isNewLineAtPosition): Rewrote to use data rather than 
1286         substringData; more efficient. 
1287  
1288         * editing/DeleteFromTextNodeCommand.cpp: 
1289         (WebCore::DeleteFromTextNodeCommand::doApply): Updated to work with 
1290         functions that return ExceptionOr. 
1291         (WebCore::DeleteFromTextNodeCommand::doUnapply): Removed IGNORE_EXCEPTION. 
1292  
1293         * editing/InsertIntoTextNodeCommand.cpp: 
1294         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand): 
1295         Use WTFMove to avoid a little bit of reference count churn. 
1296         (WebCore::InsertIntoTextNodeCommand::doApply): Removed IGNORE_EXCEPTION. 
1297         (WebCore::InsertIntoTextNodeCommand::doReapply): Removed ExceptionCode. 
1298         (WebCore::InsertIntoTextNodeCommand::doUnapply): Removed IGNORE_EXCEPTION. 
1299  
1300         * editing/SplitTextNodeCommand.cpp: 
1301         (WebCore::SplitTextNodeCommand::doApply): Updated to work with functions 
1302         that return ExceptionCode. 
1303         (WebCore::SplitTextNodeCommand::doUnapply): Removed ASSERT_NO_EXCEPTION. 
1304         (WebCore::SplitTextNodeCommand::insertText1AndTrimText2): Updated to work 
1305         with functions that return ExceptionCode. 
1306  
1307         * html/HTMLTextFormControlElement.cpp: 
1308         Added now-needed include of ExceptionCode.h. 
1309  
1310         * inspector/DOMEditor.cpp: Removed ExceptionCode out argument from calls 
1311         to replaceWholeText, which never throws an exception. 
1312  
1313 2016-10-29  Dean Jackson  <dino@apple.com> 
1314  
1315         Parse color() function 
1316         https://bugs.webkit.org/show_bug.cgi?id=164146 
1317         <rdar://problems/29007218> 
1318  
1319         Reviewed by Darin Adler. 
1320  
1321         Support the new CSS color() function: 
1322         https://drafts.csswg.org/css-color/#color-function 
1323  
1324         There are separate code paths for the old and new CSS parser. 
1325  
1326         Tests: css3/color/color-function-computed-style.html 
1327                css3/color/color-function-parsing.html 
1328  
1329         * css/CSSComputedStyleDeclaration.cpp: Use Color directly, not via rgb(). 
1330         (WebCore::ComputedStyleExtractor::currentColorOrValidColor): 
1331         (WebCore::ComputedStyleExtractor::valueForShadow): 
1332         (WebCore::ComputedStyleExtractor::propertyValue): 
1333  
1334         * css/CSSValueKeywords.in: Note that there is a color function, but the 
1335         keyword is already defined. Also add keywords for the color spaces. 
1336         * css/SVGCSSValueKeywords.in: sRGB is used outside of SVG now. 
1337  
1338         * css/parser/CSSParser.cpp: Old CSS parser code to handle color(). 
1339         (WebCore::isPercent): Helper to tell if a ValueWithCalculation is a percentage or not. 
1340         (WebCore::CSSParser::parseColorInt): Renamed. 
1341         (WebCore::CSSParser::parseColorDouble): Helper to get a Number/Percentage into a double 
1342         (WebCore::CSSParser::parseRGBParameters): 
1343         (WebCore::CSSParser::parseColorFunctionParameters): 
1344         (WebCore::CSSParser::parseHSLParameters): 
1345         (WebCore::CSSParser::parseColorFromValue): 
1346         (WebCore::CSSParser::colorIntFromValue): Deleted. 
1347         * css/parser/CSSParser.h: 
1348  
1349         * css/parser/CSSPropertyParserHelpers.cpp: New CSS parser code to handle color(). 
1350         (WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters): 
1351         (WebCore::CSSPropertyParserHelpers::parseColorFunction): 
1352  
1353         * platform/graphics/Color.h: 
1354         (WebCore::Color::isValid): An extended color is valid. 
1355         (WebCore::Color::rgb): Move the code to a standalone inline 
1356         so that I could add a longer comment. 
1357  
1358         * platform/graphics/ExtendedColor.cpp: 
1359         (WebCore::ExtendedColor::cssText): Alpha output is only needed if != 1. 
1360  
1361         * platform/graphics/cg/ColorCG.cpp: Handle ExtendedColor -> CGColor. 
1362         (WebCore::leakCGColor): 
1363         (WebCore::cachedCGColor): 
1364  
1365 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
1366  
1367         [CSS Parser] Disable -webkit-text-size-adjust when the context says to. 
1368         https://bugs.webkit.org/show_bug.cgi?id=164191 
1369  
1370         Reviewed by Dean Jackson. 
1371  
1372         * css/parser/CSSPropertyParser.cpp: 
1373         (WebCore::CSSPropertyParser::parseSingleValue): 
1374  
1375 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
1376  
1377         [CSS Parser] Match old parser's image-rendering values 
1378         https://bugs.webkit.org/show_bug.cgi?id=164190 
1379  
1380         Reviewed by Dean Jackson. 
1381  
1382         * css/parser/CSSParserFastPaths.cpp: 
1383         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): 
1384  
1385 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
1386  
1387         [CSS Parser] Support -webkit-text value for background-clip and -webkit-background-clip 
1388         https://bugs.webkit.org/show_bug.cgi?id=164189 
1389  
1390         Reviewed by Dean Jackson. 
1391  
1392         * css/parser/CSSPropertyParser.cpp: 
1393         (WebCore::consumeBackgroundBox): 
1394         (WebCore::consumePrefixedBackgroundBox): 
1395  
1396 2016-10-29  Joseph Pecoraro  <pecoraro@apple.com> 
1397  
1398         Remove some unnecessary includes 
1399         https://bugs.webkit.org/show_bug.cgi?id=164174 
1400  
1401         Reviewed by Darin Adler. 
1402  
1403 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
1404  
1405         [CSS Parser] Support -webkit-aspect-ratio 
1406         https://bugs.webkit.org/show_bug.cgi?id=164187 
1407  
1408         Reviewed by Simon Fraser. 
1409  
1410         * css/parser/CSSPropertyParser.cpp: 
1411         (WebCore::consumeWebkitAspectRatio): 
1412         (WebCore::CSSPropertyParser::parseSingleValue): 
1413  
1414 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
1415  
1416         [CSS Parser] Support the caps lock indicator appearance 
1417         https://bugs.webkit.org/show_bug.cgi?id=164186 
1418  
1419         Reviewed by Simon Fraser. 
1420  
1421         * css/parser/CSSParserFastPaths.cpp: 
1422         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): 
1423  
1424 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
1425  
1426         [CSS Parser] Support the alt property 
1427         https://bugs.webkit.org/show_bug.cgi?id=164184 
1428  
1429         Reviewed by Simon Fraser. 
1430  
1431         * css/parser/CSSPropertyParser.cpp: 
1432         (WebCore::consumeAlt): 
1433         (WebCore::CSSPropertyParser::parseSingleValue): 
1434  
1435 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
1436  
1437         [CSS Parser] Add support for -webkit-hyphenate-limit-* properties 
1438         https://bugs.webkit.org/show_bug.cgi?id=164183 
1439  
1440         Reviewed by Simon Fraser. 
1441  
1442         * css/parser/CSSPropertyParser.cpp: 
1443         (WebCore::consumeHyphenateLimit): 
1444         (WebCore::CSSPropertyParser::parseSingleValue): 
1445  
1446 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
1447  
1448         [CSS Parser] Fix transform-origin and perspective-origin to parse as shorthands 
1449         https://bugs.webkit.org/show_bug.cgi?id=164178 
1450  
1451         Reviewed by Zalan Bujtas. 
1452  
1453         * css/CSSPropertyNames.in: 
1454         Patch the transform-origin-x/y and perspective-origin-x/y properties 
1455         to use new converters that can handle keywords. 
1456  
1457         * css/StyleBuilderConverter.h: 
1458         (WebCore::StyleBuilderConverter::convertPositionComponentX): 
1459         (WebCore::StyleBuilderConverter::convertPositionComponentY): 
1460         Add the new converters. They just call convertPositionComponent method 
1461         that we already use for object-position and background-position. 
1462  
1463         * css/parser/CSSPropertyParser.cpp: 
1464         (WebCore::CSSPropertyParser::consumeTransformOrigin): 
1465         (WebCore::CSSPropertyParser::consumePerspectiveOrigin): 
1466         Changed to treat the properties as shorthands and add the longhand 
1467         properties once parsed. 
1468  
1469         (WebCore::CSSPropertyParser::parseSingleValue): 
1470         (WebCore::CSSPropertyParser::parseShorthand): 
1471         * css/parser/CSSPropertyParser.h: 
1472         Move the parsing into the shorthand method, since we're still treating 
1473         these properties as shorthands. 
1474  
1475 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
1476  
1477         [CSS Parser] Support -webkit-background-composite 
1478         https://bugs.webkit.org/show_bug.cgi?id=164179 
1479  
1480         Reviewed by Zalan Bujtas. 
1481  
1482         * css/parser/CSSPropertyParser.cpp: 
1483         (WebCore::consumeBackgroundComponent): 
1484         (WebCore::CSSPropertyParser::parseSingleValue): 
1485  
1486 2016-10-29  Youenn Fablet  <youenn@apple.com> 
1487  
1488         REGRESSION (r207754): LayoutTest http/tests/security/svg-image-with-css-cross-domain.html is a flaky failure 
1489         https://bugs.webkit.org/show_bug.cgi?id=163922 
1490  
1491         Reviewed by Alex Christensen. 
1492  
1493         Test: http/tests/security/cached-svg-image-with-css-cross-domain.html 
1494  
1495         Raw data was not copied in cloned CachedCSSStyleSheet while it is used by some of its clients. 
1496         Updated CachedCSSStyleSheet and CachedImage cloning to copy its raw data. 
1497  
1498         * loader/cache/CachedCSSStyleSheet.cpp: 
1499         (WebCore::CachedCSSStyleSheet::setBodyDataFrom): 
1500         * loader/cache/CachedImage.cpp: 
1501         (WebCore::CachedImage::setBodyDataFrom): 
1502         * loader/cache/CachedResource.h: 
1503         (WebCore::CachedResource::mayTryReplaceEncodedData): 
1504  
1505 2016-10-29  Youenn Fablet  <youenn@apple.com> 
1506  
1507         REGRESSION (Safari 10 / r189445): WKWebView and WebView no longer allow async XMLHttpRequest timeout to exceed 60 seconds 
1508         https://bugs.webkit.org/show_bug.cgi?id=163814 
1509         <rdar://problem/28917420> 
1510  
1511         Reviewed by Darin Adler. 
1512  
1513         Tests: http/tests/xmlhttprequest/resetting-timeout-to-zero.html 
1514                http/tests/xmlhttprequest/timeout-greater-than-default-network-timeout.html 
1515  
1516         * xml/XMLHttpRequest.cpp: 
1517         (WebCore::XMLHttpRequest::setTimeout): If the XHR timeout is active, resetting the timeout to zero should lead to using the default network timeout. 
1518         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. 
1519         (WebCore::XMLHttpRequest::createRequest): Setting network timeout to infinity if the XHR timeout is active. 
1520  
1521 2016-10-29  Youenn Fablet  <youenn@apple.com> 
1522  
1523         MediaEndpoint::generateDtlsInfo is not needed 
1524         https://bugs.webkit.org/show_bug.cgi?id=164130 
1525  
1526         Reviewed by Eric Carlson. 
1527  
1528         No change of behavior. 
1529  
1530         Removing MediaEndpoint::generateDtlsInfo as it can be called directly from createMediaEndpointOwr. 
1531  
1532         * Modules/mediastream/MediaEndpointPeerConnection.cpp: 
1533         (WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection): 
1534         * platform/mediastream/MediaEndpoint.cpp: 
1535         * platform/mediastream/MediaEndpoint.h: 
1536         * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp: 
1537         (WebCore::createMediaEndpointOwr): 
1538         * platform/mediastream/openwebrtc/MediaEndpointOwr.h: 
1539         * platform/mock/MockMediaEndpoint.cpp: 
1540         (WebCore::MockMediaEndpoint::MockMediaEndpoint): 
1541         (WebCore::MockMediaEndpoint::generateDtlsInfo): Deleted. 
1542         * platform/mock/MockMediaEndpoint.h: 
1543  
1544 2016-10-28  Wenson Hsieh  <wenson_hsieh@apple.com> 
1545  
1546         Unreviewed, add Input Events to the features list. 
1547  
1548         * features.json: 
1549  
1550 2016-10-28  Darin Adler  <darin@apple.com> 
1551  
1552         Fix mismerge that broke a CEReactions test. 
1553  
1554         * html/HTMLOptionsCollection.idl: Add back CEReactions to the remove function. 
1555  
1556 2016-10-28  Darin Adler  <darin@apple.com> 
1557  
1558         Move all classes in the HTML directory from ExceptionCode to Exception 
1559         https://bugs.webkit.org/show_bug.cgi?id=163876 
1560  
1561         Reviewed by Sam Weinig. 
1562  
1563         * bindings/js/JSDOMBinding.cpp: 
1564         (WebCore::shouldAllowAccessToNode): Deleted. 
1565         (WebCore::BindingSecurity::shouldAllowAccessToFrame): Moved function into the 
1566         BindingSecurity namespace. Also changed arguments to references. 
1567         (WebCore::BindingSecurity::shouldAllowAccessToDOMWindow): Ditto. 
1568         (WebCore::BindingSecurity::shouldAllowAccessToNode): Changed argument type 
1569         from pointer to reference. 
1570  
1571         * bindings/js/JSDOMBinding.h: Removed top level shouldAllowAccessTo functions, 
1572         moving all of them into the BindingSecurity namespace. Changed BindingSecurity 
1573         from a class into a namespace. Added new checkSecurityForNode functions that 
1574         can be used directly to implement CheckSecurityForNode; they turn the node 
1575         into a null, which is no change in behavior from what bindings already did. 
1576  
1577         * bindings/js/JSDOMWindowCustom.cpp: 
1578         (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess): Changed argument 
1579         type for passed-in string to const String& instead of String&. 
1580         (WebCore::JSDOMWindow::getOwnPropertySlot): Updated for BindingSecurity changes. 
1581         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex): Ditto. 
1582         (WebCore::JSDOMWindow::put): Ditto. 
1583  
1584         * bindings/js/JSHTMLCanvasElementCustom.cpp: 
1585         (WebCore::attributesFor3DContext): Renamed from get3DContextAttributes and 
1586         changed to use a return value instead of an out argument. 
1587         (WebCore::JSHTMLCanvasElement::getContext): Updated for the above. 
1588         (WebCore::JSHTMLCanvasElement::toDataURL): Rewrote to handle ExceptionOr 
1589         and also to use Optional<double> instead of const double*. 
1590  
1591         * bindings/js/JSHTMLFrameElementCustom.cpp: 
1592         (WebCore::JSHTMLFrameElement::setLocation): Moved the logic from 
1593         allowSettingJavascriptURL in here and updated for BindingSecurity changes. 
1594  
1595         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: 
1596         (WebCore::JSHTMLOptionsCollection::setLength): Use propagateException. 
1597         Also streamlined the code a bit. 
1598         (WebCore::JSHTMLOptionsCollection::indexSetter): Updated for new name and 
1599         argument types for selectElementIndexSetter. 
1600  
1601         * bindings/js/JSHTMLSelectElementCustom.cpp: 
1602         (WebCore::selectElementIndexSetter): Updated name and argument types and 
1603         to use propagateException. 
1604         (WebCore::JSHTMLSelectElement::indexSetter): Updated for above. 
1605         * bindings/js/JSHTMLSelectElementCustom.h: Ditto. 
1606  
1607         * bindings/js/JSLocationCustom.cpp: 
1608         (WebCore::JSLocation::getOwnPropertySlotDelegate): Updated for changes to 
1609         BindingSecurity. 
1610         (WebCore::JSLocation::putDelegate): Ditto. Also rearranged logic a bit. 
1611  
1612         * bindings/js/ScriptController.cpp: 
1613         (WebCore::ScriptController::canAccessFromCurrentOrigin): Updated for 
1614         changes to BindingSecurity. 
1615  
1616         * bindings/scripts/CodeGeneratorJS.pm: 
1617         (GenerateImplementation): Removed old support for CheckSecurityForNode. 
1618         (NativeToJSValue): Added new support for CheckSecurityForNode, which uses 
1619         the new checkSecurityForNode function, and works properly with ExceptionOr. 
1620  
1621         * bindings/scripts/test/JS/JSTestObj.cpp: Updated for change below. 
1622  
1623         * dom/ChildNode.idl: Move the remove function to non-legacy exception. 
1624         Needed now because this needs to match the one in HTMLSelectElement. 
1625  
1626         * dom/Element.cpp: 
1627         (WebCore::Element::dispatchMouseForceWillBegin): Refactored a little bit. 
1628         (WebCore::Element::mergeWithNextTextNode): Support ExceptionOr for remove. 
1629         (WebCore::Element::setOuterHTML): Support ExceptionOr for 
1630         createFragmentForInnerOuterHTML. 
1631         (WebCore::Element::setInnerHTML): Ditto. 
1632         (WebCore::Element::insertAdjacentHTML): Ditto. 
1633  
1634         * dom/Node.cpp: 
1635         (WebCore::Node::remove): Use ExceptionOr. 
1636         (WebCore::Node::normalize): Remove use of IGNORE_EXCEPTION. 
1637         * dom/Node.h: Use ExceptionOr for remove. 
1638  
1639         * dom/Range.cpp: 
1640         (WebCore::Range::insertNode): Updated for change to remove. 
1641         (WebCore::Range::createContextualFragment): Updated for change 
1642         to WebCore::createContextualFragment. 
1643  
1644         * dom/ShadowRoot.cpp: 
1645         (WebCore::ShadowRoot::setInnerHTML): Use ExceptionOr for 
1646         createFragmentForInnerOuterHTML and replaceChildrenWithFragment. 
1647  
1648         * editing/AppendNodeCommand.cpp: 
1649         (WebCore::AppendNodeCommand::doUnapply): Remove IGNORE_EXCEPTION. 
1650         * editing/InsertNodeBeforeCommand.cpp: 
1651         (WebCore::InsertNodeBeforeCommand::doUnapply): Ditto. 
1652         * editing/MergeIdenticalElementsCommand.cpp: 
1653         (WebCore::MergeIdenticalElementsCommand::doApply): Ditto. 
1654         * editing/RemoveNodeCommand.cpp: 
1655         (WebCore::RemoveNodeCommand::doApply): Ditto. 
1656         * editing/SplitElementCommand.cpp: 
1657         (WebCore::SplitElementCommand::doUnapply): Ditto. 
1658         * editing/SplitTextNodeCommand.cpp: 
1659         (WebCore::SplitTextNodeCommand::doUnapply): Ditto. 
1660         * editing/WrapContentsInDummySpanCommand.cpp: 
1661         (WebCore::WrapContentsInDummySpanCommand::doUnapply): Ditto. 
1662  
1663         * editing/Editor.cpp: 
1664         (WebCore::Editor::insertDictationPhrases): Deleted. Moved this 
1665         iOS-specific function to EditorIOS.mm. 
1666         (WebCore::Editor::setDictationPhrasesAsChildOfElement): Ditto. 
1667         (WebCore::Editor::confirmMarkedText): Ditto. 
1668         (WebCore::Editor::setTextAsChildOfElement): Ditto. 
1669         (WebCore::Editor::ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTyping): Ditto. 
1670  
1671         * editing/ios/EditorIOS.mm: 
1672         (WebCore::Editor::fontForSelection): Remove ASSERT_NO_EXCEPTION. 
1673         (WebCore::Editor::fontAttributesForSelectionStart): Ditto. 
1674         (WebCore::Editor::insertDictationPhrases): Moved here from Editor.cpp. 
1675         (WebCore::Editor::setDictationPhrasesAsChildOfElement): Ditto. Also 
1676         updated code that used remove to not pass an ExceptionCode. 
1677         (WebCore::Editor::confirmMarkedText): Ditto. 
1678         (WebCore::Editor::setTextAsChildOfElement): Ditto. 
1679         (WebCore::Editor::ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTyping): Ditto. 
1680  
1681         * editing/mac/EditorMac.mm: 
1682         (WebCore::Editor::fontForSelection): Remove ASSERT_NO_EXCEPTION. 
1683         (WebCore::Editor::fontAttributesForSelectionStart): Ditto. 
1684  
1685         * editing/markup.cpp: 
1686         (WebCore::createFragmentForInnerOuterHTML): Use ExceptionOr. 
1687         (WebCore::createContextualFragment): Ditto. 
1688         (WebCore::replaceChildrenWithFragment): Ditto. 
1689         (WebCore::replaceChildrenWithText): Ditto. 
1690         * editing/markup.h: Updated for above changes. 
1691  
1692         * html/BaseChooserOnlyDateAndTimeInputType.cpp: 
1693         (WebCore::BaseChooserOnlyDateAndTimeInputType::updateAppearance): 
1694         Removed ASSERT_NO_EXCEPTION. 
1695  
1696         * html/BaseDateAndTimeInputType.cpp: 
1697         (WebCore::BaseDateAndTimeInputType::setValueAsDate): Use ExceptionOr. 
1698         (WebCore::BaseDateAndTimeInputType::setValueAsDecimal): Ditto. 
1699         * html/BaseDateAndTimeInputType.h: Updated for above changes. 
1700  
1701         * html/DateTimeLocalInputType.cpp: 
1702         (WebCore::DateTimeLocalInputType::setValueAsDate): Use ExceptionOr. 
1703         * html/DateTimeLocalInputType.h: Updated for above changes. 
1704  
1705         * html/DOMTokenList.cpp: 
1706         (WebCore::DOMTokenList::validateToken): Use ExceptionOr. 
1707         (WebCore::DOMTokenList::validateTokens): Ditto. 
1708         (WebCore::DOMTokenList::addInternal): Ditto. 
1709         (WebCore::DOMTokenList::add): Ditto. 
1710         (WebCore::DOMTokenList::removeInternal): Ditto. 
1711         (WebCore::DOMTokenList::remove): Ditto. 
1712         (WebCore::DOMTokenList::toggle): Ditto. 
1713         (WebCore::DOMTokenList::replace): Ditto. 
1714         (WebCore::DOMTokenList::supports): Ditto. 
1715         * html/DOMTokenList.h: Updated for above changes. 
1716         * html/DOMTokenList.idl: Use non-legacy exceptions. 
1717  
1718         * html/DOMURL.cpp: 
1719         (WebCore::DOMURL::DOMURL): Just take the two URL objects and let 
1720         the create functions do all the processing. 
1721         (WebCore::DOMURL::create): Use ExceptionOr, and move the processing 
1722         of the URLs here out of the constructors. 
1723         (WebCore::DOMURL::setHref): Use ExceptionOr. 
1724         * html/DOMURL.h: Updated for above changes. 
1725         * html/DOMURL.idl: Use non-legacy exceptions. 
1726  
1727         * html/FTPDirectoryDocument.cpp: 
1728         (WebCore::FTPDirectoryDocumentParser::appendEntry): Remove 
1729         IGNORE_EXCEPTION and use releaseReturnValue(). 
1730  
1731         * html/HTMLCanvasElement.cpp: 
1732         (WebCore::HTMLCanvasElement::toDataURL): Use ExceptionOr. 
1733         * html/HTMLCanvasElement.h: Updated for above changes. 
1734         * html/HTMLCanvasElement.idl: Use non-legacy exception. 
1735  
1736         * html/HTMLElement.cpp: 
1737         (WebCore::HTMLElement::textToFragment): Use ExceptionOr. 
1738         (WebCore::HTMLElement::setInnerText): Ditto. 
1739         (WebCore::HTMLElement::setOuterText): Ditto. 
1740         (WebCore::HTMLElement::setContentEditable): Ditto. 
1741         (WebCore::HTMLElement::translateAttributeMode): Deleted. 
1742         (WebCore::HTMLElement::translate): Moved the logic from the 
1743         translateAttributeMode function in here. 
1744         * html/HTMLElement.h: Updated for above changes. 
1745         * html/HTMLElement.idl: Use non-legacy exceptions. 
1746  
1747         * html/HTMLEmbedElement.idl: Use non-legacy exception. 
1748         * html/HTMLFrameElement.idl: Ditto. 
1749  
1750         * html/HTMLFrameOwnerElement.cpp: 
1751         (WebCore::HTMLFrameOwnerElement::getSVGDocument): Use ExceptionOr. 
1752         * html/HTMLFrameOwnerElement.h: Updated for above. 
1753  
1754         * html/HTMLIFrameElement.idl: Use non-legacy exception. 
1755  
1756         * html/HTMLInputElement.cpp: 
1757         (WebCore::HTMLInputElement::stepUp): Use ExceptionOr. 
1758         (WebCore::HTMLInputElement::stepDown): Ditto. 
1759         (WebCore::HTMLInputElement::setValue): Ditto. 
1760         (WebCore::HTMLInputElement::setValueAsDate): Ditto. 
1761         (WebCore::HTMLInputElement::setValueAsNumber): Ditto. 
1762         (WebCore::HTMLInputElement::setSize): Ditto. 
1763         (WebCore::HTMLInputElement::maxLengthAttributeChanged): Use the 
1764         new internalSetMaxLength function; old code relied on a setMaxLength 
1765         that was different from the one exposed to bindings. 
1766         (WebCore::HTMLInputElement::minLengthAttributeChanged): Ditto. 
1767         (WebCore::HTMLInputElement::setRangeText): Use ExceptionOr. 
1768         * html/HTMLInputElement.h: Updated for above changes. Also use 
1769         data member initialization for InputElementClickState instead of 
1770         a constructor. 
1771         * html/HTMLInputElement.idl: Use non-legacy exception. 
1772  
1773         * html/HTMLMarqueeElement.cpp: 
1774         (WebCore::HTMLMarqueeElement::setLoop): Use ExceptionOr. 
1775         (WebCore::HTMLMarqueeElement::renderMarquee): Tweaked. 
1776         * html/HTMLMarqueeElement.h: Updated for above changes. 
1777         * html/HTMLMarqueeElement.idl: Ditto. 
1778  
1779         * html/HTMLMediaElement.cpp: 
1780         (WebCore::HTMLMediaElement::TrackGroup::TrackGroup): 
1781         Initialize most data members in class definition rather than 
1782         the constructor. 
1783         (WebCore::HTMLMediaElement::HTMLMediaElement): Ditto. 
1784         (WebCore::HTMLMediaElement::~HTMLMediaElement): Updated since 
1785         removeMediaElement now takes a reference. 
1786         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Use 
1787         a modern for loop to streamline code. 
1788         (WebCore::HTMLMediaElement::textTrackModeChanged): Updated since 
1789         track now returns a reference. 
1790         (WebCore::HTMLMediaElement::setCurrentTimeForBindings): Renamed 
1791         to prevent ambiguity with the other version that has slightly 
1792         different semantics and overloading and changed to use ExceptionOr. 
1793         (WebCore::HTMLMediaElement::playInternal): Updated to use reference. 
1794         (WebCore::HTMLMediaElement::setVolume): Use ExceptionOr. 
1795         (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Take a 
1796         reference instead of a PassRefPtr. 
1797         (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Ditto. 
1798         (WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack): Ditto. 
1799         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveAudioTrack): Ditto. 
1800         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveTextTrack): Ditto. 
1801         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveVideoTrack): Ditto. 
1802         (WebCore::HTMLMediaElement::addTextTrack): Use ExceptionOr. 
1803         (WebCore::HTMLMediaElement::didAddTextTrack): Use a reference. 
1804         (WebCore::HTMLMediaElement::didRemoveTextTrack): Ditto. 
1805         (WebCore::HTMLMediaElement::maxBufferedTime): Update to use different 
1806         interface to time ranges that does not need to deal with exceptions. 
1807         (WebCore::HTMLMediaElement::setController): Pass references. 
1808         (WebCore::HTMLMediaElement::outOfBandTrackSources): Use reference. 
1809         * html/HTMLMediaElement.h: Updated for above. 
1810         * html/HTMLMediaElement.idl: Use non-legacy exceptions. 
1811
1812         * html/HTMLObjectElement.idl: Use non-legacy exception. 
1813      
1814         * html/HTMLOptionElement.cpp: 
1815         (WebCore::HTMLOptionElement::createForJSConstructor): Use ExceptionOr. 
1816         * html/HTMLOptionElement.h: Updated for above change. 
1817         * html/HTMLOptionElement.idl: Use non-legacy exception. 
1818
1819         * html/HTMLOptionsCollection.cpp: 
1820         (WebCore::HTMLOptionsCollection::setLength): Use ExceptionOr. 
1821         * html/HTMLOptionsCollection.h: Updated for above change. 
1822         * html/HTMLOptionsCollection.idl: Use non-legacy exception. 
1823  
1824         * html/HTMLProgressElement.cpp: 
1825         (WebCore::HTMLProgressElement::setValue): Removed non-finite handling 
1826         because that is now handled by the bindings. 
1827         (WebCore::HTMLProgressElement::setMax): Ditto. 
1828         * html/HTMLProgressElement.h: Updated for above. 
1829         * html/HTMLProgressElement.idl: Changed attributes to be double instead 
1830         of unrestricted double, and this was able to remove exceptions. 
1831  
1832         * html/HTMLSelectElement.cpp: 
1833         (WebCore::HTMLSelectElement::removeByIndex): Drop IGNORE_EXCEPTION. 
1834         (WebCore::HTMLSelectElement::remove): Use ExceptionOr. 
1835         (WebCore::HTMLSelectElement::setOption): Ditto. 
1836         (WebCore::HTMLSelectElement::setLength): Ditto. 
1837         * html/HTMLSelectElement.h: Updated for above changes. 
1838         * html/HTMLSelectElement.idl: Use non-legacy exceptions. 
1839  
1840         * html/HTMLTableElement.cpp: 
1841         (WebCore::HTMLTableElement::setCaption): Use ExceptionOr. 
1842         (WebCore::HTMLTableElement::setTHead): Ditto. 
1843         (WebCore::HTMLTableElement::setTFoot): Ditto. 
1844         (WebCore::HTMLTableElement::createTHead): Streamline a bit. 
1845         (WebCore::HTMLTableElement::deleteTHead): Ditto. 
1846         (WebCore::HTMLTableElement::createTFoot): Ditto. 
1847         (WebCore::HTMLTableElement::deleteTFoot): Ditto. 
1848         (WebCore::HTMLTableElement::createTBody): Ditto. 
1849         (WebCore::HTMLTableElement::createCaption): Ditto. 
1850         (WebCore::HTMLTableElement::insertRow): Use ExceptionOr. 
1851         (WebCore::HTMLTableElement::deleteRow): Ditto. 
1852         * html/HTMLTableElement.h: Updated for above changes. 
1853         * html/HTMLTableElement.idl: Use non-legacy exceptions. 
1854  
1855         * html/HTMLTableRowElement.cpp: 
1856         (WebCore::findTable): Added. 
1857         (WebCore::HTMLTableRowElement::rowIndex): Streamline a bit using the 
1858         findTable function above. 
1859         (WebCore::findRows): Added. 
1860         (WebCore::HTMLTableRowElement::sectionRowIndex): Streamline a bit using 
1861         the findRows function above. 
1862         (WebCore::HTMLTableRowElement::insertCell): Use ExceptionOr. 
1863         (WebCore::HTMLTableRowElement::deleteCell): Ditto. 
1864         (WebCore::HTMLTableRowElement::setCells): Deleted. 
1865         * html/HTMLTableRowElement.h: Updated for the above. The setCells function 
1866         was dead code. 
1867         * html/HTMLTableRowElement.idl: Use non-legacy exceptions. 
1868  
1869         * html/HTMLTableSectionElement.cpp: 
1870         (WebCore::HTMLTableSectionElement::additionalPresentationAttributeStyle): 
1871         Tweaked a bit to use early return. 
1872         (WebCore::HTMLTableSectionElement::insertRow): Use ExceptionOr. 
1873         (WebCore::HTMLTableSectionElement::deleteRow): Ditto. 
1874         (WebCore::HTMLTableSectionElement::numRows): Use childrenOfType. 
1875         (WebCore::HTMLTableSectionElement::align): Deleted. 
1876         (WebCore::HTMLTableSectionElement::setAlign): Deleted. 
1877         (WebCore::HTMLTableSectionElement::ch): Deleted. 
1878         (WebCore::HTMLTableSectionElement::setCh): Deleted. 
1879         (WebCore::HTMLTableSectionElement::chOff): Deleted. 
1880         (WebCore::HTMLTableSectionElement::setChOff): Deleted. 
1881         (WebCore::HTMLTableSectionElement::vAlign): Deleted. 
1882         (WebCore::HTMLTableSectionElement::setVAlign): Deleted. 
1883         * html/HTMLTableSectionElement.h: Updated for the above. 
1884         * html/HTMLTableSectionElement.idl: Use non-legacy exception. 
1885  
1886         * html/HTMLTextAreaElement.cpp: 
1887         (WebCore::HTMLTextAreaElement::maxLengthAttributeChanged): Use the new 
1888         internalSetMaxLength function; old code relied on a setMaxLength 
1889         that was different from the one exposed to bindings. 
1890         (WebCore::HTMLTextAreaElement::minLengthAttributeChanged): Ditto. 
1891         (WebCore::HTMLTextAreaElement::updatePlaceholderText): Removed 
1892         ASSERT_NO_EXCEPTION. 
1893         * html/HTMLTextAreaElement.idl: Use non-legacy exceptions. 
1894  
1895         * html/HTMLTextFormControlElement.cpp: 
1896         (WebCore::HTMLTextFormControlElement::setRangeText): Use ExceptionOr. 
1897         (WebCore::HTMLTextFormControlElement::setInnerTextValue): Ditto. 
1898         (WebCore::HTMLTextFormControlElement::setMaxLength): Ditto. 
1899         (WebCore::HTMLTextFormControlElement::setMinLength): Ditto. 
1900         * html/HTMLTextFormControlElement.h: Updated for above changes. 
1901         Also renamed the setMin/MaxLength function overloads for internal use 
1902         to internSetMin/MaxLength and made them protected. 
1903  
1904         * html/HTMLTrackElement.cpp: 
1905         (WebCore::HTMLTrackElement::~HTMLTrackElement): Call clearElement on the 
1906         track to break the connection. Before this was done as a side effect of 
1907         clearClient, but that is called in other cases where we do not want to 
1908         clear the link back to the track element. 
1909         (WebCore::HTMLTrackElement::insertedInto): Removed code that uses the 
1910         track function for its side effect of creating a track; no longer needed. 
1911         Rewrote this so it's more symmetric with removedFrom. 
1912         (WebCore::HTMLTrackElement::removedFrom): Pass reference. Also reordered 
1913         and removed an unnecessary check for null parent. 
1914         (WebCore::HTMLTrackElement::parseAttribute): Use track. 
1915         (WebCore::HTMLTrackElement::kind): Ditto. 
1916         (WebCore::HTMLTrackElement::track): Renamed ensureTrack to this. Also 
1917         removed the redundant code to call setTrackElement; we no longer change 
1918         the track element on a track until the track element is destroyed. 
1919         (WebCore::HTMLTrackElement::scheduleLoad): Use track. 
1920         (WebCore::HTMLTrackElement::loadTimerFired): Ditto. 
1921         (WebCore::HTMLTrackElement::setReadyState): Ditto. 
1922         (WebCore::HTMLTrackElement::readyState): Ditto. 
1923         (WebCore::HTMLTrackElement::mediaElement): Rearranged to use early return. 
1924         * html/HTMLTrackElement.h: Updated for above changes. 
1925  
1926         * html/HTMLVideoElement.cpp: 
1927         (WebCore::HTMLVideoElement::webkitEnterFullscreen): Use ExceptionOr. 
1928         * html/HTMLVideoElement.h: Removed the functions used just for 
1929         capitalization reasons; that's now handled in the bindings. 
1930         * html/HTMLVideoElement.idl: Use non-legacy bindings and ImplementedAs. 
1931  
1932         * html/ImageData.cpp: 
1933         (WebCore::ImageData::create): Return ExceptionOr. 
1934         * html/ImageData.h: Updated for above changes. 
1935         * html/ImageData.idl: Use non-legacy exceptions. 
1936  
1937         * html/InputType.cpp: 
1938         (WebCore::InputType::setValueAsDate): Use ExceptionOr. 
1939         (WebCore::InputType::setValueAsDouble): Ditto. 
1940         (WebCore::InputType::setValueAsDecimal): Ditto. 
1941         (WebCore::InputType::applyStep): Ditto. 
1942         (WebCore::InputType::stepUp): Ditto. 
1943         (WebCore::InputType::stepUpFromRenderer): Removed IGNORE_EXCEPTION. 
1944         * html/InputType.h: Updated for the above. 
1945  
1946         * html/MediaController.cpp: 
1947         (MediaController::addMediaElement): Take a reference instead of a pointer. 
1948         (MediaController::removeMediaElement): Ditto. 
1949         (MediaController::containsMediaElement): Ditto. 
1950         (MediaController::setVolume): Use ExceptionOr. 
1951         (MediaController::bringElementUpToSpeed): Take a reference. 
1952         * html/MediaController.h: Updated for above changes. Also made lots of 
1953         function overrides private. 
1954         * html/MediaController.idl: Use non-legacy exception. 
1955  
1956         * html/MediaControllerInterface.h: Use ExceptionOr for setVolume. 
1957  
1958         * html/NumberInputType.cpp: 
1959         (WebCore::RealNumberRenderSize::max): Use aggregate initialization instead 
1960         of a constructor. 
1961         (WebCore::calculateRenderSize): Ditto. 
1962         (WebCore::NumberInputType::setValueAsDouble): Use ExceptionOr. 
1963         (WebCore::NumberInputType::setValueAsDecimal): Ditto. 
1964         * html/NumberInputType.h: Updated for above changes. 
1965  
1966         * html/RangeInputType.cpp: 
1967         (WebCore::RangeInputType::RangeInputType): Initialize scalar data member 
1968         in class definition instead of here. 
1969         (WebCore::RangeInputType::setValueAsDecimal): Use ExceptionOr. 
1970         (WebCore::RangeInputType::handleKeydownEvent): Removed IGNORE_EXCEPTION. 
1971         * html/RangeInputType.h: Updated for above changes. 
1972  
1973         * html/TextFieldInputType.cpp: 
1974         (WebCore::TextFieldInputType::updatePlaceholderText): Removed 
1975         ASSERT_NO_EXCEPTION. 
1976  
1977         * html/TimeRanges.cpp: 
1978         (WebCore::TimeRanges::start): Use ExceptionOr. 
1979         (WebCore::TimeRanges::end): Ditto. 
1980         * html/TimeRanges.h: Updated for the above. 
1981         * html/TimeRanges.idl: Use non-legacy exceptions. 
1982  
1983         * html/URLUtils.idl: Use non-legacy exception. 
1984  
1985         * html/ValidationMessage.cpp: 
1986         (WebCore::ValidationMessage::setMessageDOMAndStartTimer): Removed 
1987         ASSERT_NO_EXCEPTION, IGNORE_EXCEPTION, and other exception-ignoring idioms. 
1988         * html/parser/HTMLTreeBuilder.cpp: 
1989         (WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto. 
1990         * html/shadow/MediaControlElementTypes.cpp: 
1991         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Ditto. 
1992         * html/shadow/MediaControlElements.cpp: 
1993         (WebCore::MediaControlPanelElement::setPosition): Ditto. 
1994         (WebCore::MediaControlPanelElement::resetPosition): Ditto. 
1995         (WebCore::MediaControlStatusDisplayElement::update): Ditto. 
1996         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Ditto. 
1997         (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): Ditto. 
1998         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): Ditto. 
1999         * html/shadow/MediaControls.cpp: 
2000         (WebCore::MediaControls::updateCurrentTimeDisplay): Ditto. 
2001         * html/shadow/MediaControlsApple.cpp: 
2002         (WebCore::MediaControlsApple::updateCurrentTimeDisplay): Ditto. 
2003  
2004         * html/track/LoadableTextTrack.cpp: 
2005         (WebCore::LoadableTextTrack::LoadableTextTrack): Take reference. 
2006         (WebCore::LoadableTextTrack::~LoadableTextTrack): Deleted. 
2007         (WebCore::LoadableTextTrack::clearClient): Deleted override. We no longer 
2008         want to clear m_trackElement when clearing the client. 
2009         (WebCore::LoadableTextTrack::setTrackElement): Deleted. 
2010         (WebCore::LoadableTextTrack::id): Changed to use 
2011         attributeWithoutSynchronization for better performance and idAttr instead 
2012         of a string constant. 
2013         * html/track/LoadableTextTrack.h: Updated for above changes. Added a new 
2014         clearElement function. Made the element and isDefault functions private. 
2015  
2016         * html/track/VTTCue.cpp: 
2017         (WebCore::VTTCue::~VTTCue): Removed ASSERT_NO_EXCEPTION, IGNORE_EXCEPTION, 
2018         and other exception-ignoring idioms. 
2019         (WebCore::VTTCue::removeDisplayTree): Ditto. 
2020         * html/track/VTTRegion.cpp: 
2021         (WebCore::VTTRegion::displayLastTextTrackCueBox): Ditto. 
2022         (WebCore::VTTRegion::willRemoveTextTrackCueBox): Ditto. 
2023  
2024         * inspector/InspectorDOMAgent.cpp: 
2025         (WebCore::InspectorDOMAgent::pushNodeByBackendIdToFrontend): 
2026         Rewrote to avoid multiplehash table lookups and added a FIXME about 
2027         the peculiar code here. 
2028         (WebCore::InspectorDOMAgent::resolveNode): Streamlined. 
2029         (WebCore::InspectorDOMAgent::nodeAsScriptValue): Use the new 
2030         checkSecurityForNode instead of the old shouldAllowAccessToNode. 
2031  
2032         * platform/graphics/ImageBuffer.h: Take Optional<double> instead of 
2033         const double* in toDataURL. Renamed ImageDataToDataURL to just dataURL. 
2034  
2035         * platform/graphics/MediaPlayer.cpp: 
2036         (WebCore::MediaPlayer::addAudioTrack): Take a reference instead of PassRefPtr. 
2037         (WebCore::MediaPlayer::removeAudioTrack): Ditto. 
2038         (WebCore::MediaPlayer::addTextTrack): Ditto. 
2039         (WebCore::MediaPlayer::removeTextTrack): Ditto. 
2040         (WebCore::MediaPlayer::addVideoTrack): Ditto. 
2041         (WebCore::MediaPlayer::removeVideoTrack): Ditto. 
2042         * platform/graphics/MediaPlayer.h: Updated for the above. 
2043  
2044         * platform/graphics/PlatformTimeRanges.h: Exported a couple of functions 
2045         that are now used in WebKit. 
2046  
2047         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: 
2048         (WebCore::MediaPlayerPrivateAVFoundation::clearTextTracks): Use a modern for loop. 
2049         (WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks): 
2050         Fixed a bug that would cause this function to fail to process half the tracks. 
2051         Also updated for the change from PassRefPtr to references. 
2052  
2053         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 
2054         (WebCore::determineChangedTracksFromNewTracksAndOldItems): Pass references. 
2055         (WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider): Ditto. 
2056         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): Ditto. 
2057         (WebCore::assetMetadataKeyNames): Tweaked formatting. 
2058         (WebCore::itemKVOProperties): Ditto. 
2059         (WebCore::playerKVOProperties): Ditto. 
2060  
2061         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: 
2062         (WebCore::updateTracksOfType): Pass references. 
2063  
2064         * platform/graphics/cairo/ImageBufferCairo.cpp: 
2065         (WebCore::ImageBuffer::toDataURL): Use Optional<double> 
2066  
2067         * platform/graphics/cg/ImageBufferCG.cpp: 
2068         (WebCore::createBitmapImageAfterScalingIfNeeded): Use auto. 
2069         (WebCore::encodeImage): Ditto. Also renamed from CGImageEncodeToData. 
2070         (WebCore::dataURL): Ditto. Also renamed from CGImageToDataURL and from 
2071         ImageDataToDataURL. 
2072         (WebCore::ImageBuffer::toDataURL): Ditto. 
2073  
2074         * platform/graphics/efl/ImageBufferEfl.cpp: 
2075         (WebCore::encodeImageJPEG): Use Optional<double> 
2076         (WebCore::ImageBuffer::toDataURL): Ditto. 
2077  
2078         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 
2079         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): Pass 
2080         a reference instead of pointer. 
2081         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Ditto. 
2082         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Ditto. 
2083         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection): Ditto. 
2084         (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Ditto. 
2085  
2086         * platform/graphics/gtk/ImageBufferGtk.cpp: 
2087         (WebCore::encodeImage): Use Optional<double> 
2088         (WebCore::ImageBuffer::toDataURL): Ditto. 
2089  
2090 2016-10-28  Dave Hyatt  <hyatt@apple.com> 
2091  
2092         [CSS Parser] Allow @font-face src descriptor's format function to contain identifiers 
2093         https://bugs.webkit.org/show_bug.cgi?id=164169 
2094  
2095         Reviewed by Simon Fraser. 
2096  
2097         * css/parser/CSSPropertyParser.cpp: 
2098         (WebCore::consumeFontFaceSrcURI): 
2099  
2100 2016-10-28  Jer Noble  <jer.noble@apple.com> 
2101  
2102         WebAudio does not resume when moving from background to foreground tab. 
2103         https://bugs.webkit.org/show_bug.cgi?id=164043 
2104  
2105         Reviewed by Darin Adler. 
2106  
2107         Test: webaudio/page-canstartmedia.html 
2108  
2109         * Modules/webaudio/AudioContext.cpp: 
2110         (WebCore::AudioContext::mediaCanStart): 
2111  
2112 2016-10-28  Wenson Hsieh  <wenson_hsieh@apple.com> 
2113  
2114         iOS autocorrection does not trigger an input event of inputType "insertReplacementText" 
2115         https://bugs.webkit.org/show_bug.cgi?id=164077 
2116         <rdar://problem/28987810> 
2117  
2118         Reviewed by Simon Fraser. 
2119  
2120         Fixes candidate insertion on iOS, so that it fires input events of type "insertReplacementText" and adds two 
2121         iOS unit tests covering this change as well as the test infrastructure needed to support these tests. See 
2122         comments below for more details. 
2123  
2124         Tests: fast/events/ios/before-input-events-prevent-candidate-insertion.html 
2125                fast/events/ios/input-events-insert-replacement-text.html 
2126  
2127         * dom/TextEvent.h: 
2128  
2129         Adds isAutocompletion() to TextEvent, as well as the TextEventInputAutocompletion text input type. When the 
2130         Editor handles this TextEvent, it will use this information when creating or modifying the corresponding typing 
2131         command. 
2132  
2133         * dom/TextEventInputType.h: 
2134         * editing/Editor.cpp: 
2135         (WebCore::Editor::insertText): 
2136         (WebCore::Editor::insertTextWithoutSendingTextEvent): 
2137         * editing/Editor.h: 
2138         * editing/TypingCommand.cpp: 
2139         (WebCore::editActionForTypingCommand): 
2140  
2141         Now takes whether the command is autocorrection into account. If so, the corresponding edit action should be 
2142         EditActionInsertReplacement rather than EditActionTypingInsertText. 
2143  
2144         (WebCore::TypingCommand::TypingCommand): 
2145         (WebCore::TypingCommand::deleteSelection): 
2146         (WebCore::TypingCommand::deleteKeyPressed): 
2147         (WebCore::TypingCommand::forwardDeleteKeyPressed): 
2148         (WebCore::TypingCommand::insertText): 
2149         (WebCore::TypingCommand::insertLineBreak): 
2150         (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent): 
2151         (WebCore::TypingCommand::insertParagraphSeparator): 
2152         (WebCore::TypingCommand::inputEventData): 
2153         (WebCore::TypingCommand::willAddTypingToOpenCommand): 
2154         * editing/TypingCommand.h: 
2155  
2156         Adds a new TypingCommand option, IsAutocompletion. 
2157  
2158 2016-10-28  Commit Queue  <commit-queue@webkit.org> 
2159  
2160         Unreviewed, rolling out r207700. 
2161         https://bugs.webkit.org/show_bug.cgi?id=164168 
2162  
2163         We are ready after r208086 (Requested by alexchristensen on 
2164         #webkit). 
2165  
2166         Reverted changeset: 
2167  
2168         "Unreviewed, rolling out r207582." 
2169         https://bugs.webkit.org/show_bug.cgi?id=163819 
2170         http://trac.webkit.org/changeset/207700 
2171  
2172 2016-10-28  Dave Hyatt  <hyatt@apple.com> 
2173  
2174         [CSS Parser] Allow unknown properties in will-change 
2175         https://bugs.webkit.org/show_bug.cgi?id=164165 
2176  
2177         Reviewed by Simon Fraser. 
2178  
2179         * css/parser/CSSPropertyParser.cpp: 
2180         (WebCore::consumeWillChange): 
2181  
2182 2016-10-28  Alex Christensen  <achristensen@webkit.org> 
2183  
2184         Partially revert 207805 after resolution in URL spec issue 87 
2185         https://bugs.webkit.org/show_bug.cgi?id=164142 
2186  
2187         Reviewed by Andy Estes. 
2188  
2189         Covered by updated layout tests and API tests. 
2190  
2191         * platform/URLParser.cpp: 
2192         (WebCore::URLParser::isSingleDotPathSegment): 
2193         (WebCore::URLParser::isDoubleDotPathSegment): 
2194         (WebCore::URLParser::consumeSingleDotPathSegment): 
2195         (WebCore::URLParser::consumeDoubleDotPathSegment): 
2196         Treat %2e%2e as .. and %2e as . but only if it is entirety of the path segment. 
2197         There are tests for URLs like http://host/abc%2edef which have not changed because 
2198         the %2e is not the entirety of the path segment. 
2199  
2200 2016-10-28  Alex Christensen  <achristensen@webkit.org> 
2201  
2202         URLParser should not try to interpret host of URLs with unrecognized schemes as IPv4 address 
2203         https://bugs.webkit.org/show_bug.cgi?id=164154 
2204  
2205         Reviewed by Andy Estes. 
2206  
2207         This is needed to match behavior of all browsers. 
2208         This is being discussed in the spec at https://github.com/whatwg/url/issues/148 
2209  
2210         Covered by new API tests. 
2211  
2212         * platform/URLParser.cpp: 
2213         (WebCore::URLParser::parseHostAndPort): 
2214         Only try to parse and canonicalize the host as an IPv4 address if the scheme is special (http, wss, etc.) 
2215  
2216 2016-10-28  Chris Dumez  <cdumez@apple.com> 
2217  
2218         DOMStringMap reports properties as non-enumerable 
2219         https://bugs.webkit.org/show_bug.cgi?id=164114 
2220  
2221         Reviewed by Sam Weinig. 
2222  
2223         DOMStringMap's named properties should be configurable, enumerable 
2224         and writable as per: 
2225         - https://heycam.github.io/webidl/#getownproperty-guts (2.7-9) 
2226         - https://html.spec.whatwg.org/multipage/dom.html#domstringmap 
2227  
2228         Firefox and Chrome agree with the specification. However, WebKit 
2229         was doing the complete opposite. 
2230  
2231         No new tests, updated existing test. 
2232  
2233         * bindings/js/JSDOMStringMapCustom.cpp: 
2234         (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate): 
2235  
2236 2016-10-28  Ryosuke Niwa  <rniwa@webkit.org> 
2237  
2238         Add CEReactions to the remaining HTML DOM APIs 
2239         https://bugs.webkit.org/show_bug.cgi?id=163969 
2240  
2241         Reviewed by Chris Dumez. 
2242  
2243         Added CEReactions to the remaining DOM and HTML APIs as needed. 
2244  
2245         Tests: fast/custom-elements/reactions-for-indieui.html 
2246                fast/custom-elements/reactions/Document.html 
2247                fast/custom-elements/reactions/HTMLAnchorElement.html 
2248                fast/custom-elements/reactions/HTMLOptionElement.html 
2249                fast/custom-elements/reactions/HTMLOptionsCollection.html 
2250                fast/custom-elements/reactions/HTMLOutputElement.html 
2251                fast/custom-elements/reactions/HTMLSelectElement.html 
2252                fast/custom-elements/reactions/HTMLTableElement.html 
2253                fast/custom-elements/reactions/HTMLTableRowElement.html 
2254                fast/custom-elements/reactions/HTMLTableSectionElement.html 
2255                fast/custom-elements/reactions/HTMLTitleElement.html 
2256                fast/custom-elements/reactions/ShadowRoot.html 
2257  
2258         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: 
2259         (WebCore::JSHTMLOptionsCollection::setLength): 
2260         (WebCore::JSHTMLOptionsCollection::indexSetter): 
2261         * bindings/js/JSHTMLSelectElementCustom.cpp: 
2262         (WebCore::JSHTMLSelectElement::indexSetter): 
2263         * dom/CharacterData.idl: 
2264         * dom/Document.idl: 
2265         * dom/Element.idl: 
2266         * dom/ShadowRoot.idl: 
2267         * html/HTMLAnchorElement.idl: 
2268         * html/HTMLDocument.idl: 
2269         * html/HTMLOptionElement.idl: 
2270         * html/HTMLOptionsCollection.idl: 
2271         * html/HTMLOutputElement.idl: 
2272         * html/HTMLSelectElement.idl: 
2273         * html/HTMLTableElement.idl: 
2274         * html/HTMLTableRowElement.idl: 
2275         * html/HTMLTableSectionElement.idl: 
2276         * html/HTMLTitleElement.idl: 
2277  
2278 2016-10-28  Antoine Quint  <graouts@apple.com> 
2279  
2280         [Modern Media Controls] Media Controller: volume control support 
2281         https://bugs.webkit.org/show_bug.cgi?id=163727 
2282  
2283         Reviewed by Dean Jackson. 
2284  
2285         We introduce the VolumeSupport class which brings support for modifying the media 
2286         volume by interacting with the mute volume slider in the media controls and correctly 
2287         reflecting the media's volume should it be changed via the media API. 
2288  
2289         Tests: media/modern-media-controls/volume-support/volume-support-click.html 
2290                media/modern-media-controls/volume-support/volume-support-drag.html 
2291                media/modern-media-controls/volume-support/volume-support-media-api-mute.html 
2292                media/modern-media-controls/volume-support/volume-support-media-api.html 
2293  
2294         * Modules/modern-media-controls/js-files: 
2295         * Modules/modern-media-controls/media/media-controller.js: 
2296         (MediaController): 
2297         * Modules/modern-media-controls/media/volume-support.js: Added. 
2298         (VolumeSupport.prototype.get control): 
2299         (VolumeSupport.prototype.get mediaEvents): 
2300         (VolumeSupport.prototype.controlValueWillStartChanging): 
2301         (VolumeSupport.prototype.controlValueDidChange): 
2302         (VolumeSupport.prototype.syncControl): 
2303         (VolumeSupport): 
2304         * WebCore.xcodeproj/project.pbxproj: 
2305  
2306 2016-10-28  Yusuke Suzuki  <utatane.tea@gmail.com> 
2307  
2308         [DOMJIT] Rename CallDOM to CallDOMGetter 
2309         https://bugs.webkit.org/show_bug.cgi?id=164157 
2310  
2311         Reviewed by Keith Miller. 
2312  
2313         No behavior change. 
2314  
2315         * bindings/scripts/CodeGeneratorJS.pm: 
2316         (GenerateHeader): 
2317         * bindings/scripts/test/JS/JSTestDOMJIT.h: 
2318         * domjit/JSDocumentDOMJIT.cpp: 
2319         (WebCore::DocumentDocumentElementDOMJIT::callDOMGetter): 
2320         (WebCore::DocumentDocumentElementDOMJIT::callDOM): Deleted. 
2321         * domjit/JSNodeDOMJIT.cpp: 
2322         (WebCore::createCallDOMGetterForOffsetAccess): 
2323         (WebCore::NodeFirstChildDOMJIT::callDOMGetter): 
2324         (WebCore::NodeLastChildDOMJIT::callDOMGetter): 
2325         (WebCore::NodeNextSiblingDOMJIT::callDOMGetter): 
2326         (WebCore::NodePreviousSiblingDOMJIT::callDOMGetter): 
2327         (WebCore::NodeParentNodeDOMJIT::callDOMGetter): 
2328         (WebCore::NodeNodeTypeDOMJIT::callDOMGetter): 
2329         (WebCore::NodeOwnerDocumentDOMJIT::callDOMGetter): 
2330         (WebCore::createCallDOMForOffsetAccess): Deleted. 
2331         (WebCore::NodeFirstChildDOMJIT::callDOM): Deleted. 
2332         (WebCore::NodeLastChildDOMJIT::callDOM): Deleted. 
2333         (WebCore::NodeNextSiblingDOMJIT::callDOM): Deleted. 
2334         (WebCore::NodePreviousSiblingDOMJIT::callDOM): Deleted. 
2335         (WebCore::NodeParentNodeDOMJIT::callDOM): Deleted. 
2336         (WebCore::NodeNodeTypeDOMJIT::callDOM): Deleted. 
2337         (WebCore::NodeOwnerDocumentDOMJIT::callDOM): Deleted. 
2338  
2339 2016-10-28  Dave Hyatt  <hyatt@apple.com> 
2340  
2341         [CSS Parser] Fix font-family parsing inside @font-face 
2342         https://bugs.webkit.org/show_bug.cgi?id=164155 
2343  
2344         Reviewed by Simon Fraser. 
2345  
2346         * css/parser/CSSPropertyParser.cpp: 
2347         (WebCore::CSSPropertyParser::parseFontFaceDescriptor): 
2348         Use the full font-family parsing that returns a CSSValueList, 
2349         since we can handle multiple families. 
2350  
2351 2016-10-28  Per Arne Vollan  <pvollan@apple.com> 
2352  
2353         [Win][Direct2D] Implement ImageBufferData::putData. 
2354         https://bugs.webkit.org/show_bug.cgi?id=164151 
2355  
2356         Reviewed by Brent Fulgham. 
2357  
2358         * platform/graphics/win/ImageBufferDataDirect2D.cpp: 
2359         (WebCore::ImageBufferData::getData): 
2360         (WebCore::ImageBufferData::putData): 
2361  
2362 2016-10-28  Dave Hyatt  <hyatt@apple.com> 
2363  
2364         [CSS Parser] Support hanging-punctuation 
2365         https://bugs.webkit.org/show_bug.cgi?id=164153 
2366  
2367         Reviewed by Simon Fraser. 
2368  
2369         * css/parser/CSSPropertyParser.cpp: 
2370         (WebCore::consumeHangingPunctuation): 
2371         (WebCore::CSSPropertyParser::parseSingleValue): 
2372
2373 2016-10-28  Yusuke Suzuki  <utatane.tea@gmail.com>
2374
2375         [DOMJIT] Implement Document::documentElement
2376         https://bugs.webkit.org/show_bug.cgi?id=164113
2377
2378         Reviewed by Sam Weinig.
2379
2380         Test: js/dom/domjit-accessor-document-element.html
2381
2382         This patch implements document.documentElement DOMJIT accessor.
2383         Similar to ownerDocument accessor, the way to access to document.documentElement
2384         from JIT code is already prepared for CSSJIT. DOMJIT just utilizes the existing
2385         functionality: using documentElementMemoryOffset().
2386
2387         document.documentElement is frequently called in jQuery. Especially, every time
2388         we call jQuery.attr(), this is called.
2389
2390         To implement Document accessor, we clean up some code in DOMJITHelpers.
2391         We create the cpp file for DOMJITHelpers and move some helpers to it.
2392         And we also implement DOMJIT::checkDOM<DOMInterface> for convenience.
2393         It returns appropriate CheckDOM patchpoint implementation.
2394
2395         This patch improves Dromaeo jslib-attr-jquery.html 10% (481.64 v.s. 532.54).
2396
2397         * CMakeLists.txt:
2398         * WebCore.xcodeproj/project.pbxproj:
2399         * cssjit/SelectorCompiler.cpp:
2400         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsScopeRoot):
2401         * dom/Document.idl:
2402         * domjit/DOMJITAbstractHeapRepository.h:
2403         * domjit/DOMJITCheckDOM.h: Copied from Source/WebCore/domjit/DOMJITAbstractHeapRepository.h.
2404         (WebCore::DOMJIT::TypeChecker<Node>::branchIfFail):
2405         (WebCore::DOMJIT::TypeChecker<Document>::branchIfFail):
2406         (WebCore::DOMJIT::TypeChecker<Event>::branchIfFail):
2407         (WebCore::DOMJIT::TypeChecker<Element>::branchIfFail):
2408         (WebCore::DOMJIT::checkDOM):
2409         * domjit/DOMJITHelpers.cpp: Copied from Source/WebCore/domjit/DOMJITAbstractHeapRepository.h.
2410         (WebCore::DOMJIT::loadDocument):
2411         (WebCore::DOMJIT::loadDocumentElement):
2412         * domjit/DOMJITHelpers.h:
2413         (WebCore::DOMJIT::toWrapperSlow):
2414         (WebCore::DOMJIT::loadDocument): Deleted.
2415         * domjit/JSDocumentDOMJIT.cpp: Added.
2416         (WebCore::DocumentDocumentElementDOMJIT::checkDOM):
2417         (WebCore::DocumentDocumentElementDOMJIT::callDOM):
2418         * domjit/JSNodeDOMJIT.cpp:
2419         (WebCore::createCallDOMForOffsetAccess):
2420         (WebCore::NodeFirstChildDOMJIT::checkDOM):
2421         (WebCore::NodeLastChildDOMJIT::checkDOM):
2422         (WebCore::NodeNextSiblingDOMJIT::checkDOM):
2423         (WebCore::NodePreviousSiblingDOMJIT::checkDOM):
2424         (WebCore::NodeParentNodeDOMJIT::checkDOM):
2425         (WebCore::NodeNodeTypeDOMJIT::checkDOM):
2426         (WebCore::NodeOwnerDocumentDOMJIT::checkDOM):
2427         (WebCore::NodeOwnerDocumentDOMJIT::callDOM):
2428         (WebCore::toWrapperSlow): Deleted.
2429         (WebCore::checkNode): Deleted.
2430
2431 2016-10-28  Dave Hyatt  <hyatt@apple.com>
2432
2433         [CSS Parser] Support initial-letter
2434         https://bugs.webkit.org/show_bug.cgi?id=164150
2435
2436         Reviewed by Simon Fraser.
2437
2438         * css/parser/CSSPropertyParser.cpp:
2439         (WebCore::consumeInitialLetter):
2440         (WebCore::CSSPropertyParser::parseSingleValue):
2441
2442 2016-10-28  Simon Fraser  <simon.fraser@apple.com>
2443
2444         Remove some unused code in RenderLayerCompositor::computeExtent()
2445         https://bugs.webkit.org/show_bug.cgi?id=163934
2446
2447         Reviewed by Zalan Bujtas.
2448
2449         viewportRect was never used.
2450
2451         * rendering/RenderLayerCompositor.cpp:
2452         (WebCore::RenderLayerCompositor::computeExtent):
2453
2454 2016-10-28  Sam Weinig  <sam@webkit.org>
2455
2456         [WebIDL] Update parser and code generators to only access type information through the type property
2457         https://bugs.webkit.org/show_bug.cgi?id=164141
2458
2459         Reviewed by Anders Carlsson.
2460
2461         Update IDLParser structs:
2462         - domSignature: Rename idlType to type. Specify that type is a domType.
2463         - domInterface: Remove name and parent. Specify that type and parentType are a domTypes.
2464         - domFunction: Specify that signature is a domSignature.
2465         - domAttribute: Remove unused type. Specify that signature is a domSignature.
2466         - domIterable: Remove idlKeyType and valueKeyType. Specify that keyType and valueType are a domTypes
2467         - domConstant: Specify that type is a domType.
2468         - domEnum: Specify that type is a domType.
2469         - domDictionary: Remove name and parent. Specify that type and parentType are a domTypes.
2470         - Typedef: Rename idlType to type and specify that it is a domType.
2471
2472         * bindings/scripts/IDLParser.pm:
2473         Remove redundant properties and specify type info in structs where possible.
2474
2475         * bindings/scripts/CodeGenerator.pm:
2476         (IsSVGTypeNeedingTearOffForType): Renamed to remove ForType suffix.
2477         (IsSVGTypeWithWritablePropertiesNeedingTearOffForType): Renamed to remove ForType suffix.
2478         (GetSVGTypeNeedingTearOffForType): Renamed to remove ForType suffix.
2479         (GetSVGWrappedTypeNeedingTearOffForType): Renamed to remove ForType suffix.
2480
2481         Update to always access type information through type accessors. Remove use of removed
2482         properties.
2483
2484         * bindings/scripts/CodeGeneratorJS.pm:
2485         (IsNullableType): Deleted.
2486         (StripNullable): Deleted.
2487         Remove unused functions.
2488
2489         Update to always access type information through type accessors. Remove use of removed
2490         properties.
2491
2492         * bindings/scripts/generate-bindings.pl:
2493         Update to always access type information through type accessors. Remove use of removed
2494         properties.
2495
2496 2016-10-28  Dave Hyatt  <hyatt@apple.com>
2497
2498         [CSS Parser] Support bopomofo Ruby
2499         https://bugs.webkit.org/show_bug.cgi?id=164148
2500
2501         Reviewed by Simon Fraser.
2502
2503         * css/parser/CSSParserFastPaths.cpp:
2504         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
2505
2506 2016-10-28  Dave Hyatt  <hyatt@apple.com>
2507
2508         [CSS Parser] Add support for -webkit-canvas images
2509         https://bugs.webkit.org/show_bug.cgi?id=164144
2510
2511         Reviewed by Simon Fraser.
2512
2513         * css/CSSValueKeywords.in:
2514         * css/parser/CSSParser.cpp:
2515         (WebCore::CSSParserContext::CSSParserContext):
2516         * css/parser/CSSPropertyParserHelpers.cpp:
2517         (WebCore::CSSPropertyParserHelpers::consumeWebkitCanvas):
2518         (WebCore::CSSPropertyParserHelpers::consumeGeneratedImage):
2519         (WebCore::CSSPropertyParserHelpers::isGeneratedImage):
2520
2521 2016-10-27  Geoffrey Garen  <ggaren@apple.com>
2522
2523         One file per class for Executable.h/.cpp
2524         https://bugs.webkit.org/show_bug.cgi?id=164099
2525
2526         Reviewed by Saam Barati.
2527
2528         * ForwardingHeaders/runtime/Executable.h: Removed.
2529         * ForwardingHeaders/runtime/FunctionExecutable.h: Copied from Source/WebCore/ForwardingHeaders/runtime/Executable.h.
2530         * bindings/js/JSLazyEventListener.cpp:
2531         * bindings/js/JSMainThreadExecStateInstrumentation.h:
2532
2533 2016-10-28  Dave Hyatt  <hyatt@apple.com>
2534
2535         [CSS Parser] Clean up gradient parsing
2536         https://bugs.webkit.org/show_bug.cgi?id=164139
2537
2538         Reviewed by Dean Jackson.
2539
2540         * css/CSSGradientValue.cpp:
2541         (WebCore::positionFromValue):
2542         (WebCore::CSSGradientValue::computeEndPoint):
2543         * css/parser/CSSPropertyParserHelpers.cpp:
2544         (WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradient):
2545         (WebCore::CSSPropertyParserHelpers::consumeGradientColorStops):
2546         (WebCore::CSSPropertyParserHelpers::consumeDeprecatedRadialGradient):
2547         (WebCore::CSSPropertyParserHelpers::consumeRadialGradient):
2548         (WebCore::CSSPropertyParserHelpers::consumeLinearGradient):
2549
2550 2016-10-28  Dean Jackson  <dino@apple.com>
2551
2552         New CSS Parser should use Colors not RGBA32s
2553         https://bugs.webkit.org/show_bug.cgi?id=164124
2554         <rdar://problem/29000373>
2555
2556         Reviewed by Darin Adler.
2557
2558         The old parser has moved from using RGBA32 values to using
2559         Colors directly. This was so we could support ExtendedColors
2560         via the new color() syntax.
2561
2562         Update the new CSS parser to do the same.
2563
2564         * css/parser/CSSPropertyParserHelpers.cpp:
2565         (WebCore::CSSPropertyParserHelpers::parseRGBParameters):
2566         (WebCore::CSSPropertyParserHelpers::parseHSLParameters):
2567         (WebCore::CSSPropertyParserHelpers::parseHexColor):
2568         (WebCore::CSSPropertyParserHelpers::parseColorFunction):
2569         (WebCore::CSSPropertyParserHelpers::consumeColor):
2570
2571 2016-10-28  Dean Jackson  <dino@apple.com>
2572
2573         Allow new CSS parser to handle insertRule, etc via parseRule
2574         https://bugs.webkit.org/show_bug.cgi?id=164122
2575         <rdar://problem/29000101>
2576
2577         Reviewed by Darin Adler.
2578
2579         Call the new CSS parser from CSSParser::parseRule if enabled. This
2580         allows style added via the CSSOM insertRule to go through
2581         the parser.
2582
2583         I tested this across our layout tests that use insertRule. It
2584         works fine, but does cause some filter tests to fail. This is
2585         because the new parser does not generate WebKitCSSFilterValues,
2586         but I think the CSSFunctionValue is good enough. I'll remove
2587         WebKitCSSFilterValue separately.
2588
2589         * css/parser/CSSParser.cpp:
2590         (WebCore::CSSParser::parseRule): Call CSSParserImpl::parseRule.
2591
2592 2016-10-28  Simon Fraser  <simon.fraser@apple.com>
2593
2594         Wrong blur radius for filter: drop-shadow()
2595         https://bugs.webkit.org/show_bug.cgi?id=163667
2596
2597         Reviewed by Darin Adler.
2598         
2599         The "stdDev" parameter to <feDropShadow> and <feGaussianBlur> represents the standard
2600         deviation (σ) of the Gaussian blur function. CSS filters drop-shadow() and blur() follow
2601         this with their radius parameter.
2602         
2603         However, CSS box-shadow and text-shadow use 2σ to describe the blur radius, since this
2604         is conveniently close to the number of pixels the effect of the blur extends out.
2605         
2606         feDropShadow, which is used by non-accelerated filter: drop-shadow(), was using
2607         the wrong blur radius because it passed its stdDev directly to ShadowBlur. ShadowBlur
2608         was written for CSS box-shadow, so expected its input "blur radius" to be twice the
2609         stdDev.
2610         
2611         Tests: css3/filters/drop-shadow-blur-radius.html
2612                svg/filters/feDropShadow-blur-radius.html
2613
2614         * platform/graphics/filters/FEDropShadow.cpp:
2615         (WebCore::FEDropShadow::platformApplySoftware):
2616
2617 2016-10-28  Youenn Fablet  <youenn@apple.com>
2618
2619         Expose RTCPeerConnection unprefixed
2620         https://bugs.webkit.org/show_bug.cgi?id=164060
2621
2622         Reviewed by Darin Adler.
2623
2624         Covered by rebased and activated tests.
2625
2626         * Modules/mediastream/RTCPeerConnection.idl:
2627
2628 2016-10-28  Dave Hyatt  <hyatt@apple.com>
2629
2630         [CSS Parser] Support the marquee properties
2631         https://bugs.webkit.org/show_bug.cgi?id=164132
2632
2633         Reviewed by Zalan Bujtas.
2634
2635         * css/parser/CSSParserFastPaths.cpp:
2636         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
2637         * css/parser/CSSPropertyParser.cpp:
2638         (WebCore::consumeWebkitMarqueeIncrement):
2639         (WebCore::consumeWebkitMarqueeRepetition):
2640         (WebCore::consumeWebkitMarqueeSpeed):
2641         (WebCore::CSSPropertyParser::parseSingleValue):
2642         (WebCore::CSSPropertyParser::parseShorthand):
2643
2644 2016-10-28  Dave Hyatt  <hyatt@apple.com>
2645
2646         [CSS Parser] Miscellaneous bug fixes
2647         https://bugs.webkit.org/show_bug.cgi?id=164131
2648
2649         Reviewed by Zalan Bujtas.
2650
2651         * css/CSSComputedStyleDeclaration.cpp:
2652         (WebCore::ComputedStyleExtractor::propertyValue):
2653         * css/CSSPropertyNames.in:
2654         The prefix was incorrectly dropped from -webkit-column-progression.
2655         Put it back.
2656
2657         * css/StyleBuilderConverter.h:
2658         (WebCore::StyleBuilderConverter::convertPositionComponent):
2659         (WebCore::StyleBuilderConverter::convertObjectPosition):
2660         Fix object-position parsing so that the position components can
2661         be ids.
2662
2663         * css/StyleBuilderCustom.h:
2664         (WebCore::StyleBuilderCustom::applyValueContent):
2665         The new parser doesn't make a list for content:none, since none can't be
2666         a component of a list anyway. Add code to handle this case in the
2667         apply function.
2668
2669         * css/parser/CSSParser.cpp:
2670         (WebCore::isValidKeywordPropertyAndValue):
2671         Put the prefix back on -webkit-column-progression.
2672
2673         * css/parser/CSSParserFastPaths.cpp:
2674         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
2675         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
2676         Same.
2677
2678         * css/parser/CSSParserImpl.cpp:
2679         (WebCore::CSSParserImpl::parsePageSelector):
2680         Make sure match type is checked, since our code asserts if it isn't.
2681
2682         * css/parser/CSSPropertyParser.cpp:
2683         (WebCore::validWidthOrHeightKeyword):
2684         (WebCore::consumeLineGrid):
2685         (WebCore::CSSPropertyParser::parseSingleValue):
2686         Add support for the line-grid properties and for -webkit-nbsp-mode.
2687
2688 2016-10-28  Antti Koivisto  <antti@apple.com>
2689
2690         Always use iOS preload behavior
2691         https://bugs.webkit.org/show_bug.cgi?id=164127
2692
2693         Reviewed by Andreas Kling.
2694
2695         On non-iOS platforms we were delaying issuing lower priority preload (images mostly) until document has body.
2696         This should be unnecessary as networking layer prioritization should ensure higher priority resources are
2697         loaded earlier. Testing on iOS has showed that more aggressive behavior is a win.
2698
2699         This patch switches to iOS behavior on all platforms (and simplified the logic).
2700
2701         * html/parser/HTMLResourcePreloader.cpp:
2702         (WebCore::HTMLResourcePreloader::preload):
2703         * loader/LinkLoader.cpp:
2704         (WebCore::LinkLoader::preloadIfNeeded):
2705         * loader/cache/CachedResourceLoader.cpp:
2706         (WebCore::CachedResourceLoader::performPostLoadActions):
2707         (WebCore::CachedResourceLoader::preload):
2708         (WebCore::CachedResourceLoader::isPreloaded):
2709         (WebCore::CachedResourceLoader::checkForPendingPreloads): Deleted.
2710         (WebCore::CachedResourceLoader::requestPreload): Deleted.
2711         (WebCore::CachedResourceLoader::clearPendingPreloads): Deleted.
2712         * loader/cache/CachedResourceLoader.h:
2713
2714 2016-10-28  Youenn Fablet  <youenn@apple.com>
2715
2716         [Fetch] Ensure redirection count is no more than 20 in case of cross origin requests
2717         https://bugs.webkit.org/show_bug.cgi?id=164117
2718
2719         Reviewed by Sam Weinig.
2720
2721         Tests: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin-worker.html
2722                imported/w3c/web-platform-tests/fetch/api/redirect/redirect-count-cross-origin.html
2723
2724         Introducing a ResourceLoaderOptions that defines the maximum redirection count.
2725         By default, it is set to 20 as per fetch specification.
2726
2727         This option is used by SubresourceLoader to cancel load if its redirection count is above that maximum.
2728         DocumentThreadableLoader stopping redirections to make preflight if needed, it now uses the maxRedirectCount loader option to ensure
2729         that the total number of redirections is 20.
2730
2731         * loader/DocumentThreadableLoader.cpp:
2732         (WebCore::DocumentThreadableLoader::redirectReceived):
2733         * loader/ResourceLoaderOptions.h:
2734         * loader/SubresourceLoader.cpp:
2735         (WebCore::SubresourceLoader::willSendRequestInternal):
2736         * loader/SubresourceLoader.h:
2737
2738 2016-10-28  Fujii Hironori  <Hironori.Fujii@sony.com>
2739
2740         generate-bindings-all.pl should recompile supplemented IDL if its supplemental IDL are added or removed
2741         https://bugs.webkit.org/show_bug.cgi?id=164054
2742
2743         Reviewed by Michael Catanzaro.
2744
2745         generate-bindings-all.pl determines which IDL to recompile by
2746         comparing timestamps of generated files, source IDL and its
2747         dependencies.  But this is not enough. If a new supplemental IDL
2748         is added, its supplemented IDL needs to be recompiled even though
2749         the timestamp of the supplemental IDL is older than the
2750         generated files.
2751
2752         * bindings/scripts/generate-bindings-all.pl: Read supplemental
2753         dependency file both before and after invoking preprocess-idls.pl.
2754         Recompile IDL files if its supplemental dependencies are added or
2755         removed.
2756
2757 2016-10-28  Youenn Fablet  <youenn@apple.com>
2758
2759         PeerMediaDescription does not need to be refcounted
2760         https://bugs.webkit.org/show_bug.cgi?id=164059
2761
2762         Reviewed by Darin Adler.
2763
2764         No change of behavior.
2765
2766         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
2767         (WebCore::MediaEndpointPeerConnection::createOfferTask):
2768         (WebCore::MediaEndpointPeerConnection::createAnswerTask):
2769         (WebCore::createSourceMap):
2770         (WebCore::MediaEndpointPeerConnection::setLocalDescriptionTask):
2771         (WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask):
2772         (WebCore::MediaEndpointPeerConnection::addIceCandidateTask):
2773         (WebCore::MediaEndpointPeerConnection::gotIceCandidate):
2774         * Modules/mediastream/MediaEndpointPeerConnection.h:
2775         * Modules/mediastream/SDPProcessor.cpp:
2776         (WebCore::configurationFromJSON):
2777         (WebCore::configurationToJSON):
2778         (WebCore::SDPProcessor::generateCandidateLine):
2779         (WebCore::SDPProcessor::parseCandidateLine):
2780         * platform/mediastream/IceCandidate.h:
2781         * platform/mediastream/MediaEndpointSessionConfiguration.h:
2782         (WebCore::MediaEndpointSessionConfiguration::mediaDescriptions):
2783         (WebCore::MediaEndpointSessionConfiguration::addMediaDescription):
2784         (WebCore::MediaEndpointSessionConfiguration::clone):
2785         * platform/mediastream/PeerMediaDescription.h:
2786         (WebCore::PeerMediaDescription::addPayload):
2787         (WebCore::PeerMediaDescription::addSsrc):
2788         (WebCore::PeerMediaDescription::clearSsrcs):
2789         (WebCore::PeerMediaDescription::addIceCandidate):
2790         (WebCore::PeerMediaDescription::create): Deleted.
2791         (WebCore::PeerMediaDescription::~PeerMediaDescription): Deleted.
2792         (WebCore::PeerMediaDescription::type): Deleted.
2793         (WebCore::PeerMediaDescription::setType): Deleted.
2794         (WebCore::PeerMediaDescription::port): Deleted.
2795         (WebCore::PeerMediaDescription::setPort): Deleted.
2796         (WebCore::PeerMediaDescription::address): Deleted.
2797         (WebCore::PeerMediaDescription::setAddress): Deleted.
2798         (WebCore::PeerMediaDescription::mode): Deleted.
2799         (WebCore::PeerMediaDescription::setMode): Deleted.
2800         (WebCore::PeerMediaDescription::mid): Deleted.
2801         (WebCore::PeerMediaDescription::setMid): Deleted.
2802         (WebCore::PeerMediaDescription::payloads): Deleted.
2803         (WebCore::PeerMediaDescription::setPayloads): Deleted.
2804         (WebCore::PeerMediaDescription::rtcpMux): Deleted.
2805         (WebCore::PeerMediaDescription::setRtcpMux): Deleted.
2806         (WebCore::PeerMediaDescription::rtcpAddress): Deleted.
2807         (WebCore::PeerMediaDescription::setRtcpAddress): Deleted.
2808         (WebCore::PeerMediaDescription::rtcpPort): Deleted.
2809         (WebCore::PeerMediaDescription::setRtcpPort): Deleted.
2810         (WebCore::PeerMediaDescription::mediaStreamId): Deleted.
2811         (WebCore::PeerMediaDescription::setMediaStreamId): Deleted.
2812         (WebCore::PeerMediaDescription::mediaStreamTrackId): Deleted.
2813         (WebCore::PeerMediaDescription::setMediaStreamTrackId): Deleted.
2814         (WebCore::PeerMediaDescription::dtlsSetup): Deleted.
2815         (WebCore::PeerMediaDescription::setDtlsSetup): Deleted.
2816         (WebCore::PeerMediaDescription::dtlsFingerprintHashFunction): Deleted.
2817         (WebCore::PeerMediaDescription::setDtlsFingerprintHashFunction): Deleted.
2818         (WebCore::PeerMediaDescription::dtlsFingerprint): Deleted.
2819         (WebCore::PeerMediaDescription::setDtlsFingerprint): Deleted.
2820         (WebCore::PeerMediaDescription::cname): Deleted.
2821         (WebCore::PeerMediaDescription::setCname): Deleted.
2822         (WebCore::PeerMediaDescription::ssrcs): Deleted.
2823         (WebCore::PeerMediaDescription::iceUfrag): Deleted.
2824         (WebCore::PeerMediaDescription::setIceUfrag): Deleted.
2825         (WebCore::PeerMediaDescription::icePassword): Deleted.
2826         (WebCore::PeerMediaDescription::setIcePassword): Deleted.
2827         (WebCore::PeerMediaDescription::iceCandidates): Deleted.
2828         (WebCore::PeerMediaDescription::clone): Deleted.
2829         (WebCore::PeerMediaDescription::PeerMediaDescription): Deleted.
2830         * platform/mediastream/mac/MediaEndpointMac.cpp:
2831         (WebCore::MediaEndpointMac::addRemoteCandidate):
2832         (WebCore::MediaEndpointMac::OnIceCandidate):
2833         * platform/mediastream/mac/MediaEndpointMac.h:
2834         * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
2835         (WebCore::MediaEndpointOwr::updateSendConfiguration):
2836         * platform/mediastream/openwebrtc/MediaEndpointOwr.h:
2837         * platform/mock/MockMediaEndpoint.cpp:
2838         (WebCore::MockMediaEndpoint::updateConfigurationMids):
2839
2840 2016-10-28  Antoine Quint  <graouts@apple.com>
2841
2842         [Modern Media Controls] Media Controller: scrubbing support
2843         https://bugs.webkit.org/show_bug.cgi?id=163726
2844         <rdar://problem/27989481>
2845
2846         Reviewed by Dean Jackson.
2847
2848         We introduce the ScrubberSupport class which brings support for scrubbing the media
2849         by interacting with the scrubber in the media controls and correctly reflecting
2850         the media's current time as set via the media API.
2851
2852         Tests: media/modern-media-controls/scrubber-support/scrubber-support-click.html
2853                media/modern-media-controls/scrubber-support/scrubber-support-drag.html
2854                media/modern-media-controls/scrubber-support/scrubber-support-media-api.html
2855
2856         * Modules/modern-media-controls/js-files:
2857         * Modules/modern-media-controls/media/media-controller.js:
2858         (MediaController):
2859         * Modules/modern-media-controls/media/scrubbing-support.js: Added.
2860         (ScrubbingSupport.prototype.get control):
2861         (ScrubbingSupport.prototype.get mediaEvents):
2862         (ScrubbingSupport.prototype.controlValueWillStartChanging):
2863         (ScrubbingSupport.prototype.controlValueDidChange):
2864         (ScrubbingSupport.prototype.controlValueDidStopChanging):
2865         (ScrubbingSupport.prototype.syncControl):
2866         (ScrubbingSupport):
2867         * WebCore.xcodeproj/project.pbxproj:
2868
2869 2016-10-28  Alex Christensen  <achristensen@webkit.org>
2870
2871         Fix Windows WebGL build after r208022
2872         https://bugs.webkit.org/show_bug.cgi?id=164091
2873
2874         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
2875         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
2876         (WebCore::Extensions3DOpenGLES::Extensions3DOpenGLES):
2877         * platform/graphics/opengl/Extensions3DOpenGLES.h:
2878         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2879         (WebCore::GraphicsContext3D::getExtensions):
2880
2881 2016-10-27  Youenn Fablet  <youenn@apple.com>
2882
2883         [Fetch API] Fetch ReadableStream should only clone the second branch
2884         https://bugs.webkit.org/show_bug.cgi?id=164058
2885
2886         Reviewed by Darin Adler.
2887
2888         Covered by rebased tests.
2889
2890         * Modules/streams/ReadableStreamInternals.js:
2891         (readableStreamTeePullFunction):
2892
2893 2016-10-27  Alex Christensen  <achristensen@webkit.org>
2894
2895         Update ANGLE
2896         https://bugs.webkit.org/show_bug.cgi?id=164101
2897
2898         Reviewed by Darin Adler.
2899
2900         ShCheckVariablesWithinPackingLimits has changed signatures from taking a ShVariableInfo* and length
2901         to taking a std::vector<sh::ShaderVariable> which requires more information about the shader variables
2902         than we kept in GraphicsContext3D::SymbolInfo.  I removed the SymbolInfo class because it was redundant
2903         with ANGLE's sh::ShaderVariable and now unused.
2904
2905         Covered by existing WebGL tests.
2906
2907         * CMakeLists.txt:
2908         * PlatformMac.cmake:
2909         * PlatformWin.cmake:
2910         * platform/graphics/ANGLEWebKitBridge.cpp:
2911         (WebCore::appendSymbol):
2912         (WebCore::getStructInfo):
2913         (WebCore::getSymbolInfo):
2914         (WebCore::ANGLEWebKitBridge::compileShaderSource):
2915         * platform/graphics/ANGLEWebKitBridge.h:
2916         (WebCore::ANGLEShaderSymbol::isSampler): Deleted.
2917         * platform/graphics/GraphicsContext3D.h:
2918         (WebCore::GraphicsContext3D::SymbolInfo::SymbolInfo): Deleted.
2919         (WebCore::GraphicsContext3D::SymbolInfo::operator==): Deleted.
2920         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2921         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
2922         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2923         (WebCore::GraphicsContext3D::checkVaryingsPacking):
2924         (WebCore::GraphicsContext3D::precisionsMatch):
2925         (WebCore::GraphicsContext3D::mappedSymbolName):
2926         (WebCore::GraphicsContext3D::originalSymbolName):
2927
2928 2016-10-27  Simon Fraser  <simon.fraser@apple.com>
2929
2930         Remove RenderStyle::isRunningAcceleratedAnimation()
2931         https://bugs.webkit.org/show_bug.cgi?id=164109
2932
2933         Reviewed by David Hyatt.
2934
2935         RenderStyle::isRunningAcceleratedAnimation() was added in r40876 to handle interrupted
2936         accelerated transitions, and to allow RenderLayer::currentTransform() to know when it
2937         has to manually get the animated style.
2938         
2939         The latter can now use isRunningAcceleratedAnimationOnRenderer(), and interrupting
2940         accelerated transitions seems to work fine without it, so remove it.
2941
2942         * page/animation/ImplicitAnimation.cpp:
2943         (WebCore::ImplicitAnimation::animate):
2944         * page/animation/KeyframeAnimation.cpp:
2945         (WebCore::KeyframeAnimation::animate):
2946         * rendering/RenderLayer.cpp:
2947         (WebCore::RenderLayer::currentTransform):
2948         * rendering/style/RenderStyle.h:
2949         (WebCore::RenderStyle::isRunningAcceleratedAnimation): Deleted.
2950         (WebCore::RenderStyle::setIsRunningAcceleratedAnimation): Deleted.
2951         * rendering/style/StyleRareNonInheritedData.cpp:
2952         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2953         (WebCore::StyleRareNonInheritedData::operator==):
2954         * rendering/style/StyleRareNonInheritedData.h:
2955
2956 2016-10-27  Myles C. Maxfield  <mmaxfield@apple.com>
2957
2958         Teach WebGL code about new buffer targets in WebGL2
2959         https://bugs.webkit.org/show_bug.cgi?id=163924
2960
2961         Reviewed by Dean Jackson.
2962
2963         WebGL 2 adds new buffer targets. Instead of completely reimplementing
2964         the functions again for WebGL 2, we can simply check if we are using
2965         a new kind of context to conditionally enable support.
2966
2967         Test: fast/canvas/webgl/webgl2-buffer-targets.html
2968
2969         * html/canvas/WebGL2RenderingContext.h:
2970         * html/canvas/WebGL2RenderingContext.idl:
2971         * html/canvas/WebGLBuffer.cpp:
2972         (WebCore::WebGLBuffer::associateBufferDataImpl):
2973         (WebCore::WebGLBuffer::associateBufferSubDataImpl):
2974         (WebCore::WebGLBuffer::setTarget):
2975         * html/canvas/WebGLBuffer.h:
2976         * html/canvas/WebGLRenderingContextBase.cpp:
2977         (WebCore::WebGLRenderingContextBase::bindBuffer):
2978         (WebCore::WebGLRenderingContextBase::getBufferParameter):
2979         (WebCore::WebGLRenderingContextBase::validateBufferDataParameters):
2980         * html/canvas/WebGLRenderingContextBase.h:
2981
2982 2016-10-27  Dave Hyatt  <hyatt@apple.com>
2983
2984         [CSS Parser] Enhance grid-auto-flow parsing to allow dense first.
2985         https://bugs.webkit.org/show_bug.cgi?id=164110
2986
2987         Reviewed by Simon Fraser.
2988
2989         * css/StyleBuilderConverter.h:
2990         (WebCore::StyleBuilderConverter::convertGridAutoFlow):
2991
2992 2016-10-27  Simon Fraser  <simon.fraser@apple.com>
2993
2994         constify the CSSValue arguments to StyleBuilderConverter functions
2995         https://bugs.webkit.org/show_bug.cgi?id=164106
2996
2997         Reviewed by Zalan Bujtas.
2998
2999         Make almost all the CSSValue& arguments const (this makes it clear that they
3000         are in params, not out params). Only a few that are CSSImageValues are non-const,
3001         because they fall into a non-const code path.
3002
3003         * css/StyleBuilderConverter.h:
3004         (WebCore::StyleBuilderConverter::convertLengthOrAuto):
3005         (WebCore::StyleBuilderConverter::convertLengthSizing):
3006         (WebCore::StyleBuilderConverter::convertLengthMaxSizing):
3007         (WebCore::StyleBuilderConverter::convertComputedLength):
3008         (WebCore::StyleBuilderConverter::convertLineWidth):
3009         (WebCore::StyleBuilderConverter::convertSpacing):
3010         (WebCore::StyleBuilderConverter::convertToRadiusLength):
3011         (WebCore::StyleBuilderConverter::convertRadius):
3012         (WebCore::StyleBuilderConverter::convertObjectPosition):
3013         (WebCore::StyleBuilderConverter::convertTextDecoration):
3014         (WebCore::StyleBuilderConverter::convertNumber):
3015         (WebCore::StyleBuilderConverter::convertNumberOrAuto):
3016         (WebCore::StyleBuilderConverter::convertWebkitHyphenateLimitLines):
3017         (WebCore::StyleBuilderConverter::convertTransform):
3018         (WebCore::StyleBuilderConverter::convertString):
3019         (WebCore::StyleBuilderConverter::convertStringOrAuto):
3020         (WebCore::StyleBuilderConverter::convertStringOrNone):
3021         (WebCore::StyleBuilderConverter::valueToEmphasisPosition):
3022         (WebCore::StyleBuilderConverter::convertTextEmphasisPosition):
3023         (WebCore::StyleBuilderConverter::convertTextAlign):
3024         (WebCore::StyleBuilderConverter::convertClipPath):
3025         (WebCore::StyleBuilderConverter::convertResize):
3026         (WebCore::StyleBuilderConverter::convertMarqueeRepetition):
3027         (WebCore::StyleBuilderConverter::convertMarqueeSpeed):
3028         (WebCore::StyleBuilderConverter::convertQuotes):
3029         (WebCore::StyleBuilderConverter::convertTextUnderlinePosition):
3030         (WebCore::StyleBuilderConverter::convertReflection):
3031         (WebCore::StyleBuilderConverter::convertInitialLetter):
3032         (WebCore::StyleBuilderConverter::convertTextStrokeWidth):
3033         (WebCore::StyleBuilderConverter::convertLineBoxContain):
3034         (WebCore::StyleBuilderConverter::convertTextDecorationSkip):
3035         (WebCore::StyleBuilderConverter::convertScrollSnapPoints):
3036         (WebCore::StyleBuilderConverter::convertSnapCoordinatePair):
3037         (WebCore::StyleBuilderConverter::convertScrollSnapCoordinates):
3038         (WebCore::StyleBuilderConverter::createGridTrackBreadth):
3039         (WebCore::StyleBuilderConverter::createGridTrackSize):
3040         (WebCore::StyleBuilderConverter::createGridTrackList):
3041         (WebCore::StyleBuilderConverter::createGridPosition):
3042         (WebCore::StyleBuilderConverter::convertGridTrackSizeList):
3043         (WebCore::StyleBuilderConverter::convertGridTrackSize):
3044         (WebCore::StyleBuilderConverter::convertGridPosition):
3045         (WebCore::StyleBuilderConverter::convertGridAutoFlow):
3046         (WebCore::StyleBuilderConverter::convertWordSpacing):
3047         (WebCore::StyleBuilderConverter::convertPerspective):
3048         (WebCore::StyleBuilderConverter::convertMarqueeIncrement):
3049         (WebCore::StyleBuilderConverter::convertFilterOperations):
3050         (WebCore::StyleBuilderConverter::convertFontFeatureSettings):
3051         (WebCore::StyleBuilderConverter::convertFontVariationSettings):
3052         (WebCore::StyleBuilderConverter::convertTouchCallout):
3053         (WebCore::StyleBuilderConverter::convertTapHighlightColor):
3054         (WebCore::StyleBuilderConverter::convertOverflowScrolling):
3055         (WebCore::StyleBuilderConverter::convertSVGLength):
3056         (WebCore::StyleBuilderConverter::convertSVGLengthVector):
3057         (WebCore::StyleBuilderConverter::convertStrokeDashArray):
3058         (WebCore::StyleBuilderConverter::convertPaintOrder):
3059         (WebCore::StyleBuilderConverter::convertOpacity):
3060         (WebCore::StyleBuilderConverter::convertSVGURIReference):
3061         (WebCore::StyleBuilderConverter::convertSVGColor):
3062         (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
3063         (WebCore::StyleBuilderConverter::convertContentAlignmentData):
3064         (WebCore::StyleBuilderConverter::convertGlyphOrientation):
3065         (WebCore::StyleBuilderConverter::convertGlyphOrientationOrAuto):
3066         (WebCore::StyleBuilderConverter::convertLineHeight):
3067         (WebCore::StyleBuilderConverter::convertFontSynthesis):
3068         (WebCore::StyleBuilderConverter::convertPageBreakBetween):
3069         (WebCore::StyleBuilderConverter::convertPageBreakInside):
3070         (WebCore::StyleBuilderConverter::convertColumnBreakBetween):
3071         (WebCore::StyleBuilderConverter::convertColumnBreakInside):
3072         (WebCore::StyleBuilderConverter::convertRegionBreakBetween):
3073         (WebCore::StyleBuilderConverter::convertRegionBreakInside):
3074         (WebCore::StyleBuilderConverter::convertHangingPunctuation):
3075
3076 2016-10-27  Dave Hyatt  <hyatt@apple.com>
3077
3078         [CSS Parser] Add support for a reference box to -webkit-clip-path
3079         https://bugs.webkit.org/show_bug.cgi?id=164107
3080
3081         Reviewed by Simon Fraser.
3082
3083         * css/parser/CSSPropertyParser.cpp:
3084         (WebCore::consumeBasicShape):
3085         (WebCore::consumeBasicShapeOrBox):
3086         (WebCore::consumeWebkitClipPath):
3087
3088 2016-10-27  Yusuke Suzuki  <utatane.tea@gmail.com>
3089
3090         [DOM] Add JSEventType
3091         https://bugs.webkit.org/show_bug.cgi?id=164096
3092
3093         Reviewed by Darin Adler.
3094
3095         Event is inherited by many Event classes. But, Event's accessors and interfaces are
3096         frequently called. For example, event.{type, target, srcElement} for accessors. And
3097         event.stopPropagation() and event.preventDefault() functions.
3098
3099         However, since the user-visible event instance is typically the instance of the subclass,
3100         jsDynamicCast<JSEvent*>() walks several classes before it succeeds. It is costly.
3101
3102         In this patch, we add a new WebCore JSType JSEventType for JSEvent and add a new
3103         function jsEventCast. That supports a super fast cast operation. And it paves the way
3104         for implementing DOM accessors of Event in DOMJIT.
3105
3106         No behavior change.
3107
3108         * WebCore.xcodeproj/project.pbxproj:
3109         * bindings/js/JSDOMWrapper.h:
3110         * bindings/js/JSEventCustom.h: Added.
3111         (WebCore::jsEventCast):
3112         * bindings/scripts/CodeGeneratorJS.pm:
3113         (GetJSTypeForNode):
3114         (GenerateHeader):
3115         (GetCastingHelperForThisObject):
3116         * bindings/scripts/test/JS/JSTestEventConstructor.h:
3117         (WebCore::JSTestEventConstructor::createStructure):
3118         * dom/Event.idl:
3119         * domjit/DOMJITHelpers.h:
3120         (WebCore::DOMJIT::branchIfEvent):
3121         (WebCore::DOMJIT::branchIfNotEvent):
3122
3123 2016-10-27  Simon Fraser  <simon.fraser@apple.com>
3124
3125         Rename StyleRareNonInheritedData::opacity to m_opacity
3126         https://bugs.webkit.org/show_bug.cgi?id=164104
3127
3128         Reviewed by Dave Hyatt.
3129
3130         Pure rename.
3131
3132         * rendering/style/RenderStyle.cpp:
3133         (WebCore::RenderStyle::changeRequiresLayerRepaint):
3134         * rendering/style/RenderStyle.h:
3135         (WebCore::RenderStyle::opacity):
3136         (WebCore::RenderStyle::setOpacity):
3137         * rendering/style/StyleRareNonInheritedData.cpp:
3138         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3139         (WebCore::StyleRareNonInheritedData::operator==):
3140         * rendering/style/StyleRareNonInheritedData.h:
3141         (WebCore::StyleRareNonInheritedData::hasOpacity):
3142
3143 2016-10-27  Simon Fraser  <simon.fraser@apple.com>
3144
3145         If an animation's keyframes affect stacking context properties, create stacking context while the animation is running
3146         https://bugs.webkit.org/show_bug.cgi?id=164094
3147
3148         Reviewed by Dean Jackson.
3149
3150         The CSS animations spec <https://drafts.csswg.org/css-animations-1/> now makes it
3151         clear that a keyframe animation animating properties which can affect stacking context
3152         should establish stacking context while it's running, or filling-forwards. This is part
3153         of the "the user agent must act as if the will-change property...includes all the properties
3154         animated by the animation" clause.
3155
3156         Implement by having CompositeAnimation::animate() track whether running animations should
3157         create stacking context, replacing existing code in AnimationController::updateAnimations()
3158         which only looked at opacity and transform. Transitions are also checked to see if they need
3159         to trigger stacking context.
3160
3161         This allows for the removal of a 0.9999 hack when blending opacity.
3162
3163         Tests: animations/stacking-context-fill-forwards.html
3164                animations/stacking-context-not-fill-forwards.html
3165                animations/stacking-context-unchanged-while-running.html
3166
3167         * page/animation/AnimationController.cpp:
3168         (WebCore::AnimationController::updateAnimations):
3169         * page/animation/CSSPropertyAnimation.cpp:
3170         * page/animation/CompositeAnimation.cpp:
3171         (WebCore::CompositeAnimation::animate):
3172         * page/animation/KeyframeAnimation.cpp:
3173         (WebCore::KeyframeAnimation::KeyframeAnimation):
3174         (WebCore::KeyframeAnimation::computeStackingContextImpact):
3175         (WebCore::KeyframeAnimation::animate):
3176         * page/animation/KeyframeAnimation.h:
3177         * rendering/RenderLayer.cpp:
3178         (WebCore::RenderLayer::currentTransform):
3179         * rendering/style/WillChangeData.cpp:
3180         (WebCore::WillChangeData::propertyCreatesStackingContext):
3181         (WebCore::propertyCreatesStackingContext): Deleted.
3182         * rendering/style/WillChangeData.h:
3183
3184 2016-10-27  Sam Weinig  <sam@webkit.org>
3185
3186         [WebIDL] Move code generators off of domSignature::type and onto domSignature::idlType
3187         https://bugs.webkit.org/show_bug.cgi?id=164089
3188
3189         Reviewed by Alex Christensen.
3190
3191         Make more IDLParser structures contain domTypes for type descriptions, rather than strings:
3192         - domInterface gains type and parentType.
3193         - domConstant gains type.
3194         - domEnum gains type.
3195         - domDictionary gains type and parentType.
3196
3197         With these structs now containing domTypes, we can update the CodeGenerators to operate on
3198         domTypes exclusively, rather than types as strings. This allows us to consistently have access
3199         to information such as subtypes and nullability.
3200
3201         * bindings/scripts/CodeGenerator.pm:
3202         Update helpers to operate of domTypes. The one exception is SkipIncludeHeader, which
3203         still operates on a type name, since it is called late in code generation on the textual
3204         form of type names in the include list. 
3205
3206         * bindings/scripts/CodeGeneratorJS.pm:
3207         Update to use domTypes.
3208
3209         * bindings/scripts/IDLParser.pm:
3210         - Add domType accessors to domInterface, domConstant, domEnum, and domDictionary
3211           and populate them.
3212         - Remove type accessors from domSignature (domType is accessible from idlType).
3213         - Remove special cases for sequence and FrozenArray, now that they are always
3214           accessed as domTypes.
3215
3216         * html/HTMLEmbedElement.idl:
3217         * html/HTMLFrameElement.idl:
3218         * html/HTMLFrameOwnerElement.cpp:
3219         (WebCore::HTMLFrameOwnerElement::getSVGDocument):
3220         * html/HTMLFrameOwnerElement.h:
3221         * html/HTMLIFrameElement.idl:
3222         * html/HTMLObjectElement.idl:
3223         Fix interfaces declaring getSVGDocument() to correctly have it return
3224         a Document, rather than an SVGDocument, which does exist anymore. To
3225         make the bindings happy, also change the signature of HTMLFrameOwnerElement::getSVGDocument
3226         to return a Document.
3227
3228         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3229         * bindings/scripts/test/JS/JSTestInterface.cpp:
3230         * bindings/scripts/test/JS/JSTestObj.cpp:
3231         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
3232         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3233         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3234         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3235         Update test results to remove some redundant headers (Already included JSFoo.h, so no need for Foo.h).
3236
3237 2016-10-27  Myles C. Maxfield  <mmaxfield@apple.com>
3238
3239         [macOS] [WebGL2] Temporarily upgrade WebGL 2's internal OpenGL context from version 2.1 to 3.2
3240         https://bugs.webkit.org/show_bug.cgi?id=164091
3241
3242         Reviewed by Dean Jackson.
3243
3244         In order to test WebGL2 correctly, I had to upgrade the macOS's OpenGL 
3245         context to a 3.2-compatible context to make sure the new symbols are
3246         accepted. Eventually, this 3.2-compatible context will have to be
3247         reverted and replaced with an ANGLE context. The current 3.2-compatible
3248         context is just for testing.
3249
3250         Test: fast/canvas/webgl/webgl2-context-creation.html
3251
3252         * html/canvas/WebGLBuffer.cpp: Use "nullptr" instead of 0.
3253         (WebCore::WebGLBuffer::associateBufferData):
3254         * html/canvas/WebGLRenderingContextBase.cpp: Use make_unique() instead
3255         of the unique_ptr constructor.
3256         (WebCore::WebGLRenderingContextBase::create):
3257         * platform/graphics/GraphicsContext3D.h: GraphicsContext should know
3258         if it is using a 3.2-compatible context because some parts of 2.1 are
3259         removed in these contexts, and replaced with new things which aren't
3260         in 2.1.
3261         * platform/graphics/mac/GraphicsContext3DMac.mm:
3262         (WebCore::setPixelFormat): Use kCGLPFAOpenGLProfile to specify an
3263         OpenGL 3.2 context.
3264         (WebCore::GraphicsContext3D::GraphicsContext3D): GL_CLAMP is deprecated
3265         in OpenGL 3.2. Fortunately, GL_CLAMP_TO_EDGE isn't deprecated and does
3266         exactly what we want. In OpenGL3.2, point sprites are always enabled,
3267         so there's no need to enable them in those contexts.
3268         (WebCore::GraphicsContext3D::isGLES2Compliant):
3269         * platform/graphics/opengl/Extensions3DOpenGL.cpp: In OpenGL 3.2,
3270         glGetString() no longer accepts GL_EXTENSIONS. Instead, glGetStringi()
3271         is used instead. Unfortunately, glGetString() is not available in
3272         OpenGL 2.1 contexts, so we need to use one or the other based on the
3273         version of the context we're using.
3274         (WebCore::Extensions3DOpenGL::Extensions3DOpenGL):
3275         (WebCore::Extensions3DOpenGL::getExtensions):
3276         * platform/graphics/opengl/Extensions3DOpenGL.h:
3277         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
3278         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
3279         (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):
3280         Instead of modifying getExtensions() to use glGetStringi(), it makes
3281         better sense to modify this function because getExtensions() returns
3282         a string. Building up a string just to split it up again is silly, so
3283         modifying this function instead makes more sense.
3284         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
3285         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
3286         (WebCore::GraphicsContext3D::getIntegerv): GL_MAX_VARYING_FLOATS is
3287         removed in OpenGL 3.2 contexts. However, it is replaced by
3288         GL_MAX_VARYING_COMPONENTS, though this is deprecated but not removed.
3289         In the more recent OpenGL context versions, GL_MAX_VARYING_VECTORS is
3290         recommended instead, but that isn't available in OpenGL 3.2.
3291         (WebCore::GraphicsContext3D::getExtensions):
3292
3293 2016-10-27  Megan Gardner  <megan_gardner@apple.com>
3294
3295         Add support for wide gamut for ShareableBitmap for image popovers
3296         https://bugs.webkit.org/show_bug.cgi?id=164001
3297
3298         Reviewed by Simon Fraser.
3299
3300         Add a function to return a CGColorSpaceRef for extended sRGB.
3301
3302         This is currently untestable, so no tests added.
3303
3304         * platform/graphics/cg/GraphicsContextCG.cpp:
3305         (WebCore::extendedSRGBColorSpaceRef):
3306
3307 2016-10-25  Brent Fulgham  <bfulgham@apple.com>
3308
3309         [Win][Direct2D] Create a RAII Helper Class for the Render Target
3310         https://bugs.webkit.org/show_bug.cgi?id=164005
3311
3312         Reviewed by Alex Christensen.
3313
3314         Tested by existing SVG, image, and Canvas layout tests.
3315
3316         * platform/graphics/GraphicsContext.h:
3317         * platform/graphics/win/GradientDirect2D.cpp:
3318         (WebCore::Gradient::fill): Use new convenience helper class.
3319         * platform/graphics/win/GraphicsContextDirect2D.cpp:
3320         (WebCore::GraphicsContext::didBeginDraw):
3321         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
3322         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): Add an
3323         assertion that we are in a valid state when cleaning up the graphics context.
3324         (WebCore::GraphicsContextPlatformPrivate::clip): Clipping can only happen in a Draw operation.
3325         Open a new BeginDraw if asked to Clip. The Begin must stay active when this method returns,
3326         as the Clip layer is only valid during a Draw operation.
3327         (WebCore::GraphicsContextPlatformPrivate::beginDraw): Added.
3328         (WebCore::GraphicsContextPlatformPrivate::endDraw): Added.
3329         (WebCore::GraphicsContext::beginDrawIfNeeded): Added.
3330         (WebCore::GraphicsContext::endDraw): Added.
3331         (WebCore::GraphicsContext::drawWithoutShadow): Revise to use new RenderTargetHelper class.
3332         (WebCore::GraphicsContext::drawWithShadow): Ditto.
3333         (WebCore::GraphicsContext::platformFillRoundedRect): Ditto.
3334         (WebCore::GraphicsContext::fillRectWithRoundedHole): Ditto.
3335         (WebCore::GraphicsContext::setDidBeginDraw): Deleted.
3336         * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
3337         (WebCore::GraphicsContextPlatformPrivate::didBeginDraw): Revise to use count instead of
3338         a separate boolean.
3339         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
3340         (WebCore::ImageBufferData::getData): Revise to use new RenderTargetHelper class.
3341         * platform/graphics/win/NativeImageDirect2D.cpp:
3342         (WebCore::drawNativeImage): Ditto.
3343         * platform/graphics/win/RenderTargetHelper.h: Added.
3344         (WebCore::RenderTargetHelper::RenderTargetHelper):
3345         (WebCore::RenderTargetHelper::~RenderTargetHelper):
3346         (WebCore::RenderTargetHelper::endDraw):
3347         * svg/graphics/SVGImage.cpp:
3348         (WebCore::SVGImage::nativeImage): Revise to use new RenderTargetHelper class.
3349
3350 2016-10-27  Wenson Hsieh  <wenson_hsieh@apple.com>
3351
3352         Support "insertFromDrop" and "deleteByDrag" for the InputEvent spec
3353         https://bugs.webkit.org/show_bug.cgi?id=163948
3354         <rdar://problem/28921433>
3355
3356         Reviewed by Darin Adler.
3357
3358         Implements support for "insertFromDrop" and "deleteByDrag" inputTypes. These are fired when dragging and
3359         dropping text in editable areas. To do this, we introduce EditActionInsertFromDrop and EditActionDeleteByDrag
3360         (renamed from EditActionDrag, which is no longer necessary after this patch).
3361
3362         When moving text from an editable element to another, we will use a DeleteSelectionCommand to delete the text
3363         from the source element and a ReplaceSelectionCommand to insert the text into the destination element. This
3364         means that we currently fire two input events on the source and destination elements (i.e. given by the start
3365         and end selections) after both child editing commands of the MoveSelectionCommand have been applied. Instead, we
3366         need to fire events in this order:
3367
3368         1. beforeinput ("deleteByDrag") on the source
3369         2. Update DOM
3370         3. input ("deleteByDrag") on the source
3371
3372         4. beforeinput ("insertFromDrop") on the destination
3373         5. Update DOM
3374         6. input ("insertFromDrop") on the destination
3375
3376         To accomplish this, we allow an edit command to defer dispatching input events to its child commands via
3377         CompositeEditCommand::shouldDispatchInputEvents, which the MoveSelectionCommand overrides. Additionally,
3378         when applying the MoveSelectionCommand, we now apply() the child DeleteSelectionCommand and
3379         ReplaceSelectionCommand instead of using doApply(). This allows these children to separately dispatch input
3380         events, and also handle preventDefault() separately.
3381
3382         Tests: fast/events/before-input-events-prevent-drag-and-drop.html
3383                fast/events/input-events-drag-and-drop.html
3384                fast/events/input-events-insert-by-drop.html
3385
3386         * editing/CompositeEditCommand.cpp:
3387         (WebCore::CompositeEditCommand::apply):
3388         (WebCore::CompositeEditCommand::composition):
3389
3390        &nbs