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