[CSS Parser] Support horizontal-bt writing mode
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-10-21  Dave Hyatt  <hyatt@apple.com>
2
3         [CSS Parser] Support horizontal-bt writing mode
4         https://bugs.webkit.org/show_bug.cgi?id=163797
5
6         Reviewed by Zalan Bujtas.
7
8         * css/parser/CSSParserFastPaths.cpp:
9         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
10
11 2016-10-20  Brent Fulgham  <bfulgham@apple.com>
12
13         [Win][Direct2D] Correct some memory leaks and other minor bugs
14         https://bugs.webkit.org/show_bug.cgi?id=163769
15
16         Reviewed by Alex Christensen.
17
18         Several D2D handles were being leaked.
19  
20         Direct2D sometimes returns an infinite rect containing { -inf, -inf, FloatMax, FloatMax },
21         sometimes { -FloatMax, -FloatMax, inf, inf }, and various combinations thereof. This caused
22         most SVG drawing to decide no screen rect was contained in the "infinite rect" so nothing
23         would be drawn.
24         
25         Tested by existing layout tests. 
26
27         * platform/graphics/GraphicsContext.h:
28         * platform/graphics/win/FloatRectDirect2D.cpp:
29         (WebCore::isInfiniteRect): Recognize various infinite rects in Windows.
30         (WebCore::FloatRect::FloatRect): Convert a Windows infinite rect to the style
31         we use inside WebKit.
32         * platform/graphics/win/FontCascadeDirect2D.cpp:
33         (WebCore::FontCascade::drawGlyphs): Use cached brushes if possible.
34         * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp:
35         (WebCore::GlyphPage::fill): Don't terminate on this error case.
36         * platform/graphics/win/GradientDirect2D.cpp:
37         (WebCore::Gradient::generateGradient): Don't leak gradients.
38         * platform/graphics/win/GraphicsContextDirect2D.cpp:
39         (WebCore::GraphicsContextPlatformPrivate::brushWithColor): Added.
40         (WebCore::GraphicsContext::brushWithColor): Added.
41         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Perform transform multiplication
42         in the right order (hint: it's not distributive).
43         (WebCore::GraphicsContext::drawWithShadow): Use convenience method.
44         (WebCore::GraphicsContext::fillRect): Ditto.
45         (WebCore::GraphicsContext::platformFillRoundedRect): Ditto.
46         (WebCore::GraphicsContext::clearRect): Ditto.
47         (WebCore::GraphicsContext::setPlatformStrokeColor): Ditto.
48         (WebCore::GraphicsContext::setPlatformFillColor): Ditto.
49         * platform/graphics/win/PathDirect2D.cpp:
50         (WebCore::Path::polygonPathFromPoints): No need to convert manually.
51         (WebCore::Path::~Path): Don't leak ID2D1Geometry entities.
52         (WebCore::Path::appendGeometry): Ditto.
53         (WebCore::Path::createGeometryWithFillMode): Ditto.
54         (WebCore::Path::Path): Ditto.
55         (WebCore::Path::operator=): Ditto.
56         (WebCore::Path::strokeBoundingRect): Provide an implementation.
57         (WebCore::Path::addRect): No need for manual casting here.
58
59 2016-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>
60
61         Fix minor style issue in the signature of StaticRange::create
62         https://bugs.webkit.org/show_bug.cgi?id=163786
63         <rdar://problem/28853079>
64
65         Reviewed by Alex Christensen.
66
67         Change `Ref<WebCore::Node> &&` to `Ref<Node>&&`.
68
69         * dom/StaticRange.cpp:
70         (WebCore::StaticRange::create):
71
72 2016-10-21  Dave Hyatt  <hyatt@apple.com>
73
74         [CSS Parser] Add support for -webkit-line-box-contain
75         https://bugs.webkit.org/show_bug.cgi?id=163794
76
77         Reviewed by Zalan Bujtas.
78
79         * css/parser/CSSPropertyParser.cpp:
80         (WebCore::consumeLineBoxContain):
81         (WebCore::CSSPropertyParser::parseSingleValue):
82
83 2016-10-21  Dave Hyatt  <hyatt@apple.com>
84
85         [CSS Parser] Add support for @-webkit-region rules
86         https://bugs.webkit.org/show_bug.cgi?id=163787
87
88         Reviewed by Zalan Bujtas.
89
90         * css/StyleRule.cpp:
91         (WebCore::StyleRuleRegion::StyleRuleRegion):
92         * css/StyleRule.h:
93         * css/parser/CSSAtRuleID.cpp:
94         (WebCore::cssAtRuleID):
95         * css/parser/CSSAtRuleID.h:
96         * css/parser/CSSParserImpl.cpp:
97         (WebCore::CSSParserImpl::consumeAtRule):
98         (WebCore::CSSParserImpl::consumePageRule):
99         (WebCore::CSSParserImpl::consumeRegionRule):
100         * css/parser/CSSParserImpl.h:
101
102 2016-10-21  David Kilzer  <ddkilzer@apple.com>
103
104         Bug 163757: Use IntSize::unclampedArea() in PDFDocumentImage::updateCachedImageIfNeeded()
105         <https://webkit.org/b/163757>
106
107         Reviewed by Brent Fulgham.
108
109         No new tests since there is no change in nominal behavior.
110
111         * platform/graphics/cg/PDFDocumentImage.cpp:
112         (WebCore::PDFDocumentImage::updateCachedImageIfNeeded): Use
113         IntSize::unclampedArea() where manual calculations were used
114         previously.  Also gets rid of more safeCast<size_t>() use.
115
116 2016-10-21  Chris Dumez  <cdumez@apple.com>
117
118         [Web IDL] Support unions in our overload resolution algorithm
119         https://bugs.webkit.org/show_bug.cgi?id=163764
120
121         Reviewed by Darin Adler.
122
123         Support unions in our overload resolution algorithm as per:
124         - https://heycam.github.io/webidl/#es-overloads
125         - https://heycam.github.io/webidl/#dfn-distinguishable
126
127         * bindings/scripts/CodeGeneratorJS.pm:
128         (IsIDLTypeDistinguishableWithUnionForOverloadResolution):
129         (AreTypesDistinguishableForOverloadResolution):
130         (GetOverloadThatMatches):
131         (GenerateOverloadedFunctionOrConstructor):
132         * bindings/scripts/test/JS/JSTestObj.cpp:
133         * bindings/scripts/test/TestObj.idl:
134
135 2016-10-21  Chris Dumez  <cdumez@apple.com>
136
137         AudioNode.connect(): First parameter should not be nullable
138         https://bugs.webkit.org/show_bug.cgi?id=163773
139
140         Reviewed by Darin Adler.
141
142         AudioNode.connect()'s first parameter should not be nullable:
143         - https://webaudio.github.io/web-audio-api/#idl-def-AudioNode.
144
145         We were throwing a SYNTAX_ERR when passing null, we now throw
146         a TypeError instead.
147
148         No new tests, updated existing test.
149
150         * Modules/webaudio/AudioBasicInspectorNode.cpp:
151         (WebCore::AudioBasicInspectorNode::connect):
152         * Modules/webaudio/AudioBasicInspectorNode.h:
153         * Modules/webaudio/AudioNode.cpp:
154         (WebCore::AudioNode::connect):
155         * Modules/webaudio/AudioNode.h:
156         * Modules/webaudio/AudioNode.idl:
157
158 2016-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>
159
160         Implement InputEvent.getTargetRanges() for the input events spec
161         https://bugs.webkit.org/show_bug.cgi?id=162947
162         <rdar://problem/28853079>
163
164         Reviewed by Darin Adler.
165
166         Implements InputEvent.getTargetRanges(). See individual method changes below for more details. Adds a new hook
167         for subclasses of CompositeEditCommand to vend a list of target StaticRanges when retrieving target ranges for
168         an editing command on a contenteditable area.
169
170         Tests: fast/events/before-input-delete-empty-list-target-ranges.html
171                fast/events/before-input-delete-text-target-ranges.html
172                fast/events/before-input-replace-text-target-ranges.html
173
174         * CMakeLists.txt:
175         * DerivedSources.make:
176         * WebCore.xcodeproj/project.pbxproj:
177
178         Add StaticRange.idl, StaticRange.cpp and StaticRange.h.
179
180         * bindings/generic/RuntimeEnabledFeatures.h:
181         (WebCore::RuntimeEnabledFeatures::setInputEventsEnabled):
182         (WebCore::RuntimeEnabledFeatures::inputEventsEnabled):
183
184         Add a new runtime bindings flag for InputEvents and guard both InputEvent and StaticRange behind it.
185
186         * dom/DOMAllInOne.cpp:
187         * dom/InputEvent.cpp:
188         (WebCore::InputEvent::InputEvent):
189         * dom/InputEvent.h:
190         * dom/InputEvent.idl:
191         * dom/StaticRange.cpp: Copied from Source/WebCore/dom/InputEvent.cpp.
192         (WebCore::StaticRange::StaticRange):
193         (WebCore::StaticRange::create):
194         (WebCore::StaticRange::createFromRange):
195
196         Convenience method for creating a StaticRange from a Range's start/end container and offset.
197
198         (WebCore::StaticRange::startContainer):
199         (WebCore::StaticRange::endContainer):
200         (WebCore::StaticRange::collapsed):
201         * dom/StaticRange.h: Copied from Source/WebCore/dom/InputEvent.cpp.
202         (WebCore::StaticRange::startOffset):
203         (WebCore::StaticRange::endOffset):
204         * dom/StaticRange.idl: Copied from Source/WebCore/editing/ReplaceRangeWithTextCommand.h.
205         * editing/CompositeEditCommand.cpp:
206         (WebCore::CompositeEditCommand::willApplyCommand):
207         (WebCore::CompositeEditCommand::targetRanges):
208
209         Virtual method that returns a list of target ranges which are associated with this command.
210
211         (WebCore::CompositeEditCommand::targetRangesForBindings):
212
213         Non-virtual method that calls the above targetRanges(). Takes whether or not the CompositeEditCommand is editing
214         a textarea or plain text input into account.
215
216         (WebCore::CompositeEditCommand::moveParagraphs):
217         * editing/CompositeEditCommand.h:
218         * editing/EditCommand.cpp:
219         (WebCore::EditCommand::frame):
220         * editing/EditCommand.h:
221         (WebCore::EditCommand::document):
222         * editing/Editor.cpp:
223         (WebCore::dispatchBeforeInputEvent):
224         (WebCore::dispatchInputEvent):
225         (WebCore::dispatchBeforeInputEvents):
226
227         Changed the `beforeinput` event dispatch to use the regular Node::dispatchEvent instead of dispatchScopedEvent.
228         This is because if the page prevents the `beforeinput` event, we need to know immediately in order to bail from
229         the default action.
230
231         (WebCore::dispatchInputEvents):
232         (WebCore::Editor::willApplyEditing):
233
234         Added a list of static ranges as a parameter when calling on the Editor to dispatch `beforeinput` events.
235         By default, this uses the composite edit command's targetRangesForBindings(), though it may be special cased
236         by subclasses of CompositeEditCommand (see ReplaceRangeWithTextCommand, SpellingCorrectionCommand, and
237         TypingCommand).
238
239         * editing/Editor.h:
240         * editing/ReplaceRangeWithTextCommand.cpp:
241         (WebCore::ReplaceRangeWithTextCommand::targetRanges):
242         * editing/ReplaceRangeWithTextCommand.h:
243         * editing/SpellingCorrectionCommand.cpp:
244         (WebCore::SpellingCorrectionCommand::targetRanges):
245         * editing/SpellingCorrectionCommand.h:
246         * editing/TypingCommand.cpp:
247         (WebCore::editActionIsDeleteByTyping):
248         (WebCore::TypingCommand::shouldDeferWillApplyCommandUntilAddingTypingCommand):
249         (WebCore::TypingCommand::willApplyCommand):
250         (WebCore::TypingCommand::willAddTypingToOpenCommand):
251         (WebCore::TypingCommand::deleteKeyPressed):
252         (WebCore::TypingCommand::forwardDeleteKeyPressed):
253
254         Moves the firing of the `beforeinput` until after the selection range to delete has been computed.
255
256         * editing/TypingCommand.h:
257
258 2016-10-21  Antti Koivisto  <antti@apple.com>
259
260         Style resolver should be updated lazily
261         https://bugs.webkit.org/show_bug.cgi?id=163721
262
263         Reviewed by Andreas Kling.
264
265         Currently when stylesheets change in some way we generally update style resolvers and
266         invalidate style immediately. We should do this lazily to avoid unnecessary work.
267
268         Also improve naming of the stylesheet invalidation functions and use more optimal functions in some places.
269
270         * css/CSSComputedStyleDeclaration.cpp:
271         (WebCore::updateStyleIfNeededForNode):
272         * css/CSSStyleSheet.cpp:
273         (WebCore::CSSStyleSheet::didMutateRules):
274         (WebCore::CSSStyleSheet::didMutate):
275         (WebCore::CSSStyleSheet::setDisabled):
276         * css/StyleResolver.cpp:
277         (WebCore::StyleResolver::StyleResolver):
278
279             Initialize root style font with null font selector.
280             This avoids hitting a CSSFontSelector assert in fast/media/mq-relative-constraints-08.html where
281             media query evaluation requires font information before it is ready.
282             Exposed by increased laziness in this patch.
283
284         * dom/Document.cpp:
285         (WebCore::Document::setContentLanguage):
286         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
287         (WebCore::Document::isPageBoxVisible):
288         (WebCore::Document::pageSizeAndMarginsInPixels):
289         (WebCore::Document::processHttpEquiv):
290         (WebCore::Document::setSelectedStylesheetSet):
291         (WebCore::Document::didInsertInDocumentShadowRoot):
292         (WebCore::Document::didRemoveInDocumentShadowRoot):
293         * dom/Document.h:
294         (WebCore::Document::inDocumentShadowRoots):
295
296             Track all shadow roots in the document. This allows us to find and flush style scopes cheaply.
297
298         * dom/Element.cpp:
299         (WebCore::Element::computedStyle):
300         * dom/ExtensionStyleSheets.cpp:
301         (WebCore::ExtensionStyleSheets::ExtensionStyleSheets):
302         (WebCore::ExtensionStyleSheets::clearPageUserSheet):
303         (WebCore::ExtensionStyleSheets::updatePageUserSheet):
304         (WebCore::ExtensionStyleSheets::invalidateInjectedStyleSheetCache):
305         (WebCore::ExtensionStyleSheets::addUserStyleSheet):
306         (WebCore::ExtensionStyleSheets::addAuthorStyleSheetForTesting):
307         (WebCore::ExtensionStyleSheets::addDisplayNoneSelector):
308         (WebCore::ExtensionStyleSheets::maybeAddContentExtensionSheet):
309         (WebCore::ExtensionStyleSheets::styleResolverChangedTimerFired): Deleted.
310
311             Since updates are now done lazily we don't need a special timer for extension stylesheets.
312
313         * dom/ExtensionStyleSheets.h:
314         * dom/ProcessingInstruction.cpp:
315         (WebCore::ProcessingInstruction::checkStyleSheet):
316         (WebCore::ProcessingInstruction::sheetLoaded):
317         (WebCore::ProcessingInstruction::removedFrom):
318         * dom/ShadowRoot.cpp:
319         (WebCore::ShadowRoot::ShadowRoot):
320         (WebCore::ShadowRoot::insertedInto):
321         (WebCore::ShadowRoot::removedFrom):
322         (WebCore::ShadowRoot::styleScope):
323         * dom/ShadowRoot.h:
324         * html/HTMLLinkElement.cpp:
325         (WebCore::HTMLLinkElement::setDisabledState):
326         (WebCore::HTMLLinkElement::parseAttribute):
327         (WebCore::HTMLLinkElement::process):
328         (WebCore::HTMLLinkElement::removePendingSheet):
329         * html/HTMLStyleElement.cpp:
330         (WebCore::HTMLStyleElement::parseAttribute):
331         * inspector/InspectorCSSAgent.cpp:
332         (WebCore::InspectorCSSAgent::createInspectorStyleSheetForDocument):
333         (WebCore::InspectorCSSAgent::forcePseudoState):
334         (WebCore::InspectorCSSAgent::resetPseudoStates):
335         * inspector/InspectorPageAgent.cpp:
336         (WebCore::InspectorPageAgent::setEmulatedMedia):
337         * page/Frame.cpp:
338         (WebCore::Frame::setPrinting):
339         * page/FrameView.cpp:
340         (WebCore::FrameView::layout):
341         (WebCore::FrameView::setPagination):
342         (WebCore::FrameView::setViewportSizeForCSSViewportUnits):
343         * page/Page.cpp:
344         (WebCore::Page::setViewMode):
345         (WebCore::Page::setNeedsRecalcStyleInAllFrames):
346         (WebCore::Page::invalidateInjectedStyleSheetCacheInAllFrames):
347         * style/StyleScope.cpp:
348         (WebCore::Style::Scope::setPreferredStylesheetSetName):
349         (WebCore::Style::Scope::setSelectedStylesheetSetName):
350         (WebCore::Style::Scope::removePendingSheet):
351         (WebCore::Style::Scope::removeStyleSheetCandidateNode):
352         (WebCore::Style::Scope::activeStyleSheetsForInspector):
353         (WebCore::Style::Scope::flushPendingUpdate):
354
355             Also flush descendant shadow roots.
356
357         (WebCore::Style::Scope::scheduleUpdate):
358         (WebCore::Style::Scope::didChangeActiveStyleSheetCandidates):
359
360             Make lazy.
361
362         (WebCore::Style::Scope::didChangeStyleSheetContents):
363
364             Make lazy.
365
366         (WebCore::Style::Scope::didChangeStyleSheetEnvironment):
367
368             Environment changes also affect author shadow roots.
369
370         (WebCore::Style::Scope::styleSheetsForStyleSheetList):
371         (WebCore::Style::Scope::scheduleActiveSetUpdate): Deleted.
372         (WebCore::Style::Scope::didChangeCandidatesForActiveSet): Deleted.
373         (WebCore::Style::Scope::didChangeContentsOrInterpretation): Deleted.
374
375             Improved naming of these and split didChangeContentsOrInterpretation into two separate functions.
376
377         * style/StyleScope.h:
378         (WebCore::Style::Scope::styleSheetsForStyleSheetList): Deleted.
379         (WebCore::Style::Scope::setPreferredStylesheetSetName): Deleted.
380         (WebCore::Style::Scope::setSelectedStylesheetSetName): Deleted.
381         * svg/SVGFontFaceElement.cpp:
382         (WebCore::SVGFontFaceElement::rebuildFontFace):
383         (WebCore::SVGFontFaceElement::removedFrom):
384         * testing/Internals.cpp:
385         (WebCore::Internals::resetToConsistentState):
386
387             Ensure that cationsStyleSheetOverride really becomes empty. Some tests rely on not having suprise
388             inserted stylesheets. Previously this was racy and the patch affected order of things.
389
390         (WebCore::Internals::styleChangeType):
391         * xml/XMLTreeViewer.cpp:
392         (WebCore::XMLTreeViewer::transformDocumentToTreeView):
393         * xml/parser/XMLDocumentParser.cpp:
394         (WebCore::XMLDocumentParser::end):
395         * xml/parser/XMLDocumentParserLibxml2.cpp:
396         (WebCore::XMLDocumentParser::doEnd):
397
398 2016-10-21  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Adam Bergkvist  <adam.bergkvist@ericsson.com>
399
400         WebRTC: [OpenWebRTC] Move SDPProcessorScriptResource(Gtk) to openwebrtc directory
401         https://bugs.webkit.org/show_bug.cgi?id=163778
402
403         Reviewed by Philippe Normand.
404
405         Move SDPProcessorScriptResourceGtk from the platform gtk directory to the port generic
406         openwebrtc directory to make it usable by other ports. Also drop the Gtk-suffix.
407
408         No change of behavior.
409
410         * PlatformGTK.cmake:
411         * platform/mediastream/gtk/SDPProcessorScriptResourceGtk.cpp:
412         (WebCore::SDPProcessorScriptResource::scriptString): Deleted.
413         * platform/mediastream/openwebrtc/SDPProcessorScriptResource.cpp: Renamed from Source/WebCore/platform/mediastream/gtk/SDPProcessorScriptResourceGtk.cpp.
414         (WebCore::SDPProcessorScriptResource::scriptString):
415
416 2016-10-21  Miguel Gomez  <magomez@igalia.com>
417
418         [GTK] Several tests crashing on debug bot in (anonymous namespace)::MediaPlayerPrivateGStreamerBase::repaint
419         https://bugs.webkit.org/show_bug.cgi?id=163511
420
421         Reviewed by Carlos Garcia Campos.
422
423         Perform the video repaint in the main thread when accelerated compositing is disabled. Added a new method to
424         MediaPlayerClient to get whether accelerated compositing is enabled from the MediaPlayer. This is needed
425         because mediaPlayerAcceleratedCompositingEnabled() will return false while HTMLMediaElement doesn't have a
426         RenderVideo, even when accelerated compositing is enabled.
427
428         Covered by existent tests.
429
430         * html/HTMLMediaElement.cpp:
431         (WebCore::HTMLMediaElement::mediaPlayerAcceleratedCompositingEnabled):
432         * html/HTMLMediaElement.h:
433         * platform/graphics/MediaPlayer.h:
434         (WebCore::MediaPlayerClient::mediaPlayerAcceleratedCompositingEnabled):
435         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
436         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
437         (WebCore::MediaPlayerPrivateGStreamerBase::repaint):
438         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
439         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
440
441 2016-10-21  Adam Bergkvist  <adam.bergkvist@ericsson.com>
442
443         WebRTC: [GTK] Add MediaEndpointOwr - an OpenWebRTC WebRTC backend
444         https://bugs.webkit.org/show_bug.cgi?id=163327
445
446         Reviewed by Philippe Normand.
447
448         Add MediaEndpointOwr which is a MediaEndpoint implementation (WebRTC backend) based on
449         OpenWebRTC [1]. The WebRTC backend can be tested with a manual test. Automatic testing
450         is still done with MockMediaEndpoint.
451
452         [1] http://www.openwebrtc.org/
453
454         Testing: Added manual test (webrtc-one-tab-p2p.html)
455
456         * CMakeLists.txt:
457         * platform/GStreamer.cmake:
458         * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp: Added.
459         (WebCore::createMediaEndpointOwr):
460         (WebCore::MediaEndpointOwr::MediaEndpointOwr):
461         (WebCore::MediaEndpointOwr::~MediaEndpointOwr):
462         (WebCore::MediaEndpointOwr::setConfiguration):
463         (WebCore::cryptoDataCallback):
464         (WebCore::MediaEndpointOwr::generateDtlsInfo):
465         (WebCore::MediaEndpointOwr::getDefaultAudioPayloads):
466         (WebCore::MediaEndpointOwr::getDefaultVideoPayloads):
467         (WebCore::payloadsContainType):
468         (WebCore::MediaEndpointOwr::filterPayloads):
469         (WebCore::MediaEndpointOwr::updateReceiveConfiguration):
470         (WebCore::findRtxPayload):
471         (WebCore::MediaEndpointOwr::updateSendConfiguration):
472         (WebCore::MediaEndpointOwr::addRemoteCandidate):
473         (WebCore::MediaEndpointOwr::replaceMutedRemoteSourceMid):
474         (WebCore::MediaEndpointOwr::createMutedRemoteSource):
475         (WebCore::MediaEndpointOwr::replaceSendSource):
476         (WebCore::MediaEndpointOwr::stop):
477         (WebCore::MediaEndpointOwr::transceiverIndexForSession):
478         (WebCore::MediaEndpointOwr::sessionMid):
479         (WebCore::MediaEndpointOwr::matchTransceiverByMid):
480         (WebCore::MediaEndpointOwr::dispatchNewIceCandidate):
481         (WebCore::MediaEndpointOwr::dispatchGatheringDone):
482         (WebCore::MediaEndpointOwr::processIceTransportStateChange):
483         (WebCore::MediaEndpointOwr::dispatchDtlsFingerprint):
484         (WebCore::MediaEndpointOwr::unmuteRemoteSource):
485         (WebCore::MediaEndpointOwr::prepareSession):
486         (WebCore::MediaEndpointOwr::prepareMediaSession):
487         (WebCore::parseHelperServerUrl):
488         (WebCore::MediaEndpointOwr::ensureTransportAgentAndTransceivers):
489         (WebCore::MediaEndpointOwr::internalAddRemoteCandidate):
490         (WebCore::gotCandidate):
491         (WebCore::candidateGatheringDone):
492         (WebCore::iceConnectionStateChange):
493         (WebCore::gotIncomingSource):
494         * platform/mediastream/openwebrtc/MediaEndpointOwr.h: Added.
495         (WebCore::OwrTransceiver::create):
496         (WebCore::OwrTransceiver::~OwrTransceiver):
497         (WebCore::OwrTransceiver::mid):
498         (WebCore::OwrTransceiver::session):
499         (WebCore::OwrTransceiver::owrIceState):
500         (WebCore::OwrTransceiver::setOwrIceState):
501         (WebCore::OwrTransceiver::gotEndOfRemoteCandidates):
502         (WebCore::OwrTransceiver::markGotEndOfRemoteCandidates):
503         (WebCore::OwrTransceiver::OwrTransceiver):
504         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
505         (WebCore::RealtimeMediaSourceOwr::RealtimeMediaSourceOwr):
506         (WebCore::RealtimeMediaSourceOwr::swapOutShallowSource):
507         Add support for an initially muted source. This is used for early
508         creation of remote sources.
509
510 2016-10-21  Javier Fernandez  <jfernandez@igalia.com>
511
512         [css-grid] Content Alignment broken with indefinite sized grid container
513         https://bugs.webkit.org/show_bug.cgi?id=163724
514
515         Reviewed by Manuel Rego Casasnovas.
516
517         The Grid Tracks sizing algorithm receives as parameter the
518         available space to be used as space for tracks. We hold a variable
519         to store the remaining free space for each dimension.
520
521         When the grid container size is indefinite we can't compute the
522         available free space after computing track sizes until such
523         indefinite size is resolved.
524
525         No new tests, just added some additional test cases.
526
527         * rendering/RenderGrid.cpp:
528         (WebCore::RenderGrid::layoutBlock): Compute freeSpace for Rows
529         after doing layout and resolving the indefinite height.
530
531 2016-10-21  Jer Noble  <jer.noble@apple.com>
532
533         CRASH in SourceBuffer::sourceBufferPrivateDidReceiveSample + 2169
534         https://bugs.webkit.org/show_bug.cgi?id=163735
535
536         Reviewed by Eric Carlson.
537
538         Test: media/media-source/media-source-sample-wrong-track-id.html
539
540         When SourceBuffer receives a sample in sourceBufferPrivateDidReceiveSample() containing
541         a trackID not previously seen in an initialization segment, it creates a default TrackBuffer
542         object to contain that track's samples. One of the fields in TrackBuffer, description, is
543         normally filled out when an initialization segment is received, but with this default
544         TrackBuffer, it's still null when it's checked later in sourceBufferPrivateDidReceiveSample().
545
546         Rather than adding a null-check on trackBuffer.description, drop any sample that has a 
547         trackID which was not present during a previous initialization segment.
548
549         * Modules/mediasource/SourceBuffer.cpp:
550         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
551
552 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
553
554         [GTK] Configures but fails to link with ENABLE_OPENGL=OFF
555         https://bugs.webkit.org/show_bug.cgi?id=163449
556
557         Reviewed by Michael Catanzaro.
558
559         Only define sharingGLContext in PlatformDisplay if EGL or GLX are enabled.
560
561         * platform/graphics/PlatformDisplay.cpp:
562         * platform/graphics/PlatformDisplay.h:
563         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
564         (WebCore::PlatformDisplayWayland::initialize):
565         * platform/graphics/x11/PlatformDisplayX11.cpp:
566         (WebCore::PlatformDisplayX11::~PlatformDisplayX11):
567
568 2016-10-20  Filip Pizlo  <fpizlo@apple.com>
569
570         The tracking of the coarse-grain Heap state (allocating or not, collector or not, eden vs full) should respect the orthogonality between allocating and collecting
571         https://bugs.webkit.org/show_bug.cgi?id=163738
572
573         Reviewed by Geoffrey Garen.
574
575         No new tests because no change in behavior.
576
577         * bindings/js/GCController.cpp:
578         (WebCore::GCController::garbageCollectNow):
579
580 2016-10-20  Chris Dumez  <cdumez@apple.com>
581
582         [Bindings] Start using signature->idlType instead of signature->type in the overload resolution code
583         https://bugs.webkit.org/show_bug.cgi?id=163767
584
585         Reviewed by Darin Adler.
586
587         Start using signature->idlType instead of signature->type in the overload resolution code
588         to prepare for union type support.
589
590         * bindings/scripts/CodeGeneratorJS.pm:
591         (ComputeEffectiveOverloadSet):
592         (AreTypesDistinguishableForOverloadResolution):
593         (GetDistinguishingArgumentIndex):
594         (GetOverloadThatMatches):
595         (GenerateOverloadedFunctionOrConstructor):
596
597 2016-10-20  Myles C. Maxfield  <mmaxfield@apple.com>
598
599         Implement WebGL2 bufferData() and bufferSubData() methods
600         https://bugs.webkit.org/show_bug.cgi?id=163759
601
602         Reviewed by Dean Jackson.
603
604         These new overloads simply clip the input array buffer.
605
606         Test: fast/canvas/webgl/bufferData-offset-length.html
607
608         * html/canvas/WebGL2RenderingContext.cpp:
609         (WebCore::WebGL2RenderingContext::bufferData):
610         (WebCore::WebGL2RenderingContext::bufferSubData):
611         * html/canvas/WebGL2RenderingContext.h:
612         * html/canvas/WebGL2RenderingContext.idl:
613
614 2016-10-20  Chris Dumez  <cdumez@apple.com>
615
616         "Download Linked File" context menu action should use 'download' attribute as suggested filename
617         https://bugs.webkit.org/show_bug.cgi?id=163742
618         <rdar://problem/28840734>
619
620         Reviewed by Darin Adler.
621
622         Add convenience method to HitTestResult to return the URL element's
623         download attribute.
624
625         * rendering/HitTestResult.cpp:
626         (WebCore::HitTestResult::URLElementDownloadAttribute):
627         * rendering/HitTestResult.h:
628
629 2016-10-20  Nan Wang  <n_wang@apple.com>
630
631         AX: VoiceOver is not detecting ARIA treeview if it contains role="presentation"
632         https://bugs.webkit.org/show_bug.cgi?id=163763
633
634         Reviewed by Chris Fleizach.
635
636         Test: accessibility/mac/aria-tree-with-presentation-role.html
637
638         Web authors sometimes use presentation role in the aria tree to hide elements. We should
639         consider this a valid case if they specify tree items and groups correctly.
640
641         * accessibility/AccessibilityNodeObject.cpp:
642         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
643         * accessibility/AccessibilityTree.cpp:
644         (WebCore::AccessibilityTree::nodeHasTreeItemChild):
645         (WebCore::AccessibilityTree::isTreeValid):
646         * accessibility/AccessibilityTree.h:
647
648 2016-10-20  Myles C. Maxfield  <mmaxfield@apple.com>
649
650         Many WebGL functions which don't throw are marked as possibly throwing
651         https://bugs.webkit.org/show_bug.cgi?id=163747
652
653         Reviewed by Dean Jackson.
654
655         Mechanically remove the exception code.
656
657         No new tests because there is no behavior change.
658
659         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
660         (WebCore::getObjectParameter):
661         (WebCore::JSWebGLRenderingContextBase::getAttachedShaders):
662         (WebCore::JSWebGLRenderingContextBase::getProgramParameter):
663         (WebCore::JSWebGLRenderingContextBase::getShaderParameter):
664         (WebCore::JSWebGLRenderingContextBase::getUniform):
665         (WebCore::dataFunctionf):
666         (WebCore::dataFunctioni):
667         (WebCore::dataFunctionMatrix):
668         * html/canvas/WebGL2RenderingContext.cpp:
669         (WebCore::WebGL2RenderingContext::texSubImage2D):
670         * html/canvas/WebGLRenderingContext.cpp:
671         (WebCore::WebGLRenderingContext::texSubImage2D):
672         * html/canvas/WebGLRenderingContextBase.cpp:
673         (WebCore::WebGLRenderingContextBase::activeTexture):
674         (WebCore::WebGLRenderingContextBase::attachShader):
675         (WebCore::WebGLRenderingContextBase::bindAttribLocation):
676         (WebCore::WebGLRenderingContextBase::bindBuffer):
677         (WebCore::WebGLRenderingContextBase::bindFramebuffer):
678         (WebCore::WebGLRenderingContextBase::bindRenderbuffer):
679         (WebCore::WebGLRenderingContextBase::bindTexture):
680         (WebCore::WebGLRenderingContextBase::bufferData):
681         (WebCore::WebGLRenderingContextBase::bufferSubData):
682         (WebCore::WebGLRenderingContextBase::compileShader):
683         (WebCore::WebGLRenderingContextBase::createShader):
684         (WebCore::WebGLRenderingContextBase::detachShader):
685         (WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
686         (WebCore::WebGLRenderingContextBase::drawArrays):
687         (WebCore::WebGLRenderingContextBase::drawElements):
688         (WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
689         (WebCore::WebGLRenderingContextBase::framebufferRenderbuffer):
690         (WebCore::WebGLRenderingContextBase::framebufferTexture2D):
691         (WebCore::WebGLRenderingContextBase::getActiveAttrib):
692         (WebCore::WebGLRenderingContextBase::getActiveUniform):
693         (WebCore::WebGLRenderingContextBase::getAttachedShaders):
694         (WebCore::WebGLRenderingContextBase::getBufferParameter):
695         (WebCore::WebGLRenderingContextBase::getProgramParameter):
696         (WebCore::WebGLRenderingContextBase::getProgramInfoLog):
697         (WebCore::WebGLRenderingContextBase::getRenderbufferParameter):
698         (WebCore::WebGLRenderingContextBase::getShaderParameter):
699         (WebCore::WebGLRenderingContextBase::getShaderInfoLog):
700         (WebCore::WebGLRenderingContextBase::getShaderPrecisionFormat):
701         (WebCore::WebGLRenderingContextBase::getShaderSource):
702         (WebCore::WebGLRenderingContextBase::getTexParameter):
703         (WebCore::WebGLRenderingContextBase::getUniform):
704         (WebCore::WebGLRenderingContextBase::getUniformLocation):
705         (WebCore::WebGLRenderingContextBase::getVertexAttrib):
706         (WebCore::WebGLRenderingContextBase::linkProgram):
707         (WebCore::WebGLRenderingContextBase::readPixels):
708         (WebCore::WebGLRenderingContextBase::shaderSource):
709         (WebCore::WebGLRenderingContextBase::videoFrameToImage):
710         (WebCore::WebGLRenderingContextBase::texImage2D):
711         (WebCore::WebGLRenderingContextBase::uniform1f):
712         (WebCore::WebGLRenderingContextBase::uniform1fv):
713         (WebCore::WebGLRenderingContextBase::uniform1i):
714         (WebCore::WebGLRenderingContextBase::uniform1iv):
715         (WebCore::WebGLRenderingContextBase::uniform2f):
716         (WebCore::WebGLRenderingContextBase::uniform2fv):
717         (WebCore::WebGLRenderingContextBase::uniform2i):
718         (WebCore::WebGLRenderingContextBase::uniform2iv):
719         (WebCore::WebGLRenderingContextBase::uniform3f):
720         (WebCore::WebGLRenderingContextBase::uniform3fv):
721         (WebCore::WebGLRenderingContextBase::uniform3i):
722         (WebCore::WebGLRenderingContextBase::uniform3iv):
723         (WebCore::WebGLRenderingContextBase::uniform4f):
724         (WebCore::WebGLRenderingContextBase::uniform4fv):
725         (WebCore::WebGLRenderingContextBase::uniform4i):
726         (WebCore::WebGLRenderingContextBase::uniform4iv):
727         (WebCore::WebGLRenderingContextBase::uniformMatrix2fv):
728         (WebCore::WebGLRenderingContextBase::uniformMatrix3fv):
729         (WebCore::WebGLRenderingContextBase::uniformMatrix4fv):
730         (WebCore::WebGLRenderingContextBase::useProgram):
731         (WebCore::WebGLRenderingContextBase::validateProgram):
732         (WebCore::WebGLRenderingContextBase::vertexAttribPointer):
733         (WebCore::WebGLRenderingContextBase::restoreCurrentFramebuffer):
734         (WebCore::WebGLRenderingContextBase::restoreCurrentTexture2D):
735         * html/canvas/WebGLRenderingContextBase.h:
736         * html/canvas/WebGLRenderingContextBase.idl:
737
738 2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
739
740         [macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
741         https://bugs.webkit.org/show_bug.cgi?id=163374
742
743         Reviewed by Darin Adler.
744
745         Because of platform lack of support for variations in in-memory fonts,
746         this feature should be disabled on the affected OSes.
747
748         No tests because there is no behavior change (on the relevant platforms).
749
750         * Configurations/FeatureDefines.xcconfig:
751
752 2016-10-20  Brady Eidson  <beidson@apple.com>
753
754         IndexedDB 2.0: Support IDBObjectStore name assignment.
755         <rdar://problem/28806931> and https://bugs.webkit.org/show_bug.cgi?id=163749
756
757         Reviewed by Alex Christensen.
758
759         Tests: storage/indexeddb/modern/objectstore-rename-1-private.html
760                storage/indexeddb/modern/objectstore-rename-1.html
761
762         Touches a *lot* of code sites, but none of them are particularly interesting.
763         They are all just getting the new name spread out to all of the various objects that need it.
764
765         * Modules/indexeddb/IDBDatabase.cpp:
766         (WebCore::IDBDatabase::renameObjectStore):
767         * Modules/indexeddb/IDBDatabase.h:
768
769         * Modules/indexeddb/IDBObjectStore.cpp:
770         (WebCore::IDBObjectStore::setName):
771         * Modules/indexeddb/IDBObjectStore.h:
772         * Modules/indexeddb/IDBObjectStore.idl:
773
774         * Modules/indexeddb/IDBTransaction.cpp:
775         (WebCore::IDBTransaction::renameObjectStore):
776         (WebCore::IDBTransaction::renameObjectStoreOnServer):
777         (WebCore::IDBTransaction::didRenameObjectStoreOnServer):
778         * Modules/indexeddb/IDBTransaction.h:
779
780         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
781         (WebCore::IDBClient::IDBConnectionProxy::renameObjectStore):
782         * Modules/indexeddb/client/IDBConnectionProxy.h:
783
784         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
785         (WebCore::IDBClient::IDBConnectionToServer::renameObjectStore):
786         (WebCore::IDBClient::IDBConnectionToServer::didRenameObjectStore):
787         * Modules/indexeddb/client/IDBConnectionToServer.h:
788         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
789
790         * Modules/indexeddb/server/IDBBackingStore.h:
791
792         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
793         (WebCore::IDBServer::IDBConnectionToClient::didDeleteObjectStore):
794         (WebCore::IDBServer::IDBConnectionToClient::didRenameObjectStore):
795         * Modules/indexeddb/server/IDBConnectionToClient.h:
796         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
797
798         * Modules/indexeddb/server/IDBServer.cpp:
799         (WebCore::IDBServer::IDBServer::renameObjectStore):
800         * Modules/indexeddb/server/IDBServer.h:
801
802         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
803         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreRenamed):
804         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
805         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
806
807         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
808         (WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore):
809         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
810
811         * Modules/indexeddb/server/MemoryObjectStore.h:
812         (WebCore::IDBServer::MemoryObjectStore::rename):
813
814         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
815         (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
816         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
817
818         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
819         (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
820         (WebCore::IDBServer::UniqueIDBDatabase::performRenameObjectStore):
821         (WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameObjectStore):
822         * Modules/indexeddb/server/UniqueIDBDatabase.h:
823
824         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
825         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameObjectStore):
826         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
827
828         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
829         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameObjectStore):
830         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
831
832         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
833         (WebCore::IDBDatabaseInfo::renameObjectStore):
834         * Modules/indexeddb/shared/IDBDatabaseInfo.h:
835
836         * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
837         (WebCore::IDBObjectStoreInfo::rename):
838
839         * Modules/indexeddb/shared/IDBResultData.cpp:
840         (WebCore::IDBResultData::renameObjectStoreSuccess):
841         * Modules/indexeddb/shared/IDBResultData.h:
842
843         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
844         (WebCore::InProcessIDBServer::didRenameObjectStore):
845         (WebCore::InProcessIDBServer::renameObjectStore):
846         * Modules/indexeddb/shared/InProcessIDBServer.h:
847
848 2016-10-20  Chris Dumez  <cdumez@apple.com>
849
850         Make table.deleteRow(-1) a no-op when there are no rows
851         https://bugs.webkit.org/show_bug.cgi?id=163746
852
853         Reviewed by Alex Christensen.
854
855         Make table.deleteRow(-1) a no-op when there are no rows, instead of throwing:
856         - https://github.com/whatwg/html/pull/1924
857
858         This is more consistent with the behavior of tbody.deleteRow(-1) and
859         tr.deleteCell(-1). This is also consistent with Gecko. Blink is doing the
860         same change via:
861         - https://codereview.chromium.org/2427963004/
862
863         No new tests, updated existing tests.
864
865         * html/HTMLTableElement.cpp:
866         (WebCore::HTMLTableElement::deleteRow):
867
868 2016-10-20  Dave Hyatt  <hyatt@apple.com>
869
870         [CSS Parser] Make sure to handle prefixed transform-style
871         https://bugs.webkit.org/show_bug.cgi?id=163756
872
873         Reviewed by Dean Jackson.
874
875         * css/parser/CSSParserFastPaths.cpp:
876         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
877
878 2016-10-20  Dave Hyatt  <hyatt@apple.com>
879
880         [CSS Parser] Fix crash when parsing -webkit-margin-collapse
881         https://bugs.webkit.org/show_bug.cgi?id=163753
882
883         Reviewed by Dean Jackson.
884
885         * css/parser/CSSPropertyParser.cpp:
886         (WebCore::CSSPropertyParser::parseShorthand):
887
888 2016-10-20  Chris Dumez  <cdumez@apple.com>
889
890         Passing a number as the pixel parameter to texImage2D() doesn't thrown an exception
891         https://bugs.webkit.org/show_bug.cgi?id=163715
892
893         Reviewed by Darin Adler.
894
895         Enable strict type checking for typed arrays in the bindings, similarly
896         do what we do for other wrapper types, as per Web IDL.
897
898         No new tests, updated existing tests.
899
900         * bindings/scripts/CodeGeneratorJS.pm:
901         (GenerateImplementation):
902         (GenerateParametersCheck):
903
904 2016-10-20  Myles C. Maxfield  <mmaxfield@apple.com>
905
906         Improve error message when passing a null ArrayBuffer to bufferData()
907         https://bugs.webkit.org/show_bug.cgi?id=163745
908
909         Reviewed by Dean Jackson.
910
911         Test: fast/canvas/webgl/bufferData-nullable-array-buffer-view.html
912
913         Update the idl file to accept a nullable ArrayBuffer, and throw
914         the relevant error with a more helpful error string.
915
916         * html/canvas/WebGLRenderingContextBase.cpp:
917         (WebCore::WebGLRenderingContextBase::bufferData):
918         * html/canvas/WebGLRenderingContextBase.h:
919         * html/canvas/WebGLRenderingContextBase.idl:
920
921 2016-10-20  Zalan Bujtas  <zalan@apple.com>
922
923         Stop searching for first-letter containers at multi-column boundary.
924         https://bugs.webkit.org/show_bug.cgi?id=163739
925         <rdar://problem/28810750>
926
927         We should not cross the multi-column boundary while searching for the first-letter container.
928         While moving first-letter renderers to a multi-column parent, it could result in finding the wrong
929         container and end up adding a new wrapper under the original container (from where we are moving the renderers).    
930
931         Reviewed by David Hyatt.
932
933         Test: fast/css-generated-content/first-letter-move-to-multicolumn-crash.html
934
935         * rendering/RenderBoxModelObject.cpp:
936         (WebCore::RenderBoxModelObject::moveChildrenTo):
937         * rendering/RenderTextFragment.cpp:
938         (WebCore::RenderTextFragment::blockForAccompanyingFirstLetter):
939
940 2016-10-19  Dean Jackson  <dino@apple.com>
941
942         Support CSS Shapes Level 1 without a prefix
943         https://bugs.webkit.org/show_bug.cgi?id=163709
944         <rdar://problem/28859369>
945
946         Reviewed by Myles Maxfield.
947
948         Support the unprefixed form of CSS Shapes, now that
949         it is in CR.
950
951         We have a few failing tests:
952
953         - Some image-based shaping failures, now skipped.
954           https://bugs.webkit.org/show_bug.cgi?id=163706
955
956         - Some false negatives, where my understanding
957           of the CSS OM seems to suggest that the W3C tests
958           are incorrect.
959           https://bugs.webkit.org/show_bug.cgi?id=163708
960
961         Tests: imported/w3c/csswg-test/css-shapes-1
962
963         * css/CSSComputedStyleDeclaration.cpp:
964         (WebCore::ComputedStyleExtractor::propertyValue):
965         * css/CSSPropertyNames.in:
966         * css/CSSValueKeywords.in:
967         * css/parser/CSSParser.cpp:
968         (WebCore::isSimpleLengthPropertyID):
969         (WebCore::CSSParser::parseValue):
970         * css/parser/CSSPropertyParser.cpp:
971         (WebCore::CSSPropertyParser::parseSingleValue):
972         * page/animation/CSSPropertyAnimation.cpp:
973         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
974
975 2016-10-20  Dave Hyatt  <hyatt@apple.com>
976
977         [CSS Parser] Fix region, column and page break parsing
978         https://bugs.webkit.org/show_bug.cgi?id=163743
979
980         Reviewed by Simon Fraser.
981
982         * css/parser/CSSParserFastPaths.cpp:
983         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
984         Add the missing values for break support.
985
986         * css/parser/CSSPropertyParser.cpp:
987         (WebCore::isLegacyBreakProperty):
988         (WebCore::CSSPropertyParser::parseValueStart):
989         Add a special case for handling legacy break properties. Blink treats them like
990         shorthands, but we can't do that without breaking the old parser, so for now
991         we add a special case.
992
993         (WebCore::mapFromPageBreakBetween):
994         (WebCore::mapFromColumnBreakBetween):
995         (WebCore::mapFromRegionBreakBetween):
996         Updated to have the AvoidXXX values (where XXX is Column/Page/Region).
997
998         (WebCore::CSSPropertyParser::parseShorthand):
999         Remove the consumeLegacyBreak from the shorthand function, since we can't treat
1000         the legacy break properties as shorthands yet.
1001
1002 2016-10-20  Sam Weinig  <sam@webkit.org>
1003
1004         Add convenience function that combines WTF::visit(...) with WTF::makeVisitor(...)
1005         https://bugs.webkit.org/show_bug.cgi?id=163713
1006
1007         Reviewed by Dan Bernstein.
1008
1009         Switch uses of WTF::visit to use WTF::switchOn.
1010
1011         * dom/MessageEvent.cpp:
1012         (WebCore::MessageEvent::source):
1013         * dom/Node.cpp:
1014         (WebCore::nodeSetPreTransformedFromNodeOrStringVector):
1015         (WebCore::Node::convertNodesOrStringsIntoNode):
1016         * html/HTMLSelectElement.cpp:
1017         (WebCore::HTMLSelectElement::add):
1018         * html/track/TrackEvent.cpp:
1019         (WebCore::TrackEvent::TrackEvent):
1020         * testing/TypeConversions.h:
1021         (WebCore::TypeConversions::typeConversionsDictionaryUnionType):
1022
1023 2016-10-20  Dave Hyatt  <hyatt@apple.com>
1024
1025         [CSS Parser] Fix font family parsing and add CSS region property parsing
1026         https://bugs.webkit.org/show_bug.cgi?id=163741
1027
1028         Reviewed by Zalan Bujtas.
1029
1030         * css/parser/CSSParser.cpp:
1031         (WebCore::isKeywordPropertyID):
1032         (WebCore::parseKeywordValue):
1033         (WebCore::CSSParser::parseValue):
1034         Modify the old CSSParser to have its own keyword check, since keywords were
1035         incorrectly added to the new parser when this check was consolidated. Column
1036         and region breaks are considered keyword properties by the old parser, but
1037         not by the new parser, since the new parser special cases them and maps them
1038         into the generic break property.
1039
1040         * css/parser/CSSParserFastPaths.cpp:
1041         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
1042         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
1043         Update for regions to make sure all the region properties are there. Remove the
1044         column and region break properties, since they're not supposed to be here in the
1045         new parser.
1046
1047         * css/parser/CSSPropertyParser.cpp:
1048         (WebCore::consumeFamilyName):
1049         Fix font parsing to make font family values so that fonts work.
1050
1051         (WebCore::consumeFlowProperty):
1052         Add a function for handling -webkit-flow-from and -webkit-flow-into.
1053
1054         (WebCore::CSSPropertyParser::parseSingleValue):
1055         Add support for the region properties.
1056
1057         (WebCore::mapFromRegionBreakBetween):
1058         (WebCore::mapFromColumnRegionOrPageBreakInside):
1059         (WebCore::mapFromLegacyBreakProperty):
1060         (WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
1061         (WebCore::mapFromColumnOrPageBreakInside): Deleted.
1062         Update to handle the region break properties in the same way that column break
1063         properties are handled.
1064
1065 2016-10-20  Jer Noble  <jer.noble@apple.com>
1066
1067         CRASH in WebCore::MediaSource::seekToTime + 185
1068         https://bugs.webkit.org/show_bug.cgi?id=163652
1069
1070         Reviewed by Eric Carlson.
1071
1072         Test: media/media-source/media-source-seek-detach-crash.html
1073
1074         Add isClosed() checks (which are effectively m_private null-checks) everywhere m_private is
1075         dereferenced. The one place where m_private is cleared without setting the state to closed
1076         is stop(), so make stop() set the state to closed as well (without firing any events).
1077
1078         * Modules/mediasource/MediaSource.cpp:
1079         (WebCore::MediaSource::seekToTime):
1080         (WebCore::MediaSource::completeSeek):
1081         (WebCore::MediaSource::monitorSourceBuffers):
1082         (WebCore::MediaSource::streamEndedWithError):
1083         (WebCore::MediaSource::stop):
1084
1085 2016-10-20  Andreas Kling  <akling@apple.com>
1086
1087         Drop StyleResolver and SelectorQueryCache when entering PageCache.
1088         <https://webkit.org/b/154238>
1089
1090         Reviewed by Antti Koivisto.
1091
1092         Stop keeping these around for cached pages to save lots of memory.
1093         We can easily rebuild them if a cached navigation occurs, and this
1094         way we also don't need to worry about invalidating style for cached
1095         pages in all the right places.
1096
1097         Restoring a cached page will now lead to a forced style recalc.
1098         We don't try to defer this (beyond a zero-timer) since it's going
1099         to happen anyway, and it's nicer to front-load the cost rather than
1100         stuttering on the first user content interaction.
1101
1102         * dom/Document.cpp:
1103         (WebCore::Document::setPageCacheState):
1104         * history/CachedPage.cpp:
1105         (WebCore::CachedPage::restore):
1106         (WebCore::CachedPage::clear):
1107         * history/CachedPage.h:
1108         (WebCore::CachedPage::markForVisitedLinkStyleRecalc): Deleted.
1109         (WebCore::CachedPage::markForFullStyleRecalc): Deleted.
1110         * history/PageCache.cpp:
1111         (WebCore::PageCache::markPagesForVisitedLinkStyleRecalc): Deleted.
1112         (WebCore::PageCache::markPagesForFullStyleRecalc): Deleted.
1113         * history/PageCache.h:
1114         * page/Frame.cpp:
1115         (WebCore::Frame::setPageAndTextZoomFactors):
1116         * page/Page.cpp:
1117         (WebCore::Page::setViewScaleFactor):
1118         (WebCore::Page::setDeviceScaleFactor):
1119         (WebCore::Page::setPagination):
1120         (WebCore::Page::setPaginationLineGridEnabled):
1121         (WebCore::Page::setVisitedLinkStore):
1122
1123 2016-10-20  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1124
1125         [GTK] Build fix after r207616
1126         https://bugs.webkit.org/show_bug.cgi?id=163333
1127
1128         Reviewed by Carlos Garcia Campos.
1129
1130         EGL_PLATFORM_X11_KHR and EGL_PLATFORM_WAYLAND_KHR are not defined
1131         on the EGL headers shipped by Mesa 10.3 (shipped by Debian 8)
1132
1133         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
1134         (WebCore::PlatformDisplayWayland::initialize):
1135         * platform/graphics/x11/PlatformDisplayX11.cpp:
1136         (WebCore::PlatformDisplayX11::initializeEGLDisplay):
1137
1138 2016-10-20  Fujii Hironori  <Hironori.Fujii@sony.com>
1139
1140         [CMake] CMake does not support the dep files for implicit dependency
1141         https://bugs.webkit.org/show_bug.cgi?id=161433
1142
1143         Reviewed by Brent Fulgham.
1144
1145         Created a Perl script to generate all IDL bindings for CMake.
1146         This script can regenerate outdated bindings by based on the
1147         supplemental dependency and dep files created by
1148         '--write-dependencies' switch of generate-bindings.pl.
1149
1150         add_custom_target is used to invoke the script instead of
1151         add_custom_command because Ninja deletes all output files before
1152         executing the command in case of add_custom_command.
1153
1154         USES_TERMINAL option of add_custom_target has two effects:
1155         1) Not buffering output of the command
1156         2) Invoking the command in the special Ninja pool which inhibits parallel build
1157         One needs to use CMake 3.2 or later to enable this feature.
1158
1159         * CMakeLists.txt: Specified target names for
1160         GENERATE_BINDINGS. Added dependency for the targets.
1161         * bindings/scripts/generate-bindings-all.pl: Added.
1162
1163 2016-10-20  Adam Jackson  <ajax@redhat.com>
1164
1165         Prefer eglGetPlatformDisplay to eglGetDisplay
1166         https://bugs.webkit.org/show_bug.cgi?id=163333
1167
1168         Reviewed by Carlos Garcia Campos.
1169
1170         eglGetDisplay forces the implementation to guess what kind of void* it's been handed. Different implementations
1171         do different things, in particular glvnd and Mesa behave differently. Fortunately there exists API to tell EGL
1172         what kind of display it is, so let's use it.
1173
1174         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
1175         (WebCore::PlatformDisplayWayland::initialize):
1176         * platform/graphics/x11/PlatformDisplayX11.cpp:
1177         (WebCore::PlatformDisplayX11::initializeEGLDisplay):
1178
1179 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1180
1181         [GTK] Avoid including egl.h headers in internal headers
1182         https://bugs.webkit.org/show_bug.cgi?id=163722
1183
1184         Reviewed by Žan Doberšek.
1185
1186         egl.h includes eglplatform.h that decides the native types for the platform at compile time. However, we support
1187         to build with X11 and Wayland at the same time and decide what to use at runtime. Currently GLContext.h includes
1188         eglplatform.h after wayland-egl.h if Wayland is enabled. That means that the wayland native types are used by
1189         default from all cpp files including GLContext.h. It currently works in X11 because we cast the value anyway and
1190         for example EGLNativeWindowType is a pointer in Wayland that can be casted to unsigned long in X11 to represent
1191         the X Window. This is very fragile in any case, we should avoid adding egl headers in our headers and only
1192         include it in cpp files. But we also need to ensure we don't use X11 and Wayland in the same cpp file.
1193
1194         * PlatformGTK.cmake:
1195         * platform/graphics/GLContext.cpp:
1196         (WebCore::GLContext::createContextForWindow):
1197         * platform/graphics/GLContext.h:
1198         * platform/graphics/egl/GLContextEGL.cpp:
1199         (WebCore::GLContextEGL::createWindowContext):
1200         (WebCore::GLContextEGL::createContext):
1201         (WebCore::GLContextEGL::~GLContextEGL):
1202         * platform/graphics/egl/GLContextEGL.h:
1203         * platform/graphics/egl/GLContextEGLWayland.cpp: Added.
1204         (WebCore::GLContextEGL::GLContextEGL):
1205         (WebCore::GLContextEGL::createWindowSurfaceWayland):
1206         (WebCore::GLContextEGL::createWaylandContext):
1207         (WebCore::GLContextEGL::destroyWaylandWindow):
1208         * platform/graphics/egl/GLContextEGLX11.cpp: Added.
1209         (WebCore::GLContextEGL::GLContextEGL):
1210         (WebCore::GLContextEGL::createWindowSurfaceX11):
1211         (WebCore::GLContextEGL::createPixmapContext):
1212         * platform/graphics/glx/GLContextGLX.cpp:
1213         (WebCore::GLContextGLX::createWindowContext):
1214         (WebCore::GLContextGLX::createContext):
1215         (WebCore::GLContextGLX::GLContextGLX):
1216         * platform/graphics/glx/GLContextGLX.h:
1217         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
1218         * platform/graphics/x11/PlatformDisplayX11.cpp:
1219
1220 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1221
1222         [GTK] Avoid strstr() when checking (E)GL extensions
1223         https://bugs.webkit.org/show_bug.cgi?id=161958
1224
1225         Reviewed by Žan Doberšek.
1226
1227         Add static method GLContext::isExtensionSupported() to properly search extenstions in the given extension
1228         list, and use it instead of strstr().
1229
1230         * platform/graphics/GLContext.cpp:
1231         (WebCore::GLContext::isExtensionSupported):
1232         * platform/graphics/GLContext.h:
1233         * platform/graphics/egl/GLContextEGL.cpp:
1234         (WebCore::GLContextEGL::createSurfacelessContext):
1235         * platform/graphics/glx/GLContextGLX.cpp:
1236         (WebCore::hasSGISwapControlExtension):
1237
1238 2016-10-20  Per Arne Vollan  <pvollan@apple.com>
1239
1240         [Win][Direct2D] Implement ImageBufferData::getData.
1241         https://bugs.webkit.org/show_bug.cgi?id=163668
1242
1243         Reviewed by Brent Fulgham.
1244
1245         Render data to a bitmap in system memory, which data can be read from.
1246
1247         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
1248         (WebCore::ImageBufferData::getData):
1249         * platform/graphics/win/ImageBufferDirect2D.cpp:
1250         (WebCore::ImageBuffer::ImageBuffer):
1251
1252 2016-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1253
1254         Wrong use of EGL_DEPTH_SIZE
1255         https://bugs.webkit.org/show_bug.cgi?id=155536
1256
1257         Reviewed by Michael Catanzaro.
1258
1259         What happens here is that the driver doesn't implement EGL_DEPTH_SIZE and the default value, which is 0, is
1260         returned. Then XCreatePixmap fails because 0 is not a valid depth. The thing is that even if EGL_DEPTH_SIZE or
1261         EGL_BUFFER_SIZE returned a valid depth, it still might not be supported by the default screen and XCreatePixmap
1262         can fail. What we need to ensure is that the depth we pass is compatible with the X display, not only with the
1263         EGL config, to avoid failures when creating the pixmap. So, we can use EGL_NATIVE_VISUAL_ID instead, and
1264         then ask X for the visual info for that id. If it isn't found then we just return before creating the pixmap,
1265         but if the visual is found then we can be sure that the depth of the visual will not make the pixmap creation
1266         fail. However, with the driver I'm using it doesn't matter how we create the pixmap that eglCreatePixmapSurface
1267         always fails, again with X errors that are fatal by default. Since the driver is not free, I assume it doesn't
1268         support eglCreatePixmapSurface or it's just buggy, so the only option we have here is trap the x errors and
1269         ignore them. It turns out that the X errors are not fatal in this case, because eglCreatePixmapSurface ends up
1270         returning a surface, and since these are offscreen contexts, it doesn't really matter if they contain an
1271         invalid pixmap, because we never do swap buffer on them, so just ignoring the X errors fixes the crashes and
1272         makes everythig work. This patch adds a helper class XErrorTrapper that allows to trap XErrors and decide what
1273         to do with them (ignore, warn or crash) or even not consider a particular set of errors as errors.
1274
1275         * PlatformEfl.cmake: Add new file to compilation.
1276         * PlatformGTK.cmake: Ditto.
1277         * platform/graphics/egl/GLContextEGL.cpp:
1278         (WebCore::GLContextEGL::createPixmapContext): Use EGL_NATIVE_VISUAL_ID instead of EGL_DEPTH_SIZE to figure out
1279         the depth to be passed to XCreatePixmap. Also use the XErrorTrapper class to ignore all BadDrawable errors
1280         produced by eglCreatePixmapSurface() and only show a warning about all other X errors.
1281         * platform/graphics/x11/XErrorTrapper.cpp: Added.
1282         (WebCore::xErrorTrappersMap):
1283         (WebCore::XErrorTrapper::XErrorTrapper):
1284         (WebCore::XErrorTrapper::~XErrorTrapper):
1285         (WebCore::XErrorTrapper::errorCode):
1286         (WebCore::XErrorTrapper::errorEvent):
1287         * platform/graphics/x11/XErrorTrapper.h: Added.
1288         (WebCore::XErrorTrapper::XErrorTrapper):
1289
1290 2016-10-20  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
1291
1292         WebRTC: The MediaStreamTrackEvent init dictionary needs a required track member
1293         https://bugs.webkit.org/show_bug.cgi?id=146232
1294
1295         Update MediaStreamTrackEvent IDL as per specification.
1296
1297         Reviewed by Darin Adler.
1298
1299         No additional test required, rebase existings tests.
1300
1301         * Modules/mediastream/MediaStreamTrackEvent.idl:
1302
1303 2016-10-19  Antoine Quint  <graouts@apple.com>
1304
1305         [Modern Media Controls] Media Controller: mute support
1306         https://bugs.webkit.org/show_bug.cgi?id=163677
1307         <rdar://problem/28851582>
1308
1309         Reviewed by Dean Jackson.
1310
1311         We introduce the MuteSupport class which brings support for muting the media
1312         by clicking on the mute button in the media controls and correctly reflecting
1313         the media's muted state should the media be muted via the media API.
1314
1315         Tests: media/modern-media-controls/mute-support/mute-support-button-click.html
1316                media/modern-media-controls/mute-support/mute-support-media-api.html
1317                media/modern-media-controls/mute-support/mute-support-muted.html
1318
1319         * Modules/modern-media-controls/media/media-controller.js:
1320         (MediaController):
1321         * Modules/modern-media-controls/media/mute-support.js: Copied from Source/WebCore/Modules/modern-media-controls/media/media-controller.js.
1322         (MuteSupport.prototype.get control):
1323         (MuteSupport.prototype.get mediaEvents):
1324         (MuteSupport.prototype.buttonWasClicked):
1325         (MuteSupport.prototype.syncControl):
1326         (MuteSupport):
1327         * WebCore.xcodeproj/project.pbxproj:
1328         * rendering/RenderThemeMac.mm:
1329         (WebCore::RenderThemeMac::mediaControlsScript):
1330
1331 2016-10-19  Alex Christensen  <achristensen@webkit.org>
1332
1333         Revert r207151
1334         https://bugs.webkit.org/show_bug.cgi?id=163675
1335
1336         Reviewed by Brent Fulgham.
1337
1338         This code is still useful for comparison with Windows.  I'll remove it again soon.
1339
1340         No new tests.  No change in behavior.
1341
1342         * WebCore.xcodeproj/project.pbxproj:
1343         * WebCorePrefix.h:
1344         * loader/DocumentLoader.h:
1345         * loader/EmptyClients.h:
1346         * loader/FrameLoaderClient.h:
1347         * loader/ResourceLoader.cpp:
1348         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
1349         * loader/ResourceLoader.h:
1350         * loader/SubresourceLoader.h:
1351         * loader/cf/ResourceLoaderCFNet.cpp:
1352         * loader/cocoa/SubresourceLoaderCocoa.mm:
1353         (WebCore::SubresourceLoader::willCacheResponse):
1354         * loader/mac/DocumentLoaderMac.cpp:
1355         * loader/mac/ResourceLoaderMac.mm:
1356         (WebCore::ResourceLoader::willCacheResponse):
1357         * page/mac/PageMac.mm:
1358         (WebCore::Page::platformInitialize):
1359         (WebCore::Page::addSchedulePair):
1360         (WebCore::Page::removeSchedulePair):
1361         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1362         (WebCore::WebCoreNSURLAuthenticationChallengeClient::create):
1363         (WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient):
1364         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
1365         * platform/mac/WebCoreSystemInterface.h:
1366         * platform/network/NetworkStorageSession.h:
1367         * platform/network/ProtectionSpace.h:
1368         * platform/network/ProtectionSpaceBase.cpp:
1369         * platform/network/ResourceHandle.cpp:
1370         * platform/network/ResourceHandle.h:
1371         * platform/network/ResourceHandleClient.cpp:
1372         * platform/network/ResourceHandleClient.h:
1373         * platform/network/ResourceHandleInternal.h:
1374         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1375         * platform/network/ResourceRequestBase.cpp:
1376         * platform/network/cf/AuthenticationCF.cpp:
1377         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
1378         (WebCore::AuthenticationChallenge::setAuthenticationClient): Deleted.
1379         (WebCore::AuthenticationChallenge::authenticationClient): Deleted.
1380         (WebCore::AuthenticationChallenge::platformCompare): Deleted.
1381         (WebCore::createCF): Deleted.
1382         (WebCore::core): Deleted.
1383         * platform/network/cf/AuthenticationCF.h:
1384         * platform/network/cf/AuthenticationChallenge.h:
1385         * platform/network/cf/CookieJarCFNet.cpp:
1386         * platform/network/cf/CredentialStorageCFNet.cpp:
1387         (WebCore::CredentialStorage::getFromPersistentStorage):
1388         (WebCore::CredentialStorage::saveToPersistentStorage):
1389         * platform/network/cf/LoaderRunLoopCF.cpp:
1390         * platform/network/cf/LoaderRunLoopCF.h:
1391         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
1392         (WebCore::NetworkStorageSession::cookieStorage):
1393         * platform/network/cf/ProtectionSpaceCFNet.cpp:
1394         * platform/network/cf/ProtectionSpaceCFNet.h:
1395         * platform/network/cf/ResourceError.h:
1396         * platform/network/cf/ResourceErrorCF.cpp:
1397         * platform/network/cf/ResourceHandleCFNet.cpp:
1398         (WebCore::shouldSniffConnectionProperty):
1399         (WebCore::ResourceHandle::createCFURLConnection):
1400         (WebCore::ResourceHandle::start):
1401         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
1402         (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
1403         (WebCore::ResourceHandle::receivedCredential):
1404         (WebCore::ResourceHandle::schedule):
1405         (WebCore::ResourceHandle::unschedule):
1406         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
1407         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
1408         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
1409         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
1410         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
1411         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
1412         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
1413         * platform/network/cf/ResourceRequest.h:
1414         (WebCore::ResourceRequest::encodingRequiresPlatformData):
1415         * platform/network/cf/ResourceRequestCFNet.cpp:
1416         (WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction):
1417         (WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
1418         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1419         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
1420         (WebCore::ResourceRequest::doUpdateResourceRequest):
1421         (WebCore::ResourceRequest::setStorageSession):
1422         * platform/network/cf/ResourceRequestCFNet.h:
1423         * platform/network/cf/ResourceResponse.h:
1424         * platform/network/cf/ResourceResponseCFNet.cpp:
1425         (WebCore::ResourceResponse::cfURLResponse):
1426         * platform/network/cf/SynchronousLoaderClientCFNet.cpp:
1427         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
1428         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
1429         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling):
1430         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
1431         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
1432         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
1433         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
1434         * platform/network/cocoa/CredentialCocoa.h:
1435         * platform/network/cocoa/CredentialCocoa.mm:
1436         (WebCore::Credential::Credential):
1437         (WebCore::Credential::cfCredential):
1438         * platform/network/cocoa/ProtectionSpaceCocoa.h:
1439         * platform/network/cocoa/ProtectionSpaceCocoa.mm:
1440         (WebCore::ProtectionSpace::ProtectionSpace):
1441         (WebCore::ProtectionSpace::cfSpace):
1442         * platform/network/cocoa/ResourceRequestCocoa.mm:
1443         (WebCore::ResourceRequest::nsURLRequest):
1444         * platform/network/cocoa/ResourceResponseCocoa.mm:
1445         (WebCore::ResourceResponse::platformCertificateInfo):
1446         (WebCore::ResourceResponse::nsURLResponse):
1447         (WebCore::ResourceResponse::ResourceResponse):
1448         * platform/network/ios/QuickLook.h:
1449         * platform/network/ios/QuickLook.mm:
1450         (-[WebQuickLookHandleAsDelegate initWithConnectionDelegate:]):
1451         (-[WebQuickLookHandleAsDelegate connection:didReceiveDataArray:]):
1452         (-[WebQuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:]):
1453         (-[WebQuickLookHandleAsDelegate connectionDidFinishLoading:]):
1454         (-[WebQuickLookHandleAsDelegate connection:didFailWithError:]):
1455         (-[WebQuickLookHandleAsDelegate detachHandle]):
1456         (WebCore::QuickLookHandle::create):
1457         (WebCore::QuickLookHandle::cfResponse):
1458         * platform/network/mac/AuthenticationMac.mm:
1459         (-[WebCoreAuthenticationClientAsChallengeSender setCFChallenge:]):
1460         (-[WebCoreAuthenticationClientAsChallengeSender cfChallenge]):
1461         (WebCore::core):
1462         (WebCore::mac):
1463         * platform/network/mac/CookieJarMac.mm:
1464         (WebCore::setCookiesFromDOM):
1465         (WebCore::addCookie):
1466         (WebCore::cookieStorage):
1467         * platform/network/mac/CredentialStorageMac.mm:
1468         * platform/network/mac/FormDataStreamMac.h:
1469         * platform/network/mac/FormDataStreamMac.mm:
1470         * platform/network/mac/ResourceErrorMac.mm:
1471         (NSErrorFromCFError):
1472         (WebCore::ResourceError::ResourceError):
1473         (WebCore::ResourceError::nsError):
1474         (WebCore::ResourceError::operator NSError *):
1475         * platform/network/mac/ResourceHandleMac.mm:
1476         (WebCore::ResourceHandle::getConnectionTimingData):
1477         * platform/network/mac/ResourceRequestMac.mm: Added.
1478         (WebCore::ResourceRequest::ResourceRequest):
1479         (WebCore::ResourceRequest::updateNSURLRequest):
1480         * platform/network/mac/SynchronousLoaderClient.mm:
1481         * platform/network/mac/WebCoreResourceHandleAsDelegate.h:
1482         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
1483         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
1484         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
1485         * platform/network/mac/WebCoreURLResponse.mm:
1486         * platform/win/TemporaryLinkStubs.cpp:
1487         * testing/js/WebCoreTestSupportPrefix.h:
1488
1489 2016-10-19  Jer Noble  <jer.noble@apple.com>
1490
1491         REGRESSION (r206025): All YouTube videos play with black bars on all four sides
1492         https://bugs.webkit.org/show_bug.cgi?id=163308
1493
1494         Reviewed by Darin Adler.
1495
1496         Test: media/media-source/media-source-resize.html
1497
1498         After r206025, we do not fire resize events when the size change notification happens equal-
1499         to-or-before the current time, which can happen at the very beginning of a stream. Take care
1500         of this case by checking that the target time isn't actually in the past inside of
1501         sizeWillChangeAtTime(), and also always skip the boundary time observer when there was no
1502         previous size (such as after a flush due to a seek).
1503
1504         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1505         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1506         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::sizeWillChangeAtTime):
1507         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setNaturalSize):
1508         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1509         (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples):
1510         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
1511
1512 2016-10-19  Nan Wang  <n_wang@apple.com>
1513
1514         AX: [Mac] Mark element AXAPI should comform to specs
1515         https://bugs.webkit.org/show_bug.cgi?id=163707
1516
1517         Reviewed by Chris Fleizach.
1518
1519         Created a new role for mark elements on Mac and exposed the role
1520         description.
1521
1522         Changes are covered in modified test expectaions.
1523
1524         * English.lproj/Localizable.strings:
1525         * accessibility/AccessibilityObject.h:
1526         * accessibility/AccessibilityRenderObject.cpp:
1527         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1528         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1529         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
1530         * accessibility/mac/AccessibilityObjectMac.mm:
1531         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
1532         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1533         (createAccessibilityRoleMap):
1534         (-[WebAccessibilityObjectWrapper roleDescription]):
1535         * platform/LocalizedStrings.cpp:
1536         (WebCore::AXMarkText):
1537         * platform/LocalizedStrings.h:
1538
1539 2016-10-19  Alex Christensen  <achristensen@webkit.org>
1540
1541         Re-enable URLParser for non-Safari Cocoa apps after r207321
1542         https://bugs.webkit.org/show_bug.cgi?id=163690
1543
1544         Reviewed by Darin Adler.
1545
1546         I disabled the URLParser for non-Safari applications in r207305
1547         to give me time to make URLParser more compatible, which I did in r207321
1548
1549         Updated some API tests which will be investigated in 
1550         https://bugs.webkit.org/show_bug.cgi?id=163127
1551
1552         * platform/URLParser.cpp:
1553         (WebCore::URLParser::setEnabled):
1554         (WebCore::URLParser::enabled):
1555         * testing/js/WebCoreTestSupport.cpp:
1556         (WebCoreTestSupport::setURLParserEnabled): Deleted.
1557         * testing/js/WebCoreTestSupport.h:
1558
1559 2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
1560
1561         CSS font-variation-settings does not handle uppercase axis names in variable fonts
1562         https://bugs.webkit.org/show_bug.cgi?id=163546
1563
1564         Reviewed by Dean Jackson.
1565
1566         Remove the extra toASCIILower() call.
1567
1568         Test: fast/text/variations/case-axis-names.html
1569
1570         * css/parser/CSSParser.cpp:
1571         (WebCore::CSSParser::parseFontVariationTag):
1572
1573 2016-10-19  Anders Carlsson  <andersca@apple.com>
1574
1575         Remove m_redirectURLs from HistoryItem
1576         https://bugs.webkit.org/show_bug.cgi?id=163704
1577
1578         Reviewed by Dan Bernstein.
1579
1580         * history/HistoryItem.cpp:
1581         (WebCore::HistoryItem::HistoryItem):
1582         (WebCore::HistoryItem::reset):
1583         * history/HistoryItem.h:
1584
1585 2016-10-19  Joone Hur  <joone.hur@intel.com>
1586
1587         Add a plain space instead of &nbsp; between text nodes
1588         https://bugs.webkit.org/show_bug.cgi?id=123163
1589
1590         Reviewed by Ryosuke Niwa.
1591
1592         When we rebalance white spaces, &nbsp; can be added as space
1593         under some conditions. This patch adds a condition that the next
1594         sibling text node should not exist.
1595
1596         No new tests, updated existing test.
1597
1598         * editing/CompositeEditCommand.cpp:
1599         (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring):
1600         * editing/htmlediting.cpp:
1601         (WebCore::stringWithRebalancedWhitespace):
1602         * editing/htmlediting.h:
1603
1604 2016-10-19  Sam Weinig  <sam@webkit.org>
1605
1606         Add support for sequences and dictionaries in unions
1607         https://bugs.webkit.org/show_bug.cgi?id=163695
1608
1609         Reviewed by Chris Dumez.
1610
1611         Tests:
1612          - Updated js/dom/webidl-type-mapping.html
1613
1614         * bindings/generic/IDLTypes.h:
1615         Add additional helper predicates and fix formatting.
1616
1617         * bindings/js/JSDOMBinding.h:
1618         Export hasIteratorMethod for use in testing.
1619
1620         * bindings/js/JSDOMConvert.h:
1621         - Change return type of Converter<IDLDictionary<T>> to T, from Optional<T>.
1622         - Add support for unions conversion step 12 (parts 1-3).
1623
1624         * bindings/scripts/CodeGeneratorJS.pm:
1625         (GenerateDefaultValue):
1626         Support complex default value computations for unions using the convert infrastructure.
1627
1628         (GenerateParametersCheck):
1629         (GenerateConstructorDefinition):
1630         Remove incorrect .value() calls now that Converter<IDLDictionary<T>> returns T.
1631
1632         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1633         * bindings/scripts/test/JS/JSTestObj.cpp:
1634         Update bindings test results.
1635
1636         * testing/TypeConversions.h:
1637         (WebCore::TypeConversions::setTypeConversionsDictionary):
1638         (WebCore::TypeConversions::typeConversionsDictionaryLongValue):
1639         (WebCore::TypeConversions::typeConversionsDictionaryStringValue):
1640         (WebCore::TypeConversions::typeConversionsDictionarySequenceValue):
1641         (WebCore::TypeConversions::typeConversionsDictionaryUnionType):
1642         * testing/TypeConversions.idl:
1643         Add some complex types to allow testing IDL conversions from tests.
1644
1645 2016-10-19  Ryosuke Niwa  <rniwa@webkit.org>
1646
1647         Annotate more DOM and HTML IDLs with CEReactions
1648         https://bugs.webkit.org/show_bug.cgi?id=163653
1649
1650         Reviewed by Darin Adler.
1651
1652         Added CEReactions to more IDL files.
1653
1654         Test: fast/custom-elements/reactions-for-webkit-extensions.html
1655
1656         * bindings/js/JSDOMStringMapCustom.cpp:
1657         (WebCore::JSDOMStringMap::deleteProperty): Instantiate CustomElementReactionStack, which is equivalent to
1658         adding CEReactions in IDL.
1659         (WebCore::JSDOMStringMap::putDelegate): Ditto.
1660         * dom/Document.idl:
1661         * dom/Element.idl:
1662         * html/HTMLElement.idl:
1663         * page/DOMSelection.idl:
1664
1665 2016-10-19  Ryan Haddad  <ryanhaddad@apple.com>
1666
1667         Unreviewed, rolling out r207557.
1668
1669         This change caused animations/font-variations tests to time
1670         out on pre-Sierra Macs.
1671
1672         Reverted changeset:
1673
1674         "[macOS] [iOS] Disable variation fonts on macOS El Capitan and
1675         iOS 9"
1676         https://bugs.webkit.org/show_bug.cgi?id=163374
1677         http://trac.webkit.org/changeset/207557
1678
1679 2016-10-19  Dave Hyatt  <hyatt@apple.com>
1680
1681         [CSS Parser] Support -webkit-border-fit
1682         https://bugs.webkit.org/show_bug.cgi?id=163687
1683
1684         Reviewed by Zalan Bujtas.
1685
1686         Add support for -webkit-border-fit to isValidKeywordPropertyAndValue.
1687
1688         * css/parser/CSSParserFastPaths.cpp:
1689         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
1690
1691 2016-10-19  Dave Hyatt  <hyatt@apple.com>
1692
1693         [CSS Parser] class and id parsing need to be case-insensitive in HTML quirks mode
1694         https://bugs.webkit.org/show_bug.cgi?id=163685
1695
1696         Reviewed by Zalan Bujtas.
1697
1698         Class and ID parsing should be case-insensitive in quirks mode. Apply the same hack
1699         that the old parser did and lowercase the class and ids in place.
1700
1701         * css/parser/CSSSelectorParser.cpp:
1702         (WebCore::CSSSelectorParser::consumeId):
1703         (WebCore::CSSSelectorParser::consumeClass):
1704
1705 2016-10-19  Nan Wang  <n_wang@apple.com>
1706
1707         AX: crash: com.apple.WebCore: WebCore::AccessibilityObject::findMatchingObjects + 600
1708         https://bugs.webkit.org/show_bug.cgi?id=163682
1709
1710         Reviewed by Chris Fleizach.
1711
1712         There's a null pointer crash when we ask for startObject->parentObjectUnignored() in
1713         AccessibilityObject::findMatchingObject. Added a null check for the startObject to fix that.
1714
1715         Test: accessibility/mac/search-predicate-crash.html
1716
1717         * accessibility/AccessibilityObject.cpp:
1718         (WebCore::AccessibilityObject::findMatchingObjects):
1719
1720 2016-10-19  David Kilzer  <ddkilzer@apple.com>
1721
1722         Bug 163670: Refine assertions in WebCore::ImageData constructors
1723         <https://webkit.org/b/163670>
1724         <rdar://problem/27497338>
1725
1726         Reviewed by Brent Fulgham.
1727
1728         No new tests because there is no change in nominal behavior.
1729
1730         * html/ImageData.cpp:
1731         (WebCore::ImageData::ImageData(const IntSize&)): Change to use
1732         ASSERT() since the worst-case scenario here is a nullptr deref.
1733         Switch to IntSize::area() to compute the area.
1734         (WebCore::ImageData::ImageData(const IntSize&, Ref<Uint8ClampedArray>&&)):
1735         Add ASSERT() identical to the previous constructor, and change
1736         ASSERT_WITH_SECURITY_IMPLICATION() to only fire when m_data is
1737         not nullptr and the length check fails.  Switch to
1738         IntSize::area() to compute the area.
1739
1740 2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
1741
1742         [macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
1743         https://bugs.webkit.org/show_bug.cgi?id=163374
1744
1745         Reviewed by Darin Adler.
1746
1747         Because of platform lack of support for variations in in-memory fonts,
1748         this feature should be disabled on the affected OSes.
1749
1750         No tests because there is no behavior change (on the relevant platforms).
1751
1752         * Configurations/FeatureDefines.xcconfig:
1753
1754 2016-10-19  Dave Hyatt  <hyatt@apple.com>
1755
1756         [CSS Parser] Fix background-position parsing
1757         https://bugs.webkit.org/show_bug.cgi?id=163681
1758
1759         Reviewed by Dean Jackson.
1760
1761         The new parser has a more efficient parsed representation of background positions. When
1762         background-position is "center" or when no length unit is specified for a dimension,
1763         then rather than creating a pair, the new parser makes a singleton primitive value.
1764
1765         Patch the StyleBuilder code to handle this case, resolving center to (left,50%) or
1766         (top,50%) as appropriate and also handling top/left without any associated length.
1767
1768         * css/CSSToStyleMap.cpp:
1769         (WebCore::CSSToStyleMap::mapFillXPosition):
1770         (WebCore::CSSToStyleMap::mapFillYPosition):
1771
1772 2016-10-19  Antoine Quint  <graouts@apple.com>
1773
1774         [Modern Media Controls] Media Controller: click-to-start support
1775         https://bugs.webkit.org/show_bug.cgi?id=163659
1776         <rdar://problem/28845656>
1777
1778         Reviewed by Dean Jackson.
1779
1780         We introduce the MediaControllerSupport class which will allow a number of media controller
1781         features to be implemented by subclasses each devoted to implementing a specific subset of
1782         media controller features. With this bug, we add the correct behavior for click-to-start,
1783         only showing the start button under the right circumstances.
1784
1785         A MediaController object indicates which media control to attach click event listeners to
1786         through the `control` property, and a list of media events it should register on the media
1787         element through the `mediaEvents` property. Then, as the user interacts with the specified
1788         control and the media, the Button delegation method `buttonWasClicked()` and the `syncControl()`
1789         methods are called to allow for the media state to be correctly set and represented in the
1790         media controls. Custom event handling for the specified events can also be achieved by
1791         subclassing the `handleEvent()` method.
1792
1793         Tests: media/modern-media-controls/start-support/start-support-audio.html
1794                media/modern-media-controls/start-support/start-support-autoplay.html
1795                media/modern-media-controls/start-support/start-support-click-to-start.html
1796                media/modern-media-controls/start-support/start-support-error.html
1797                media/modern-media-controls/start-support/start-support-fullscreen.html
1798                media/modern-media-controls/start-support/start-support-manual-play.html
1799                media/modern-media-controls/start-support/start-support-no-source.html
1800
1801         * Modules/modern-media-controls/media/media-controller-support.js: Added.
1802         (MediaControllerSupport):
1803         (MediaControllerSupport.prototype.get control):
1804         (MediaControllerSupport.prototype.get mediaEvents):
1805         (MediaControllerSupport.prototype.buttonWasClicked):
1806         (MediaControllerSupport.prototype.handleEvent):
1807         (MediaControllerSupport.prototype.syncControl):
1808         * Modules/modern-media-controls/media/media-controller.js:
1809         (MediaController):
1810         (MediaController.prototype.buttonWasClicked): Deleted.
1811         * Modules/modern-media-controls/media/start-support.js: Added.
1812         (StartSupport.prototype.get control):
1813         (StartSupport.prototype.get mediaEvents):
1814         (StartSupport.prototype.buttonWasClicked):
1815         (StartSupport.prototype.handleEvent):
1816         (StartSupport.prototype.syncControl):
1817         (StartSupport.prototype._shouldShowStartButton):
1818         (StartSupport):
1819
1820 2016-10-19  Aaron Chu  <aaron_chu@apple.com>
1821
1822         Web Inspector: AXI: expose computed tree node and heading level
1823         https://bugs.webkit.org/show_bug.cgi?id=130825
1824         <rdar://problem/16442349>
1825
1826         Reviewed by Joseph Pecoraro.
1827
1828         Exposing two new accessibility properties: Heading Level and Hierarchical Level.
1829
1830         Updated Test: LayoutTest/inspector/dom/getAccessibilityPropertiesForNode.html
1831
1832         * inspector/InspectorDOMAgent.cpp:
1833         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1834
1835 2016-10-19  Adam Bergkvist  <adam.bergkvist@ericsson.com>
1836
1837         WebRTC: Implement MediaEndpointPeerConnection::stop()
1838         https://bugs.webkit.org/show_bug.cgi?id=163660
1839
1840         Reviewed by Philippe Normand.
1841
1842         Make MediaEndpointPeerConnection::stop() stop its MediaEndpoint.
1843
1844         Testing: This fix deals with cleanup and tearing down resources down in the platform layer
1845         and is not covered by automated tests. It is however observable in the manual test added
1846         in [1] where the remote videos should stop when the connections are closed.
1847
1848         [1] http://webkit.org/b/163327
1849
1850         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
1851         (WebCore::MediaEndpointPeerConnection::stop):
1852
1853 2016-10-19  Dave Hyatt  <hyatt@apple.com>
1854
1855         [CSS Parser] Fix -webkit-mask-box-image parsing
1856         https://bugs.webkit.org/show_bug.cgi?id=163676
1857
1858         Reviewed by Dean Jackson.
1859
1860         -webkit-mask-box-image is not a shorthand in our current code, so treat it the same as the legacy
1861         -webkit-border-image.
1862
1863         * css/parser/CSSPropertyParser.cpp:
1864         (WebCore::CSSPropertyParser::parseSingleValue):
1865         (WebCore::CSSPropertyParser::parseShorthand):
1866
1867 2016-10-19  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1868
1869         [GTK][EFL] Build fix after r207543.
1870         https://bugs.webkit.org/show_bug.cgi?id=163671
1871
1872         Unreviewed.
1873
1874         Fix typo on the filename of the included header:
1875         Mac filesystem is case insensitive, but Linux filesystems are case sensitive.
1876
1877         * css/parser/CSSPropertyParser.cpp:
1878
1879 2016-10-19  Zalan Bujtas  <zalan@apple.com>
1880
1881         Use anonymous table row for new child at RenderTableRow::addChild() if available.
1882         https://bugs.webkit.org/show_bug.cgi?id=163651
1883         <rdar://problem/28705022>
1884
1885         Reviewed by David Hyatt.
1886
1887         We should try to prevent the continuation siblings from getting separated and inserted into
1888         wrapper renderers. It makes finding these continuation siblings difficult.
1889         This patch adds a checks for anonymous table rows so that we could find a closer common ancestor of
1890         beforeChild/new child. 
1891
1892         Test: fast/table/crash-when-table-has-continuation-and-content-inserted.html
1893
1894         * rendering/RenderObject.cpp:
1895         (WebCore::RenderObject::showRenderObject): Add continuation information.
1896         * rendering/RenderTableRow.cpp:
1897         (WebCore::RenderTableRow::addChild):
1898
1899 2016-10-19  Joseph Pecoraro  <pecoraro@apple.com>
1900
1901         Cleanup WebCore/workers
1902         https://bugs.webkit.org/show_bug.cgi?id=163635
1903
1904         Reviewed by Chris Dumez.
1905
1906         * workers/*:
1907         Cleanup like pragma once, nullptr, remove stale includes, declarations.
1908
1909 2016-10-19  Chris Dumez  <cdumez@apple.com>
1910
1911         MouseEvent's coordinates should be 0 for simulated clicks
1912         https://bugs.webkit.org/show_bug.cgi?id=163648
1913
1914         Reviewed by Darin Adler.
1915
1916         MouseEvent's coordinates should be 0 / 0 for simulated clicks triggered
1917         by JavaScript (i.e. via element.click()). This behavior matches Chrome
1918         and Firefox.
1919
1920         WebKit was computing actual coordinates for the element which was
1921         expensive, especially because computing  screenX / screenY required
1922         a synchronous IPC with the UI process.
1923
1924         Test: fast/events/element-click-no-coords.html
1925
1926         * dom/Element.cpp:
1927         (WebCore::Element::dispatchSimulatedClick):
1928         * dom/SimulatedClick.cpp:
1929         (WebCore::simulateMouseEvent):
1930         (WebCore::simulateClick):
1931         * dom/SimulatedClick.h:
1932         * html/HTMLElement.cpp:
1933         (WebCore::HTMLElement::click):
1934
1935 2016-10-19  Dave Hyatt  <hyatt@apple.com>
1936
1937         [CSS Parser] Fix transform parsing
1938         https://bugs.webkit.org/show_bug.cgi?id=163671
1939
1940         Reviewed by Dean Jackson.
1941
1942         The new parser turned function names into CSSValueIDs and made CSSFunctionValue store them. This
1943         meant it could be used to handle transform values, with the function name representing the
1944         transform operation efficiently as a CSSValueID.
1945
1946         The old parser, however, creates WebKitCSSTransformValues. This value does not exist in the new
1947         parser. Rather than forcing the old and new parser over to CSSFunctionValues, I opted to
1948         just make the new parser build WebkitCSSTransformValues too.
1949
1950         The main reason I did this is that WebkitCSSTransformValue is actually exposed to the Web via
1951         IDL. To be safe, I am not eliminating it (even though Blink has).
1952
1953         * css/parser/CSSPropertyParser.cpp:
1954         (WebCore::consumeTranslate3d):
1955         (WebCore::consumeNumbers):
1956         (WebCore::consumePerspective):
1957         (WebCore::transformOperationForCSSValueID):
1958         (WebCore::consumeTransformValue):
1959
1960 2016-10-19  Darin Adler  <darin@apple.com>
1961
1962         Move XPath from ExceptionCode to Exception
1963         https://bugs.webkit.org/show_bug.cgi?id=163656
1964
1965         Reviewed by Chris Dumez.
1966
1967         * dom/Document.cpp:
1968         (WebCore::Document::createExpression): Use ExceptionOr.
1969         (WebCore::Document::createNSResolver): Return Ref.
1970         (WebCore::Document::evaluate): Use ExceptionOr.
1971         * dom/Document.h: Updated for above changes.
1972         * dom/Document.idl: Use non-legacy exceptions for the functions above.
1973
1974         * inspector/InspectorNodeFinder.cpp:
1975         (WebCore::InspectorNodeFinder::searchUsingXPath): Call XPath functions
1976         with new interface.
1977
1978         * xml/DOMParser.cpp:
1979         (WebCore::DOMParser::DOMParser): Marked inline.
1980         (WebCore::DOMParser::create): Moved here from header.
1981         (WebCore::DOMParser::parseFromString): Use ExceptionOr.
1982         * xml/DOMParser.h: Updated for above changes.
1983         * xml/DOMParser.idl: Use non-legacy exception.
1984
1985         * xml/XPathEvaluator.cpp:
1986         (WebCore::XPathEvaluator::createExpression): Use ExceptionOr.
1987         (WebCore::XPathEvaluator::evaluate): Ditto.
1988         * xml/XPathEvaluator.h: Updated for above changes.
1989         * xml/XPathEvaluator.idl: Use non-legacy exceptions.
1990
1991         * xml/XPathExpression.cpp:
1992         (WebCore::XPathExpression::createExpression): Use ExceptionOr.
1993         (WebCore::XPathExpression::evaluate): Ditto.
1994         * xml/XPathExpression.h: Updated for above changes.
1995         * xml/XPathExpression.idl: Use non-legacy exceptions.
1996
1997         * xml/XPathGrammar.y: Added include of XPathStep.h.
1998
1999         * xml/XPathParser.cpp:
2000         (WebCore::XPath::Parser::Parser): Initialize three scalar data members
2001         in the class definition rather than here.
2002         (WebCore::XPath::Parser::parseStatement): Use ExceptionOr.
2003         * xml/XPathParser.h: Updated for above changes.
2004
2005         * xml/XPathResult.cpp:
2006         (WebCore::XPathResult::XPathResult): Use a reference rather than a
2007         pointer for the document. Alao initialize two scalar data members
2008         in the class definition rather than here.
2009         (WebCore::XPathResult::convertTo): Use ExceptionOr.
2010         (WebCore::XPathResult::numberValue): Ditto.
2011         (WebCore::XPathResult::stringValue): Ditto.
2012         (WebCore::XPathResult::booleanValue): Ditto.
2013         (WebCore::XPathResult::singleNodeValue): Ditto.
2014         (WebCore::XPathResult::snapshotLength): Ditto.
2015         (WebCore::XPathResult::iterateNext): Ditto.
2016         (WebCore::XPathResult::snapshotItem): Ditto.
2017         * xml/XPathResult.h: Updated for the changes above.
2018         * xml/XPathResult.idl: Use non-legacy exceptions.
2019
2020 2016-10-19  Nan Wang  <n_wang@apple.com>
2021
2022         AX: [Mac] Meter element should use AXValueDescription to descrbe the status of the value
2023         https://bugs.webkit.org/show_bug.cgi?id=163610
2024
2025         Reviewed by Chris Fleizach.
2026
2027         Exposed the goodness of the meter value in AXValueDescription.
2028
2029         Test: accessibility/mac/meter-gauge-value-description.html
2030
2031         * English.lproj/Localizable.strings:
2032         * accessibility/AccessibilityProgressIndicator.cpp:
2033         (WebCore::AccessibilityProgressIndicator::gaugeRegionValueDescription):
2034         * accessibility/AccessibilityProgressIndicator.h:
2035         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2036         (-[WebAccessibilityObjectWrapper valueDescriptionForMeter]):
2037         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2038         * platform/LocalizedStrings.cpp:
2039         (WebCore::AXMeterGaugeRegionOptimumText):
2040         (WebCore::AXMeterGaugeRegionSuboptimalText):
2041         (WebCore::AXMeterGaugeRegionLessGoodText):
2042         * platform/LocalizedStrings.h:
2043
2044 2016-10-19  Dave Hyatt  <hyatt@apple.com>
2045
2046         [CSS Parser] Fix named color parsing
2047         https://bugs.webkit.org/show_bug.cgi?id=163662
2048
2049         Reviewed by Zalan Bujtas.
2050
2051         Named color parsing in the old parser for extended colors relied on constructing a Color with the
2052         name and doing a lookup that way.
2053
2054         The new parser allows the back end to hold a primitive identifier value for extended colors.
2055
2056         StyleColor contains a helper function for looking up the correct color.
2057
2058         This patch switches both the old and the new parsers over to the new StyleColor function.
2059
2060         Also remove some asserts from the CSSSelectorList, since the new parser allows it to be empty and
2061         detects parsing failure that way.
2062
2063         * css/CSSSelectorList.cpp:
2064         (WebCore::CSSSelectorList::CSSSelectorList):
2065         (WebCore::CSSSelectorList::operator=):
2066         * css/StyleColor.cpp:
2067         (WebCore::StyleColor::isColorKeyword):
2068         * css/StyleResolver.cpp:
2069         (WebCore::StyleResolver::colorFromPrimitiveValue):
2070         (WebCore::colorForCSSValue): Deleted.
2071
2072 2016-10-19  Youenn Fablet  <youenn@apple.com>
2073
2074         Remove SecurityOrigin::taintsCanvas
2075         https://bugs.webkit.org/show_bug.cgi?id=163594
2076
2077         Reviewed by Darin Adler.
2078
2079         No change of behavior.
2080
2081         * html/canvas/CanvasRenderingContext.cpp:
2082         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
2083         * page/SecurityOrigin.cpp:
2084         (WebCore::SecurityOrigin::canReceiveDragData):
2085         (WebCore::SecurityOrigin::taintsCanvas): Deleted.
2086         * page/SecurityOrigin.h:
2087
2088 2016-10-18  Dave Hyatt  <hyatt@apple.com>
2089
2090         [CSS Parser] Fix compound selector parsing.
2091         https://bugs.webkit.org/show_bug.cgi?id=163649
2092
2093         Reviewed by Darin Adler.
2094
2095         The new CSS parser is failing to handle compound selectors. The code has an assumption that the
2096         first value in the RelationType enum is SubSelector. This patch changes the enum to have the same
2097         name used in Blink, RelationType, and to make the ordering be exactly the same.
2098
2099         * css/CSSSelector.h:
2100         (WebCore::CSSSelector::relation):
2101         (WebCore::CSSSelector::setRelation):
2102         * css/SelectorChecker.cpp:
2103         (WebCore::SelectorChecker::matchRecursively):
2104         (WebCore::canMatchHoverOrActiveInQuirksMode):
2105         (WebCore::SelectorChecker::determineLinkMatchType):
2106         * css/SelectorFilter.cpp:
2107         (WebCore::SelectorFilter::collectIdentifierHashes):
2108         * css/parser/CSSParserValues.cpp:
2109         (WebCore::CSSParserSelector::insertTagHistory):
2110         (WebCore::CSSParserSelector::appendTagHistory):
2111         * css/parser/CSSParserValues.h:
2112         (WebCore::CSSParserSelector::setRelation):
2113         * css/parser/CSSSelectorParser.cpp:
2114         (WebCore::CSSSelectorParser::consumeComplexSelector):
2115         (WebCore::CSSSelectorParser::consumeCombinator):
2116         * css/parser/CSSSelectorParser.h:
2117         * cssjit/SelectorCompiler.cpp:
2118         (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):
2119         (WebCore::SelectorCompiler::constructFragmentsInternal):
2120
2121 2016-10-19  Javier Fernandez  <jfernandez@igalia.com>
2122
2123         Web Inspector: Debugger buttons positioned incorrectly, align-content default value is unexpected
2124         https://bugs.webkit.org/show_bug.cgi?id=163572
2125
2126         Reviewed by Sergio Villar Senin.
2127
2128         We only allow the new CSS Box Alignment syntax when the Grid Layout
2129         feature is enabled. Due to flexbox backward compatibility we have
2130         implemented a different code path for the style initial/default values
2131         assignment. However, we have incorrectly resolved both align-content
2132         and justify-content to 'flex-start' when grid layout is disabled.
2133
2134         This patch changes the approach, so we set 'normal' (the value specified
2135         by the new syntax) for both properties, but using the values defined in
2136         the old syntax (Flexbox specification) at computed style resolution.
2137
2138         Since 'stretch' is the default value for the align-content property, this
2139         issue implies that any flexbox line with an undefined height will be
2140         laid out incorrectly, if not explicitly set via CSS, because flex items
2141         can't use the available height, even though they use 'stretch' for their
2142         'align-self' properties.
2143
2144         Test: css3/flexbox/flexbox-lines-must-be-stretched-by-default.html
2145
2146         * css/CSSComputedStyleDeclaration.cpp:
2147         (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
2148         (WebCore::ComputedStyleExtractor::propertyValue):
2149         * rendering/style/RenderStyle.h:
2150         (WebCore::RenderStyle::initialContentAlignment):
2151
2152 2016-10-19  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2153
2154         [GTK] REGRESSION(r207396) Build broken with Clang.
2155         https://bugs.webkit.org/show_bug.cgi?id=163599
2156
2157         Suggested and reviewed by Darin Adler.
2158
2159         * css/CSSPrimitiveValue.cpp:
2160         (WebCore::CSSPrimitiveValue::getStringValue):
2161
2162 2016-10-19  Darin Adler  <darin@apple.com>
2163
2164         Try to fix build.
2165
2166         * page/PerformanceUserTiming.cpp: Add back class name; needed by some compiler versions.
2167
2168 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2169
2170         Unreviewed. Fix the build after r207522.
2171
2172         * page/PerformanceUserTiming.cpp: Include PerformanceTiming.h.
2173
2174 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2175
2176         Unreviewed. Fix the build after r207519.
2177
2178         The build error is:
2179         IDL ATTRIBUTE CHECKER ERROR: Unknown IDL attribute [PassContext] is found at TestRunner.idl.
2180
2181         Because PassContext was removed from IDLAttributes.txt in rr207519, but it's implemented by
2182         CodeGeneratorTestRunner.pm and used by TestRunner.idl.
2183
2184         * bindings/scripts/IDLAttributes.txt: Bring back PassContext.
2185
2186 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2187
2188         Unreviewed. Fix the build with GCC 4.9 after r207463.
2189
2190         Add constructors to MediaConstraintsData.
2191
2192         * Modules/mediastream/MediaConstraintsImpl.h:
2193         (WebCore::MediaConstraintsData::MediaConstraintsData):
2194
2195 2016-10-19  Jer Noble  <jer.noble@apple.com>
2196
2197         [Mac][MSE] Movies with a 'mehd' box have a zero-duration
2198         https://bugs.webkit.org/show_bug.cgi?id=163641
2199
2200         Reviewed by Darin Adler.
2201
2202         Test: media/media-source/media-source-init-segment-duration.html
2203
2204         The canonical (ISO/IEC 14496-12:2012) way to signal the duration of a fragmented media file is to add a
2205         'mehd' box to the 'mvex' container box specifying the duration of the fragment. Support this through the
2206         AVAsset -overallDurationHint property.
2207
2208         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2209         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
2210         * platform/spi/mac/AVFoundationSPI.h:
2211
2212 2016-10-18  Darin Adler  <darin@apple.com>
2213
2214         Move many miscellaneous classes from ExceptionCode to Exception
2215         https://bugs.webkit.org/show_bug.cgi?id=163645
2216
2217         Reviewed by Ryosuke Niwa.
2218
2219         * bindings/js/JSCryptoCustom.cpp:
2220         (WebCore::JSCrypto::getRandomValues): Use propagateException.
2221         * bindings/js/JSDOMWindowCustom.cpp:
2222         (WebCore::handlePostMessage): Ditto.
2223         (WebCore::JSDOMWindow::setTimeout): Use toJSNumber.
2224         (WebCore::JSDOMWindow::setInterval): Ditto.
2225         * bindings/js/JSStorageCustom.cpp:
2226         (WebCore::JSStorage::nameGetter): Use propagateException.
2227         (WebCore::JSStorage::deleteProperty): Ditto.
2228         (WebCore::JSStorage::getOwnPropertyNames): Ditto.
2229         (WebCore::JSStorage::putDelegate): Ditto.
2230
2231         * loader/appcache/DOMApplicationCache.cpp:
2232         (WebCore::DOMApplicationCache::update): Use ExceptionOr.
2233         (WebCore::DOMApplicationCache::swapCache): Ditto.
2234         * loader/appcache/DOMApplicationCache.h: Update for above changes.
2235         * loader/appcache/DOMApplicationCache.idl: Use non-legacy exceptions.
2236
2237         * page/Crypto.cpp:
2238         (WebCore::Crypto::getRandomValues): Use ExceptionOr.
2239         (WebCore::Crypto::webkitSubtle): Ditto.
2240         * page/Crypto.h: Updated for above changes.
2241         * page/Crypto.idl: Use non-legacy exceptions.
2242
2243         * page/DOMWindow.cpp:
2244         (WebCore::DOMWindow::DOMWindow): Initialize many data members in
2245         the class definition instead of here.
2246         (WebCore::DOMWindow::page): Use nullptr.
2247         (WebCore::DOMWindow::screen): Ditto.
2248         (WebCore::DOMWindow::crypto): Ditto.
2249         (WebCore::DOMWindow::locationbar): Ditto.
2250         (WebCore::DOMWindow::menubar): Ditto.
2251         (WebCore::DOMWindow::personalbar): Ditto.
2252         (WebCore::DOMWindow::scrollbars): Ditto.
2253         (WebCore::DOMWindow::statusbar): Ditto.
2254         (WebCore::DOMWindow::toolbar): Ditto.
2255         (WebCore::DOMWindow::applicationCache): Ditto.
2256         (WebCore::DOMWindow::sessionStorage): Use ExceptionOr.
2257         (WebCore::DOMWindow::localStorage): Ditto.
2258         (WebCore::DOMWindow::postMessage): Ditto.
2259         (WebCore::DOMWindow::frameElement): Use nullptr.
2260         (WebCore::DOMWindow::self): Ditto.
2261         (WebCore::DOMWindow::opener): Ditto.
2262         (WebCore::DOMWindow::parent): Ditto.
2263         (WebCore::DOMWindow::top): Ditto.
2264         (WebCore::DOMWindow::getComputedStyle): Use Ref.
2265         (WebCore::DOMWindow::setTimeout): Use ExceptionOr.
2266         (WebCore::DOMWindow::setInterval): Ditto.
2267         (WebCore::didAddStorageEventListener): Use a reference instead of a
2268         pointer, and ignore return value instead of using IGNORE_EXCEPTION.
2269         (WebCore::DOMWindow::addEventListener): Pass reference to function above.
2270         (WebCore::DOMWindow::dispatchEvent): Use enum class version of PageStatus.
2271         * page/DOMWindow.h: Updated for changes above. Also changed indentatation.
2272         * page/DOMWindow.idl: Use non-legacy exceptions.
2273
2274         * page/EventSource.cpp:
2275         (WebCore::EventSource::create): Use ExceptionOr.
2276         * page/EventSource.h: Updated for change above.
2277         * page/EventSource.idl: Use non-legacy exception.
2278
2279         * page/Location.cpp:
2280         (WebCore::Location::setProtocol): Use ExceptionOr.
2281         * page/Location.h: Updated for change above.
2282         * page/Location.idl: Use non-legacy exception.
2283
2284         * page/Performance.cpp:
2285         (WebCore::Performance::Performance): Remove unnecessary initialization of
2286         smart pointer to null, and moved initialization of m_resourceTimingBufferSize
2287         to the header.
2288         (WebCore::Performance::navigation): Made non-const and return a reference.
2289         (WebCore::Performance::timing): Ditto.
2290         (WebCore::Performance::addResourceTiming): Change LoadTiming argument to use
2291         a const& instead of passing in a copy.
2292         (WebCore::Performance::webkitMark): Use ExceptionOr and make_unique.
2293         (WebCore::Performance::webkitClearMarks): Ditto.
2294         (WebCore::Performance::webkitMeasure): Ditto.
2295         (WebCore::Performance::webkitClearMeasures): Ditto.
2296         (WebCore::Performance::reduceTimeResolution): Use std::floor.
2297         * page/Performance.h: Updated for above changes. Removed unneeded includes.
2298         Made more things private. Removed unneeded reference counting of UserTiming.
2299         * page/Performance.idl: Use non-legacy exceptions.
2300
2301         * page/PerformanceUserTiming.cpp:
2302         (WebCore::restrictedMarkFunction): Removed unneeded class name.
2303         (WebCore::UserTiming::UserTiming): Take a reference instead of a pointer.
2304         (WebCore::UserTiming::mark): Use ExceptionOr.
2305         (WebCore::UserTiming::findExistingMarkStartTime): Ditto.
2306         (WebCore::UserTiming::measure): Ditto.
2307         (WebCore::getEntrySequenceByName): Simplified code using HashMap::get.
2308         * page/PerformanceUserTiming.h: Updated for above changes. Removed reference
2309         counting since this is a single-owner object.
2310
2311         * page/UserMessageHandler.cpp:
2312         (WebCore::UserMessageHandler::postMessage): Use ExceptionOr.
2313         * page/UserMessageHandler.h: Updated for above change.
2314         * page/UserMessageHandler.idl: Use non-legacy exception.
2315
2316         * storage/Storage.cpp:
2317         (WebCore::Storage::length): Use ExceptionOr.
2318         (WebCore::Storage::key): Ditto.
2319         (WebCore::Storage::getItem): Ditto.
2320         (WebCore::Storage::setItem): Ditto.
2321         (WebCore::Storage::removeItem): Ditto.
2322         (WebCore::Storage::clear): Ditto.
2323         (WebCore::Storage::contains): Ditto.
2324         * storage/Storage.h: Updated for above change.
2325         * storage/Storage.idl: Use non-legacy exceptions.
2326
2327         * storage/StorageEventDispatcher.cpp:
2328         (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
2329         Updated for ExceptionOr.
2330         (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames): Ditto.
2331
2332 2016-10-18  Darin Adler  <darin@apple.com>
2333
2334         Move internal testing classes from ExceptionCode to Exception
2335         https://bugs.webkit.org/show_bug.cgi?id=163553
2336
2337         Reviewed by Ryosuke Niwa.
2338
2339         * bindings/js/JSDOMBinding.h: Added toJSArray. Also exported a function that
2340         is now needed in the testing library.
2341         * bindings/scripts/CodeGeneratorJS.pm:
2342         (NativeToJSValue): Added code to handle the jsArray case with an exception.
2343
2344         * css/parser/CSSPropertyParser.cpp: Fix #if to make code compile when
2345         CSS_SCROLL_SNAP is not enabled.
2346
2347         * dom/Element.cpp:
2348         (WebCore::Element::createShadowRoot): Changed return type to a raw pointer.
2349         There is no reason it needs to be a RefPtr.
2350         * dom/Element.h: Updated for above change.
2351
2352         * svg/SVGPathStringBuilder.h: Exported class and made more public so it can
2353         be used in test code.
2354
2355         * svg/SVGPathUtilities.cpp:
2356         (WebCore::pathIteratorForBuildingString): Deleted. Needed only for test code,
2357         so moved into there.
2358         (WebCore::buildStringFromPath): Deleted. Ditto.
2359         * svg/SVGPathUtilities.h: Removed buildStringFromPath.
2360
2361         * testing/InternalSettings.cpp: Simplified the guard macro and used the all
2362         capitals style that our style guide prescribes for non-function-like macros.
2363         (WebCore::InternalSettings::create): Moved here, no longer inline Use m_page.
2364         (WebCore::InternalSettings::resetToConsistentState): Updated since settings
2365         returns a reference.
2366         (WebCore::InternalSettings::settings): Changed to return a reference and
2367         assert that m_page is not null; functions all check m_page for null first.
2368         (WebCore::InternalSettings::setTouchEventEmulationEnabled): Updated to use
2369         ExceptionOr, do an m_page check, and use settings that returns a reference.
2370         (WebCore::InternalSettings::setStandardFontFamily): Ditto.
2371         (WebCore::InternalSettings::setSerifFontFamily): Ditto.
2372         (WebCore::InternalSettings::setSansSerifFontFamily): Ditto.
2373         (WebCore::InternalSettings::setFixedFontFamily): Ditto.
2374         (WebCore::InternalSettings::setCursiveFontFamily): Ditto.
2375         (WebCore::InternalSettings::setFantasyFontFamily): Ditto.
2376         (WebCore::InternalSettings::setPictographFontFamily): Ditto.
2377         (WebCore::InternalSettings::setTextAutosizingEnabled): Ditto.
2378         (WebCore::InternalSettings::setTextAutosizingWindowSizeOverride): Ditto.
2379         (WebCore::InternalSettings::setMediaTypeOverride): Ditto.
2380         (WebCore::InternalSettings::setCanStartMedia): Ditto.
2381         (WebCore::InternalSettings::setAllowsAirPlayForMediaPlayback): Ditto.
2382         (WebCore::InternalSettings::setEditingBehavior): Ditto.
2383         (WebCore::InternalSettings::setShouldDisplayTrackKind): Ditto.
2384         (WebCore::InternalSettings::shouldDisplayTrackKind): Ditto.
2385         (WebCore::InternalSettings::setStorageBlockingPolicy): Ditto.
2386         (WebCore::InternalSettings::setPreferMIMETypeForImages): Ditto.
2387         (WebCore::InternalSettings::setImagesEnabled): Ditto.
2388         (WebCore::InternalSettings::setPDFImageCachingPolicy): Ditto.
2389         (WebCore::InternalSettings::setMinimumTimerInterval): Ditto.
2390         (WebCore::InternalSettings::setDefaultVideoPosterURL): Ditto.
2391         (WebCore::InternalSettings::setForcePendingWebGLPolicy): Ditto.
2392         (WebCore::InternalSettings::setTimeWithoutMouseMovementBeforeHidingControls): Ditto.
2393         (WebCore::InternalSettings::setUseLegacyBackgroundSizeShorthandBehavior): Ditto.
2394         (WebCore::InternalSettings::setAutoscrollForDragAndDropEnabled): Ditto.
2395         (WebCore::InternalSettings::setFontFallbackPrefersPictographs): Ditto.
2396         (WebCore::InternalSettings::setWebFontsAlwaysFallBack): Ditto.
2397         (WebCore::InternalSettings::setQuickTimePluginReplacementEnabled): Ditto.
2398         (WebCore::InternalSettings::setYouTubeFlashPluginReplacementEnabled): Ditto.
2399         (WebCore::InternalSettings::setBackgroundShouldExtendBeyondPage): Ditto.
2400         (WebCore::InternalSettings::setShouldConvertPositionStyleOnCopy): Ditto.
2401         (WebCore::InternalSettings::setScrollingTreeIncludesFrames): Ditto.
2402         (WebCore::InternalSettings::setAllowsInlineMediaPlayback): Ditto.
2403         (WebCore::InternalSettings::setAllowsInlineMediaPlaybackAfterFullscreen): Ditto.
2404         (WebCore::InternalSettings::setInlineMediaPlaybackRequiresPlaysInlineAttribute): Ditto.
2405         (WebCore::InternalSettings::setIndexedDBWorkersEnabled): Ditto.
2406         (WebCore::InternalSettings::userInterfaceDirectionPolicy): Ditto.
2407         (WebCore::InternalSettings::setUserInterfaceDirectionPolicy): Ditto.
2408         (WebCore::InternalSettings::systemLayoutDirection): Ditto.
2409         (WebCore::InternalSettings::setSystemLayoutDirection): Ditto.
2410         (WebCore::InternalSettings::variationFontsEnabled): Ditto.
2411         (WebCore::InternalSettings::setVariationFontsEnabled): Ditto.
2412         (WebCore::InternalSettings::forcedPrefersReducedMotionValue): Ditto.
2413         (WebCore::InternalSettings::setForcedPrefersReducedMotionValue): Ditto.
2414         * testing/InternalSettings.h: Updated for above changes. Also moved Backup to make
2415         it private instead of public.
2416         * testing/InternalSettings.idl: Use non-legacy execption. Also removed unneeded
2417         exception for setIndexedDBWorkersEnabled.
2418
2419         * testing/Internals.cpp: Marked InspectorStubFrontend final and made everything private.
2420         (WebCore::Internals::setCanShowModalDialogOverride): Use ExceptionOr.
2421         (WebCore::Internals::lastSpatialNavigationCandidateCount): Ditto.
2422         (WebCore::Internals::animationsAreSuspended): Ditto.
2423         (WebCore::Internals::suspendAnimations): Ditto.
2424         (WebCore::Internals::resumeAnimations): Ditto.
2425         (WebCore::Internals::pauseAnimationAtTimeOnElement): Ditto.
2426         (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): Ditto.
2427         (WebCore::Internals::pauseTransitionAtTimeOnElement): Ditto.
2428         (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): Ditto.
2429         (WebCore::Internals::elementRenderTreeAsText): Ditto.
2430         (WebCore::Internals::ensureShadowRoot): Ditto.
2431         (WebCore::Internals::createShadowRoot): Ditto.
2432         (WebCore::Internals::shadowRootType): Ditto.
2433         (WebCore::Internals::isTimerThrottled): Ditto.
2434         (WebCore::Internals::formControlStateOfPreviousHistoryItem): Ditto.
2435         (WebCore::Internals::setFormControlStateOfPreviousHistoryItem): Ditto.
2436         (WebCore::Internals::absoluteCaretBounds): Ditto.
2437         (WebCore::Internals::inspectorHighlightRects): Ditto.
2438         (WebCore::Internals::inspectorHighlightObject): Ditto.
2439         (WebCore::Internals::markerCountForNode): Ditto.
2440         (WebCore::Internals::markerAt): Ditto.
2441         (WebCore::Internals::markerRangeForNode): Ditto.
2442         (WebCore::Internals::markerDescriptionForNode): Ditto.
2443         (WebCore::Internals::dumpMarkerRects): Ditto.
2444         (WebCore::Internals::setMarkedTextMatchesAreHighlighted): Ditto.
2445         (WebCore::Internals::setScrollViewPosition): Ditto.
2446         (WebCore::Internals::setViewBaseBackgroundColor): Ditto.
2447         (WebCore::Internals::setPagination): Ditto.
2448         (WebCore::Internals::setPaginationLineGridEnabled): Ditto.
2449         (WebCore::Internals::configurationForViewport): Ditto.
2450         (WebCore::Internals::wasLastChangeUserEdit): Ditto.
2451         (WebCore::Internals::scrollElementToRect): Ditto.
2452         (WebCore::Internals::autofillFieldName): Ditto.
2453         (WebCore::Internals::paintControlTints): Ditto.
2454         (WebCore::Internals::rangeForDictionaryLookupAtLocation): Ditto.
2455         (WebCore::Internals::setDelegatesScrolling): Ditto.
2456         (WebCore::Internals::lastSpellCheckRequestSequence): Ditto.
2457         (WebCore::Internals::lastSpellCheckProcessedSequence): Ditto.
2458         (WebCore::Internals::wheelEventHandlerCount): Ditto.
2459         (WebCore::Internals::touchEventHandlerCount): Ditto.
2460         (WebCore::Internals::nodesFromRect): Ditto.
2461         (WebCore::Internals::setBatteryStatus): Ditto.
2462         (WebCore::Internals::setDeviceProximity): Ditto.
2463         (WebCore::Internals::hasSpellingMarker): Ditto.
2464         (WebCore::Internals::hasAutocorrectedMarker): Ditto.
2465         (WebCore::Internals::handleAcceptedCandidate): Ditto.
2466         (WebCore::Internals::isOverwriteModeEnabled): Ditto.
2467         (WebCore::Internals::toggleOverwriteModeEnabled): Ditto.
2468         (WebCore::Internals::countMatchesForText): Ditto.
2469         (WebCore::Internals::countFindMatches): Ditto.
2470         (WebCore::Internals::setInspectorIsUnderTest): Ditto.
2471         (WebCore::Internals::hasGrammarMarker): Ditto.
2472         (WebCore::Internals::numberOfScrollableAreas): Ditto.
2473         (WebCore::Internals::isPageBoxVisible): Ditto.
2474         (WebCore::Internals::layerTreeAsText): Ditto.
2475         (WebCore::Internals::repaintRectsAsText): Ditto.
2476         (WebCore::Internals::scrollingStateTreeAsText): Ditto.
2477         (WebCore::Internals::mainThreadScrollingReasons): Ditto.
2478         (WebCore::Internals::nonFastScrollableRects): Ditto.
2479         (WebCore::Internals::setElementUsesDisplayListDrawing): Ditto.
2480         (WebCore::Internals::setElementTracksDisplayListReplay): Ditto.
2481         (WebCore::Internals::displayListForElement): Ditto.
2482         (WebCore::Internals::replayDisplayListForElement): Ditto.
2483         (WebCore::Internals::garbageCollectDocumentResources): Ditto.
2484         (WebCore::Internals::insertAuthorCSS): Ditto.
2485         (WebCore::Internals::insertUserCSS): Ditto.
2486         (WebCore::Internals::pageProperty): Ditto.
2487         (WebCore::Internals::pageSizeAndMarginsInPixels): Ditto.
2488         (WebCore::Internals::setPageScaleFactor): Ditto.
2489         (WebCore::Internals::setPageZoomFactor): Ditto.
2490         (WebCore::Internals::setTextZoomFactor): Ditto.
2491         (WebCore::Internals::setUseFixedLayout): Ditto.
2492         (WebCore::Internals::setFixedLayoutSize): Ditto.
2493         (WebCore::Internals::setViewExposedRect): Ditto.
2494         (WebCore::Internals::setHeaderHeight): Ditto.
2495         (WebCore::Internals::setFooterHeight): Ditto.
2496         (WebCore::Internals::setTopContentInset): Ditto.
2497         (WebCore::Internals::setApplicationCacheOriginQuota): Ditto.
2498         (WebCore::Internals::startTrackingRepaints): Ditto.
2499         (WebCore::Internals::stopTrackingRepaints): Ditto.
2500         (WebCore::Internals::startTrackingLayerFlushes): Ditto.
2501         (WebCore::Internals::layerFlushCount): Ditto.
2502         (WebCore::Internals::startTrackingStyleRecalcs): Ditto.
2503         (WebCore::Internals::styleRecalcCount): Ditto.
2504         (WebCore::Internals::startTrackingCompositingUpdates): Ditto.
2505         (WebCore::Internals::compositingUpdateCount): Ditto.
2506         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks): Ditto.
2507         (WebCore::Internals::getCurrentCursorInfo): Ditto.
2508         (WebCore::Internals::mediaElementHasCharacteristic): Ditto.
2509         (WebCore::Internals::captionsStyleSheetOverride): Ditto.
2510         (WebCore::Internals::setCaptionsStyleSheetOverride): Ditto.
2511         (WebCore::Internals::setPrimaryAudioTrackLanguageOverride): Ditto.
2512         (WebCore::Internals::setCaptionDisplayMode): Ditto.
2513         (WebCore::Internals::selectionBounds): Ditto.
2514         (WebCore::Internals::isVibrating): Ditto.
2515         (WebCore::Internals::isPluginUnavailabilityIndicatorObscured): Ditto.
2516         (WebCore::Internals::beginMediaSessionInterruption): Ditto.
2517         (WebCore::Internals::setMediaSessionRestrictions): Ditto.
2518         (WebCore::Internals::postRemoteControlCommand): Ditto.
2519         (WebCore::Internals::setMockMediaPlaybackTargetPickerState): Ditto.
2520         (WebCore::Internals::installMockPageOverlay): Ditto.
2521         (WebCore::Internals::pageOverlayLayerTreeAsText): Ditto.
2522         (WebCore::Internals::scrollSnapOffsets): Ditto.
2523         (WebCore::Internals::pathStringWithShrinkWrappedRects): Moved the code that builds
2524         the path string in here for now since it's only used for this testing.
2525         (WebCore::Internals::resourceLoadStatisticsForOrigin): Take a const String&.
2526
2527         * testing/Internals.h: Updated for above changes.
2528         * testing/Internals.idl: Use non-legacy exceptions.
2529
2530 2016-10-18  Chris Dumez  <cdumez@apple.com>
2531
2532         [Web IDL] Drop webkit-specific extended attributes that are no longer useful
2533         https://bugs.webkit.org/show_bug.cgi?id=163643
2534
2535         Reviewed by Ryosuke Niwa.
2536
2537         Drop webkit-specific IDL extended attributes that are no longer useful:
2538         - [CustomReturn]: I believe this used to be for ObjC bindings. It has
2539           no impact in JS bindings.
2540         - [Deletable]: It only had an impact on static attributes and was only
2541           used on HTMLAllCollection.all, which is not static. I updated the
2542           bindings generator to so that static attributes are now configurable
2543           by default (unless marked as [Unforgeable], as per Web IDL [1]. This
2544           causes Notification.permission (This only static attribute we have)
2545           to become deletable. This behavior is consistent with the specification
2546           and with Chrome. I added test coverage for this.
2547         - [ImplementationNamespace]: Implemented but unused.
2548         - [PassContext]: Not implemented and unused.
2549         - [TypedArray=*]: Not implemented and unused.
2550
2551         [1] https://heycam.github.io/webidl/#es-attributes
2552
2553         Test: fast/notifications/notification-permisssion-deletable.html
2554
2555         * bindings/scripts/CodeGeneratorJS.pm:
2556         (GetNamespaceForInterface):
2557         (GenerateImplementation):
2558         * bindings/scripts/IDLAttributes.txt:
2559         * bindings/scripts/test/JS/JSTestInterface.cpp:
2560         * bindings/scripts/test/JS/JSTestObj.cpp:
2561         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2562         * dom/Node.idl:
2563         * html/HTMLDocument.idl:
2564
2565 2016-10-18  Sam Weinig  <sam@webkit.org>
2566
2567         Replace std::experimental::variant with WTF::Variant (or similar)
2568         https://bugs.webkit.org/show_bug.cgi?id=163626
2569
2570         Reviewed by Chris Dumez.
2571
2572         Rename std::experimental::variant, Variant. Move helpers get/holds_alternative/etc.
2573         into the WTF namespace.
2574
2575         * Modules/fetch/FetchBody.h:
2576         (WebCore::FetchBody::isBlob):
2577         (WebCore::FetchBody::isFormData):
2578         (WebCore::FetchBody::isArrayBuffer):
2579         (WebCore::FetchBody::isArrayBufferView):
2580         (WebCore::FetchBody::isURLSearchParams):
2581         (WebCore::FetchBody::isText):
2582         (WebCore::FetchBody::blobBody):
2583         (WebCore::FetchBody::formDataBody):
2584         (WebCore::FetchBody::arrayBufferBody):
2585         (WebCore::FetchBody::arrayBufferViewBody):
2586         (WebCore::FetchBody::textBody):
2587         (WebCore::FetchBody::urlSearchParamsBody):
2588         * bindings/generic/IDLTypes.h:
2589         * dom/ExceptionOr.h:
2590         (WebCore::ExceptionOr<ReturnType>::hasException):
2591         (WebCore::ExceptionOr<ReturnType>::releaseException):
2592         (WebCore::ExceptionOr<ReturnType>::releaseReturnValue):
2593         * dom/MessageEvent.cpp:
2594         (WebCore::MessageEvent::source):
2595         * dom/MessageEvent.h:
2596         * dom/Node.cpp:
2597         (WebCore::nodeSetPreTransformedFromNodeOrStringVector):
2598         (WebCore::Node::convertNodesOrStringsIntoNode):
2599         * dom/Node.h:
2600         * html/HTMLOptionsCollection.h:
2601         * html/HTMLSelectElement.cpp:
2602         (WebCore::HTMLSelectElement::add):
2603         * html/HTMLSelectElement.h:
2604         * html/track/TrackEvent.cpp:
2605         (WebCore::TrackEvent::TrackEvent):
2606         * html/track/TrackEvent.h:
2607
2608 2016-10-18  Chris Dumez  <cdumez@apple.com>
2609
2610         Unreviewed, rebaseline bindings tests after Sam's r207505.
2611
2612         * bindings/scripts/test/JS/JSTestCallback.cpp:
2613         (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
2614         * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
2615         (WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
2616         * bindings/scripts/test/JS/JSTestObj.cpp:
2617         (WebCore::jsTestObjPrototypeFunctionSerializedValueCaller):
2618         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2619         (WebCore::jsTestSerializedScriptValueInterfaceValueGetter):
2620         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValueGetter):
2621         (WebCore::jsTestSerializedScriptValueInterfaceCachedValueGetter):
2622         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter):
2623         (WebCore::setJSTestSerializedScriptValueInterfaceValueFunction):
2624         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValueFunction):
2625         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2626         (WebCore::jsTestTypedefsImmutableSerializedScriptValueGetter):
2627         (WebCore::setJSTestTypedefsImmutableSerializedScriptValueFunction):
2628
2629 2016-10-18  Chris Dumez  <cdumez@apple.com>
2630
2631         [Web IDL] Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor]
2632         https://bugs.webkit.org/show_bug.cgi?id=163630
2633
2634         Reviewed by Darin Adler.
2635
2636         Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor] in our
2637         IDL now that all our events use proper constructors instead.
2638
2639         * bindings/scripts/CodeGenerator.pm:
2640         * bindings/scripts/CodeGeneratorJS.pm:
2641         (GenerateHeader):
2642         (GenerateConstructorDefinition):
2643         (GenerateConstructorHelperMethods):
2644         (IsConstructable):
2645         * bindings/scripts/IDLAttributes.txt:
2646         * dom/Event.h:
2647         (WebCore::Event::create):
2648         * dom/Event.idl:
2649         * dom/UIEvent.h:
2650         (WebCore::UIEvent::create):
2651         * dom/UIEvent.idl:
2652
2653 2016-10-18  Chris Dumez  <cdumez@apple.com>
2654
2655         Changing details.open should cause a toggle event to be fired asynchronously
2656         https://bugs.webkit.org/show_bug.cgi?id=163568
2657
2658         Reviewed by Darin Adler.
2659
2660         Changing details.open should cause a toggle event to be fired asynchronously:
2661         - https://html.spec.whatwg.org/#details-notification-task-steps
2662
2663         Firefox and Chrome implement this, we don't.
2664
2665         Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html
2666
2667         * dom/EventNames.h:
2668         * dom/GlobalEventHandlers.idl:
2669         * html/HTMLAttributeNames.in:
2670         * html/HTMLDetailsElement.cpp:
2671         (WebCore::detailToggleEventSender):
2672         (WebCore::HTMLDetailsElement::~HTMLDetailsElement):
2673         (WebCore::HTMLDetailsElement::dispatchPendingEvent):
2674         (WebCore::HTMLDetailsElement::parseAttribute):
2675         * html/HTMLDetailsElement.h:
2676         * html/HTMLElement.cpp:
2677         (WebCore::HTMLElement::createEventHandlerNameMap):
2678
2679 2016-10-18  Dave Hyatt  <hyatt@apple.com>
2680
2681         [CSS Parser] Enable basic parser testing.
2682         https://bugs.webkit.org/show_bug.cgi?id=163639
2683
2684         Reviewed by Dean Jackson.
2685
2686         * css/SelectorChecker.cpp:
2687         (WebCore::SelectorChecker::matchRecursively):
2688         Remove the ASSERT_NOT_REACHED on the new shadow selectors. We need to implement this
2689         eventually, but it's better to not assert on that for now.
2690
2691         * css/parser/CSSParserValues.cpp:
2692         (WebCore::CSSParserSelector::isHostPseudoSelector):
2693         Make sure to check that we're a pseudoclass selector first, since otherwise we'll assert.
2694
2695         * css/parser/CSSParserValues.h:
2696         (WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching):
2697         Make sure to check that we're a pseudoelement selector first, since otherwise we'll assert.
2698
2699         * css/parser/CSSPropertyParser.cpp:
2700         (WebCore::CSSPropertyParser::addExpandedPropertyForValue):
2701         copyRef is needed here, since a singleton value is being propagated to all the expanded shorthand properties.
2702
2703         (WebCore::parseSingleShadow):
2704         (WebCore::CSSPropertyParser::consumeFont):
2705         Remove the font properties that aren't part of our shorthand. We will need to revisit this eventually as it seems
2706         some of the font properties should be reset as part of this shorthand but aren't.
2707 '
2708         * css/parser/CSSPropertyParserHelpers.cpp:
2709         (WebCore::CSSPropertyParserHelpers::consumeInteger):
2710         Just return a number for now instead of the parser_integer type.
2711
2712         * css/parser/CSSSelectorParser.cpp:
2713         (WebCore::CSSSelectorParser::consumePseudo):
2714         Clean this up so that it doesn't assert by making sure to add qualifying checks for the appropriate match type.
2715
2716 2016-10-18  Ryosuke Niwa  <rniwa@webkit.org>
2717
2718         Update the comment for HTML Imports as there is now a proposal to use ES6 Modules for this.
2719         Also replace the contact by me since I'm most familiar with this feature.
2720
2721         * features.json:
2722
2723 2016-10-18  Ryosuke Niwa  <rniwa@webkit.org>
2724
2725         Update the status of shadow DOM API to "Done" with a comment saying we're still fixing bugs.
2726
2727         Also update my contact information since I'm no longer on Twitter.
2728
2729         * features.json:
2730
2731 2016-10-18  Chris Dumez  <cdumez@apple.com>
2732
2733         Provide better form validation messages
2734         https://bugs.webkit.org/show_bug.cgi?id=163584
2735
2736         Reviewed by Darin Adler.
2737
2738         Provide better form validation messages that match more closely the ones
2739         from Chrome and Firefox.
2740
2741         No new tests, updated existing tests.
2742
2743         * English.lproj/Localizable.strings:
2744         * platform/LocalizedStrings.cpp:
2745         (WebCore::validationMessageValueMissingText):
2746         (WebCore::validationMessageValueMissingForCheckboxText):
2747         (WebCore::validationMessageValueMissingForFileText):
2748         (WebCore::validationMessageValueMissingForMultipleFileText):
2749         (WebCore::validationMessageValueMissingForRadioText):
2750         (WebCore::validationMessageValueMissingForSelectText):
2751         (WebCore::validationMessageTypeMismatchText):
2752         (WebCore::validationMessageTypeMismatchForEmailText):
2753         (WebCore::validationMessageTypeMismatchForMultipleEmailText):
2754         (WebCore::validationMessageTypeMismatchForURLText):
2755         (WebCore::validationMessagePatternMismatchText):
2756         (WebCore::validationMessageTooShortText):
2757         (WebCore::validationMessageTooLongText):
2758         (WebCore::validationMessageRangeUnderflowText):
2759         (WebCore::validationMessageRangeOverflowText):
2760         (WebCore::validationMessageStepMismatchText):
2761         (WebCore::validationMessageBadInputForNumberText):
2762
2763 2016-10-18  Dave Hyatt  <hyatt@apple.com>
2764
2765         Fix GTK build.
2766
2767         * css/parser/CSSPropertyParser.cpp:
2768         (WebCore::CSSPropertyParser::parseSingleValue):
2769
2770 2016-10-18  Sam Weinig  <sam@webkit.org>
2771
2772         Simplify SerializedScriptValue, MessagePortArray and ArrayBufferArray to ease generation
2773         https://bugs.webkit.org/show_bug.cgi?id=163625
2774
2775         Reviewed by Chris Dumez.
2776
2777         - Replace uses of MessagePortArray (a.k.a. Vector<RefPtr<MessagePort>, 1>) with Vector<RefPtr<MessagePort>>.
2778         - Replace uses of ArrayBufferArray (a.k.a. Vector<RefPtr<ArrayBuffer>, 1>) with Vector<RefPtr<ArrayBuffer>>.
2779         - Add convenience functions to SerializedScriptValue to allow calling with fewer parameters.
2780         - Move MessagePorts and ArrayBuffers more where possible.
2781
2782         * Modules/indexeddb/IDBObjectStore.cpp:
2783         (WebCore::IDBObjectStore::putOrAdd):
2784         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2785         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
2786         * bindings/js/IDBBindingUtilities.cpp:
2787         (WebCore::deserializeIDBValueToJSValue):
2788         * bindings/js/JSCustomEventCustom.cpp:
2789         (WebCore::JSCustomEvent::detail):
2790         * bindings/js/JSHistoryCustom.cpp:
2791         (WebCore::JSHistory::state):
2792         (WebCore::JSHistory::pushState):
2793         (WebCore::JSHistory::replaceState):
2794         * bindings/js/JSPopStateEventCustom.cpp:
2795         (WebCore::JSPopStateEvent::state):
2796         * dom/CustomEvent.cpp:
2797         (WebCore::CustomEvent::trySerializeDetail):
2798         * dom/ErrorEvent.cpp:
2799         (WebCore::ErrorEvent::sanitizedErrorValue):
2800         (WebCore::ErrorEvent::trySerializeError):
2801         * dom/PopStateEvent.cpp:
2802         (WebCore::PopStateEvent::trySerializeState):
2803         * page/DOMWindow.cpp:
2804         (WebCore::DOMWindow::postMessage):
2805         * page/DOMWindow.h:
2806         * workers/DedicatedWorkerGlobalScope.cpp:
2807         (WebCore::DedicatedWorkerGlobalScope::postMessage):
2808         * workers/DedicatedWorkerGlobalScope.h:
2809         * workers/Worker.cpp:
2810         (WebCore::Worker::postMessage):
2811         * workers/Worker.h:
2812         * bindings/js/JSDOMWindowCustom.cpp:
2813         (WebCore::handlePostMessage):
2814         * bindings/js/JSDictionary.cpp:
2815         (WebCore::JSDictionary::convertValue):
2816         * bindings/js/JSDictionary.h:
2817         Updated for new SerializedScriptValue interface/vector naming.
2818
2819         * bindings/js/JSMessageEventCustom.cpp:
2820         (WebCore::handleInitMessageEvent):
2821         Update handleInitMessageEvent to check for exceptions and use convert for the MessagePort sequence.
2822
2823         * bindings/js/JSMessagePortCustom.cpp:
2824         (WebCore::extractTransferables):
2825         (WebCore::fillMessagePortArray): Deleted.
2826         * bindings/js/JSMessagePortCustom.h:
2827         (WebCore::handlePostMessage):
2828         Rename fillMessagePortArray to extractTransferables to better express what it does.
2829
2830         * bindings/js/SerializedScriptValue.cpp:
2831         (WebCore::CloneSerializer::serialize):
2832         (WebCore::CloneSerializer::CloneSerializer):
2833         (WebCore::CloneSerializer::fillTransferMap):
2834         (WebCore::CloneSerializer::dumpIfTerminal):
2835         (WebCore::CloneDeserializer::deserialize):
2836         (WebCore::CloneDeserializer::CloneDeserializer):
2837         (WebCore::CloneDeserializer::readTerminal):
2838         (WebCore::SerializedScriptValue::transferArrayBuffers):
2839         (WebCore::SerializedScriptValue::create):
2840         (WebCore::SerializedScriptValue::deserialize):
2841         * bindings/js/SerializedScriptValue.h:
2842         Simplify interface to allow more callers to avoid passing default arguments. Use ExecState& more.
2843         * bindings/scripts/CodeGeneratorJS.pm:
2844         (GetNativeVectorType):
2845         Remove special case for MessagePort.
2846         (JSValueToNative):
2847         (NativeToJSValue):
2848         Updated for new SerializedScriptValue interface.
2849
2850         * dom/MessageEvent.cpp:
2851         (WebCore::MessageEvent::MessageEvent):
2852         (WebCore::MessageEvent::create):
2853         (WebCore::MessageEvent::initMessageEvent):
2854         (WebCore::MessageEvent::trySerializeData):
2855         * dom/MessageEvent.h:
2856         Store the MessagePort sequence as a Vector<RefPtr<MessagePort>> rather than in a unique_ptr.
2857
2858         * dom/MessageEvent.idl:
2859         Update last type in init functions to be sequence<MessagePort> rather than Array. They are still
2860         custom, as we don't quite generate these correctly yet. 
2861
2862         * dom/MessagePort.cpp:
2863         (WebCore::MessagePort::postMessage):
2864         (WebCore::MessagePort::dispatchMessages):
2865         (WebCore::MessagePort::disentanglePorts):
2866         (WebCore::MessagePort::entanglePorts):
2867         * dom/MessagePort.h:
2868         Update interface to take MessagePort vectors by rvalue reference.
2869
2870 2016-10-18  Chris Dumez  <cdumez@apple.com>
2871
2872         [iOS] Drop JSDictionary::convertValue() overload taking a TouchList
2873         https://bugs.webkit.org/show_bug.cgi?id=163620
2874
2875         Reviewed by Sam Weinig.
2876
2877         Drop JSDictionary::convertValue() overload taking a TouchList now that
2878         TouchEvent is using a proper constructor with a TouchEventInit
2879         dictionary on iOS.
2880
2881         * bindings/js/JSDictionary.cpp:
2882
2883 2016-10-18  Dean Jackson  <dino@apple.com>
2884
2885         Remove CSS_SHAPES feature definition. This should always be on.
2886         https://bugs.webkit.org/show_bug.cgi?id=163628
2887         <rdar://problem/28834613>
2888
2889         Reviewed by Tim Horton.
2890
2891         CSS Shapes is in Candidate Recommendation. It's a core part
2892         of CSS. It should always be enabled.
2893
2894         * Configurations/FeatureDefines.xcconfig:
2895         * css/CSSComputedStyleDeclaration.cpp:
2896         (WebCore::shapePropertyValue):
2897         (WebCore::ComputedStyleExtractor::propertyValue):
2898         * css/CSSPropertyNames.in:
2899         * css/CSSValueKeywords.in:
2900         * css/StyleBuilderConverter.h:
2901         (WebCore::StyleBuilderConverter::convertShapeValue):
2902         * css/parser/CSSParser.cpp:
2903         (WebCore::isSimpleLengthPropertyID):
2904         (WebCore::CSSParser::parseValue):
2905         (WebCore::CSSParser::parseShapeProperty):
2906         * css/parser/CSSParser.h:
2907         * inspector/InspectorOverlay.cpp:
2908         (WebCore::buildObjectForShapeOutside):
2909         (WebCore::buildObjectForElementData):
2910         * page/animation/CSSPropertyAnimation.cpp:
2911         (WebCore::blendFunc):
2912         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2913         * rendering/FloatingObjects.cpp:
2914         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
2915         (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
2916         (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
2917         * rendering/RenderBlock.cpp:
2918         * rendering/RenderBlockFlow.cpp:
2919         (WebCore::RenderBlockFlow::positionNewFloats):
2920         * rendering/RenderBox.cpp:
2921         (WebCore::RenderBox::~RenderBox):
2922         (WebCore::RenderBox::styleDidChange):
2923         (WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange):
2924         (WebCore::isCandidateForOpaquenessTest):
2925         (WebCore::RenderBox::imageChanged):
2926         * rendering/RenderBox.h:
2927         (WebCore::RenderBox::markShapeOutsideDependentsForLayout):
2928         * rendering/RenderElement.cpp:
2929         (WebCore::RenderElement::~RenderElement):
2930         (WebCore::RenderElement::updateShapeImage):
2931         (WebCore::RenderElement::initializeStyle):
2932         (WebCore::RenderElement::setStyle):
2933         * rendering/RenderElement.h:
2934         (WebCore::RenderElement::hasShapeOutside):
2935         * rendering/SimpleLineLayout.cpp:
2936         (WebCore::SimpleLineLayout::canUseForWithReason):
2937         * rendering/line/LineWidth.cpp:
2938         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
2939         (WebCore::LineWidth::wrapNextToShapeOutside):
2940         (WebCore::LineWidth::fitBelowFloats):
2941         * rendering/line/LineWidth.h:
2942         * rendering/shapes/ShapeOutsideInfo.cpp:
2943         * rendering/shapes/ShapeOutsideInfo.h:
2944         * rendering/style/RenderStyle.cpp:
2945         (WebCore::RenderStyle::changeRequiresLayout):
2946         (WebCore::RenderStyle::changeRequiresRepaint):
2947         * rendering/style/RenderStyle.h:
2948         (WebCore::RenderStyle::initialShapeImageThreshold):
2949         * rendering/style/ShapeValue.cpp:
2950         * rendering/style/ShapeValue.h:
2951         * rendering/style/StyleRareNonInheritedData.cpp:
2952         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2953         (WebCore::StyleRareNonInheritedData::operator==):
2954         * rendering/style/StyleRareNonInheritedData.h:
2955         * style/StylePendingResources.cpp:
2956         (WebCore::Style::loadPendingResources):
2957
2958 2016-10-18  Chris Dumez  <cdumez@apple.com>
2959
2960         convertDictionary<>() no longer needs to return an Optional<> type
2961         https://bugs.webkit.org/show_bug.cgi?id=163624
2962
2963         Reviewed by Sam Weinig.
2964
2965         convertDictionary<>() no longer needs to return an Optional<> type now
2966         that our dictionary structures are all default constructible after
2967         <https://trac.webkit.org/changeset/206974>.
2968
2969         * bindings/js/JSDOMConvert.h:
2970         * bindings/scripts/CodeGeneratorJS.pm:
2971         (GenerateDictionaryHeaderContent):
2972         (GenerateDictionaryImplementationContent):
2973         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2974         (WebCore::convertDictionary<TestEventConstructor::Init>):
2975         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2976         * bindings/scripts/test/JS/JSTestObj.cpp:
2977         (WebCore::convertDictionary<TestObj::Dictionary>):
2978         (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
2979         (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
2980         (WebCore::convertDictionary<AlternateDictionaryName>):
2981         (WebCore::convertDictionary<TestObj::ParentDictionary>):
2982         (WebCore::convertDictionary<TestObj::ChildDictionary>):
2983         * bindings/scripts/test/JS/JSTestObj.h:
2984         * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
2985         (WebCore::convertDictionary<DictionaryImplName>):
2986         * bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
2987
2988 2016-10-18  Chris Dumez  <cdumez@apple.com>
2989
2990         Leverage new union type support for HTMLSelectElement.add() / HTMLOptionsCollection.add()
2991         https://bugs.webkit.org/show_bug.cgi?id=163608
2992
2993         Reviewed by Ryosuke Niwa.
2994
2995         Leverage new union type support for HTMLSelectElement.add() / HTMLOptionsCollection.add():
2996         - https://html.spec.whatwg.org/#htmlselectelement
2997         - https://html.spec.whatwg.org/#htmloptionscollection
2998
2999         No new tests, rebaseline existing test.
3000
3001         * bindings/scripts/CodeGeneratorJS.pm:
3002         (GenerateDefaultValue):
3003         (GenerateParametersCheck):
3004         * bindings/scripts/test/JS/JSTestObj.cpp:
3005         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyCaller):
3006         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
3007         (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
3008         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3009         (WebCore::jsTestTypedefsPrototypeFunctionFuncCaller):
3010         * html/HTMLOptGroupElement.idl:
3011         * html/HTMLOptionsCollection.cpp:
3012         (WebCore::HTMLOptionsCollection::add):
3013         * html/HTMLOptionsCollection.h:
3014         * html/HTMLOptionsCollection.idl:
3015         * html/HTMLSelectElement.cpp:
3016         (WebCore::HTMLSelectElement::add):
3017         (WebCore::HTMLSelectElement::setOption):
3018         (WebCore::HTMLSelectElement::setLength):
3019         * html/HTMLSelectElement.h:
3020         * html/HTMLSelectElement.idl:
3021
3022 2016-10-18  Aaron Chu  <aaron_chu@apple.com>
3023
3024         Web Inspector: AXI: focused/focusable state should be based on Accessibility Object instead of Element
3025         https://bugs.webkit.org/show_bug.cgi?id=163088
3026         <rdar://problem/16421985>
3027
3028         Reviewed by Darin Adler.
3029
3030         Changed code in InspectDOMAgent so that it determines the focusability of a Node based
3031         on the AccessibilityNodeObject and not the Element class.
3032
3033         Covered by existing tests: 
3034         LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html
3035
3036         * inspector/InspectorDOMAgent.cpp:
3037         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
3038
3039 2016-10-18  Anders Carlsson  <andersca@apple.com>
3040
3041         Get rid of more WebHistoryItem cruft
3042         https://bugs.webkit.org/show_bug.cgi?id=163623
3043
3044         Reviewed by Tim Horton.
3045
3046         * history/HistoryItem.cpp:
3047         (WebCore::HistoryItem::HistoryItem):
3048         * history/HistoryItem.h:
3049         (WebCore::HistoryItem::setViewportArguments):
3050         (WebCore::HistoryItem::bookmarkID): Deleted.
3051         (WebCore::HistoryItem::setBookmarkID): Deleted.
3052         (WebCore::HistoryItem::sharedLinkUniqueIdentifier): Deleted.
3053         (WebCore::HistoryItem::setSharedLinkUniqueIdentifier): Deleted.
3054
3055 2016-10-18  Dave Hyatt  <hyatt@apple.com>
3056
3057         Fix Windows build.
3058  
3059         * css/parser/CSSPropertyParser.cpp:
3060         (WebCore::CSSPropertyParser::parseSingleValue):
3061
3062 2016-10-18  Antoine Quint  <graouts@apple.com>
3063
3064         Modern media controls don't update their rendering correctly
3065         https://bugs.webkit.org/show_bug.cgi?id=163603
3066         <rdar://problem/28826022>
3067
3068         Reviewed by Dean Jackson.
3069
3070         There are rendering issues when we use an absolutely-positioned element
3071         as the top-most element in a media element's shadow root (webkit.org/b/163592).
3072         Since we only need for that element to be positioned, we can use "position: relative"
3073         instead, which removes the rendering issues.
3074
3075         * Modules/modern-media-controls/controls/media-controls.css:
3076         (.media-controls):
3077         (.media-controls,): Deleted.
3078
3079 2016-10-18  Dean Jackson  <dino@apple.com>
3080
3081         Add preliminary support for extended colors to WebCore::Color
3082         https://bugs.webkit.org/show_bug.cgi?id=162878
3083         <rdar://problem/28596413>
3084
3085         Follow-up review comments from Darin Adler.
3086
3087         * html/canvas/CanvasGradient.cpp:
3088         (WebCore::CanvasGradient::addColorStop): Use nullptr.
3089         * platform/graphics/Color.cpp:
3090         (WebCore::Color::Color): Explicitly zero before assigning the pointer.
3091         * platform/graphics/Color.h: Add some comments about the failings of operator== and hash.
3092         (WebCore::Color::Color): Add some static_asserts to the constructors. Move the empty and deleted values
3093         to static constants.
3094         (WebCore::Color::isHashTableDeletedValue):
3095         (WebCore::Color::hash): Replacement for asUint64, which was only being used for a hash.
3096         (WebCore::Color::asUint64): Deleted.
3097         * platform/graphics/ColorHash.h: Use new hash functions. Use "using" instead of typedef.
3098         (WTF::ColorHash::hash):
3099
3100 2016-10-18  Ryosuke Niwa  <rniwa@webkit.org>
3101
3102         REGRESSION (r201471): Keyboard remains visible when swiping back on twitter.com
3103         https://bugs.webkit.org/show_bug.cgi?id=163581
3104         <rdar://problem/27739558>
3105
3106         Reviewed by Simon Fraser.
3107
3108         The bug was caused by Chrome::elementDidBlur not getting called, which resulted in
3109         StopAssistingNode not getting sent to the UI process.
3110
3111         Test: fast/forms/ios/hide-keyboard-on-node-removal.html
3112
3113         * dom/Document.cpp:
3114         (WebCore::Document::setFocusedElement): Restore the behavior prior to r201471 by calling
3115         Chrome::elementDidBlur explicitly.
3116         * html/HTMLTextFormControlElement.cpp:
3117         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent): Added a comment about ordering.
3118
3119 2016-10-17  Anders Carlsson  <andersca@apple.com>
3120
3121         Move some history specific HistoryItem code to WebHistoryItem
3122         https://bugs.webkit.org/show_bug.cgi?id=163567
3123
3124         Reviewed by Tim Horton.
3125
3126         * history/HistoryItem.cpp:
3127         (WebCore::HistoryItem::addRedirectURL): Deleted.
3128         (WebCore::HistoryItem::redirectURLs): Deleted.
3129         (WebCore::HistoryItem::setRedirectURLs): Deleted.
3130         * history/HistoryItem.h:
3131
3132 2016-10-18  Dave Hyatt  <hyatt@apple.com>
3133
3134         [CSS Parser] Get all the properties turned on
3135         https://bugs.webkit.org/show_bug.cgi?id=163605
3136
3137         Reviewed by Dean Jackson.
3138
3139         * WebCore.xcodeproj/project.pbxproj:
3140         * css/CSSFunctionValue.h:
3141         * css/CSSPendingSubstitutionValue.cpp: Added.
3142         (WebCore::CSSPendingSubstitutionValue::customCSSText):
3143         * css/CSSPendingSubstitutionValue.h: Added.
3144         (WebCore::CSSPendingSubstitutionValue::create):
3145         (WebCore::CSSPendingSubstitutionValue::shorthandValue):
3146         (WebCore::CSSPendingSubstitutionValue::shorthandPropertyId):
3147         (WebCore::CSSPendingSubstitutionValue::equals):
3148         (WebCore::CSSPendingSubstitutionValue::CSSPendingSubstitutionValue):
3149         * css/CSSValue.cpp:
3150         (WebCore::CSSValue::cssText):
3151         (WebCore::CSSValue::destroy):
3152         * css/CSSValue.h:
3153         (WebCore::CSSValue::isPendingSubstitutionValue):
3154         * css/CSSValueKeywords.in:
3155         * css/StylePropertyShorthand.cpp:
3156         (WebCore::transitionShorthandForParsing):
3157         * css/StylePropertyShorthand.h:
3158         * css/parser/CSSParser.cpp:
3159         (WebCore::CSSParser::completeURL):
3160         * css/parser/CSSParserImpl.cpp:
3161         (WebCore::CSSParserImpl::parseValue):
3162         (WebCore::CSSParserImpl::consumeDeclaration):
3163         (WebCore::CSSParserImpl::consumeDeclarationValue):
3164         * css/parser/CSSParserMode.h:
3165         (WebCore::CSSParserContext::completeURL):
3166         * css/parser/CSSParserToken.cpp:
3167         (WebCore::CSSParserToken::parseAsCSSPropertyID):
3168         (WebCore::CSSParserToken::parseAsUnresolvedCSSPropertyID): Deleted.
3169         * css/parser/CSSParserToken.h:
3170         * css/parser/CSSPropertyParser.cpp:
3171         (WebCore::cssPropertyID):
3172         (WebCore::CSSPropertyParser::addProperty):
3173         (WebCore::CSSPropertyParser::addExpandedPropertyForValue):
3174         (WebCore::CSSPropertyParser::parseValue):
3175         (WebCore::CSSPropertyParser::parseSingleValue):
3176         (WebCore::CSSPropertyParser::parseValueStart):
3177         (WebCore::CSSPropertyParser::consumeCSSWideKeyword):
3178         (WebCore::consumeTransformOrigin):
3179         (WebCore::consumeWillChange):
3180         (WebCore::consumeFontFeatureTag):
3181         (WebCore::consumeFontFeatureSettings):
3182         (WebCore::consumePage):
3183         (WebCore::consumeQuotes):
3184         (WebCore::FontVariantLigaturesParser::consumeLigature):
3185         (WebCore::FontVariantLigaturesParser::finalizeValue):
3186         (WebCore::consumeFontVariantLigatures):
3187         (WebCore::consumeFontVariantCaps):
3188         (WebCore::FontVariantNumericParser::consumeNumeric):
3189         (WebCore::FontVariantNumericParser::finalizeValue):
3190         (WebCore::consumeFontVariantNumeric):
3191         (WebCore::consumeFontVariantCSS21):
3192         (WebCore::consumeFontVariantList):
3193         (WebCore::consumeFontWeight):
3194         (WebCore::consumeFamilyName):
3195         (WebCore::consumeGenericFamily):
3196         (WebCore::consumeFontFamily):
3197         (WebCore::consumeSpacing):
3198         (WebCore::consumeTabSize):
3199         (WebCore::consumeTextSizeAdjust):
3200         (WebCore::consumeFontSize):
3201         (WebCore::consumeLineHeight):
3202         (WebCore::createPrimitiveValuePair):
3203         (WebCore::consumeCounter):
3204         (WebCore::consumePageSize):
3205         (WebCore::consumeSize):
3206         (WebCore::consumeTextIndent):
3207         (WebCore::validWidthOrHeightKeyword):
3208         (WebCore::consumeMaxWidthOrHeight):
3209         (WebCore::consumeWidthOrHeight):
3210         (WebCore::consumeMarginOrOffset):
3211         (WebCore::consumeClipComponent):
3212         (WebCore::consumeClip):
3213         (WebCore::consumeTouchAction):
3214         (WebCore::consumeLineClamp):
3215         (WebCore::consumeLocale):
3216         (WebCore::consumeColumnWidth):
3217         (WebCore::consumeColumnCount):
3218         (WebCore::consumeColumnGap):
3219         (WebCore::consumeColumnSpan):
3220         (WebCore::consumeZoom):
3221         (WebCore::consumeAnimationIterationCount):
3222         (WebCore::consumeAnimationName):
3223         (WebCore::consumeTransitionProperty):
3224         (WebCore::consumeCubicBezier):
3225         (WebCore::consumeAnimationTimingFunction):
3226         (WebCore::consumeAnimationValue):
3227         (WebCore::isValidAnimationPropertyList):
3228         (WebCore::consumeAnimationPropertyList):
3229         (WebCore::CSSPropertyParser::consumeAnimationShorthand):
3230         (WebCore::consumeZIndex):
3231         (WebCore::parseSingleShadow):
3232         (WebCore::consumeShadow):
3233         (WebCore::consumeFilterFunction):
3234         (WebCore::consumeFilter):
3235         (WebCore::consumeTextDecorationLine):
3236         (WebCore::consumeTextEmphasisStyle):
3237         (WebCore::consumeOutlineColor):
3238         (WebCore::consumeLineWidth):
3239         (WebCore::consumeBorderWidth):
3240         (WebCore::consumeTextStrokeWidth):
3241         (WebCore::consumeColumnRuleWidth):
3242         (WebCore::consumeTranslate3d):
3243         (WebCore::consumeNumbers):
3244         (WebCore::consumePerspective):
3245         (WebCore::consumeTransformValue):
3246         (WebCore::consumeTransform):
3247         (WebCore::consumePositionLonghand):
3248         (WebCore::consumePositionX):
3249         (WebCore::consumePositionY):
3250         (WebCore::consumePaintStroke):
3251         (WebCore::consumePaintOrder):
3252         (WebCore::consumeNoneOrURI):
3253         (WebCore::consumeFlexBasis):
3254         (WebCore::consumeStrokeDasharray):
3255         (WebCore::consumeBaselineShift):
3256         (WebCore::consumeRxOrRy):
3257         (WebCore::consumeCursor):
3258         (WebCore::consumeAttr):
3259         (WebCore::consumeCounterContent):
3260         (WebCore::consumeContent):
3261         (WebCore::consumePositionList):
3262         (WebCore::consumeScrollSnapCoordinate):
3263         (WebCore::consumeScrollSnapPoints):
3264         (WebCore::consumeBorderRadiusCorner):
3265         (WebCore::consumeVerticalAlign):
3266         (WebCore::consumeShapeRadius):
3267         (WebCore::consumeBasicShapeCircle):
3268         (WebCore::consumeBasicShapeEllipse):
3269         (WebCore::consumeBasicShapePolygon):
3270         (WebCore::complete4Sides):
3271         (WebCore::consumeRadii):
3272         (WebCore::consumeBasicShapeInset):
3273         (WebCore::consumeBasicShape):
3274         (WebCore::consumeWebkitClipPath):
3275         (WebCore::consumeShapeOutside):
3276         (WebCore::consumeContentDistributionOverflowPosition):
3277         (WebCore::consumeBorderImageRepeatKeyword):
3278         (WebCore::consumeBorderImageRepeat):
3279         (WebCore::consumeBorderImageSlice):
3280         (WebCore::consumeBorderImageOutset):
3281         (WebCore::consumeBorderImageWidth):
3282         (WebCore::consumeBorderImageComponents):
3283         (WebCore::consumeWebkitBorderImage):
3284         (WebCore::consumeReflect):
3285         (WebCore::consumeImageOrientation):
3286         (WebCore::consumeBackgroundBlendMode):
3287         (WebCore::consumeBackgroundAttachment):
3288         (WebCore::consumeBackgroundBox):
3289         (WebCore::consumeBackgroundComposite):
3290         (WebCore::consumePrefixedBackgroundBox):
3291         (WebCore::consumeBackgroundSize):
3292         (WebCore::consumeGridAutoFlow):
3293         (WebCore::consumeBackgroundComponent):
3294         (WebCore::addBackgroundValue):
3295         (WebCore::consumeCommaSeparatedBackgroundComponent):
3296         (WebCore::consumeSelfPositionKeyword):
3297         (WebCore::consumeSelfPositionOverflowPosition):
3298         (WebCore::consumeAlignItems):
3299         (WebCore::consumeJustifyItems):
3300         (WebCore::consumeFitContent):
3301         (WebCore::consumeCustomIdentForGridLine):
3302         (WebCore::consumeGridLine):
3303         (WebCore::isGridTrackFixedSized):
3304         (WebCore::consumeGridBreadth):
3305         (WebCore::consumeGridTrackSize):
3306         (WebCore::consumeGridLineNames):
3307         (WebCore::consumeGridTrackRepeatFunction):
3308         (WebCore::consumeGridTrackList):
3309         (WebCore::consumeGridTemplatesRowsOrColumns):
3310         (WebCore::consumeGridTemplateAreas):
3311         (WebCore::consumeFontFaceUnicodeRange):
3312         (WebCore::consumeFontFaceSrcURI):
3313         (WebCore::consumeFontFaceSrcLocal):
3314         (WebCore::consumeFontFaceSrc):
3315         (WebCore::CSSPropertyParser::parseFontFaceDescriptor):
3316         (WebCore::CSSPropertyParser::consumeSystemFont):
3317         (WebCore::CSSPropertyParser::consumeFont):
3318         (WebCore::CSSPropertyParser::consumeFontVariantShorthand):
3319         (WebCore::CSSPropertyParser::consumeBorderSpacing):
3320         (WebCore::consumeSingleViewportDescriptor):
3321         (WebCore::CSSPropertyParser::parseViewportDescriptor):
3322         (WebCore::consumeColumnWidthOrCount):
3323         (WebCore::CSSPropertyParser::consumeColumns):
3324         (WebCore::CSSPropertyParser::consumeShorthandGreedily):
3325         (WebCore::CSSPropertyParser::consumeFlex):
3326         (WebCore::CSSPropertyParser::consumeBorder):
3327         (WebCore::CSSPropertyParser::consume4Values):
3328         (WebCore::CSSPropertyParser::consumeBorderImage):
3329         (WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
3330         (WebCore::consumeBackgroundPosition):
3331         (WebCore::consumeRepeatStyleComponent):
3332         (WebCore::consumeRepeatStyle):
3333         (WebCore::CSSPropertyParser::consumeBackgroundShorthand):
3334         (WebCore::CSSPropertyParser::consumeGridItemPositionShorthand):
3335         (WebCore::CSSPropertyParser::consumeGridAreaShorthand):
3336         (WebCore::CSSPropertyParser::consumeGridTemplateRowsAndAreasAndColumns):
3337         (WebCore::CSSPropertyParser::consumeGridTemplateShorthand):
3338         (WebCore::CSSPropertyParser::consumeGridShorthand):
3339         (WebCore::CSSPropertyParser::parseShorthand):
3340         (WebCore::unresolvedCSSPropertyID): Deleted.
3341         * css/parser/CSSPropertyParser.h:
3342         * css/parser/CSSPropertyParserHelpers.cpp:
3343         (WebCore::CSSPropertyParserHelpers::consumeIdent):
3344         (WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
3345         (WebCore::CSSPropertyParserHelpers::consumeString):
3346         (WebCore::CSSPropertyParserHelpers::consumeImageSet):
3347         * css/parser/CSSPropertyParserHelpers.h:
3348
3349 2016-10-18  Brent Fulgham  <bfulgham@apple.com>
3350
3351         Correct Document::removeAllEventListeners
3352         https://bugs.webkit.org/show_bug.cgi?id=163558
3353         <rdar://problem/28716840>
3354
3355         Reviewed by Chris Dumez.
3356
3357         Tested by fast/dom/node-move-to-new-document-crash-main.html.
3358
3359         * dom/Document.cpp:
3360         (WebCore::Document::removeAllEventListeners): Clear out the wheel and
3361         touch event targets when clearing all data.
3362
3363 2016-10-18  Dean Jackson  <dino@apple.com>
3364
3365         Remove dependency cycle with UIKit
3366         https://bugs.webkit.org/show_bug.cgi?id=163577
3367         <rdar://problem/28786160>
3368
3369         Reviewed by Tim Horton.
3370
3371         Soft link against UIKit. Followup patch because
3372         I screwed up and forgot to edit the simulator
3373         configuration.
3374
3375         * Configurations/WebCoreTestSupport.xcconfig:
3376
3377 2016-10-18  Said Abou-Hallawa  <sabouhallawa@apple.com>
3378
3379         SVGCSSParser: m_implicitShorthand value is not reset after adding the shorthand property
3380         https://bugs.webkit.org/show_bug.cgi?id=116470
3381
3382         Reviewed by Simon Fraser.
3383
3384         When we encounter a shorthand css property, we set m_implicitShorthand
3385         to true to tell addProperty() later that the individual properties are
3386         all set through a short hand one. We need to make sure that setting 
3387         m_implicitShorthand to true will not be leaked after finishing parsing
3388         the short hand property.
3389
3390         Test: fast/css/implicit-property-restore.html
3391
3392         * css/parser/CSSParser.cpp:
3393         (WebCore::CSSParser::parseValue):
3394         (WebCore::CSSParser::parseFillShorthand):
3395         (WebCore::CSSParser::parseShorthand):
3396         (WebCore::CSSParser::parse4Values):
3397         (WebCore::CSSParser::parseBorderRadius):
3398         (WTF::ImplicitScope::ImplicitScope): Deleted.
3399         (WTF::ImplicitScope::~ImplicitScope): Deleted.
3400         Get rid of ImplicitScope and replace its calls by TemporaryChange<bool>.
3401         
3402         * css/parser/SVGCSSParser.cpp:
3403         (WebCore::CSSParser::parseSVGValue):
3404         Restore m_implicitShorthand value after setting it temporarily to true.
3405
3406 2016-10-18  Chris Dumez  <cdumez@apple.com>
3407
3408         Update TrackEvent to stop using legacy [ConstructorTemplate=Event]
3409         https://bugs.webkit.org/show_bug.cgi?id=163580
3410
3411         Reviewed by Sam Weinig.
3412
3413         Update TrackEvent to stop using legacy [ConstructorTemplate=Event]
3414         and use a regular constructor as in the specification:
3415         - https://html.spec.whatwg.org/#the-trackevent-interface
3416
3417         No new tests, updated existing tests.
3418
3419         * html/track/TrackEvent.cpp:
3420         (WebCore::TrackEvent::TrackEvent):
3421         * html/track/TrackEvent.h:
3422         * html/track/TrackEvent.idl:
3423
3424 2016-10-18  Commit Queue  <commit-queue@webkit.org>
3425
3426         Unreviewed, rolling out r207409.
3427         https://bugs.webkit.org/show_bug.cgi?id=163602
3428
3429         Introduced many test failures and timeouts, causing release
3430         bot to exit early (Requested by mcatanzaro on #webkit).
3431
3432         Reverted changeset:
3433
3434         "[GTK] Several tests crashing on debug bot in (anonymous
3435         namespace)::MediaPlayerPrivateGStreamerBase::repaint"
3436         https://bugs.webkit.org/show_bug.cgi?id=163511
3437         http://trac.webkit.org/changeset/207409
3438
3439 2016-10-18  Eric Carlson  <eric.carlson@apple.com>
3440
3441         [MediaStream] Resolve constraints and enumerate devices in the UI process
3442         https://bugs.webkit.org/show_bug.cgi?id=162147
3443         <rdar://problem/28803569>
3444
3445         Reviewed by Darin Adler.
3446
3447         Restructure gUM constraint validation and MediaDevices.enumerateDevices so all media device
3448         access happens in the UI process.
3449
3450         No new tests, updated results of existing tests.
3451
3452         * CMakeLists.txt: Add MediaDevicesEnumerationRequest.cpp, delete UserMediaPermissionCheck.cpp.
3453
3454         * Modules/mediastream/MediaConstraintsImpl.cpp:
3455         (WebCore::MediaConstraintsImpl::create): Only create from MediaConstraintsData.
3456         (WebCore::MediaConstraintsImpl::initialize): Deleted.
3457         * Modules/mediastream/MediaConstraintsImpl.h:
3458
3459         * Modules/mediastream/MediaDevicesEnumerationRequest.cpp: Added.
3460         (WebCore::MediaDevicesEnumerationRequest::create):
3461         (WebCore::MediaDevicesEnumerationRequest::MediaDevicesEnumerationRequest):
3462         (WebCore::MediaDevicesEnumerationRequest::~MediaDevicesEnumerationRequest):
3463         (WebCore::MediaDevicesEnumerationRequest::userMediaDocumentOrigin):
3464         (WebCore::MediaDevicesEnumerationRequest::topLevelDocumentOrigin):
3465         (WebCore::MediaDevicesEnumerationRequest::contextDestroyed):
3466         (WebCore::MediaDevicesEnumerationRequest::start):
3467         (WebCore::MediaDevicesEnumerationRequest::cancel):
3468         (WebCore::MediaDevicesEnumerationRequest::setDeviceInfo):
3469         (WebCore::MediaDevicesEnumerationRequest::finish):
3470         * Modules/mediastream/MediaDevicesEnumerationRequest.h: Added.
3471
3472         * Modules/mediastream/MediaDevicesRequest.cpp:
3473         (WebCore::MediaDevicesRequest::~MediaDevicesRequest): Clear the enumeration request.
3474         (WebCore::MediaDevicesRequest::contextDestroyed): Ditto.
3475         (WebCore::MediaDevicesRequest::start): Create and use a MediaDevicesEnumerationRequest.
3476         (WebCore::MediaDevicesRequest::didCompletePermissionCheck): Deleted.
3477         * Modules/mediastream/MediaDevicesRequest.h:
3478
3479         * Modules/mediastream/UserMediaClient.h:
3480         * Modules/mediastream/UserMediaController.h:
3481         (WebCore::UserMediaController::enumerateMediaDevices): New.
3482         (WebCore::UserMediaController::cancelMediaDevicesEnumerationRequest): New.
3483         (WebCore::UserMediaController::checkUserMediaPermission): Deleted.
3484         (WebCore::UserMediaController::cancelUserMediaPermissionCheck): Deleted.
3485
3486         * Modules/mediastream/UserMediaPermissionCheck.h: Deleted.
3487         * Modules/mediastream/UserMediaPermissionCheck.cpp: Deleted.
3488
3489         * Modules/mediastream/UserMediaRequest.cpp:
3490         (WebCore::UserMediaRequest::UserMediaRequest):
3491         (WebCore::UserMediaRequest::start):
3492         (WebCore::UserMediaRequest::allow):
3493         (WebCore::UserMediaRequest::deny):
3494         (WebCore::UserMediaRequest::constraintsValidated): Deleted.
3495         (WebCore::UserMediaRequest::userMediaAccessGranted): Deleted.
3496         (WebCore::UserMediaRequest::userMediaAccessDenied): Deleted.
3497         (WebCore::UserMediaRequest::constraintsInvalid): Deleted.
3498         (WebCore::UserMediaRequest::didCreateStream): Deleted.
3499         (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Deleted.
3500         (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Deleted.
3501         * Modules/mediastream/UserMediaRequest.h:
3502
3503         * WebCore.xcodeproj/project.pbxproj: Add MediaDevicesEnumerationRequest.*.
3504
3505         * platform/mediastream/CaptureDevice.h:
3506         (WebCore::CaptureDevice::CaptureDevice):
3507         (WebCore::CaptureDevice::setPersistentId): Add setter for argument decoder.
3508         (WebCore::CaptureDevice::setLabel): Ditto.
3509         (WebCore::CaptureDevice::setGroupId): Ditto.
3510         (WebCore::CaptureDevice::setKind): Ditto.
3511
3512         * platform/mediastream/CaptureDeviceManager.h: Remove unnecessary include.
3513
3514         * platform/mediastream/MediaConstraints.h:
3515         (WebCore::MediaConstraint::encode): New.
3516         (WebCore::MediaConstraint::decode): Ditto.
3517         (WebCore::NumericConstraint::encode): Ditto.
3518         (WebCore::NumericConstraint::decode): Ditto.
3519
3520         * platform/mediastream/MediaStreamCreationClient.h: Deleted.
3521
3522         * platform/mediastream/RealtimeMediaSourceCenter.h: Use completion handlers instead of client interface.
3523
3524         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
3525         (WebCore::AVCaptureDeviceManager::refreshCaptureDeviceList): Drive-by fix: don't initialize
3526         group id, we don't support it.
3527
3528         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
3529         (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints): Update for interface change.
3530         (WebCore::RealtimeMediaSourceCenterMac::createMediaStream): Ditto.
3531         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
3532
3533         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
3534         (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints): Ditto.
3535         (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Ditto.
3536         (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable): Ditto.
3537         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
3538
3539         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
3540         (WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints): Ditto.
3541         (WebCore::MockRealtimeMediaSourceCenter::createMediaStream): Ditto.
3542         * platform/mock/MockRealtimeMediaSourceCenter.h:
3543
3544 2016-10-18  Zan Dobersek  <zdobersek@igalia.com>
3545
3546         [WebIDL] Support BufferSource
3547         https://bugs.webkit.org/show_bug.cgi?id=163541
3548
3549         Reviewed by Youenn Fablet.
3550
3551         Add support for the BufferSource typedef in WebIDL. The implementation
3552         adds the necessary handling for this type in the generator scripts and
3553         the specialization of the Converter<> template for the IDLBufferSource
3554         struct that enables exposing ArrayBuffer or ArrayBufferView objects by
3555         having WebCore::BufferSource objects pointing to their data.
3556
3557         The SourceBuffer interface in the MSE module has the appendBuffer()
3558         operation modified to accept a BufferSource parameter, instead of
3559         overloading it for ArrayBuffer and ArrayBufferView parameters.
3560
3561         The bindings generator tests cover BufferSource as both an operation
3562         parameter and as a dictionary member.
3563
3564         * Modules/mediasource/SourceBuffer.cpp:
3565         (WebCore::SourceBuffer::appendBuffer):
3566         (WebCore::SourceBuffer::appendBufferInternal):
3567         * Modules/mediasource/SourceBuffer.h:
3568         * Modules/mediasource/SourceBuffer.idl:
3569         * WebCore.xcodeproj/project.pbxproj:
3570         * bindings/generic/IDLTypes.h:
3571         * bindings/js/BufferSource.h: Added.
3572         * bindings/js/JSDOMConvert.h:
3573         (WebCore::Converter<IDLBufferSource>::convert):
3574         * bindings/scripts/CodeGenerator.pm:
3575         (SkipIncludeHeader):
3576         (IsWrapperType):
3577         * bindings/scripts/CodeGeneratorJS.pm:
3578         (AddClassForwardIfNeeded):
3579         (GetBaseIDLType):
3580         (IsHandledByDOMConvert):
3581         * bindings/scripts/test/JS/JSTestObj.cpp:
3582         (WebCore::convertDictionary<TestObj::Dictionary>):
3583         (WebCore::jsTestObjPrototypeFunctionBufferSourceParameter):
3584         (WebCore::jsTestObjPrototypeFunctionBufferSourceParameterCaller):
3585         * bindings/scripts/test/TestObj.idl:
3586
3587 2016-10-18  Javier Fernandez  <jfernandez@igalia.com>
3588
3589         [css-grid] Different width of grid container between initial load and refresh
3590         https://bugs.webkit.org/show_bug.cgi?id=163535
3591
3592         Reviewed by Manuel Rego Casasnovas.
3593
3594         Grid's layout logic manages two different override sizes; one it's
3595         designed to implement the grid item's stretching behavior, identified
3596         with the concept of 'overrideContentLogicalSize'; there is another
3597         override size, known as overrideContainingBlockContentLogicalSize,
3598         used to implement the Grid Area abstraction, which will behave as
3599         the actual containing block of any grid item.
3600
3601         During grid's layout logic these override sizes are set according
3602         to the CSS style rules. This affects how the grid container and its
3603         children are going to be sized during layout. Grid Tracks sizing
3604         algorithm depends on these override sizes.
3605
3606         In order to ensure that the tracks sizing algorithm produces the
3607         same results when it's run consecutively several times, we need to
3608         clear these override sizes and perform a layout of the affected grid
3609         items. Otherwise, the affected items will return sizing values which
3610         depend on the override values set in the previous layout, which in
3611         some cases, like orthogonal flows, may change through different runs
3612         of the sizing algorithm.
3613
3614         Test: fast/css-grid-layout/repeating-layout-must-produce-the-same-results.html
3615
3616         * rendering/RenderGrid.cpp:
3617         (WebCore::RenderGrid::layoutBlock):
3618
3619 2016-10-18  Youenn Fablet  <youenn@apple.com>
3620
3621         CachedResourceLoader should not need to remove fragment identifier
3622         https://bugs.webkit.org/show_bug.cgi?id=163015
3623
3624         Reviewed by Darin Adler.
3625
3626         No expected change for non-window port.
3627         For window port, CachedResourceLoader will strip the fragment identifier of the URL passed to subresourceForURL
3628         before querying the memory cache.
3629
3630         Removing the fragment identifier from the request stored in CachedResourceRequest.
3631         The fragment identifier is stored in a separate field.
3632
3633         This allows CachedResourceLoader to not care about fragment identifier.
3634         CachedResource can then get access to it.
3635
3636         * loader/cache/CachedResource.cpp:
3637         (WebCore::CachedResource::CachedResource):
3638         (WebCore::CachedResource::finishRequestInitialization): Deleted.
3639         * loader/cache/CachedResource.h:
3640         * loader/cache/CachedResourceLoader.cpp:
3641         (WebCore::CachedResourceLoader::cachedResource):
3642         Updated the method taking a const String& to strip the fragment identifier if needed.
3643         Updated the method taking a const URL& to assert if the fragment identifier is present.
3644         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
3645         (WebCore::CachedResourceLoader::requestResource):
3646         * loader/cache/CachedResourceRequest.cpp:
3647         (WebCore::CachedResourceRequest::CachedResourceRequest):
3648         (WebCore::CachedResourceRequest::splitFragmentIdentifierFromRequestURL):
3649         * loader/cache/CachedResourceRequest.h:
3650         (WebCore::CachedResourceRequest::releaseFragmentIdentifier):
3651         (WebCore::CachedResourceRequest::clearFragmentIdentifier):
3652         * loader/cache/MemoryCache.cpp:
3653         (WebCore::MemoryCache::shouldRemoveFragmentIdentifier):
3654         (WebCore::MemoryCache::removeFragmentIdentifierIfNeeded):
3655         (WebCore::MemoryCache::revalidationSucceeded):
3656         (WebCore::MemoryCache::resourceForRequest):
3657         * loader/cache/MemoryCache.h:
3658
3659 2016-10-18  Antti Koivisto  <antti@apple.com>
3660
3661         Rename setNeedsStyleRecalc to invalidateStyle
3662         https://bugs.webkit.org/show_bug.cgi?id=163542
3663
3664         Reviewed by Darin Adler.
3665
3666         Also rename StyleChangeType enum and some related functions for clarity. For example
3667
3668             element.setNeedsStyleRecalc(SyntheticStyleChange);
3669
3670         becomes
3671
3672             element.invalidateStyleAndLayerComposition();
3673
3674         * WebCore.xcodeproj/project.pbxproj:
3675         * css/StyleInvalidationAnalysis.cpp:
3676         (WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):
3677         * dom/Document.cpp:
3678         (WebCore::Document::recalcStyle):
3679         (WebCore::Document::updateViewportUnitsOnResize):
3680         (WebCore::Document::setCSSTarget):
3681         (WebCore::unwrapFullScreenRenderer):
3682         (WebCore::Document::setAnimatingFullScreen):
3683         * dom/Element.cpp:
3684         (WebCore::Element::setActive):
3685         (WebCore::Element::setFocus):
3686         (WebCore::Element::setHovered):
3687         (WebCore::Element::attributeChanged):
3688         (WebCore::Element::invalidateStyle):
3689         (WebCore::Element::invalidateStyleAndLayerComposition):
3690         (WebCore::Element::invalidateStyleForSubtree):
3691         (WebCore::Element::invalidateStyleAndRenderersForSubtree):
3692
3693             Move public invalidation functions to Element tightening typing.
3694             Use separate functions instead of enum values.
3695             This way the call sites look nicer and only useful combinations are exposed.
3696
3697         (WebCore::Element::addShadowRoot):
3698         (WebCore::checkForEmptyStyleChange):
3699         (WebCore::checkForSiblingStyleChanges):
3700         (WebCore::Element::needsStyleInvalidation):
3701         (WebCore::Element::setContainsFullScreenElement):
3702         * dom/Element.h:
3703         (WebCore::Element::setHasFocusWithin):
3704         * dom/Node.cpp:
3705         (WebCore::computeEditabilityFromComputedStyle):
3706         (WebCore::Node::adjustStyleValidity):
3707
3708             Update validity and mode separately. There was a potential bug here where
3709             SyntheticStyleChange could overwrite FullStyleChange (no known repro).
3710
3711         (WebCore::Node::updateAncestorsForStyleRecalc):
3712         (WebCore::Node::invalidateStyle):
3713         (WebCore::Node::insertedInto):
3714         (WebCore::Node::setNeedsStyleRecalc): Deleted.
3715         * dom/Node.h:
3716         (WebCore::Node::needsStyleRecalc):
3717         (WebCore::Node::styleValidity):
3718         (WebCore::Node::styleResolutionShouldRecompositeLayer):
3719         (WebCore::Node::setHasValidStyle):
3720         (WebCore::Node::styleChangeType): Deleted.
3721         (WebCore::Node::clearNeedsStyleRecalc): Deleted.
3722         (WebCore::Node::setStyleChange): Deleted.
3723         * dom/RadioButtonGroups.cpp:
3724         (WebCore::RadioButtonGroup::remove):
3725         (WebCore::RadioButtonGroup::setNeedsStyleRecalcForAllButtons):
3726         * dom/ShadowRoot.cpp:
3727         (WebCore::ShadowRoot::setResetStyleInheritance):
3728         * dom/SlotAssignment.cpp:
3729         (WebCore::SlotAssignment::addSlotElementByName):
3730         (WebCore::SlotAssignment::removeSlotElementByName):
3731         (WebCore::SlotAssignment::didChangeSlot):
3732         * dom/StyledElement.cpp:
3733         (WebCore::StyledElement::attributeChanged):
3734         (WebCore::StyledElement::styleAttributeChanged):
3735         (WebCore::StyledElement::invalidateStyleAttribute):
3736         * dom/Text.cpp:
3737         (WebCore::Text::updateRendererAfterContentChange):
3738         * dom/VisitedLinkState.cpp:
3739         (WebCore::VisitedLinkState::invalidateStyleForAllLinks):
3740         (WebCore::VisitedLinkState::invalidateStyleForLink):
3741         * editing/FrameSelection.cpp:
3742         (WebCore::FrameSelection::focusedOrActiveStateChanged):
3743         * html/BaseDateAndTimeInputType.cpp:
3744         (WebCore::BaseDateAndTimeInputType::minOrMaxAttributeChanged):
3745         * html/FileInputType.cpp:
3746         (WebCore::FileInputType::setValue):
3747         * html/HTMLAnchorElement.cpp:
3748         (WebCore::HTMLAnchorElement::parseAttribute):
3749         * html/HTMLBodyElement.cpp:
3750         (WebCore::HTMLBodyElement::parseAttribute):
3751         * html/HTMLCanvasElement.cpp:
3752         (WebCore::HTMLCanvasElement::getContext):
3753         (WebCore::HTMLCanvasElement::createImageBuffer):
3754         * html/HTMLElement.cpp:
3755         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
3756         (WebCore::HTMLElement::calculateAndAdjustDirectionality):
3757         * html/HTMLFieldSetElement.cpp:
3758         (WebCore::HTMLFieldSetElement::addInvalidDescendant):
3759         (WebCore::HTMLFieldSetElement::removeInvalidDescendant):
3760         * html/HTMLFormControlElement.cpp:
3761         (WebCore::HTMLFormControlElement::disabledStateChanged):
3762         (WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
3763         (WebCore::HTMLFormControlElement::requiredAttributeChanged):
3764         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
3765         (WebCore::HTMLFormControlElement::updateValidity):
3766         * html/HTMLFormElement.cpp:
3767         (WebCore::HTMLFormElement::registerFormElement):
3768         (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
3769         (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
3770         (WebCore::HTMLFormElement::resetDefaultButton):
3771         * html/HTMLFrameElementBase.cpp:
3772         (WebCore::HTMLFrameElementBase::finishedInsertingSubtree):
3773         * html/HTMLFrameOwnerElement.cpp:
3774         (WebCore::HTMLFrameOwnerElement::scheduleinvalidateStyleAndLayerComposition):
3775         (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Deleted.
3776         * html/HTMLFrameOwnerElement.h:
3777         * html/HTMLFrameSetElement.cpp:
3778         (WebCore::HTMLFrameSetElement::parseAttribute):
3779         (WebCore::HTMLFrameSetElement::willRecalcStyle):
3780         * html/HTMLInputElement.cpp:
3781         (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
3782         (WebCore::HTMLInputElement::parseAttribute):
3783         (WebCore::HTMLInputElement::setChecked):
3784         (WebCore::HTMLInputElement::setIndeterminate):
3785         (WebCore::HTMLInputElement::setAutoFilled):
3786         (WebCore::HTMLInputElement::maxLengthAttributeChanged):
3787         (WebCore::HTMLInputElement::minLengthAttributeChanged):
3788         * html/HTMLLinkElement.cpp:
3789         (WebCore::HTMLLinkElement::parseAttribute):
3790         * html/HTMLMediaElement.cpp:
3791         (WebCore::HTMLMediaElement::mediaPlayerRenderingModeChanged):
3792         (WebCore::HTMLMediaElement::setVideoFullscreenLayer):
3793         * html/HTMLObjectElement.cpp:
3794         (WebCore::HTMLObjectElement::parseAttribute):
3795         (WebCore::HTMLObjectElement::childrenChanged):
3796         (WebCore::HTMLObjectElement::renderFallbackContent):
3797         * html/HTMLOptGroupElement.cpp:
3798         (WebCore::HTMLOptGroupElement::parseAttribute):
3799         * html/HTMLOptionElement.cpp:
3800         (WebCore::HTMLOptionElement::parseAttribute):
3801         (WebCore::HTMLOptionElement::setSelectedState):
3802         * html/HTMLPlugInElement.cpp:
3803         (WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot):
3804         * html/HTMLPlugInImageElement.cpp:
3805         (WebCore::HTMLPlugInImageElement::setDisplayState):
3806         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
3807         (WebCore::HTMLPlugInImageElement::finishParsingChildren):
3808         (WebCore::HTMLPlugInImageElement::resumeFromDocumentSuspension):
3809         (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
3810         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
3811         * html/HTMLProgressElement.cpp:
3812         (WebCore::HTMLProgressElement::didElementStateChange):
3813         * html/HTMLSelectElement.cpp:
3814         (WebCore::HTMLSelectElement::parseAttribute):
3815         (WebCore::HTMLSelectElement::setRecalcListItems):
3816         (WebCore::HTMLSelectElement::parseMultipleAttribute):
3817         (WebCore::HTMLSelectElement::reset):
3818         * html/HTMLTableElement.cpp:
3819         (WebCore::isTableCellAncestor):
3820         (WebCore::setTableCellsChanged):
3821         (WebCore::HTMLTableElement::parseAttribute):
3822         * html/HTMLTextAreaElement.cpp:
3823         (WebCore::HTMLTextAreaElement::setValueCommon):
3824         * html/HTMLTextFormControlElement.cpp:
3825         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
3826         * html/InputType.cpp:
3827         (WebCore::InputType::setValue):
3828         * html/NumberInputType.cpp:
3829         (WebCore::NumberInputType::minOrMaxAttributeChanged):
3830         * html/TextFieldInputType.cpp:
3831         (WebCore::TextFieldInputType::subtreeHasChanged):
3832         * mathml/MathMLElement.cpp:
3833         (WebCore::MathMLElement::parseAttribute):
3834         * mathml/MathMLSelectElement.cpp:
3835         (WebCore::MathMLSelectElement::updateSelectedChild):
3836         * page/animation/AnimationBase.cpp:
3837         (WebCore::AnimationBase::setNeedsStyleRecalc):
3838         * page/animation/AnimationController.cpp:
3839         (WebCore::AnimationControllerPrivate::clear):
3840         (WebCore::AnimationControllerPrivate::updateAnimations):
3841         (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
3842         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
3843         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
3844         (WebCore::AnimationController::cancelAnimations):
3845         * rendering/RenderImage.cpp:
3846         (WebCore::RenderImage::imageChanged):
3847         * rendering/RenderLayer.cpp:
3848         (WebCore::RenderLayer::calculateClipRects):
3849         * rendering/RenderLayerCompositor.cpp:
3850         (WebCore::RenderLayerCompositor::attachRootLayer):
3851         (WebCore::RenderLayerCompositor::detachRootLayer):
3852         (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
3853         * rendering/RenderObject.cpp:
3854         (WebCore::RenderObject::updateDragState):
3855         * rendering/svg/SVGResourcesCache.cpp:
3856         (WebCore::SVGResourcesCache::clientStyleChanged):
3857         * style/AttributeChangeInvalidation.cpp:
3858         (WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
3859         * style/ClassChangeInvalidation.cpp:
3860         (WebCore::Style::ClassChangeInvalidation::invalidateStyle):
3861         * style/IdChangeInvalidation.cpp:
3862         (WebCore::Style::IdChangeInvalidation::invalidateStyle):
3863         * style/RenderTreeUpdater.cpp:
3864         (WebCore::RenderTreeUpdater::updateElementRenderer):
3865         * style/StyleScope.cpp:
3866         (WebCore::Style::Scope::updateActiveStyleSheets):
3867         * style/StyleTreeResolver.cpp:
3868         (WebCore::Style::resetStyleForNonRenderedDescendants):
3869         (WebCore::Style::TreeResolver::resolveElement):
3870         (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
3871         (WebCore::Style::TreeResolver::popParent):
3872         (WebCore::Style::clearNeedsStyleResolution):
3873         (WebCore::Style::TreeResolver::resolveComposedTree):
3874         * style/StyleUpdate.h:
3875         * style/StyleValidity.h: Added.
3876
3877             StyleChangeType enum splits into Style::Validity and Style::InvalidationMode.
3878             Move to a file of its own.
3879
3880         * svg/SVGAElement.cpp:
3881         (WebCore::SVGAElement::svgAttributeChanged):
3882         * svg/SVGAnimateElementBase.cpp:
3883         (WebCore::applyCSSPropertyToTarget):
3884         (WebCore::removeCSSPropertyFromTarget):
3885         * svg/SVGElement.cpp:
3886         (WebCore::SVGElement::willRecalcStyle):
3887         * svg/SVGElement.h:
3888         (WebCore::SVGElement::invalidateSVGPresentationAttributeStyle):
3889         * svg/SVGTests.cpp:
3890         (WebCore::SVGTests::handleAttributeChange):
3891         * svg/SVGUseElement.cpp:
3892         (WebCore::SVGUseElement::invalidateShadowTree):
3893         * testing/Internals.cpp:
3894         (WebCore::styleValidityToToString):
3895         (WebCore::Internals::styleChangeType):
3896         (WebCore::styleChangeTypeToString): Deleted.
3897
3898 2016-10-17  Sergio Villar Senin  <svillar@igalia.com>
3899
3900         [css-grid] Constrain by min|max-height on auto repeat computation
3901         https://bugs.webkit.org/show_bug.cgi?id=163540
3902
3903         Reviewed by Darin Adler.
3904
3905         The max-height (if definite) is used to compute the number of auto repeat rows whenever the
3906         height is indefinite. We were using the min-height only in case both values were indefinite.
3907
3908         Although not explicitly mentioned by grid specs, it's reasonable to assume that
3909         the min-height trumps the used value of height/max-height like it always does, per CSS
3910         2.2. Note that the number of rows still needs to fit within that size even if using
3911         min-height, because we're just using min-height to compute the used value of the height
3912         property. If both height and max-height are indefinite we keep doing the same, i.e., compute
3913         the minimum number of rows that fulfill min-height (if definite).
3914
3915         * rendering/RenderGrid.cpp:
3916         (WebCore::RenderGrid::computeAutoRepeatTracksCount):
3917
3918 2016-10-17  Yusuke Suzuki  <utatane.tea@gmail.com>
3919
3920         [DOMJIT] Use NativeCallFrameTracer for operations used for DOMJIT slow calls
3921         https://bugs.webkit.org/show_bug.cgi?id=163586
3922
3923         Reviewed by Saam Barati.
3924
3925         * domjit/JSNodeDOMJIT.cpp:
3926         (WebCore::toWrapperSlow):
3927
3928 2016-10-18  Ryuan Choi  <ryuan.choi@navercorp.com>
3929
3930         [EFL] Build break since r207442
3931         https://bugs.webkit.org/show_bug.cgi?id=163587
3932
3933         Unreviewed.
3934
3935         Since r207442, setRGB is moved to private.
3936
3937         * rendering/RenderThemeEfl.cpp:
3938         (WebCore::fillColorsFromEdjeClass):
3939
3940 2016-10-17  Dean Jackson  <dino@apple.com>
3941
3942         Remove dependency cycle with UIKit
3943         https://bugs.webkit.org/show_bug.cgi?id=163577
3944         <rdar://problem/28786160>
3945
3946         Reviewed by Tim Horton.
3947
3948         Soft link against UIKit.
3949
3950         * Configurations/WebCoreTestSupport.xcconfig:
3951         * testing/Internals.mm:
3952
3953 2016-10-17  Dean Jackson  <dino@apple.com>
3954
3955         Allow creation of ExtendedColors and make Color immutable
3956         https://bugs.webkit.org/show_bug.cgi?id=163557
3957         <rdar://problem/28805360>
3958
3959         Reviewed by Darin Adler and Dave Hyatt.
3960
3961         1. Support the creation of ExtendedColor objects via the
3962         Color class.
3963
3964         2. Fix the remaining few places where a Color object is
3965         modified after creation, instead creating a new Color.
3966         Move all the mutation methods into the private section,
3967         making Color now immutable.
3968
3969         Changes to Color are covered by existing tests. Changes
3970         to ExtendedColor are covered by the ExtendedColor API test.
3971
3972         * css/parser/CSSParser.cpp:
3973         (WebCore::CSSParser::fastParseColor): Return a new named Color.
3974
3975         * dom/Document.cpp:
3976         (WebCore::Document::resetActiveLinkColor): Set to be the named "red" color.
3977
3978         * html/HTMLElement.cpp:
3979         (WebCore::HTMLElement::addHTMLColorToStyle): Use the string-based constructor
3980         where possible.
3981
3982         * page/CaptionUserPreferencesMediaAF.cpp:
3983         (WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS): No need to
3984         use the string "black" here - we have a constant value.
3985
3986         * platform/graphics/cairo/GraphicsContextCairo.cpp: Don't use setRGB.
3987
3988         * platform/graphics/Color.cpp:
3989         (WebCore::findNamedColor): Move this up in the file.
3990         (WebCore::Color::Color): Copy in the code from setNamedColor. Also
3991         add a constructor for ExtendedColor.
3992         (WebCore::Color::serialized): Call ExtendedColor's serializer if necessary.
3993         (WebCore::Color::cssText): Ditto.
3994         (WebCore::Color::setNamedColor): Deleted.
3995         (WebCore::Color::tagAsExtended): Deleted.
3996
3997         * platform/graphics/Color.h: Add a new constructor.
3998         (WebCore::Color::setRGB): Move to private.
3999
4000         * platform/graphics/ExtendedColor.cpp:
4001         (WebCore::ExtendedColor::cssText): Implement serializer.
4002         * platform/graphics/ExtendedColor.h:
4003
4004         * rendering/style/RenderStyle.cpp:
4005         (WebCore::RenderStyle::colorIncludingFallback): Construct a new Color rather than changing an existing object.
4006
4007 2016-10-17  Simon Fraser  <simon.fraser@apple.com>
4008
4009         Implement DOMRect/DOMRectReadOnly
4010         https://bugs.webkit.org/show_bug.cgi?id=163464
4011
4012         Reviewed by Darin Adler.
4013         
4014         Implement the DOMRectInit/DOMRectReadOnly/DOMRect interfaces specified in
4015         https://dev.w3.org/fxtf/geometry/
4016         
4017         DOMRects allow negative height/width and require double storage, so we can't just
4018         use FloatRect for storage. They also require handling of NaN and Infinity.
4019         
4020         To have the left/right/top/bottom accessors follow IEEE NaN rules, we need to use