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