1 2016-08-03 Youenn Fablet <youenn@apple.com>
3 http/tests/fetch/fetch-in-worker-crash.html is sometimes crashing
4 https://bugs.webkit.org/show_bug.cgi?id=160498
6 Reviewed by Chris Dumez.
8 Covered by http/tests/fetch/fetch-in-worker-crash.html.
10 * loader/WorkerThreadableLoader.cpp:
11 (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel): Taking a reference of the client wrapper to ensure it can be cleaned-up successfully.
13 2016-08-02 Anders Carlsson <andersca@apple.com>
15 Freeze the last of the Objective-C bindings
16 https://bugs.webkit.org/show_bug.cgi?id=160482
18 Reviewed by Darin Adler.
20 * WebCore.xcodeproj/project.pbxproj:
21 * bindings/objc/DOMAttr.h: Added.
22 * bindings/objc/DOMAttr.mm: Added.
23 * bindings/objc/DOMAttrInternal.h: Added.
24 * bindings/objc/DOMCDATASection.h: Added.
25 * bindings/objc/DOMCDATASection.mm: Added.
26 * bindings/objc/DOMCDATASectionInternal.h: Added.
27 * bindings/objc/DOMCharacterData.h
28 * bindings/objc/DOMCharacterData.mm: Added.
29 * bindings/objc/DOMCharacterDataInternal.h: Added.
30 * bindings/objc/DOMComment.h: Added.
31 * bindings/objc/DOMComment.mm: Added.
32 * bindings/objc/DOMCommentInternal.h: Added.
33 * bindings/objc/DOMDOMImplementation.h: Added.
34 * bindings/objc/DOMDOMImplementation.mm: Added.
35 * bindings/objc/DOMDOMImplementationInternal.h: Added.
36 * bindings/objc/DOMDocument.h: Added.
37 * bindings/objc/DOMDocument.mm: Added.
38 * bindings/objc/DOMDocumentFragment.h: Added.
39 * bindings/objc/DOMDocumentFragment.mm: Added.
40 * bindings/objc/DOMDocumentFragmentInternal.h: Added.
41 * bindings/objc/DOMDocumentFragmentPrivate.h: Added.
42 * bindings/objc/DOMDocumentInternal.h: Added.
43 * bindings/objc/DOMDocumentPrivate.h: Added.
44 * bindings/objc/DOMDocumentType.h: Added.
45 * bindings/objc/DOMDocumentType.mm: Added.
46 * bindings/objc/DOMDocumentTypeInternal.h: Added.
47 * bindings/objc/DOMElement.h: Added.
48 * bindings/objc/DOMElement.mm: Added.
49 * bindings/objc/DOMElementInternal.h: Added.
50 * bindings/objc/DOMEntity.h: Added.
51 * bindings/objc/DOMEntity.mm: Added.
52 * bindings/objc/DOMEntityInternal.h: Added.
53 * bindings/objc/DOMEntityReference.h: Added.
54 * bindings/objc/DOMEntityReference.mm: Added.
55 * bindings/objc/DOMEntityReferenceInternal.h: Added.
56 * bindings/objc/DOMNamedNodeMap.h: Added.
57 * bindings/objc/DOMNamedNodeMap.mm: Added.
58 * bindings/objc/DOMNamedNodeMapInternal.h: Added.
59 * bindings/objc/DOMNode.h: Added.
60 * bindings/objc/DOMNode.mm: Added.
61 * bindings/objc/DOMNodeInternal.h: Added.
62 * bindings/objc/DOMNodeList.h: Added.
63 * bindings/objc/DOMNodeList.mm: Added.
64 * bindings/objc/DOMNodeListInternal.h: Added.
65 * bindings/objc/DOMNodePrivate.h: Added.
66 * bindings/objc/DOMProcessingInstruction.h: Added.
67 * bindings/objc/DOMProcessingInstruction.mm: Added.
68 * bindings/objc/DOMProcessingInstructionInternal.h: Added.
69 * bindings/objc/DOMText.h: Added.
70 * bindings/objc/DOMText.mm: Added.
71 * bindings/objc/DOMTextEvent.mm:
72 * bindings/objc/DOMTextEventInternal.h:
73 * bindings/objc/DOMTextInternal.h: Added.
75 2016-08-03 Eric Carlson <eric.carlson@apple.com>
77 [Mac][iOS] Adopt MediaRemote "seek to playback position"
78 https://bugs.webkit.org/show_bug.cgi?id=160405
79 <rdar://problem/27547583>
81 Reviewed by Dean Jackson.
83 * platform/ios/RemoteCommandListenerIOS.mm:
84 (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS): Fix a typo.
86 2016-08-02 Frederic Wang <fwang@igalia.com>
88 Move determination of operator direction into DOM class and reduce relayout
89 https://bugs.webkit.org/show_bug.cgi?id=160339
91 Reviewed by Darin Adler.
93 We move the determination of operator direction into MathMLOperatorElement. We also simplify
94 a bit RenderMathMLFencedOperator so that the update of operator properties are done
95 immediately in updateOperatorContent and the resolution of to LayoutUnit is implemented
96 in leadingSpace, trailingSpace, minSize and maxSize. After that, setOperatorProperties is no
97 longer necessary and we can remove many calls that used to update operator properties and
100 No new tests, already covered by existing tests.
102 * mathml/MathMLInlineContainerElement.cpp:
103 (WebCore::MathMLInlineContainerElement::childrenChanged): No need to call updateOperatorProperties.
104 * mathml/MathMLOperatorElement.cpp: Change names from "text" to "char".
105 (WebCore::MathMLOperatorElement::parseOperatorChar): Parse character and isVertical in this function.
106 (WebCore::MathMLOperatorElement::operatorChar):
107 (WebCore::MathMLOperatorElement::childrenChanged):
108 (WebCore::MathMLOperatorElement::computeDictionaryProperty): Call operatorChar().character.
109 (WebCore::MathMLOperatorElement::parseOperatorText): Deleted.
110 (WebCore::MathMLOperatorElement::operatorText): Deleted.
111 * mathml/MathMLOperatorElement.h: Use a new structure to hold both the character and direction
112 and change names from "text" to "char".
113 * rendering/mathml/RenderMathMLFencedOperator.cpp:
114 (WebCore::RenderMathMLFencedOperator::updateOperatorContent): Update both the character and
115 direction using MathMLOperatorElement::parseOperatorChar. Then set the boolean properties
116 and leading/trailing space using the operator dictionary. minsize and maxsize are constant
117 so we do not need to set them any more.
118 (WebCore::RenderMathMLFencedOperator::leadingSpace): Resolve the spacing read from the
119 dictionary to LayoutUnit. Note that it can never be negative.
120 (WebCore::RenderMathMLFencedOperator::trailingSpace): Ditto.
121 (WebCore::RenderMathMLFencedOperator::RenderMathMLFencedOperator): Deleted.
122 (WebCore::RenderMathMLFencedOperator::setOperatorProperties): Deleted.
123 * rendering/mathml/RenderMathMLFencedOperator.h: We use the new OperatorChar structure for
124 accessors and members. We make minSize and maxSize just return the default values and delete
125 the corresponding members. Finally, leading and trailing space are now stored as unsigned
127 * rendering/mathml/RenderMathMLOperator.cpp:
128 (WebCore::RenderMathMLOperator::textContent): Use the new OperatorChar structure.
129 (WebCore::RenderMathMLOperator::isVertical): Helper function forwarding to MathMLOperatorElement.
130 (WebCore::RenderMathMLOperator::stretchTo): Use isVertical() and remove setOperatorProperties().
131 (WebCore::RenderMathMLOperator::resetStretchSize): Ditto.
132 (WebCore::RenderMathMLOperator::updateMathOperator): Rename rebuildTokenContent as this is
133 now really only used to update MathOperator and hence replace the condition on
134 useMathOperator() with an ASSERT.
135 (WebCore::RenderMathMLOperator::updateTokenContent): Call updateMathOperator instead of
137 (WebCore::RenderMathMLOperator::verticalStretchedOperatorShift): We use isVertical().
138 (WebCore::RenderMathMLOperator::paint): Ditto.
139 (WebCore::RenderMathMLOperator::setOperatorProperties): Deleted. This is no longer needed.
140 (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Deleted.
141 (WebCore::RenderMathMLOperator::rebuildTokenContent): Deleted. Renamed updateMathOperator.
142 (WebCore::RenderMathMLOperator::styleDidChange): No need to call updateOperatorProperties.
143 (WebCore::RenderMathMLOperator::updateOperatorProperties): Ditto..
144 * rendering/mathml/RenderMathMLOperator.h: Update some declaration and remove m_isVertical.
145 (WebCore::RenderMathMLOperator::isVertical): Deleted.
146 * rendering/mathml/RenderMathMLRow.cpp:
147 (WebCore::RenderMathMLRow::updateOperatorProperties): Deleted. This is no longer needed.
148 * rendering/mathml/RenderMathMLRow.h: Ditto.
150 2016-08-02 Chris Dumez <cdumez@apple.com>
152 Drop custom bindings code for HTMLSelectElement.remove()
153 https://bugs.webkit.org/show_bug.cgi?id=160477
155 Reviewed by Darin Adler.
157 Drop custom bindings code for HTMLSelectElement.remove() and use
160 * bindings/js/JSHTMLSelectElementCustom.cpp:
161 (WebCore::JSHTMLSelectElement::remove): Deleted.
162 * html/HTMLSelectElement.idl:
164 2016-08-02 Chris Dumez <cdumez@apple.com>
166 Drop custom bindings code for HTMLOptionsCollection.remove()
167 https://bugs.webkit.org/show_bug.cgi?id=160475
169 Reviewed by Darin Adler.
171 Drop custom bindings code for HTMLOptionsCollection.remove() and use
172 overloading instead. The overload that take an HTMLOptionElement is
173 WebKit-specific and should probably be dropped at some point:
174 - https://html.spec.whatwg.org/multipage/infrastructure.html#htmloptionscollection
176 This patch also fixes several bugs:
177 - The parameter is now mandatory. This is consistent with the
178 specification, Firefox and Chrome.
179 - HTMLOptionsCollection.prototype.remove.length is now 1 instead of 0.
181 No new tests, rebaselined existing tests.
183 * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
184 (WebCore::JSHTMLOptionsCollection::remove): Deleted.
185 * html/HTMLOptionsCollection.idl:
187 2016-08-02 Nan Wang <n_wang@apple.com>
189 AX: Simulated touch events are not working on iOS
190 https://bugs.webkit.org/show_bug.cgi?id=160395
191 <rdar://problem/27633597>
193 Reviewed by Chris Fleizach.
195 We should mark the simulated touch as a potential tap otherwise it won't
196 be handled on iOS. Also, we need to dispatch both touch start and touch end
197 to mimic the real touch events. Last, added a has event listeners check,
198 because iOS is dispatching mouse click events for elements without touch event
201 Test: accessibility/ios-simulator/press-fires-touch-events.html
203 * accessibility/AccessibilityObject.cpp:
204 (WebCore::AccessibilityObject::press):
205 (WebCore::AccessibilityObject::dispatchTouchEvent):
206 * page/ios/EventHandlerIOS.mm:
207 (WebCore::EventHandler::dispatchSimulatedTouchEvent):
208 * platform/ios/PlatformEventFactoryIOS.mm:
209 (WebCore::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
211 2016-08-02 Benjamin Poulain <bpoulain@apple.com>
213 Clean up some useless AtomicString atoms
214 https://bugs.webkit.org/show_bug.cgi?id=160471
216 Reviewed by Geoffrey Garen.
218 The only uses of "commentAtom" and "textAtom" where for their
219 respective overload of Node::nodeName().
220 Those methods return a string, we should not keep them in the atomic
221 string table just to hold a small String alive. They were also the only
222 two nodes to behave that way.
224 The atom xlinkAtom was only used by createForeignAttributesMap(), which
225 is itself only invoked once. There is no need for the symbol xlinkAtom.
227 * dom/CDATASection.cpp:
228 (WebCore::CDATASection::nodeName):
230 (WebCore::Comment::nodeName):
232 (WebCore::Document::nodeName):
234 (WebCore::Text::nodeName):
235 * html/parser/HTMLTreeBuilder.cpp:
236 (WebCore::createForeignAttributesMap):
238 2016-08-02 Anders Carlsson <andersca@apple.com>
240 Freeze the Objective-C DOM Event and CSS bindings
241 https://bugs.webkit.org/show_bug.cgi?id=160476
243 Reviewed by Tim Horton.
245 * DerivedSources.make:
246 * WebCore.xcodeproj/project.pbxproj:
247 * bindings/objc/DOMCSSCharsetRule.h: Added.
248 * bindings/objc/DOMCSSCharsetRule.mm: Added.
249 * bindings/objc/DOMCSSCharsetRuleInternal.h: Added.
250 * bindings/objc/DOMCSSFontFaceRule.h: Added.
251 * bindings/objc/DOMCSSFontFaceRule.mm: Added.
252 * bindings/objc/DOMCSSFontFaceRuleInternal.h: Added.
253 * bindings/objc/DOMCSSImportRule.h: Added.
254 * bindings/objc/DOMCSSImportRule.mm: Added.
255 * bindings/objc/DOMCSSImportRuleInternal.h: Added.
256 * bindings/objc/DOMCSSMediaRule.h: Added.
257 * bindings/objc/DOMCSSMediaRule.mm: Added.
258 * bindings/objc/DOMCSSMediaRuleInternal.h: Added.
259 * bindings/objc/DOMCSSPageRule.h: Added.
260 * bindings/objc/DOMCSSPageRule.mm: Added.
261 * bindings/objc/DOMCSSPageRuleInternal.h: Added.
262 * bindings/objc/DOMCSSPrimitiveValue.h: Added.
263 * bindings/objc/DOMCSSPrimitiveValue.mm: Added.
264 * bindings/objc/DOMCSSPrimitiveValueInternal.h: Added.
265 * bindings/objc/DOMCSSRule.h: Added.
266 * bindings/objc/DOMCSSRule.mm: Added.
267 * bindings/objc/DOMCSSRuleInternal.h: Added.
268 * bindings/objc/DOMCSSRuleList.h: Added.
269 * bindings/objc/DOMCSSRuleList.mm: Added.
270 * bindings/objc/DOMCSSRuleListInternal.h: Added.
271 * bindings/objc/DOMCSSStyleDeclaration.h: Added.
272 * bindings/objc/DOMCSSStyleDeclaration.mm: Added.
273 * bindings/objc/DOMCSSStyleDeclarationInternal.h: Added.
274 * bindings/objc/DOMCSSStyleRule.h: Added.
275 * bindings/objc/DOMCSSStyleRule.mm: Added.
276 * bindings/objc/DOMCSSStyleRuleInternal.h: Added.
277 * bindings/objc/DOMCSSStyleSheet.h: Added.
278 * bindings/objc/DOMCSSStyleSheet.mm: Added.
279 * bindings/objc/DOMCSSStyleSheetInternal.h: Added.
280 * bindings/objc/DOMCSSUnknownRule.h: Added.
281 * bindings/objc/DOMCSSUnknownRule.mm: Added.
282 * bindings/objc/DOMCSSUnknownRuleInternal.h: Added.
283 * bindings/objc/DOMCSSValue.h: Added.
284 * bindings/objc/DOMCSSValue.mm: Added.
285 * bindings/objc/DOMCSSValueInternal.h: Added.
286 * bindings/objc/DOMCSSValueList.h: Added.
287 * bindings/objc/DOMCSSValueList.mm: Added.
288 * bindings/objc/DOMCSSValueListInternal.h: Added.
289 * bindings/objc/DOMCounter.h: Added.
290 * bindings/objc/DOMCounter.mm: Added.
291 * bindings/objc/DOMCounterInternal.h: Added.
292 * bindings/objc/DOMEvent.h: Added.
293 * bindings/objc/DOMEvent.mm: Added.
294 * bindings/objc/DOMEventInternal.h: Added.
295 * bindings/objc/DOMEventListener.h: Added.
296 * bindings/objc/DOMEventTarget.h: Added.
297 * bindings/objc/DOMKeyboardEvent.h: Added.
298 * bindings/objc/DOMKeyboardEvent.mm: Added.
299 * bindings/objc/DOMKeyboardEventInternal.h: Added.
300 * bindings/objc/DOMMouseEvent.h: Added.
301 * bindings/objc/DOMMouseEvent.mm: Added.
302 * bindings/objc/DOMMouseEventInternal.h: Added.
303 * bindings/objc/DOMMutationEvent.h: Added.
304 * bindings/objc/DOMMutationEvent.mm: Added.
305 * bindings/objc/DOMMutationEventInternal.h: Added.
306 * bindings/objc/DOMOverflowEvent.h: Added.
307 * bindings/objc/DOMOverflowEvent.mm: Added.
308 * bindings/objc/DOMOverflowEventInternal.h: Added.
309 * bindings/objc/DOMProgressEvent.h: Added.
310 * bindings/objc/DOMProgressEvent.mm: Added.
311 * bindings/objc/DOMProgressEventInternal.h: Added.
312 * bindings/objc/DOMRGBColor.h: Added.
313 * bindings/objc/DOMRGBColor.mm: Added.
314 * bindings/objc/DOMRGBColorInternal.h: Added.
315 * bindings/objc/DOMRect.h: Added.
316 * bindings/objc/DOMRect.mm: Added.
317 * bindings/objc/DOMRectInternal.h: Added.
318 * bindings/objc/DOMTextEvent.h: Added.
319 * bindings/objc/DOMTextEvent.mm: Added.
320 (-[DOMTextEvent data]):
321 (-[DOMTextEvent initTextEvent:canBubbleArg:cancelableArg:viewArg:dataArg:]):
322 * bindings/objc/DOMTextEventInternal.h: Added.
323 * bindings/objc/DOMUIEvent.h: Added.
324 * bindings/objc/DOMUIEvent.mm: Added.
325 * bindings/objc/DOMUIEventInternal.h: Added.
326 * bindings/objc/DOMWheelEvent.h: Added.
327 * bindings/objc/DOMWheelEvent.mm: Added.
328 * bindings/objc/DOMWheelEventInternal.h: Added.
330 2016-08-02 Enrica Casucci <enrica@apple.com>
332 Allow building with content filtering disabled.
333 https://bugs.webkit.org/show_bug.cgi?id=160454
335 Reviewed by Simon Fraser.
337 * Configurations/FeatureDefines.xcconfig:
338 * platform/PlatformContentFilter.h:
339 (WebCore::PlatformContentFilter::unblockRequestDeniedScript):
340 * platform/cocoa/NetworkExtensionContentFilter.h:
341 * platform/cocoa/NetworkExtensionContentFilter.mm:
342 (WebCore::NetworkExtensionContentFilter::unblockHandler):
343 * platform/cocoa/ParentalControlsContentFilter.h:
344 * testing/MockContentFilter.h:
346 2016-08-02 Dean Jackson <dino@apple.com>
348 Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569
349 https://bugs.webkit.org/show_bug.cgi?id=160474
350 <rdar://problem/27668170>
352 Reviewed by Simon Fraser.
354 The fixes are behaviour we want. They just caused a regression
355 on medium.com (reverted in http://trac.webkit.org/r203380).
357 Now that we've branched, revert the reversion (which itself
358 was a reversion), so we can fix the actual bug:
359 https://bugs.webkit.org/show_bug.cgi?id=160478
362 (WebCore::CSSParser::parseValue):
363 (WebCore::CSSParser::parseAnimationShorthand):
364 (WebCore::CSSParser::addPropertyWithPrefixingVariant):
365 (WebCore::CSSParser::parseTransitionShorthand):
366 * css/CSSPropertyNames.in:
367 * css/PropertySetCSSStyleDeclaration.cpp:
368 (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
369 (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
370 (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
371 (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
372 * css/StyleProperties.cpp:
373 (WebCore::MutableStyleProperties::removeShorthandProperty):
374 (WebCore::StyleProperties::asText):
375 (WebCore::MutableStyleProperties::removeProperty): Deleted.
376 (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted.
377 (WebCore::MutableStyleProperties::setProperty): Deleted.
378 (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted.
379 (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted.
380 (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted.
381 * css/StyleProperties.h:
383 2016-08-02 Eric Carlson <eric.carlson@apple.com>
385 Cleanup HTMLMediaElement track lists.
386 https://bugs.webkit.org/show_bug.cgi?id=160470
388 Reviewed by David Kilzer.
390 Test: media/range-extract-contents-crash.html
392 * html/HTMLMediaElement.cpp:
393 (WebCore::HTMLMediaElement::~HTMLMediaElement):
395 * html/track/AudioTrack.cpp:
396 (WebCore::AudioTrack::willRemove): ASSERT if media element is NULL.
398 * html/track/TextTrackList.cpp:
399 (TextTrackList::clearElement): Clear track media element pointers and client.
400 * html/track/TextTrackList.h:
402 * html/track/TrackListBase.cpp:
403 (TrackListBase::~TrackListBase): Call clearElement.
404 (TrackListBase::clearElement): Clear track media element pointers and client.
405 * html/track/TrackListBase.h:
407 2016-08-02 Anders Carlsson <andersca@apple.com>
409 Remove more Objective-C bindings that are not used
410 https://bugs.webkit.org/show_bug.cgi?id=160473
412 Reviewed by Sam Weinig.
414 * DerivedSources.make:
415 * WebCore.xcodeproj/project.pbxproj:
416 * bindings/objc/DOMCSS.mm:
420 2016-08-02 Chris Dumez <cdumez@apple.com>
422 Drop custom bindings for FormData.append()
423 https://bugs.webkit.org/show_bug.cgi?id=160466
425 Reviewed by Sam Weinig.
427 Drop custom bindings for FormData.append(). We no longer need them now
428 that we have proper support for overloads after r204028.
430 This patch also fixes the fact that FormData.prototype.append.length
433 No new tests, rebaselined existing test.
435 * bindings/js/JSDOMFormDataCustom.cpp:
436 (WebCore::JSDOMFormData::append): Deleted.
437 * html/DOMFormData.cpp:
438 (WebCore::DOMFormData::append):
439 * html/DOMFormData.h:
440 * html/DOMFormData.idl:
441 * html/FileInputType.cpp:
442 (WebCore::FileInputType::appendFormData):
443 * html/FormDataList.cpp:
444 (WebCore::FormDataList::appendBlob):
445 * html/FormDataList.h:
446 (WebCore::FormDataList::Item::Item):
447 (WebCore::FormDataList::appendBlob):
449 2016-08-02 Commit Queue <commit-queue@webkit.org>
451 Unreviewed, rolling out r203799.
452 https://bugs.webkit.org/show_bug.cgi?id=160467
454 Decided on a different solution (Requested by jonlee_ on
459 "Captions do not render in PiP window when element is hidden"
460 https://bugs.webkit.org/show_bug.cgi?id=160265
461 http://trac.webkit.org/changeset/203799
463 2016-08-02 Alex Christensen <achristensen@webkit.org>
465 Remove unused functions in URL
466 https://bugs.webkit.org/show_bug.cgi?id=160468
468 Reviewed by Geoffrey Garen.
470 * page/SecurityOrigin.cpp:
471 (WebCore::SecurityOrigin::extractInnerURL):
473 (WebCore::mimeTypeFromURL):
474 (WebCore::URL::stringCenterEllipsizedToLength):
475 (WebCore::URL::isSafeToSendToAnotherThread): Deleted.
477 (WebCore::URL::operator NSString*):
478 (WebCore::URL::innerURL): Deleted.
480 2016-08-02 Chris Dumez <cdumez@apple.com>
482 Named / Indexed properties should be configurable
483 https://bugs.webkit.org/show_bug.cgi?id=160457
485 Reviewed by Darin Adler.
487 Report Named / Indexed properties as being configurable to comply with
488 the Web IDL specification:
489 - http://heycam.github.io/webidl/#getownproperty-guts (step 1. and 2.)
491 Firefox and Chrome also report them as being configurable.
493 No new tests, rebaselined existing tests.
495 * bindings/scripts/CodeGeneratorJS.pm:
496 (GenerateGetOwnPropertySlotBody):
498 2016-08-02 Anders Carlsson <andersca@apple.com>
500 Remove more unused/uninstalled Objective-C DOM bindings
501 https://bugs.webkit.org/show_bug.cgi?id=160464
503 Reviewed by Darin Adler.
505 * Configurations/WebCore.xcconfig:
506 * DerivedSources.make:
507 * WebCore.xcodeproj/project.pbxproj:
508 * bindings/objc/DOMCSS.mm:
510 * bindings/objc/DOMEvents.h:
511 * bindings/objc/DOMEvents.mm:
515 2016-08-02 Chris Dumez <cdumez@apple.com>
517 [WebIDL] Extend new overload resolution algorithm support to constructors
518 https://bugs.webkit.org/show_bug.cgi?id=160455
520 Reviewed by Ryosuke Niwa.
522 Extend new overload resolution algorithm support (added in r204028) to
523 constructors as well. It was only used for operations. Remove code that
524 is now dead from the bindings generator.
526 We now share the same code of generating the overload resolution code
527 for operations and constructors.
529 No new tests, rebaselined existing tests.
531 * bindings/scripts/CodeGenerator.pm:
532 (LinkOverloadedFunctions):
533 * bindings/scripts/CodeGeneratorJS.pm:
534 (GenerateOverloadedFunctionOrConstructor):
535 (GenerateImplementation):
536 (GenerateConstructorDefinitions):
537 (GenerateConstructorDefinition):
538 (GetFunctionLength): Deleted.
539 (LengthOfLongestFunctionParameterList): Deleted.
540 (GetNativeTypeForConversions): Deleted.
541 (GetGnuVTableNameForInterface): Deleted.
542 (GetGnuMangledNameForInterface): Deleted.
543 (GetGnuVTableOffsetForType): Deleted.
544 (GenerateConstructorHelperMethods): Deleted.
545 * bindings/scripts/IDLParser.pm:
546 (applyExtendedAttributeList): Deleted.
547 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
548 (WebCore::JSTestOverloadedConstructorsConstructor::construct):
549 * bindings/scripts/test/TestOverloadedConstructors.idl:
551 2016-08-02 Brady Eidson <beidson@apple.com>
553 Removing IndexedDB WebsiteData can fail for some users.
554 https://bugs.webkit.org/show_bug.cgi?id=160463
556 Reviewed by Alex Christensen.
558 Covered by changes to API test IndexedDB.StoreBlobThenDelete.
560 For a few months in trunk WebKit, deleting an IndexedDB using WebsiteDataStore API would only
561 delete the "IndexedDB.sqlite3" file, but would leave the "-wal" and "-shm" files behind.
563 We'd then fail to delete the directory itself, tricking API clients to think there are still
564 databases in the given origin.
566 Furthermore, the code to delete a database first checks for the existence of "IndexedDB.sqlite3"
567 then refuses to do any further cleanup if it doesn't exist.
569 We should just always run the entire delete procedure even if IndexedDB.sqlite does not exist.
571 * Modules/indexeddb/server/IDBServer.cpp:
572 (WebCore::IDBServer::removeAllDatabasesForOriginPath):
574 * platform/sql/SQLiteFileSystem.cpp:
575 (WebCore::SQLiteFileSystem::deleteDatabaseFile):
577 2016-08-02 Alex Christensen <achristensen@webkit.org>
582 Some ObjC bindings have been frozen.
584 2016-08-02 Frederic Wang <fwang@igalia.com>
586 More cleanup of MathML operator parsing
587 https://bugs.webkit.org/show_bug.cgi?id=160336
589 Reviewed by Darin Adler.
591 No new tests, behavior is unchanged.
593 * rendering/mathml/RenderMathMLBlock.cpp:
594 (WebCore::parseMathMLLength): Deleted. This function is no longer used.
595 * rendering/mathml/RenderMathMLBlock.h: Ditto.
596 * rendering/mathml/RenderMathMLFencedOperator.h: Move some length members from
597 RenderMathMLOperator and override the accessors. Also override useMathOperator() since it is
598 always true for anonymous mfenced operators.
599 * rendering/mathml/RenderMathMLOperator.cpp:
600 (WebCore::RenderMathMLOperator::textContent): No need to ASSERT !isAnonymous since this
601 function is overriden by RenderMathMLFencedOperator.
602 (WebCore::RenderMathMLOperator::isInvisibleOperator): Use a temporary variable to call
603 textContent only once.
604 (WebCore::RenderMathMLOperator::leadingSpace): Helper function to determine the leading space.
605 (WebCore::RenderMathMLOperator::trailingSpace): Helper function to determine the trailing space.
606 (WebCore::RenderMathMLOperator::minSize): Helper function to determine the min space.
607 (WebCore::RenderMathMLOperator::maxSize): Helper function to determine the max space.
608 (WebCore::RenderMathMLOperator::setOperatorProperties): This is now only used to set m_isVertical.
609 (WebCore::RenderMathMLOperator::stretchTo): Call maxSize and minSize when necessary.
610 (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Call leadingSpace and trailingSpace.
611 (WebCore::RenderMathMLOperator::layoutBlock): Ditto.
612 (WebCore::RenderMathMLOperator::useMathOperator): Remove the case for anonymous operators as
613 this is now handled in the derived class.
614 (WebCore::RenderMathMLOperator::paint): Call leadingSpace.
615 * rendering/mathml/RenderMathMLOperator.h: Remove length members and declare helper functions
616 to get these lengths from MathMLOperatorElement.
617 (WebCore::RenderMathMLOperator::setLeadingSpace): Deleted. This is no longer used.
618 (WebCore::RenderMathMLOperator::setTrailingSpace): Deleted. This is no longer used.
620 2016-08-02 Frederic Wang <fwang@igalia.com>
622 Move parsing of operator length attributes to MathMLOperatorElement
623 https://bugs.webkit.org/show_bug.cgi?id=160301
625 Reviewed by Darin Adler.
627 We move parsing of operator attributes lspace, rspace minsize, maxsize into the class
628 MathMLOperatorElement. We rely on the existing MathMLElement::Length structure and expand
629 it to handle the "infinity" case of maxsize that we always resolve as intMaxForLayoutUnit.
630 We also improve the resolution of a negative value for minsize and maxsize since the MathML
631 recommendation says it should be rounded up to the nearest valid value (which is zero)
632 instead of ignoring the attribute and using the default value. This is similar to r203285
633 for mfrac@linethickness. We also update the existing test for minsize/maxsize to take into
636 No new tests, already covered by existing tests.
638 * mathml/MathMLElement.h: Add an "Infinity" type for MathML Length.
639 * mathml/MathMLOperatorElement.cpp:
640 (WebCore::MathMLOperatorElement::leadingSpace): Helper function to retrieve the cached value
641 for the lspace attribute, parse it if necessary.
642 (WebCore::MathMLOperatorElement::trailingSpace): Ditto for rspace.
643 (WebCore::MathMLOperatorElement::minSize): Ditto for minsize.
644 (WebCore::MathMLOperatorElement::maxSize): Ditto for maxsize. This attribute also accepts the
646 (WebCore::MathMLOperatorElement::parseAttribute): Mark attributes dirty.
647 * mathml/MathMLOperatorElement.h: Declare Length members and accessors.
648 * rendering/mathml/RenderMathMLBlock.cpp:
649 (WebCore::toUserUnits): Resolve Infinity as intMaxForLayoutUnit.
650 * rendering/mathml/RenderMathMLOperator.cpp:
651 (WebCore::RenderMathMLOperator::setOperatorProperties): We use toUserUnits to resolve the
652 lengths. Negative maxsize and minsize values now fallback to 0 instead of their default
653 values. We also remove the !isAnonymous() check since setOperatorProperties is overriden
654 in the RenderMathMLFencedOperator class.
656 2016-08-02 Frederic Wang <fred.wang@free.fr>
658 Unreviewed build error fix.
660 * mathml/MathMLOperatorElement.cpp:
661 (WebCore::propertyFlagToAttributeName): Return a nullQName to avoid warnings on some platforms.
663 2016-08-02 Anders Carlsson <andersca@apple.com>
665 Stop building Objective-C bindings that aren't exposed anywhere
666 https://bugs.webkit.org/show_bug.cgi?id=160458
668 Reviewed by Darin Adler.
670 * DerivedSources.make:
671 * WebCore.xcodeproj/project.pbxproj:
673 2016-08-02 Chris Dumez <cdumez@apple.com>
675 HTMLCollection's named getter should only do 'name' attribute matching for HTMLElements
676 https://bugs.webkit.org/show_bug.cgi?id=160456
678 Reviewed by Darin Adler.
680 HTMLCollection's named getter should only do 'name' attribute matching for HTMLElements:
681 - https://dom.spec.whatwg.org/#dom-htmlcollection-nameditem
683 Our slow path which relies on HTMLCollection::updateNamedElementCache() does the right
684 thing. However, we have a fast path in
685 CachedHTMLCollection<HTMLCollectionClass, traversalType>::namedItem() that was missing a
688 Firefox and Chrome both behave correctly here.
690 No new tests, rebaselined existing tests.
692 * html/CachedHTMLCollection.h:
693 (WebCore::traversalType>::namedItem):
695 2016-08-02 Chris Dumez <cdumez@apple.com>
697 Kill [StrictTypeChecking] IDL extended attribute
698 https://bugs.webkit.org/show_bug.cgi?id=160382
700 Reviewed by Darin Adler.
702 Kill [StrictTypeChecking] IDL extended attribute. Its only remaining
703 use was on DOMString parameters for a few CanvasRenderingContext2D
704 operations in order to work around a bug in our overload resolution.
706 However, as of r204028, we implement the Web IDL overload resolution
707 algorithm and [StrictTypeChecking] is now a no-op and is no longer
710 * bindings/scripts/CodeGeneratorJS.pm:
711 (GenerateParametersCheckExpression):
712 * bindings/scripts/IDLAttributes.txt:
713 * bindings/scripts/test/TestObj.idl:
714 * bindings/scripts/test/TestTypedefs.idl:
715 * html/canvas/CanvasRenderingContext2D.idl:
717 2016-08-02 Frederic Wang <fwang@igalia.com>
719 Move parsing of boolean operator properties into MathMLOperatorElement
720 https://bugs.webkit.org/show_bug.cgi?id=160190
722 Reviewed by Darin Adler.
724 No new tests, already covered by existing tests.
726 * mathml/MathMLOperatorDictionary.h: Add a bit mask with all the property flags set.
727 * mathml/MathMLOperatorElement.cpp:
728 (WebCore::attributeNameToPropertyFlag): helper function to map from attribute name to flag.
729 (WebCore::MathMLOperatorElement::computeOperatorFlag): Helper function to update one
730 bit of m_properties.flags from the corresponding boolean attribute. The default value is
731 taken from the operator dictionary data stored in m_dictionaryProperty.flags.
732 (WebCore::MathMLOperatorElement::hasProperty): Returns whether the operator has a property,
733 parsing it again if the corresponding attribute is dirty.
734 (WebCore::MathMLOperatorElement::childrenChanged): Make all properties dirty.
735 (WebCore::propertyFlagToAttributeName): helper function to map from flag to attribute name.
736 (WebCore::MathMLOperatorElement::parseAttribute): Make all properties dirty if the form
737 attribute changed. Make each property dirty when the corresponding attribute changed.
738 (WebCore::MathMLOperatorElement::flags): Deleted. Replaced with the finer hasProperty function.
739 * mathml/MathMLOperatorElement.h: Define new structure, member and functions to handle
741 * rendering/mathml/RenderMathMLFencedOperator.cpp:
742 (WebCore::RenderMathMLFencedOperator::RenderMathMLFencedOperator): Move m_operatorFlags from
743 the base class to the derived class.
744 * rendering/mathml/RenderMathMLFencedOperator.h: Ditto.
745 * rendering/mathml/RenderMathMLOperator.cpp:
746 (WebCore::RenderMathMLOperator::RenderMathMLOperator): Ditto.
747 (WebCore::RenderMathMLOperator::hasOperatorFlag): Just call hasOperatorFlag from the
748 MathMLOperatorElement class.
749 (WebCore::RenderMathMLOperator::setOperatorProperties): We do not initialize m_operatorFlags
750 since it has been removed from the base class. We also do not parse attributes since this
751 has been moved to the MathMLOperatorElement class.
752 (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute): Deleted.
753 (WebCore::RenderMathMLOperator::setOperatorFlagFromAttributeValue): Deleted.
754 * rendering/mathml/RenderMathMLOperator.h: Move m_operatorFlags from the base class to the
755 derived class, remove some parsing helper functions and update hasOperatorFlag to make it
758 2016-08-01 Anders Carlsson <andersca@apple.com>
760 Freeze another bunch of Objective-C binding files
761 https://bugs.webkit.org/show_bug.cgi?id=160435
763 Reviewed by Alex Christensen.
765 * DerivedSources.make:
766 * WebCore.xcodeproj/project.pbxproj:
767 * bindings/objc/DOMAbstractView.h: Added.
768 * bindings/objc/DOMAbstractView.mm:
769 * bindings/objc/DOMAbstractViewInternal.h: Added.
770 * bindings/objc/DOMMediaList.h: Added.
771 * bindings/objc/DOMMediaList.mm: Added.
772 * bindings/objc/DOMMediaListInternal.h: Added.
773 * bindings/objc/DOMNodeFilter.h: Added.
774 * bindings/objc/DOMNodeIterator.h: Added.
775 * bindings/objc/DOMNodeIterator.mm: Added.
776 * bindings/objc/DOMNodeIteratorInternal.h: Added.
777 * bindings/objc/DOMRange.h: Added.
778 * bindings/objc/DOMRange.mm: Added.
779 * bindings/objc/DOMRangeInternal.h: Added.
780 * bindings/objc/DOMStyleSheet.h: Added.
781 * bindings/objc/DOMStyleSheet.mm: Added.
782 * bindings/objc/DOMStyleSheetInternal.h: Added.
783 * bindings/objc/DOMStyleSheetList.h: Added.
784 * bindings/objc/DOMStyleSheetList.mm: Added.
785 * bindings/objc/DOMStyleSheetListInternal.h: Added.
786 * bindings/objc/DOMTreeWalker.h: Added.
787 * bindings/objc/DOMTreeWalker.mm: Added.
788 * bindings/objc/DOMTreeWalkerInternal.h: Added.
789 * bindings/objc/DOMXPathExpression.h: Added.
790 * bindings/objc/DOMXPathExpression.mm: Added.
791 * bindings/objc/DOMXPathExpressionInternal.h: Added.
792 * bindings/objc/DOMXPathNSResolver.h: Added.
793 * bindings/objc/DOMXPathResult.h: Added.
794 * bindings/objc/DOMXPathResult.mm: Added.
795 * bindings/objc/DOMXPathResultInternal.h: Added.
797 2016-08-02 Frederic Wang <fwang@igalia.com>
799 [MathML] Use more auto for local variables
800 https://bugs.webkit.org/show_bug.cgi?id=160453
802 Reviewed by Darin Adler.
804 No new tests, behavior is unchanged.
806 * mathml/MathMLElement.cpp:
807 (WebCore::MathMLElement::colSpan):
808 (WebCore::MathMLElement::rowSpan):
809 (WebCore::MathMLElement::childShouldCreateRenderer):
810 (WebCore::MathMLElement::defaultEventHandler):
811 * mathml/MathMLSelectElement.cpp:
812 (WebCore::MathMLSelectElement::getSelectedActionChild):
813 (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
814 * rendering/mathml/RenderMathMLFenced.cpp:
815 (WebCore::RenderMathMLFenced::updateFromElement):
817 2016-08-02 Ryan Haddad <ryanhaddad@apple.com>
819 Attempt to fix build after r204014.
821 Unreviewed build fix.
823 * loader/mac/ResourceLoaderMac.mm:
824 (WebCore::ResourceLoader::willCacheResponse):
826 2016-08-02 Chris Dumez <cdumez@apple.com>
828 [WebIDL] Implement overload resolution algorithm
829 https://bugs.webkit.org/show_bug.cgi?id=160394
831 Reviewed by Darin Adler.
833 Implement overload resolution algorithm:
834 - http://heycam.github.io/webidl/#es-overloads
836 This means that our support for operation overloading in our IDL is
837 now a lot more extensive than it used to be and is now compliant with
838 the Web IDL specification.
840 In particular, overloading should now work for a lot more parameter
841 types which means that:
842 - We should be able to drop some custom bindings code in a follow-up patch.
843 - We will be able to drop the [StrictTypeChecking] attribute which was
844 a hack used to make overloading work for parameters of type DOMString.
846 Also, the order of the overloads in the IDL no longer impacts the
847 generated bindings code. It used to be that you needed to put the
848 overloads with the more specific parameter types first in order for the
849 generated bindings code to be somewhat correct.
851 No new tests, rebaselined bindings tests.
853 * bindings/scripts/CodeGenerator.pm:
854 (IsStringOrEnumType):
855 * bindings/scripts/CodeGeneratorJS.pm:
858 (ComputeEffectiveOverloadSet):
859 (AreTypesDistinguishableForOverloadResolution):
860 (GetDistinguishingArgumentIndex):
861 (GetOverloadThatMatches):
862 (GenerateOverloadedFunction):
863 * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
864 (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation):
865 * bindings/scripts/test/JS/JSTestObj.cpp:
866 (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation):
867 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
868 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
869 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter):
870 (WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
871 (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction):
872 (WebCore::jsTestObjConstructorFunctionOverloadedMethod12): Deleted.
873 (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise): Deleted.
874 * bindings/scripts/test/TestObj.idl:
876 * dom/EventTarget.idl:
877 * html/HTMLOptionsCollection.h:
878 * html/HTMLOptionsCollection.idl:
879 * html/HTMLSelectElement.h:
880 (WebCore::HTMLSelectElement::add):
881 * html/HTMLSelectElement.idl:
883 2016-08-02 Myles C. Maxfield <mmaxfield@apple.com>
885 [macOS] Guard workaround in r203314 for only OSes which need it
886 https://bugs.webkit.org/show_bug.cgi?id=160440
888 Reviewed by Simon Fraser.
890 The workarond introduced in r203314 only needs to be applied on
893 No new tests because there is no behavior change.
895 * platform/text/mac/TextBoundaries.mm:
896 (WebCore::findNextWordFromIndex):
898 2016-08-02 Youenn Fablet <youenn@apple.com>
900 Remove CachedResourceRequest initiatingDocumentLoader
901 https://bugs.webkit.org/show_bug.cgi?id=160449
903 Reviewed by Alex Christensen.
905 No change of behavior.
907 * loader/DocumentLoader.cpp:
908 (WebCore::DocumentLoader::startLoadingMainResource): Removing call to setInitiator.
909 * loader/cache/CachedResourceRequest.cpp:
910 (WebCore::CachedResourceRequest::setInitiator): Deleted.
911 * loader/cache/CachedResourceRequest.h:
912 (WebCore::CachedResourceRequest::initiatingDocumentLoader): Deleted.
914 2016-07-28 Frederic Wang <fwang@igalia.com>
916 Move parsing of the form attribute to MathMLOperatorElement
917 https://bugs.webkit.org/show_bug.cgi?id=160239
919 Reviewed by Darin Adler.
921 We move the parsing of the mo@form attribute to the MathMLOperatorElement class. Note that
922 when the attribute is not explicit, the form may also be guessed by searching into the
923 operator dictionary. Hence we also start moving the determination of the default dictionary
924 properties. Moving the actual parsing of the corresponding attributes will be done in
927 No new tests, already covered by existing tests.
929 * mathml/MathMLInlineContainerElement.cpp:
930 (WebCore::MathMLInlineContainerElement::childrenChanged): Make the form of operators dirty
931 if its siblings have changed.
932 * mathml/MathMLOperatorDictionary.cpp:
933 (WebCore::MathMLOperatorDictionary::search): Merge old getEntry functions into one helper
934 function that returns an Optional<Entry>.
935 (WebCore::MathMLOperatorDictionary::getEntry): Deleted
936 * mathml/MathMLOperatorDictionary.h: Declare MathMLOperatorDictionary::find.
937 * mathml/MathMLOperatorElement.cpp:
938 (WebCore::MathMLOperatorElement::dictionaryProperty): We determine the operator form by
939 parsing the corresponding attribute or by using heuristics if that attribute is not
940 specified. We also read dictionary the corresponding dictionary properties.
941 (WebCore::MathMLOperatorElement::flags): Return the flags read from the dictionary.
942 (WebCore::MathMLOperatorElement::defaultLeadingSpace): Return the space read from the dictionary.
943 (WebCore::MathMLOperatorElement::defaultTrailingSpace): Return the space read from the dictionary.
944 (WebCore::MathMLOperatorElement::childrenChanged): Make the dictionary properties dirty.
945 (WebCore::MathMLOperatorElement::parseAttribute): Make the dictionary properties dirty when
947 * mathml/MathMLOperatorElement.h: New member to store dictionary properties and expose them.
948 * rendering/mathml/RenderMathMLFencedOperator.cpp:
949 (WebCore::RenderMathMLFencedOperator::setOperatorProperties): We implement the case specific
950 to anonymous mfenced operators here.
951 * rendering/mathml/RenderMathMLFencedOperator.h: Move the m_operatorForm member here and
952 declare the overriden function setOperatorProperties.
953 * rendering/mathml/RenderMathMLOperator.cpp:
954 (WebCore::RenderMathMLOperator::setOperatorProperties): Simplify this code since the logic
955 has been moved to the element classes.
956 (WebCore::RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry): Deleted.
957 * rendering/mathml/RenderMathMLOperator.h: Remove setOperatorPropertiesFromOpDictEntry, make
958 members accessible to RenderMathMLFencedOperator and remove m_operatorForm.
960 2016-08-02 Frederic Wang <fwang.igalia.com>
962 Use Optional members to store parsed MathML attributes.
963 https://bugs.webkit.org/show_bug.cgi?id=160400
965 Reviewed by Darin Adler.
967 Parsed MathML attributes are stored on the element classes using the memoize pattern to
968 minimize the number of parsing updates. Currently, a dirty flag for each member
969 indicate when it must be parsed again. We change this to wrap these members into an
970 Optional<T> container instead, where a null value indicates that the member is dirty.
972 No new tests, behavior is unchanged.
974 * mathml/MathMLElement.cpp:
975 (WebCore::MathMLElement::cachedMathMLLength):
976 (WebCore::MathMLElement::cachedBooleanAttribute):
977 (WebCore::MathMLElement::parseMathVariantAttribute):
978 (WebCore::MathMLElement::specifiedDisplayStyle):
979 (WebCore::MathMLElement::specifiedMathVariant):
980 * mathml/MathMLElement.h:
981 * mathml/MathMLFractionElement.cpp:
982 (WebCore::MathMLFractionElement::lineThickness):
983 (WebCore::MathMLFractionElement::cachedFractionAlignment):
984 (WebCore::MathMLFractionElement::parseAttribute):
985 * mathml/MathMLFractionElement.h:
986 * mathml/MathMLInlineContainerElement.cpp:
987 (WebCore::MathMLInlineContainerElement::parseAttribute):
988 * mathml/MathMLMathElement.cpp:
989 (WebCore::MathMLMathElement::specifiedDisplayStyle):
990 (WebCore::MathMLMathElement::parseAttribute):
991 * mathml/MathMLOperatorElement.cpp:
992 (WebCore::MathMLOperatorElement::operatorText):
993 * mathml/MathMLPaddedElement.cpp:
994 (WebCore::MathMLPaddedElement::parseAttribute):
995 * mathml/MathMLPaddedElement.h:
996 * mathml/MathMLScriptsElement.cpp:
997 (WebCore::MathMLScriptsElement::parseAttribute):
998 * mathml/MathMLScriptsElement.h:
999 * mathml/MathMLSpaceElement.cpp:
1000 (WebCore::MathMLSpaceElement::parseAttribute):
1001 * mathml/MathMLSpaceElement.h:
1002 * mathml/MathMLTextElement.cpp:
1003 (WebCore::MathMLTextElement::parseAttribute):
1004 * mathml/MathMLUnderOverElement.cpp:
1005 (WebCore::MathMLUnderOverElement::parseAttribute):
1006 * mathml/MathMLUnderOverElement.h:
1007 * rendering/mathml/MathMLStyle.cpp:
1008 (WebCore::MathMLStyle::resolveMathMLStyle):
1009 * rendering/mathml/MathMLStyle.h:
1010 * rendering/mathml/RenderMathMLToken.cpp:
1011 (WebCore::mathVariant):
1012 (WebCore::RenderMathMLToken::updateMathVariantGlyph):
1014 2016-08-02 Youenn Fablet <youenn@apple.com>
1016 [Fetch API] Fetch promises should not reject or resolve when ActiveDOMObjects are being stopped
1017 https://bugs.webkit.org/show_bug.cgi?id=160420
1019 Reviewed by Alex Christensen.
1021 Test: http/tests/fetch/fetch-in-worker-crash.html
1023 Promises should not be rejected when FetchResponse/FetchRequest are stopped as ActiveDOMObject.
1025 * Modules/fetch/FetchBody.h:
1026 (WebCore::FetchBody::cleanConsumePromise): Allowing to nullify the promise used to consume body.
1027 * Modules/fetch/FetchBodyOwner.cpp:
1028 (WebCore::FetchBodyOwner::stop): Nullifying the body consume promise if any.
1029 * Modules/fetch/FetchResponse.cpp:
1030 (WebCore::FetchResponse::BodyLoader::stop): Nullifying the fetch promise if any.
1032 2016-08-02 Youenn Fablet <youenn@apple.com>
1034 [Fetch API] Add support to ReferrerPolicy
1035 https://bugs.webkit.org/show_bug.cgi?id=160404
1037 Reviewed by Alex Christensen.
1039 Tests: imported/w3c/web-platform-tests/fetch/api/basic/referrer-worker.html
1040 imported/w3c/web-platform-tests/fetch/api/basic/referrer.html
1042 Refactored ThreadableLoader API to take more references.
1044 Updated loading code in CachedResource to take into account referrer policy, that can be set by fetch API.
1045 To enable correct handling of OriginWhenCrossOrigin policy, the computation of the cross-origin status of a request is
1046 moved from ResourceLoader to CachedResource.
1048 Referrer is passed to the loading code through HTTP headers.
1049 This was triggering preflighting for Workers request as WorkerThreadableLoader was setting the referrer.
1050 It is now done in DocumentThreadableLoader::loadRequest so that preflighting is done before setting the referrer.
1051 Note that this referrer setting is only a way to pass a specific referrer value to the loading code.
1052 CachedResource code will compute the actual referer value based on the referrer policy.
1053 It might be good in the future to have a different way of conveying this information to CachedResource, maybe
1054 through CachedResourceRequest.
1056 * Modules/fetch/FetchLoader.cpp:
1057 (WebCore::FetchLoader::start): Refactoring of ThreadableLoader API.
1058 * Modules/fetch/FetchRequest.cpp:
1059 (WebCore::FetchRequest::internalRequest): Setting referrer if it has a specific value.
1060 * fileapi/FileReaderLoader.cpp:
1061 (WebCore::FileReaderLoader::start): Ractoring of ThreadableLoader API.
1062 * loader/CrossOriginPreflightChecker.cpp:
1063 (WebCore::CrossOriginPreflightChecker::startPreflight): Set referrer in the preflight request if any.
1064 (WebCore::CrossOriginPreflightChecker::doPreflight): Ditto.
1065 * loader/DocumentThreadableLoader.cpp:
1066 (WebCore::DocumentThreadableLoader::loadResourceSynchronously): Refactoring of ThreadableLoader API.
1067 (WebCore::DocumentThreadableLoader::create): Ditto.
1068 (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Ditto.
1069 (WebCore::DocumentThreadableLoader::loadRequest): Ditto.
1070 * loader/DocumentThreadableLoader.h:
1071 (WebCore::DocumentThreadableLoader::referrer): Storing referrer in case one is defined.
1072 * loader/SubresourceLoader.cpp:
1073 (WebCore::SubresourceLoader::init): Removing of cross origin computation since it is done earlier in CachedResource.
1074 * loader/ThreadableLoader.cpp:
1075 (WebCore::ThreadableLoader::create): Refactoring of ThreadableLoader API.
1076 (WebCore::ThreadableLoader::loadResourceSynchronously): Ditto.
1077 * loader/ThreadableLoader.h:
1078 * loader/ThreadableLoaderClientWrapper.h:
1079 (WebCore::ThreadableLoaderClientWrapper::create): Ditto.
1080 (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper): Ditto.
1081 * loader/WorkerThreadableLoader.cpp:
1082 (WebCore::WorkerThreadableLoader::WorkerThreadableLoader): Ditto.
1083 (WebCore::WorkerThreadableLoader::loadResourceSynchronously): Removing setting of referrer in header and passing
1085 (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Ditto.
1086 * loader/WorkerThreadableLoader.h:
1087 (WebCore::WorkerThreadableLoader::create): Refactoring of ThreadableLoader API.
1088 * loader/cache/CachedResource.cpp:
1089 (WebCore::addAdditionalRequestHeadersToRequest): Computation of referrer based on referrer policy.
1090 (WebCore::CachedResource::addAdditionalRequestHeaders): Ditto.
1091 (WebCore::CachedResource::load): Computation of cross origin status.
1092 (WebCore::CachedResource::varyHeaderValuesMatch):
1093 * loader/cache/CachedResource.h:
1094 (WebCore::CachedResource::options):
1095 * page/EventSource.cpp:
1096 (WebCore::EventSource::connect): Refactoring of ThreadableLoader API.
1097 * workers/WorkerScriptLoader.cpp:
1098 (WebCore::WorkerScriptLoader::loadSynchronously): Ditto.
1099 (WebCore::WorkerScriptLoader::loadAsynchronously): Ditto.
1100 * xml/XMLHttpRequest.cpp:
1101 (WebCore::XMLHttpRequest::createRequest): Ditto.
1103 2016-08-02 Brady Eidson <beidson@apple.com>
1105 Refactor data passed along for a "GetRecord" request.
1106 https://bugs.webkit.org/show_bug.cgi?id=160352
1108 Reviewed by Tim Horton.
1110 No new tests (No behavior change).
1112 Adding this new object lets us easily add new data passed along for GetRecord
1113 requests going forward.
1115 * WebCore.xcodeproj/project.pbxproj:
1118 * Modules/indexeddb/IDBObjectStore.cpp:
1119 (WebCore::IDBObjectStore::get):
1121 * Modules/indexeddb/IDBTransaction.cpp:
1122 (WebCore::IDBTransaction::requestGetRecord):
1123 (WebCore::IDBTransaction::requestIndexRecord):
1124 (WebCore::IDBTransaction::getRecordOnServer):
1125 * Modules/indexeddb/IDBTransaction.h:
1127 * Modules/indexeddb/client/IDBConnectionProxy.cpp:
1128 (WebCore::IDBClient::IDBConnectionProxy::getRecord):
1129 * Modules/indexeddb/client/IDBConnectionProxy.h:
1131 * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1132 (WebCore::IDBClient::IDBConnectionToServer::getRecord):
1133 * Modules/indexeddb/client/IDBConnectionToServer.h:
1134 * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
1136 * Modules/indexeddb/server/IDBServer.cpp:
1137 (WebCore::IDBServer::IDBServer::getRecord):
1138 * Modules/indexeddb/server/IDBServer.h:
1140 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1141 (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
1142 * Modules/indexeddb/server/UniqueIDBDatabase.h:
1144 * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
1145 (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
1146 * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
1148 * Modules/indexeddb/shared/IDBGetRecordData.cpp: Added.
1149 (WebCore::IDBGetRecordData::isolatedCopy):
1150 * Modules/indexeddb/shared/IDBGetRecordData.h: Added.
1151 (WebCore::IDBGetRecordData::encode):
1152 (WebCore::IDBGetRecordData::decode):
1154 * Modules/indexeddb/shared/InProcessIDBServer.cpp:
1155 (WebCore::InProcessIDBServer::getRecord):
1156 * Modules/indexeddb/shared/InProcessIDBServer.h:
1158 2016-08-01 Youenn Fablet <youenn@apple.com>
1160 [Fetch API] Pass directly FetchRequest fetch options to ThreadableLoader
1161 https://bugs.webkit.org/show_bug.cgi?id=160407
1163 Reviewed by Sam Weinig.
1165 No change of behavior.
1167 Added a ResourceLoaderOptions constructor that takes a FetchOptions as input.
1168 Removed setters and getters of ResourceLoaderOptions as it is a struct.
1169 Updated member fields accordingly.
1171 Updated code accordingly.
1172 Removed explicit option setting if it is the same as the default value.
1174 * Modules/fetch/FetchLoader.cpp:
1175 (WebCore::FetchLoader::start):
1176 * css/CSSFontFaceSrcValue.cpp:
1177 (WebCore::CSSFontFaceSrcValue::cachedFont):
1178 * css/CSSImageSetValue.cpp:
1179 (WebCore::CSSImageSetValue::cachedImageSet):
1180 * css/CSSImageValue.cpp:
1181 (WebCore::CSSImageValue::cachedImage):
1182 * dom/ScriptElement.cpp:
1183 (WebCore::ScriptElement::requestScript):
1184 * fileapi/FileReaderLoader.cpp:
1185 (WebCore::FileReaderLoader::start):
1186 * html/HTMLLinkElement.cpp:
1187 (WebCore::HTMLLinkElement::process):
1188 * inspector/InspectorNetworkAgent.cpp:
1189 (WebCore::InspectorNetworkAgent::loadResource):
1190 * loader/CrossOriginPreflightChecker.cpp:
1191 (WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
1192 (WebCore::CrossOriginPreflightChecker::startPreflight):
1193 * loader/DocumentThreadableLoader.cpp:
1194 (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
1195 (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
1196 (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
1197 (WebCore::DocumentThreadableLoader::redirectReceived):
1198 (WebCore::DocumentThreadableLoader::didReceiveResponse):
1199 (WebCore::DocumentThreadableLoader::preflightSuccess):
1200 (WebCore::DocumentThreadableLoader::loadRequest):
1201 * loader/ImageLoader.cpp:
1202 (WebCore::ImageLoader::updateFromElement):
1203 * loader/ResourceLoader.cpp:
1204 (WebCore::ResourceLoader::ResourceLoader):
1205 (WebCore::ResourceLoader::init):
1206 (WebCore::ResourceLoader::start):
1207 (WebCore::ResourceLoader::setDefersLoading):
1208 (WebCore::ResourceLoader::setDataBufferingPolicy):
1209 (WebCore::ResourceLoader::addDataOrBuffer):
1210 (WebCore::ResourceLoader::willSendRequestInternal):
1211 (WebCore::ResourceLoader::didReceiveResponse):
1212 (WebCore::ResourceLoader::didReceiveDataOrBuffer):
1213 (WebCore::ResourceLoader::didFinishLoadingOnePart):
1214 (WebCore::ResourceLoader::cleanupForError):
1215 (WebCore::ResourceLoader::shouldUseCredentialStorage):
1216 (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
1217 * loader/ResourceLoader.h:
1218 (WebCore::ResourceLoader::shouldSendResourceLoadCallbacks):
1219 (WebCore::ResourceLoader::setSendCallbackPolicy):
1220 (WebCore::ResourceLoader::shouldSniffContent):
1221 (WebCore::ResourceLoader::shouldIncludeCertificateInfo):
1222 * loader/ResourceLoaderOptions.h:
1223 (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
1224 (WebCore::ResourceLoaderOptions::sendLoadCallbacks): Deleted.
1225 (WebCore::ResourceLoaderOptions::setSendLoadCallbacks): Deleted.
1226 (WebCore::ResourceLoaderOptions::sniffContent): Deleted.
1227 (WebCore::ResourceLoaderOptions::setSniffContent): Deleted.
1228 (WebCore::ResourceLoaderOptions::dataBufferingPolicy): Deleted.
1229 (WebCore::ResourceLoaderOptions::setDataBufferingPolicy): Deleted.
1230 (WebCore::ResourceLoaderOptions::allowCredentials): Deleted.
1231 (WebCore::ResourceLoaderOptions::setAllowCredentials): Deleted.
1232 (WebCore::ResourceLoaderOptions::securityCheck): Deleted.
1233 (WebCore::ResourceLoaderOptions::setSecurityCheck): Deleted.
1234 (WebCore::ResourceLoaderOptions::certificateInfoPolicy): Deleted.
1235 (WebCore::ResourceLoaderOptions::setCertificateInfoPolicy): Deleted.
1236 (WebCore::ResourceLoaderOptions::contentSecurityPolicyImposition): Deleted.
1237 (WebCore::ResourceLoaderOptions::setContentSecurityPolicyImposition): Deleted.
1238 (WebCore::ResourceLoaderOptions::defersLoadingPolicy): Deleted.
1239 (WebCore::ResourceLoaderOptions::setDefersLoadingPolicy): Deleted.
1240 (WebCore::ResourceLoaderOptions::cachingPolicy): Deleted.
1241 (WebCore::ResourceLoaderOptions::setCachingPolicy): Deleted.
1242 * loader/SubresourceLoader.cpp:
1243 (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):
1244 * loader/TextTrackLoader.cpp:
1245 (WebCore::TextTrackLoader::load):
1246 * loader/cache/CachedRawResource.cpp:
1247 (WebCore::CachedRawResource::setDataBufferingPolicy):
1248 * loader/cache/CachedResource.cpp:
1249 (WebCore::CachedResource::load):
1250 * loader/cache/CachedResource.h:
1251 (WebCore::CachedResource::shouldSendResourceLoadCallbacks):
1252 (WebCore::CachedResource::dataBufferingPolicy):
1253 (WebCore::CachedResource::allowsCaching):
1254 * loader/cache/CachedResourceLoader.cpp:
1255 (WebCore::CachedResourceLoader::canRequest):
1256 * loader/cache/CachedResourceRequest.cpp:
1257 (WebCore::CachedResourceRequest::setAsPotentiallyCrossOrigin):
1258 * loader/cache/CachedResourceRequest.h:
1259 (WebCore::CachedResourceRequest::allowsCaching):
1260 * loader/cache/CachedResourceRequestInitiators.cpp:
1261 (WebCore::CachedResourceRequestInitiators::CachedResourceRequestInitiators):
1262 * loader/cache/CachedResourceRequestInitiators.h:
1263 * loader/mac/ResourceLoaderMac.mm:
1264 (WebCore::ResourceLoader::willCacheResponse):
1265 (WebCore::ResourceLoader::didReceiveDataArray):
1266 * page/EventSource.cpp:
1267 (WebCore::EventSource::connect):
1268 * style/StylePendingResources.cpp:
1269 (WebCore::Style::loadPendingImage):
1270 (WebCore::Style::loadPendingSVGFilters):
1271 * svg/SVGFEImageElement.cpp:
1272 (WebCore::SVGFEImageElement::requestImageResource):
1273 * svg/SVGFontFaceUriElement.cpp:
1274 (WebCore::SVGFontFaceUriElement::loadFont):
1275 * svg/SVGUseElement.cpp:
1276 (WebCore::SVGUseElement::updateExternalDocument):
1277 * workers/WorkerScriptLoader.cpp:
1278 (WebCore::WorkerScriptLoader::loadSynchronously):
1279 (WebCore::WorkerScriptLoader::loadAsynchronously):
1280 * xml/XMLHttpRequest.cpp:
1281 (WebCore::XMLHttpRequest::createRequest):
1283 2016-08-01 Carlos Garcia Campos <cgarcia@igalia.com>
1285 [GTK] Move the redirected XComposite window to the web process
1286 https://bugs.webkit.org/show_bug.cgi?id=160389
1288 Reviewed by Žan Doberšek.
1290 Add helper methods to PlatformDisplayX11 to query X extensions supported by the display.
1292 * platform/graphics/x11/PlatformDisplayX11.cpp:
1293 (WebCore::PlatformDisplayX11::supportsXComposite):
1294 (WebCore::PlatformDisplayX11::supportsXDamage):
1295 * platform/graphics/x11/PlatformDisplayX11.h:
1297 2016-08-01 Andreas Kling <akling@apple.com>
1299 Shrink MediaQuerySets to fit after parsing.
1300 <https://webkit.org/b/160419>
1302 Reviewed by Antti Koivisto.
1304 Add shrinkToFit() helpers to MediaQuerySet and MediaQuery
1305 and call it after parsing to remove extra capacity from their
1308 This reduces memory usage by 1.24MB on theverge.com.
1310 * css/CSSParser.cpp:
1311 (WebCore::CSSParser::createMediaRule):
1312 * css/MediaList.cpp:
1313 (WebCore::MediaQuerySet::parse):
1314 (WebCore::MediaQuerySet::shrinkToFit):
1317 (WebCore::MediaQuery::shrinkToFit):
1319 2016-08-01 Tim Horton <timothy_horton@apple.com>
1321 <attachment> action label doesn't wrap, but needs to for some localizations
1322 https://bugs.webkit.org/show_bug.cgi?id=160431
1323 <rdar://problem/27526464>
1325 Reviewed by Simon Fraser.
1327 Test: fast/attachment/attachment-wrapping-action.html
1329 * rendering/RenderThemeIOS.mm:
1330 (WebCore::AttachmentInfo::buildWrappedLines):
1331 (WebCore::AttachmentInfo::AttachmentInfo):
1332 (WebCore::AttachmentInfo::buildTitleLines): Deleted.
1333 Rework buildTitleLines into buildWrappedLines so that we have a
1334 generic way to add lines that wrap up to N lines and then center-truncate.
1336 Make use of it for the action text, and follow the same rules/width as
1337 the title text already does.
1339 2016-08-01 Anders Carlsson <andersca@apple.com>
1343 * WebCore.xcodeproj/project.pbxproj:
1345 2016-08-01 Anders Carlsson <andersca@apple.com>
1349 * WebCore.xcodeproj/project.pbxproj:
1351 2016-08-01 Anders Carlsson <andersca@apple.com>
1353 Freeze the last of the HTML Objective-C bindings
1354 https://bugs.webkit.org/show_bug.cgi?id=160430
1356 Reviewed by Tim Horton.
1358 Also, remove a bunch of form validation related methods that were never exposed/used.
1360 * DerivedSources.make:
1361 * WebCore.xcodeproj/project.pbxproj:
1362 * bindings/objc/DOMBlob.h: Added.
1363 * bindings/objc/DOMBlob.mm: Added.
1364 * bindings/objc/DOMBlobInternal.h: Added.
1365 * bindings/objc/DOMDOMTokenList.h: Added.
1366 * bindings/objc/DOMDOMTokenList.mm: Added.
1367 * bindings/objc/DOMDOMTokenListInternal.h: Added.
1368 * bindings/objc/DOMFile.h: Added.
1369 * bindings/objc/DOMFile.mm: Added.
1370 * bindings/objc/DOMFileInternal.h: Added.
1371 * bindings/objc/DOMFileList.h: Added.
1372 * bindings/objc/DOMFileList.mm: Added.
1373 * bindings/objc/DOMFileListInternal.h: Added.
1374 * bindings/objc/DOMHTMLButtonElement.mm:
1375 * bindings/objc/DOMHTMLFieldSetElement.mm:
1376 * bindings/objc/DOMHTMLInputElement.mm:
1377 * bindings/objc/DOMHTMLInputElementPrivate.h:
1378 * bindings/objc/DOMHTMLObjectElement.mm:
1379 * bindings/objc/DOMHTMLSelectElement.mm:
1380 * bindings/objc/DOMHTMLTextAreaElement.mm:
1381 * bindings/objc/DOMHTMLTextAreaElementPrivate.h:
1382 * bindings/objc/DOMMediaError.h: Added.
1383 * bindings/objc/DOMMediaError.mm: Added.
1384 * bindings/objc/DOMMediaErrorInternal.h: Added.
1385 * bindings/objc/DOMTimeRanges.h: Added.
1386 * bindings/objc/DOMTimeRanges.mm: Added.
1387 * bindings/objc/DOMTimeRangesInternal.h: Added.
1389 2016-08-01 Anders Carlsson <andersca@apple.com>
1393 * WebCore.xcodeproj/project.pbxproj:
1395 2016-08-01 Anders Carlsson <andersca@apple.com>
1397 Freeze all the DOMHTML* Objective-C bindings
1398 https://bugs.webkit.org/show_bug.cgi?id=160424
1400 Reviewed by Tim Horton.
1402 * DerivedSources.make:
1403 * WebCore.xcodeproj/project.pbxproj:
1404 * bindings/objc/DOMHTMLAnchorElement.h: Added.
1405 * bindings/objc/DOMHTMLAnchorElement.mm: Added.
1406 * bindings/objc/DOMHTMLAnchorElementInternal.h: Added.
1407 * bindings/objc/DOMHTMLAppletElement.h: Added.
1408 * bindings/objc/DOMHTMLAppletElement.mm: Added.
1409 * bindings/objc/DOMHTMLAppletElementInternal.h: Added.
1410 * bindings/objc/DOMHTMLAreaElement.h: Added.
1411 * bindings/objc/DOMHTMLAreaElement.mm: Added.
1412 * bindings/objc/DOMHTMLAreaElementInternal.h: Added.
1413 * bindings/objc/DOMHTMLBRElement.h: Added.
1414 * bindings/objc/DOMHTMLBRElement.mm: Added.
1415 * bindings/objc/DOMHTMLBRElementInternal.h: Added.
1416 * bindings/objc/DOMHTMLBaseElement.h: Added.
1417 * bindings/objc/DOMHTMLBaseElement.mm: Added.
1418 * bindings/objc/DOMHTMLBaseElementInternal.h: Added.
1419 * bindings/objc/DOMHTMLBaseFontElement.h: Added.
1420 * bindings/objc/DOMHTMLBaseFontElement.mm: Added.
1421 * bindings/objc/DOMHTMLBaseFontElementInternal.h: Added.
1422 * bindings/objc/DOMHTMLBodyElement.h: Added.
1423 * bindings/objc/DOMHTMLBodyElement.mm: Added.
1424 * bindings/objc/DOMHTMLBodyElementInternal.h: Added.
1425 * bindings/objc/DOMHTMLButtonElement.h: Added.
1426 * bindings/objc/DOMHTMLButtonElement.mm: Added.
1427 * bindings/objc/DOMHTMLButtonElementInternal.h: Added.
1428 * bindings/objc/DOMHTMLCanvasElement.h: Added.
1429 * bindings/objc/DOMHTMLCanvasElement.mm: Added.
1430 * bindings/objc/DOMHTMLCanvasElementInternal.h: Added.
1431 * bindings/objc/DOMHTMLCollection.h: Added.
1432 * bindings/objc/DOMHTMLCollection.mm: Added.
1433 * bindings/objc/DOMHTMLCollectionInternal.h: Added.
1434 * bindings/objc/DOMHTMLDListElement.h: Added.
1435 * bindings/objc/DOMHTMLDListElement.mm: Added.
1436 * bindings/objc/DOMHTMLDListElementInternal.h: Added.
1437 * bindings/objc/DOMHTMLDirectoryElement.h: Added.
1438 * bindings/objc/DOMHTMLDirectoryElement.mm: Added.
1439 * bindings/objc/DOMHTMLDirectoryElementInternal.h: Added.
1440 * bindings/objc/DOMHTMLDivElement.h: Added.
1441 * bindings/objc/DOMHTMLDivElement.mm: Added.
1442 * bindings/objc/DOMHTMLDivElementInternal.h: Added.
1443 * bindings/objc/DOMHTMLDocument.h: Added.
1444 * bindings/objc/DOMHTMLDocument.mm: Added.
1445 * bindings/objc/DOMHTMLDocumentInternal.h: Added.
1446 * bindings/objc/DOMHTMLElement.h: Added.
1447 * bindings/objc/DOMHTMLElement.mm: Added.
1448 * bindings/objc/DOMHTMLElementInternal.h: Added.
1449 * bindings/objc/DOMHTMLEmbedElement.h: Added.
1450 * bindings/objc/DOMHTMLEmbedElement.mm: Added.
1451 * bindings/objc/DOMHTMLEmbedElementInternal.h: Added.
1452 * bindings/objc/DOMHTMLFieldSetElement.h: Added.
1453 * bindings/objc/DOMHTMLFieldSetElement.mm: Added.
1454 * bindings/objc/DOMHTMLFieldSetElementInternal.h: Added.
1455 * bindings/objc/DOMHTMLFontElement.h: Added.
1456 * bindings/objc/DOMHTMLFontElement.mm: Added.
1457 * bindings/objc/DOMHTMLFontElementInternal.h: Added.
1458 * bindings/objc/DOMHTMLFormElement.h: Added.
1459 * bindings/objc/DOMHTMLFormElement.mm: Added.
1460 * bindings/objc/DOMHTMLFormElementInternal.h: Added.
1461 * bindings/objc/DOMHTMLFrameElement.h: Added.
1462 * bindings/objc/DOMHTMLFrameElement.mm: Added.
1463 * bindings/objc/DOMHTMLFrameElementInternal.h: Added.
1464 * bindings/objc/DOMHTMLFrameSetElement.h: Added.
1465 * bindings/objc/DOMHTMLFrameSetElement.mm: Added.
1466 * bindings/objc/DOMHTMLFrameSetElementInternal.h: Added.
1467 * bindings/objc/DOMHTMLHRElement.h: Added.
1468 * bindings/objc/DOMHTMLHRElement.mm: Added.
1469 * bindings/objc/DOMHTMLHRElementInternal.h: Added.
1470 * bindings/objc/DOMHTMLHeadElement.h: Added.
1471 * bindings/objc/DOMHTMLHeadElement.mm: Added.
1472 * bindings/objc/DOMHTMLHeadElementInternal.h: Added.
1473 * bindings/objc/DOMHTMLHeadingElement.h: Added.
1474 * bindings/objc/DOMHTMLHeadingElement.mm: Added.
1475 * bindings/objc/DOMHTMLHeadingElementInternal.h: Added.
1476 * bindings/objc/DOMHTMLHtmlElement.h: Added.
1477 * bindings/objc/DOMHTMLHtmlElement.mm: Added.
1478 * bindings/objc/DOMHTMLHtmlElementInternal.h: Added.
1479 * bindings/objc/DOMHTMLIFrameElement.h: Added.
1480 * bindings/objc/DOMHTMLIFrameElement.mm: Added.
1481 * bindings/objc/DOMHTMLIFrameElementInternal.h: Added.
1482 * bindings/objc/DOMHTMLImageElement.h: Added.
1483 * bindings/objc/DOMHTMLImageElement.mm: Added.
1484 * bindings/objc/DOMHTMLImageElementInternal.h: Added.
1485 * bindings/objc/DOMHTMLInputElement.h: Added.
1486 * bindings/objc/DOMHTMLInputElement.mm: Added.
1487 * bindings/objc/DOMHTMLInputElementInternal.h: Added.
1488 * bindings/objc/DOMHTMLInputElementPrivate.h: Added.
1489 * bindings/objc/DOMHTMLLIElement.h: Added.
1490 * bindings/objc/DOMHTMLLIElement.mm: Added.
1491 * bindings/objc/DOMHTMLLIElementInternal.h: Added.
1492 * bindings/objc/DOMHTMLLabelElement.h: Added.
1493 * bindings/objc/DOMHTMLLabelElement.mm: Added.
1494 * bindings/objc/DOMHTMLLabelElementInternal.h: Added.
1495 * bindings/objc/DOMHTMLLegendElement.h: Added.
1496 * bindings/objc/DOMHTMLLegendElement.mm: Added.
1497 * bindings/objc/DOMHTMLLegendElementInternal.h: Added.
1498 * bindings/objc/DOMHTMLLinkElement.h: Added.
1499 * bindings/objc/DOMHTMLLinkElement.mm: Added.
1500 * bindings/objc/DOMHTMLLinkElementInternal.h: Added.
1501 * bindings/objc/DOMHTMLMapElement.h: Added.
1502 * bindings/objc/DOMHTMLMapElement.mm: Added.
1503 * bindings/objc/DOMHTMLMapElementInternal.h: Added.
1504 * bindings/objc/DOMHTMLMarqueeElement.h: Added.
1505 * bindings/objc/DOMHTMLMarqueeElement.mm: Added.
1506 * bindings/objc/DOMHTMLMarqueeElementInternal.h: Added.
1507 * bindings/objc/DOMHTMLMediaElement.h: Added.
1508 * bindings/objc/DOMHTMLMediaElement.mm: Added.
1509 * bindings/objc/DOMHTMLMediaElementInternal.h: Added.
1510 * bindings/objc/DOMHTMLMenuElement.h: Added.
1511 * bindings/objc/DOMHTMLMenuElement.mm: Added.
1512 * bindings/objc/DOMHTMLMenuElementInternal.h: Added.
1513 * bindings/objc/DOMHTMLMetaElement.h: Added.
1514 * bindings/objc/DOMHTMLMetaElement.mm: Added.
1515 * bindings/objc/DOMHTMLMetaElementInternal.h: Added.
1516 * bindings/objc/DOMHTMLModElement.h: Added.
1517 * bindings/objc/DOMHTMLModElement.mm: Added.
1518 * bindings/objc/DOMHTMLModElementInternal.h: Added.
1519 * bindings/objc/DOMHTMLOListElement.h: Added.
1520 * bindings/objc/DOMHTMLOListElement.mm: Added.
1521 * bindings/objc/DOMHTMLOListElementInternal.h: Added.
1522 * bindings/objc/DOMHTMLObjectElement.h: Added.
1523 * bindings/objc/DOMHTMLObjectElement.mm: Added.
1524 * bindings/objc/DOMHTMLObjectElementInternal.h: Added.
1525 * bindings/objc/DOMHTMLObjectElementPrivate.h: Added.
1526 * bindings/objc/DOMHTMLOptGroupElement.h: Added.
1527 * bindings/objc/DOMHTMLOptGroupElement.mm: Added.
1528 * bindings/objc/DOMHTMLOptGroupElementInternal.h: Added.
1529 * bindings/objc/DOMHTMLOptionElement.h: Added.
1530 * bindings/objc/DOMHTMLOptionElement.mm: Added.
1531 * bindings/objc/DOMHTMLOptionElementInternal.h: Added.
1532 * bindings/objc/DOMHTMLOptionsCollection.h: Added.
1533 * bindings/objc/DOMHTMLOptionsCollection.mm: Added.
1534 * bindings/objc/DOMHTMLOptionsCollectionInternal.h: Added.
1535 * bindings/objc/DOMHTMLParagraphElement.h: Added.
1536 * bindings/objc/DOMHTMLParagraphElement.mm: Added.
1537 * bindings/objc/DOMHTMLParagraphElementInternal.h: Added.
1538 * bindings/objc/DOMHTMLParamElement.h: Added.
1539 * bindings/objc/DOMHTMLParamElement.mm: Added.
1540 * bindings/objc/DOMHTMLParamElementInternal.h: Added.
1541 * bindings/objc/DOMHTMLPreElement.h: Added.
1542 * bindings/objc/DOMHTMLPreElement.mm: Added.
1543 * bindings/objc/DOMHTMLPreElementInternal.h: Added.
1544 * bindings/objc/DOMHTMLQuoteElement.h: Added.
1545 * bindings/objc/DOMHTMLQuoteElement.mm: Added.
1546 * bindings/objc/DOMHTMLQuoteElementInternal.h: Added.
1547 * bindings/objc/DOMHTMLScriptElement.h: Added.
1548 * bindings/objc/DOMHTMLScriptElement.mm: Added.
1549 * bindings/objc/DOMHTMLScriptElementInternal.h: Added.
1550 * bindings/objc/DOMHTMLSelectElement.h: Added.
1551 * bindings/objc/DOMHTMLSelectElement.mm: Added.
1552 * bindings/objc/DOMHTMLSelectElementInternal.h: Added.
1553 * bindings/objc/DOMHTMLStyleElement.h: Added.
1554 * bindings/objc/DOMHTMLStyleElement.mm: Added.
1555 * bindings/objc/DOMHTMLStyleElementInternal.h: Added.
1556 * bindings/objc/DOMHTMLTableCaptionElement.h: Added.
1557 * bindings/objc/DOMHTMLTableCaptionElement.mm: Added.
1558 * bindings/objc/DOMHTMLTableCaptionElementInternal.h: Added.
1559 * bindings/objc/DOMHTMLTableCellElement.h: Added.
1560 * bindings/objc/DOMHTMLTableCellElement.mm: Added.
1561 * bindings/objc/DOMHTMLTableCellElementInternal.h: Added.
1562 * bindings/objc/DOMHTMLTableColElement.h: Added.
1563 * bindings/objc/DOMHTMLTableColElement.mm: Added.
1564 * bindings/objc/DOMHTMLTableColElementInternal.h: Added.
1565 * bindings/objc/DOMHTMLTableElement.h: Added.
1566 * bindings/objc/DOMHTMLTableElement.mm: Added.
1567 * bindings/objc/DOMHTMLTableElementInternal.h: Added.
1568 * bindings/objc/DOMHTMLTableRowElement.h: Added.
1569 * bindings/objc/DOMHTMLTableRowElement.mm: Added.
1570 * bindings/objc/DOMHTMLTableRowElementInternal.h: Added.
1571 * bindings/objc/DOMHTMLTableSectionElement.h: Added.
1572 * bindings/objc/DOMHTMLTableSectionElement.mm: Added.
1573 * bindings/objc/DOMHTMLTableSectionElementInternal.h: Added.
1574 * bindings/objc/DOMHTMLVideoElement.h: Added.
1575 * bindings/objc/DOMHTMLVideoElement.mm: Added.
1576 * bindings/objc/DOMHTMLVideoElementInternal.h: Added.
1578 2016-08-01 Antti Koivisto <antti@apple.com>
1580 REGRESSION(r198943): drop-down menu navigation on fiddlevideo.com doesn't appear on iOS, works on OS X
1581 https://bugs.webkit.org/show_bug.cgi?id=160406
1582 rdar://problem/26310261
1584 Reviewed by Simon Fraser.
1586 On iOS we generate synthetic mouse events from taps. Click event is generated on tap only if the move event
1587 doesn't produce visible changes to the document. This is important to make certain types of drop down menus
1590 The information on mutations is passed via WKContentObservation side channel which is updated from varous parts
1591 of the code. Newly visible elements are detected CheckForVisibilityChangeOnRecalcStyle during style resolution.
1592 This got broken by the style refactoring because it assumes that renderer is mutated along with style computation.
1593 However mutation is now a separate step performed by RenderTreeUpdater.
1595 Fix by moving CheckForVisibilityChange to RenderTreeUpdater.
1597 Test: fast/content-observation/click-event-suppression-on-content-change.html
1599 * style/RenderTreeUpdater.cpp:
1600 (WebCore::RenderTreeUpdater::Parent::Parent):
1601 (WebCore::RenderTreeUpdater::updateElementRenderer):
1602 (WebCore::RenderTreeUpdater::tearDownRenderer):
1603 (WebCore::elementImplicitVisibility):
1604 (WebCore::CheckForVisibilityChange::CheckForVisibilityChange):
1605 (WebCore::CheckForVisibilityChange::~CheckForVisibilityChange):
1606 * style/StyleTreeResolver.cpp:
1607 (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
1608 (WebCore::Style::TreeResolver::pushParent):
1609 (WebCore::Style::TreeResolver::resolveComposedTree):
1610 (WebCore::Style::elementImplicitVisibility): Deleted.
1611 (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::CheckForVisibilityChangeOnRecalcStyle): Deleted.
1612 (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::~CheckForVisibilityChangeOnRecalcStyle): Deleted.
1614 2016-08-01 Eric Carlson <eric.carlson@apple.com>
1616 [iOS] A video element that does not pause after exiting from fullscreen should be allowed to continue playing inline
1617 https://bugs.webkit.org/show_bug.cgi?id=160416
1618 <rdar://problem/27409854>
1620 Reviewed by Alex Christensen.
1622 * html/HTMLMediaElement.cpp:
1623 (WebCore::HTMLMediaElement::exitFullscreen): If playback normally requires fullscreen but the
1624 element was not paused when exiting from fullscreen, set the 'playsinline' attribute so we won't
1625 force fullscreen if playback is paused and resumes, and set the 'controls' attribute so the
1626 user can control playback.
1628 2016-08-01 Anders Carlsson <andersca@apple.com>
1632 * WebCore.xcodeproj/project.pbxproj:
1634 2016-08-01 Eric Carlson <eric.carlson@apple.com>
1636 [Mac][iOS] Adopt MediaRemote "seek to playback position"
1637 https://bugs.webkit.org/show_bug.cgi?id=160405
1638 <rdar://problem/27547583>
1640 Reviewed by Dean Jackson.
1642 Test: media/remote-control-command-seek.html
1644 * Modules/webaudio/AudioContext.h: Update for didReceiveRemoteControlCommand argument change.
1646 * html/HTMLMediaElement.cpp:
1647 (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand): Support SeekToPlaybackPositionCommand.
1648 Drive by fix, support Stop command.
1649 (WebCore::HTMLMediaElement::supportsSeeking): New.
1650 * html/HTMLMediaElement.h:
1652 * platform/RemoteCommandListener.h:
1653 (WebCore::RemoteCommandListenerClient::didReceiveRemoteControlCommand): Add command argument.
1654 (WebCore::RemoteCommandListenerClient::supportsSeeking): New.
1655 (WebCore::RemoteCommandListener::updateSupportedCommands): Ditto.
1656 (WebCore::RemoteCommandListener::client): Ditto.
1658 * platform/audio/PlatformMediaSession.cpp:
1659 (WebCore::PlatformMediaSession::didReceiveRemoteControlCommand): Add command argument.
1660 (WebCore::PlatformMediaSession::supportsSeeking): New, pass through to client.
1661 * platform/audio/PlatformMediaSession.h:
1663 * platform/audio/PlatformMediaSessionManager.cpp:
1664 (WebCore::PlatformMediaSessionManager::setCurrentSession): Tell remote command listener to
1665 update supported commands.
1666 (WebCore::PlatformMediaSessionManager::currentSession): Make const.
1667 (WebCore::PlatformMediaSessionManager::didReceiveRemoteControlCommand): Add command argument.
1668 (WebCore::PlatformMediaSessionManager::supportsSeeking): New, pass through to session.
1669 * platform/audio/PlatformMediaSessionManager.h:
1671 * platform/ios/RemoteCommandListenerIOS.h:
1672 (WebCore::RemoteCommandListenerIOS::createWeakPtr):
1673 * platform/ios/RemoteCommandListenerIOS.mm:
1674 (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS): Support changePlaybackPositionCommand.
1675 (WebCore::RemoteCommandListenerIOS::~RemoteCommandListenerIOS): Remove seekToTime target.
1676 (WebCore::RemoteCommandListenerIOS::updateSupportedCommands): Update changePlaybackPositionCommand.
1678 * platform/mac/MediaRemoteSoftLink.cpp:
1679 * platform/mac/MediaRemoteSoftLink.h:
1681 * platform/mac/RemoteCommandListenerMac.h:
1682 * platform/mac/RemoteCommandListenerMac.mm:
1683 (WebCore::RemoteCommandListenerMac::updateSupportedCommands): New, split out of constructor.
1684 (WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac): Split setup logic out into
1685 updateSupportedCommands. Support MRMediaRemoteCommandSeekToPlaybackPosition. Don't assert when
1686 receiving an unsupported command, it happens. Return error when a command isn't supported or
1689 * testing/Internals.cpp:
1690 (WebCore::Internals::postRemoteControlCommand): Add command argument parameter. Support
1691 seektoplaybackposition.
1692 * testing/Internals.h:
1693 * testing/Internals.idl:
1695 2016-08-01 Anders Carlsson <andersca@apple.com>
1697 Freeze DOMHTMLTitleElement and DOMHTMLUListElement bindings
1698 https://bugs.webkit.org/show_bug.cgi?id=160415
1700 Reviewed by Sam Weinig.
1702 * DerivedSources.make:
1703 * WebCore.xcodeproj/project.pbxproj:
1704 * bindings/objc/DOMHTMLTitleElement.h: Added.
1705 * bindings/objc/DOMHTMLTitleElement.mm: Added.
1706 * bindings/objc/DOMHTMLTitleElementInternal.h: Added.
1707 * bindings/objc/DOMHTMLUListElement.h: Added.
1708 * bindings/objc/DOMHTMLUListElement.mm: Added.
1709 * bindings/objc/DOMHTMLUListElementInternal.h: Added.
1711 2016-08-01 Antti Koivisto <antti@apple.com>
1713 REGRESSION (r196383): Drop down CSS menus not working on cnet.com, apmex.com
1714 https://bugs.webkit.org/show_bug.cgi?id=160390
1716 Reviewed by Simon Fraser.
1718 The case here is that we have a rule like
1720 .enableHover:hover .child { ... }
1722 and the "enableHover" class is added dynamically. The class change invalidation optimization code would figure out
1723 that nothing needs to be invalidated as the class change doesn't make the rule match (since :hover doesn't match).
1725 However for event driven hover to actually work the hover element needs to have its childrenAffectedByHover bit set.
1726 This bits is set when the selector match is attempted, whether it actually matches or not. Since we optimized away
1727 the style invalidation we never set the bit either.
1729 Fix by treating :hover as always matching (==ignored) when collecting rules for invalidation optimization purposes.
1730 Dynamic pseudo elements are already treated this way for similar reasons.
1732 Test: fast/selectors/hover-invalidation-descendant-dynamic.html
1734 * css/SelectorChecker.cpp:
1735 (WebCore::SelectorChecker::checkOne):
1737 Match always in CollectingRulesIgnoringVirtualPseudoElements mode (now slightly misnamed).
1739 This mode is used for optimization purposes in StyleInvalidationAnalysis (which we care about here) and
1740 StyleSharingResolver. The change is fine for both.
1742 * cssjit/SelectorCompiler.cpp:
1743 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
1745 Same change for the slow path selector checker.
1747 2016-08-01 Darin Adler <darin@apple.com>
1749 [Cocoa] Freeze Objective-C bindings and stop autogenerating them: Step 1 - Convert a single file
1750 https://bugs.webkit.org/show_bug.cgi?id=160386
1752 Reviewed by Anders Carlsson.
1754 No behavior change, no tests changed. I tested this locally by putting "#error" into the
1755 files in the DerivedSources directory to make sure the build doesn't use those files even
1756 if there are stale copies still sitting there.
1758 Moving the bindings from WebCore to the legacy part of WebKit is something we also want to
1759 do, but that is quite challenging to do one file at a time, so we will do that later.
1761 For this first file, I did some hand edits to make the code in a the file a little less
1762 peculiar. It's still awkward to have all those JSMainThreadNullState in there; should double
1763 check that we really need them.
1765 An important follow up step will be to cut down on the bindings. We have lots of bindings
1766 that are only in the Private.h header, and it would be good to find a way to cut down on those.
1767 And on iOS we would like eliminate these bindings entirely since they are not API there.
1769 * DerivedSources.make: Moved HTMLTextAreaElement from a list we use for both JavaScript and
1770 Objective-C DOM bindings to a list we use only for JavaScript bindings.
1771 * WebCore.xcodeproj/project.pbxproj: Removed references to generated DOMHTMLTextAreaElement
1772 files and instead reference the checked-in copies.
1773 * bindings/objc/DOMHTMLTextAreaElement.h: Added.
1774 * bindings/objc/DOMHTMLTextAreaElement.mm: Added.
1775 * bindings/objc/DOMHTMLTextAreaElementInternal.h: Added.
1776 * bindings/objc/DOMHTMLTextAreaElementPrivate.h: Added.
1778 2016-08-01 Frederic Wang <fwang@igalia.com>
1780 Introduce a RenderMathMLFencedOperator class
1781 https://bugs.webkit.org/show_bug.cgi?id=160245
1783 Reviewed by Darin Adler.
1785 We introduce a class to handle all the code specific to anonymous mfenced operators. In
1786 particular many members of the RenderMathMLOperator class are going to be removed while
1787 fixing bug 156537 but they may still need to stored and exposed in some way by mfenced
1790 No new tests, behavior is unchanged.
1792 * CMakeLists.txt: Add RenderMathMLFencedOperator.
1793 * WebCore.xcodeproj/project.pbxproj: Ditto.
1794 * rendering/RenderObject.h:
1795 (WebCore::RenderObject::isRenderMathMLFencedOperator): Function to allow casting to
1796 RenderMathMLFencedOperator.
1797 * rendering/mathml/RenderMathMLFenced.cpp: Use RenderMathMLFencedOperator instead of
1798 RenderMathMLOperator and use the new name updateOperatorContent.
1799 (WebCore::RenderMathMLFenced::updateFromElement):
1800 (WebCore::RenderMathMLFenced::createMathMLOperator):
1801 (WebCore::RenderMathMLFenced::makeFences):
1802 (WebCore::RenderMathMLFenced::addChild):
1803 * rendering/mathml/RenderMathMLFenced.h: Use RenderMathMLFencedOperator instead of
1804 RenderMathMLOperator.
1805 * rendering/mathml/RenderMathMLFencedOperator.cpp: New class derived from RenderMathMLOperator
1806 (WebCore::RenderMathMLFencedOperator::RenderMathMLFencedOperator): Init form and operator
1807 flags with the specified parameters and init the text content.
1808 (WebCore::RenderMathMLFencedOperator::updateOperatorContent): We move the
1809 RenderMathMLOperator::updateTokenContent function used by anonymous operators here. It is
1810 renamed to avoid build errors due to conflicts with the other
1811 RenderMathMLOperator::updateTokenContent function.
1812 * rendering/mathml/RenderMathMLFencedOperator.h: New class for anonymous mfenced operators
1813 with getter and setter for the m_textContent. Also override RenderMathMLFencedOperator to
1814 allow casting to RenderMathMLFencedOperator.
1815 * rendering/mathml/RenderMathMLOperator.cpp:
1816 (WebCore::RenderMathMLOperator::RenderMathMLOperator): Simplify the constructors. Some
1817 initializations is moved in RenderMathMLOperator.h while other code is moved to
1818 RenderMathMLFencedOperator.
1819 (WebCore::RenderMathMLOperator::textContent): No need to handle the anonymous case here since
1820 it is handled in RenderMathMLFencedOperator.
1821 (WebCore::RenderMathMLOperator::updateTokenContent): We delete the version used for anonymous
1822 operators and move it into RenderMathMLFencedOperator.
1823 * rendering/mathml/RenderMathMLOperator.h: Make the class and some members overridable and
1824 exposed to the derived RenderMathMLFencedOperator class. We also move initialization of some
1827 2016-08-01 Youenn Fablet <youennf@gmail.com>
1829 Reduce the number of ResourceRequest copies in DocumentThreadableLoader
1830 https://bugs.webkit.org/show_bug.cgi?id=160338
1832 Reviewed by Darin Adler.
1834 No observable change of behavior.
1836 Updating one of CachedResourceReques constructor to take a ResourceRequest&&.
1837 This allows reducing a ResourceRequest copy in DocumentThreadableLoader.
1838 Updating DocumentLoader and MediaResourceLoader accordingly (future optimization steps may look at making these
1839 two loaders more efficient with regards to Resource Request).
1841 Updating ThreadableLoader to take a ResourceRequest&&.
1842 This allows reducing the number of copies in DocumentThreadableLoader.
1843 Updating clients of ThreadableLoader accordingly.
1845 * Modules/fetch/FetchLoader.cpp:
1846 (WebCore::FetchLoader::start):
1848 (WebCore::Document::didLoadResourceSynchronously):
1850 * dom/ScriptExecutionContext.cpp:
1851 (WebCore::ScriptExecutionContext::didLoadResourceSynchronously):
1852 * dom/ScriptExecutionContext.h:
1853 * fileapi/FileReaderLoader.cpp:
1854 (WebCore::FileReaderLoader::start):
1855 * inspector/InspectorNetworkAgent.cpp:
1856 (WebCore::InspectorNetworkAgent::loadResource):
1857 * loader/DocumentLoader.cpp:
1858 (WebCore::DocumentLoader::startLoadingMainResource):
1859 * loader/DocumentThreadableLoader.cpp:
1860 (WebCore::DocumentThreadableLoader::loadResourceSynchronously):
1861 (WebCore::DocumentThreadableLoader::create):
1862 (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
1863 (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
1864 (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
1865 (WebCore::DocumentThreadableLoader::redirectReceived):
1866 (WebCore::DocumentThreadableLoader::preflightSuccess):
1867 (WebCore::DocumentThreadableLoader::loadRequest):
1868 * loader/DocumentThreadableLoader.h:
1869 * loader/MediaResourceLoader.cpp:
1870 (WebCore::MediaResourceLoader::requestResource):
1871 * loader/ThreadableLoader.cpp:
1872 (WebCore::ThreadableLoader::create):
1873 (WebCore::ThreadableLoader::loadResourceSynchronously):
1874 * loader/ThreadableLoader.h:
1875 * loader/WorkerThreadableLoader.cpp:
1876 (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
1877 (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
1878 (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
1879 * loader/WorkerThreadableLoader.h:
1880 (WebCore::WorkerThreadableLoader::create):
1881 * loader/cache/CachedResourceRequest.cpp:
1882 (WebCore::CachedResourceRequest::CachedResourceRequest):
1883 * loader/cache/CachedResourceRequest.h:
1884 * page/EventSource.cpp:
1885 (WebCore::EventSource::connect):
1886 * workers/WorkerScriptLoader.cpp:
1887 (WebCore::WorkerScriptLoader::loadSynchronously):
1888 (WebCore::WorkerScriptLoader::loadAsynchronously):
1889 * xml/XMLHttpRequest.cpp:
1890 (WebCore::XMLHttpRequest::createRequest):
1892 2016-07-31 Youenn Fablet <youenn@apple.com>
1894 Fetch Response built-ins should use @makeThisTypeError
1895 https://bugs.webkit.org/show_bug.cgi?id=160290
1897 Reviewed by Darin Adler.
1899 Covered by updated test.
1901 Fixed type error checks.
1902 Making use of @makeThisTypeError to have the correct error message.
1903 Updating arrayBuffer, blob, json and text to return rejected promises in lieu of throwing
1904 in case the 'this' value is not q Response object.
1906 * Modules/fetch/FetchResponse.js:
1907 (clone): Updated instanceof check and making use of @makeThisTypeError.
1908 (arrayBuffer): Ditto.
1914 2016-07-31 Adrian Perez de Castro <aperez@igalia.com>
1916 [GTK] Implement missing WebCore::moveFile() using GLib functions
1917 https://bugs.webkit.org/show_bug.cgi?id=160363
1919 Reviewed by Carlos Garcia Campos.
1921 * platform/glib/FileSystemGlib.cpp:
1922 (WebCore::moveFile): Function added.
1924 2016-07-31 Chris Dumez <cdumez@apple.com>
1926 Drop [StrictTypeChecking] in cases where it is a no-op
1927 https://bugs.webkit.org/show_bug.cgi?id=160387
1929 Reviewed by Darin Adler.
1931 Drop [StrictTypeChecking] in cases where it is a no-op. After r203949 & r203950,
1932 [StrictTypeChecking] only has an impact when used on operation parameters of
1933 string types and is currently used as a workaround for bugs in our overload
1934 resolution algorithm.
1936 * Modules/mediastream/RTCPeerConnection.idl:
1937 * Modules/mediastream/RTCRtpSender.idl:
1938 * bindings/scripts/test/TestObj.idl:
1939 * bindings/scripts/test/TestTypedefs.idl:
1940 * html/canvas/ANGLEInstancedArrays.idl:
1941 * html/canvas/OESVertexArrayObject.idl:
1942 * html/canvas/WebGL2RenderingContext.idl:
1943 * html/canvas/WebGLDebugShaders.idl:
1944 * html/canvas/WebGLLoseContext.idl:
1945 * html/canvas/WebGLRenderingContextBase.idl:
1948 * svg/SVGLength.idl:
1949 * svg/SVGLengthList.idl:
1950 * svg/SVGMatrix.idl:
1951 * svg/SVGNumberList.idl:
1953 * svg/SVGPathSegList.idl:
1955 * svg/SVGPointList.idl:
1956 * svg/SVGStringList.idl:
1957 * svg/SVGTransform.idl:
1958 * svg/SVGTransformList.idl:
1960 2016-07-31 Nan Wang <n_wang@apple.com>
1962 AX: Add a check for touch event listener on iOS accessibility object
1963 https://bugs.webkit.org/show_bug.cgi?id=160388
1965 Reviewed by Chris Fleizach.
1967 dispatchTouchEvent() is not working correctly within AXPress() sometimes. Need to
1968 investigate it more in the future. Now, adding a check for the touch event listener
1969 on the object's node so that iOS can handle dispatching the touch event instead.
1971 Test: accessibility/ios-simulator/has-touch-event-listener.html
1973 * accessibility/AccessibilityObject.h:
1974 * accessibility/ios/AccessibilityObjectIOS.mm:
1975 (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
1976 (WebCore::AccessibilityObject::hasTouchEventListener):
1977 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1978 (appendStringToResult):
1979 (-[WebAccessibilityObjectWrapper _accessibilityHasTouchEventListener]):
1980 (-[WebAccessibilityObjectWrapper _accessibilityValueIsAutofilled]):
1982 2016-07-30 Chris Dumez <cdumez@apple.com>
1984 Unreviewed, rebaseline bindings tests.
1986 * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1987 (webkit_dom_test_obj_set_property): Deleted.
1988 (webkit_dom_test_obj_get_property): Deleted.
1989 (webkit_dom_test_obj_class_init): Deleted.
1990 * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1991 * bindings/scripts/test/JS/JSTestObj.cpp:
1992 (WebCore::jsTestObjStrictTypeCheckingAttribute): Deleted.
1993 (WebCore::jsTestObjStrictFloat): Deleted.
1994 (WebCore::setJSTestObjStrictTypeCheckingAttribute): Deleted.
1995 (WebCore::setJSTestObjStrictFloat): Deleted.
1996 * bindings/scripts/test/ObjC/DOMTestObj.h:
1997 * bindings/scripts/test/ObjC/DOMTestObj.mm:
1998 (-[DOMTestObj strictTypeCheckingAttribute]): Deleted.
1999 (-[DOMTestObj setStrictTypeCheckingAttribute:]): Deleted.
2000 (-[DOMTestObj strictFloat]): Deleted.
2001 (-[DOMTestObj setStrictFloat:]): Deleted.
2003 2016-07-30 Chris Dumez <cdumez@apple.com>
2005 Enable strict type checking for Window dictionary members
2006 https://bugs.webkit.org/show_bug.cgi?id=160356
2008 Reviewed by Darin Adler.
2010 Enable strict type checking for Window dictionary members. Technically,
2011 we should do strict type checking of all wrapper types but this patch
2012 focuses on Window because it is common to pass a Window dictionary
2013 member to Event constructors.
2015 By strict type checking, I mean that we should throw a TypeError is
2016 the value is not null/undefined and does not implement the Window
2018 - http://heycam.github.io/webidl/#es-interface
2020 Firefox and Chrome comply with the specification already.
2022 No new tests, updated / rebaselined existing tests.
2024 * bindings/js/JSDictionary.cpp:
2025 (WebCore::JSDictionary::convertValue):
2027 2016-07-30 Chris Dumez <cdumez@apple.com>
2029 [WebIDL] Enable strict type checking for nullable attribute setters of wrapper types
2030 https://bugs.webkit.org/show_bug.cgi?id=160375
2032 Reviewed by Darin Adler.
2034 Enable strict type checking for nullable attribute setters of wrapper types:
2035 - http://heycam.github.io/webidl/#es-nullable-type
2036 - http://heycam.github.io/webidl/#es-interface
2038 For such attributes, if the JS tries to assign a value that is not null /
2039 undefined and does not have the expected wrapper type, then we now throw a
2040 TypeError instead of silently converting the value to null.
2042 This behavior is consistent with Chrome and Firefox. It also helps identify
2043 bugs in JavaScript code.
2045 No new tests, updated existing tests.
2047 * Modules/webaudio/AudioBufferSourceNode.idl:
2048 * bindings/scripts/CodeGeneratorJS.pm:
2049 (GenerateImplementation):
2050 * bindings/scripts/test/JS/JSTestObj.cpp:
2051 (WebCore::setJSTestObjTestNullableObjAttr):
2052 (WebCore::setJSTestObjMutablePoint):
2053 (WebCore::setJSTestObjImmutablePoint):
2054 * bindings/scripts/test/TestObj.idl:
2056 * html/HTMLTableElement.idl:
2058 * svg/SVGAnimatedBoolean.idl:
2059 * svg/SVGAnimatedEnumeration.idl:
2060 * svg/SVGAnimatedInteger.idl:
2061 * svg/SVGAnimatedNumber.idl:
2062 * svg/SVGLength.idl:
2063 * svg/SVGMatrix.idl:
2064 * svg/SVGNumber.idl:
2065 * svg/SVGPathSegArcAbs.idl:
2066 * svg/SVGPathSegArcRel.idl:
2067 * svg/SVGPathSegCurvetoCubicAbs.idl:
2068 * svg/SVGPathSegCurvetoCubicRel.idl:
2069 * svg/SVGPathSegCurvetoCubicSmoothAbs.idl:
2070 * svg/SVGPathSegCurvetoCubicSmoothRel.idl:
2071 * svg/SVGPathSegCurvetoQuadraticAbs.idl:
2072 * svg/SVGPathSegCurvetoQuadraticRel.idl:
2073 * svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl:
2074 * svg/SVGPathSegCurvetoQuadraticSmoothRel.idl:
2075 * svg/SVGPathSegLinetoAbs.idl:
2076 * svg/SVGPathSegLinetoHorizontalAbs.idl:
2077 * svg/SVGPathSegLinetoHorizontalRel.idl:
2078 * svg/SVGPathSegLinetoRel.idl:
2079 * svg/SVGPathSegLinetoVerticalAbs.idl:
2080 * svg/SVGPathSegLinetoVerticalRel.idl:
2081 * svg/SVGPathSegMovetoAbs.idl:
2082 * svg/SVGPathSegMovetoRel.idl:
2084 * svg/SVGPreserveAspectRatio.idl:
2087 2016-07-30 Youenn Fablet <youenn@apple.com>
2089 Synchronous preflight should check for successful responses
2090 https://bugs.webkit.org/show_bug.cgi?id=159350
2092 Reviewed by Darin Adler.
2094 Test: http/tests/xmlhttprequest/access-control-preflight-not-successful.html
2096 * loader/CrossOriginPreflightChecker.cpp:
2097 (WebCore::CrossOriginPreflightChecker::doPreflight): Adding successful response check for synchronous
2100 2016-07-30 Chris Dumez <cdumez@apple.com>
2102 [WebIDL] Enable strict type checking for operations' nullable parameters of wrapper types
2103 https://bugs.webkit.org/show_bug.cgi?id=160374
2105 Reviewed by Youenn Fablet.
2107 Enable strict type checking for operations' nullable parameters of
2108 wrapper types to comply with the Web IDL specification:
2109 - http://heycam.github.io/webidl/#es-nullable-type
2110 - http://heycam.github.io/webidl/#es-interface
2112 For such parameters, if the JS passes a value that is not null /
2113 undefined and does not have the expected wrapper type, then we now
2114 throw a TypeError instead of silently converting the value to null.
2116 This behavior is consistent with Chrome and Firefox. It also helps
2117 identify bugs in JavaScript code.
2119 No new tests, rebaselined existing tests.
2121 * bindings/scripts/CodeGeneratorJS.pm:
2122 (GenerateParametersCheck):
2123 * bindings/scripts/test/JS/JSTestObj.cpp:
2124 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapper):
2125 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNull):
2126 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolver):
2127 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
2128 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
2129 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
2130 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
2131 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
2132 (WebCore::jsTestObjPrototypeFunctionConvert2):
2133 (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
2134 (WebCore::jsTestObjPrototypeFunctionConditionalMethod3): Deleted.
2135 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5): Deleted.
2136 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): Deleted.
2137 (WebCore::jsTestObjPrototypeFunctionOrange): Deleted.
2139 2016-07-29 Chris Dumez <cdumez@apple.com>
2141 Window's named properties should be exposed on a WindowProperties object in its prototype
2142 https://bugs.webkit.org/show_bug.cgi?id=160354
2144 Reviewed by Gavin Barraclough.
2146 Window's named properties should be exposed on a WindowProperties object
2148 - http://heycam.github.io/webidl/#named-properties-object
2150 Firefox and Chrome both comply with the specification. However, WebKit
2151 had no "WindowProperties" object in the Window prototype chain and the
2152 named properties are exposed on the Window object itself.
2154 No new tests, rebaselined existing tests.
2157 * WebCore.xcodeproj/project.pbxproj:
2158 * bindings/js/JSBindingsAllInOne.cpp:
2159 * bindings/js/JSDOMWindowCustom.cpp:
2160 (WebCore::JSDOMWindow::getOwnPropertySlot):
2161 (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
2162 (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess): Deleted.
2163 (WebCore::JSDOMWindow::put): Deleted.
2164 (WebCore::JSDOMWindow::putByIndex): Deleted.
2165 (WebCore::JSDOMWindow::getEnumerableLength): Deleted.
2166 * bindings/js/JSDOMWindowProperties.cpp: Added.
2167 (WebCore::jsDOMWindowPropertiesGetOwnPropertySlotNamedItemGetter):
2168 (WebCore::JSDOMWindowProperties::getOwnPropertySlot):
2169 (WebCore::JSDOMWindowProperties::getOwnPropertySlotByIndex):
2170 * bindings/js/JSDOMWindowProperties.h: Added.
2171 (WebCore::JSDOMWindowProperties::create):
2172 (WebCore::JSDOMWindowProperties::createStructure):
2173 (WebCore::JSDOMWindowProperties::JSDOMWindowProperties):
2174 * bindings/js/JSDOMWindowShell.cpp:
2175 (WebCore::JSDOMWindowShell::setWindow):
2177 2016-07-29 Daniel Bates <dabates@apple.com>
2179 Crash under HTMLMediaElement::{resolve, reject}PendingPlayPromises() when playback is interrupted
2180 https://bugs.webkit.org/show_bug.cgi?id=160366
2181 <rdar://problem/27317407>
2183 Reviewed by Eric Carlson.
2185 Fixes a crash/assertion failure in DeferredWrapper::{resolve, rejectWithValue}() caused by a Promise
2186 being settled twice. In particular, if a system interruption occurs when media.play() is invoked
2187 the returned Promise may ultimately be settled twice upon cessation of the interruption.
2189 A Promise can be settled (resolved) exactly once. When a system interruption occurs media
2190 playback is paused and resumes on cessation of the interruption. Currently we also immediately
2191 reject the Promise p retuned by media.play() if the interruption occurs during its invocation.
2192 So, when we resume playback on cessation of an interruption we try to resolve p again. But a
2193 Promise can only be resolved once and hence we violate the assertions that p has both a valid
2194 reference to a JSPromiseDeferred object and a reference to the global object of the page.
2196 Tests: media/non-existent-video-playback-interrupted.html
2197 media/video-playback-interrupted.html
2199 * html/HTMLMediaElement.cpp:
2200 (WebCore::HTMLMediaElement::play): Modified to reject the Promise and return immediately if
2201 playInternal() returns false.
2202 (WebCore::HTMLMediaElement::playInternal): Treat an interruption as success and return true
2203 so that HTMLMediaElement::play() adds the Promise to the end of the list of pending promises.
2204 We treat an interruption as a success because we will resume playback (assuming the media
2205 can be loaded and is well-formed) upon cessation of the interruption and therefore can either
2206 fulfill or reject the Promise object returned by media.play().
2208 2016-07-29 Daniel Bates <dabates@apple.com>
2210 [iOS] HTMLMediaElement::updateVolume() calls MediaPlayer::volume() on null media player
2211 https://bugs.webkit.org/show_bug.cgi?id=160353
2213 Reviewed by Eric Carlson.
2215 Using testing functions HTMLMediaElement::updateVolume() can be called on a <video> element
2216 without an associated video. We should support this usage on iOS just as we do for non-iOS
2219 The use of testing functions to call HTMLMediaElement::updateVolume() on a <video> element
2220 without an associated video is demonstrated by the test LayoutTests/media/video-muted-after-setting-page-muted-state.html.
2222 * html/HTMLMediaElement.cpp:
2223 (WebCore::HTMLMediaElement::updateVolume):
2225 2016-07-29 Wenson Hsieh <wenson_hsieh@apple.com>
2227 Media controls are not displayed for some autoplaying videos at certain browser dimensions
2228 https://bugs.webkit.org/show_bug.cgi?id=160360
2229 <rdar://problem/27179484>
2231 Reviewed by Myles C. Maxfield.
2233 Previously, if a video's aspect ratio fell outside of the range [0.5, 1.8], we would
2234 not consider it main content and would subsequently not show media controls for it.
2235 This meant that on many websites that scale video dimensions to match the mainframe,
2236 if the mainframe is too wide (e.g. full bounds on a widescreen display) we would not
2237 consider the video to be main content. To fix this, we only consider aspect ratio to
2238 be a requirement if the video does not already take up most of the space in the
2241 Covered by two new TestWebKitAPI unit tests.
2243 * html/MediaElementSession.cpp:
2244 (WebCore::isElementLargeRelativeToMainFrame):
2245 (WebCore::isElementLargeEnoughForMainContent):
2247 2016-07-29 Zalan Bujtas <zalan@apple.com>
2249 Do not set negative rate on AVSampleBufferRenderSynchronizer.
2250 https://bugs.webkit.org/show_bug.cgi?id=160326
2251 <rdar://problem/27355214>
2253 Reviewed by Eric Carlson.
2255 Test: http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control.html
2257 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2258 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble):
2260 2016-07-29 Myles C. Maxfield <mmaxfield@apple.com>
2262 Backspace key removes only the rainbow from the rainbow flag
2263 https://bugs.webkit.org/show_bug.cgi?id=160349
2264 <rdar://problem/27594995>
2266 Reviewed by Dean Jackson.
2268 In r203330 I added support for new emoji group candidates. I accidentally
2269 missed one of the new emoji code points.
2271 Test: editing/deleting/delete-emoji.html
2273 * platform/text/CharacterProperties.h:
2274 (WebCore::isEmojiGroupCandidate):
2276 2016-07-29 Nan Wang <n_wang@apple.com>
2278 AX: Media controls accessibility improvement
2279 https://bugs.webkit.org/show_bug.cgi?id=160223
2280 <rdar://problem/27558003>
2282 Reviewed by Eric Carlson.
2284 Changes in this patch:
2285 1. Added a change observer for volume slider so that it will handle accessibility
2286 increment/decrement functions correctly.
2287 2. Update the timer div's aria-label when time changes.
2288 3. Added a keydown handler for left/right arrow adjusting the timeline, so that the
2289 value increment/decrement in a reasonable way.
2290 4. Changed the mute button's role to checkbox since it only has on/off states.
2292 Test: media/media-controls-accessibility.html
2294 * Modules/mediacontrols/mediaControlsApple.js:
2295 (Controller.prototype.createControls):
2296 (Controller.prototype.updatePictureInPictureButton):
2297 (Controller.prototype.timelineStepFromVideoDuration):
2298 (Controller.prototype.incrementTimelineValue):
2299 (Controller.prototype.decrementTimelineValue):
2300 (Controller.prototype.showInlinePlaybackPlaceholderWhenSafe):
2301 (Controller.prototype.handleTimelineMouseUp):
2302 (Controller.prototype.handleTimelineKeyDown):
2303 (Controller.prototype.handleMuteButtonClicked):
2304 (Controller.prototype.handleMinButtonClicked):
2305 (Controller.prototype.handleMaxButtonClicked):
2306 (Controller.prototype.updateVideoVolume):
2307 (Controller.prototype.handleVolumeSliderInput):
2308 (Controller.prototype.handleVolumeSliderChange):
2309 (Controller.prototype.handleVolumeSliderMouseDown):
2310 (Controller.prototype.updateTime):
2311 (Controller.prototype.updateControlsWhileScrubbing):
2312 (Controller.prototype.updateVolume):
2314 2016-07-29 Mark Lam <mark.lam@apple.com>
2316 Remove an unused line of code.
2317 https://bugs.webkit.org/show_bug.cgi?id=160350
2319 Reviewed by Simon Fraser.
2321 No new tests because there's no behavior change. Just removing dead code.
2323 SVGInlineTextBox::paintText() instantiates a local variable selectionTextRun.
2324 Thanks to analysis by Said Abou-Hallawa, we know that selectionTextRun
2325 was introduced in https://trac.webkit.org/changeset/61393, but was later
2326 rendered unused in https://trac.webkit.org/changeset/62099 because we
2327 switched to using paintTextWithShadows() with the selectionStyle. Hence,
2328 selectionTextRun can be removed.
2330 * rendering/svg/SVGInlineTextBox.cpp:
2331 (WebCore::SVGInlineTextBox::paintText):
2333 2016-07-29 Eric Carlson <eric.carlson@apple.com>
2335 Change internal AVCaptureDeviceType typedef name
2336 https://bugs.webkit.org/show_bug.cgi?id=160345
2337 <rdar://problem/27610935>
2339 Reviewed by Dean Jackson.
2341 * platform/mediastream/mac/AVAudioCaptureSource.mm:
2342 (WebCore::AVAudioCaptureSource::create): AVCaptureDeviceType -> AVCaptureDeviceTypedef
2343 (WebCore::AVAudioCaptureSource::AVAudioCaptureSource): Ditto.
2345 * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2346 (WebCore::AVCaptureDeviceManager::captureDeviceList): Ditto.
2347 (WebCore::shouldConsiderDeviceInDeviceList): Ditto.
2348 (WebCore::AVCaptureDeviceManager::refreshCaptureDeviceList): Ditto.
2349 (WebCore::AVCaptureDeviceManager::createMediaSourceForCaptureDeviceWithConstraints): Ditto.
2350 (WebCore::AVCaptureDeviceManager::deviceConnected): Ditto.
2351 (WebCore::AVCaptureDeviceManager::deviceDisconnected): Ditto.
2352 (-[WebCoreAVCaptureDeviceManagerObserver deviceDisconnected:]): Ditto.
2354 * platform/mediastream/mac/AVMediaCaptureSource.mm:
2355 (WebCore::globaVideoCaptureSerialQueue): Ditto.
2356 (WebCore::AVMediaCaptureSource::AVMediaCaptureSource): Ditto.
2358 * platform/mediastream/mac/AVVideoCaptureSource.mm:
2359 (WebCore::AVVideoCaptureSource::create): Ditto.
2360 (WebCore::AVVideoCaptureSource::AVVideoCaptureSource): Ditto.
2362 2016-07-28 Dean Jackson <dino@apple.com>
2364 color-gamut media query returns incorrect results
2365 https://bugs.webkit.org/show_bug.cgi?id=160166
2366 <rdar://problem/27537577>
2368 Reviewed by Darin Adler.
2370 While I was unable to reproduce the originator's issue,
2371 we communicated via email and it might have been related
2372 to a customized color space calibration on an external
2375 Anyway, I took this opportunity to update to use the
2376 more appropriate API for detection on macOS Sierra.
2378 Covered by the existing fast/media/mq-color-gamut.html test.
2380 * platform/mac/PlatformScreenMac.mm:
2381 (WebCore::screenSupportsExtendedColor): Use NSScreen canRepresentDisplayGamut.
2383 2016-07-29 George Ruan <gruan@apple.com>
2385 HTMLVideoElement with MediaStream src shows paused image when all video tracks are disabled
2386 https://bugs.webkit.org/show_bug.cgi?id=160222
2387 <rdar://problem/27557313>
2389 Reviewed by Eric Carlson.
2391 Tests: fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html
2392 fast/mediastream/MediaStream-video-element-video-tracks-disabled.html
2394 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
2395 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2396 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSampleBufferFromTrack): Change criteria to enqueue a
2397 Sample Buffer to the AVSampleBufferDisplayLayer to allow an initial frame to be shown.
2398 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::shouldEnqueueVideoSampleBuffer): Allow an initial frame to be shown.
2399 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::flushAndRemoveVideoSampleBuffers): Removes all buffers from the
2400 AVSampleBufferDisplayLayer.
2401 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer): Make the AVSampleBufferDisplayLayer's background black.
2402 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode): Remove all buffers from the AVSampleBufferDisplayLayer
2403 when state of MediaPlayerPrivateMediaStreamAVFObjC is changed to None of PaintItBlack.
2404 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updatePausedImage): Updates paused image.
2405 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Calls updatePausedImage.
2406 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext): Allow an initial frame to be painted to canvas.
2408 2016-07-29 Youenn Fablet <youenn@apple.com>
2410 [Fetch API] Activate credentials mode
2411 https://bugs.webkit.org/show_bug.cgi?id=160292
2413 Reviewed by Alex Christensen.
2415 Covered by updated and rebased tests.
2417 Previously the allowCredentials option was computed by DocumentThreadableLoader clients.
2418 This option is really similar to the credentials flag in the fetch specification and should be handled at lower levels.
2419 In the future, it might be good to retire that option.
2421 In case of Omit mode, we need to explicitely disable cookies in DocumentThreadableLoader.
2422 This should be updated so that ResourceLoader does it, depending on credential flag being set or not.
2424 Updated DocumentThreadableLoader clients to only use FetchOptions::Credentials.
2425 This allows to link code more easely to specification.
2427 * Modules/fetch/FetchLoader.cpp:
2428 (WebCore::FetchLoader::start): Removing use of allowCredentials option. Using FetchOptions::Credentials instead.
2429 * fileapi/FileReaderLoader.cpp:
2430 (WebCore::FileReaderLoader::start): Ditto.
2431 * inspector/InspectorNetworkAgent.cpp:
2432 (WebCore::InspectorNetworkAgent::loadResource): Ditto.
2433 * loader/DocumentThreadableLoader.cpp:
2434 (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Computing allowCredentials from FetchOptions::Credentials.
2435 (WebCore::DocumentThreadableLoader::loadRequest): Enabling cookie only if allowed to use credentials. This is in
2436 particular useful for FetchOptions::Credentials::Omit mode.
2437 * page/EventSource.cpp:
2438 (WebCore::EventSource::connect): Removing use of allowCredentials option. Using FetchOptions::Credentials instead.
2439 * workers/WorkerScriptLoader.cpp:
2440 (WebCore::WorkerScriptLoader::loadSynchronously): Ditto.
2441 (WebCore::WorkerScriptLoader::loadAsynchronously): Ditto.
2442 * xml/XMLHttpRequest.cpp: Ditto.
2443 (WebCore::XMLHttpRequest::createRequest):
2445 2016-07-29 Youenn Fablet <youenn@apple.com>
2447 CrossOrigin preflight checker should compute the right Access-Control-Request-Headers value
2448 https://bugs.webkit.org/show_bug.cgi?id=160028
2450 Reviewed by Alex Christensen.
2452 Covered by updated test.
2454 Computing Access-Control-Request-Headers value according https://fetch.spec.whatwg.org/#cors-preflight-fetch:
2455 - Remove safe headers
2456 - lowercase header names
2457 - sort lexicographically header names
2458 The only difference is that we keep separating headers with ', ' instead of ',' as per the spec.
2459 Also, some headers that might be safe are still marked as unsafe (DPR, Downlink...).
2461 Moved setting of Origin header after preflighting, consistently with fetch spec.
2463 * loader/CrossOriginAccessControl.cpp:
2464 (WebCore::createAccessControlPreflightRequest): Implementing new computation of Access-Control-Request-Headers.
2465 * loader/DocumentThreadableLoader.cpp:
2466 (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest): Removing call to updateRequestForAccessControl (which sets Origin header value).
2467 (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest): Adding call to updateRequestForAccessControl.
2468 (WebCore::DocumentThreadableLoader::preflightSuccess): Ditto.
2469 * platform/network/HTTPParsers.cpp:
2470 (WebCore::isCrossOriginSafeRequestHeader): Helper routine to implement https://fetch.spec.whatwg.org/#cors-safelisted-request-header.
2471 * platform/network/HTTPParsers.h:
2473 2016-07-29 Frederic Wang <fwang@igalia.com>
2475 Parse the operator text on the MathMLOperatorElement class.
2476 https://bugs.webkit.org/show_bug.cgi?id=160241
2478 Reviewed by Darin Adler.
2480 The text of the MathML operators is important to determine form or dictionary properties and
2481 hence provide default values when no explicit attributes are privided. Since that text only
2482 depends on the MathML DOM content, it makes sense to move its parsing into
2483 MathMLOperatorElement. Anonymous operators created by the mfenced elements still need to be
2484 handled specially and this will be true for all the operator properties that can just be
2485 determined in MathMLOperatorElement. Hence in a follow-up patch we will introduce a class
2486 to move all the code specific to mfenced in a class derived from RenderMathMLOperator while
2487 we continue to move the corresponding code for non-anonymous into MathMLOperatorElement.
2489 No new tests, behavior is unchanged.
2491 * mathml/MathMLOperatorElement.cpp: Include header for hyphenMinus/minusSign characters.
2492 (WebCore::MathMLOperatorElement::parseOperatorText): Move that code from rebuildTokenContent
2493 (WebCore::MathMLOperatorElement::operatorText): Helper function to get the cached text.
2494 (WebCore::MathMLOperatorElement::childrenChanged): Make the cached text dirty.
2495 * mathml/MathMLOperatorElement.h: Update defitions and add a member for the operator text.
2496 * mathml/MathMLTextElement.h: Make childrenChanged overridable.
2497 * rendering/mathml/RenderMathMLOperator.cpp:
2498 (WebCore::RenderMathMLOperator::element): Helper function to cast to a MathMLOperatorElement.
2499 (WebCore::RenderMathMLOperator::textContent): Helper function to call
2500 MathMLOperatorElement::operatorText or fallback to m_textContent for anonymous operators.
2501 m_textContent and this special case can be moved into a derived class later.
2502 (WebCore::RenderMathMLOperator::setOperatorProperties): Call textContent().
2503 (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Ditto.
2504 (WebCore::RenderMathMLOperator::rebuildTokenContent): Remove the string parameter and the
2505 parsing of the operator text.
2506 (WebCore::RenderMathMLOperator::updateTokenContent): Call textContent(). The special function
2507 for anonymous operators also parses the text content but this could be moved into a derived
2509 (WebCore::RenderMathMLOperator::shouldAllowStretching): Call textContent().
2510 (WebCore::RenderMathMLOperator::useMathOperator): Ditto.
2511 (WebCore::RenderMathMLOperator::RenderMathMLOperator): No need to initialize m_textContent
2512 as it is not used anymore for non-anonymous renderers.
2513 * rendering/mathml/RenderMathMLOperator.h: Update definitions and call textContent().
2515 2016-07-28 Youenn Fablet <youenn@apple.com>
2517 Binding generator should expose the visible interface name in error messages
2518 https://bugs.webkit.org/show_bug.cgi?id=160192
2520 Reviewed by Darin Adler.
2522 Covered by updated layout and binding tests.
2524 * bindings/scripts/CodeGeneratorJS.pm:
2525 (GenerateImplementation): Using visibleInterfaceName instead of interfaceName.
2526 (GenerateFunctionCastedThis): Ditto.
2527 (GenerateParametersCheck): Ditto.
2528 (GenerateConstructorDefinition): Ditto.
2529 * bindings/scripts/test/JS/JSTestObj.cpp: Rebased.
2530 * bindings/scripts/test/TestObj.idl: Adding ConstructorCallWith to exercice change in GenerateConstructorDefinition.
2532 2016-07-28 Carlos Garcia Campos <cgarcia@igalia.com>
2534 Split calculateCacheSizes in two methods
2535 https://bugs.webkit.org/show_bug.cgi?id=160237
2537 Reviewed by Darin Adler.
2539 Rename getVolumeFreeSizeForPath as volumeFreeSizeForPath and make it available to all platforms adding an
2540 implementation for mac.
2542 * platform/FileSystem.h:
2543 * platform/efl/FileSystemEfl.cpp:
2544 (WebCore::volumeFreeSizeForPath):
2545 (WebCore::getVolumeFreeSizeForPath): Deleted.
2546 * platform/glib/FileSystemGlib.cpp:
2547 (WebCore::volumeFreeSizeForPath):
2548 (WebCore::getVolumeFreeSizeForPath): Deleted.
2549 * platform/mac/FileSystemMac.mm:
2550 (WebCore::volumeFreeSizeForPath):
2551 * platform/win/FileSystemWin.cpp:
2552 (WebCore::volumeFreeSizeForPath):
2554 2016-07-28 Myles C. Maxfield <mmaxfield@apple.com>
2556 Remove deprecated SPI for video inline / fullscreen controls
2557 https://bugs.webkit.org/show_bug.cgi?id=160318
2559 Reviewed by Tim Horton.
2561 r203752 deprecated the SPI allowsInlineMediaPlaybackWithPlaysInlineAttribute
2562 and allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute (in favor of
2563 inlineMediaPlaybackRequiresPlaysInlineAttribute). This patch removes the
2564 deprecated SPI symbols.
2566 No new tests because there is no behavior change.
2568 * page/Settings.cpp:
2570 * testing/InternalSettings.cpp:
2571 (WebCore::InternalSettings::Backup::Backup): Deleted.
2572 (WebCore::InternalSettings::Backup::restoreTo): Deleted.
2573 (WebCore::InternalSettings::setAllowsInlineMediaPlaybackWithPlaysInlineAttribute): Deleted.
2574 (WebCore::InternalSettings::setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute): Deleted.
2575 * testing/InternalSettings.h:
2576 * testing/InternalSettings.idl:
2578 2016-07-28 Chris Dumez <cdumez@apple.com>
2580 Add support for Element.getAttributeNames()
2581 https://bugs.webkit.org/show_bug.cgi?id=160327
2583 Reviewed by Alex Christensen.
2585 Add support for Element.getAttributeNames():
2586 - https://dom.spec.whatwg.org/#dom-element-getattributenames
2588 Firefox already supports this, Chrome 52 does not yet.
2590 Test: fast/dom/Element/getAttributeNames.html
2592 * bindings/js/JSDOMBinding.h:
2593 (WebCore::JSValueTraits<AtomicString>::arrayJSValue):
2595 (WebCore::Element::getAttributeNames):
2599 2016-07-28 Chris Dumez <cdumez@apple.com>
2601 window.open.length should be 0
2602 https://bugs.webkit.org/show_bug.cgi?id=160323
2604 Reviewed by Darin Adler.
2606 window.open.length should be 0 as all its parameters are optional:
2607 - https://html.spec.whatwg.org/multipage/browsers.html#the-window-object
2609 It is 2 in WebKit. Firefox and Chrome agree with the specification and return 0.
2611 No new tests, rebaselined existing test.
2613 * bindings/js/JSDOMWindowCustom.cpp:
2614 (WebCore::JSDOMWindow::open):
2615 Minor code optimization.
2617 * page/DOMWindow.idl:
2618 Update IDL to match the specification and our custom implementation.
2619 This makes us return the right "length" value.
2621 2016-07-28 Chris Dumez <cdumez@apple.com>
2623 Parameters to Event.initEvent() should be mandatory
2624 https://bugs.webkit.org/show_bug.cgi?id=160320
2626 Reviewed by Darin Adler.
2628 Parameters to Event.initEvent() should be mandatory:
2629 - https://dom.spec.whatwg.org/#interface-event
2631 Firefox agrees with the specification. Chrome does not.
2633 No new tests, rebaselined existing tests.
2637 2016-07-28 Anders Carlsson <andersca@apple.com>
2639 Move a Mail.app workaround closer to where it's actually needed
2640 https://bugs.webkit.org/show_bug.cgi?id=160317
2642 Reviewed by Tim Horton.
2644 * loader/FrameLoader.cpp:
2645 (WebCore::FrameLoader::loadArchive):
2646 * platform/network/cf/ResourceRequest.h:
2647 * platform/network/cocoa/ResourceRequestCocoa.mm:
2648 (WebCore::ResourceRequest::applyWebArchiveHackForMail): Deleted.
2649 * platform/network/mac/ResourceRequestMac.mm:
2650 (WebCore::ResourceRequest::applyWebArchiveHackForMail): Deleted.
2652 2016-07-28 Chris Dumez <cdumez@apple.com>
2654 2 first parameters to window.postMessage() should be mandatory
2655 https://bugs.webkit.org/show_bug.cgi?id=160319
2657 Reviewed by Darin Adler.
2659 2 first parameters to window.postMessage() should be mandatory:
2660 - https://html.spec.whatwg.org/multipage/browsers.html#the-window-object
2662 Firefox and Chrome agree with the specification.
2664 No new tests, rebaselined existing test.
2666 * bindings/js/JSDOMWindowCustom.cpp:
2667 (WebCore::handlePostMessage):
2669 2016-07-28 Chris Dumez <cdumez@apple.com>
2671 First parameter to canvas.getContext() / probablySupportsContext() should be mandatory
2672 https://bugs.webkit.org/show_bug.cgi?id=160312
2674 Reviewed by Darin Adler.
2676 First parameter to canvas.getContext() / probablySupportsContext()
2677 should be mandatory:
2678 - http://w3c.github.io/html/semantics-scripting.html#the-canvas-element
2680 Firefox and Chrome agree with the specification for getContext().
2681 Neither of them supports probablySupportsContext().
2683 No new tests, rebaselined existing tests.
2685 * bindings/js/JSHTMLCanvasElementCustom.cpp:
2686 (WebCore::JSHTMLCanvasElement::getContext):
2687 (WebCore::JSHTMLCanvasElement::probablySupportsContext):
2688 * html/HTMLCanvasElement.idl:
2690 2016-07-28 Chris Dumez <cdumez@apple.com>
2692 Parameter to table.deleteRow() / body.deleteRow() should be mandatory
2693 https://bugs.webkit.org/show_bug.cgi?id=160307
2695 Reviewed by Ryosuke Niwa.
2697 Parameter to table.deleteRow() / body.deleteRow() should be mandatory:
2698 - https://html.spec.whatwg.org/multipage/tables.html#the-table-element
2699 - https://html.spec.whatwg.org/multipage/tables.html#htmltablesectionelement
2701 Firefox and Chrome agree with the specification.
2703 No new tests, rebaselined existing test.
2705 * html/HTMLTableElement.idl:
2706 * html/HTMLTableSectionElement.idl:
2708 2016-07-28 Commit Queue <commit-queue@webkit.org>
2710 Unreviewed, rolling out r203826.
2711 https://bugs.webkit.org/show_bug.cgi?id=160314
2713 The test added with this change fails on El Capitan WK2.
2714 (Requested by ryanhaddad on #webkit).
2718 "HTMLVideoElement with MediaStream src shows paused image when
2719 all video tracks are disabled"
2720 https://bugs.webkit.org/show_bug.cgi?id=160222
2721 http://trac.webkit.org/changeset/203826
2723 2016-07-28 Chris Dumez <cdumez@apple.com>
2725 2 first parameters to input.setSelectionRange() should be mandatory
2726 https://bugs.webkit.org/show_bug.cgi?id=160310
2728 Reviewed by Alex Christensen.
2730 2 first parameters to input.setSelectionRange() should be mandatory:
2731 - https://html.spec.whatwg.org/multipage/forms.html#htmlinputelement
2733 Calling this method without the 2 first parameters makes little
2736 Firefox agrees with the specification, Chrome does not.
2738 No new tests, rebaselined existing test.
2740 * bindings/js/JSHTMLInputElementCustom.cpp:
2741 (WebCore::JSHTMLInputElement::setSelectionRange):
2742 * html/HTMLInputElement.idl:
2744 2016-07-28 Anders Carlsson <andersca@apple.com>
2746 Remove an unnecessary comment from UUID.h
2747 https://bugs.webkit.org/show_bug.cgi?id=160313
2749 Reviewed by Simon Fraser.
2753 2016-07-28 Chris Dumez <cdumez@apple.com>
2755 Parameter to tr.deleteCell() should be mandatory
2756 https://bugs.webkit.org/show_bug.cgi?id=160308
2758 Reviewed by Ryosuke Niwa.
2760 Parameter to tr.deleteCell() should be mandatory:
2761 - https://html.spec.whatwg.org/multipage/tables.html#htmltablerowelement
2763 Firefox and Chrome agree with the specification.
2765 No new tests, rebaselined existing tests.
2767 * html/HTMLTableRowElement.idl:
2769 2016-07-28 Chris Dumez <cdumez@apple.com>
2771 [Bindings] "length" value of overloaded operations may be wrong
2772 https://bugs.webkit.org/show_bug.cgi?id=160303
2774 Reviewed by Ryosuke Niwa.
2776 "length" value of overloaded operations may be wrong because we fail to
2777 account for overloads when computing the length of a function:
2778 - https://heycam.github.io/webidl/#es-operations
2780 No new tests, rebaselined existing test.
2782 * bindings/scripts/CodeGeneratorJS.pm:
2783 (GetFunctionLength):
2784 * bindings/scripts/test/JS/JSTestObj.cpp:
2786 2016-07-28 George Ruan <gruan@apple.com>
2788 HTMLVideoElement with MediaStream src shows paused image when all video tracks are disabled
2789 https://bugs.webkit.org/show_bug.cgi?id=160222
2790 <rdar://problem/27557313>
2792 Reviewed by Eric Carlson.
2794 Tests: fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html
2795 fast/mediastream/MediaStream-video-element-video-tracks-disabled.html
2797 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
2798 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2799 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSampleBufferFromTrack): Change criteria to enqueue a
2800 Sample Buffer to the AVSampleBufferDisplayLayer to allow an initial frame to be shown.
2801 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::shouldEnqueueVideoSampleBuffer): Allow an initial frame to be shown.
2802 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::flushAndRemoveVideoSampleBuffers): Removes all buffers from the
2803 AVSampleBufferDisplayLayer.
2804 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer): Make the AVSampleBufferDisplayLayer's background black.
2805 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode): Remove all buffers from the AVSampleBufferDisplayLayer
2806 when state of MediaPlayerPrivateMediaStreamAVFObjC is changed to None of PaintItBlack.
2807 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updatePausedImage): Updates paused image.
2808 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Calls updatePausedImage.
2809 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext): Allow an initial frame to be painted to canvas.
2811 2016-07-28 Dean Jackson <dino@apple.com>
2813 REGRESSION (r202880): Default controls pip glyph inverted
2814 https://bugs.webkit.org/show_bug.cgi?id=160304
2815 <rdar://problem/27578447>
2817 Reviewed by Eric Carlson.
2819 I accidentally committed the "Exit Picture-in-picture" glyph
2820 for the "Enter Picture-in-picture" buttons :(
2822 * Modules/mediacontrols/mediaControlsApple.css:
2823 (video::-webkit-media-controls-panel .picture-in-picture-button):
2824 Use the correct artwork.
2826 2016-07-28 Chris Dumez <cdumez@apple.com>
2828 First parameter to SVGDocument.createEvent() should be mandatory
2829 https://bugs.webkit.org/show_bug.cgi?id=160296
2831 Reviewed by Alex Christensen.
2833 First parameter to SVGDocument.createEvent() should be mandatory:
2834 - https://www.w3.org/TR/SVG2/struct.html#InterfaceDocumentExtensions
2835 - https://dom.spec.whatwg.org/#document
2837 This patch drops createEvent() from SVGDocument so that the spec-compliant
2838 Document.createEvent() is used instead. In the specification, SVGDocument
2839 no longer exists and is a simple Document.
2841 Firefox and Chrome agree with the specification.
2843 Test: svg/dom/SVGDocument-createEvent.html
2845 * svg/SVGDocument.idl:
2847 2016-07-28 Chris Dumez <cdumez@apple.com>
2849 Parameters to CanvasGradient.addColorStop() should be mandatory
2850 https://bugs.webkit.org/show_bug.cgi?id=160297
2852 Reviewed by Alex Christensen.
2854 Parameters to CanvasGradient.addColorStop() should be mandatory:
2855 - https://html.spec.whatwg.org/multipage/scripting.html#canvasgradient
2857 Firefox and Chrome agree with the specification.
2859 No new tests, rebaselined existing test.
2861 * html/canvas/CanvasGradient.idl:
2863 2016-07-28 Romain Bellessort <romain.bellessort@crf.canon.fr>
2865 [Streams API] Replace ReadableStreamController by ReadableStreamDefaultController
2866 https://bugs.webkit.org/show_bug.cgi?id=160242
2868 Reviewed by Youenn Fablet.
2870 Replaced ReadableStreamController by ReadableStreamDefaultController to align
2871 with updated Streams API specification.
2873 No change in functionality.
2876 * DerivedSources.cpp:
2877 * DerivedSources.make:
2878 * Modules/streams/ReadableStream.js:
2879 (initializeReadableStream):
2880 * Modules/streams/ReadableStreamDefaultController.idl: Renamed from Source/WebCore/Modules/streams/ReadableStreamController.idl.
2881 * Modules/streams/ReadableStreamDefaultController.js: Renamed from Source/WebCore/Modules/streams/ReadableStreamController.js.
2886 * Modules/streams/ReadableStreamInternals.js:
2887 (privateInitializeReadableStreamDefaultController):
2888 (isReadableStreamDefaultController):
2889 * Modules/streams/ReadableStreamSource.h:
2890 (WebCore::ReadableStreamSource::controller):
2891 (WebCore::ReadableStreamSource::start):
2892 * Modules/streams/ReadableStreamSource.idl:
2893 * WebCore.xcodeproj/project.pbxproj:
2894 * bindings/js/JSDOMGlobalObject.cpp:
2895 (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
2896 * bindings/js/JSReadableStreamPrivateConstructors.cpp:
2897 (WebCore::constructJSReadableStreamDefaultController):
2898 (WebCore::JSBuiltinReadableStreamDefaultControllerPrivateConstructor::initializeExecutable):
2899 (WebCore::createReadableStreamDefaultControllerPrivateConstructor):
2900 * bindings/js/JSReadableStreamPrivateConstructors.h:
2901 * bindings/js/JSReadableStreamSourceCustom.cpp:
2902 (WebCore::JSReadableStreamSource::start):
2903 * bindings/js/ReadableStreamDefaultController.cpp: Renamed from Source/WebCore/bindings/js/ReadableStreamController.cpp.
2904 (WebCore::callFunction):
2905 (WebCore::ReadableStreamDefaultController::invoke):
2906 (WebCore::ReadableStreamDefaultController::isControlledReadableStreamLocked):
2907 * bindings/js/ReadableStreamDefaultController.h: Renamed from Source/WebCore/bindings/js/ReadableStreamController.h.
2908 (WebCore::ReadableStreamDefaultController::ReadableStreamDefaultController):
2909 (WebCore::ReadableStreamDefaultController::close):
2910 (WebCore::ReadableStreamDefaultController::error):
2911 (WebCore::ReadableStreamDefaultController::enqueue):
2912 (WebCore::ReadableStreamDefaultController::globalObject):
2913 (WebCore::ReadableStreamDefaultController::error<String>):
2914 * bindings/js/WebCoreBuiltinNames.h:
2916 2016-07-28 Youenn Fablet <youenn@apple.com>
2918 Compute fetch response type in case of cross-origin requests
2919 https://bugs.webkit.org/show_bug.cgi?id=158565
2921 Reviewed by Alex Christensen.
2923 Covered by rebased tests.
2925 Implementing Response filtering based on Response tainting in ResourceResponse.
2926 Refactoring code in FetchHeaders and CrossOriginAccessControl.cpp accordingly.
2928 Computing response tainting in SubresourceLoader for all resources.
2929 This is used by DocumentThreadableLoader which now filters responses accordingly for all its clients including fetch and XHR.
2931 Response tainting notably allows computing the response type and filtering out headers in case of cross origin responses.
2933 Removing the filtering implemented in XMLHttpRequest as this is done before it gets access to the headers.
2934 This is triggering some rebasing in the XHR tests as error messages triggered by trying to access unsafe headers no longer happen.
2936 This filtering currently requires creating a new ResourceResponse object from the one sent from CachedResource.
2937 This is done so as the same ResourceResponse may be reused accross loads and may be filtered differently by given to two different DocumentThreadableLoader
2938 This can be mitigated in the future by changing ThreadableLoaderClient API to pass a ResourceResponse&&.
2940 * Modules/fetch/FetchHeaders.cpp: Moving header checking in HTTParsers.h/.cpp
2941 (WebCore::isForbiddenHeaderName): Deleted.
2942 (WebCore::isForbiddenResponseHeaderName): Deleted.
2943 (WebCore::isSimpleHeader): Deleted.
2944 * loader/CrossOriginAccessControl.cpp:
2945 (WebCore::parseAccessControlExposeHeadersAllowList): Deleted.
2946 * loader/CrossOriginAccessControl.h: Moving header checking in HTTParsers.h/.cpp
2947 * loader/DocumentThreadableLoader.cpp:
2948 (WebCore::DocumentThreadableLoader::responseReceived):
2949 (WebCore::DocumentThreadableLoader::didReceiveResponse): Doing response filtering. Since underlying loaders are
2950 not yet aware that fetch mode may be cors (it is always no-cors currently), the tainting needs to be updated.
2951 (WebCore::DocumentThreadableLoader::loadRequest): Computing response tainting in case of synchronous calls to ensure headers are filtered for synchronous XHR.
2952 * loader/DocumentThreadableLoader.h:
2953 * loader/SubresourceLoader.cpp:
2954 (WebCore::SubresourceLoader::init): Getting origin from its resource and setting response tainting accordingly
2955 (WebCore::SubresourceLoader::willSendRequestInternal): Always calling checkRedirectionCrossOriginAccessControl
2956 to ensure response tainting is computed, even for no-cors resources.
2957 (WebCore::SubresourceLoader::didReceiveResponse):
2958 (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl): Computing response tainting in case of redirection.
2959 * loader/SubresourceLoader.h:
2960 * loader/cache/CachedResource.cpp:
2961 (WebCore::CachedResource::load): Computing resource origin from the HTTP headers or from the document if none is
2962 set in the HTTP headers.
2963 (WebCore::CachedResource::setCrossOrigin): Helper routine to set response tainting.
2964 (WebCore::CachedResource::isCrossOrigin): Helper routine to know whether resource is cross origin
2965 (WebCore::CachedResource::isClean):
2966 (WebCore::CachedResource::setResponse): Removing m_responseType
2967 * loader/cache/CachedResource.h:
2968 (WebCore::CachedResource::responseTainting):
2969 (WebCore::CachedResource::origin):
2970 (WebCore::CachedResource::setOpaqueRedirect): Deleted.
2971 * platform/network/HTTPParsers.cpp: Implementing safe response header checking
2972 (WebCore::parseAccessControlExposeHeadersAllowList):
2973 (WebCore::isForbiddenHeaderName):
2974 (WebCore::isForbiddenResponseHeaderName):
2975 (WebCore::isSimpleHeader):
2976 (WebCore::isCrossOriginSafeHeader):
2977 * platform/network/HTTPParsers.h:
2978 * platform/network/ResourceRequestBase.cpp:
2979 (WebCore::ResourceRequestBase::hasHTTPOrigin): Added.
2980 (WebCore::ResourceRequestBase::clearHTTPOrigin):
2981 * platform/network/ResourceRequestBase.h:
2982 * platform/network/ResourceResponseBase.cpp: Implementation of response filtering.
2983 (WebCore::ResourceResponseBase::filterResponse):
2984 * platform/network/ResourceResponseBase.h:
2985 * xml/XMLHttpRequest.cpp:
2986 (WebCore::isSetCookieHeader): Deleted.
2987 (WebCore::XMLHttpRequest::getAllResponseHeaders): Removing header filtering since DocumentThreadableLoader does it.
2988 (WebCore::XMLHttpRequest::getResponseHeader): Ditto.
2990 2016-07-27 Romain Bellessort <romain.bellessort@crf.canon.fr>
2992 [Streams API] Use makeThisTypeError in ReadableStreamDefaultReader.js
2993 https://bugs.webkit.org/show_bug.cgi?id=160254
2995 Reviewed by Darin Adler.
2997 Use makeThisTypeError and makeGetterTypeError in ReadableStreamDefaultReader.js
2999 No change in functionality.
3001 * Modules/streams/ReadableStreamDefaultReader.js:
3007 2016-07-27 Fujii Hironori <Hironori.Fujii@sony.com>
3009 [soup] Incorrect usage of relaxAdoptionRequirement in the constructor of SocketStreamHandle
3010 https://bugs.webkit.org/show_bug.cgi?id=160281
3012 Reviewed by Carlos Garcia Campos.
3014 No new tests (No behavior change).
3016 Incrementing refcount in a constructor causes an assertion failure
3017 that it's not adopted yet. So, relaxAdoptionRequirement() was
3018 used to avoid the problem in the constructors of
3019 SocketStreamHandle. This is a incorrect solution. The correct
3020 solution is to make SocketStreamHandle::create() increment the
3021 refcount after calling the constructor.
3023 * platform/network/soup/SocketStreamHandle.h: Removed the second
3024 constructor of SocketStreamHandle which is not used anymore.
3025 Uninlined create() because this is not trivial anymore.
3026 * platform/network/soup/SocketStreamHandleSoup.cpp:
3027 (WebCore::SocketStreamHandle::create): Do the rest of jobs which
3028 was done by the constructors.
3029 (WebCore::SocketStreamHandle::SocketStreamHandle): Move the jobs
3030 after initialization to create().
3031 Removed the second constructor.
3033 2016-07-27 Chris Dumez <cdumez@apple.com>
3035 First parameter to HTMLMediaElement.canPlayType() should be mandatory
3036 https://bugs.webkit.org/show_bug.cgi?id=160275
3038 Reviewed by Ryosuke Niwa.
3040 First parameter to HTMLMediaElement.canPlayType() should be mandatory:
3041 - https://html.spec.whatwg.org/multipage/embedded-content.html#htmlmediaelement
3043 Firefox and Chrome agree with the specification.
3045 No new tests, rebaselined existing tests.
3047 * html/HTMLMediaElement.idl:
3049 2016-07-27 Chris Dumez <cdumez@apple.com>
3051 First parameter to setTimeout() / setInterval() should be mandatory
3052 https://bugs.webkit.org/show_bug.cgi?id=160277
3054 Reviewed by Darin Adler.
3056 First parameter to setTimeout() / setInterval() should be mandatory:
3057 - https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope
3059 Firefox and Chrome agree with the specification.
3061 No new tests, rebaselined existing test.
3063 * bindings/js/JSDOMWindowCustom.cpp:
3064 (WebCore::JSDOMWindow::setTimeout):
3065 (WebCore::JSDOMWindow::setInterval):
3066 * bindings/js/JSWorkerGlobalScopeCustom.cpp:
3067 (WebCore::JSWorkerGlobalScope::setTimeout):
3068 (WebCore::JSWorkerGlobalScope::setInterval):
3070 2016-07-27 Chris Dumez <cdumez@apple.com>
3072 Parameters to insertAdjacentText() / insertAdjacentHTML() should be mandatory
3073 https://bugs.webkit.org/show_bug.cgi?id=160274
3075 Reviewed by Darin Adler.
3077 Parameters to insertAdjacentText() / insertAdjacentHTML() should be mandatory:
3078 - https://dom.spec.whatwg.org/#element
3079 - https://www.w3.org/TR/DOM-Parsing/#extensions-to-the-element-interface
3081 Firefox and Chrome agree with the specification (although Firefox does not
3082 have insertAdjacentText()).
3084 Test: fast/dom/Element/insertAdjacentText-parameters.html
3086 * html/HTMLElement.idl:
3088 2016-07-27 Beth Dakin <bdakin@apple.com>
3090 Add localizable strings for inserting list types
3091 https://bugs.webkit.org/show_bug.cgi?id=160233
3093 rdar://problem/26102954
3095 Reviewed by Dan Bernstein.
3097 * English.lproj/Localizable.strings:
3098 * platform/LocalizedStrings.cpp:
3099 (WebCore::insertListTypeNone):
3100 (WebCore::insertListTypeNoneAccessibilityTitle):
3101 (WebCore::insertListTypeBulleted):
3102 (WebCore::insertListTypeBulletedAccessibilityTitle):
3103 (WebCore::insertListTypeNumbered):
3104 (WebCore::insertListTypeNumberedAccessibilityTitle):
3105 * platform/LocalizedStrings.h:
3107 2016-07-27 Chris Dumez <cdumez@apple.com>
3109 Parameters to DOMParser.parseFromString() should be mandatory
3110 https://bugs.webkit.org/show_bug.cgi?id=160268
3112 Reviewed by Ryosuke Niwa.
3114 Parameters to DOMParser.parseFromString() should be mandatory:
3115 - https://www.w3.org/TR/DOM-Parsing/#the-domparser-interface
3117 Firefox and Chrome agree with the specification.
3119 Test: fast/parser/DOMParser-parameters.html
3121 * xml/DOMParser.idl:
3123 2016-07-27 Eric Carlson <eric.carlson@apple.com>
3125 Captions do not render in PiP window when element is hidden
3126 https://bugs.webkit.org/show_bug.cgi?id=160265
3127 <rdar://problem/27556788>
3129 Reviewed by Simon Fraser.
3131 * html/shadow/MediaControlElements.cpp:
3132 (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): Pass new flag so
3133 caption layers are always rendered.
3135 * rendering/RenderLayer.cpp:
3136 (WebCore::RenderLayer::paintLayerContents): Paint non-visible layers when PaintLayerIgnoreVisibility
3138 * rendering/RenderLayer.h: Define PaintLayerIgnoreVisibility.
3140 2016-07-27 Chris Dumez <cdumez@apple.com>
3142 Parameter to named property getter should be mandatory
3143 https://bugs.webkit.org/show_bug.cgi?id=160269
3145 Reviewed by Ryosuke Niwa.
3147 Parameter to named property getter should be mandatory:
3148 - https://heycam.github.io/webidl/#idl-named-properties
3150 No new tests, rebaselined existing test.
3152 * Modules/mediastream/RTCStatsResponse.idl:
3153 * bindings/scripts/test/TestOverrideBuiltins.idl:
3154 * html/HTMLOptionsCollection.idl:
3155 * html/HTMLSelectElement.idl:
3156 * plugins/DOMMimeTypeArray.idl:
3157 * plugins/DOMPlugin.idl:
3158 * plugins/DOMPluginArray.idl:
3160 2016-07-27 Chris Dumez <cdumez@apple.com>
3162 First parameter to Range.createContextualFragment() should be mandatory
3163 https://bugs.webkit.org/show_bug.cgi?id=160266
3165 Reviewed by Ryosuke Niwa.
3167 First parameter to Range.createContextualFragment() should be mandatory:
3168 - https://w3c.github.io/DOM-Parsing/#extensions-to-the-range-interface
3170 Firefox and Chrome agree with the specification.
3172 No new tests, rebaselined existing test.
3176 2016-07-27 Chris Dumez <cdumez@apple.com>
3178 Align MediaList with the CSSOM specification
3179 https://bugs.webkit.org/show_bug.cgi?id=160257
3181 Reviewed by Ryosuke Niwa.
3183 Align MediaList with the CSSOM specification:
3184 - https://www.w3.org/TR/cssom-1/#the-medialist-interface
3186 In particular, the parameter to item() / deleteMedium() and
3187 appendMedium() is now mandatory.
3189 Firefox and Chrome agree with the specification.
3191 Test: fast/css/MediaList-mediaText-null.html
3192 fast/css/MediaList-parameters.html
3194 * css/MediaList.idl:
3196 2016-07-27 Jeremy Jones <jeremyj@apple.com>
3198 Fullscreen video zoom button does not work after rotating when aspect ratio matches display.
3199 https://bugs.webkit.org/show_bug.cgi?id=160263
3200 rdar://problem/27368872
3202 Reviewed by Eric Carlson.
3204 When video and display aspect ratio match, and rotating from landscape to protrait, the transform used in layout
3205 will be Identity. This means checking the transform for identity is an insufficient test to see if the bounds
3206 need to be resolved.
3208 Instead, always attempt to resolve the bounds and do a more accurate test while doing so.
3210 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3211 (-[WebAVPlayerLayer layoutSublayers]):
3212 (-[WebAVPlayerLayer resolveBounds]):
3214 2016-07-27 Anders Carlsson <andersca@apple.com>
3216 Stop accepting the deprecated "requiredShippingAddressFields" and "requiredBillingAddressFields" properties
3217 https://bugs.webkit.org/show_bug.cgi?id=160264
3218 rdar://problem/27574519
3220 Reviewed by Simon Fraser.
3222 * Modules/applepay/ApplePaySession.cpp:
3223 (WebCore::createPaymentRequest):
3224 (WebCore::isValidPaymentRequestPropertyName):
3226 2016-07-27 Chris Dumez <cdumez@apple.com>
3228 First parameter to indexed property getters should be mandatory
3229 https://bugs.webkit.org/show_bug.cgi?id=160259
3231 Reviewed by Ryosuke Niwa.
3233 First parameter to indexed property getters should be mandatory:
3234 - https://heycam.github.io/webidl/#idl-indexed-properties
3236 No new tests, rebaselined existing tests.
3238 * Modules/gamepad/deprecated/GamepadList.idl:
3239 * bindings/js/JSHTMLAllCollectionCustom.cpp:
3240 (WebCore::JSHTMLAllCollection::item):
3241 * css/CSSRuleList.idl:
3242 * css/CSSValueList.idl:
3243 * css/StyleSheetList.idl:
3244 * css/WebKitCSSFilterValue.idl:
3245 * css/WebKitCSSTransformValue.idl:
3246 * dom/ClientRectList.idl:
3247 * dom/DOMStringList.idl:
3248 * dom/DataTransferItemList.idl:
3249 * html/HTMLAllCollection.idl:
3250 * plugins/DOMMimeTypeArray.idl:
3251 * plugins/DOMPlugin.idl:
3252 * plugins/DOMPluginArray.idl:
3254 2016-07-27 Javier Fernandez <jfernandez@igalia.com>
3256 [css-grid] The isValidTransition function must not alter the GridSizingData object
3257 https://bugs.webkit.org/show_bug.cgi?id=160252
3259 Reviewed by Darin Adler.
3261 It's not correct that a function which purpose is to check out the
3262 validity of a state modifies such state.
3264 That code was there to allow the extra row track sizing iteration
3265 in the case of a grid container with indefinite height. We need to
3266 do that in order to figure out its intrinsic height, which will be
3267 used then to properly sizing the row tracks.
3269 Since the intrinsic height computation uses directly the
3270 computeUsedBreadthOfGridTracks function, it does not alter the
3271 algorithm state-machine, hence, we can safely remove this code,
3272 which was incorrect in any case.
3274 No new tests, it's just a refactoring with no functionality change.
3276 * rendering/RenderGrid.cpp:
3277 (WebCore::RenderGrid::GridSizingData::isValidTransition):
3279 2016-07-27 Chris Dumez <cdumez@apple.com>
3281 First parameter to Document.execCommand() / queryCommand*() should be mandatory
3282 https://bugs.webkit.org/show_bug.cgi?id=160258
3284 Reviewed by Darin Adler.
3286 First parameter to Document.execCommand() / queryCommand*() should be mandatory:
3287 - https://w3c.github.io/editing/execCommand.html
3289 Firefox and Chrome agree with the specification.
3291 Test: fast/dom/Document/editing-parameters.html
3295 2016-07-27 Chris Dumez <cdumez@apple.com>
3297 Align CSSSupportsRule with the specification
3298 https://bugs.webkit.org/show_bug.cgi?id=160256
3300 Reviewed by Darin Adler.
3302 Align CSSSupportsRule with the specification:
3303 - https://drafts.csswg.org/css-conditional-3/#csssupportsrule
3306 - Make the parameters to insertRule() / deleteRule() mandatory
3307 - Expose CSSSupportsRule on the global Window object
3309 Both Firefox and Chrome agree with the specification here.
3311 Test: fast/css/CSSSupportsRule-parameters.html
3313 * css/CSSSupportsRule.idl:
3315 2016-07-27 Carlos Garcia Campos <cgarcia@igalia.com>
3317 [Soup] Test http/tests/xmlhttprequest/auth-reject-protection-space.html fails since added in r203743
3318 https://bugs.webkit.org/show_bug.cgi?id=160235
3320 Reviewed by Michael Catanzaro.
3322 It times out in release and crashes in debug due to an ASSERT_NOT_REACHED(). The soup backend doesn't really
3323 support rejecting the protection space and continuing with the next one, but we can at least continue with the
3324 request without crendential to make the test pass.
3326 * platform/network/soup/ResourceHandleSoup.cpp:
3327 (WebCore::ResourceHandle::receivedChallengeRejection):
3329 2016-07-27 Romain Bellessort <romain.bellessort@crf.canon.fr>
3331 [Streams API] Replace ReadableStreamReader by ReadableStreamDefaultReader
3332 https://bugs.webkit.org/show_bug.cgi?id=160194
3334 Reviewed by Youenn Fablet.
3336 Replaced ReadableStreamReader by ReadableStreamDefaultReader to align
3337 with updated Streams API specification.
3339 No change in functionality.
3342 * DerivedSources.cpp:
3343 * DerivedSources.make:
3344 * Modules/fetch/FetchInternals.js:
3346 * Modules/fetch/FetchResponse.js:
3348 * Modules/streams/ReadableStream.js:
3350 * Modules/streams/ReadableStreamDefaultReader.idl: Renamed from Source/WebCore/Modules/streams/ReadableStreamReader.idl.
3351 * Modules/streams/ReadableStreamDefaultReader.js: Renamed from Source/WebCore/Modules/streams/ReadableStreamReader.js.
3356 * Modules/streams/ReadableStreamInternals.js:
3357 (privateInitializeReadableStreamDefaultReader):
3358 (teeReadableStream):
3359 (teeReadableStreamPullFunction):
3360 (isReadableStreamDefaultReader):
3361 (closeReadableStream):
3362 (readFromReadableStreamDefaultReader):
3363 * WebCore.xcodeproj/project.pbxproj:
3364 * bindings/js/JSDOMGlobalObject.cpp:
3365 (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
3366 (WebCore::JSDOMGlobalObject::finishCreation):
3367 * bindings/js/JSReadableStreamPrivateConstructors.cpp:
3368 (WebCore::constructJSReadableStreamDefaultReader):
3369 (WebCore::JSBuiltinReadableStreamDefaultReaderPrivateConstructor::initializeExecutable):
3370 (WebCore::createReadableStreamDefaultReaderPrivateConstructor):
3371 * bindings/js/JSReadableStreamPrivateConstructors.h:
3372 * bindings/js/WebCoreBuiltinNames.h:
3375 2016-07-27 Javier Fernandez <jfernandez@igalia.com>
3377 [css-grid] Handle alignment with orthogonal flows
3378 https://bugs.webkit.org/show_bug.cgi?id=159295
3380 Reviewed by Darin Adler.
3382 Now that grid sizing and positioning issues wrt orthogonal flows have
3383 been clarified in the last spec draft, we can adapt now our alignment
3384 logic to work with orthogonal flows.
3386 Even though basic alignment would work with orthogonal flows with
3387 this patch, we still doesn't allow stretching in that case. I'll provide a
3388 patch for that feature since it's a complex logic and better have an
3391 Tests: fast/css-grid-layout/grid-item-alignment-with-orthogonal-flows-vertical-lr.html
3392 fast/css-grid-layout/grid-item-alignment-with-orthogonal-flows-vertical-rl.html
3393 fast/css-grid-layout/grid-item-alignment-with-orthogonal-flows.html
3395 * rendering/RenderGrid.cpp:
3396 (WebCore::computeOverflowAlignmentOffset): Using 'size' instead of 'breadth' as concept.
3397 (WebCore::RenderGrid::columnAxisPositionForChild): Dealing with orthogonal flow cases.
3398 (WebCore::RenderGrid::rowAxisPositionForChild): Dealing with orthogonal flow cases.
3399 (WebCore::RenderGrid::columnAxisOffsetForChild): Using 'size' instead of 'breadth' as concept.
3400 (WebCore::RenderGrid::rowAxisOffsetForChild): Using 'size' instead of 'breadth' as concept.
3401 (WebCore::RenderGrid::findChildLogicalPosition): Dealing with orthogonal flow cases.
3403 2016-07-26 Youenn Fablet <youenn@apple.com>
3405 [Fetch API] Response constructor should be able to take a ReadableStream as body
3406 https://bugs.webkit.org/show_bug.cgi?id=159804
3408 Reviewed by Alex Christensen.
3410 Covered by existing and updated tests.
3412 Introduced FetchBodyConsumer to encapsulate the code responsible to adapt FetchBody internal data to the requests made by user scripts.
3413 This refactoring eases the handling of internal data coming from ReadableStream.
3415 FetchLoader is now delegating conversion from the data to its m_consumer field.
3416 If m_consumer is null, FetchLoader calls FetchLoaderClient::didReceiveData (streaming reception mode).
3417 Clients of FetchLoader needs to pass a FetchBodyConsumer to the FetchLoader to do the data adaptation at loader creation time.
3419 Added support for body data passed as a ReadableStream to Response.
3420 This requires to set @body internal slot of the Response object in the constructor initialization JS built-in.
3422 To actually use that data, Body accessors are also implemented as JS built-in for Response.
3423 Since there is no need to do so for Request, FetchResponse is no longer marked as implementing FetchBody but all
3424 FetchBody IDL description is inlined in FetchResponse.idl.
3426 For each body accessor (arrayBuffer, blob, json, text), the corresponding JS built-in checks whether @body internal slot is set.
3427 If that is not the case, regular handling is done through a new private method called @consume.
3428 If @body internal slot is set, chunks are pumped from the ReadableStream using ReadableStream internal built-ins functions.
3429 Data handling is done in C++ through the private methods @startConsumingStream, @consumeChunk and @finishConsumingStream.
3431 To support cloning of Response with bodies, clone method is also implemented as a JS built-in.
3432 Main clone is done through @cloneFoJS private method implemented in C++.
3433 JS built-in clone code does the teeing of the ReadableStream using ReadableStream JS built-in internal functions.
3435 Introducing a new ReadableStream type for FetchBody to cope with body being stored in a ReadableStream.
3437 Introducing a new Loaded type for FetchBody to cope with body being stored in the FetchBodyConsumer owned by FetchBody.
3438 This allows removing the conversion of data to JSC::ArrayBuffer which was done by defaut at the end of Fetch loading if user script did not request data before.
3439 At the end of a load, the data remains in FetchBodyConsumer and the body is marked as Loaded.
3440 If the user wants to get the data after data finished being loaded, FetchBodyConsumer will do the required conversions.
3442 Introducing DeferredWrapper::resolveWithNewValue to handle the case of resolving promises with new objects.
3443 This allows directly using toJSNewlyCreated instead of toJS.
3445 * CMakeLists.txt: Adding FetchBodyConsumer.cpp. Removing WebCoreJSBuiltins.cpp from CMake list as it is not needed.
3446 * Modules/fetch/FetchBody.cpp: Moving data adaptation code to FetchBodyConsumer.
3447 (WebCore::FetchBody::extract):
3448 (WebCore::FetchBody::arrayBuffer):
3449 (WebCore::FetchBody::blob): Setting contentType in FetchBodyConsumer to handle proper creation of blob.
3450 (WebCore::FetchBody::json):
3451 (WebCore::FetchBody::text):
3452 (WebCore::FetchBody::consume): Refactoring and added case of Loaded bodies.
3453 (WebCore::FetchBody::consumeAsStream): Ditto.
3454 (WebCore::FetchBody::consumeArrayBuffer):
3455 (WebCore::FetchBody::consumeText):
3456 (WebCore::FetchBody::consumeBlob):
3457 (WebCore::FetchBody::loadingFailed):
3458 (WebCore::FetchBody::loadingSucceeded):
3459 (WebCore::FetchBody::loadingType): Deleted.
3460 (WebCore::blobFromArrayBuffer): Deleted.
3461 (WebCore::FetchBody::fulfillTextPromise): Deleted.
3462 (WebCore::FetchBody::loadedAsArrayBuffer): Deleted.
3463 (WebCore::FetchBody::loadedAsText): Deleted.
3464 * Modules/fetch/FetchBody.h:
3465 (WebCore::FetchBody::consumer):
3466 * Modules/fetch/FetchBodyConsumer.cpp: Added, responsible of data adaptation.
3467 (WebCore::blobFromData):
3468 (WebCore::FetchBodyConsumer::resolveWithData):
3469 (WebCore::FetchBodyConsumer::resolve):
3470 (WebCore::FetchBodyConsumer::append):
3471 (WebCore::FetchBodyConsumer::takeData):
3472 (WebCore::FetchBodyConsumer::takeAsArrayBuffer):
3473 (WebCore::FetchBodyConsumer::takeAsBlob):
3474 (WebCore::FetchBodyConsumer::takeAsText):
3475 * Modules/fetch/FetchBodyConsumer.h: Added.
3476 (WebCore::FetchBodyConsumer::FetchBodyConsumer):
3477 (WebCore::FetchBodyConsumer::setContentType):
3478 (WebCore::FetchBodyConsumer::setType):
3479 (WebCore::FetchBodyConsumer::type):
3480 (WebCore::FetchBodyConsumer::clean):
3481 (WebCore::FetchBodyConsumer::hasData):
3482 * Modules/fetch/FetchBodyOwner.cpp:
3483 (WebCore::FetchBodyOwner::loadBlob):
3484 (WebCore::FetchBodyOwner::blobLoadingSucceeded):
3485 (WebCore::FetchBodyOwner::loadedBlobAsText): Deleted.
3486 * Modules/fetch/FetchBodyOwner.h:
3487 (WebCore::FetchBodyOwner::loadedBlobAsArrayBuffer): Deleted.
3488 * Modules/fetch/FetchInternals.js:
3489 (consumeStream): Pump ReadableStream data and send it to FetchResponse to be converted according user need.
3490 * Modules/fetch/FetchLoader.cpp:
3491 (WebCore::FetchLoader::FetchLoader): FetchLoader is simplified as it has two nodes: consumer mode in which case
3492 data is sent to the consumer and no-consumer mode in which case data is passed to loader client. The second mode
3493 is used to conveyy data to ReadableStream source.
3494 (WebCore::FetchLoader::stop):
3495 (WebCore::FetchLoader::startStreaming):
3496 (WebCore::FetchLoader::didReceiveData):
3497 (WebCore::FetchLoader::didFinishLoading): Deleted.
3498 * Modules/fetch/FetchLoader.h:
3499 * Modules/fetch/FetchLoaderClient.h:
3500 (WebCore::FetchLoaderClient::didFinishLoadingAsText): Deleted.
3501 (WebCore::FetchLoaderClient::didFinishLoadingAsArrayBuffer): Deleted.
3502 * Modules/fetch/FetchResponse.cpp:
3503 (WebCore::FetchResponse::cloneForJS):
3504 (WebCore::FetchResponse::BodyLoader::didSucceed):
3505 (WebCore::FetchResponse::BodyLoader::start):
3506 (WebCore::FetchResponse::consume): Introduced to consume data stored in body and not in ReadableStream.
3507 (WebCore::FetchResponse::startConsumingStream): Introduced to start process of consuming data stored in the ReadableStream.
3508 (WebCore::FetchResponse::consumeChunk): Reception of ReadableStream data.
3509 (WebCore::FetchResponse::finishConsumingStream): Doing the final conversion.
3510 (WebCore::FetchResponse::clone): Deleted.
3511 (WebCore::FetchResponse::BodyLoader::didFinishLoadingAsArrayBuffer): Deleted.
3512 * Modules/fetch/FetchResponse.h:
3513 * Modules/fetch/FetchResponse.idl: Inlining of FetchBody methods/attributes and adding private methods.
3514 * Modules/fetch/FetchResponse.js:
3515 (initializeFetchResponse):
3522 * WebCore.xcodeproj/project.pbxproj:
3523 * bindings/js/JSDOMPromise.h:
3524 (WebCore::DeferredWrapper::resolveWithNewValue):
3525 * bindings/js/WebCoreBuiltinNames.h:
3527 2016-07-26 Youenn Fablet <youennf@gmail.com>
3529 JS Built-ins should throw this-error messages consistently with binding generated code
3530 https://bugs.webkit.org/show_bug.cgi?id=160191
3532 Reviewed by Darin Adler.
3534 Introducing @makeThisTypeError and @makeGetterTypeError to create TypeError objects with a consistent error message.
3535 Making use of these functions in streams API and fetch API related built-in code.
3537 Refactored JSDOMBinding.cpp code by adding makeThisTypeErrorMessage and makeGetterTypeErrorMessage helper routines
3538 These routines are used by both new built-in functions as well as binding generated code helper routine.
3540 Tests: fetch/fetch-error-messages.html
3541 streams/readable-stream-error-messages.html
3543 * Modules/fetch/FetchResponse.js:
3544 (body): Adding an explicit check so that the error message is right. The previous error message was related to the call of Response.@isDisturbed.
3545 * Modules/streams/ReadableStream.js:
3551 * Modules/streams/ReadableStreamController.js:
3556 * Modules/streams/ReadableStreamReader.js:
3561 * bindings/js/JSDOMBinding.cpp:
3562 (WebCore::makeGetterTypeErrorMessage):
3563 (WebCore::throwGetterTypeError):
3564 (WebCore::makeThisTypeErrorMessage):
3565 (WebCore::throwThisTypeError):
3566 (WebCore::throwSequenceTypeError): Deleted.
3567 (WebCore::throwSetterTypeError): Deleted.
3568 * bindings/js/JSDOMBinding.h:
3569 * bindings/js/JSDOMGlobalObject.cpp:
3570 (WebCore::makeThisTypeErrorForBuiltins):
3571 (WebCore::makeGetterTypeErrorForBuiltins):
3572 (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
3573 * bindings/js/WebCoreBuiltinNames.h:
3575 2016-07-26 Carlos Garcia Campos <cgarcia@igalia.com>
3577 Unreviewed. Fix GTK+ distcheck build.
3579 wtf/spi/darwin/dyldSPI.h is not included in GTK+ release tarballs.
3581 * html/HTMLObjectElement.cpp: Include wtf/spi/darwin/dyldSPI.h only for iOS.
3582 * html/MediaElementSession.cpp: Ditto.
3584 2016-07-26 Myles C. Maxfield <mmaxfield@apple.com>
3586 [iOS] SF-Heavy is inaccessible by web content
3587 https://bugs.webkit.org/show_bug.cgi?id=160186
3588 <rdar://problem/27434423>
3590 Reviewed by Dean Jackson.
3592 Once we create the system font, we need to modify it with the appropriate weight.
3593 This is because the CoreText API we use to get the system font on iOS does not
3594 let us choose the exact weight we want.
3596 Test: fast/text/system-font-weight.html
3598 * platform/graphics/ios/FontCacheIOS.mm:
3599 (WebCore::baseSystemFontDescriptor):
3600 (WebCore::systemFontModificationAttributes):
3601 (WebCore::systemFontDescriptor):
3602 (WebCore::platformFontWithFamilySpecialCase):
3603 * platform/spi/cocoa/CoreTextSPI.h:
3605 2016-07-26 Fujii Hironori <Hironori.Fujii@sony.com>
3607 [GTK] ASSERTION FAILED: !m_adoptionIsRequired when Inspector Server is connected
3608 https://bugs.webkit.org/show_bug.cgi?id=160229
3610 Reviewed by Carlos Garcia Campos.
3612 An assertion fails because refcount of SocketStreamHandle is
3613 incremented before adoptRef, in the constructor of
3614 SocketStreamHandle. The constructor of SocketStreamHandle needs
3615 to increment recount because it passes this pointer to libsoup.
3617 * platform/network/soup/SocketStreamHandleSoup.cpp:
3618 (WebCore::SocketStreamHandle::SocketStreamHandle): Do
3619 relaxAdoptionRequirement() as well as the another constructor.
3621 2016-07-26 Chris Dumez <cdumez@apple.com>
3623 Move 'dir' attribute from HTMLDocument to Document
3624 https://bugs.webkit.org/show_bug.cgi?id=160231
3626 Reviewed by Sam Weinig.
3628 Move 'dir' attribute from HTMLDocument to Document to match the
3630 - https://html.spec.whatwg.org/multipage/dom.html#document
3632 Both Firefox and Chrome have 'dir' on Document already.
3634 No new tests, rebaselined existing test.
3637 (WebCore::Document::dir):
3638 (WebCore::Document::setDir):
3641 * html/HTMLDocument.cpp:
3642 (WebCore::HTMLDocument::dir): Deleted.
3643 (WebCore::HTMLDocument::setDir): Deleted.
3644 * html/HTMLDocument.h:
3645 * html/HTMLDocument.idl:
3647 2016-07-26 Chris Dumez <cdumez@apple.com>
3649 Second parameter to History.pushState() / replaceState() should be mandatory
3650 https://bugs.webkit.org/show_bug.cgi?id=160230
3652 Reviewed by Sam Weinig.
3654 Second parameter to History.pushState() / replaceState() should be mandatory:
3655 - https://html.spec.whatwg.org/multipage/browsers.html#history-3
3657 Firefox and Chrome agree with the specification.
3659 No new tests, rebaselined existing test.
3661 * bindings/js/JSHistoryCustom.cpp:
3662 (WebCore::JSHistory::pushState):
3663 (WebCore::JSHistory::replaceState):
3666 2016-07-26 Chris Dumez <cdumez@apple.com>
3668 Align Node.isEqualNode() with the specification
3669 https://bugs.webkit.org/show_bug.cgi?id=160224
3671 Reviewed by Sam Weinig.
3673 Align our implementation for Node.isEqualNode() to match more closely
3674 the text of the specification:
3675 - https://dom.spec.whatwg.org/#dom-node-isequalnode
3676 - https://dom.spec.whatwg.org/#concept-node-equals
3678 This also fixes a bug where isEqualNode() would sometimes return false
3679 wrongly for elements because we were comparing the value returned by
3680 nodeName() which returns the tagName of elements. The issue was that
3681 the tagName's case may differ depending on the element being in an
3682 HTMLDocument or not. We now compare Element::tagQName() instead which
3683 ends up comparing namespace / namespace prefix and localName, as per
3684 the specification. The new behavior matches Firefox and Chrome and
3685 helps us pass an extra W3C test.
3687 No new tests, rebaselined existing test.
3690 (WebCore::Node::isEqualNode):
3692 2016-07-26 Simon Fraser <simon.fraser@apple.com>
3694 Sort the project files.
3696 * WebCore.xcodeproj/project.pbxproj:
3698 2016-07-26 Chris Dumez <cdumez@apple.com>
3700 Align CSSKeyframesRule with the specification
3701 https://bugs.webkit.org/show_bug.cgi?id=160219
3703 Reviewed by Darin Adler.
3705 Align CSSKeyframesRule with the specification:
3706 - https://drafts.csswg.org/css-animations/#interface-csskeyframesrule
3708 In particular, the parameter to insertRule() / appendRule() /
3709 deleteRule() / findRule() should be mandatory. Both Firefox and Chrome
3710 agree with the specification here.
3712 Also, the CSSKeyframesRule.name attribute should not be nullable.
3713 Chrome agrees with the specification. However, Firefox, has the
3714 attribute nullable. This patch aligns our behavior with Chrome and
3717 Tests: animations/CSSKeyframesRule-name-null.html
3718 animations/CSSKeyframesRule-parameters.html
3720 * css/CSSKeyframesRule.h:
3721 (WebCore::StyleRuleKeyframes::name):
3722 (WebCore::StyleRuleKeyframes::setName):
3723 * css/CSSKeyframesRule.idl:
3725 2016-07-26 Myles C. Maxfield <mmaxfield@apple.com>
3727 [iPhone] Playing a video on tudou.com plays only sound, no video
3728 https://bugs.webkit.org/show_bug.cgi?id=160178
3729 <rdar://problem/27535468>
3731 Reviewed by Eric Carlson and Dan Bernstein.
3733 This patch re-implements r203520 in a much simpler way which doesn't involve a new SPI.
3734 The biggest problem with r203520 is that it make it impossible for a WKWebView to match
3735 MobileSafari's behavior. Instead of adding this new SPI, a simple version check should
3736 be used to keep old apps working.
3738 The new behavior is characterized by the following table:
3741 =============================================================================================
3742 requiresPlayInlineAttribute == true | Old app: honor -webkit-playsinline | honor playsinline
3743 | New app: honor playsinline | honor playsinline
3744 ---------------------------------------------------------------------------------------------
3745 requiresPlayInlineAttribute == false | Always inline | Always inline
3747 Specifically, this patch reverts r203545 which is the commit which actually removes
3748 the old SPI. As soon as Safari is migrated back to this old SPI, I'll remove the two
3749 new SPIs added in r203520.
3751 Tests: media/video-playsinline.html
3752 media/video-webkit-playsinline.html
3754 * html/MediaElementSession.cpp:
3755 (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
3756 * page/Settings.cpp:
3758 * testing/InternalSettings.cpp:
3759 (WebCore::InternalSettings::Backup::Backup):
3760 (WebCore::InternalSettings::Backup::restoreTo):
3761 (WebCore::InternalSettings::setInlineMediaPlaybackRequiresPlaysInlineAttribute):
3762 * testing/InternalSettings.h:
3763 * testing/InternalSettings.idl:
3765 2016-07-26 Zalan Bujtas <zalan@apple.com>
3767 Move RenderView::shouldDisableLayoutStateForSubtree to SubtreeLayoutStateMaintainer.
3768 https://bugs.webkit.org/show_bug.cgi?id=160215
3770 Reviewed by Darin Adler and Simon Fraser.
3772 No change in functionality.
3774 * page/FrameView.cpp:
3775 (WebCore::SubtreeLayoutStateMaintainer::SubtreeLayoutStateMaintainer):
3776 * rendering/RenderView.cpp:
3777 (WebCore::RenderView::shouldDisableLayoutStateForSubtree):
3778 * rendering/RenderView.h:
3780 2016-07-26 Simon Fraser <simon.fraser@apple.com>
3782 Allow LOG macros to be used outside the namespace, and other logging cleanup
3783 https://bugs.webkit.org/show_bug.cgi?id=160216
3785 Reviewed by Anders Carlsson.
3787 Fix some issues with the LOG macros.
3789 First, they were not usable outside the WebKit namespace in WebKit2 code. Fix by moving
3790 its log channels outside of the namespace (they are protected by a unique prefix anyway).
3792 Second, allow LOG_WITH_STREAM to be used in WebKit2 by moving that and a helper macro
3793 into LogMacros.h, which is exported from WebCore as a private header.
3795 Third, split the Logging.h header into two. Logging.h remains for framework-internal
3796 log channels and log macros. Add LogInitialization.h which is external, and used to
3797 initialize the channels.
3799 Finally unify "initializeLogChannels" and "initializeLoggingChannels" terminology everywhere.
3801 * WebCore.xcodeproj/project.pbxproj:
3802 * platform/LogInitialization.h: Added.
3803 * platform/LogMacros.h: Added.
3804 * platform/Logging.cpp:
3805 (WebCore::initializeLogChannelsIfNecessary):
3806 (WebCore::initializeLoggingChannelsIfNecessary): Deleted.
3807 * platform/Logging.h:
3808 * testing/js/WebCoreTestSupport.cpp:
3809 (WebCoreTestSupport::initializeLogChannelsIfNecessary):
3810 (WebCoreTestSupport::initializeLoggingChannelsIfNecessary): Deleted.
3811 * testing/js/WebCoreTestSupport.h:
3813 2016-07-26 Anders Carlsson <andersca@apple.com>
3815 onpaymentauthorized callback not received when authorizing for a second time
3816 https://bugs.webkit.org/show_bug.cgi?id=160218
3817 rdar://problem/27527151
3819 Reviewed by Tim Horton.
3821 Only null out the active session if the status is a final state status.
3823 * Modules/applepay/PaymentCoordinator.cpp:
3824 (WebCore::PaymentCoordinator::completePaymentSession):
3826 2016-07-26 Chris Dumez <cdumez@apple.com>
3828 Range.prototype.compareBoundaryPoints.length should be 2
3829 https://bugs.webkit.org/show_bug.cgi?id=160217
3831 Reviewed by Sam Weinig.
3833 Range.prototype.compareBoundaryPoints.length:
3834 - https://dom.spec.whatwg.org/#interface-range
3836 We had a bug in our IDL which caused length to be 0 even though
3837 both parameters were effectively mandatory.
3839 No new tests, rebaselined existing test.
3843 2016-07-26 Chris Dumez <cdumez@apple.com>
3845 Align CSSStyleDeclaration with the specification
3846 https://bugs.webkit.org/show_bug.cgi?id=160214
3848 Reviewed by Darin Adler.
3850 Align CSSStyleDeclaration with the specification:
3851 - https://drafts.csswg.org/cssom/#the-cssstyledeclaration-interface
3853 In particular, the parameters to removeProperty() / item() and
3854 getPropertyPriority() should be mandatory.
3856 Firefox and Chrome match the specification.
3858 Tests: fast/css/CSSStyleDeclaration-cssText-null.html
3859 fast/css/CSSStyleDeclaration-parameters.html
3861 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3862 (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
3863 * css/CSSStyleDeclaration.idl:
3865 2016-07-26 David Kilzer <ddkilzer@apple.com>
3867 Networking process crash due to missing -[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:] implementation
3868 https://bugs.webkit.org/show_bug.cgi?id=156947
3869 <rdar://problem/23325160>
3871 Reviewed by Alex Christensen.
3873 Test: http/tests/xmlhttprequest/auth-reject-protection-space.html
3875 * platform/network/mac/AuthenticationMac.mm:
3876 (-[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:]): Added.
3877 (-[WebCoreAuthenticationClientAsChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]): Added.
3879 2016-07-26 Chris Dumez <cdumez@apple.com>
3881 Parameters to CSSStyleSheet.insertRule() / deleteRule() should be mandatory
3882 https://bugs.webkit.org/show_bug.cgi?id=160210
3884 Reviewed by Darin Adler.
3886 Parameters to CSSStyleSheet.insertRule() / deleteRule() should be mandatory:
3887 - https://drafts.csswg.org/cssom/#cssstylesheet
3889 They are mandatory in Firefox.
3890 They are mandatory in Chrome except for the second parameter of insertRule()
3891 which merely logs a deprecation warning.
3893 This patch aligns our behavior with Chrome to move towards to specification
3894 while limiting the risk of breakage.
3896 Test: fast/css/stylesheet-parameters.html
3898 * css/CSSStyleSheet.cpp:
3899 (WebCore::CSSStyleSheet::deprecatedInsertRule):
3900 * css/CSSStyleSheet.h:
3901 * css/CSSStyleSheet.idl:
3903 2016-07-26 George Ruan <gruan@apple.com>
3905 HTMLVideoElement frames do not update on iOS when src is a MediaStream blob
3906 https://bugs.webkit.org/show_bug.cgi?id=159833
3907 <rdar://problem/27379487>
3909 Reviewed by Eric Carlson.
3911 Test: fast/mediastream/MediaStream-video-element-displays-buffer.html
3913 * WebCore.xcodeproj/project.pbxproj:
3914 * platform/cf/CoreMediaSoftLink.cpp: Add CMSampleBufferCreateReadyWithImageBuffer and CMVideoFormatDescriptionCreateForImageBuffer
3916 * platform/cf/CoreMediaSoftLink.h: Ditto.
3917 * platform/cocoa/CoreVideoSoftLink.cpp: Add CVPixelBufferCreate, kCVPixelBufferCGBitmapContextCompatibilityKey, and
3918 kCVPixelBufferCGImageCompatibilityKey.
3919 * platform/cocoa/CoreVideoSoftLink.h: Ditto.
3920 * platform/graphics/avfoundation/MediaSampleAVFObjC.h: Change create to return a Ref<T> instead
3922 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: Make observer of
3923 MediaStreamTrackPrivate and make MediaPlayer use an AVSampleBufferDisplayLayer instead of CALayer.
3924 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: Ditto.
3925 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC): Clean up
3926 observers and AVSampleBufferDisplayLayer.
3927 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable): Ensures AVSampleBufferDisplayLayer
3929 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueAudioSampleBufferFromTrack): Placeholder.
3930 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSampleBufferFromTrack): Responsible
3931 for enqueuing sample buffers to the active video track.
3932 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer): Ensures that an AVSampleBufferDisplayLayer
3934 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayer): Destroys the AVSampleBufferDisplayLayer.
3935 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer): Replace CALayer with AVSampleBufferDisplayLayer.
3936 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode): Ditto.
3937 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Call updateReadyState as a deferred task.
3938 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): readyState is bumped to HAVE_ENOUGH_DATA
3939 only when the MediaPlayerPrivateMediaStreamAVFObjC has received a media sample.
3940 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferUpdated): Called from MediaStreamTrackPrivate when a
3941 new SampleBuffer is available.
3942 (WebCore::updateTracksOfType): Manage adding and removing self as observer from tracks.
3943 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks): Replace CALayer with AVSampleBufferDisplayLayer
3944 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::acceleratedRenderingStateChanged): Copied from
3945 MediaPlayerPrivateMediaSourceAVFObjC.mm
3946 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Deleted CALayer.
3947 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode): Deleted process of updating CALayer.
3948 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateIntrinsicSize): Deleted CALayer.
3949 (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers): Deleted.
3950 * platform/mediastream/MediaStreamPrivate.cpp:
3951 (WebCore::MediaStreamPrivate::updateActiveVideoTrack): Remove redundant check.
3952 * platform/mediastream/MediaStreamTrackPrivate.cpp:
3953 (WebCore::MediaStreamTrackPrivate::sourceHasMoreMediaData): Called from RealtimeMediaSource when a new SampleBuffer
3955 * platform/mediastream/MediaStreamTrackPrivate.h:
3956 (WebCore::MediaStreamTrackPrivate::Observer::sampleBufferUpdated): Relays to MediaPlayerPrivateMediaStreamAVFObjC that
3957 a new SampleBuffer is available to enqueue to the AVSampleBufferDisplayLayer.
3958 * platform/mediastream/RealtimeMediaSource.cpp:
3959 (WebCore::RealtimeMediaSource::settingsDidChange): Fix grammatical mistake in function name settingsDidChanged().
3960 (WebCore::RealtimeMediaSource::mediaDataUpdated): Relays to all observers that a new SampleBuffer is available.
3961 (WebCore::RealtimeMediaSource::settingsDidChanged): Deleted.
3962 * platform/mediastream/RealtimeMediaSource.h:
3963 * platform/mediastream/mac/AVVideoCaptureSource.mm:
3964 (WebCore::AVVideoCaptureSource::processNewFrame): Calls mediaDataUpdated when a new SampleBuffer is captured.
3965 * platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
3966 * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
3967 (WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer): Convert CVPixelBuffer to CMSampleBuffer.
3968 (WebCore::MockRealtimeVideoSourceMac::pixelBufferFromCGImage): Convert CGImage to CVPixelBuffer.
3969 (WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer): Creates a CMSampleBuffer from current imageBuffer and
3970 sends the CMSampleBuffer to MediaPlayerPrivateMediaStreamAVFObjC
3971 * platform/mock/MockRealtimeVideoSource.cpp:
3972 (WebCore::MockRealtimeVideoSource::setFrameRate): Fix grammar of settingsDidChanged() to settingsDidChange().
3973 (WebCore::MockRealtimeVideoSource::setSize): Ditto.
3974 (WebCore::MockRealtimeVideoSource::generateFrame): Call updateSampleBuffer().
3975 * platform/mock/MockRealtimeVideoSource.h: Change elapsedTime() from private to protected.
3976 (WebCore::MockRealtimeVideoSource::updateSampleBuffer): Overriden by MockRealtimeVideoSourceMac.
3978 2016-07-26 Zalan Bujtas <zalan@apple.com>
3980 Move ControlStates HashMap to RenderBox.
3981 https://bugs.webkit.org/show_bug.cgi?id=160206
3983 Reviewed by Simon Fraser.
3985 Move and modernize it.