Move XPath from ExceptionCode to Exception
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-10-19  Darin Adler  <darin@apple.com>
2
3         Move XPath from ExceptionCode to Exception
4         https://bugs.webkit.org/show_bug.cgi?id=163656
5
6         Reviewed by Chris Dumez.
7
8         * dom/Document.cpp:
9         (WebCore::Document::createExpression): Use ExceptionOr.
10         (WebCore::Document::createNSResolver): Return Ref.
11         (WebCore::Document::evaluate): Use ExceptionOr.
12         * dom/Document.h: Updated for above changes.
13         * dom/Document.idl: Use non-legacy exceptions for the functions above.
14
15         * inspector/InspectorNodeFinder.cpp:
16         (WebCore::InspectorNodeFinder::searchUsingXPath): Call XPath functions
17         with new interface.
18
19         * xml/DOMParser.cpp:
20         (WebCore::DOMParser::DOMParser): Marked inline.
21         (WebCore::DOMParser::create): Moved here from header.
22         (WebCore::DOMParser::parseFromString): Use ExceptionOr.
23         * xml/DOMParser.h: Updated for above changes.
24         * xml/DOMParser.idl: Use non-legacy exception.
25
26         * xml/XPathEvaluator.cpp:
27         (WebCore::XPathEvaluator::createExpression): Use ExceptionOr.
28         (WebCore::XPathEvaluator::evaluate): Ditto.
29         * xml/XPathEvaluator.h: Updated for above changes.
30         * xml/XPathEvaluator.idl: Use non-legacy exceptions.
31
32         * xml/XPathExpression.cpp:
33         (WebCore::XPathExpression::createExpression): Use ExceptionOr.
34         (WebCore::XPathExpression::evaluate): Ditto.
35         * xml/XPathExpression.h: Updated for above changes.
36         * xml/XPathExpression.idl: Use non-legacy exceptions.
37
38         * xml/XPathGrammar.y: Added include of XPathStep.h.
39
40         * xml/XPathParser.cpp:
41         (WebCore::XPath::Parser::Parser): Initialize three scalar data members
42         in the class definition rather than here.
43         (WebCore::XPath::Parser::parseStatement): Use ExceptionOr.
44         * xml/XPathParser.h: Updated for above changes.
45
46         * xml/XPathResult.cpp:
47         (WebCore::XPathResult::XPathResult): Use a reference rather than a
48         pointer for the document. Alao initialize two scalar data members
49         in the class definition rather than here.
50         (WebCore::XPathResult::convertTo): Use ExceptionOr.
51         (WebCore::XPathResult::numberValue): Ditto.
52         (WebCore::XPathResult::stringValue): Ditto.
53         (WebCore::XPathResult::booleanValue): Ditto.
54         (WebCore::XPathResult::singleNodeValue): Ditto.
55         (WebCore::XPathResult::snapshotLength): Ditto.
56         (WebCore::XPathResult::iterateNext): Ditto.
57         (WebCore::XPathResult::snapshotItem): Ditto.
58         * xml/XPathResult.h: Updated for the changes above.
59         * xml/XPathResult.idl: Use non-legacy exceptions.
60
61 2016-10-19  Nan Wang  <n_wang@apple.com>
62
63         AX: [Mac] Meter element should use AXValueDescription to descrbe the status of the value
64         https://bugs.webkit.org/show_bug.cgi?id=163610
65
66         Reviewed by Chris Fleizach.
67
68         Exposed the goodness of the meter value in AXValueDescription.
69
70         Test: accessibility/mac/meter-gauge-value-description.html
71
72         * English.lproj/Localizable.strings:
73         * accessibility/AccessibilityProgressIndicator.cpp:
74         (WebCore::AccessibilityProgressIndicator::gaugeRegionValueDescription):
75         * accessibility/AccessibilityProgressIndicator.h:
76         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
77         (-[WebAccessibilityObjectWrapper valueDescriptionForMeter]):
78         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
79         * platform/LocalizedStrings.cpp:
80         (WebCore::AXMeterGaugeRegionOptimumText):
81         (WebCore::AXMeterGaugeRegionSuboptimalText):
82         (WebCore::AXMeterGaugeRegionLessGoodText):
83         * platform/LocalizedStrings.h:
84
85 2016-10-19  Dave Hyatt  <hyatt@apple.com>
86
87         [CSS Parser] Fix named color parsing
88         https://bugs.webkit.org/show_bug.cgi?id=163662
89
90         Reviewed by Zalan Bujtas.
91
92         Named color parsing in the old parser for extended colors relied on constructing a Color with the
93         name and doing a lookup that way.
94
95         The new parser allows the back end to hold a primitive identifier value for extended colors.
96
97         StyleColor contains a helper function for looking up the correct color.
98
99         This patch switches both the old and the new parsers over to the new StyleColor function.
100
101         Also remove some asserts from the CSSSelectorList, since the new parser allows it to be empty and
102         detects parsing failure that way.
103
104         * css/CSSSelectorList.cpp:
105         (WebCore::CSSSelectorList::CSSSelectorList):
106         (WebCore::CSSSelectorList::operator=):
107         * css/StyleColor.cpp:
108         (WebCore::StyleColor::isColorKeyword):
109         * css/StyleResolver.cpp:
110         (WebCore::StyleResolver::colorFromPrimitiveValue):
111         (WebCore::colorForCSSValue): Deleted.
112
113 2016-10-19  Youenn Fablet  <youenn@apple.com>
114
115         Remove SecurityOrigin::taintsCanvas
116         https://bugs.webkit.org/show_bug.cgi?id=163594
117
118         Reviewed by Darin Adler.
119
120         No change of behavior.
121
122         * html/canvas/CanvasRenderingContext.cpp:
123         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
124         * page/SecurityOrigin.cpp:
125         (WebCore::SecurityOrigin::canReceiveDragData):
126         (WebCore::SecurityOrigin::taintsCanvas): Deleted.
127         * page/SecurityOrigin.h:
128
129 2016-10-18  Dave Hyatt  <hyatt@apple.com>
130
131         [CSS Parser] Fix compound selector parsing.
132         https://bugs.webkit.org/show_bug.cgi?id=163649
133
134         Reviewed by Darin Adler.
135
136         The new CSS parser is failing to handle compound selectors. The code has an assumption that the
137         first value in the RelationType enum is SubSelector. This patch changes the enum to have the same
138         name used in Blink, RelationType, and to make the ordering be exactly the same.
139
140         * css/CSSSelector.h:
141         (WebCore::CSSSelector::relation):
142         (WebCore::CSSSelector::setRelation):
143         * css/SelectorChecker.cpp:
144         (WebCore::SelectorChecker::matchRecursively):
145         (WebCore::canMatchHoverOrActiveInQuirksMode):
146         (WebCore::SelectorChecker::determineLinkMatchType):
147         * css/SelectorFilter.cpp:
148         (WebCore::SelectorFilter::collectIdentifierHashes):
149         * css/parser/CSSParserValues.cpp:
150         (WebCore::CSSParserSelector::insertTagHistory):
151         (WebCore::CSSParserSelector::appendTagHistory):
152         * css/parser/CSSParserValues.h:
153         (WebCore::CSSParserSelector::setRelation):
154         * css/parser/CSSSelectorParser.cpp:
155         (WebCore::CSSSelectorParser::consumeComplexSelector):
156         (WebCore::CSSSelectorParser::consumeCombinator):
157         * css/parser/CSSSelectorParser.h:
158         * cssjit/SelectorCompiler.cpp:
159         (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):
160         (WebCore::SelectorCompiler::constructFragmentsInternal):
161
162 2016-10-19  Javier Fernandez  <jfernandez@igalia.com>
163
164         Web Inspector: Debugger buttons positioned incorrectly, align-content default value is unexpected
165         https://bugs.webkit.org/show_bug.cgi?id=163572
166
167         Reviewed by Sergio Villar Senin.
168
169         We only allow the new CSS Box Alignment syntax when the Grid Layout
170         feature is enabled. Due to flexbox backward compatibility we have
171         implemented a different code path for the style initial/default values
172         assignment. However, we have incorrectly resolved both align-content
173         and justify-content to 'flex-start' when grid layout is disabled.
174
175         This patch changes the approach, so we set 'normal' (the value specified
176         by the new syntax) for both properties, but using the values defined in
177         the old syntax (Flexbox specification) at computed style resolution.
178
179         Since 'stretch' is the default value for the align-content property, this
180         issue implies that any flexbox line with an undefined height will be
181         laid out incorrectly, if not explicitly set via CSS, because flex items
182         can't use the available height, even though they use 'stretch' for their
183         'align-self' properties.
184
185         Test: css3/flexbox/flexbox-lines-must-be-stretched-by-default.html
186
187         * css/CSSComputedStyleDeclaration.cpp:
188         (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
189         (WebCore::ComputedStyleExtractor::propertyValue):
190         * rendering/style/RenderStyle.h:
191         (WebCore::RenderStyle::initialContentAlignment):
192
193 2016-10-19  Carlos Alberto Lopez Perez  <clopez@igalia.com>
194
195         [GTK] REGRESSION(r207396) Build broken with Clang.
196         https://bugs.webkit.org/show_bug.cgi?id=163599
197
198         Suggested and reviewed by Darin Adler.
199
200         * css/CSSPrimitiveValue.cpp:
201         (WebCore::CSSPrimitiveValue::getStringValue):
202
203 2016-10-19  Darin Adler  <darin@apple.com>
204
205         Try to fix build.
206
207         * page/PerformanceUserTiming.cpp: Add back class name; needed by some compiler versions.
208
209 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
210
211         Unreviewed. Fix the build after r207522.
212
213         * page/PerformanceUserTiming.cpp: Include PerformanceTiming.h.
214
215 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
216
217         Unreviewed. Fix the build after r207519.
218
219         The build error is:
220         IDL ATTRIBUTE CHECKER ERROR: Unknown IDL attribute [PassContext] is found at TestRunner.idl.
221
222         Because PassContext was removed from IDLAttributes.txt in rr207519, but it's implemented by
223         CodeGeneratorTestRunner.pm and used by TestRunner.idl.
224
225         * bindings/scripts/IDLAttributes.txt: Bring back PassContext.
226
227 2016-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
228
229         Unreviewed. Fix the build with GCC 4.9 after r207463.
230
231         Add constructors to MediaConstraintsData.
232
233         * Modules/mediastream/MediaConstraintsImpl.h:
234         (WebCore::MediaConstraintsData::MediaConstraintsData):
235
236 2016-10-19  Jer Noble  <jer.noble@apple.com>
237
238         [Mac][MSE] Movies with a 'mehd' box have a zero-duration
239         https://bugs.webkit.org/show_bug.cgi?id=163641
240
241         Reviewed by Darin Adler.
242
243         Test: media/media-source/media-source-init-segment-duration.html
244
245         The canonical (ISO/IEC 14496-12:2012) way to signal the duration of a fragmented media file is to add a
246         'mehd' box to the 'mvex' container box specifying the duration of the fragment. Support this through the
247         AVAsset -overallDurationHint property.
248
249         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
250         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
251         * platform/spi/mac/AVFoundationSPI.h:
252
253 2016-10-18  Darin Adler  <darin@apple.com>
254
255         Move many miscellaneous classes from ExceptionCode to Exception
256         https://bugs.webkit.org/show_bug.cgi?id=163645
257
258         Reviewed by Ryosuke Niwa.
259
260         * bindings/js/JSCryptoCustom.cpp:
261         (WebCore::JSCrypto::getRandomValues): Use propagateException.
262         * bindings/js/JSDOMWindowCustom.cpp:
263         (WebCore::handlePostMessage): Ditto.
264         (WebCore::JSDOMWindow::setTimeout): Use toJSNumber.
265         (WebCore::JSDOMWindow::setInterval): Ditto.
266         * bindings/js/JSStorageCustom.cpp:
267         (WebCore::JSStorage::nameGetter): Use propagateException.
268         (WebCore::JSStorage::deleteProperty): Ditto.
269         (WebCore::JSStorage::getOwnPropertyNames): Ditto.
270         (WebCore::JSStorage::putDelegate): Ditto.
271
272         * loader/appcache/DOMApplicationCache.cpp:
273         (WebCore::DOMApplicationCache::update): Use ExceptionOr.
274         (WebCore::DOMApplicationCache::swapCache): Ditto.
275         * loader/appcache/DOMApplicationCache.h: Update for above changes.
276         * loader/appcache/DOMApplicationCache.idl: Use non-legacy exceptions.
277
278         * page/Crypto.cpp:
279         (WebCore::Crypto::getRandomValues): Use ExceptionOr.
280         (WebCore::Crypto::webkitSubtle): Ditto.
281         * page/Crypto.h: Updated for above changes.
282         * page/Crypto.idl: Use non-legacy exceptions.
283
284         * page/DOMWindow.cpp:
285         (WebCore::DOMWindow::DOMWindow): Initialize many data members in
286         the class definition instead of here.
287         (WebCore::DOMWindow::page): Use nullptr.
288         (WebCore::DOMWindow::screen): Ditto.
289         (WebCore::DOMWindow::crypto): Ditto.
290         (WebCore::DOMWindow::locationbar): Ditto.
291         (WebCore::DOMWindow::menubar): Ditto.
292         (WebCore::DOMWindow::personalbar): Ditto.
293         (WebCore::DOMWindow::scrollbars): Ditto.
294         (WebCore::DOMWindow::statusbar): Ditto.
295         (WebCore::DOMWindow::toolbar): Ditto.
296         (WebCore::DOMWindow::applicationCache): Ditto.
297         (WebCore::DOMWindow::sessionStorage): Use ExceptionOr.
298         (WebCore::DOMWindow::localStorage): Ditto.
299         (WebCore::DOMWindow::postMessage): Ditto.
300         (WebCore::DOMWindow::frameElement): Use nullptr.
301         (WebCore::DOMWindow::self): Ditto.
302         (WebCore::DOMWindow::opener): Ditto.
303         (WebCore::DOMWindow::parent): Ditto.
304         (WebCore::DOMWindow::top): Ditto.
305         (WebCore::DOMWindow::getComputedStyle): Use Ref.
306         (WebCore::DOMWindow::setTimeout): Use ExceptionOr.
307         (WebCore::DOMWindow::setInterval): Ditto.
308         (WebCore::didAddStorageEventListener): Use a reference instead of a
309         pointer, and ignore return value instead of using IGNORE_EXCEPTION.
310         (WebCore::DOMWindow::addEventListener): Pass reference to function above.
311         (WebCore::DOMWindow::dispatchEvent): Use enum class version of PageStatus.
312         * page/DOMWindow.h: Updated for changes above. Also changed indentatation.
313         * page/DOMWindow.idl: Use non-legacy exceptions.
314
315         * page/EventSource.cpp:
316         (WebCore::EventSource::create): Use ExceptionOr.
317         * page/EventSource.h: Updated for change above.
318         * page/EventSource.idl: Use non-legacy exception.
319
320         * page/Location.cpp:
321         (WebCore::Location::setProtocol): Use ExceptionOr.
322         * page/Location.h: Updated for change above.
323         * page/Location.idl: Use non-legacy exception.
324
325         * page/Performance.cpp:
326         (WebCore::Performance::Performance): Remove unnecessary initialization of
327         smart pointer to null, and moved initialization of m_resourceTimingBufferSize
328         to the header.
329         (WebCore::Performance::navigation): Made non-const and return a reference.
330         (WebCore::Performance::timing): Ditto.
331         (WebCore::Performance::addResourceTiming): Change LoadTiming argument to use
332         a const& instead of passing in a copy.
333         (WebCore::Performance::webkitMark): Use ExceptionOr and make_unique.
334         (WebCore::Performance::webkitClearMarks): Ditto.
335         (WebCore::Performance::webkitMeasure): Ditto.
336         (WebCore::Performance::webkitClearMeasures): Ditto.
337         (WebCore::Performance::reduceTimeResolution): Use std::floor.
338         * page/Performance.h: Updated for above changes. Removed unneeded includes.
339         Made more things private. Removed unneeded reference counting of UserTiming.
340         * page/Performance.idl: Use non-legacy exceptions.
341
342         * page/PerformanceUserTiming.cpp:
343         (WebCore::restrictedMarkFunction): Removed unneeded class name.
344         (WebCore::UserTiming::UserTiming): Take a reference instead of a pointer.
345         (WebCore::UserTiming::mark): Use ExceptionOr.
346         (WebCore::UserTiming::findExistingMarkStartTime): Ditto.
347         (WebCore::UserTiming::measure): Ditto.
348         (WebCore::getEntrySequenceByName): Simplified code using HashMap::get.
349         * page/PerformanceUserTiming.h: Updated for above changes. Removed reference
350         counting since this is a single-owner object.
351
352         * page/UserMessageHandler.cpp:
353         (WebCore::UserMessageHandler::postMessage): Use ExceptionOr.
354         * page/UserMessageHandler.h: Updated for above change.
355         * page/UserMessageHandler.idl: Use non-legacy exception.
356
357         * storage/Storage.cpp:
358         (WebCore::Storage::length): Use ExceptionOr.
359         (WebCore::Storage::key): Ditto.
360         (WebCore::Storage::getItem): Ditto.
361         (WebCore::Storage::setItem): Ditto.
362         (WebCore::Storage::removeItem): Ditto.
363         (WebCore::Storage::clear): Ditto.
364         (WebCore::Storage::contains): Ditto.
365         * storage/Storage.h: Updated for above change.
366         * storage/Storage.idl: Use non-legacy exceptions.
367
368         * storage/StorageEventDispatcher.cpp:
369         (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
370         Updated for ExceptionOr.
371         (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames): Ditto.
372
373 2016-10-18  Darin Adler  <darin@apple.com>
374
375         Move internal testing classes from ExceptionCode to Exception
376         https://bugs.webkit.org/show_bug.cgi?id=163553
377
378         Reviewed by Ryosuke Niwa.
379
380         * bindings/js/JSDOMBinding.h: Added toJSArray. Also exported a function that
381         is now needed in the testing library.
382         * bindings/scripts/CodeGeneratorJS.pm:
383         (NativeToJSValue): Added code to handle the jsArray case with an exception.
384
385         * css/parser/CSSPropertyParser.cpp: Fix #if to make code compile when
386         CSS_SCROLL_SNAP is not enabled.
387
388         * dom/Element.cpp:
389         (WebCore::Element::createShadowRoot): Changed return type to a raw pointer.
390         There is no reason it needs to be a RefPtr.
391         * dom/Element.h: Updated for above change.
392
393         * svg/SVGPathStringBuilder.h: Exported class and made more public so it can
394         be used in test code.
395
396         * svg/SVGPathUtilities.cpp:
397         (WebCore::pathIteratorForBuildingString): Deleted. Needed only for test code,
398         so moved into there.
399         (WebCore::buildStringFromPath): Deleted. Ditto.
400         * svg/SVGPathUtilities.h: Removed buildStringFromPath.
401
402         * testing/InternalSettings.cpp: Simplified the guard macro and used the all
403         capitals style that our style guide prescribes for non-function-like macros.
404         (WebCore::InternalSettings::create): Moved here, no longer inline Use m_page.
405         (WebCore::InternalSettings::resetToConsistentState): Updated since settings
406         returns a reference.
407         (WebCore::InternalSettings::settings): Changed to return a reference and
408         assert that m_page is not null; functions all check m_page for null first.
409         (WebCore::InternalSettings::setTouchEventEmulationEnabled): Updated to use
410         ExceptionOr, do an m_page check, and use settings that returns a reference.
411         (WebCore::InternalSettings::setStandardFontFamily): Ditto.
412         (WebCore::InternalSettings::setSerifFontFamily): Ditto.
413         (WebCore::InternalSettings::setSansSerifFontFamily): Ditto.
414         (WebCore::InternalSettings::setFixedFontFamily): Ditto.
415         (WebCore::InternalSettings::setCursiveFontFamily): Ditto.
416         (WebCore::InternalSettings::setFantasyFontFamily): Ditto.
417         (WebCore::InternalSettings::setPictographFontFamily): Ditto.
418         (WebCore::InternalSettings::setTextAutosizingEnabled): Ditto.
419         (WebCore::InternalSettings::setTextAutosizingWindowSizeOverride): Ditto.
420         (WebCore::InternalSettings::setMediaTypeOverride): Ditto.
421         (WebCore::InternalSettings::setCanStartMedia): Ditto.
422         (WebCore::InternalSettings::setAllowsAirPlayForMediaPlayback): Ditto.
423         (WebCore::InternalSettings::setEditingBehavior): Ditto.
424         (WebCore::InternalSettings::setShouldDisplayTrackKind): Ditto.
425         (WebCore::InternalSettings::shouldDisplayTrackKind): Ditto.
426         (WebCore::InternalSettings::setStorageBlockingPolicy): Ditto.
427         (WebCore::InternalSettings::setPreferMIMETypeForImages): Ditto.
428         (WebCore::InternalSettings::setImagesEnabled): Ditto.
429         (WebCore::InternalSettings::setPDFImageCachingPolicy): Ditto.
430         (WebCore::InternalSettings::setMinimumTimerInterval): Ditto.
431         (WebCore::InternalSettings::setDefaultVideoPosterURL): Ditto.
432         (WebCore::InternalSettings::setForcePendingWebGLPolicy): Ditto.
433         (WebCore::InternalSettings::setTimeWithoutMouseMovementBeforeHidingControls): Ditto.
434         (WebCore::InternalSettings::setUseLegacyBackgroundSizeShorthandBehavior): Ditto.
435         (WebCore::InternalSettings::setAutoscrollForDragAndDropEnabled): Ditto.
436         (WebCore::InternalSettings::setFontFallbackPrefersPictographs): Ditto.
437         (WebCore::InternalSettings::setWebFontsAlwaysFallBack): Ditto.
438         (WebCore::InternalSettings::setQuickTimePluginReplacementEnabled): Ditto.
439         (WebCore::InternalSettings::setYouTubeFlashPluginReplacementEnabled): Ditto.
440         (WebCore::InternalSettings::setBackgroundShouldExtendBeyondPage): Ditto.
441         (WebCore::InternalSettings::setShouldConvertPositionStyleOnCopy): Ditto.
442         (WebCore::InternalSettings::setScrollingTreeIncludesFrames): Ditto.
443         (WebCore::InternalSettings::setAllowsInlineMediaPlayback): Ditto.
444         (WebCore::InternalSettings::setAllowsInlineMediaPlaybackAfterFullscreen): Ditto.
445         (WebCore::InternalSettings::setInlineMediaPlaybackRequiresPlaysInlineAttribute): Ditto.
446         (WebCore::InternalSettings::setIndexedDBWorkersEnabled): Ditto.
447         (WebCore::InternalSettings::userInterfaceDirectionPolicy): Ditto.
448         (WebCore::InternalSettings::setUserInterfaceDirectionPolicy): Ditto.
449         (WebCore::InternalSettings::systemLayoutDirection): Ditto.
450         (WebCore::InternalSettings::setSystemLayoutDirection): Ditto.
451         (WebCore::InternalSettings::variationFontsEnabled): Ditto.
452         (WebCore::InternalSettings::setVariationFontsEnabled): Ditto.
453         (WebCore::InternalSettings::forcedPrefersReducedMotionValue): Ditto.
454         (WebCore::InternalSettings::setForcedPrefersReducedMotionValue): Ditto.
455         * testing/InternalSettings.h: Updated for above changes. Also moved Backup to make
456         it private instead of public.
457         * testing/InternalSettings.idl: Use non-legacy execption. Also removed unneeded
458         exception for setIndexedDBWorkersEnabled.
459
460         * testing/Internals.cpp: Marked InspectorStubFrontend final and made everything private.
461         (WebCore::Internals::setCanShowModalDialogOverride): Use ExceptionOr.
462         (WebCore::Internals::lastSpatialNavigationCandidateCount): Ditto.
463         (WebCore::Internals::animationsAreSuspended): Ditto.
464         (WebCore::Internals::suspendAnimations): Ditto.
465         (WebCore::Internals::resumeAnimations): Ditto.
466         (WebCore::Internals::pauseAnimationAtTimeOnElement): Ditto.
467         (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): Ditto.
468         (WebCore::Internals::pauseTransitionAtTimeOnElement): Ditto.
469         (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): Ditto.
470         (WebCore::Internals::elementRenderTreeAsText): Ditto.
471         (WebCore::Internals::ensureShadowRoot): Ditto.
472         (WebCore::Internals::createShadowRoot): Ditto.
473         (WebCore::Internals::shadowRootType): Ditto.
474         (WebCore::Internals::isTimerThrottled): Ditto.
475         (WebCore::Internals::formControlStateOfPreviousHistoryItem): Ditto.
476         (WebCore::Internals::setFormControlStateOfPreviousHistoryItem): Ditto.
477         (WebCore::Internals::absoluteCaretBounds): Ditto.
478         (WebCore::Internals::inspectorHighlightRects): Ditto.
479         (WebCore::Internals::inspectorHighlightObject): Ditto.
480         (WebCore::Internals::markerCountForNode): Ditto.
481         (WebCore::Internals::markerAt): Ditto.
482         (WebCore::Internals::markerRangeForNode): Ditto.
483         (WebCore::Internals::markerDescriptionForNode): Ditto.
484         (WebCore::Internals::dumpMarkerRects): Ditto.
485         (WebCore::Internals::setMarkedTextMatchesAreHighlighted): Ditto.
486         (WebCore::Internals::setScrollViewPosition): Ditto.
487         (WebCore::Internals::setViewBaseBackgroundColor): Ditto.
488         (WebCore::Internals::setPagination): Ditto.
489         (WebCore::Internals::setPaginationLineGridEnabled): Ditto.
490         (WebCore::Internals::configurationForViewport): Ditto.
491         (WebCore::Internals::wasLastChangeUserEdit): Ditto.
492         (WebCore::Internals::scrollElementToRect): Ditto.
493         (WebCore::Internals::autofillFieldName): Ditto.
494         (WebCore::Internals::paintControlTints): Ditto.
495         (WebCore::Internals::rangeForDictionaryLookupAtLocation): Ditto.
496         (WebCore::Internals::setDelegatesScrolling): Ditto.
497         (WebCore::Internals::lastSpellCheckRequestSequence): Ditto.
498         (WebCore::Internals::lastSpellCheckProcessedSequence): Ditto.
499         (WebCore::Internals::wheelEventHandlerCount): Ditto.
500         (WebCore::Internals::touchEventHandlerCount): Ditto.
501         (WebCore::Internals::nodesFromRect): Ditto.
502         (WebCore::Internals::setBatteryStatus): Ditto.
503         (WebCore::Internals::setDeviceProximity): Ditto.
504         (WebCore::Internals::hasSpellingMarker): Ditto.
505         (WebCore::Internals::hasAutocorrectedMarker): Ditto.
506         (WebCore::Internals::handleAcceptedCandidate): Ditto.
507         (WebCore::Internals::isOverwriteModeEnabled): Ditto.
508         (WebCore::Internals::toggleOverwriteModeEnabled): Ditto.
509         (WebCore::Internals::countMatchesForText): Ditto.
510         (WebCore::Internals::countFindMatches): Ditto.
511         (WebCore::Internals::setInspectorIsUnderTest): Ditto.
512         (WebCore::Internals::hasGrammarMarker): Ditto.
513         (WebCore::Internals::numberOfScrollableAreas): Ditto.
514         (WebCore::Internals::isPageBoxVisible): Ditto.
515         (WebCore::Internals::layerTreeAsText): Ditto.
516         (WebCore::Internals::repaintRectsAsText): Ditto.
517         (WebCore::Internals::scrollingStateTreeAsText): Ditto.
518         (WebCore::Internals::mainThreadScrollingReasons): Ditto.
519         (WebCore::Internals::nonFastScrollableRects): Ditto.
520         (WebCore::Internals::setElementUsesDisplayListDrawing): Ditto.
521         (WebCore::Internals::setElementTracksDisplayListReplay): Ditto.
522         (WebCore::Internals::displayListForElement): Ditto.
523         (WebCore::Internals::replayDisplayListForElement): Ditto.
524         (WebCore::Internals::garbageCollectDocumentResources): Ditto.
525         (WebCore::Internals::insertAuthorCSS): Ditto.
526         (WebCore::Internals::insertUserCSS): Ditto.
527         (WebCore::Internals::pageProperty): Ditto.
528         (WebCore::Internals::pageSizeAndMarginsInPixels): Ditto.
529         (WebCore::Internals::setPageScaleFactor): Ditto.
530         (WebCore::Internals::setPageZoomFactor): Ditto.
531         (WebCore::Internals::setTextZoomFactor): Ditto.
532         (WebCore::Internals::setUseFixedLayout): Ditto.
533         (WebCore::Internals::setFixedLayoutSize): Ditto.
534         (WebCore::Internals::setViewExposedRect): Ditto.
535         (WebCore::Internals::setHeaderHeight): Ditto.
536         (WebCore::Internals::setFooterHeight): Ditto.
537         (WebCore::Internals::setTopContentInset): Ditto.
538         (WebCore::Internals::setApplicationCacheOriginQuota): Ditto.
539         (WebCore::Internals::startTrackingRepaints): Ditto.
540         (WebCore::Internals::stopTrackingRepaints): Ditto.
541         (WebCore::Internals::startTrackingLayerFlushes): Ditto.
542         (WebCore::Internals::layerFlushCount): Ditto.
543         (WebCore::Internals::startTrackingStyleRecalcs): Ditto.
544         (WebCore::Internals::styleRecalcCount): Ditto.
545         (WebCore::Internals::startTrackingCompositingUpdates): Ditto.
546         (WebCore::Internals::compositingUpdateCount): Ditto.
547         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks): Ditto.
548         (WebCore::Internals::getCurrentCursorInfo): Ditto.
549         (WebCore::Internals::mediaElementHasCharacteristic): Ditto.
550         (WebCore::Internals::captionsStyleSheetOverride): Ditto.
551         (WebCore::Internals::setCaptionsStyleSheetOverride): Ditto.
552         (WebCore::Internals::setPrimaryAudioTrackLanguageOverride): Ditto.
553         (WebCore::Internals::setCaptionDisplayMode): Ditto.
554         (WebCore::Internals::selectionBounds): Ditto.
555         (WebCore::Internals::isVibrating): Ditto.
556         (WebCore::Internals::isPluginUnavailabilityIndicatorObscured): Ditto.
557         (WebCore::Internals::beginMediaSessionInterruption): Ditto.
558         (WebCore::Internals::setMediaSessionRestrictions): Ditto.
559         (WebCore::Internals::postRemoteControlCommand): Ditto.
560         (WebCore::Internals::setMockMediaPlaybackTargetPickerState): Ditto.
561         (WebCore::Internals::installMockPageOverlay): Ditto.
562         (WebCore::Internals::pageOverlayLayerTreeAsText): Ditto.
563         (WebCore::Internals::scrollSnapOffsets): Ditto.
564         (WebCore::Internals::pathStringWithShrinkWrappedRects): Moved the code that builds
565         the path string in here for now since it's only used for this testing.
566         (WebCore::Internals::resourceLoadStatisticsForOrigin): Take a const String&.
567
568         * testing/Internals.h: Updated for above changes.
569         * testing/Internals.idl: Use non-legacy exceptions.
570
571 2016-10-18  Chris Dumez  <cdumez@apple.com>
572
573         [Web IDL] Drop webkit-specific extended attributes that are no longer useful
574         https://bugs.webkit.org/show_bug.cgi?id=163643
575
576         Reviewed by Ryosuke Niwa.
577
578         Drop webkit-specific IDL extended attributes that are no longer useful:
579         - [CustomReturn]: I believe this used to be for ObjC bindings. It has
580           no impact in JS bindings.
581         - [Deletable]: It only had an impact on static attributes and was only
582           used on HTMLAllCollection.all, which is not static. I updated the
583           bindings generator to so that static attributes are now configurable
584           by default (unless marked as [Unforgeable], as per Web IDL [1]. This
585           causes Notification.permission (This only static attribute we have)
586           to become deletable. This behavior is consistent with the specification
587           and with Chrome. I added test coverage for this.
588         - [ImplementationNamespace]: Implemented but unused.
589         - [PassContext]: Not implemented and unused.
590         - [TypedArray=*]: Not implemented and unused.
591
592         [1] https://heycam.github.io/webidl/#es-attributes
593
594         Test: fast/notifications/notification-permisssion-deletable.html
595
596         * bindings/scripts/CodeGeneratorJS.pm:
597         (GetNamespaceForInterface):
598         (GenerateImplementation):
599         * bindings/scripts/IDLAttributes.txt:
600         * bindings/scripts/test/JS/JSTestInterface.cpp:
601         * bindings/scripts/test/JS/JSTestObj.cpp:
602         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
603         * dom/Node.idl:
604         * html/HTMLDocument.idl:
605
606 2016-10-18  Sam Weinig  <sam@webkit.org>
607
608         Replace std::experimental::variant with WTF::Variant (or similar)
609         https://bugs.webkit.org/show_bug.cgi?id=163626
610
611         Reviewed by Chris Dumez.
612
613         Rename std::experimental::variant, Variant. Move helpers get/holds_alternative/etc.
614         into the WTF namespace.
615
616         * Modules/fetch/FetchBody.h:
617         (WebCore::FetchBody::isBlob):
618         (WebCore::FetchBody::isFormData):
619         (WebCore::FetchBody::isArrayBuffer):
620         (WebCore::FetchBody::isArrayBufferView):
621         (WebCore::FetchBody::isURLSearchParams):
622         (WebCore::FetchBody::isText):
623         (WebCore::FetchBody::blobBody):
624         (WebCore::FetchBody::formDataBody):
625         (WebCore::FetchBody::arrayBufferBody):
626         (WebCore::FetchBody::arrayBufferViewBody):
627         (WebCore::FetchBody::textBody):
628         (WebCore::FetchBody::urlSearchParamsBody):
629         * bindings/generic/IDLTypes.h:
630         * dom/ExceptionOr.h:
631         (WebCore::ExceptionOr<ReturnType>::hasException):
632         (WebCore::ExceptionOr<ReturnType>::releaseException):
633         (WebCore::ExceptionOr<ReturnType>::releaseReturnValue):
634         * dom/MessageEvent.cpp:
635         (WebCore::MessageEvent::source):
636         * dom/MessageEvent.h:
637         * dom/Node.cpp:
638         (WebCore::nodeSetPreTransformedFromNodeOrStringVector):
639         (WebCore::Node::convertNodesOrStringsIntoNode):
640         * dom/Node.h:
641         * html/HTMLOptionsCollection.h:
642         * html/HTMLSelectElement.cpp:
643         (WebCore::HTMLSelectElement::add):
644         * html/HTMLSelectElement.h:
645         * html/track/TrackEvent.cpp:
646         (WebCore::TrackEvent::TrackEvent):
647         * html/track/TrackEvent.h:
648
649 2016-10-18  Chris Dumez  <cdumez@apple.com>
650
651         Unreviewed, rebaseline bindings tests after Sam's r207505.
652
653         * bindings/scripts/test/JS/JSTestCallback.cpp:
654         (WebCore::JSTestCallback::callbackWithSerializedScriptValueParam):
655         * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
656         (WebCore::JSTestCallbackFunction::callbackWithSerializedScriptValueParam):
657         * bindings/scripts/test/JS/JSTestObj.cpp:
658         (WebCore::jsTestObjPrototypeFunctionSerializedValueCaller):
659         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
660         (WebCore::jsTestSerializedScriptValueInterfaceValueGetter):
661         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValueGetter):
662         (WebCore::jsTestSerializedScriptValueInterfaceCachedValueGetter):
663         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValueGetter):
664         (WebCore::setJSTestSerializedScriptValueInterfaceValueFunction):
665         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValueFunction):
666         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
667         (WebCore::jsTestTypedefsImmutableSerializedScriptValueGetter):
668         (WebCore::setJSTestTypedefsImmutableSerializedScriptValueFunction):
669
670 2016-10-18  Chris Dumez  <cdumez@apple.com>
671
672         [Web IDL] Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor]
673         https://bugs.webkit.org/show_bug.cgi?id=163630
674
675         Reviewed by Darin Adler.
676
677         Kill support for [LegacyConstructorTemplate=Event] / [LegacyInitializedByEventConstructor] in our
678         IDL now that all our events use proper constructors instead.
679
680         * bindings/scripts/CodeGenerator.pm:
681         * bindings/scripts/CodeGeneratorJS.pm:
682         (GenerateHeader):
683         (GenerateConstructorDefinition):
684         (GenerateConstructorHelperMethods):
685         (IsConstructable):
686         * bindings/scripts/IDLAttributes.txt:
687         * dom/Event.h:
688         (WebCore::Event::create):
689         * dom/Event.idl:
690         * dom/UIEvent.h:
691         (WebCore::UIEvent::create):
692         * dom/UIEvent.idl:
693
694 2016-10-18  Chris Dumez  <cdumez@apple.com>
695
696         Changing details.open should cause a toggle event to be fired asynchronously
697         https://bugs.webkit.org/show_bug.cgi?id=163568
698
699         Reviewed by Darin Adler.
700
701         Changing details.open should cause a toggle event to be fired asynchronously:
702         - https://html.spec.whatwg.org/#details-notification-task-steps
703
704         Firefox and Chrome implement this, we don't.
705
706         Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-details-element/toggleEvent.html
707
708         * dom/EventNames.h:
709         * dom/GlobalEventHandlers.idl:
710         * html/HTMLAttributeNames.in:
711         * html/HTMLDetailsElement.cpp:
712         (WebCore::detailToggleEventSender):
713         (WebCore::HTMLDetailsElement::~HTMLDetailsElement):
714         (WebCore::HTMLDetailsElement::dispatchPendingEvent):
715         (WebCore::HTMLDetailsElement::parseAttribute):
716         * html/HTMLDetailsElement.h:
717         * html/HTMLElement.cpp:
718         (WebCore::HTMLElement::createEventHandlerNameMap):
719
720 2016-10-18  Dave Hyatt  <hyatt@apple.com>
721
722         [CSS Parser] Enable basic parser testing.
723         https://bugs.webkit.org/show_bug.cgi?id=163639
724
725         Reviewed by Dean Jackson.
726
727         * css/SelectorChecker.cpp:
728         (WebCore::SelectorChecker::matchRecursively):
729         Remove the ASSERT_NOT_REACHED on the new shadow selectors. We need to implement this
730         eventually, but it's better to not assert on that for now.
731
732         * css/parser/CSSParserValues.cpp:
733         (WebCore::CSSParserSelector::isHostPseudoSelector):
734         Make sure to check that we're a pseudoclass selector first, since otherwise we'll assert.
735
736         * css/parser/CSSParserValues.h:
737         (WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching):
738         Make sure to check that we're a pseudoelement selector first, since otherwise we'll assert.
739
740         * css/parser/CSSPropertyParser.cpp:
741         (WebCore::CSSPropertyParser::addExpandedPropertyForValue):
742         copyRef is needed here, since a singleton value is being propagated to all the expanded shorthand properties.
743
744         (WebCore::parseSingleShadow):
745         (WebCore::CSSPropertyParser::consumeFont):
746         Remove the font properties that aren't part of our shorthand. We will need to revisit this eventually as it seems
747         some of the font properties should be reset as part of this shorthand but aren't.
748 '
749         * css/parser/CSSPropertyParserHelpers.cpp:
750         (WebCore::CSSPropertyParserHelpers::consumeInteger):
751         Just return a number for now instead of the parser_integer type.
752
753         * css/parser/CSSSelectorParser.cpp:
754         (WebCore::CSSSelectorParser::consumePseudo):
755         Clean this up so that it doesn't assert by making sure to add qualifying checks for the appropriate match type.
756
757 2016-10-18  Ryosuke Niwa  <rniwa@webkit.org>
758
759         Update the comment for HTML Imports as there is now a proposal to use ES6 Modules for this.
760         Also replace the contact by me since I'm most familiar with this feature.
761
762         * features.json:
763
764 2016-10-18  Ryosuke Niwa  <rniwa@webkit.org>
765
766         Update the status of shadow DOM API to "Done" with a comment saying we're still fixing bugs.
767
768         Also update my contact information since I'm no longer on Twitter.
769
770         * features.json:
771
772 2016-10-18  Chris Dumez  <cdumez@apple.com>
773
774         Provide better form validation messages
775         https://bugs.webkit.org/show_bug.cgi?id=163584
776
777         Reviewed by Darin Adler.
778
779         Provide better form validation messages that match more closely the ones
780         from Chrome and Firefox.
781
782         No new tests, updated existing tests.
783
784         * English.lproj/Localizable.strings:
785         * platform/LocalizedStrings.cpp:
786         (WebCore::validationMessageValueMissingText):
787         (WebCore::validationMessageValueMissingForCheckboxText):
788         (WebCore::validationMessageValueMissingForFileText):
789         (WebCore::validationMessageValueMissingForMultipleFileText):
790         (WebCore::validationMessageValueMissingForRadioText):
791         (WebCore::validationMessageValueMissingForSelectText):
792         (WebCore::validationMessageTypeMismatchText):
793         (WebCore::validationMessageTypeMismatchForEmailText):
794         (WebCore::validationMessageTypeMismatchForMultipleEmailText):
795         (WebCore::validationMessageTypeMismatchForURLText):
796         (WebCore::validationMessagePatternMismatchText):
797         (WebCore::validationMessageTooShortText):
798         (WebCore::validationMessageTooLongText):
799         (WebCore::validationMessageRangeUnderflowText):
800         (WebCore::validationMessageRangeOverflowText):
801         (WebCore::validationMessageStepMismatchText):
802         (WebCore::validationMessageBadInputForNumberText):
803
804 2016-10-18  Dave Hyatt  <hyatt@apple.com>
805
806         Fix GTK build.
807
808         * css/parser/CSSPropertyParser.cpp:
809         (WebCore::CSSPropertyParser::parseSingleValue):
810
811 2016-10-18  Sam Weinig  <sam@webkit.org>
812
813         Simplify SerializedScriptValue, MessagePortArray and ArrayBufferArray to ease generation
814         https://bugs.webkit.org/show_bug.cgi?id=163625
815
816         Reviewed by Chris Dumez.
817
818         - Replace uses of MessagePortArray (a.k.a. Vector<RefPtr<MessagePort>, 1>) with Vector<RefPtr<MessagePort>>.
819         - Replace uses of ArrayBufferArray (a.k.a. Vector<RefPtr<ArrayBuffer>, 1>) with Vector<RefPtr<ArrayBuffer>>.
820         - Add convenience functions to SerializedScriptValue to allow calling with fewer parameters.
821         - Move MessagePorts and ArrayBuffers more where possible.
822
823         * Modules/indexeddb/IDBObjectStore.cpp:
824         (WebCore::IDBObjectStore::putOrAdd):
825         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
826         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
827         * bindings/js/IDBBindingUtilities.cpp:
828         (WebCore::deserializeIDBValueToJSValue):
829         * bindings/js/JSCustomEventCustom.cpp:
830         (WebCore::JSCustomEvent::detail):
831         * bindings/js/JSHistoryCustom.cpp:
832         (WebCore::JSHistory::state):
833         (WebCore::JSHistory::pushState):
834         (WebCore::JSHistory::replaceState):
835         * bindings/js/JSPopStateEventCustom.cpp:
836         (WebCore::JSPopStateEvent::state):
837         * dom/CustomEvent.cpp:
838         (WebCore::CustomEvent::trySerializeDetail):
839         * dom/ErrorEvent.cpp:
840         (WebCore::ErrorEvent::sanitizedErrorValue):
841         (WebCore::ErrorEvent::trySerializeError):
842         * dom/PopStateEvent.cpp:
843         (WebCore::PopStateEvent::trySerializeState):
844         * page/DOMWindow.cpp:
845         (WebCore::DOMWindow::postMessage):
846         * page/DOMWindow.h:
847         * workers/DedicatedWorkerGlobalScope.cpp:
848         (WebCore::DedicatedWorkerGlobalScope::postMessage):
849         * workers/DedicatedWorkerGlobalScope.h:
850         * workers/Worker.cpp:
851         (WebCore::Worker::postMessage):
852         * workers/Worker.h:
853         * bindings/js/JSDOMWindowCustom.cpp:
854         (WebCore::handlePostMessage):
855         * bindings/js/JSDictionary.cpp:
856         (WebCore::JSDictionary::convertValue):
857         * bindings/js/JSDictionary.h:
858         Updated for new SerializedScriptValue interface/vector naming.
859
860         * bindings/js/JSMessageEventCustom.cpp:
861         (WebCore::handleInitMessageEvent):
862         Update handleInitMessageEvent to check for exceptions and use convert for the MessagePort sequence.
863
864         * bindings/js/JSMessagePortCustom.cpp:
865         (WebCore::extractTransferables):
866         (WebCore::fillMessagePortArray): Deleted.
867         * bindings/js/JSMessagePortCustom.h:
868         (WebCore::handlePostMessage):
869         Rename fillMessagePortArray to extractTransferables to better express what it does.
870
871         * bindings/js/SerializedScriptValue.cpp:
872         (WebCore::CloneSerializer::serialize):
873         (WebCore::CloneSerializer::CloneSerializer):
874         (WebCore::CloneSerializer::fillTransferMap):
875         (WebCore::CloneSerializer::dumpIfTerminal):
876         (WebCore::CloneDeserializer::deserialize):
877         (WebCore::CloneDeserializer::CloneDeserializer):
878         (WebCore::CloneDeserializer::readTerminal):
879         (WebCore::SerializedScriptValue::transferArrayBuffers):
880         (WebCore::SerializedScriptValue::create):
881         (WebCore::SerializedScriptValue::deserialize):
882         * bindings/js/SerializedScriptValue.h:
883         Simplify interface to allow more callers to avoid passing default arguments. Use ExecState& more.
884         * bindings/scripts/CodeGeneratorJS.pm:
885         (GetNativeVectorType):
886         Remove special case for MessagePort.
887         (JSValueToNative):
888         (NativeToJSValue):
889         Updated for new SerializedScriptValue interface.
890
891         * dom/MessageEvent.cpp:
892         (WebCore::MessageEvent::MessageEvent):
893         (WebCore::MessageEvent::create):
894         (WebCore::MessageEvent::initMessageEvent):
895         (WebCore::MessageEvent::trySerializeData):
896         * dom/MessageEvent.h:
897         Store the MessagePort sequence as a Vector<RefPtr<MessagePort>> rather than in a unique_ptr.
898
899         * dom/MessageEvent.idl:
900         Update last type in init functions to be sequence<MessagePort> rather than Array. They are still
901         custom, as we don't quite generate these correctly yet. 
902
903         * dom/MessagePort.cpp:
904         (WebCore::MessagePort::postMessage):
905         (WebCore::MessagePort::dispatchMessages):
906         (WebCore::MessagePort::disentanglePorts):
907         (WebCore::MessagePort::entanglePorts):
908         * dom/MessagePort.h:
909         Update interface to take MessagePort vectors by rvalue reference.
910
911 2016-10-18  Chris Dumez  <cdumez@apple.com>
912
913         [iOS] Drop JSDictionary::convertValue() overload taking a TouchList
914         https://bugs.webkit.org/show_bug.cgi?id=163620
915
916         Reviewed by Sam Weinig.
917
918         Drop JSDictionary::convertValue() overload taking a TouchList now that
919         TouchEvent is using a proper constructor with a TouchEventInit
920         dictionary on iOS.
921
922         * bindings/js/JSDictionary.cpp:
923
924 2016-10-18  Dean Jackson  <dino@apple.com>
925
926         Remove CSS_SHAPES feature definition. This should always be on.
927         https://bugs.webkit.org/show_bug.cgi?id=163628
928         <rdar://problem/28834613>
929
930         Reviewed by Tim Horton.
931
932         CSS Shapes is in Candidate Recommendation. It's a core part
933         of CSS. It should always be enabled.
934
935         * Configurations/FeatureDefines.xcconfig:
936         * css/CSSComputedStyleDeclaration.cpp:
937         (WebCore::shapePropertyValue):
938         (WebCore::ComputedStyleExtractor::propertyValue):
939         * css/CSSPropertyNames.in:
940         * css/CSSValueKeywords.in:
941         * css/StyleBuilderConverter.h:
942         (WebCore::StyleBuilderConverter::convertShapeValue):
943         * css/parser/CSSParser.cpp:
944         (WebCore::isSimpleLengthPropertyID):
945         (WebCore::CSSParser::parseValue):
946         (WebCore::CSSParser::parseShapeProperty):
947         * css/parser/CSSParser.h:
948         * inspector/InspectorOverlay.cpp:
949         (WebCore::buildObjectForShapeOutside):
950         (WebCore::buildObjectForElementData):
951         * page/animation/CSSPropertyAnimation.cpp:
952         (WebCore::blendFunc):
953         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
954         * rendering/FloatingObjects.cpp:
955         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
956         (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded):
957         (WebCore::ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatRight>::updateOffsetIfNeeded):
958         * rendering/RenderBlock.cpp:
959         * rendering/RenderBlockFlow.cpp:
960         (WebCore::RenderBlockFlow::positionNewFloats):
961         * rendering/RenderBox.cpp:
962         (WebCore::RenderBox::~RenderBox):
963         (WebCore::RenderBox::styleDidChange):
964         (WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange):
965         (WebCore::isCandidateForOpaquenessTest):
966         (WebCore::RenderBox::imageChanged):
967         * rendering/RenderBox.h:
968         (WebCore::RenderBox::markShapeOutsideDependentsForLayout):
969         * rendering/RenderElement.cpp:
970         (WebCore::RenderElement::~RenderElement):
971         (WebCore::RenderElement::updateShapeImage):
972         (WebCore::RenderElement::initializeStyle):
973         (WebCore::RenderElement::setStyle):
974         * rendering/RenderElement.h:
975         (WebCore::RenderElement::hasShapeOutside):
976         * rendering/SimpleLineLayout.cpp:
977         (WebCore::SimpleLineLayout::canUseForWithReason):
978         * rendering/line/LineWidth.cpp:
979         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
980         (WebCore::LineWidth::wrapNextToShapeOutside):
981         (WebCore::LineWidth::fitBelowFloats):
982         * rendering/line/LineWidth.h:
983         * rendering/shapes/ShapeOutsideInfo.cpp:
984         * rendering/shapes/ShapeOutsideInfo.h:
985         * rendering/style/RenderStyle.cpp:
986         (WebCore::RenderStyle::changeRequiresLayout):
987         (WebCore::RenderStyle::changeRequiresRepaint):
988         * rendering/style/RenderStyle.h:
989         (WebCore::RenderStyle::initialShapeImageThreshold):
990         * rendering/style/ShapeValue.cpp:
991         * rendering/style/ShapeValue.h:
992         * rendering/style/StyleRareNonInheritedData.cpp:
993         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
994         (WebCore::StyleRareNonInheritedData::operator==):
995         * rendering/style/StyleRareNonInheritedData.h:
996         * style/StylePendingResources.cpp:
997         (WebCore::Style::loadPendingResources):
998
999 2016-10-18  Chris Dumez  <cdumez@apple.com>
1000
1001         convertDictionary<>() no longer needs to return an Optional<> type
1002         https://bugs.webkit.org/show_bug.cgi?id=163624
1003
1004         Reviewed by Sam Weinig.
1005
1006         convertDictionary<>() no longer needs to return an Optional<> type now
1007         that our dictionary structures are all default constructible after
1008         <https://trac.webkit.org/changeset/206974>.
1009
1010         * bindings/js/JSDOMConvert.h:
1011         * bindings/scripts/CodeGeneratorJS.pm:
1012         (GenerateDictionaryHeaderContent):
1013         (GenerateDictionaryImplementationContent):
1014         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1015         (WebCore::convertDictionary<TestEventConstructor::Init>):
1016         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1017         * bindings/scripts/test/JS/JSTestObj.cpp:
1018         (WebCore::convertDictionary<TestObj::Dictionary>):
1019         (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
1020         (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
1021         (WebCore::convertDictionary<AlternateDictionaryName>):
1022         (WebCore::convertDictionary<TestObj::ParentDictionary>):
1023         (WebCore::convertDictionary<TestObj::ChildDictionary>):
1024         * bindings/scripts/test/JS/JSTestObj.h:
1025         * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
1026         (WebCore::convertDictionary<DictionaryImplName>):
1027         * bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
1028
1029 2016-10-18  Chris Dumez  <cdumez@apple.com>
1030
1031         Leverage new union type support for HTMLSelectElement.add() / HTMLOptionsCollection.add()
1032         https://bugs.webkit.org/show_bug.cgi?id=163608
1033
1034         Reviewed by Ryosuke Niwa.
1035
1036         Leverage new union type support for HTMLSelectElement.add() / HTMLOptionsCollection.add():
1037         - https://html.spec.whatwg.org/#htmlselectelement
1038         - https://html.spec.whatwg.org/#htmloptionscollection
1039
1040         No new tests, rebaseline existing test.
1041
1042         * bindings/scripts/CodeGeneratorJS.pm:
1043         (GenerateDefaultValue):
1044         (GenerateParametersCheck):
1045         * bindings/scripts/test/JS/JSTestObj.cpp:
1046         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmptyCaller):
1047         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
1048         (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
1049         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1050         (WebCore::jsTestTypedefsPrototypeFunctionFuncCaller):
1051         * html/HTMLOptGroupElement.idl:
1052         * html/HTMLOptionsCollection.cpp:
1053         (WebCore::HTMLOptionsCollection::add):
1054         * html/HTMLOptionsCollection.h:
1055         * html/HTMLOptionsCollection.idl:
1056         * html/HTMLSelectElement.cpp:
1057         (WebCore::HTMLSelectElement::add):
1058         (WebCore::HTMLSelectElement::setOption):
1059         (WebCore::HTMLSelectElement::setLength):
1060         * html/HTMLSelectElement.h:
1061         * html/HTMLSelectElement.idl:
1062
1063 2016-10-18  Aaron Chu  <aaron_chu@apple.com>
1064
1065         Web Inspector: AXI: focused/focusable state should be based on Accessibility Object instead of Element
1066         https://bugs.webkit.org/show_bug.cgi?id=163088
1067         <rdar://problem/16421985>
1068
1069         Reviewed by Darin Adler.
1070
1071         Changed code in InspectDOMAgent so that it determines the focusability of a Node based
1072         on the AccessibilityNodeObject and not the Element class.
1073
1074         Covered by existing tests: 
1075         LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html
1076
1077         * inspector/InspectorDOMAgent.cpp:
1078         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1079
1080 2016-10-18  Anders Carlsson  <andersca@apple.com>
1081
1082         Get rid of more WebHistoryItem cruft
1083         https://bugs.webkit.org/show_bug.cgi?id=163623
1084
1085         Reviewed by Tim Horton.
1086
1087         * history/HistoryItem.cpp:
1088         (WebCore::HistoryItem::HistoryItem):
1089         * history/HistoryItem.h:
1090         (WebCore::HistoryItem::setViewportArguments):
1091         (WebCore::HistoryItem::bookmarkID): Deleted.
1092         (WebCore::HistoryItem::setBookmarkID): Deleted.
1093         (WebCore::HistoryItem::sharedLinkUniqueIdentifier): Deleted.
1094         (WebCore::HistoryItem::setSharedLinkUniqueIdentifier): Deleted.
1095
1096 2016-10-18  Dave Hyatt  <hyatt@apple.com>
1097
1098         Fix Windows build.
1099  
1100         * css/parser/CSSPropertyParser.cpp:
1101         (WebCore::CSSPropertyParser::parseSingleValue):
1102
1103 2016-10-18  Antoine Quint  <graouts@apple.com>
1104
1105         Modern media controls don't update their rendering correctly
1106         https://bugs.webkit.org/show_bug.cgi?id=163603
1107         <rdar://problem/28826022>
1108
1109         Reviewed by Dean Jackson.
1110
1111         There are rendering issues when we use an absolutely-positioned element
1112         as the top-most element in a media element's shadow root (webkit.org/b/163592).
1113         Since we only need for that element to be positioned, we can use "position: relative"
1114         instead, which removes the rendering issues.
1115
1116         * Modules/modern-media-controls/controls/media-controls.css:
1117         (.media-controls):
1118         (.media-controls,): Deleted.
1119
1120 2016-10-18  Dean Jackson  <dino@apple.com>
1121
1122         Add preliminary support for extended colors to WebCore::Color
1123         https://bugs.webkit.org/show_bug.cgi?id=162878
1124         <rdar://problem/28596413>
1125
1126         Follow-up review comments from Darin Adler.
1127
1128         * html/canvas/CanvasGradient.cpp:
1129         (WebCore::CanvasGradient::addColorStop): Use nullptr.
1130         * platform/graphics/Color.cpp:
1131         (WebCore::Color::Color): Explicitly zero before assigning the pointer.
1132         * platform/graphics/Color.h: Add some comments about the failings of operator== and hash.
1133         (WebCore::Color::Color): Add some static_asserts to the constructors. Move the empty and deleted values
1134         to static constants.
1135         (WebCore::Color::isHashTableDeletedValue):
1136         (WebCore::Color::hash): Replacement for asUint64, which was only being used for a hash.
1137         (WebCore::Color::asUint64): Deleted.
1138         * platform/graphics/ColorHash.h: Use new hash functions. Use "using" instead of typedef.
1139         (WTF::ColorHash::hash):
1140
1141 2016-10-18  Ryosuke Niwa  <rniwa@webkit.org>
1142
1143         REGRESSION (r201471): Keyboard remains visible when swiping back on twitter.com
1144         https://bugs.webkit.org/show_bug.cgi?id=163581
1145         <rdar://problem/27739558>
1146
1147         Reviewed by Simon Fraser.
1148
1149         The bug was caused by Chrome::elementDidBlur not getting called, which resulted in
1150         StopAssistingNode not getting sent to the UI process.
1151
1152         Test: fast/forms/ios/hide-keyboard-on-node-removal.html
1153
1154         * dom/Document.cpp:
1155         (WebCore::Document::setFocusedElement): Restore the behavior prior to r201471 by calling
1156         Chrome::elementDidBlur explicitly.
1157         * html/HTMLTextFormControlElement.cpp:
1158         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent): Added a comment about ordering.
1159
1160 2016-10-17  Anders Carlsson  <andersca@apple.com>
1161
1162         Move some history specific HistoryItem code to WebHistoryItem
1163         https://bugs.webkit.org/show_bug.cgi?id=163567
1164
1165         Reviewed by Tim Horton.
1166
1167         * history/HistoryItem.cpp:
1168         (WebCore::HistoryItem::addRedirectURL): Deleted.
1169         (WebCore::HistoryItem::redirectURLs): Deleted.
1170         (WebCore::HistoryItem::setRedirectURLs): Deleted.
1171         * history/HistoryItem.h:
1172
1173 2016-10-18  Dave Hyatt  <hyatt@apple.com>
1174
1175         [CSS Parser] Get all the properties turned on
1176         https://bugs.webkit.org/show_bug.cgi?id=163605
1177
1178         Reviewed by Dean Jackson.
1179
1180         * WebCore.xcodeproj/project.pbxproj:
1181         * css/CSSFunctionValue.h:
1182         * css/CSSPendingSubstitutionValue.cpp: Added.
1183         (WebCore::CSSPendingSubstitutionValue::customCSSText):
1184         * css/CSSPendingSubstitutionValue.h: Added.
1185         (WebCore::CSSPendingSubstitutionValue::create):
1186         (WebCore::CSSPendingSubstitutionValue::shorthandValue):
1187         (WebCore::CSSPendingSubstitutionValue::shorthandPropertyId):
1188         (WebCore::CSSPendingSubstitutionValue::equals):
1189         (WebCore::CSSPendingSubstitutionValue::CSSPendingSubstitutionValue):
1190         * css/CSSValue.cpp:
1191         (WebCore::CSSValue::cssText):
1192         (WebCore::CSSValue::destroy):
1193         * css/CSSValue.h:
1194         (WebCore::CSSValue::isPendingSubstitutionValue):
1195         * css/CSSValueKeywords.in:
1196         * css/StylePropertyShorthand.cpp:
1197         (WebCore::transitionShorthandForParsing):
1198         * css/StylePropertyShorthand.h:
1199         * css/parser/CSSParser.cpp:
1200         (WebCore::CSSParser::completeURL):
1201         * css/parser/CSSParserImpl.cpp:
1202         (WebCore::CSSParserImpl::parseValue):
1203         (WebCore::CSSParserImpl::consumeDeclaration):
1204         (WebCore::CSSParserImpl::consumeDeclarationValue):
1205         * css/parser/CSSParserMode.h:
1206         (WebCore::CSSParserContext::completeURL):
1207         * css/parser/CSSParserToken.cpp:
1208         (WebCore::CSSParserToken::parseAsCSSPropertyID):
1209         (WebCore::CSSParserToken::parseAsUnresolvedCSSPropertyID): Deleted.
1210         * css/parser/CSSParserToken.h:
1211         * css/parser/CSSPropertyParser.cpp:
1212         (WebCore::cssPropertyID):
1213         (WebCore::CSSPropertyParser::addProperty):
1214         (WebCore::CSSPropertyParser::addExpandedPropertyForValue):
1215         (WebCore::CSSPropertyParser::parseValue):
1216         (WebCore::CSSPropertyParser::parseSingleValue):
1217         (WebCore::CSSPropertyParser::parseValueStart):
1218         (WebCore::CSSPropertyParser::consumeCSSWideKeyword):
1219         (WebCore::consumeTransformOrigin):
1220         (WebCore::consumeWillChange):
1221         (WebCore::consumeFontFeatureTag):
1222         (WebCore::consumeFontFeatureSettings):
1223         (WebCore::consumePage):
1224         (WebCore::consumeQuotes):
1225         (WebCore::FontVariantLigaturesParser::consumeLigature):
1226         (WebCore::FontVariantLigaturesParser::finalizeValue):
1227         (WebCore::consumeFontVariantLigatures):
1228         (WebCore::consumeFontVariantCaps):
1229         (WebCore::FontVariantNumericParser::consumeNumeric):
1230         (WebCore::FontVariantNumericParser::finalizeValue):
1231         (WebCore::consumeFontVariantNumeric):
1232         (WebCore::consumeFontVariantCSS21):
1233         (WebCore::consumeFontVariantList):
1234         (WebCore::consumeFontWeight):
1235         (WebCore::consumeFamilyName):
1236         (WebCore::consumeGenericFamily):
1237         (WebCore::consumeFontFamily):
1238         (WebCore::consumeSpacing):
1239         (WebCore::consumeTabSize):
1240         (WebCore::consumeTextSizeAdjust):
1241         (WebCore::consumeFontSize):
1242         (WebCore::consumeLineHeight):
1243         (WebCore::createPrimitiveValuePair):
1244         (WebCore::consumeCounter):
1245         (WebCore::consumePageSize):
1246         (WebCore::consumeSize):
1247         (WebCore::consumeTextIndent):
1248         (WebCore::validWidthOrHeightKeyword):
1249         (WebCore::consumeMaxWidthOrHeight):
1250         (WebCore::consumeWidthOrHeight):
1251         (WebCore::consumeMarginOrOffset):
1252         (WebCore::consumeClipComponent):
1253         (WebCore::consumeClip):
1254         (WebCore::consumeTouchAction):
1255         (WebCore::consumeLineClamp):
1256         (WebCore::consumeLocale):
1257         (WebCore::consumeColumnWidth):
1258         (WebCore::consumeColumnCount):
1259         (WebCore::consumeColumnGap):
1260         (WebCore::consumeColumnSpan):
1261         (WebCore::consumeZoom):
1262         (WebCore::consumeAnimationIterationCount):
1263         (WebCore::consumeAnimationName):
1264         (WebCore::consumeTransitionProperty):
1265         (WebCore::consumeCubicBezier):
1266         (WebCore::consumeAnimationTimingFunction):
1267         (WebCore::consumeAnimationValue):
1268         (WebCore::isValidAnimationPropertyList):
1269         (WebCore::consumeAnimationPropertyList):
1270         (WebCore::CSSPropertyParser::consumeAnimationShorthand):
1271         (WebCore::consumeZIndex):
1272         (WebCore::parseSingleShadow):
1273         (WebCore::consumeShadow):
1274         (WebCore::consumeFilterFunction):
1275         (WebCore::consumeFilter):
1276         (WebCore::consumeTextDecorationLine):
1277         (WebCore::consumeTextEmphasisStyle):
1278         (WebCore::consumeOutlineColor):
1279         (WebCore::consumeLineWidth):
1280         (WebCore::consumeBorderWidth):
1281         (WebCore::consumeTextStrokeWidth):
1282         (WebCore::consumeColumnRuleWidth):
1283         (WebCore::consumeTranslate3d):
1284         (WebCore::consumeNumbers):
1285         (WebCore::consumePerspective):
1286         (WebCore::consumeTransformValue):
1287         (WebCore::consumeTransform):
1288         (WebCore::consumePositionLonghand):
1289         (WebCore::consumePositionX):
1290         (WebCore::consumePositionY):
1291         (WebCore::consumePaintStroke):
1292         (WebCore::consumePaintOrder):
1293         (WebCore::consumeNoneOrURI):
1294         (WebCore::consumeFlexBasis):
1295         (WebCore::consumeStrokeDasharray):
1296         (WebCore::consumeBaselineShift):
1297         (WebCore::consumeRxOrRy):
1298         (WebCore::consumeCursor):
1299         (WebCore::consumeAttr):
1300         (WebCore::consumeCounterContent):
1301         (WebCore::consumeContent):
1302         (WebCore::consumePositionList):
1303         (WebCore::consumeScrollSnapCoordinate):
1304         (WebCore::consumeScrollSnapPoints):
1305         (WebCore::consumeBorderRadiusCorner):
1306         (WebCore::consumeVerticalAlign):
1307         (WebCore::consumeShapeRadius):
1308         (WebCore::consumeBasicShapeCircle):
1309         (WebCore::consumeBasicShapeEllipse):
1310         (WebCore::consumeBasicShapePolygon):
1311         (WebCore::complete4Sides):
1312         (WebCore::consumeRadii):
1313         (WebCore::consumeBasicShapeInset):
1314         (WebCore::consumeBasicShape):
1315         (WebCore::consumeWebkitClipPath):
1316         (WebCore::consumeShapeOutside):
1317         (WebCore::consumeContentDistributionOverflowPosition):
1318         (WebCore::consumeBorderImageRepeatKeyword):
1319         (WebCore::consumeBorderImageRepeat):
1320         (WebCore::consumeBorderImageSlice):
1321         (WebCore::consumeBorderImageOutset):
1322         (WebCore::consumeBorderImageWidth):
1323         (WebCore::consumeBorderImageComponents):
1324         (WebCore::consumeWebkitBorderImage):
1325         (WebCore::consumeReflect):
1326         (WebCore::consumeImageOrientation):
1327         (WebCore::consumeBackgroundBlendMode):
1328         (WebCore::consumeBackgroundAttachment):
1329         (WebCore::consumeBackgroundBox):
1330         (WebCore::consumeBackgroundComposite):
1331         (WebCore::consumePrefixedBackgroundBox):
1332         (WebCore::consumeBackgroundSize):
1333         (WebCore::consumeGridAutoFlow):
1334         (WebCore::consumeBackgroundComponent):
1335         (WebCore::addBackgroundValue):
1336         (WebCore::consumeCommaSeparatedBackgroundComponent):
1337         (WebCore::consumeSelfPositionKeyword):
1338         (WebCore::consumeSelfPositionOverflowPosition):
1339         (WebCore::consumeAlignItems):
1340         (WebCore::consumeJustifyItems):
1341         (WebCore::consumeFitContent):
1342         (WebCore::consumeCustomIdentForGridLine):
1343         (WebCore::consumeGridLine):
1344         (WebCore::isGridTrackFixedSized):
1345         (WebCore::consumeGridBreadth):
1346         (WebCore::consumeGridTrackSize):
1347         (WebCore::consumeGridLineNames):
1348         (WebCore::consumeGridTrackRepeatFunction):
1349         (WebCore::consumeGridTrackList):
1350         (WebCore::consumeGridTemplatesRowsOrColumns):
1351         (WebCore::consumeGridTemplateAreas):
1352         (WebCore::consumeFontFaceUnicodeRange):
1353         (WebCore::consumeFontFaceSrcURI):
1354         (WebCore::consumeFontFaceSrcLocal):
1355         (WebCore::consumeFontFaceSrc):
1356         (WebCore::CSSPropertyParser::parseFontFaceDescriptor):
1357         (WebCore::CSSPropertyParser::consumeSystemFont):
1358         (WebCore::CSSPropertyParser::consumeFont):
1359         (WebCore::CSSPropertyParser::consumeFontVariantShorthand):
1360         (WebCore::CSSPropertyParser::consumeBorderSpacing):
1361         (WebCore::consumeSingleViewportDescriptor):
1362         (WebCore::CSSPropertyParser::parseViewportDescriptor):
1363         (WebCore::consumeColumnWidthOrCount):
1364         (WebCore::CSSPropertyParser::consumeColumns):
1365         (WebCore::CSSPropertyParser::consumeShorthandGreedily):
1366         (WebCore::CSSPropertyParser::consumeFlex):
1367         (WebCore::CSSPropertyParser::consumeBorder):
1368         (WebCore::CSSPropertyParser::consume4Values):
1369         (WebCore::CSSPropertyParser::consumeBorderImage):
1370         (WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
1371         (WebCore::consumeBackgroundPosition):
1372         (WebCore::consumeRepeatStyleComponent):
1373         (WebCore::consumeRepeatStyle):
1374         (WebCore::CSSPropertyParser::consumeBackgroundShorthand):
1375         (WebCore::CSSPropertyParser::consumeGridItemPositionShorthand):
1376         (WebCore::CSSPropertyParser::consumeGridAreaShorthand):
1377         (WebCore::CSSPropertyParser::consumeGridTemplateRowsAndAreasAndColumns):
1378         (WebCore::CSSPropertyParser::consumeGridTemplateShorthand):
1379         (WebCore::CSSPropertyParser::consumeGridShorthand):
1380         (WebCore::CSSPropertyParser::parseShorthand):
1381         (WebCore::unresolvedCSSPropertyID): Deleted.
1382         * css/parser/CSSPropertyParser.h:
1383         * css/parser/CSSPropertyParserHelpers.cpp:
1384         (WebCore::CSSPropertyParserHelpers::consumeIdent):
1385         (WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
1386         (WebCore::CSSPropertyParserHelpers::consumeString):
1387         (WebCore::CSSPropertyParserHelpers::consumeImageSet):
1388         * css/parser/CSSPropertyParserHelpers.h:
1389
1390 2016-10-18  Brent Fulgham  <bfulgham@apple.com>
1391
1392         Correct Document::removeAllEventListeners
1393         https://bugs.webkit.org/show_bug.cgi?id=163558
1394         <rdar://problem/28716840>
1395
1396         Reviewed by Chris Dumez.
1397
1398         Tested by fast/dom/node-move-to-new-document-crash-main.html.
1399
1400         * dom/Document.cpp:
1401         (WebCore::Document::removeAllEventListeners): Clear out the wheel and
1402         touch event targets when clearing all data.
1403
1404 2016-10-18  Dean Jackson  <dino@apple.com>
1405
1406         Remove dependency cycle with UIKit
1407         https://bugs.webkit.org/show_bug.cgi?id=163577
1408         <rdar://problem/28786160>
1409
1410         Reviewed by Tim Horton.
1411
1412         Soft link against UIKit. Followup patch because
1413         I screwed up and forgot to edit the simulator
1414         configuration.
1415
1416         * Configurations/WebCoreTestSupport.xcconfig:
1417
1418 2016-10-18  Said Abou-Hallawa  <sabouhallawa@apple.com>
1419
1420         SVGCSSParser: m_implicitShorthand value is not reset after adding the shorthand property
1421         https://bugs.webkit.org/show_bug.cgi?id=116470
1422
1423         Reviewed by Simon Fraser.
1424
1425         When we encounter a shorthand css property, we set m_implicitShorthand
1426         to true to tell addProperty() later that the individual properties are
1427         all set through a short hand one. We need to make sure that setting 
1428         m_implicitShorthand to true will not be leaked after finishing parsing
1429         the short hand property.
1430
1431         Test: fast/css/implicit-property-restore.html
1432
1433         * css/parser/CSSParser.cpp:
1434         (WebCore::CSSParser::parseValue):
1435         (WebCore::CSSParser::parseFillShorthand):
1436         (WebCore::CSSParser::parseShorthand):
1437         (WebCore::CSSParser::parse4Values):
1438         (WebCore::CSSParser::parseBorderRadius):
1439         (WTF::ImplicitScope::ImplicitScope): Deleted.
1440         (WTF::ImplicitScope::~ImplicitScope): Deleted.
1441         Get rid of ImplicitScope and replace its calls by TemporaryChange<bool>.
1442         
1443         * css/parser/SVGCSSParser.cpp:
1444         (WebCore::CSSParser::parseSVGValue):
1445         Restore m_implicitShorthand value after setting it temporarily to true.
1446
1447 2016-10-18  Chris Dumez  <cdumez@apple.com>
1448
1449         Update TrackEvent to stop using legacy [ConstructorTemplate=Event]
1450         https://bugs.webkit.org/show_bug.cgi?id=163580
1451
1452         Reviewed by Sam Weinig.
1453
1454         Update TrackEvent to stop using legacy [ConstructorTemplate=Event]
1455         and use a regular constructor as in the specification:
1456         - https://html.spec.whatwg.org/#the-trackevent-interface
1457
1458         No new tests, updated existing tests.
1459
1460         * html/track/TrackEvent.cpp:
1461         (WebCore::TrackEvent::TrackEvent):
1462         * html/track/TrackEvent.h:
1463         * html/track/TrackEvent.idl:
1464
1465 2016-10-18  Commit Queue  <commit-queue@webkit.org>
1466
1467         Unreviewed, rolling out r207409.
1468         https://bugs.webkit.org/show_bug.cgi?id=163602
1469
1470         Introduced many test failures and timeouts, causing release
1471         bot to exit early (Requested by mcatanzaro on #webkit).
1472
1473         Reverted changeset:
1474
1475         "[GTK] Several tests crashing on debug bot in (anonymous
1476         namespace)::MediaPlayerPrivateGStreamerBase::repaint"
1477         https://bugs.webkit.org/show_bug.cgi?id=163511
1478         http://trac.webkit.org/changeset/207409
1479
1480 2016-10-18  Eric Carlson  <eric.carlson@apple.com>
1481
1482         [MediaStream] Resolve constraints and enumerate devices in the UI process
1483         https://bugs.webkit.org/show_bug.cgi?id=162147
1484         <rdar://problem/28803569>
1485
1486         Reviewed by Darin Adler.
1487
1488         Restructure gUM constraint validation and MediaDevices.enumerateDevices so all media device
1489         access happens in the UI process.
1490
1491         No new tests, updated results of existing tests.
1492
1493         * CMakeLists.txt: Add MediaDevicesEnumerationRequest.cpp, delete UserMediaPermissionCheck.cpp.
1494
1495         * Modules/mediastream/MediaConstraintsImpl.cpp:
1496         (WebCore::MediaConstraintsImpl::create): Only create from MediaConstraintsData.
1497         (WebCore::MediaConstraintsImpl::initialize): Deleted.
1498         * Modules/mediastream/MediaConstraintsImpl.h:
1499
1500         * Modules/mediastream/MediaDevicesEnumerationRequest.cpp: Added.
1501         (WebCore::MediaDevicesEnumerationRequest::create):
1502         (WebCore::MediaDevicesEnumerationRequest::MediaDevicesEnumerationRequest):
1503         (WebCore::MediaDevicesEnumerationRequest::~MediaDevicesEnumerationRequest):
1504         (WebCore::MediaDevicesEnumerationRequest::userMediaDocumentOrigin):
1505         (WebCore::MediaDevicesEnumerationRequest::topLevelDocumentOrigin):
1506         (WebCore::MediaDevicesEnumerationRequest::contextDestroyed):
1507         (WebCore::MediaDevicesEnumerationRequest::start):
1508         (WebCore::MediaDevicesEnumerationRequest::cancel):
1509         (WebCore::MediaDevicesEnumerationRequest::setDeviceInfo):
1510         (WebCore::MediaDevicesEnumerationRequest::finish):
1511         * Modules/mediastream/MediaDevicesEnumerationRequest.h: Added.
1512
1513         * Modules/mediastream/MediaDevicesRequest.cpp:
1514         (WebCore::MediaDevicesRequest::~MediaDevicesRequest): Clear the enumeration request.
1515         (WebCore::MediaDevicesRequest::contextDestroyed): Ditto.
1516         (WebCore::MediaDevicesRequest::start): Create and use a MediaDevicesEnumerationRequest.
1517         (WebCore::MediaDevicesRequest::didCompletePermissionCheck): Deleted.
1518         * Modules/mediastream/MediaDevicesRequest.h:
1519
1520         * Modules/mediastream/UserMediaClient.h:
1521         * Modules/mediastream/UserMediaController.h:
1522         (WebCore::UserMediaController::enumerateMediaDevices): New.
1523         (WebCore::UserMediaController::cancelMediaDevicesEnumerationRequest): New.
1524         (WebCore::UserMediaController::checkUserMediaPermission): Deleted.
1525         (WebCore::UserMediaController::cancelUserMediaPermissionCheck): Deleted.
1526
1527         * Modules/mediastream/UserMediaPermissionCheck.h: Deleted.
1528         * Modules/mediastream/UserMediaPermissionCheck.cpp: Deleted.
1529
1530         * Modules/mediastream/UserMediaRequest.cpp:
1531         (WebCore::UserMediaRequest::UserMediaRequest):
1532         (WebCore::UserMediaRequest::start):
1533         (WebCore::UserMediaRequest::allow):
1534         (WebCore::UserMediaRequest::deny):
1535         (WebCore::UserMediaRequest::constraintsValidated): Deleted.
1536         (WebCore::UserMediaRequest::userMediaAccessGranted): Deleted.
1537         (WebCore::UserMediaRequest::userMediaAccessDenied): Deleted.
1538         (WebCore::UserMediaRequest::constraintsInvalid): Deleted.
1539         (WebCore::UserMediaRequest::didCreateStream): Deleted.
1540         (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Deleted.
1541         (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Deleted.
1542         * Modules/mediastream/UserMediaRequest.h:
1543
1544         * WebCore.xcodeproj/project.pbxproj: Add MediaDevicesEnumerationRequest.*.
1545
1546         * platform/mediastream/CaptureDevice.h:
1547         (WebCore::CaptureDevice::CaptureDevice):
1548         (WebCore::CaptureDevice::setPersistentId): Add setter for argument decoder.
1549         (WebCore::CaptureDevice::setLabel): Ditto.
1550         (WebCore::CaptureDevice::setGroupId): Ditto.
1551         (WebCore::CaptureDevice::setKind): Ditto.
1552
1553         * platform/mediastream/CaptureDeviceManager.h: Remove unnecessary include.
1554
1555         * platform/mediastream/MediaConstraints.h:
1556         (WebCore::MediaConstraint::encode): New.
1557         (WebCore::MediaConstraint::decode): Ditto.
1558         (WebCore::NumericConstraint::encode): Ditto.
1559         (WebCore::NumericConstraint::decode): Ditto.
1560
1561         * platform/mediastream/MediaStreamCreationClient.h: Deleted.
1562
1563         * platform/mediastream/RealtimeMediaSourceCenter.h: Use completion handlers instead of client interface.
1564
1565         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
1566         (WebCore::AVCaptureDeviceManager::refreshCaptureDeviceList): Drive-by fix: don't initialize
1567         group id, we don't support it.
1568
1569         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
1570         (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints): Update for interface change.
1571         (WebCore::RealtimeMediaSourceCenterMac::createMediaStream): Ditto.
1572         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
1573
1574         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
1575         (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints): Ditto.
1576         (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Ditto.
1577         (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable): Ditto.
1578         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
1579
1580         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
1581         (WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints): Ditto.
1582         (WebCore::MockRealtimeMediaSourceCenter::createMediaStream): Ditto.
1583         * platform/mock/MockRealtimeMediaSourceCenter.h:
1584
1585 2016-10-18  Zan Dobersek  <zdobersek@igalia.com>
1586
1587         [WebIDL] Support BufferSource
1588         https://bugs.webkit.org/show_bug.cgi?id=163541
1589
1590         Reviewed by Youenn Fablet.
1591
1592         Add support for the BufferSource typedef in WebIDL. The implementation
1593         adds the necessary handling for this type in the generator scripts and
1594         the specialization of the Converter<> template for the IDLBufferSource
1595         struct that enables exposing ArrayBuffer or ArrayBufferView objects by
1596         having WebCore::BufferSource objects pointing to their data.
1597
1598         The SourceBuffer interface in the MSE module has the appendBuffer()
1599         operation modified to accept a BufferSource parameter, instead of
1600         overloading it for ArrayBuffer and ArrayBufferView parameters.
1601
1602         The bindings generator tests cover BufferSource as both an operation
1603         parameter and as a dictionary member.
1604
1605         * Modules/mediasource/SourceBuffer.cpp:
1606         (WebCore::SourceBuffer::appendBuffer):
1607         (WebCore::SourceBuffer::appendBufferInternal):
1608         * Modules/mediasource/SourceBuffer.h:
1609         * Modules/mediasource/SourceBuffer.idl:
1610         * WebCore.xcodeproj/project.pbxproj:
1611         * bindings/generic/IDLTypes.h:
1612         * bindings/js/BufferSource.h: Added.
1613         * bindings/js/JSDOMConvert.h:
1614         (WebCore::Converter<IDLBufferSource>::convert):
1615         * bindings/scripts/CodeGenerator.pm:
1616         (SkipIncludeHeader):
1617         (IsWrapperType):
1618         * bindings/scripts/CodeGeneratorJS.pm:
1619         (AddClassForwardIfNeeded):
1620         (GetBaseIDLType):
1621         (IsHandledByDOMConvert):
1622         * bindings/scripts/test/JS/JSTestObj.cpp:
1623         (WebCore::convertDictionary<TestObj::Dictionary>):
1624         (WebCore::jsTestObjPrototypeFunctionBufferSourceParameter):
1625         (WebCore::jsTestObjPrototypeFunctionBufferSourceParameterCaller):
1626         * bindings/scripts/test/TestObj.idl:
1627
1628 2016-10-18  Javier Fernandez  <jfernandez@igalia.com>
1629
1630         [css-grid] Different width of grid container between initial load and refresh
1631         https://bugs.webkit.org/show_bug.cgi?id=163535
1632
1633         Reviewed by Manuel Rego Casasnovas.
1634
1635         Grid's layout logic manages two different override sizes; one it's
1636         designed to implement the grid item's stretching behavior, identified
1637         with the concept of 'overrideContentLogicalSize'; there is another
1638         override size, known as overrideContainingBlockContentLogicalSize,
1639         used to implement the Grid Area abstraction, which will behave as
1640         the actual containing block of any grid item.
1641
1642         During grid's layout logic these override sizes are set according
1643         to the CSS style rules. This affects how the grid container and its
1644         children are going to be sized during layout. Grid Tracks sizing
1645         algorithm depends on these override sizes.
1646
1647         In order to ensure that the tracks sizing algorithm produces the
1648         same results when it's run consecutively several times, we need to
1649         clear these override sizes and perform a layout of the affected grid
1650         items. Otherwise, the affected items will return sizing values which
1651         depend on the override values set in the previous layout, which in
1652         some cases, like orthogonal flows, may change through different runs
1653         of the sizing algorithm.
1654
1655         Test: fast/css-grid-layout/repeating-layout-must-produce-the-same-results.html
1656
1657         * rendering/RenderGrid.cpp:
1658         (WebCore::RenderGrid::layoutBlock):
1659
1660 2016-10-18  Youenn Fablet  <youenn@apple.com>
1661
1662         CachedResourceLoader should not need to remove fragment identifier
1663         https://bugs.webkit.org/show_bug.cgi?id=163015
1664
1665         Reviewed by Darin Adler.
1666
1667         No expected change for non-window port.
1668         For window port, CachedResourceLoader will strip the fragment identifier of the URL passed to subresourceForURL
1669         before querying the memory cache.
1670
1671         Removing the fragment identifier from the request stored in CachedResourceRequest.
1672         The fragment identifier is stored in a separate field.
1673
1674         This allows CachedResourceLoader to not care about fragment identifier.
1675         CachedResource can then get access to it.
1676
1677         * loader/cache/CachedResource.cpp:
1678         (WebCore::CachedResource::CachedResource):
1679         (WebCore::CachedResource::finishRequestInitialization): Deleted.
1680         * loader/cache/CachedResource.h:
1681         * loader/cache/CachedResourceLoader.cpp:
1682         (WebCore::CachedResourceLoader::cachedResource):
1683         Updated the method taking a const String& to strip the fragment identifier if needed.
1684         Updated the method taking a const URL& to assert if the fragment identifier is present.
1685         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1686         (WebCore::CachedResourceLoader::requestResource):
1687         * loader/cache/CachedResourceRequest.cpp:
1688         (WebCore::CachedResourceRequest::CachedResourceRequest):
1689         (WebCore::CachedResourceRequest::splitFragmentIdentifierFromRequestURL):
1690         * loader/cache/CachedResourceRequest.h:
1691         (WebCore::CachedResourceRequest::releaseFragmentIdentifier):
1692         (WebCore::CachedResourceRequest::clearFragmentIdentifier):
1693         * loader/cache/MemoryCache.cpp:
1694         (WebCore::MemoryCache::shouldRemoveFragmentIdentifier):
1695         (WebCore::MemoryCache::removeFragmentIdentifierIfNeeded):
1696         (WebCore::MemoryCache::revalidationSucceeded):
1697         (WebCore::MemoryCache::resourceForRequest):
1698         * loader/cache/MemoryCache.h:
1699
1700 2016-10-18  Antti Koivisto  <antti@apple.com>
1701
1702         Rename setNeedsStyleRecalc to invalidateStyle
1703         https://bugs.webkit.org/show_bug.cgi?id=163542
1704
1705         Reviewed by Darin Adler.
1706
1707         Also rename StyleChangeType enum and some related functions for clarity. For example
1708
1709             element.setNeedsStyleRecalc(SyntheticStyleChange);
1710
1711         becomes
1712
1713             element.invalidateStyleAndLayerComposition();
1714
1715         * WebCore.xcodeproj/project.pbxproj:
1716         * css/StyleInvalidationAnalysis.cpp:
1717         (WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):
1718         * dom/Document.cpp:
1719         (WebCore::Document::recalcStyle):
1720         (WebCore::Document::updateViewportUnitsOnResize):
1721         (WebCore::Document::setCSSTarget):
1722         (WebCore::unwrapFullScreenRenderer):
1723         (WebCore::Document::setAnimatingFullScreen):
1724         * dom/Element.cpp:
1725         (WebCore::Element::setActive):
1726         (WebCore::Element::setFocus):
1727         (WebCore::Element::setHovered):
1728         (WebCore::Element::attributeChanged):
1729         (WebCore::Element::invalidateStyle):
1730         (WebCore::Element::invalidateStyleAndLayerComposition):
1731         (WebCore::Element::invalidateStyleForSubtree):
1732         (WebCore::Element::invalidateStyleAndRenderersForSubtree):
1733
1734             Move public invalidation functions to Element tightening typing.
1735             Use separate functions instead of enum values.
1736             This way the call sites look nicer and only useful combinations are exposed.
1737
1738         (WebCore::Element::addShadowRoot):
1739         (WebCore::checkForEmptyStyleChange):
1740         (WebCore::checkForSiblingStyleChanges):
1741         (WebCore::Element::needsStyleInvalidation):
1742         (WebCore::Element::setContainsFullScreenElement):
1743         * dom/Element.h:
1744         (WebCore::Element::setHasFocusWithin):
1745         * dom/Node.cpp:
1746         (WebCore::computeEditabilityFromComputedStyle):
1747         (WebCore::Node::adjustStyleValidity):
1748
1749             Update validity and mode separately. There was a potential bug here where
1750             SyntheticStyleChange could overwrite FullStyleChange (no known repro).
1751
1752         (WebCore::Node::updateAncestorsForStyleRecalc):
1753         (WebCore::Node::invalidateStyle):
1754         (WebCore::Node::insertedInto):
1755         (WebCore::Node::setNeedsStyleRecalc): Deleted.
1756         * dom/Node.h:
1757         (WebCore::Node::needsStyleRecalc):
1758         (WebCore::Node::styleValidity):
1759         (WebCore::Node::styleResolutionShouldRecompositeLayer):
1760         (WebCore::Node::setHasValidStyle):
1761         (WebCore::Node::styleChangeType): Deleted.
1762         (WebCore::Node::clearNeedsStyleRecalc): Deleted.
1763         (WebCore::Node::setStyleChange): Deleted.
1764         * dom/RadioButtonGroups.cpp:
1765         (WebCore::RadioButtonGroup::remove):
1766         (WebCore::RadioButtonGroup::setNeedsStyleRecalcForAllButtons):
1767         * dom/ShadowRoot.cpp:
1768         (WebCore::ShadowRoot::setResetStyleInheritance):
1769         * dom/SlotAssignment.cpp:
1770         (WebCore::SlotAssignment::addSlotElementByName):
1771         (WebCore::SlotAssignment::removeSlotElementByName):
1772         (WebCore::SlotAssignment::didChangeSlot):
1773         * dom/StyledElement.cpp:
1774         (WebCore::StyledElement::attributeChanged):
1775         (WebCore::StyledElement::styleAttributeChanged):
1776         (WebCore::StyledElement::invalidateStyleAttribute):
1777         * dom/Text.cpp:
1778         (WebCore::Text::updateRendererAfterContentChange):
1779         * dom/VisitedLinkState.cpp:
1780         (WebCore::VisitedLinkState::invalidateStyleForAllLinks):
1781         (WebCore::VisitedLinkState::invalidateStyleForLink):
1782         * editing/FrameSelection.cpp:
1783         (WebCore::FrameSelection::focusedOrActiveStateChanged):
1784         * html/BaseDateAndTimeInputType.cpp:
1785         (WebCore::BaseDateAndTimeInputType::minOrMaxAttributeChanged):
1786         * html/FileInputType.cpp:
1787         (WebCore::FileInputType::setValue):
1788         * html/HTMLAnchorElement.cpp:
1789         (WebCore::HTMLAnchorElement::parseAttribute):
1790         * html/HTMLBodyElement.cpp:
1791         (WebCore::HTMLBodyElement::parseAttribute):
1792         * html/HTMLCanvasElement.cpp:
1793         (WebCore::HTMLCanvasElement::getContext):
1794         (WebCore::HTMLCanvasElement::createImageBuffer):
1795         * html/HTMLElement.cpp:
1796         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
1797         (WebCore::HTMLElement::calculateAndAdjustDirectionality):
1798         * html/HTMLFieldSetElement.cpp:
1799         (WebCore::HTMLFieldSetElement::addInvalidDescendant):
1800         (WebCore::HTMLFieldSetElement::removeInvalidDescendant):
1801         * html/HTMLFormControlElement.cpp:
1802         (WebCore::HTMLFormControlElement::disabledStateChanged):
1803         (WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
1804         (WebCore::HTMLFormControlElement::requiredAttributeChanged):
1805         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
1806         (WebCore::HTMLFormControlElement::updateValidity):
1807         * html/HTMLFormElement.cpp:
1808         (WebCore::HTMLFormElement::registerFormElement):
1809         (WebCore::HTMLFormElement::registerInvalidAssociatedFormControl):
1810         (WebCore::HTMLFormElement::removeInvalidAssociatedFormControlIfNeeded):
1811         (WebCore::HTMLFormElement::resetDefaultButton):
1812         * html/HTMLFrameElementBase.cpp:
1813         (WebCore::HTMLFrameElementBase::finishedInsertingSubtree):
1814         * html/HTMLFrameOwnerElement.cpp:
1815         (WebCore::HTMLFrameOwnerElement::scheduleinvalidateStyleAndLayerComposition):
1816         (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Deleted.
1817         * html/HTMLFrameOwnerElement.h:
1818         * html/HTMLFrameSetElement.cpp:
1819         (WebCore::HTMLFrameSetElement::parseAttribute):
1820         (WebCore::HTMLFrameSetElement::willRecalcStyle):
1821         * html/HTMLInputElement.cpp:
1822         (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
1823         (WebCore::HTMLInputElement::parseAttribute):
1824         (WebCore::HTMLInputElement::setChecked):
1825         (WebCore::HTMLInputElement::setIndeterminate):
1826         (WebCore::HTMLInputElement::setAutoFilled):
1827         (WebCore::HTMLInputElement::maxLengthAttributeChanged):
1828         (WebCore::HTMLInputElement::minLengthAttributeChanged):
1829         * html/HTMLLinkElement.cpp:
1830         (WebCore::HTMLLinkElement::parseAttribute):
1831         * html/HTMLMediaElement.cpp:
1832         (WebCore::HTMLMediaElement::mediaPlayerRenderingModeChanged):
1833         (WebCore::HTMLMediaElement::setVideoFullscreenLayer):
1834         * html/HTMLObjectElement.cpp:
1835         (WebCore::HTMLObjectElement::parseAttribute):
1836         (WebCore::HTMLObjectElement::childrenChanged):
1837         (WebCore::HTMLObjectElement::renderFallbackContent):
1838         * html/HTMLOptGroupElement.cpp:
1839         (WebCore::HTMLOptGroupElement::parseAttribute):
1840         * html/HTMLOptionElement.cpp:
1841         (WebCore::HTMLOptionElement::parseAttribute):
1842         (WebCore::HTMLOptionElement::setSelectedState):
1843         * html/HTMLPlugInElement.cpp:
1844         (WebCore::HTMLPlugInElement::didAddUserAgentShadowRoot):
1845         * html/HTMLPlugInImageElement.cpp:
1846         (WebCore::HTMLPlugInImageElement::setDisplayState):
1847         (WebCore::HTMLPlugInImageElement::willRecalcStyle):
1848         (WebCore::HTMLPlugInImageElement::finishParsingChildren):
1849         (WebCore::HTMLPlugInImageElement::resumeFromDocumentSuspension):
1850         (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
1851         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
1852         * html/HTMLProgressElement.cpp:
1853         (WebCore::HTMLProgressElement::didElementStateChange):
1854         * html/HTMLSelectElement.cpp:
1855         (WebCore::HTMLSelectElement::parseAttribute):
1856         (WebCore::HTMLSelectElement::setRecalcListItems):
1857         (WebCore::HTMLSelectElement::parseMultipleAttribute):
1858         (WebCore::HTMLSelectElement::reset):
1859         * html/HTMLTableElement.cpp:
1860         (WebCore::isTableCellAncestor):
1861         (WebCore::setTableCellsChanged):
1862         (WebCore::HTMLTableElement::parseAttribute):
1863         * html/HTMLTextAreaElement.cpp:
1864         (WebCore::HTMLTextAreaElement::setValueCommon):
1865         * html/HTMLTextFormControlElement.cpp:
1866         (WebCore::HTMLTextFormControlElement::updatePlaceholderVisibility):
1867         * html/InputType.cpp:
1868         (WebCore::InputType::setValue):
1869         * html/NumberInputType.cpp:
1870         (WebCore::NumberInputType::minOrMaxAttributeChanged):
1871         * html/TextFieldInputType.cpp:
1872         (WebCore::TextFieldInputType::subtreeHasChanged):
1873         * mathml/MathMLElement.cpp:
1874         (WebCore::MathMLElement::parseAttribute):
1875         * mathml/MathMLSelectElement.cpp:
1876         (WebCore::MathMLSelectElement::updateSelectedChild):
1877         * page/animation/AnimationBase.cpp:
1878         (WebCore::AnimationBase::setNeedsStyleRecalc):
1879         * page/animation/AnimationController.cpp:
1880         (WebCore::AnimationControllerPrivate::clear):
1881         (WebCore::AnimationControllerPrivate::updateAnimations):
1882         (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle):
1883         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
1884         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
1885         (WebCore::AnimationController::cancelAnimations):
1886         * rendering/RenderImage.cpp:
1887         (WebCore::RenderImage::imageChanged):
1888         * rendering/RenderLayer.cpp:
1889         (WebCore::RenderLayer::calculateClipRects):
1890         * rendering/RenderLayerCompositor.cpp:
1891         (WebCore::RenderLayerCompositor::attachRootLayer):
1892         (WebCore::RenderLayerCompositor::detachRootLayer):
1893         (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
1894         * rendering/RenderObject.cpp:
1895         (WebCore::RenderObject::updateDragState):
1896         * rendering/svg/SVGResourcesCache.cpp:
1897         (WebCore::SVGResourcesCache::clientStyleChanged):
1898         * style/AttributeChangeInvalidation.cpp:
1899         (WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
1900         * style/ClassChangeInvalidation.cpp:
1901         (WebCore::Style::ClassChangeInvalidation::invalidateStyle):
1902         * style/IdChangeInvalidation.cpp:
1903         (WebCore::Style::IdChangeInvalidation::invalidateStyle):
1904         * style/RenderTreeUpdater.cpp:
1905         (WebCore::RenderTreeUpdater::updateElementRenderer):
1906         * style/StyleScope.cpp:
1907         (WebCore::Style::Scope::updateActiveStyleSheets):
1908         * style/StyleTreeResolver.cpp:
1909         (WebCore::Style::resetStyleForNonRenderedDescendants):
1910         (WebCore::Style::TreeResolver::resolveElement):
1911         (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
1912         (WebCore::Style::TreeResolver::popParent):
1913         (WebCore::Style::clearNeedsStyleResolution):
1914         (WebCore::Style::TreeResolver::resolveComposedTree):
1915         * style/StyleUpdate.h:
1916         * style/StyleValidity.h: Added.
1917
1918             StyleChangeType enum splits into Style::Validity and Style::InvalidationMode.
1919             Move to a file of its own.
1920
1921         * svg/SVGAElement.cpp:
1922         (WebCore::SVGAElement::svgAttributeChanged):
1923         * svg/SVGAnimateElementBase.cpp:
1924         (WebCore::applyCSSPropertyToTarget):
1925         (WebCore::removeCSSPropertyFromTarget):
1926         * svg/SVGElement.cpp:
1927         (WebCore::SVGElement::willRecalcStyle):
1928         * svg/SVGElement.h:
1929         (WebCore::SVGElement::invalidateSVGPresentationAttributeStyle):
1930         * svg/SVGTests.cpp:
1931         (WebCore::SVGTests::handleAttributeChange):
1932         * svg/SVGUseElement.cpp:
1933         (WebCore::SVGUseElement::invalidateShadowTree):
1934         * testing/Internals.cpp:
1935         (WebCore::styleValidityToToString):
1936         (WebCore::Internals::styleChangeType):
1937         (WebCore::styleChangeTypeToString): Deleted.
1938
1939 2016-10-17  Sergio Villar Senin  <svillar@igalia.com>
1940
1941         [css-grid] Constrain by min|max-height on auto repeat computation
1942         https://bugs.webkit.org/show_bug.cgi?id=163540
1943
1944         Reviewed by Darin Adler.
1945
1946         The max-height (if definite) is used to compute the number of auto repeat rows whenever the
1947         height is indefinite. We were using the min-height only in case both values were indefinite.
1948
1949         Although not explicitly mentioned by grid specs, it's reasonable to assume that
1950         the min-height trumps the used value of height/max-height like it always does, per CSS
1951         2.2. Note that the number of rows still needs to fit within that size even if using
1952         min-height, because we're just using min-height to compute the used value of the height
1953         property. If both height and max-height are indefinite we keep doing the same, i.e., compute
1954         the minimum number of rows that fulfill min-height (if definite).
1955
1956         * rendering/RenderGrid.cpp:
1957         (WebCore::RenderGrid::computeAutoRepeatTracksCount):
1958
1959 2016-10-17  Yusuke Suzuki  <utatane.tea@gmail.com>
1960
1961         [DOMJIT] Use NativeCallFrameTracer for operations used for DOMJIT slow calls
1962         https://bugs.webkit.org/show_bug.cgi?id=163586
1963
1964         Reviewed by Saam Barati.
1965
1966         * domjit/JSNodeDOMJIT.cpp:
1967         (WebCore::toWrapperSlow):
1968
1969 2016-10-18  Ryuan Choi  <ryuan.choi@navercorp.com>
1970
1971         [EFL] Build break since r207442
1972         https://bugs.webkit.org/show_bug.cgi?id=163587
1973
1974         Unreviewed.
1975
1976         Since r207442, setRGB is moved to private.
1977
1978         * rendering/RenderThemeEfl.cpp:
1979         (WebCore::fillColorsFromEdjeClass):
1980
1981 2016-10-17  Dean Jackson  <dino@apple.com>
1982
1983         Remove dependency cycle with UIKit
1984         https://bugs.webkit.org/show_bug.cgi?id=163577
1985         <rdar://problem/28786160>
1986
1987         Reviewed by Tim Horton.
1988
1989         Soft link against UIKit.
1990
1991         * Configurations/WebCoreTestSupport.xcconfig:
1992         * testing/Internals.mm:
1993
1994 2016-10-17  Dean Jackson  <dino@apple.com>
1995
1996         Allow creation of ExtendedColors and make Color immutable
1997         https://bugs.webkit.org/show_bug.cgi?id=163557
1998         <rdar://problem/28805360>
1999
2000         Reviewed by Darin Adler and Dave Hyatt.
2001
2002         1. Support the creation of ExtendedColor objects via the
2003         Color class.
2004
2005         2. Fix the remaining few places where a Color object is
2006         modified after creation, instead creating a new Color.
2007         Move all the mutation methods into the private section,
2008         making Color now immutable.
2009
2010         Changes to Color are covered by existing tests. Changes
2011         to ExtendedColor are covered by the ExtendedColor API test.
2012
2013         * css/parser/CSSParser.cpp:
2014         (WebCore::CSSParser::fastParseColor): Return a new named Color.
2015
2016         * dom/Document.cpp:
2017         (WebCore::Document::resetActiveLinkColor): Set to be the named "red" color.
2018
2019         * html/HTMLElement.cpp:
2020         (WebCore::HTMLElement::addHTMLColorToStyle): Use the string-based constructor
2021         where possible.
2022
2023         * page/CaptionUserPreferencesMediaAF.cpp:
2024         (WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS): No need to
2025         use the string "black" here - we have a constant value.
2026
2027         * platform/graphics/cairo/GraphicsContextCairo.cpp: Don't use setRGB.
2028
2029         * platform/graphics/Color.cpp:
2030         (WebCore::findNamedColor): Move this up in the file.
2031         (WebCore::Color::Color): Copy in the code from setNamedColor. Also
2032         add a constructor for ExtendedColor.
2033         (WebCore::Color::serialized): Call ExtendedColor's serializer if necessary.
2034         (WebCore::Color::cssText): Ditto.
2035         (WebCore::Color::setNamedColor): Deleted.
2036         (WebCore::Color::tagAsExtended): Deleted.
2037
2038         * platform/graphics/Color.h: Add a new constructor.
2039         (WebCore::Color::setRGB): Move to private.
2040
2041         * platform/graphics/ExtendedColor.cpp:
2042         (WebCore::ExtendedColor::cssText): Implement serializer.
2043         * platform/graphics/ExtendedColor.h:
2044
2045         * rendering/style/RenderStyle.cpp:
2046         (WebCore::RenderStyle::colorIncludingFallback): Construct a new Color rather than changing an existing object.
2047
2048 2016-10-17  Simon Fraser  <simon.fraser@apple.com>
2049
2050         Implement DOMRect/DOMRectReadOnly
2051         https://bugs.webkit.org/show_bug.cgi?id=163464
2052
2053         Reviewed by Darin Adler.
2054         
2055         Implement the DOMRectInit/DOMRectReadOnly/DOMRect interfaces specified in
2056         https://dev.w3.org/fxtf/geometry/
2057         
2058         DOMRects allow negative height/width and require double storage, so we can't just
2059         use FloatRect for storage. They also require handling of NaN and Infinity.
2060         
2061         To have the left/right/top/bottom accessors follow IEEE NaN rules, we need to use
2062         custom min/max functions that return NaN if either argument is NaN, so add 
2063         nanPropagatingMin/nanPropagatingMax helpers to MathExtras.h.
2064
2065         Test: fast/dom/domrect.html
2066
2067         * CMakeLists.txt:
2068         * DerivedSources.make:
2069         * WebCore.xcodeproj/project.pbxproj:
2070         * dom/DOMRect.h: Added.
2071         (WebCore::DOMRect::create):
2072         (WebCore::DOMRect::fromRect):
2073         (WebCore::DOMRect::setX):
2074         (WebCore::DOMRect::setY):
2075         (WebCore::DOMRect::setWidth):
2076         (WebCore::DOMRect::setHeight):
2077         (WebCore::DOMRect::DOMRect):
2078         * dom/DOMRect.idl: Added.
2079         * dom/DOMRectInit.h: Added.
2080         * dom/DOMRectInit.idl: Added.
2081         * dom/DOMRectReadOnly.h: Added.
2082         (WebCore::DOMRectReadOnly::create):
2083         (WebCore::DOMRectReadOnly::fromRect):
2084         (WebCore::DOMRectReadOnly::x):
2085         (WebCore::DOMRectReadOnly::y):
2086         (WebCore::DOMRectReadOnly::width):
2087         (WebCore::DOMRectReadOnly::height):
2088         (WebCore::DOMRectReadOnly::top):
2089         (WebCore::DOMRectReadOnly::right):
2090         (WebCore::DOMRectReadOnly::bottom):
2091         (WebCore::DOMRectReadOnly::left):
2092         (WebCore::DOMRectReadOnly::DOMRectReadOnly):
2093         * dom/DOMRectReadOnly.idl: Added.
2094
2095 2016-10-17  Antoine Quint  <graouts@apple.com>
2096
2097         [Modern Media Controls] Basic MediaController
2098         https://bugs.webkit.org/show_bug.cgi?id=163539
2099         <rdar://problem/28797542>
2100
2101         Reviewed by Darin Adler.
2102
2103         We add a new main.js file which acts as the entry point by implementing the createControls()
2104         function that HTMLMediaElement::ensureMediaControlsInjectedScript() once the shadow root has
2105         been created. That functions creates an instance of the new MediaController class, which is
2106         the controller object that will handle communication between the media controls and the media
2107         element. At first, this MediaController class is very limited and assumes macOS inline
2108         layout traits and forces a start button to be shown over the media, which can be played
2109         to start the media and show the full controls. More functionality will be added by future patches.
2110
2111         Tests: media/modern-media-controls/media-controller/media-controller-click-to-start.html
2112                media/modern-media-controls/media-controller/media-controller-constructor.html
2113                media/modern-media-controls/media-controller/media-controller-resize.html
2114
2115         * Modules/modern-media-controls/main.js: Added.
2116         (createControls):
2117         * Modules/modern-media-controls/media/media-controller.js: Added.
2118         (MediaController):
2119         (MediaController.prototype.set pageScaleFactor):
2120         (MediaController.prototype.set usesLTRUserInterfaceLayoutDirection):
2121         (MediaController.prototype.handleEvent):
2122         (MediaController.prototype.buttonWasClicked):
2123         (MediaController.prototype._updateControlsSize):
2124         * WebCore.xcodeproj/project.pbxproj:
2125         * rendering/RenderThemeMac.mm:
2126         (WebCore::RenderThemeMac::mediaControlsStyleSheet):
2127         (WebCore::RenderThemeMac::mediaControlsScript):
2128
2129 2016-10-17  Anders Carlsson  <andersca@apple.com>
2130
2131         Remove an unused HistoryItem function
2132         https://bugs.webkit.org/show_bug.cgi?id=163565
2133
2134         Reviewed by Tim Horton.
2135
2136         * history/HistoryItem.cpp:
2137         (WebCore::HistoryItem::isAncestorOf): Deleted.
2138         * history/HistoryItem.h:
2139
2140 2016-10-17  Nan Wang  <n_wang@apple.com>
2141
2142         AX: [Mac] mapping for output elements
2143         https://bugs.webkit.org/show_bug.cgi?id=163471
2144
2145         Reviewed by Chris Fleizach.
2146
2147         Mapped the output element to status role and exposed its text content
2148         as AXTitle. 
2149
2150         Test: accessibility/mac/output-element.html
2151
2152         * English.lproj/Localizable.strings:
2153         * accessibility/AccessibilityNodeObject.cpp:
2154         (WebCore::AccessibilityNodeObject::visibleText):
2155         * accessibility/AccessibilityObject.cpp:
2156         (WebCore::AccessibilityObject::isOutput):
2157         * accessibility/AccessibilityObject.h:
2158         * accessibility/AccessibilityRenderObject.cpp:
2159         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2160         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2161         (-[WebAccessibilityObjectWrapper roleDescription]):
2162         * platform/LocalizedStrings.cpp:
2163         (WebCore::AXOutputText):
2164         * platform/LocalizedStrings.h:
2165         * platform/efl/LocalizedStringsEfl.cpp:
2166         (WebCore::AXOutputText):
2167         * platform/gtk/LocalizedStringsGtk.cpp:
2168         (WebCore::AXOutputText):
2169
2170 2016-10-17  Yusuke Suzuki  <utatane.tea@gmail.com>
2171
2172         [DOMJIT] Use DOMJIT::Patchpoint in IC
2173         https://bugs.webkit.org/show_bug.cgi?id=163223
2174
2175         Reviewed by Saam Barati.
2176
2177         Make DOMJITPatchpointParams non-const.
2178
2179         * domjit/DOMJITHelpers.h:
2180         (WebCore::DOMJITHelpers::toWrapper):
2181         * domjit/JSNodeDOMJIT.cpp:
2182         (WebCore::createCallDOMForOffsetAccess):
2183         (WebCore::checkNode):
2184         (WebCore::NodeNodeTypeDOMJIT::callDOM):
2185
2186 2016-10-17  Chris Dumez  <cdumez@apple.com>
2187
2188         Move form.reportValidity() behind InteractiveFormValidation setting
2189         https://bugs.webkit.org/show_bug.cgi?id=163550
2190
2191         Reviewed by Darin Adler.
2192
2193         Move form.reportValidity() behind InteractiveFormValidation setting for consistency
2194         given that the two features are strongly related.
2195
2196         Also enable the setting by default so we can get feedback on the implementation.
2197
2198         Demos:
2199         - Interactive form validation: http://jsfiddle.net/tj_vantoll/HdSqt/
2200         - Report validity: https://googlechrome.github.io/samples/report-validity/
2201
2202         * bindings/generic/RuntimeEnabledFeatures.h:
2203         (WebCore::RuntimeEnabledFeatures::setInteractiveFormValidationEnabled):
2204         (WebCore::RuntimeEnabledFeatures::interactiveFormValidationEnabled):
2205         * html/HTMLButtonElement.idl:
2206         * html/HTMLFieldSetElement.idl:
2207         * html/HTMLFormElement.idl:
2208         * html/HTMLInputElement.idl:
2209         * html/HTMLKeygenElement.idl:
2210         * html/HTMLObjectElement.idl:
2211         * html/HTMLOutputElement.idl:
2212         * html/HTMLSelectElement.idl:
2213         * html/HTMLTextAreaElement.idl:
2214
2215 2016-10-17  Antoine Quint  <graouts@apple.com>
2216
2217         [Modern Media Controls] Add a MediaControlsHost API to retrieve images as base64
2218         https://bugs.webkit.org/show_bug.cgi?id=163502
2219         <rdar://problem/28792017>
2220
2221         Reviewed by Darin Adler.
2222
2223         Add a new `base64StringForIconAndPlatform()` method to MediaControlsHost such that we
2224         may load images from the modern-media-controls directory in the WebCore.framework bundle.
2225         We use this new method in the iconService singleton when a `mediaControlsHost` is set,
2226         which will be set in a later patch.
2227
2228         * Modules/mediacontrols/MediaControlsHost.cpp:
2229         (WebCore::MediaControlsHost::base64StringForIconAndPlatform):
2230         * Modules/mediacontrols/MediaControlsHost.h:
2231         * Modules/mediacontrols/MediaControlsHost.idl:
2232         * Modules/modern-media-controls/controls/icon-service.js:
2233         (const.iconService.new.IconService.prototype.urlForIconNameAndLayoutTraits):
2234         (const.iconService.new.IconService):
2235         * rendering/RenderTheme.h:
2236         (WebCore::RenderTheme::mediaControlsBase64StringForIconAndPlatform):
2237         (WebCore::RenderTheme::mediaControlsScript): Deleted.
2238         * rendering/RenderThemeMac.h:
2239         * rendering/RenderThemeMac.mm:
2240         (WebCore::RenderThemeMac::mediaControlsBase64StringForIconAndPlatform):
2241
2242 2016-10-17  Antoine Quint  <graouts@apple.com>
2243
2244         [Modern Media Controls] Add a MediaControlsHost API to retrieve the shadow root CSS
2245         https://bugs.webkit.org/show_bug.cgi?id=163501
2246         <rdar://problem/28792014>
2247
2248         Reviewed by Darin Adler.
2249
2250         Add a new `shadowRootCSSText` property to MediaControlsHost so that we may obtain the
2251         concatenated CSS sources for the media controls shadow root via JS. Actually using this
2252         API will be done in a later patch. We also no longer inject those styles as a user-agent
2253         stylesheet when the runtime flag is on since it will no longer be necessary.
2254
2255         * Modules/mediacontrols/MediaControlsHost.cpp:
2256         (WebCore::MediaControlsHost::shadowRootCSSText):
2257         * Modules/mediacontrols/MediaControlsHost.h:
2258         * Modules/mediacontrols/MediaControlsHost.idl:
2259         * css/CSSDefaultStyleSheets.cpp:
2260         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
2261
2262 2016-10-17  Simon Fraser  <simon.fraser@apple.com>
2263
2264         Implement DOMPoint/DOMPointReadOnly
2265         https://bugs.webkit.org/show_bug.cgi?id=133916
2266
2267         Reviewed by Darin Adler.
2268
2269         Patch mostly by Dirk Schultz <krit@webkit.org>.
2270
2271         Implement DOMPoint/DOMPointReadOnly following https://drafts.fxtf.org/geometry/
2272         (although we may need to match https://www.w3.org/TR/geometry-1/ to be compatible
2273         with Chrome).
2274         
2275         Test: geometry/DOMPoint-001.html
2276
2277         * CMakeLists.txt:
2278         * DerivedSources.make:
2279         * WebCore.xcodeproj/project.pbxproj:
2280         * dom/DOMPoint.h: Added.
2281         * dom/DOMPoint.idl: Added.
2282         * dom/DOMPointInit.h: Added.
2283         * dom/DOMPointInit.idl: Added.
2284         * dom/DOMPointReadOnly.h: Added.
2285         (WebCore::DOMPointReadOnly::create):
2286         (WebCore::DOMPointReadOnly::fromPoint):
2287         (WebCore::DOMPointReadOnly::x):
2288         (WebCore::DOMPointReadOnly::y):
2289         (WebCore::DOMPointReadOnly::z):
2290         (WebCore::DOMPointReadOnly::w):
2291         (WebCore::DOMPointReadOnly::DOMPointReadOnly):
2292         * dom/DOMPointReadOnly.idl: Added.
2293
2294 2016-10-17  Antoine Quint  <graouts@apple.com>
2295
2296         [Modern Media Controls] Use modern-media-controls module sources for media controls stylesheet and script injection
2297         https://bugs.webkit.org/show_bug.cgi?id=163500
2298         <rdar://problem/28792010>
2299
2300         Reviewed by Darin Adler.
2301
2302         Add files from the Modules/modern-media-controls directory to the Xcode project and add a copy phase
2303         to copy those files with their directory stucture as a subdirectory of the WebCore.framework Resources
2304         directory.
2305
2306         Additionally, use the modern-media-controls Module CSS and JS files when concatenating the media controls
2307         scripts and styles in RenderTheme when the runtime flag is on.
2308
2309         * WebCore.xcodeproj/project.pbxproj:
2310         * rendering/RenderThemeMac.mm:
2311         (WebCore::RenderThemeMac::mediaControlsStyleSheet):
2312         (WebCore::RenderThemeMac::mediaControlsScript):
2313
2314 2016-10-17  Simon Fraser  <simon.fraser@apple.com>
2315
2316         Fix typo in error message.
2317
2318         * bindings/scripts/CodeGeneratorJS.pm:
2319         (GenerateSerializerFunction):
2320
2321 2016-10-17  Fujii Hironori  <Hironori.Fujii@sony.com>
2322
2323         preprocessor.pm: cl.exe outputs processing filenames if Windows Perl is used
2324         https://bugs.webkit.org/show_bug.cgi?id=163435
2325
2326         Reviewed by Alex Christensen.
2327
2328         cl.exe outputs processing filenames to stderr. Suppress this
2329         annoying messages by using open3 instead of open2.
2330
2331         * bindings/scripts/preprocessor.pm:
2332         (applyPreprocessor): Use open3 in case of Windows Perl.
2333
2334 2016-10-17  Mark Lam  <mark.lam@apple.com>
2335
2336         Use the reject() helper function for conditionally throwing TypeErrors.
2337         https://bugs.webkit.org/show_bug.cgi?id=163491
2338
2339         Reviewed by Filip Pizlo.
2340
2341         No new tests because this patch does not introduce new behavior.
2342
2343         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
2344         (WebCore::createRsaKeyGenParams):
2345         * bindings/js/JSIDBDatabaseCustom.cpp:
2346         (WebCore::JSIDBDatabase::createObjectStore):
2347         * bridge/c/c_instance.cpp:
2348         (JSC::Bindings::CInstance::invokeMethod):
2349
2350 2016-10-17  Miguel Gomez  <magomez@igalia.com>
2351
2352         [GTK] Several tests crashing on debug bot in (anonymous namespace)::MediaPlayerPrivateGStreamerBase::repaint
2353         https://bugs.webkit.org/show_bug.cgi?id=163511
2354
2355         Reviewed by Carlos Garcia Campos.
2356
2357         Perform the video repaint in the main thread when accelerated compositing is disabled.
2358
2359         Covered by existent tests.
2360
2361         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2362         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
2363         (WebCore::MediaPlayerPrivateGStreamerBase::repaint):
2364         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
2365         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2366
2367 2016-10-17  Konstantin Tokarev  <annulen@yandex.ru>
2368
2369         Eleminate code duplication between ResourceRequest encoding/decoding implementations
2370         https://bugs.webkit.org/show_bug.cgi?id=163507
2371
2372         Reviewed by Carlos Garcia Campos.
2373
2374         ResourceRequestBase::encodeWithoutPlatformData() and Soup implementation of
2375         ArgumentCoder<ResourceRequest>::encodePlatformData() share most of the code,
2376         ditto for decoding implementations.
2377
2378         No new tests needed.
2379
2380         * platform/network/ResourceRequestBase.h:
2381         (WebCore::ResourceRequestBase::encodeBase):
2382         (WebCore::ResourceRequestBase::decodeBase):
2383         (WebCore::ResourceRequestBase::encodeWithoutPlatformData):
2384         (WebCore::ResourceRequestBase::decodeWithoutPlatformData):
2385         * platform/network/soup/ResourceRequest.h:
2386         (WebCore::ResourceRequest::encodeWithPlatformData):
2387         (WebCore::ResourceRequest::decodeWithPlatformData):
2388
2389 2016-10-17  Michael Catanzaro  <mcatanzaro@igalia.com>
2390
2391         Move user agent quirks to cross-platform location
2392         https://bugs.webkit.org/show_bug.cgi?id=163508
2393
2394         Reviewed by Carlos Garcia Campos.
2395
2396         Tested by Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp.
2397
2398         * PlatformGTK.cmake:
2399         * platform/UserAgent.h: Renamed from Source/WebCore/platform/gtk/UserAgentGtk.h.
2400         * platform/UserAgentQuirks.cpp: Added. Moved from UserAgentGtk.cpp.
2401         (WebCore::urlRequiresChromeBrowser): Sneakily tighten up Google domain detection, it should
2402         only apply to sites if the base domain matches google.*, not any base domain that starts
2403         with google.
2404         (WebCore::urlRequiresMacintoshPlatform):
2405         (WebCore::UserAgentQuirks::quirksForURL):
2406         (WebCore::UserAgentQuirks::stringForQuirk):
2407         * platform/UserAgentQuirks.h: Moved from UserAgentGtk.cpp. prepare-ChangeLog thinks it was
2408         renamed from Source/WebCore/platform/efl/UserAgentEfl.h, but prepare-ChangeLog is dumb.
2409         (WebCore::UserAgentQuirks::UserAgentQuirks):
2410         (WebCore::UserAgentQuirks::add):
2411         (WebCore::UserAgentQuirks::contains):
2412         (WebCore::UserAgentQuirks::isEmpty):
2413         * platform/efl/UserAgentEfl.cpp:
2414         (WebCore::standardUserAgentForURL):
2415         * platform/gtk/UserAgentGtk.cpp:
2416         (WebCore::buildUserAgentString):
2417         (WebCore::standardUserAgentForURL):
2418         (): Deleted.
2419         (WebCore::UserAgentQuirks::UserAgentQuirks): Deleted.
2420         (WebCore::UserAgentQuirks::add): Deleted.
2421         (WebCore::UserAgentQuirks::contains): Deleted.
2422         (WebCore::UserAgentQuirks::isEmpty): Deleted.
2423         (WebCore::urlRequiresChromeBrowser): Deleted.
2424         (WebCore::urlRequiresMacintoshPlatform): Deleted.
2425
2426 2016-10-17  Alberto Garcia  <berto@igalia.com>
2427
2428         [GTK] gobject-introspection on package build with webkit2gtk fails without active X session
2429         https://bugs.webkit.org/show_bug.cgi?id=163105
2430
2431         Reviewed by Carlos Garcia Campos.
2432
2433         Don't call XCompositeQueryExtension() or XDamageQueryExtension()
2434         if m_display is NULL.
2435
2436         * platform/graphics/x11/PlatformDisplayX11.cpp:
2437         (WebCore::PlatformDisplayX11::supportsXComposite):
2438         (WebCore::PlatformDisplayX11::supportsXDamage):
2439
2440 2016-10-16  Nan Wang  <n_wang@apple.com>
2441
2442         AX: [Mac] roleDescription for AXTextField input types
2443         https://bugs.webkit.org/show_bug.cgi?id=163419
2444         <rdar://problem/28766192>
2445
2446         Reviewed by Darin Adler.
2447
2448         Provided more detailed role description for input types that
2449         exposed as standard text fields on the mac.
2450
2451         Changes are covered in modified test expectation.
2452
2453         * English.lproj/Localizable.strings:
2454         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2455         (-[WebAccessibilityObjectWrapper roleDescription]):
2456         * platform/LocalizedStrings.cpp:
2457         (WebCore::AXEmailFieldText):
2458         (WebCore::AXTelephoneFieldText):
2459         (WebCore::AXURLFieldText):
2460         (WebCore::AXDateFieldText):
2461         (WebCore::AXTimeFieldText):
2462         * platform/LocalizedStrings.h:
2463         * platform/efl/LocalizedStringsEfl.cpp:
2464         (WebCore::AXEmailFieldText):
2465         (WebCore::AXTelephoneFieldText):
2466         (WebCore::AXURLFieldText):
2467         (WebCore::AXDateFieldText):
2468         (WebCore::AXTimeFieldText):
2469         * platform/gtk/LocalizedStringsGtk.cpp:
2470         (WebCore::AXEmailFieldText):
2471         (WebCore::AXTelephoneFieldText):
2472         (WebCore::AXURLFieldText):
2473         (WebCore::AXDateFieldText):
2474         (WebCore::AXTimeFieldText):
2475
2476 2016-10-16  Chris Dumez  <cdumez@apple.com>
2477
2478         Update WebKit localizable strings
2479         https://bugs.webkit.org/show_bug.cgi?id=163513
2480
2481         Reviewed by Dan Bernstein.
2482
2483         Update WebKit localizable strings as it was missing the "too short" one needed
2484         by form validation. This was causing a "Localized string not found" message to
2485         be shown when testing the following sample on WebKit ToT:
2486         - https://googlechrome.github.io/samples/report-validity/
2487
2488         * English.lproj/Localizable.strings:
2489
2490 2016-10-16  Chris Dumez  <cdumez@apple.com>
2491
2492         REGRESSION (r206750): Crash when pressing Caps Lock if “Use the Caps Lock key to switch to and from U.S.” is selected in Input Sources preferences
2493         https://bugs.webkit.org/show_bug.cgi?id=163506
2494         <rdar://problem/28792483>
2495
2496         Reviewed by Darin Adler.
2497
2498         As per the NSEvent documentation [1], calling [NSEvent characters] is only
2499         valid on key up / key down events and will raise an NSInternalInconsistencyException
2500         if accessed on any other kind of event object. The crash happens when keyForKeyEvent()
2501         is called with the third kind of key event (NSFlagsChanged) which is used for
2502         detecting modifier keys. We normally detect the modifier key and return early before
2503         calling [NSEvent characters]. However, in some rare cases, we fail to detect the
2504         modifier key and we fall through.
2505
2506         To address the issue, we now return "Unidentified" for NSFlagsChanged events, if we
2507         fail to detect the modifier key and before calling [NSEvent characters].
2508
2509         [1] https://developer.apple.com/reference/appkit/nsevent/1534183-characters
2510
2511         No new test, not easily testable.
2512
2513         * platform/mac/PlatformEventFactoryMac.mm:
2514         (WebCore::keyForKeyEvent):
2515
2516 2016-10-16  Darin Adler  <darin@apple.com>
2517
2518         Move CSS classes from ExceptionCode to Exception
2519         https://bugs.webkit.org/show_bug.cgi?id=163494
2520
2521         Reviewed by Sam Weinig.
2522
2523         Removed the "get" prefix from the names of many CSSPrimitiveValue
2524         functions to match WebKit coding style and to disambiguate them
2525         from the public CSS DOM functions that raise exceptions.
2526
2527         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2528         (WebCore::propertyNamePrefix): Use enum class.
2529         (WebCore::parseJavaScriptCSSPropertyName): Tweak style a bit.
2530         (WebCore::stylePropertyGetter): Refactor to simplify structure.
2531         (WebCore::stylePropertyGetterPixelOrPosPrefix): Ditto. Also use floatValue.
2532         (WebCore::JSCSSStyleDeclaration::putDelegate): Use findIgnoringASCIICase,
2533         and use propagateException to handle ExcpetionOr.
2534         (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue): Tweak style a bit.
2535         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Use a lambda to
2536         initialize a global here.
2537
2538         * bindings/js/JSDOMBinding.h: Added toJSString to support bindings for
2539         functions returning ExceptionOr<String>.
2540
2541         * bindings/scripts/gobject-generate-headers.pl: Deleted.
2542
2543         * css/BasicShapeFunctions.cpp:
2544         (WebCore::convertToLengthSize): Use pairValue.
2545         (WebCore::convertToCenterCoordinate): Use valueID and pairValue.
2546         (WebCore::cssValueToBasicShapeRadius): Ditto.
2547         * css/CSSBasicShapes.cpp:
2548         (WebCore::serializePositionOffset): Ditto.
2549         (WebCore::buildSerializablePositionOffset): Ditto.
2550         (WebCore::CSSBasicShapeCircle::cssText): Ditto.
2551         (WebCore::CSSBasicShapeEllipse::cssText): Ditto.
2552         (WebCore::updateCornerRadiusWidthAndHeight): Ditto.
2553         * css/CSSBorderImageSliceValue.h: Use quadValue.
2554         * css/CSSCalculationValue.cpp:
2555         (WebCore::determineCategory): Use floatValue and doubleValue.
2556
2557         * css/CSSCharsetRule.h: Use ExceptionOr. Also made more things private.
2558         * css/CSSCharsetRule.idl: Use non-legacy exceptions.
2559
2560         * css/CSSComputedStyleDeclaration.cpp:
2561         (WebCore::CSSComputedStyleDeclaration::setCssText): Use ExceptionOr.
2562         (WebCore::ComputedStyleExtractor::propertyMatches): Use valueID.
2563         (WebCore::CSSComputedStyleDeclaration::setProperty): Use ExceptionOr.
2564         (WebCore::CSSComputedStyleDeclaration::removeProperty): Ditto.
2565         (WebCore::CSSComputedStyleDeclaration::setPropertyInternal): Ditto.
2566         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue): Return
2567         a Ref instead of a RefPtr.
2568         * css/CSSComputedStyleDeclaration.h: Updated for above changes.
2569
2570         * css/CSSCrossfadeValue.cpp:
2571         (WebCore::CSSCrossfadeValue::fixedSize): Use floatValue.
2572         (WebCore::CSSCrossfadeValue::image): Ditto.
2573         (WebCore::CSSCrossfadeValue::blend): Use doubleValue.
2574
2575         * css/CSSFontFace.cpp:
2576         (WebCore::CSSFontFace::calculateStyleMask): Use valueID.
2577         (WebCore::CSSFontFace::calculateWeightMask): Ditto.
2578         * css/CSSFontFaceSet.cpp:
2579         (WebCore::CSSFontFaceSet::familyNameFromPrimitive): Ditto.
2580         (WebCore::CSSFontFaceSet::matchingFaces): Use ExceptoinOr.
2581         (WebCore::CSSFontFaceSet::check): Ditto.
2582         * css/CSSFontFaceSet.h: Updated for above changes.
2583
2584         * css/CSSGradientValue.cpp:
2585         (WebCore::compareStops): Use doubleValue.
2586         (WebCore::CSSGradientValue::addStops): Use floatValue.
2587         (WebCore::positionFromValue): Use floatValue and valudID.
2588         (WebCore::CSSLinearGradientValue::customCSSText): Use doubleValue and valueID.
2589         (WebCore::CSSLinearGradientValue::createGradient): Use floatValue and valueID.
2590         (WebCore::CSSRadialGradientValue::customCSSText): Use doubleValue and valueID.
2591         (WebCore::CSSRadialGradientValue::resolveRadius): Use floatValue.
2592         (WebCore::CSSRadialGradientValue::createGradient): Use valueID.
2593
2594         * css/CSSGroupingRule.cpp:
2595         (WebCore::CSSGroupingRule::insertRule): Use ExceptionOr.
2596         (WebCore::CSSGroupingRule::deleteRule): Ditto.
2597         * css/CSSGroupingRule.h: Updated for above changes.
2598
2599         * css/CSSImageGeneratorValue.cpp:
2600         (WebCore::CSSImageGeneratorValue::subimageIsPending): Use valueID.
2601         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): Ditto.
2602
2603         * css/CSSImageSetValue.cpp:
2604         (WebCore::CSSImageSetValue::fillImageSet): Use floatValue.
2605
2606         * css/CSSMediaRule.idl: Use non-legacy exceptions.
2607
2608         * css/CSSPrimitiveValue.cpp:
2609         (WebCore::CSSPrimitiveValue::computeDegrees): Use doubleValue.
2610         (WebCore::CSSPrimitiveValue::setFloatValue): Use ExceptionOr.
2611         (WebCore::CSSPrimitiveValue::getFloatValue): Replaced getDoubleValue with this,
2612         since getDoubleValue is unused, moving the call to clampTo into this function.
2613         Also changed this to use ExceptionOr.
2614         (WebCore::CSSPrimitiveValue::doubleValue): Renamed from getDoubleValue.
2615         (WebCore::CSSPrimitiveValue::doubleValueInternal): Use Optional instead of a bool
2616         and an out argument to return the value and check for type failure.
2617         (WebCore::CSSPrimitiveValue::setStringValue): Use ExceptionOr.
2618         (WebCore::CSSPrimitiveValue::getStringValue): Ditto.
2619         (WebCore::CSSPrimitiveValue::stringValue): Renamed from getStringValue.
2620         (WebCore::CSSPrimitiveValue::getCounterValue): Use ExceptionOr.
2621         (WebCore::CSSPrimitiveValue::getRectValue): Use ExceptionOr.
2622         (WebCore::CSSPrimitiveValue::getQuadValue): Deleted.
2623         (WebCore::CSSPrimitiveValue::getLengthRepeatValue): Deleted.
2624         (WebCore::CSSPrimitiveValue::getRGBColorValue): Use ExceptionOr.
2625         (WebCore::CSSPrimitiveValue::getPairValue): Deleted.
2626         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Use new names for functions.
2627         * css/CSSPrimitiveValue.h: Reorganized the class, moved large inline function bodies
2628         out of the class definition. Updated for the above changes.
2629         * css/CSSPrimitiveValue.idl: Use non-legacy exceptions.
2630
2631         * css/CSSPrimitiveValueMappings.h: Use value instead of getValue, etc.
2632
2633         * css/CSSRule.cpp:
2634         (WebCore::CSSRule::setCssText): Use ExceptionOr.
2635         * css/CSSRule.h: Updated for above change.
2636         * css/CSSRule.idl: Use non-legacy exceptions.
2637
2638         * css/CSSStyleDeclaration.h: Use ExceptionOr.
2639         * css/CSSStyleDeclaration.idl: Use non-legacy exceptions.
2640
2641         * css/CSSStyleSheet.cpp:
2642         (WebCore::CSSStyleSheet::deprecatedInsertRule): Use ExceptionOr.
2643         (WebCore::CSSStyleSheet::insertRule): Ditto.
2644         (WebCore::CSSStyleSheet::deleteRule): Ditto.
2645         (WebCore::CSSStyleSheet::addRule): Ditto.
2646         * css/CSSStyleSheet.h: Updated for the above changes.
2647         * css/CSSStyleSheet.idl: Use non-legacy exceptions.
2648
2649         * css/CSSSupportsRule.idl: Use non-legacy exceptions.
2650
2651         * css/CSSToStyleMap.cpp:
2652         (WebCore::CSSToStyleMap::mapFillAttachment): Use valueID instead of getValueID, etc.
2653         (WebCore::convertToLengthSize): Ditto.
2654         (WebCore::CSSToStyleMap::mapFillSize): Ditto.
2655         (WebCore::CSSToStyleMap::mapFillXPosition): Ditto.
2656         (WebCore::CSSToStyleMap::mapFillYPosition): Ditto.
2657         (WebCore::CSSToStyleMap::mapFillMaskSourceType): Ditto.
2658         (WebCore::CSSToStyleMap::mapAnimationDirection): Ditto.
2659         (WebCore::CSSToStyleMap::mapAnimationFillMode): Ditto.
2660         (WebCore::CSSToStyleMap::mapAnimationIterationCount): Ditto.
2661         (WebCore::CSSToStyleMap::mapAnimationName): Ditto.
2662         (WebCore::CSSToStyleMap::mapAnimationPlayState): Ditto.
2663         (WebCore::CSSToStyleMap::mapAnimationProperty): Ditto.
2664         (WebCore::CSSToStyleMap::mapAnimationTimingFunction): Ditto.
2665         (WebCore::CSSToStyleMap::mapAnimationTrigger): Ditto.
2666         (WebCore::CSSToStyleMap::mapNinePieceImageSlice): Ditto.
2667         (WebCore::CSSToStyleMap::mapNinePieceImageQuad): Ditto.
2668         (WebCore::CSSToStyleMap::mapNinePieceImageRepeat): Ditto.
2669
2670         * css/CSSValue.h: Use ExceptionOr.
2671         * css/CSSValue.idl: Use non-legacy exceptions.
2672
2673         * css/Counter.h: Use stringValue instead of getStringValue, etc.
2674
2675         * css/FontFace.cpp:
2676         (WebCore::FontFace::create): Use ExceptionOr.
2677         (WebCore::FontFace::setFamily): Ditto.
2678         (WebCore::FontFace::setStyle): Ditto.
2679         (WebCore::FontFace::setWeight): Ditto.
2680         (WebCore::FontFace::setStretch): Ditto.
2681         (WebCore::FontFace::setUnicodeRange): Ditto.
2682         (WebCore::FontFace::setVariant): Ditto.
2683         (WebCore::FontFace::setFeatureSettings): Ditto.
2684         * css/FontFace.h: Updated for above changes.
2685         * css/FontFace.idl: Use non-legacy exceptions.
2686
2687         * css/FontFaceSet.cpp:
2688         (WebCore::FontFaceSet::load): Use ExceptionOr.
2689         (WebCore::FontFaceSet::check): Ditto.
2690         * css/FontFaceSet.h: Updated for above changes.
2691         * css/FontFaceSet.idl: Use non-legacy exceptions.
2692
2693         * css/FontVariantBuilder.cpp:
2694         (WebCore::extractFontVariantLigatures): Use valueID instead of getValueID, etc.
2695         (WebCore::extractFontVariantNumeric): Ditto.
2696         (WebCore::extractFontVariantEastAsian): Ditto.
2697
2698         * css/MediaList.cpp:
2699         (WebCore::MediaList::setMediaText): Use ExceptionOr.
2700         (WebCore::MediaList::deleteMedium): Ditto.
2701         (WebCore::MediaList::appendMedium): Ditto.
2702         * css/MediaList.h: Updated for above changes.
2703         * css/MediaList.idl: Use non-legacy exceptions.
2704
2705         * css/MediaQueryEvaluator.cpp:
2706         (WebCore::doubleValue): Use valueID instead of getValueID, etc.
2707         (WebCore::colorGamutEvaluate): Ditto.
2708         (WebCore::invertedColorsEvaluate): Ditto.
2709         (WebCore::orientationEvaluate): Ditto.
2710         (WebCore::evaluateResolution): Ditto.
2711         (WebCore::computeLength): Ditto.
2712         (WebCore::viewModeEvaluate): Ditto.
2713         (WebCore::hoverEvaluate): Ditto.
2714         (WebCore::pointerEvaluate): Ditto.
2715         (WebCore::prefersReducedMotionEvaluate): Ditto.
2716
2717         * css/PropertySetCSSStyleDeclaration.cpp:
2718         (WebCore::PropertySetCSSStyleDeclaration::setCssText): Use ExceptionOr.
2719         (WebCore::PropertySetCSSStyleDeclaration::setProperty): Ditto.
2720         (WebCore::PropertySetCSSStyleDeclaration::removeProperty): Ditto.
2721         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): Ditto.
2722         (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal): Ditto.
2723         * css/PropertySetCSSStyleDeclaration.h: Updated for above changes.
2724         Also marked a couple additional functions private.
2725
2726         * css/StyleBuilderConverter.h: Use doubleValue instead of getDoubleValue, etc.
2727         * css/StyleBuilderCustom.h: Ditto.
2728         * css/StyleProperties.cpp:
2729         (WebCore::StyleProperties::getLayeredShorthandValue): Ditto.
2730         * css/StyleResolver.cpp:
2731         (WebCore::StyleResolver::MatchResult::addMatchedProperties): Ditto.
2732         (WebCore::StyleResolver::colorFromPrimitiveValueIsDerivedFromElement): Ditto.
2733         (WebCore::StyleResolver::colorFromPrimitiveValue): Ditto.
2734         (WebCore::StyleResolver::createFilterOperations): Ditto.
2735         * css/TransformFunctions.cpp:
2736         (WebCore::transformsForValue): Ditto.
2737         * css/ViewportStyleResolver.cpp:
2738         (WebCore::ViewportStyleResolver::getViewportArgumentValue): Ditto.
2739
2740         * css/WebKitCSSMatrix.cpp:
2741         (WebCore::WebKitCSSMatrix::WebKitCSSMatrix): Tweaked constructors a bit,
2742         getting rid of the one that uses an ExceptionCode.
2743         (WebCore::WebKitCSSMatrix::create): Moved in here, and use ExceptionOr.
2744         (WebCore::WebKitCSSMatrix::setMatrixValue): Use ExceptionOr.
2745         (WebCore::WebKitCSSMatrix::multiply): Tweak coding style a bit.
2746         (WebCore::WebKitCSSMatrix::inverse): Use ExceptionOr.
2747         (WebCore::WebKitCSSMatrix::translate): Return a Ref instead of RefPtr.
2748         (WebCore::WebKitCSSMatrix::scale): Ditto.
2749         (WebCore::WebKitCSSMatrix::rotate): Ditto.
2750         (WebCore::WebKitCSSMatrix::rotateAxisAngle): Ditto.
2751         (WebCore::WebKitCSSMatrix::skewX): Ditto.
2752         (WebCore::WebKitCSSMatrix::skewY): Ditto.
2753         (WebCore::WebKitCSSMatrix::toString): Tweaked formatting a bit.
2754         * css/WebKitCSSMatrix.h: Updated for above changes.
2755         * css/WebKitCSSMatrix.idl: Use non-legacy extensions.
2756
2757         * css/makeprop.pl:
2758         (handleCurrentColorValue): Use valueID instead of getValueID.
2759         (generateValueSetter): Ditto.
2760
2761         * css/parser/CSSParser.cpp:
2762         (WebCore::CSSParser::parse4ValuesFillPosition): Use valueID instead of getValueID, etc.
2763         (WebCore::CSSParser::parse3ValuesFillPosition): Ditto.
2764         (WebCore::CSSParser::parseFillPosition): Ditto.
2765         (WebCore::CSSParser::parseFillRepeat): Ditto.
2766         (WebCore::CSSParser::parseGridPosition): Ditto.
2767         (WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns): Ditto.
2768         (WebCore::isGridTrackFixedSized): Ditto.
2769         (WebCore::CSSParser::parseRadialGradient): Ditto.
2770         (WebCore::CSSParser::parseBuiltinFilterArguments): Ditto.
2771
2772         * css/parser/CSSParserValues.cpp:
2773         (WebCore::CSSParserValue::createCSSValue): Removed the unneeded call to
2774         setPrimitiveType here. The createParserOperator returns an object that
2775         already has the correct primitive type.
2776
2777         * css/parser/CSSPropertyParser.cpp: Updated most cases of calling the old
2778         getXXXValue functions, but not sure if it's right since it is commented out
2779         code that I did not compile.
2780
2781         * css/parser/CSSPropertyParserHelpers.cpp:
2782         (WebCore::CSSPropertyParserHelpers::clampRGBComponent): Use intValue instead of getIntValue, etc.
2783         (WebCore::CSSPropertyParserHelpers::parseHSLParameters): Ditto.
2784         (WebCore::CSSPropertyParserHelpers::isHorizontalPositionKeywordOnly): Ditto.
2785         (WebCore::CSSPropertyParserHelpers::isVerticalPositionKeywordOnly): Ditto.
2786         (WebCore::CSSPropertyParserHelpers::positionFromThreeOrFourValues): Ditto.
2787         (WebCore::CSSPropertyParserHelpers::consumeRadialGradient): Ditto.
2788
2789         * dom/Range.cpp: Added now-needed include of ExceptionCode.h.
2790         * dom/SelectorQuery.cpp: Ditto.
2791
2792         * editing/ApplyStyleCommand.cpp:
2793         (WebCore::toIdentifier): Use valueID instead of getValueID, etc.
2794         (WebCore::ApplyStyleCommand::computedFontSize): Ditto.
2795         * editing/EditingStyle.cpp:
2796         (WebCore::identifierForStyleProperty): Ditto.
2797         (WebCore::HTMLElementEquivalent::valueIsPresentInStyle): Ditto.
2798         (WebCore::EditingStyle::extractFontSizeDelta): Ditto.
2799         (WebCore::EditingStyle::textDirection): Ditto.
2800         (WebCore::EditingStyle::prepareToApplyAt): Ditto.
2801         (WebCore::EditingStyle::textDirectionForSelection): Ditto.
2802         (WebCore::fontWeightIsBold): Ditto.
2803         (WebCore::legacyFontSizeFromCSSValue): Ditto.
2804         (WebCore::isTransparentColorValue): Ditto.
2805         (WebCore::hasTransparentBackgroundColor): Ditto.
2806         (WebCore::backgroundColorInEffect): Ditto.
2807
2808         * editing/Editor.cpp:
2809         (WebCore::Editor::applyEditingStyleToElement): Removed IGNORE_EXCEPTION; that is
2810         what we do by default for things returning ExceptionOr.
2811         * editing/RemoveCSSPropertyCommand.cpp:
2812         (WebCore::RemoveCSSPropertyCommand::doApply): Ditto.
2813         (WebCore::RemoveCSSPropertyCommand::doUnapply): Ditto.
2814         * editing/ReplaceSelectionCommand.cpp:
2815         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): Ditto.
2816
2817         * editing/cocoa/HTMLConverter.mm:
2818         (floatValueFromPrimitiveValue): Use floatValue instead of getFloatValue, etc.
2819         * editing/markup.cpp:
2820         (WebCore::propertyMissingOrEqualToNone): Ditto.
2821
2822         * inspector/InspectorStyleSheet.cpp:
2823         (WebCore::InspectorStyleSheet::addRule): Updated to call ExceptionOr-returning functions.
2824         (WebCore::InspectorStyleSheet::deleteRule): Ditto.
2825         (WebCore::InspectorStyleSheet::setStyleText): Ditto.
2826
2827         * svg/SVGLength.cpp:
2828         (WebCore::SVGLength::fromCSSPrimitiveValue): Use floatValue instead of getFloatValue.
2829
2830 2016-10-16  Antoine Quint  <graouts@apple.com>
2831
2832         [Modern Media Controls] Styles for StartButton are missing
2833         https://bugs.webkit.org/show_bug.cgi?id=163499
2834         <rdar://problem/28792009>
2835
2836         Reviewed by Darin Adler.
2837
2838         Add styling for StartButton so that instances are always displayed in the center of their container.
2839
2840         Test: media/modern-media-controls/start-button/start-button-styles.html
2841
2842         * Modules/modern-media-controls/controls/start-button.css: Added.
2843         (button.start):
2844         (button.start > *):
2845         (button.start > div):
2846         (button.start > img):
2847         (button.start:active > img):
2848
2849 2016-10-16  Simon Fraser  <simon.fraser@apple.com>
2850
2851         Implement serializer = { attribute }
2852         https://bugs.webkit.org/show_bug.cgi?id=163466
2853         
2854         Follow-up fix to die if "serializer {...}" lists an attribute not present
2855         on the interface. I don't think this is testable with the current bindings tests.
2856
2857         * bindings/scripts/CodeGeneratorJS.pm:
2858         (GenerateSerializerFunction):
2859
2860 2016-10-16  Simon Fraser  <simon.fraser@apple.com>
2861
2862         Add the "Geometry Interfaces" to features.json.
2863
2864         * features.json:
2865
2866 2016-10-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2867
2868         Document request not updated after willSendRequest is called for a redirect
2869         https://bugs.webkit.org/show_bug.cgi?id=163436
2870
2871         Reviewed by Michael Catanzaro.
2872
2873         The first willSendRequest happens before DocumentLoader::startLoadingMainResource(), that calls setRequest, but
2874         the second one happens after DocumentLoader::redirectReceived() and then the request is never updated again.
2875
2876         Covered by GTK+ unit tests.
2877
2878         * loader/DocumentLoader.cpp:
2879         (WebCore::DocumentLoader::willContinueMainResourceLoadAfterRedirect): Set the new request.
2880         * loader/DocumentLoader.h:
2881         * loader/SubresourceLoader.cpp:
2882         (WebCore::SubresourceLoader::willSendRequestInternal): Notify the document loader when loading the main resource
2883         and called for a redirection.
2884
2885 2016-10-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
2886
2887         Delete the animated image catchup code
2888         https://bugs.webkit.org/show_bug.cgi?id=163410
2889
2890         Reviewed by Simon Fraser.
2891
2892         This patch fixes two issues in the animated image workflow:
2893
2894         1) Setting the animation timer should follow the following rules:
2895         
2896             -- Initial case: Which happens before drawing the first frame. We
2897             should set the timer to fire after the current_frame_duration.
2898
2899             -- Late case (Slow animation): This happens if the current_time is
2900             past the next_frame_desired_time. In this case we should fire the
2901             timer immediately.
2902
2903             -- Early case (Fast animation): This happens when there is still time
2904             before the next_frame_desired_time. In this case we should set the
2905             timer to fire after the difference between the next_frame_desired_time
2906             and the current_time.
2907
2908         2) Deleting the code for catching up the current_frame:
2909         
2910             This code used to run in the slow animation case. It was never used
2911             on iOS. It was trying to adjust the current_frame according to the
2912             current_time as if there were no delay. It turned out that this might
2913             cause a bigger delay because most likely the decoder decodes the image
2914             frames incrementally; i.e. to decode frame k, it has to have frame
2915             (k - 1) decoded.
2916
2917         Test: fast/images/ordered-animated-image-frames.html
2918
2919         * platform/graphics/BitmapImage.cpp:
2920         (WebCore::BitmapImage::draw): Remove the iOS specific code.
2921         (WebCore::BitmapImage::startAnimation): Move the animation finishing code from 
2922         BitmapImage::internalAdvanceAnimation() to this function. Simplify the timer
2923         duration code as it is described above.
2924
2925         (WebCore::BitmapImage::advanceAnimation): Merge BitmapImage::internalAdvanceAnimation()
2926         into this function.
2927
2928         (WebCore::BitmapImage::resetAnimation):
2929         
2930         (WebCore::BitmapImage::internalAdvanceAnimation): Deleted.
2931         * platform/graphics/BitmapImage.h:
2932
2933         * platform/graphics/Image.cpp:
2934         (WebCore::Image::drawTiled):
2935         * platform/graphics/Image.h:
2936         (WebCore::Image::startAnimation):
2937         * svg/graphics/SVGImage.cpp:
2938         (WebCore::SVGImage::startAnimation):
2939         * svg/graphics/SVGImage.h:
2940         Remove the catchup code form the Image and SVGImage classes.
2941
2942 2016-10-15  Darin Adler  <darin@apple.com>
2943
2944         Move Web SQL database and WebSockets off legacy exceptions
2945         https://bugs.webkit.org/show_bug.cgi?id=163284
2946
2947         Reviewed by Chris Dumez.
2948
2949         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
2950         (WebCore::DOMWindowWebDatabase::openDatabase): Use ExceptionOr.
2951         * Modules/webdatabase/DOMWindowWebDatabase.h: Update for above.
2952         * Modules/webdatabase/DOMWindowWebDatabase.idl: Ditto.
2953
2954         * Modules/webdatabase/SQLResultSet.cpp:
2955         (WebCore::SQLResultSet::SQLResultSet): Move initialization of
2956         many data members into the class definition.
2957         (WebCore::SQLResultSet::insertId): Use ExceptionOr.
2958         (WebCore::SQLResultSet::rowsAffected): Moved into class definition.
2959         (WebCore::SQLResultSet::rows): Ditto.
2960         (WebCore::SQLResultSet::setInsertId): Ditto.
2961         (WebCore::SQLResultSet::setRowsAffected): Ditto.
2962
2963         * Modules/webdatabase/SQLResultSet.h: Updated for above.
2964
2965         * Modules/webdatabase/SQLResultSet.idl: Use non-legacy exceptions.
2966         Added a FIXME about the mismatch between long and int64_t.
2967
2968         * Modules/webdatabase/SQLStatement.cpp:
2969         (WebCore::SQLStatement::execute): Use reference instead of pointer.
2970
2971         * Modules/websockets/WebSocket.cpp:
2972         (WebCore::isValidProtocolString): Use StringView.
2973         (WebCore::WebSocket::subprotocolSeparator): Fixed capitalization and
2974         spelling error in the name of this function.
2975         (WebCore::WebSocket::WebSocket): Move initialization of many data
2976         members into the class definition.
2977         (WebCore::WebSocket::create): Use ExceptionOr.
2978         (WebCore::WebSocket::connect): Ditto.
2979         (WebCore::WebSocket::send): Ditto.
2980         (WebCore::WebSocket::close): Ditto.
2981         (WebCore::WebSocket::binaryType): Update to use enum class.
2982         (WebCore::WebSocket::setBinaryType): Use ExecptionOr and update to
2983         use enum class.
2984         (WebCore::WebSocket::didReceiveBinaryData): Ditto.
2985
2986         * Modules/websockets/WebSocket.h: Updated for above. Changed the
2987         BinaryType enum into an enum class.
2988
2989         * Modules/websockets/WebSocket.idl: Use non-legacy exceptions.
2990
2991         * Modules/websockets/WebSocketHandshake.cpp:
2992         (WebCore::WebSocketHandshake::checkResponseHeaders):
2993         Updated for name change to subprotocolSeparator.
2994
2995         * dom/ExceptionOr.h: Added a constructor for scalar types that does not
2996         require an rvalue reference. We can refine this more later, but for now
2997         this is sufficient to obviate the need for WTFMove where it otherwise would
2998         have been needed in the code above.
2999
3000         * inspector/InspectorDatabaseAgent.cpp: Use reference instead of pointer.
3001
3002         * page/DOMWindow.idl: Touched this file to work around bugs in the dependency
3003         analysis of the current CMake build system, since otherwise it doesn't process the
3004         change to the partial interface WebSocket. Edited lots of comments, removed many
3005         others, and tweaked formatting.
3006
3007 2016-10-14  Sam Weinig  <sam@webkit.org>
3008
3009         MessageEvent's source property should be a (DOMWindow or MessagePort)? rather than a EventTarget?
3010         https://bugs.webkit.org/show_bug.cgi?id=163475
3011
3012         Reviewed by Simon Fraser.
3013
3014         Start fleshing out union support, starting with MessageEvent.
3015         - Simplify things a bit for now by requiring interface types to use RefPtr<T> as their type when
3016           used in sequences and unions. We should revisit this later, and see if we can use Ref<T> where
3017           possible, but it causes complications for dictionaries, since they want a Ref<T> uninitialized.
3018
3019         * bindings/generic/IDLTypes.h:
3020         Switch IDLInterface to use RefPtr<T> as its implementation type.
3021
3022         * bindings/js/JSDOMConvert.h:
3023         (WebCore::Detail::VariadicConverterBase::convert):
3024         - Remove isJSDOMWrapperType() optimization. It was not correct, due to not being able to detect window
3025           and window shell, and not always an optimization, e.g. in the case of a single interface.
3026         - Switch from JSC::jsDynamicCast<WrapperType*>() to WrapperType::toWrapped() which can be faster and
3027           handles window and window shell correctly.
3028         - Also fix an issue where we would wrongly assert that one interface had to match.
3029
3030         * bindings/js/JSDOMWrapper.h:
3031         (WebCore::isJSDOMWrapperType): Deleted.
3032         Remove unused predicate.
3033
3034         * bindings/scripts/IDLParser.pm:
3035         (parseType):
3036         Add missing support for nullable unions.
3037
3038         * bindings/scripts/test/JS/JSTestObj.cpp:
3039         * bindings/scripts/test/TestObj.idl:
3040         Add new tests for unions (both non-null and nullable) in dictionaries.
3041  
3042         * dom/ContainerNode.cpp:
3043         (WebCore::ContainerNode::append):
3044         (WebCore::ContainerNode::prepend):
3045         * dom/ContainerNode.h:
3046         * dom/Node.cpp:
3047         (WebCore::nodeSetPreTransformedFromNodeOrStringVector):
3048         (WebCore::Node::convertNodesOrStringsIntoNode):
3049         (WebCore::Node::before):
3050         (WebCore::Node::after):
3051         (WebCore::Node::replaceWith):
3052         * dom/Node.h:
3053         Add using declaration for NodeOrString and change it to use RefPtr<Node>.
3054
3055         * bindings/js/JSMessageEventCustom.cpp:
3056         (WebCore::handleInitMessageEvent):
3057         * dom/MessageEvent.cpp:
3058         (WebCore::MessageEvent::MessageEvent):
3059         (WebCore::MessageEvent::create):
3060         (WebCore::MessageEvent::initMessageEvent):
3061         (WebCore::MessageEvent::source):
3062         (WebCore::isValidSource): Deleted.
3063         * dom/MessageEvent.h:
3064         * dom/MessageEvent.idl:
3065         * page/DOMWindow.cpp:
3066         (WebCore::PostMessageTimer::event):
3067         Change MessageEvent's source to be a std::experimental::variant<RefPtr<DOMWindow>, RefPtr<MessagePort>>.
3068         For now, we only enforce this on setting, and leave the getter a EventTarget?, but that should not be
3069         observable, and will rectified in subsequent patches.
3070
3071 2016-10-15  Chris Dumez  <cdumez@apple.com>
3072
3073         Add support for reportValidity() on form and form control elements
3074         https://bugs.webkit.org/show_bug.cgi?id=163479
3075
3076         Reviewed by Darin Adler.
3077
3078         Add support for reportValidity() on form and form control elements:
3079         - https://html.spec.whatwg.org/#dom-form-reportvalidity
3080         - https://html.spec.whatwg.org/#dom-cva-reportvalidity
3081
3082         Firefox and Chrome already support this.
3083
3084         Demo: https://googlechrome.github.io/samples/report-validity/
3085
3086         No new tests, rebaselined existing tests.
3087
3088         * html/HTMLButtonElement.idl:
3089         * html/HTMLFieldSetElement.idl:
3090         * html/HTMLFormElement.idl:
3091         * html/HTMLInputElement.idl:
3092         * html/HTMLKeygenElement.idl:
3093         * html/HTMLObjectElement.idl:
3094         * html/HTMLOutputElement.idl:
3095         * html/HTMLSelectElement.idl:
3096         * html/HTMLTextAreaElement.idl:
3097         Add reportValidity() operation.
3098
3099         * html/HTMLFormControlElement.cpp:
3100         (WebCore::HTMLFormControlElement::checkValidity):
3101
3102         (WebCore::HTMLFormControlElement::reportValidity):
3103         Add implementation for reportValidity() for form control elements.
3104         First, it calls checkValidity() and returns early if there is no
3105         constraint violation. if the JS canceled the 'invalid' event
3106         fired by checkValidity(), then return early as well, as per the
3107         specification. If the element is focusable, we scroll to it,
3108         focus it and show the validation message. Otherwise, we log a
3109         error message to the console. The last part of the behavior
3110         matches what we already did in HTMLFormElement::validateInteractively()
3111         and complies with the behavior in the specification.
3112
3113         (WebCore::HTMLFormControlElement::focusAndShowValidationMessage):
3114         Add utility function to scroll to the form control element, focus
3115         it and show its validation message. This code was moved from
3116         HTMLFormElement::validateInteractively() so that it could be reused
3117         in HTMLFormControlElement::reportValidity().
3118
3119         * html/HTMLFormControlElement.h:
3120         * html/HTMLFormElement.cpp:
3121         (WebCore::HTMLFormElement::validateInteractively):
3122         Move the early abort checks to the existing call site (prepareForSubmission)
3123         so that we can reuse this method for reportValidity().
3124
3125         (WebCore::HTMLFormElement::prepareForSubmission):
3126         Only call validateInteractively() if we really should validate. Those checks
3127         used to be in validateInteractively() but I moved them here so we could more
3128         easily reuse validateInteractively().
3129
3130         (WebCore::HTMLFormElement::checkValidity):
3131         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
3132         Update Vector type to be a Vector of HTMLFormControlElement given that we
3133         only add HTMLFormControlElement objects to it and that it results it simpler
3134         code.
3135
3136         (WebCore::HTMLFormElement::reportValidity):
3137         Add implementation for reportValidity() for form elements. The
3138         implementation calls our already existing validateInteractively()
3139         method, as per the specification.
3140
3141         * html/HTMLFormElement.h:
3142
3143         * html/HTMLObjectElement.h:
3144         reportValidity() returns true unconditionally for object elements,
3145         similarly to checkValidity().
3146
3147 2016-10-15  Simon Fraser  <simon.fraser@apple.com>
3148
3149         Sort the project file.
3150
3151         * WebCore.xcodeproj/project.pbxproj:
3152
3153 2016-10-15  Simon Fraser  <simon.fraser@apple.com>
3154
3155         Implement serializer = { attribute }
3156         https://bugs.webkit.org/show_bug.cgi?id=163466
3157
3158         Reviewed by Darin Adler.
3159
3160         Fix the code generator to generate code for serializer = { attribute }.
3161         In IDLParser, extend domSerializable with flags for the 'inherit', 'getter' and
3162         'attribute' values (the first two are still unsupported). Fix parseSerializationPattern()
3163         to detect these; it needs to create the domSerializable() now. Basic support
3164         for isSerializableAttribute() is added (primitive types only).
3165         
3166         GenerateSerializerFunction is fixed to output code for the serializable attributes
3167         in the order specified in "serializer = {}", as specified in WebIDL.
3168         
3169         Removed custom serialization for ClientRect and PerformanceTiming.
3170         
3171         Other minor cleanup to always get $interfaceName from $interface->name, and to fix
3172         ObjectConstructor.h to be included as <runtime/ObjectConstructor.h>.
3173
3174         * CMakeLists.txt:
3175         * WebCore.xcodeproj/project.pbxproj:
3176         * bindings/js/JSBindingsAllInOne.cpp:
3177         * bindings/js/JSClientRectCustom.cpp: Removed.
3178         * bindings/js/JSPerformanceTimingCustom.cpp: Removed.
3179         * bindings/scripts/CodeGeneratorJS.pm:
3180         (GenerateImplementation):
3181         (GenerateSerializerFunction):
3182         * bindings/scripts/IDLParser.pm:
3183         (parseSerializerRest):
3184         (parseSerializationPattern):
3185         (parseSerializationAttributes):
3186         (isSerializableAttribute):
3187         (applyMemberList):
3188         * bindings/scripts/test/JS/JSTestNode.cpp:
3189         * bindings/scripts/test/JS/JSTestObj.cpp:
3190         (WebCore::jsTestObjPrototypeFunctionToJSONCaller):
3191         * bindings/scripts/test/JS/JSTestSerialization.cpp: Added.
3192         * bindings/scripts/test/JS/JSTestSerialization.h: Added.
3193         * bindings/scripts/test/TestObj.idl:
3194         * bindings/scripts/test/TestSerialization.idl: Copied from Source/WebCore/dom/ClientRect.idl.
3195         * dom/ClientRect.idl:
3196         * page/PerformanceTiming.idl:
3197
3198 2016-10-15  Michael Catanzaro  <mcatanzaro@igalia.com>
3199
3200         [GTK] Restore user agent quirk for Yahoo
3201         https://bugs.webkit.org/show_bug.cgi?id=163481
3202
3203         Reviewed by Carlos Garcia Campos.
3204
3205         finance.yahoo.com is sending a mobile version in response to our standard user agent.
3206
3207         * platform/gtk/UserAgentGtk.cpp:
3208         (WebCore::urlRequiresMacintoshPlatform):
3209
3210 2016-10-15  Chris Dumez  <cdumez@apple.com>
3211
3212         Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError
3213         https://bugs.webkit.org/show_bug.cgi?id=163472
3214
3215         Reviewed by Sam Weinig.
3216
3217         Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError:
3218         - https://html.spec.whatwg.org/#dom-media-volume
3219
3220         This is because the attribute is of type double (not unrestricted double in the IDL).
3221
3222         Chrome and Firefox agree with the specification. WebKit throws an IndexSizeErr instead.
3223
3224         No new tests, rebaselined existing test.
3225
3226         * html/HTMLMediaElement.idl:
3227
3228 2016-10-15  Zalan Bujtas  <zalan@apple.com>
3229
3230         CounterNode::resetRenderers is so inefficient.
3231         https://bugs.webkit.org/show_bug.cgi?id=163480
3232
3233         Reviewed by Simon Fraser.
3234
3235         CounterNode::resetRenderers() removes all the associated renderers from this CounterNode
3236         and sets the dirty bit on them.
3237         This patch does all that in a loop, instead of traversing the linked tree on each removal.
3238
3239         No change in functionality.
3240
3241         * rendering/CounterNode.cpp:
3242         (WebCore::CounterNode::CounterNode):
3243         (WebCore::CounterNode::~CounterNode):
3244         (WebCore::CounterNode::nextInPreOrderAfterChildren):
3245         (WebCore::CounterNode::lastDescendant):
3246         (WebCore::CounterNode::addRenderer): These assertions do not seem super useful.
3247         (WebCore::CounterNode::removeRenderer):
3248         (WebCore::CounterNode::resetRenderers):
3249         (WebCore::CounterNode::insertAfter):
3250         (WebCore::CounterNode::removeChild):
3251         * rendering/CounterNode.h:
3252         * rendering/RenderCounter.cpp:
3253         (WebCore::makeCounterNode):
3254         (WebCore::RenderCounter::RenderCounter):
3255         (WebCore::RenderCounter::~RenderCounter):
3256         (WebCore::RenderCounter::originalText):
3257         (WebCore::updateCounters):
3258         (WebCore::RenderCounter::invalidate): Deleted.
3259         * rendering/RenderCounter.h:
3260
3261 2016-10-15  Antoine Quint  <graouts@apple.com>
3262
3263         [Modern Media Controls] macOS inline controls
3264         https://bugs.webkit.org/show_bug.cgi?id=163444
3265         <rdar://problem/27989473>
3266
3267         Reviewed by Dean Jackson.
3268
3269         Introducing the new MacOSMediaControls and MacOSInlineMediaControls classes. MacOSMediaControls is a MediaControls subclass
3270         that adds specific buttons to the macOS platform and sets the layout traits to be macOS. This class has a new subclass,
3271         MacOSInlineMediaControls, which sets the layout traits to also include inline and implements custom layout to drop
3272         controls as necessary as the width of the controls varies. It also shows the volume slider when the mute button is hovered.
3273         
3274         Tests: media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html
3275                media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor.html
3276                media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles.html
3277                media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html
3278                media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html
3279                media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility.html
3280                media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html
3281                media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html
3282                media/modern-media-controls/macos-media-controls/macos-media-controls.html
3283
3284         * Modules/modern-media-controls/controls/macos-inline-media-controls.css: Added.
3285         (.media-controls.mac.inline > .controls-bar):
3286         (.media-controls.mac.inline > .controls-bar > *):
3287         (.media-controls.mac.inline button):
3288         (.media-controls.mac.inline button:active):
3289         (.media-controls.mac.inline > .controls-bar button):
3290         (.media-controls.mac.inline > .controls-bar,):
3291         (.media-controls.mac.inline button.play-pause):
3292         (.media-controls.mac.inline button.skip-back):
3293         (.media-controls.mac.inline .scrubber.slider):
3294         (.media-controls.mac.inline button.mute):
3295         (.media-controls.mac.inline button.airplay):
3296         (.media-controls.mac.inline button.pip):
3297         (.media-controls.mac.inline button.tracks):
3298         (.media-controls.mac.inline button.fullscreen):
3299         (.media-controls.mac.inline .time-label):
3300         (.media-controls.mac.inline .volume-slider-container):
3301         (.media-controls.mac.inline .volume-slider-container:before):
3302         (.media-controls.mac.inline .volume.slider):
3303         * Modules/modern-media-controls/controls/macos-inline-media-controls.js: Added.
3304         (MacOSInlineMediaControls.prototype.layout):
3305         (MacOSInlineMediaControls.prototype.handleEvent):
3306         * Modules/modern-media-controls/controls/macos-media-controls.js: Added.
3307         (MacOSMediaControls):
3308
3309 2016-10-14  Antti Koivisto  <antti@apple.com>
3310
3311         100% CPU on homedepot.com page
3312         https://bugs.webkit.org/show_bug.cgi?id=163452
3313         <rdar://problem/28730708>
3314
3315         Reviewed by Simon Fraser.
3316
3317         The site has a keyframe animation on body. Currently this causes the animation to invalidate the
3318         style of the entire document.
3319
3320         Animations use SyntheticStyleChange to invalidate elements when animation progresses and currently
3321         that causes full subtree invalidation. However animation only ever affect individual elements and
3322         the normal style resolution mechanism should be able to deal with things like inheritance as needed.
3323
3324         Test: fast/animation/animation-style-update-size.html
3325
3326         * dom/Document.cpp:
3327         (WebCore::Document::recalcStyle):
3328         * dom/Document.h:
3329         (WebCore::Document::lastStyleUpdateSizeForTesting):
3330
3331             Testing support.
3332
3333         * style/StyleTreeResolver.cpp:
3334         (WebCore::Style::TreeResolver::resolveElement):
3335
3336             Don't force subtree style resolution for SyntheticStyleChange.
3337
3338         * style/StyleUpdate.h:
3339         (WebCore::Style::Update::size):
3340         * testing/Internals.cpp:
3341         (WebCore::Internals::lastStyleUpdateSize):
3342         * testing/Internals.h:
3343         * testing/Internals.idl:
3344
3345 2016-10-14  Chris Dumez  <cdumez@apple.com>
3346
3347         Setting HTMLMediaElement.muted to the same value should not fire a volume change event
3348         https://bugs.webkit.org/show_bug.cgi?id=163474
3349
3350         Reviewed by Eric Carlson.
3351
3352         Setting HTMLMediaElement.muted to the same value should not fire a volume
3353         change event:
3354         - https://html.spec.whatwg.org/#dom-media-muted
3355
3356         Chrome and Firefox agree with the specification.
3357
3358         No new tests, rebaselined existing test.
3359
3360         * html/HTMLMediaElement.cpp:
3361         (WebCore::HTMLMediaElement::setMuted):
3362
3363 2016-10-14  Dean Jackson  <dino@apple.com>
3364
3365         Add Display P3 ColorSpace
3366         https://bugs.webkit.org/show_bug.cgi?id=162880
3367         <rdar://problem/28598564>
3368
3369         Reviewed by Sam Weinig.
3370
3371         Re-landing with a version that hopefully compiles on El Capitan.
3372
3373         Add a new ColorSpace for Display P3.
3374
3375         This will be tested once the Color class can create
3376         objects that reference other color spaces.
3377
3378         * platform/graphics/ColorSpace.h:
3379         * platform/graphics/cg/GraphicsContextCG.cpp:
3380         (WebCore::displayP3ColorSpaceRef):
3381         * platform/graphics/cg/GraphicsContextCG.h:
3382         (WebCore::cachedCGColorSpace):
3383
3384 2016-10-14  Brent Fulgham  <bfulgham@apple.com>
3385
3386         [Win][Direct2D] Minor cleanups
3387         https://bugs.webkit.org/show_bug.cgi?id=162953
3388
3389         Reviewed by Dean Jackson.
3390
3391         Code cleanup. No change in behavior.
3392
3393         * platform/graphics/win/ImageDecoderDirect2D.cpp:
3394         (WebCore::ImageDecoder::frameIsCompleteAtIndex):
3395         (WebCore::ImageDecoder::frameBytesAtIndex):
3396
3397 2016-10-14  Alex Christensen  <achristensen@webkit.org>
3398
3399         Fix CMake build.
3400
3401         * PlatformMac.cmake:
3402
3403 2016-10-14  Anders Carlsson  <andersca@apple.com>
3404
3405         Pass on networking settings to the PKPaymentRequest
3406         https://bugs.webkit.org/show_bug.cgi?id=163462
3407         rdar://problem/28567629
3408
3409         Reviewed by Dan Bernstein.
3410
3411         Add new SPI.
3412
3413         * platform/spi/cocoa/PassKitSPI.h:
3414
3415 2016-10-14  Dean Jackson  <dino@apple.com>
3416
3417         CSS parsing should use Color not RGBA32
3418         https://bugs.webkit.org/show_bug.cgi?id=163423
3419         <rdar://problem/28766903>
3420
3421         Reviewed by Simon Fraser.
3422
3423         Re-landing this after it was rolled out in https://trac.webkit.org/r207342.
3424
3425         In order to allow CSS to use the ExtendedColor variant of
3426         Color, we need to stop using RGBA32. This is a fairly big
3427         change that goes through all the places in the parser
3428         related to colors, and moves them from RGBA32 to Color.
3429
3430         No change in functionality, so covered by existing tests.
3431
3432         * WebCore.xcodeproj/project.pbxproj: Add the new ColorHash.h file.
3433
3434         * css/CSSPrimitiveValue.cpp: CSSPrimitiveValue now can hold a Color*
3435         rather than an unsigned int for colors.
3436         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3437         (WebCore::CSSPrimitiveValue::cleanup):
3438         (WebCore::CSSPrimitiveValue::getRGBColorValue):
3439         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):