[css-grid] Handle alignment with orthogonal flows
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-07-27  Javier Fernandez  <jfernandez@igalia.com>
2
3         [css-grid] Handle alignment with orthogonal flows
4         https://bugs.webkit.org/show_bug.cgi?id=159295
5
6         Reviewed by Darin Adler.
7
8         Now that grid sizing and positioning issues wrt orthogonal flows have
9         been clarified in the last spec draft, we can adapt now our alignment
10         logic to work with orthogonal flows.
11
12         Even though basic alignment would work with orthogonal flows with
13         this patch, we still doesn't allow stretching in that case. I'll provide a
14         patch for that feature since it's a complex logic and better have an
15         isolated change.
16
17         Tests: fast/css-grid-layout/grid-item-alignment-with-orthogonal-flows-vertical-lr.html
18                fast/css-grid-layout/grid-item-alignment-with-orthogonal-flows-vertical-rl.html
19                fast/css-grid-layout/grid-item-alignment-with-orthogonal-flows.html
20
21         * rendering/RenderGrid.cpp:
22         (WebCore::computeOverflowAlignmentOffset): Using 'size' instead of 'breadth' as concept.
23         (WebCore::RenderGrid::columnAxisPositionForChild): Dealing with orthogonal flow cases.
24         (WebCore::RenderGrid::rowAxisPositionForChild): Dealing with orthogonal flow cases.
25         (WebCore::RenderGrid::columnAxisOffsetForChild): Using 'size' instead of 'breadth' as concept.
26         (WebCore::RenderGrid::rowAxisOffsetForChild): Using 'size' instead of 'breadth' as concept.
27         (WebCore::RenderGrid::findChildLogicalPosition): Dealing with orthogonal flow cases.
28
29 2016-07-26  Youenn Fablet  <youenn@apple.com>
30
31         [Fetch API] Response constructor should be able to take a ReadableStream as body
32         https://bugs.webkit.org/show_bug.cgi?id=159804
33
34         Reviewed by Alex Christensen.
35
36         Covered by existing and updated tests.
37
38         Introduced FetchBodyConsumer to encapsulate the code responsible to adapt FetchBody internal data to the requests made by user scripts.
39         This refactoring eases the handling of internal data coming from ReadableStream.
40
41         FetchLoader is now delegating conversion from the data to its m_consumer field.
42         If m_consumer is null, FetchLoader calls FetchLoaderClient::didReceiveData (streaming reception mode).
43         Clients of FetchLoader needs to pass a FetchBodyConsumer to the FetchLoader to do the data adaptation at loader creation time.
44
45         Added support for body data passed as a ReadableStream to Response.
46         This requires to set @body internal slot of the Response object in the constructor initialization JS built-in.
47
48         To actually use that data, Body accessors are also implemented as JS built-in for Response.
49         Since there is no need to do so for Request, FetchResponse is no longer marked as implementing FetchBody but all
50         FetchBody IDL description is inlined in FetchResponse.idl.
51
52         For each body accessor (arrayBuffer, blob, json, text), the corresponding JS built-in checks whether @body internal slot is set.
53         If that is not the case, regular handling is done through a new private method called @consume.
54         If @body internal slot is set, chunks are pumped from the ReadableStream using ReadableStream internal built-ins functions.
55         Data handling is done in C++ through the private methods @startConsumingStream, @consumeChunk and @finishConsumingStream.
56
57         To support cloning of Response with bodies, clone method is also implemented as a JS built-in.
58         Main clone is done through @cloneFoJS private method implemented in C++.
59         JS built-in clone code does the teeing of the ReadableStream using ReadableStream JS built-in internal functions.
60
61         Introducing a new ReadableStream type for FetchBody to cope with body being stored in a ReadableStream.
62
63         Introducing a new Loaded type for FetchBody to cope with body being stored in the FetchBodyConsumer owned by FetchBody.
64         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.
65         At the end of a load, the data remains in FetchBodyConsumer and the body is marked as Loaded.
66         If the user wants to get the data after data finished being loaded, FetchBodyConsumer will do the required conversions.
67
68         Introducing DeferredWrapper::resolveWithNewValue to handle the case of resolving promises with new objects.
69         This allows directly using toJSNewlyCreated instead of toJS.
70
71         * CMakeLists.txt: Adding FetchBodyConsumer.cpp. Removing WebCoreJSBuiltins.cpp from CMake list as it is not needed.
72         * Modules/fetch/FetchBody.cpp: Moving data adaptation code to FetchBodyConsumer.
73         (WebCore::FetchBody::extract):
74         (WebCore::FetchBody::arrayBuffer):
75         (WebCore::FetchBody::blob): Setting contentType in FetchBodyConsumer to handle proper creation of blob.
76         (WebCore::FetchBody::json):
77         (WebCore::FetchBody::text):
78         (WebCore::FetchBody::consume): Refactoring and added case of Loaded bodies.
79         (WebCore::FetchBody::consumeAsStream): Ditto.
80         (WebCore::FetchBody::consumeArrayBuffer):
81         (WebCore::FetchBody::consumeText):
82         (WebCore::FetchBody::consumeBlob):
83         (WebCore::FetchBody::loadingFailed):
84         (WebCore::FetchBody::loadingSucceeded):
85         (WebCore::FetchBody::loadingType): Deleted.
86         (WebCore::blobFromArrayBuffer): Deleted.
87         (WebCore::FetchBody::fulfillTextPromise): Deleted.
88         (WebCore::FetchBody::loadedAsArrayBuffer): Deleted.
89         (WebCore::FetchBody::loadedAsText): Deleted.
90         * Modules/fetch/FetchBody.h:
91         (WebCore::FetchBody::consumer):
92         * Modules/fetch/FetchBodyConsumer.cpp: Added, responsible of data adaptation.
93         (WebCore::blobFromData):
94         (WebCore::FetchBodyConsumer::resolveWithData):
95         (WebCore::FetchBodyConsumer::resolve):
96         (WebCore::FetchBodyConsumer::append):
97         (WebCore::FetchBodyConsumer::takeData):
98         (WebCore::FetchBodyConsumer::takeAsArrayBuffer):
99         (WebCore::FetchBodyConsumer::takeAsBlob):
100         (WebCore::FetchBodyConsumer::takeAsText):
101         * Modules/fetch/FetchBodyConsumer.h: Added.
102         (WebCore::FetchBodyConsumer::FetchBodyConsumer):
103         (WebCore::FetchBodyConsumer::setContentType):
104         (WebCore::FetchBodyConsumer::setType):
105         (WebCore::FetchBodyConsumer::type):
106         (WebCore::FetchBodyConsumer::clean):
107         (WebCore::FetchBodyConsumer::hasData):
108         * Modules/fetch/FetchBodyOwner.cpp:
109         (WebCore::FetchBodyOwner::loadBlob):
110         (WebCore::FetchBodyOwner::blobLoadingSucceeded):
111         (WebCore::FetchBodyOwner::loadedBlobAsText): Deleted.
112         * Modules/fetch/FetchBodyOwner.h:
113         (WebCore::FetchBodyOwner::loadedBlobAsArrayBuffer): Deleted.
114         * Modules/fetch/FetchInternals.js:
115         (consumeStream): Pump ReadableStream data and send it to FetchResponse to be converted according user need.
116         * Modules/fetch/FetchLoader.cpp:
117         (WebCore::FetchLoader::FetchLoader): FetchLoader is simplified as it has two nodes: consumer mode in which case
118         data is sent to the consumer and no-consumer mode in which case data is passed to loader client. The second mode
119         is used to conveyy data to ReadableStream source.
120         (WebCore::FetchLoader::stop):
121         (WebCore::FetchLoader::startStreaming):
122         (WebCore::FetchLoader::didReceiveData):
123         (WebCore::FetchLoader::didFinishLoading): Deleted.
124         * Modules/fetch/FetchLoader.h:
125         * Modules/fetch/FetchLoaderClient.h:
126         (WebCore::FetchLoaderClient::didFinishLoadingAsText): Deleted.
127         (WebCore::FetchLoaderClient::didFinishLoadingAsArrayBuffer): Deleted.
128         * Modules/fetch/FetchResponse.cpp:
129         (WebCore::FetchResponse::cloneForJS):
130         (WebCore::FetchResponse::BodyLoader::didSucceed):
131         (WebCore::FetchResponse::BodyLoader::start):
132         (WebCore::FetchResponse::consume): Introduced to consume data stored in body and not in ReadableStream.
133         (WebCore::FetchResponse::startConsumingStream): Introduced to start process of consuming data stored in the ReadableStream.
134         (WebCore::FetchResponse::consumeChunk): Reception of ReadableStream data.
135         (WebCore::FetchResponse::finishConsumingStream): Doing the final conversion.
136         (WebCore::FetchResponse::clone): Deleted.
137         (WebCore::FetchResponse::BodyLoader::didFinishLoadingAsArrayBuffer): Deleted.
138         * Modules/fetch/FetchResponse.h:
139         * Modules/fetch/FetchResponse.idl: Inlining of FetchBody methods/attributes and adding private methods.
140         * Modules/fetch/FetchResponse.js:
141         (initializeFetchResponse):
142         (clone):
143         (arrayBuffer):
144         (blob):
145         (formData):
146         (json):
147         (text):
148         * WebCore.xcodeproj/project.pbxproj:
149         * bindings/js/JSDOMPromise.h:
150         (WebCore::DeferredWrapper::resolveWithNewValue):
151         * bindings/js/WebCoreBuiltinNames.h:
152
153 2016-07-26  Youenn Fablet  <youennf@gmail.com>
154
155         JS Built-ins should throw this-error messages consistently with binding generated code
156         https://bugs.webkit.org/show_bug.cgi?id=160191
157
158         Reviewed by Darin Adler.
159
160         Introducing @makeThisTypeError and @makeGetterTypeError to create TypeError objects with a consistent error message.
161         Making use of these functions in streams API and fetch API related built-in code.
162
163         Refactored JSDOMBinding.cpp code by adding makeThisTypeErrorMessage and makeGetterTypeErrorMessage helper routines
164         These routines are used by both new built-in functions as well as binding generated code helper routine.
165
166         Tests: fetch/fetch-error-messages.html
167                streams/readable-stream-error-messages.html
168
169         * Modules/fetch/FetchResponse.js:
170         (body): Adding an explicit check so that the error message is right. The previous error message was related to the call of Response.@isDisturbed.
171         * Modules/streams/ReadableStream.js:
172         (cancel):
173         (getReader):
174         (pipeTo):
175         (tee):
176         (locked):
177         * Modules/streams/ReadableStreamController.js:
178         (enqueue):
179         (error):
180         (close):
181         (desiredSize):
182         * Modules/streams/ReadableStreamReader.js:
183         (cancel):
184         (read):
185         (releaseLock):
186         (closed):
187         * bindings/js/JSDOMBinding.cpp:
188         (WebCore::makeGetterTypeErrorMessage):
189         (WebCore::throwGetterTypeError):
190         (WebCore::makeThisTypeErrorMessage):
191         (WebCore::throwThisTypeError):
192         (WebCore::throwSequenceTypeError): Deleted.
193         (WebCore::throwSetterTypeError): Deleted.
194         * bindings/js/JSDOMBinding.h:
195         * bindings/js/JSDOMGlobalObject.cpp:
196         (WebCore::makeThisTypeErrorForBuiltins):
197         (WebCore::makeGetterTypeErrorForBuiltins):
198         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
199         * bindings/js/WebCoreBuiltinNames.h:
200
201 2016-07-26  Carlos Garcia Campos  <cgarcia@igalia.com>
202
203         Unreviewed. Fix GTK+ distcheck build.
204
205         wtf/spi/darwin/dyldSPI.h is not included in GTK+ release tarballs.
206
207         * html/HTMLObjectElement.cpp: Include wtf/spi/darwin/dyldSPI.h only for iOS.
208         * html/MediaElementSession.cpp: Ditto.
209
210 2016-07-26  Myles C. Maxfield  <mmaxfield@apple.com>
211
212         [iOS] SF-Heavy is inaccessible by web content
213         https://bugs.webkit.org/show_bug.cgi?id=160186
214         <rdar://problem/27434423>
215
216         Reviewed by Dean Jackson.
217
218         Once we create the system font, we need to modify it with the appropriate weight.
219         This is because the CoreText API we use to get the system font on iOS does not
220         let us choose the exact weight we want.
221
222         Test: fast/text/system-font-weight.html
223
224         * platform/graphics/ios/FontCacheIOS.mm:
225         (WebCore::baseSystemFontDescriptor):
226         (WebCore::systemFontModificationAttributes):
227         (WebCore::systemFontDescriptor):
228         (WebCore::platformFontWithFamilySpecialCase):
229         * platform/spi/cocoa/CoreTextSPI.h:
230
231 2016-07-26  Fujii Hironori  <Hironori.Fujii@sony.com>
232
233         [GTK] ASSERTION FAILED: !m_adoptionIsRequired when Inspector Server is connected
234         https://bugs.webkit.org/show_bug.cgi?id=160229
235
236         Reviewed by Carlos Garcia Campos.
237
238         An assertion fails because refcount of SocketStreamHandle is
239         incremented before adoptRef, in the constructor of
240         SocketStreamHandle.  The constructor of SocketStreamHandle needs
241         to increment recount because it passes this pointer to libsoup.
242
243         * platform/network/soup/SocketStreamHandleSoup.cpp:
244         (WebCore::SocketStreamHandle::SocketStreamHandle): Do
245         relaxAdoptionRequirement() as well as the another constructor.
246
247 2016-07-26  Chris Dumez  <cdumez@apple.com>
248
249         Move 'dir' attribute from HTMLDocument to Document
250         https://bugs.webkit.org/show_bug.cgi?id=160231
251
252         Reviewed by Sam Weinig.
253
254         Move 'dir' attribute from HTMLDocument to Document to match the
255         specification:
256         - https://html.spec.whatwg.org/multipage/dom.html#document
257
258         Both Firefox and Chrome have 'dir' on Document already.
259
260         No new tests, rebaselined existing test.
261
262         * dom/Document.cpp:
263         (WebCore::Document::dir):
264         (WebCore::Document::setDir):
265         * dom/Document.h:
266         * dom/Document.idl:
267         * html/HTMLDocument.cpp:
268         (WebCore::HTMLDocument::dir): Deleted.
269         (WebCore::HTMLDocument::setDir): Deleted.
270         * html/HTMLDocument.h:
271         * html/HTMLDocument.idl:
272
273 2016-07-26  Chris Dumez  <cdumez@apple.com>
274
275         Second parameter to History.pushState() / replaceState() should be mandatory
276         https://bugs.webkit.org/show_bug.cgi?id=160230
277
278         Reviewed by Sam Weinig.
279
280         Second parameter to History.pushState() / replaceState() should be mandatory:
281         - https://html.spec.whatwg.org/multipage/browsers.html#history-3
282
283         Firefox and Chrome agree with the specification.
284
285         No new tests, rebaselined existing test.
286
287         * bindings/js/JSHistoryCustom.cpp:
288         (WebCore::JSHistory::pushState):
289         (WebCore::JSHistory::replaceState):
290         * page/History.idl:
291
292 2016-07-26  Chris Dumez  <cdumez@apple.com>
293
294         Align Node.isEqualNode() with the specification
295         https://bugs.webkit.org/show_bug.cgi?id=160224
296
297         Reviewed by Sam Weinig.
298
299         Align our implementation for Node.isEqualNode() to match more closely
300         the text of the specification:
301         - https://dom.spec.whatwg.org/#dom-node-isequalnode
302         - https://dom.spec.whatwg.org/#concept-node-equals
303
304         This also fixes a bug where isEqualNode() would sometimes return false
305         wrongly for elements because we were comparing the value returned by
306         nodeName() which returns the tagName of elements. The issue was that
307         the tagName's case may differ depending on the element being in an
308         HTMLDocument or not. We now compare Element::tagQName() instead which
309         ends up comparing namespace / namespace prefix and localName, as per
310         the specification. The new behavior matches Firefox and Chrome and
311         helps us pass an extra W3C test.
312
313         No new tests, rebaselined existing test.
314
315         * dom/Node.cpp:
316         (WebCore::Node::isEqualNode):
317
318 2016-07-26  Simon Fraser  <simon.fraser@apple.com>
319
320         Sort the project files.
321
322         * WebCore.xcodeproj/project.pbxproj:
323
324 2016-07-26  Chris Dumez  <cdumez@apple.com>
325
326         Align CSSKeyframesRule with the specification
327         https://bugs.webkit.org/show_bug.cgi?id=160219
328
329         Reviewed by Darin Adler.
330
331         Align CSSKeyframesRule with the specification:
332         - https://drafts.csswg.org/css-animations/#interface-csskeyframesrule
333
334         In particular, the parameter to insertRule() / appendRule() /
335         deleteRule() / findRule() should be mandatory. Both Firefox and Chrome
336         agree with the specification here.
337
338         Also, the CSSKeyframesRule.name attribute should not be nullable.
339         Chrome agrees with the specification. However, Firefox, has the
340         attribute nullable. This patch aligns our behavior with Chrome and
341         the specification.
342
343         Tests: animations/CSSKeyframesRule-name-null.html
344                animations/CSSKeyframesRule-parameters.html
345
346         * css/CSSKeyframesRule.h:
347         (WebCore::StyleRuleKeyframes::name):
348         (WebCore::StyleRuleKeyframes::setName):
349         * css/CSSKeyframesRule.idl:
350
351 2016-07-26  Myles C. Maxfield  <mmaxfield@apple.com>
352
353         [iPhone] Playing a video on tudou.com plays only sound, no video
354         https://bugs.webkit.org/show_bug.cgi?id=160178
355         <rdar://problem/27535468>
356
357         Reviewed by Eric Carlson and Dan Bernstein.
358
359         This patch re-implements r203520 in a much simpler way which doesn't involve a new SPI.
360         The biggest problem with r203520 is that it make it impossible for a WKWebView to match
361         MobileSafari's behavior. Instead of adding this new SPI, a simple version check should
362         be used to keep old apps working.
363
364         The new behavior is characterized by the following table:
365
366                                              |                iOS                 |      Non-iOS
367         =============================================================================================
368         requiresPlayInlineAttribute == true  | Old app: honor -webkit-playsinline | honor playsinline
369                                              | New app: honor playsinline         | honor playsinline
370         ---------------------------------------------------------------------------------------------
371         requiresPlayInlineAttribute == false | Always inline                      | Always inline
372
373         Specifically, this patch reverts r203545 which is the commit which actually removes
374         the old SPI. As soon as Safari is migrated back to this old SPI, I'll remove the two
375         new SPIs added in r203520.
376
377         Tests: media/video-playsinline.html
378                media/video-webkit-playsinline.html
379
380         * html/MediaElementSession.cpp:
381         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
382         * page/Settings.cpp:
383         * page/Settings.in:
384         * testing/InternalSettings.cpp:
385         (WebCore::InternalSettings::Backup::Backup):
386         (WebCore::InternalSettings::Backup::restoreTo):
387         (WebCore::InternalSettings::setInlineMediaPlaybackRequiresPlaysInlineAttribute):
388         * testing/InternalSettings.h:
389         * testing/InternalSettings.idl:
390
391 2016-07-26  Zalan Bujtas  <zalan@apple.com>
392
393         Move RenderView::shouldDisableLayoutStateForSubtree to SubtreeLayoutStateMaintainer.
394         https://bugs.webkit.org/show_bug.cgi?id=160215
395
396         Reviewed by Darin Adler and Simon Fraser.
397
398         No change in functionality.
399
400         * page/FrameView.cpp:
401         (WebCore::SubtreeLayoutStateMaintainer::SubtreeLayoutStateMaintainer):
402         * rendering/RenderView.cpp:
403         (WebCore::RenderView::shouldDisableLayoutStateForSubtree):
404         * rendering/RenderView.h:
405
406 2016-07-26  Simon Fraser  <simon.fraser@apple.com>
407
408         Allow LOG macros to be used outside the namespace, and other logging cleanup
409         https://bugs.webkit.org/show_bug.cgi?id=160216
410
411         Reviewed by Anders Carlsson.
412
413         Fix some issues with the LOG macros.
414         
415         First, they were not usable outside the WebKit namespace in WebKit2 code. Fix by moving
416         its log channels outside of the namespace (they are protected by a unique prefix anyway).
417         
418         Second, allow LOG_WITH_STREAM to be used in WebKit2 by moving that and a helper macro
419         into LogMacros.h, which is exported from WebCore as a private header.
420         
421         Third, split the Logging.h header into two. Logging.h remains for framework-internal
422         log channels and log macros. Add LogInitialization.h which is external, and used to
423         initialize the channels.
424         
425         Finally unify "initializeLogChannels" and "initializeLoggingChannels" terminology everywhere.
426
427         * WebCore.xcodeproj/project.pbxproj:
428         * platform/LogInitialization.h: Added.
429         * platform/LogMacros.h: Added.
430         * platform/Logging.cpp:
431         (WebCore::initializeLogChannelsIfNecessary):
432         (WebCore::initializeLoggingChannelsIfNecessary): Deleted.
433         * platform/Logging.h:
434         * testing/js/WebCoreTestSupport.cpp:
435         (WebCoreTestSupport::initializeLogChannelsIfNecessary):
436         (WebCoreTestSupport::initializeLoggingChannelsIfNecessary): Deleted.
437         * testing/js/WebCoreTestSupport.h:
438
439 2016-07-26  Anders Carlsson  <andersca@apple.com>
440
441         onpaymentauthorized callback not received when authorizing for a second time
442         https://bugs.webkit.org/show_bug.cgi?id=160218
443         rdar://problem/27527151
444
445         Reviewed by Tim Horton.
446
447         Only null out the active session if the status is a final state status.
448
449         * Modules/applepay/PaymentCoordinator.cpp:
450         (WebCore::PaymentCoordinator::completePaymentSession):
451
452 2016-07-26  Chris Dumez  <cdumez@apple.com>
453
454         Range.prototype.compareBoundaryPoints.length should be 2
455         https://bugs.webkit.org/show_bug.cgi?id=160217
456
457         Reviewed by Sam Weinig.
458
459         Range.prototype.compareBoundaryPoints.length:
460         - https://dom.spec.whatwg.org/#interface-range
461
462         We had a bug in our IDL which caused length to be 0 even though
463         both parameters were effectively mandatory.
464
465         No new tests, rebaselined existing test.
466
467         * dom/Range.idl:
468
469 2016-07-26  Chris Dumez  <cdumez@apple.com>
470
471         Align CSSStyleDeclaration with the specification
472         https://bugs.webkit.org/show_bug.cgi?id=160214
473
474         Reviewed by Darin Adler.
475
476         Align CSSStyleDeclaration with the specification:
477         - https://drafts.csswg.org/cssom/#the-cssstyledeclaration-interface
478
479         In particular, the parameters to removeProperty() / item() and
480         getPropertyPriority() should be mandatory.
481
482         Firefox and Chrome match the specification.
483
484         Tests: fast/css/CSSStyleDeclaration-cssText-null.html
485                fast/css/CSSStyleDeclaration-parameters.html
486
487         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
488         (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
489         * css/CSSStyleDeclaration.idl:
490
491 2016-07-26  David Kilzer <ddkilzer@apple.com>
492
493         Networking process crash due to missing -[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:] implementation
494         https://bugs.webkit.org/show_bug.cgi?id=156947
495         <rdar://problem/23325160>
496
497         Reviewed by Alex Christensen.
498
499         Test: http/tests/xmlhttprequest/auth-reject-protection-space.html
500
501         * platform/network/mac/AuthenticationMac.mm:
502         (-[WebCoreAuthenticationClientAsChallengeSender performDefaultHandlingForAuthenticationChallenge:]): Added.
503         (-[WebCoreAuthenticationClientAsChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]): Added.
504
505 2016-07-26  Chris Dumez  <cdumez@apple.com>
506
507         Parameters to CSSStyleSheet.insertRule() / deleteRule() should be mandatory
508         https://bugs.webkit.org/show_bug.cgi?id=160210
509
510         Reviewed by Darin Adler.
511
512         Parameters to CSSStyleSheet.insertRule() / deleteRule() should be mandatory:
513         - https://drafts.csswg.org/cssom/#cssstylesheet
514
515         They are mandatory in Firefox.
516         They are mandatory in Chrome except for the second parameter of insertRule()
517         which merely logs a deprecation warning.
518
519         This patch aligns our behavior with Chrome to move towards to specification
520         while limiting the risk of breakage.
521
522         Test: fast/css/stylesheet-parameters.html
523
524         * css/CSSStyleSheet.cpp:
525         (WebCore::CSSStyleSheet::deprecatedInsertRule):
526         * css/CSSStyleSheet.h:
527         * css/CSSStyleSheet.idl:
528
529 2016-07-26  George Ruan  <gruan@apple.com>
530
531         HTMLVideoElement frames do not update on iOS when src is a MediaStream blob
532         https://bugs.webkit.org/show_bug.cgi?id=159833
533         <rdar://problem/27379487>
534
535         Reviewed by Eric Carlson.
536
537         Test: fast/mediastream/MediaStream-video-element-displays-buffer.html
538
539         * WebCore.xcodeproj/project.pbxproj:
540         * platform/cf/CoreMediaSoftLink.cpp: Add CMSampleBufferCreateReadyWithImageBuffer and CMVideoFormatDescriptionCreateForImageBuffer
541         softlink.
542         * platform/cf/CoreMediaSoftLink.h: Ditto.
543         * platform/cocoa/CoreVideoSoftLink.cpp: Add CVPixelBufferCreate, kCVPixelBufferCGBitmapContextCompatibilityKey, and
544         kCVPixelBufferCGImageCompatibilityKey.
545         * platform/cocoa/CoreVideoSoftLink.h: Ditto.
546         * platform/graphics/avfoundation/MediaSampleAVFObjC.h: Change create to return a Ref<T> instead
547         of RefPtr<T>.
548         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: Make observer of
549         MediaStreamTrackPrivate and make MediaPlayer use an AVSampleBufferDisplayLayer instead of CALayer.
550         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: Ditto.
551         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC): Clean up
552         observers and AVSampleBufferDisplayLayer.
553         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable): Ensures AVSampleBufferDisplayLayer
554         is available.
555         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueAudioSampleBufferFromTrack): Placeholder.
556         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSampleBufferFromTrack): Responsible
557         for enqueuing sample buffers to the active video track.
558         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer): Ensures that an AVSampleBufferDisplayLayer
559         exists.
560         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayer): Destroys the AVSampleBufferDisplayLayer.
561         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer): Replace CALayer with AVSampleBufferDisplayLayer.
562         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode): Ditto.
563         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): Call updateReadyState as a deferred task.
564         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): readyState is bumped to HAVE_ENOUGH_DATA
565         only when the MediaPlayerPrivateMediaStreamAVFObjC has received a media sample.
566         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferUpdated): Called from MediaStreamTrackPrivate when a
567         new SampleBuffer is available.
568         (WebCore::updateTracksOfType): Manage adding and removing self as observer from tracks.
569         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks): Replace CALayer with AVSampleBufferDisplayLayer
570         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::acceleratedRenderingStateChanged): Copied from
571         MediaPlayerPrivateMediaSourceAVFObjC.mm
572         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Deleted CALayer.
573         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode): Deleted process of updating CALayer.
574         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateIntrinsicSize): Deleted CALayer.
575         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers): Deleted.
576         * platform/mediastream/MediaStreamPrivate.cpp:
577         (WebCore::MediaStreamPrivate::updateActiveVideoTrack): Remove redundant check.
578         * platform/mediastream/MediaStreamTrackPrivate.cpp:
579         (WebCore::MediaStreamTrackPrivate::sourceHasMoreMediaData): Called from RealtimeMediaSource when a new SampleBuffer
580         is available.
581         * platform/mediastream/MediaStreamTrackPrivate.h:
582         (WebCore::MediaStreamTrackPrivate::Observer::sampleBufferUpdated): Relays to MediaPlayerPrivateMediaStreamAVFObjC that
583         a new SampleBuffer is available to enqueue to the AVSampleBufferDisplayLayer.
584         * platform/mediastream/RealtimeMediaSource.cpp:
585         (WebCore::RealtimeMediaSource::settingsDidChange): Fix grammatical mistake in function name settingsDidChanged().
586         (WebCore::RealtimeMediaSource::mediaDataUpdated): Relays to all observers that a new SampleBuffer is available.
587         (WebCore::RealtimeMediaSource::settingsDidChanged): Deleted.
588         * platform/mediastream/RealtimeMediaSource.h:
589         * platform/mediastream/mac/AVVideoCaptureSource.mm:
590         (WebCore::AVVideoCaptureSource::processNewFrame): Calls mediaDataUpdated when a new SampleBuffer is captured.
591         * platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
592         * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
593         (WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer): Convert CVPixelBuffer to CMSampleBuffer.
594         (WebCore::MockRealtimeVideoSourceMac::pixelBufferFromCGImage): Convert CGImage to CVPixelBuffer.
595         (WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer): Creates a CMSampleBuffer from current imageBuffer and
596         sends the CMSampleBuffer to MediaPlayerPrivateMediaStreamAVFObjC
597         * platform/mock/MockRealtimeVideoSource.cpp:
598         (WebCore::MockRealtimeVideoSource::setFrameRate): Fix grammar of settingsDidChanged() to settingsDidChange().
599         (WebCore::MockRealtimeVideoSource::setSize): Ditto.
600         (WebCore::MockRealtimeVideoSource::generateFrame): Call updateSampleBuffer().
601         * platform/mock/MockRealtimeVideoSource.h: Change elapsedTime() from private to protected.
602         (WebCore::MockRealtimeVideoSource::updateSampleBuffer): Overriden by MockRealtimeVideoSourceMac.
603
604 2016-07-26  Zalan Bujtas  <zalan@apple.com>
605
606         Move ControlStates HashMap to RenderBox.
607         https://bugs.webkit.org/show_bug.cgi?id=160206
608
609         Reviewed by Simon Fraser.
610
611         Move and modernize it.
612
613         No change in functionality.
614
615         * platform/ControlStates.h:
616         (WebCore::ControlStates::ControlStates): Deleted.
617         * rendering/RenderBox.cpp:
618         (WebCore::controlStatesRendererMap):
619         (WebCore::controlStatesForRenderer):
620         (WebCore::removeControlStatesForRenderer):
621         (WebCore::RenderBox::~RenderBox):
622         (WebCore::RenderBox::paintBoxDecorations):
623         * rendering/RenderElement.cpp:
624         (WebCore::controlStatesRendererMap): Deleted.
625         (WebCore::RenderElement::hasControlStatesForRenderer): Deleted.
626         (WebCore::RenderElement::controlStatesForRenderer): Deleted.
627         (WebCore::RenderElement::removeControlStatesForRenderer): Deleted.
628         (WebCore::RenderElement::addControlStatesForRenderer): Deleted.
629         * rendering/RenderElement.h:
630
631 2016-07-26  Eric Carlson  <eric.carlson@apple.com>
632
633         Occasional crash in WebCore::RenderVTTCue::initializeLayoutParameters
634         https://bugs.webkit.org/show_bug.cgi?id=160208
635
636         Reviewed by Darin Adler.
637
638         * rendering/RenderVTTCue.cpp:
639         (WebCore::RenderVTTCue::initializeLayoutParameters): Return when firstChild is NULL so a
640         release build will not crash.
641
642 2016-07-26  Chris Dumez  <cdumez@apple.com>
643
644         Parameters to CustomEvent.initCustomEvent() should be mandatory
645         https://bugs.webkit.org/show_bug.cgi?id=160205
646
647         Reviewed by Ryosuke Niwa.
648
649         Parameters to CustomEvent.initCustomEvent() should be mandatory:
650         - https://dom.spec.whatwg.org/#interface-customevent
651
652         Firefox and Chrome agree with the specification.
653
654         No new tests, rebaselined existing test.
655
656         * dom/CustomEvent.idl:
657
658 2016-07-26  Chris Dumez  <cdumez@apple.com>
659
660         Second parameter to Range.isPointInRange() / comparePoint() should be mandatory
661         https://bugs.webkit.org/show_bug.cgi?id=160202
662
663         Reviewed by Ryosuke Niwa.
664
665         Second parameter to Range.isPointInRange() / comparePoint() should be mandatory
666         and be of type "unsigned long":
667         - https://dom.spec.whatwg.org/#interface-range
668
669         Firefox and Chrome agree with the specification.
670
671         No new tests, rebaselined existing tests.
672
673         * accessibility/AXObjectCache.cpp:
674         (WebCore::AXObjectCache::traverseToOffsetInRange):
675         * dom/DocumentMarkerController.cpp:
676         (WebCore::DocumentMarkerController::removeMarkers):
677         (WebCore::DocumentMarkerController::markersInRange):
678         (DocumentMarkerController::setMarkersActive):
679         * dom/Range.cpp:
680         (WebCore::Range::isPointInRange):
681         (WebCore::Range::comparePoint):
682         (WebCore::Range::compareBoundaryPoints):
683         (WebCore::Range::toString):
684         (WebCore::Range::absoluteTextRects):
685         (WebCore::Range::absoluteTextQuads):
686         (WebCore::boundaryTextNodesMerged):
687         (WebCore::Range::getBorderAndTextQuads):
688         * dom/Range.h:
689         (WebCore::Range::startOffset):
690         (WebCore::Range::endOffset):
691         * dom/Range.idl:
692         * dom/RangeBoundaryPoint.h:
693         (WebCore::RangeBoundaryPoint::ensureOffsetIsValid):
694         (WebCore::RangeBoundaryPoint::toPosition):
695         (WebCore::RangeBoundaryPoint::offset):
696         (WebCore::RangeBoundaryPoint::setOffset):
697         (WebCore::RangeBoundaryPoint::setToBeforeChild):
698         (WebCore::RangeBoundaryPoint::setToAfterChild):
699         (WebCore::RangeBoundaryPoint::setToEndOfNode):
700         (WebCore::RangeBoundaryPoint::childBeforeWillBeRemoved):
701         (WebCore::RangeBoundaryPoint::invalidateOffset):
702
703 2016-07-26  Youenn Fablet  <youenn@apple.com>
704
705         [Fetch API] Add support for fetch mode, in particular cors
706         https://bugs.webkit.org/show_bug.cgi?id=156753
707
708         Reviewed by Darin Adler.
709
710         Covered by rebased tests.
711
712         * Modules/fetch/FetchLoader.cpp:
713         (WebCore::FetchLoader::start): Passing fetch mode to ThreadableLoader.
714         Disabling as a temp fix credentials in case of CORS mode as credential options is not yet supported and would make several tests fail.
715
716 2016-07-26  Chris Dumez  <cdumez@apple.com>
717
718         Align NamedNodeMap with the specification
719         https://bugs.webkit.org/show_bug.cgi?id=160204
720
721         Reviewed by Darin Adler.
722
723         Align NamedNodeMap with the specification:
724         - https://dom.spec.whatwg.org/#interface-namednodemap
725
726         In particular, mark parameters as mandatory when they should be, and
727         use tighter "Attr" typing instead of Node.
728
729         Chrome and Firefox agree with the specification.
730
731         Test: fast/dom/NamedNodeMap-parameters.html
732
733         * dom/NamedNodeMap.cpp:
734         (WebCore::NamedNodeMap::getNamedItem):
735         (WebCore::NamedNodeMap::getNamedItemNS):
736         (WebCore::NamedNodeMap::removeNamedItem):
737         (WebCore::NamedNodeMap::removeNamedItemNS):
738         (WebCore::NamedNodeMap::setNamedItem):
739         (WebCore::NamedNodeMap::item):
740         * dom/NamedNodeMap.h:
741         * dom/NamedNodeMap.idl:
742
743 2016-07-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
744
745         Infinite Canvas context save() causes WebKit to crash
746         https://bugs.webkit.org/show_bug.cgi?id=159586
747         <rdar://problem/26759984>
748
749         Reviewed by Simon Fraser.
750
751         Limit the size of the canvas context state stack to 1024 * 16 saves. All
752         the saves which come after that limit will stay unrealized. The restore() 
753         should not have any effect till there is no unrealized saves.
754          
755         Test: fast/canvas/canvas-context-save-limit.html
756
757         * html/canvas/CanvasRenderingContext2D.cpp:
758         (WebCore::CanvasRenderingContext2D::realizeSaves):
759         (WebCore::CanvasRenderingContext2D::realizeSavesLoop):
760         * html/canvas/CanvasRenderingContext2D.h: 
761
762 2016-07-26  Youenn Fablet  <youenn@apple.com>
763
764         DOMTokenList should be iterable
765         https://bugs.webkit.org/show_bug.cgi?id=160183
766
767         Reviewed by Chris Dumez.
768
769         DOMTokenList should be iterable as per https://dom.spec.whatwg.org/#interface-domtokenlist
770
771         Test: fast/dom/domTokenListIterator.html
772
773         * html/DOMTokenList.idl: Added iterable to the interface description.
774
775 2016-07-26  Commit Queue  <commit-queue@webkit.org>
776
777         Unreviewed, rolling out r203719.
778         https://bugs.webkit.org/show_bug.cgi?id=160200
779
780         It is breaking win build (Requested by youenn on #webkit).
781
782         Reverted changeset:
783
784         "[Fetch API] Response constructor should be able to take a
785         ReadableStream as body"
786         https://bugs.webkit.org/show_bug.cgi?id=159804
787         http://trac.webkit.org/changeset/203719
788
789 2016-07-26  John Wilander  <wilander@apple.com>
790
791         Stop supporting compressed character sets BOCU-1 and SCSU
792         https://bugs.webkit.org/show_bug.cgi?id=159581
793
794         Reviewed by Brent Fulgham.
795
796         WebKit should not support the compressed character sets BOCU-1 and SCSU.
797         Chrome and Firefox don't and these old formats may pass server-side character
798         filters while still rendering in WebKit.
799
800         The HTML specification says "The above prohibits supporting, for example,
801         CESU-8, UTF-7, BOCU-1, SCSU, EBCDIC, and UTF-32."
802         https://html.spec.whatwg.org/#character-encodings
803
804         Tests: http/tests/misc/char-encoding-bocu-1-blacklisted.html
805                http/tests/misc/char-encoding-scsu-blacklisted.html
806
807         * platform/text/TextEncodingRegistry.cpp:
808             Blacklisted BOCU-1 and SCSU character sets.
809
810 2016-07-26  Carlos Garcia Campos  <cgarcia@igalia.com>
811
812         ASSERTION FAILED: !m_frame->page()->defersLoading() || InspectorInstrumentation::isDebuggerPaused(m_frame)
813         https://bugs.webkit.org/show_bug.cgi?id=160193
814
815         Reviewed by Michael Catanzaro.
816
817         This is happening in the GTK+ Debug bot when running test loader/load-defer.html (note that the assert is inside
818         a !USE(CF) block).
819         The test is creating an iframe with load deferred, then in a timeout it disables the deferred load and checks
820         that the load actually happens. What happens is that the initial empty document is what calls
821         DocumentLoader::finishedLoading() when load is still deferred. The onload handler is not called because load
822         events are disabled for the initial empty document in SubframeLoader::loadSubframe(), but
823         DocumentLoader::finishedLoading() is called unconditionally from maybeLoadEmpty(). I think it's fine to call
824         DocumentLoader::finishedLoading() for the initial empty document even when load is deferred, so we can simply
825         update the assert to handle that case.
826
827         * loader/DocumentLoader.cpp:
828         (WebCore::DocumentLoader::finishedLoading): Do not assert if called for the initial empty document when load is
829         deferred.
830
831 2016-07-26  Youenn Fablet  <youenn@apple.com>
832
833         Remove ClientCredentialPolicy cross-origin option from ResourceLoaderOptions
834         https://bugs.webkit.org/show_bug.cgi?id=159413
835
836         Reviewed by Alex Christensen.
837
838         ClientCredentialPolicy had three values (not ask, ask, ask only for same origin).
839         The distinction between allowing cross-origin or same-origin credentials is misleading as it is not supported
840         for synchronous loads and not supported by Network process.
841         It is best replaced by a boolean option (ask or not ask).
842
843         Same-origin ClientCredentialPolicy option was only used by DocumentThreadableLoader for asynchronous loads.
844         Since DocumentThreadableLoader is already computing whether the request is cross-origin, it can also compute
845         whether credentials may be requested or not. In case of cross-origin redirections, credentials are omitted, thus
846         disabling any possibility for requesting credentials for cross-origin resources after redirections.
847
848         Moving ClientCredentialPolicy to ResourceLoaderOptions since it is not used by platform code except for some
849         mac-specific code that is already using ResourceLoaderOptions.
850
851         Covered by existing tests.
852
853         * loader/CrossOriginPreflightChecker.cpp:
854         (WebCore::CrossOriginPreflightChecker::startPreflight): Setting clearly credential mode to Omit credentials.
855         (WebCore::CrossOriginPreflightChecker::doPreflight): Ditto.
856         * loader/DocumentLoader.cpp:
857         (WebCore::DocumentLoader::startLoadingMainResource): AskClientForAllCredentials ->
858         ClientCredentialPolicy::MayAskClientForCredentials.
859         * loader/DocumentThreadableLoader.cpp:
860         (WebCore::DocumentThreadableLoader::loadRequest): Disabling requesting credentials for any cross-origin request.
861         * loader/FrameLoader.h:
862         * loader/MediaResourceLoader.cpp:
863         (WebCore::MediaResourceLoader::requestResource): AskClientForAllCredentials -> ClientCredentialPolicy::MayAskClientForCredentials.
864         * loader/NetscapePlugInStreamLoader.cpp:
865         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Ditto.
866         * loader/ResourceLoader.cpp:
867         (WebCore::ResourceLoader::isAllowedToAskUserForCredentials): Disabling client credential request if ClientCredentialPolicy is CannotAskClientForCredentials.
868         Otherwise, returns true if fetch credentials mode allows it.
869         * loader/ResourceLoaderOptions.h:
870         (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
871         (WebCore::ResourceLoaderOptions::clientCredentialPolicy): Deleted.
872         (WebCore::ResourceLoaderOptions::setClientCredentialPolicy): Deleted.
873         * loader/cache/CachedResourceLoader.cpp:
874         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): AskClientForAllCredentials -> ClientCredentialPolicy::MayAskClientForCredentials.
875         (WebCore::CachedResourceLoader::defaultCachedResourceOptions): AskClientForAllCredentials -> ClientCredentialPolicy::MayAskClientForCredentials.
876         * loader/icon/IconLoader.cpp:
877         (WebCore::IconLoader::startLoading): DoNotAskClientForAnyCredentials -> ClientCredentialPolicy::CannotAskClientForCredentials.
878         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
879         (WebCore::WebCoreAVCFResourceLoader::startLoading): DoNotAskClientForCrossOriginCredentials -> ClientCredentialPolicy::CannotAskClientForCredentials.
880         This is ok as credentials mode is omit and stored credentials are not allowed.
881         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
882         (WebCore::WebCoreAVFResourceLoader::startLoading): Ditto.
883         * platform/network/ResourceHandleTypes.h:
884         * xml/XSLTProcessorLibxslt.cpp: DoNotAskClientForCrossOriginCredentials -> ClientCredentialPolicy::MayAskClientForCredentials.
885         This is ok as this is a synchronous load.
886         (WebCore::docLoaderFunc):
887         * xml/parser/XMLDocumentParserLibxml2.cpp:
888         (WebCore::openFunc): DoNotAskClientForCrossOriginCredentials -> ClientCredentialPolicy::MayAskClientForCredentials.
889         This is ok as this is a synchronous load.
890
891 2016-07-26  Youenn Fablet  <youenn@apple.com>
892
893         [Fetch API] Response constructor should be able to take a ReadableStream as body
894         https://bugs.webkit.org/show_bug.cgi?id=159804
895
896         Reviewed by Alex Christensen.
897
898         Covered by existing and updated tests.
899
900         Introduced FetchBodyConsumer to encapsulate the code responsible to adapt FetchBody internal data to the requests made by user scripts.
901         This refactoring eases the handling of internal data coming from ReadableStream.
902
903         FetchLoader is now delegating conversion from the data to its m_consumer field.
904         If m_consumer is null, FetchLoader calls FetchLoaderClient::didReceiveData (streaming reception mode).
905         Clients of FetchLoader needs to pass a FetchBodyConsumer to the FetchLoader to do the data adaptation at loader creation time.
906
907         Added support for body data passed as a ReadableStream to Response.
908         This requires to set @body internal slot of the Response object in the constructor initialization JS built-in.
909
910         To actually use that data, Body accessors are also implemented as JS built-in for Response.
911         Since there is no need to do so for Request, FetchResponse is no longer marked as implementing FetchBody but all
912         FetchBody IDL description is inlined in FetchResponse.idl.
913
914         For each body accessor (arrayBuffer, blob, json, text), the corresponding JS built-in checks whether @body internal slot is set.
915         If that is not the case, regular handling is done through a new private method called @consume.
916         If @body internal slot is set, chunks are pumped from the ReadableStream using ReadableStream internal built-ins functions.
917         Data handling is done in C++ through the private methods @startConsumingStream, @consumeChunk and @finishConsumingStream.
918
919         To support cloning of Response with bodies, clone method is also implemented as a JS built-in.
920         Main clone is done through @cloneFoJS private method implemented in C++.
921         JS built-in clone code does the teeing of the ReadableStream using ReadableStream JS built-in internal functions.
922
923         Introducing a new ReadableStream type for FetchBody to cope with body being stored in a ReadableStream.
924
925         Introducing a new Loaded type for FetchBody to cope with body being stored in the FetchBodyConsumer owned by FetchBody.
926         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.
927         At the end of a load, the data remains in FetchBodyConsumer and the body is marked as Loaded.
928         If the user wants to get the data after data finished being loaded, FetchBodyConsumer will do the required conversions.
929
930         Introducing DeferredWrapper::resolveWithNewValue to handle the case of resolving promises with new objects.
931         This allows directly using toJSNewlyCreated instead of toJS.
932
933         * CMakeLists.txt: Adding FetchBodyConsumer.
934         * Modules/fetch/FetchBody.cpp: Moving data adaptation code to FetchBodyConsumer.
935         (WebCore::FetchBody::extract):
936         (WebCore::FetchBody::arrayBuffer):
937         (WebCore::FetchBody::blob): Setting contentType in FetchBodyConsumer to handle proper creation of blob.
938         (WebCore::FetchBody::json):
939         (WebCore::FetchBody::text):
940         (WebCore::FetchBody::consume): Refactoring and added case of Loaded bodies.
941         (WebCore::FetchBody::consumeAsStream): Ditto.
942         (WebCore::FetchBody::consumeArrayBuffer):
943         (WebCore::FetchBody::consumeText):
944         (WebCore::FetchBody::consumeBlob):
945         (WebCore::FetchBody::loadingFailed):
946         (WebCore::FetchBody::loadingSucceeded):
947         (WebCore::FetchBody::loadingType): Deleted.
948         (WebCore::blobFromArrayBuffer): Deleted.
949         (WebCore::FetchBody::fulfillTextPromise): Deleted.
950         (WebCore::FetchBody::loadedAsArrayBuffer): Deleted.
951         (WebCore::FetchBody::loadedAsText): Deleted.
952         * Modules/fetch/FetchBody.h:
953         (WebCore::FetchBody::consumer):
954         * Modules/fetch/FetchBodyConsumer.cpp: Added, responsible of data adaptation.
955         (WebCore::blobFromData):
956         (WebCore::FetchBodyConsumer::resolveWithData):
957         (WebCore::FetchBodyConsumer::resolve):
958         (WebCore::FetchBodyConsumer::append):
959         (WebCore::FetchBodyConsumer::takeData):
960         (WebCore::FetchBodyConsumer::takeAsArrayBuffer):
961         (WebCore::FetchBodyConsumer::takeAsBlob):
962         (WebCore::FetchBodyConsumer::takeAsText):
963         * Modules/fetch/FetchBodyConsumer.h: Added.
964         (WebCore::FetchBodyConsumer::FetchBodyConsumer):
965         (WebCore::FetchBodyConsumer::setContentType):
966         (WebCore::FetchBodyConsumer::setType):
967         (WebCore::FetchBodyConsumer::type):
968         (WebCore::FetchBodyConsumer::clean):
969         (WebCore::FetchBodyConsumer::hasData):
970         * Modules/fetch/FetchBodyOwner.cpp:
971         (WebCore::FetchBodyOwner::loadBlob):
972         (WebCore::FetchBodyOwner::blobLoadingSucceeded):
973         (WebCore::FetchBodyOwner::loadedBlobAsText): Deleted.
974         * Modules/fetch/FetchBodyOwner.h:
975         (WebCore::FetchBodyOwner::loadedBlobAsArrayBuffer): Deleted.
976         * Modules/fetch/FetchInternals.js:
977         (consumeStream): Pump ReadableStream data and send it to FetchResponse to be converted according user need.
978         * Modules/fetch/FetchLoader.cpp:
979         (WebCore::FetchLoader::FetchLoader): FetchLoader is simplified as it has two nodes: consumer mode in which case
980         data is sent to the consumer and no-consumer mode in which case data is passed to loader client. The second mode
981         is used to conveyy data to ReadableStream source.
982         (WebCore::FetchLoader::stop):
983         (WebCore::FetchLoader::startStreaming):
984         (WebCore::FetchLoader::didReceiveData):
985         (WebCore::FetchLoader::didFinishLoading): Deleted.
986         * Modules/fetch/FetchLoader.h:
987         * Modules/fetch/FetchLoaderClient.h:
988         (WebCore::FetchLoaderClient::didFinishLoadingAsText): Deleted.
989         (WebCore::FetchLoaderClient::didFinishLoadingAsArrayBuffer): Deleted.
990         * Modules/fetch/FetchResponse.cpp:
991         (WebCore::FetchResponse::cloneForJS):
992         (WebCore::FetchResponse::BodyLoader::didSucceed):
993         (WebCore::FetchResponse::BodyLoader::start):
994         (WebCore::FetchResponse::consume): Introduced to consume data stored in body and not in ReadableStream.
995         (WebCore::FetchResponse::startConsumingStream): Introduced to start process of consuming data stored in the ReadableStream.
996         (WebCore::FetchResponse::consumeChunk): Reception of ReadableStream data.
997         (WebCore::FetchResponse::finishConsumingStream): Doing the final conversion.
998         (WebCore::FetchResponse::clone): Deleted.
999         (WebCore::FetchResponse::BodyLoader::didFinishLoadingAsArrayBuffer): Deleted.
1000         * Modules/fetch/FetchResponse.h:
1001         * Modules/fetch/FetchResponse.idl: Inlining of FetchBody methods/attributes and adding private methods.
1002         * Modules/fetch/FetchResponse.js:
1003         (initializeFetchResponse):
1004         (clone):
1005         (arrayBuffer):
1006         (blob):
1007         (formData):
1008         (json):
1009         (text):
1010         * WebCore.xcodeproj/project.pbxproj:
1011         * bindings/js/JSDOMPromise.h:
1012         (WebCore::DeferredWrapper::resolveWithNewValue):
1013         * bindings/js/WebCoreBuiltinNames.h:
1014
1015 2016-07-25  Sergio Villar Senin  <svillar@igalia.com>
1016
1017         [css-grid] repeat() syntax should take a <track-list> argument
1018         https://bugs.webkit.org/show_bug.cgi?id=160162
1019
1020         Reviewed by Darin Adler.
1021
1022         The repeat() notation used to allow just 1 <track-size> as second argument. Specs have been
1023         recently modified so that a <track-list> is now supported, meaning that we can pass an
1024         arbitrary number of track sizes and line numbers.
1025
1026         It has been working for some time for repeat() if the first argument was a positive integer,
1027         but it requires some changes for the auto repeat cases (auto-fill and auto-fit).
1028
1029         * css/CSSComputedStyleDeclaration.cpp:
1030         (WebCore::OrderedNamedLinesCollector::OrderedNamedLinesCollector): Store the total number of
1031         auto repeat tracks and the length of a single repetition instead of the number of
1032         repetitions.
1033         (WebCore::OrderedNamedLinesCollector::collectLineNamesForIndex): Do not assume that there is
1034         only 1 repeat track.
1035         (WebCore::valueForGridTrackList):
1036         * css/CSSParser.cpp:
1037         (WebCore::CSSParser::parseGridTrackRepeatFunction): Allow multiple tracks in repeat().
1038         * rendering/RenderGrid.cpp:
1039         (WebCore::RenderGrid::rawGridTrackSize): Renamed repetitions -> autoRepeatTracksCount.
1040         (WebCore::RenderGrid::computeAutoRepeatTracksCount): Use all the repeat tracks to compute
1041         the total track size of a single repetition.
1042         (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat):
1043         * rendering/style/GridPositionsResolver.cpp:
1044         (WebCore::NamedLineCollection::NamedLineCollection): Renamed m_repetitions ->
1045         m_autoRepeatTotalTracks. Added m_autoRepeatTrackListLength (it was always 1 before).
1046         (WebCore::NamedLineCollection::find): Resolve lines inside multiple repeat tracks.
1047         (WebCore::NamedLineCollection::firstPosition): Ditto.
1048         * rendering/style/GridPositionsResolver.h:
1049
1050 2016-07-25  Sergio Villar Senin  <svillar@igalia.com>
1051
1052         [css-grid] grid-auto-flow|row should take a <track-size>+
1053         https://bugs.webkit.org/show_bug.cgi?id=160158
1054
1055         Reviewed by Darin Adler.
1056
1057         * css/CSSComputedStyleDeclaration.cpp:
1058         (WebCore::valueForGridTrackSizeList):
1059         (WebCore::ComputedStyleExtractor::propertyValue): Return a list of <track-size> instead of
1060         just one.
1061         * css/CSSParser.cpp:
1062         (WebCore::CSSParser::parseValue): Use the new values of TrackListType;
1063         (WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns): Ditto.
1064         (WebCore::CSSParser::parseGridTemplateShorthand): Ditto.
1065         (WebCore::CSSParser::parseGridShorthand): Ditto.
1066         (WebCore::CSSParser::parseGridTrackList): Changed behavior depending on the value of
1067         TrackSizeList.
1068         * css/CSSParser.h: TrackListType has now 3 different values which determine the behavior of
1069         parseGridTrackList.
1070         * css/CSSPropertyNames.in: Use a new converter for lists.
1071         * css/StyleBuilderConverter.h:
1072         (WebCore::StyleBuilderConverter::convertGridTrackSizeList):
1073         * rendering/RenderGrid.cpp:
1074         (WebCore::RenderGrid::rawGridTrackSize): Resolve the size of the auto track.
1075         * rendering/style/RenderStyle.h:
1076         (WebCore::RenderStyle::gridAutoColumns): Return a Vector.
1077         (WebCore::RenderStyle::gridAutoRows): Ditto.
1078         (WebCore::RenderStyle::setGridAutoColumns): Store a Vector.
1079         (WebCore::RenderStyle::setGridAutoRows): Ditto.
1080         (WebCore::RenderStyle::initialGridAutoColumns): Return a Vector with one auto track.
1081         (WebCore::RenderStyle::initialGridAutoRows): Ditto.
1082         * rendering/style/StyleGridData.h: Store a Vector of GridTrackSize instead of just one.
1083
1084 2016-07-25  Frederic Wang  <fwang@igalia.com>
1085
1086         MathOperator: Add a mapping from combining to non-combining equivalents
1087         https://bugs.webkit.org/show_bug.cgi?id=159513
1088
1089         Reviewed by Darin Adler.
1090
1091         Many math fonts provide stretch variants and assemblies for combining characters but not for
1092         their non-combining equivalent. In the MathML recommendation, it is suggested to use
1093         non-combining charaters, so we allow the operator stretching code to look for constructions
1094         associated to these non-combining characters in order to still be able to stretch the
1095         combining ones.
1096
1097         Test: mathml/presentation/bug159513.html
1098
1099         * rendering/mathml/MathOperator.cpp:
1100         (WebCore::MathOperator::getGlyph): New function extending getBaseGlyph to retrieve the glyph
1101         data for an arbitrary character.
1102         (WebCore::MathOperator::getMathVariantsWithFallback): This helper function calls
1103         getMathVariants for the base glyph. If no constructions are available, it calls
1104         getMathVariants for the glyph associated to equivalent fallback characters as listed in the
1105         small characterFallback table.
1106         (WebCore::MathOperator::calculateStretchyData): Call getMathVariantsWithFallback instead of
1107         getMathVariants. Note that we do not need to do that for calculateDisplayStyleLargeOperator
1108         as we do not use fallback for large operators.
1109         * rendering/mathml/MathOperator.h:
1110         (WebCore::MathOperator::getBaseGlyph): Use getGlyph to implement this function.
1111
1112 2016-07-25  Chris Dumez  <cdumez@apple.com>
1113
1114         Second parameter to Range.setStart() / setEnd() should be mandatory
1115         https://bugs.webkit.org/show_bug.cgi?id=160184
1116
1117         Reviewed by Ryosuke Niwa.
1118
1119         Second parameter to Range.setStart() / setEnd() should be mandatory:
1120         - https://dom.spec.whatwg.org/#interface-range
1121
1122         Also use "unsigned long" instead of "long" type for the parameter,
1123         as per the specification.
1124
1125         Firefox and Chrome agree with the specification.
1126
1127         No new tests, rebaselined existing test.
1128
1129         * dom/Range.cpp:
1130         (WebCore::Range::setStart):
1131         (WebCore::Range::setEnd):
1132         (WebCore::Range::checkNodeWOffset):
1133         * dom/Range.h:
1134         * dom/Range.idl:
1135         * dom/RangeBoundaryPoint.h:
1136         (WebCore::RangeBoundaryPoint::set):
1137
1138 2016-07-25  Chris Dumez  <cdumez@apple.com>
1139
1140         DOMTokenList.prototype.toString should be enumerable
1141         https://bugs.webkit.org/show_bug.cgi?id=160182
1142
1143         Reviewed by Ryosuke Niwa.
1144
1145         DOMTokenList.prototype.toString should be enumerable:
1146         - https://dom.spec.whatwg.org/#interface-domtokenlist
1147         - http://heycam.github.io/webidl/#es-stringifier
1148
1149         Firefox and Chrome agree with the specification.
1150
1151         No new tests, rebaselined existing test.
1152
1153         * html/DOMTokenList.idl:
1154
1155 2016-07-25  Nan Wang  <n_wang@apple.com>
1156
1157         AX: Expose autoFillButtonType to accessibility
1158         https://bugs.webkit.org/show_bug.cgi?id=160179
1159
1160         Reviewed by Chris Fleizach.
1161
1162         Added a new attribute on Mac to expose the auto-fill button type.
1163
1164         Changes are covered in modified test.
1165
1166         * accessibility/AccessibilityObject.cpp:
1167         (WebCore::AccessibilityObject::isValueAutofillAvailable):
1168         (WebCore::AccessibilityObject::valueAutofillButtonType):
1169         (WebCore::AccessibilityObject::isValueAutofilled):
1170         * accessibility/AccessibilityObject.h:
1171         (WebCore::AccessibilityObject::passwordFieldValue):
1172         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1173         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1174
1175 2016-07-25  Zalan Bujtas  <zalan@apple.com>
1176
1177         Cleanup RenderTable*::createAnonymous*
1178         https://bugs.webkit.org/show_bug.cgi?id=160175
1179
1180         Reviewed by Simon Fraser.
1181
1182         This patch
1183         1. tightens the type on createAnonymousBoxWithSameTypeAs, createAnonymousWithParentRendererAndDisplay and
1184         createAnonymousWithParentRenderer from RenderObject to the appropriate type.
1185         2. changes the return type of create* function from raw pointer to std::unique_ptr<>
1186         3. decouples createAnonymousBoxWithSameTypeAs and createAnonymousWithParentRenderer.
1187         createAnonymousBoxWithSameTypeAs misleadingly calls createAnonymousWithParentRenderer
1188         while it is never the parent in case of table items.
1189         (std::unique_ptr::release() vs. WTFMove() will be addressed in a separate patch)
1190
1191         No change in functionality.
1192
1193         * rendering/RenderBlock.cpp:
1194         (WebCore::RenderBlock::createAnonymousBoxWithSameTypeAs):
1195         (WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
1196         * rendering/RenderBlock.h:
1197         (WebCore::RenderBlock::createAnonymousBlock):
1198         * rendering/RenderBox.cpp:
1199         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1200         * rendering/RenderBox.h:
1201         (WebCore::RenderBox::createAnonymousBoxWithSameTypeAs):
1202         * rendering/RenderElement.cpp:
1203         (WebCore::RenderElement::addChild):
1204         * rendering/RenderInline.cpp:
1205         (WebCore::RenderInline::splitFlow):
1206         * rendering/RenderTable.cpp:
1207         (WebCore::RenderTable::addChild):
1208         (WebCore::RenderTable::createTableWithStyle):
1209         (WebCore::RenderTable::createAnonymousWithParentRenderer):
1210         * rendering/RenderTable.h:
1211         (WebCore::RenderTable::createAnonymousBoxWithSameTypeAs):
1212         * rendering/RenderTableCell.cpp:
1213         (WebCore::RenderTableCell::createTableCellWithStyle):
1214         (WebCore::RenderTableCell::createAnonymousWithParentRenderer):
1215         * rendering/RenderTableCell.h:
1216         (WebCore::RenderTableCell::createAnonymousBoxWithSameTypeAs):
1217         * rendering/RenderTableRow.cpp:
1218         (WebCore::RenderTableRow::addChild):
1219         (WebCore::RenderTableRow::createTableRowWithStyle):
1220         (WebCore::RenderTableRow::createAnonymousWithParentRenderer):
1221         * rendering/RenderTableRow.h:
1222         (WebCore::RenderTableRow::createAnonymousBoxWithSameTypeAs):
1223         * rendering/RenderTableSection.cpp:
1224         (WebCore::RenderTableSection::addChild):
1225         (WebCore::RenderTableSection::createTableSectionWithStyle):
1226         (WebCore::RenderTableSection::createAnonymousWithParentRenderer):
1227         * rendering/RenderTableSection.h:
1228         (WebCore::RenderTableSection::createAnonymousBoxWithSameTypeAs):
1229
1230 2016-07-25  Chris Dumez  <cdumez@apple.com>
1231
1232         Touch properties should be on the prototype
1233         https://bugs.webkit.org/show_bug.cgi?id=160174
1234
1235         Reviewed by Ryosuke Niwa.
1236
1237         Touch properties should be on the prototype:
1238         - https://w3c.github.io/touch-events/#idl-def-touch
1239
1240         Chrome agrees with the specification.
1241
1242         Test: platform/ios-simulator/ios/touch/Touch-attributes-prototype.html
1243
1244         * bindings/scripts/CodeGeneratorJS.pm:
1245         (InterfaceRequiresAttributesOnInstanceForCompatibility): Deleted.
1246
1247 2016-07-25  Jeremy Jones  <jeremyj@apple.com>
1248
1249         Set MediaRemote playback state based on MediaSession playback state.
1250         https://bugs.webkit.org/show_bug.cgi?id=160177
1251
1252         Reviewed by Eric Carlson.
1253
1254         Use playback session state to update media remote playback state instead of 
1255         unconditionally setting it to playing.
1256
1257         * platform/audio/mac/MediaSessionManagerMac.mm:
1258         (WebCore::MediaSessionManagerMac::updateNowPlayingInfo):
1259
1260 2016-07-25  Zalan Bujtas  <zalan@apple.com>
1261
1262         RenderBox::haveSameDirection is used only by table items.
1263         https://bugs.webkit.org/show_bug.cgi?id=160141
1264
1265         Reviewed by Simon Fraser.
1266
1267         Remove RenderBox::haveSameDirection() since it's used only by RenderTable*
1268         classes. The new stand alone function (with 2 arguments) now checks if both of
1269         the objects are valid. 
1270
1271         No change in functionality.
1272
1273         * rendering/RenderBox.h:
1274         (WebCore::RenderBox::hasSameDirectionAs): Deleted.
1275         * rendering/RenderTable.cpp:
1276         (WebCore::RenderTable::tableStartBorderAdjoiningCell):
1277         (WebCore::RenderTable::tableEndBorderAdjoiningCell):
1278         * rendering/RenderTable.h:
1279         (WebCore::haveSameDirection):
1280         * rendering/RenderTableCell.cpp:
1281         (WebCore::RenderTableCell::hasStartBorderAdjoiningTable):
1282         (WebCore::RenderTableCell::hasEndBorderAdjoiningTable):
1283         * rendering/RenderTableCell.h:
1284         (WebCore::RenderTableCell::borderAdjoiningTableStart):
1285         (WebCore::RenderTableCell::borderAdjoiningTableEnd):
1286         * rendering/RenderTableRow.h:
1287         (WebCore::RenderTableRow::borderAdjoiningTableStart):
1288         (WebCore::RenderTableRow::borderAdjoiningTableEnd):
1289         * rendering/RenderTableSection.cpp:
1290         (WebCore::RenderTableSection::borderAdjoiningStartCell):
1291         (WebCore::RenderTableSection::borderAdjoiningEndCell):
1292         (WebCore::RenderTableSection::firstRowCellAdjoiningTableStart):
1293         (WebCore::RenderTableSection::firstRowCellAdjoiningTableEnd):
1294         * rendering/RenderTableSection.h:
1295         (WebCore::RenderTableSection::borderAdjoiningTableStart):
1296         (WebCore::RenderTableSection::borderAdjoiningTableEnd):
1297
1298 2016-07-25  Chris Dumez  <cdumez@apple.com>
1299
1300         ClientRect properties should be on the prototype
1301         https://bugs.webkit.org/show_bug.cgi?id=160165
1302
1303         Reviewed by Geoffrey Garen.
1304
1305         Move ClientRect properties from the instance to the prototype. This
1306         matches the specification, Firefox and Chrome.
1307
1308         Also add a serializer to ClientRect in order to match the specification:
1309         - https://drafts.fxtf.org/geometry/Overview.html#domrectreadonly
1310         - https://heycam.github.io/webidl/#es-serializer
1311
1312         This avoids breaking content that relies on JSON.stringify() to
1313         serialize ClientRect objects.
1314
1315         Tests: fast/css/ClientRect-attributes-prototype.html
1316                fast/css/ClientRect-serialization.html
1317
1318         * CMakeLists.txt:
1319         * WebCore.xcodeproj/project.pbxproj:
1320         * bindings/js/JSBindingsAllInOne.cpp:
1321         * bindings/js/JSClientRectCustom.cpp: Added.
1322         (WebCore::JSClientRect::toJSON):
1323         * bindings/scripts/CodeGeneratorJS.pm:
1324         * dom/ClientRect.idl:
1325
1326 2016-07-25  Chris Dumez  <cdumez@apple.com>
1327
1328         Parameters to DOMImplementation.createDocumentType() should be mandatory and non-nullable
1329         https://bugs.webkit.org/show_bug.cgi?id=160167
1330
1331         Reviewed by Ryosuke Niwa.
1332
1333         Parameters to DOMImplementation.createDocumentType() should be mandatory
1334         and non-nullable:
1335         - https://dom.spec.whatwg.org/#domimplementation
1336
1337         Firefox and Chrome both agree with the specification. However, those
1338         parameters were nullable and optional in WebKit.
1339
1340         Test: fast/dom/DOMImplementation/createDocumentType-parameters.html
1341
1342         * dom/DOMImplementation.idl:
1343
1344 2016-07-25  Wenson Hsieh  <wenson_hsieh@apple.com>
1345
1346         Media controls should not be displayed for a video until it starts playing
1347         https://bugs.webkit.org/show_bug.cgi?id=160092
1348         <rdar://problem/26986673>
1349
1350         Reviewed by Beth Dakin.
1351
1352         For videos that have never played back yet, we should not show media controls. To ensure this
1353         behavior, we ensure that the playback behavior restriction is set upon creating the media
1354         element. This restriction is then removed when the media element begins to play.
1355
1356         Added two new WebKit API tests.
1357
1358         * html/HTMLMediaElement.cpp:
1359         (WebCore::HTMLMediaElement::HTMLMediaElement):
1360
1361 2016-07-25  Jiewen Tan  <jiewen_tan@apple.com>
1362
1363         Rename SubtleCrypto to WebKitSubtleCrypto
1364         https://bugs.webkit.org/show_bug.cgi?id=160067
1365         <rdar://problem/27483617>
1366
1367         Reviewed by Brent Fulgham.
1368
1369         Tests: crypto/webkitSubtle/gc-2.html
1370                crypto/webkitSubtle/gc-3.html
1371                crypto/webkitSubtle/gc.html
1372
1373         Rename Class SubtleCrypto to WebKitSubtleCrypto, and Crypto.subtle to Crypto.webkitSubtle in order
1374         to let the new implementation to reuse the name SubtleCrypto. This renaming should match what our
1375         current JSBindings use, and therefore should not introduce any change of behavoir.
1376
1377         * CMakeLists.txt:
1378         Revise project files for for new file names.
1379         * DerivedSources.cpp:
1380         * DerivedSources.make:
1381         * PlatformEfl.cmake:
1382         * PlatformGTK.cmake:
1383         * PlatformMac.cmake:
1384         * WebCore.xcodeproj/project.pbxproj:
1385         Revise project files for for new file names.
1386         * bindings/js/JSWebKitSubtleCryptoCustom.cpp: Renamed from Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp.
1387         * crypto/WebKitSubtleCrypto.cpp: Renamed from Source/WebCore/crypto/SubtleCrypto.cpp.
1388         * crypto/WebKitSubtleCrypto.h: Renamed from Source/WebCore/crypto/SubtleCrypto.h.
1389         * crypto/WebKitSubtleCrypto.idl: Renamed from Source/WebCore/crypto/SubtleCrypto.idl.
1390         * page/Crypto.cpp:
1391         (WebCore::Crypto::webkitSubtle):
1392         (WebCore::Crypto::subtle): Deleted.
1393         * page/Crypto.h:
1394         * page/Crypto.idl:
1395
1396 2016-07-25  Brady Eidson  <beidson@apple.com>
1397
1398         Allow LocalStorage by default for file URLs.
1399         https://bugs.webkit.org/show_bug.cgi?id=160169
1400
1401         Reviewed by Brent Fulgham.
1402
1403         Test: storage/domstorage/localstorage/file-can-access.html
1404
1405         * page/SecurityOrigin.cpp:
1406         (WebCore::SecurityOrigin::canAccessStorage): Remove the m_universalAccess check for local URLs.
1407
1408 2016-07-25  Nan Wang  <n_wang@apple.com>
1409
1410         AX: AccessibilityRenderObject is adding duplicated children when CSS first-letter is being used.
1411         https://bugs.webkit.org/show_bug.cgi?id=160155
1412
1413         Reviewed by Chris Fleizach.
1414
1415         We were adding the same text node twice if CSS first-letter selector was being used. Added a
1416         check for the inline continuation so that we only add it once. 
1417
1418         Test: accessibility/mac/css-first-letter-children.html
1419
1420         * accessibility/AccessibilityRenderObject.cpp:
1421         (WebCore::firstChildConsideringContinuation):
1422
1423 2016-07-25  Wenson Hsieh  <wenson_hsieh@apple.com>
1424
1425         Media controls on apple.com don't disappear when movie finishes playing
1426         https://bugs.webkit.org/show_bug.cgi?id=160068
1427         <rdar://problem/26668526>
1428
1429         Reviewed by Darin Adler.
1430
1431         When a video ends, it should cause media controls to hide. While current logic
1432         mostly accounts for this, it does not account for programmatic seeks causing
1433         the video to lose its 'ended' status before querying for whether or not to
1434         show media controls.
1435
1436         Three new API tests: large-video-seek-after-ending.html
1437         large-video-hides-controls-after-seek-to-end.html
1438         large-video-seek-to-beginning-and-play-after-ending.html
1439
1440         * html/HTMLMediaElement.cpp:
1441         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
1442         (WebCore::HTMLMediaElement::setPlaying):
1443         * html/MediaElementSession.cpp:
1444         (WebCore::MediaElementSession::canControlControlsManager):
1445         * html/MediaElementSession.h:
1446
1447 2016-07-25  Frederic Wang  <fwang@igalia.com>
1448
1449         Introduce a MathMLOperatorElement class
1450         https://bugs.webkit.org/show_bug.cgi?id=160034
1451
1452         Reviewed by Darin Adler.
1453
1454         No new tests, rendering is unchaned.
1455
1456         * CMakeLists.txt: Add MathMLOperatorElement to the build file.
1457         * WebCore.xcodeproj/project.pbxproj: Ditto.
1458         * mathml/MathMLAllInOne.cpp: Ditto.
1459         * mathml/MathMLOperatorElement.cpp: New DOM class for <mo> element.
1460         (WebCore::MathMLOperatorElement::MathMLOperatorElement):
1461         (WebCore::MathMLOperatorElement::create):
1462         (WebCore::MathMLOperatorElement::parseAttribute): Handle mo attributes.
1463         (WebCore::MathMLOperatorElement::createElementRenderer): Create RenderMathMLOperator.
1464         * mathml/MathMLOperatorElement.h: Declare a class deriving from MathMLTextElement.
1465         * mathml/MathMLTextElement.cpp: Remove all the RenderMathMLOperator parts.
1466         (WebCore::MathMLTextElement::MathMLTextElement): Remove inline keyword so that the class can
1467         be overriden.
1468         (WebCore::MathMLTextElement::parseAttribute): Remove code handled in MathMLOperatorElement.
1469         (WebCore::MathMLTextElement::createElementRenderer): Ditto.
1470         * mathml/MathMLTextElement.h: Make class and members overridable.
1471         * mathml/mathtags.in: Map mo to MathMLOperatorElement.
1472         * rendering/mathml/RenderMathMLOperator.cpp:
1473         (WebCore::RenderMathMLOperator::RenderMathMLOperator): Make the constructor take a
1474         MathMLOperatorElement.
1475         * rendering/mathml/RenderMathMLOperator.h: Ditto.
1476
1477 2016-07-25  Darin Adler  <darin@apple.com>
1478
1479         Speed up make process slightly by improving "list of files" idiom
1480         https://bugs.webkit.org/show_bug.cgi?id=160164
1481
1482         Reviewed by Mark Lam.
1483
1484         * DerivedSources.make: Change rules that build lists of files to only run when
1485         DerivedSources.make has been modified since the last time they were run. Since the
1486         list of files are inside this file, this is safe, and this is faster than always
1487         comparing and regenerating the file containing the list of files each time.
1488
1489 2016-07-24  Wenson Hsieh  <wenson_hsieh@apple.com>
1490
1491         The web process hangs when computing elements-based snap points for a container with large max scroll offset
1492         https://bugs.webkit.org/show_bug.cgi?id=152605
1493         <rdar://problem/25353661>
1494
1495         Reviewed by Simon Fraser.
1496
1497         Fixes a bug in the computation of axis snap points. The ScrollSnapPoints object, which tracks
1498         snap points along a particular axis, has two flags, hasRepeat and usesElements. For elements-
1499         based snapping, both flags would be turned on, since StyleBuilderConverter::convertScrollSnapPoints
1500         short-circuits for elements-based snapping and does not default usesRepeat to false. To address this,
1501         we make ScrollSnapPoints not repeat(100%) by default.
1502
1503         Test: css3/scroll-snap/scroll-snap-elements-container-larger-than-children.html
1504
1505         * css/StyleBuilderConverter.h:
1506         (WebCore::StyleBuilderConverter::convertScrollSnapPoints): Deleted.
1507         * rendering/style/StyleScrollSnapPoints.cpp:
1508         (WebCore::ScrollSnapPoints::ScrollSnapPoints):
1509
1510 2016-07-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1511
1512         REGRESSION(r200931): Invalid cast in highestAncestorToWrapMarkup()
1513         https://bugs.webkit.org/show_bug.cgi?id=160163
1514
1515         Reviewed by Michael Catanzaro.
1516
1517         Since r200931 the result of enclosingNodeOfType() in highestAncestorToWrapMarkup() is downcasted to Element, but
1518         the result of enclosingNodeOfType() can be a Node that is not an Element, in this case is Text. The cast is not
1519         needed at all since that node is passed to editingIgnoresContent() and selectionFromContentsOfNode() and both
1520         receive a Node not an Element.
1521
1522         * editing/markup.cpp:
1523         (WebCore::highestAncestorToWrapMarkup): Remove invalid cast.
1524
1525 2016-07-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1526
1527         [Coordinated Graphics] ASSERTION FAILED: m_coordinator->isFlushingLayerChanges() in fast/repaint/animation-after-layer-scroll.html
1528         https://bugs.webkit.org/show_bug.cgi?id=160156
1529
1530         Reviewed by Michael Catanzaro.
1531
1532         So, we fixed an assertion in r203663, but now is hitting the next one. As explained in bug #160142, flush
1533         compositing state can be triggered in tests by RenderLayerCompositor::layerTreeAsText(), without the coordinator
1534         even noticing it, so the assert can be just removed.
1535
1536         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1537         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): Remove incorrect assert.
1538
1539 2016-07-25  Zalan Bujtas  <zalan@apple.com>
1540
1541         EllipsisBox ctor's isVertical parameter should read isHorizontal.
1542         https://bugs.webkit.org/show_bug.cgi?id=160153
1543
1544         Reviewed by Andreas Kling.
1545
1546         It indicates whether the ellipsis box is horizontal. (both the callsites
1547         and the parent class use isHorizontal)
1548
1549         No change in functionality.
1550
1551         * rendering/EllipsisBox.cpp:
1552         (WebCore::EllipsisBox::EllipsisBox):
1553         * rendering/EllipsisBox.h:
1554
1555 2016-07-25  Sergio Villar Senin  <svillar@igalia.com>
1556
1557         [css-grid] Implement repeat(auto-fit)
1558         https://bugs.webkit.org/show_bug.cgi?id=159771
1559
1560         Reviewed by Darin Adler.
1561
1562         The auto-fit keyword works exactly as the already implemented auto-fill except that all
1563         empty tracks collapse (became 0px). Absolutely positioned items do not participate on the
1564         layout of the grid so they are not considered (a grid with only absolutely positioned items
1565         is considered an empty grid).
1566
1567         Whenever a track collapses the gutters on either side do also collapse. When a collapsed
1568         track's gutters collapse, they coincide exactly. If one side of a collapsed track does not
1569         have a gutter then collapsing its gutters results in no gutter on either "side" of the
1570         collapsed track.
1571
1572         In practice this means that is not possible to know the gap between 2 consecutive auto
1573         repeat tracks without examining some others whenever there are collapsed tracks.
1574
1575         Uncommented the auto-fit cases from Mozilla tests. They have to be adapted as the reftest
1576         machinery requires all the content to be rendered in the original 800x600 viewport.
1577
1578         Tests: fast/css-grid-layout/grid-auto-fit-columns.html
1579         fast/css-grid-layout/grid-auto-fit-rows.html
1580         fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-1.html
1581         fast/css-grid-layout/mozilla/grid-repeat-auto-fill-fit-005-part-2.html
1582
1583         * css/CSSComputedStyleDeclaration.cpp:
1584         (WebCore::valueForGridTrackList): Use the newly added trackSizesForComputedStyle().
1585         * rendering/RenderGrid.cpp:
1586         (WebCore::RenderGrid::computeTrackBasedLogicalHeight):
1587         (WebCore::RenderGrid::computeTrackSizesForDirection):
1588         (WebCore::RenderGrid::isEmptyAutoRepeatTrack):
1589         (WebCore::RenderGrid::gridGapForDirection): Returns the gap directly from the style.
1590         (WebCore::RenderGrid::guttersSize): Computes the gap between a startLine and an
1591         endLine. This method may need to inspect some other surrounding tracks to compute the gap.
1592         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
1593         (WebCore::RenderGrid::computeIntrinsicLogicalHeight):
1594         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1595         (WebCore::RenderGrid::gridTrackSize):
1596         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
1597         (WebCore::RenderGrid::computeAutoRepeatTracksCount):
1598         (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat): Returns a Vector with the auto
1599         repeat tracks that are going to be collapsed because they're empty.
1600         (WebCore::RenderGrid::placeItemsOnGrid):
1601         (WebCore::RenderGrid::trackSizesForComputedStyle): Used by ComputedStyle logic to print the
1602         size of tracks. Added in order to hide the actual contents of m_columnPositions and
1603         m_rowPositions to the outter world.
1604         (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
1605         (WebCore::RenderGrid::gridAreaBreadthForChild):
1606         (WebCore::RenderGrid::populateGridPositionsForDirection): Added some extra code to compute
1607         gaps as they cannot be directly added between tracks in case of having collapsed tracks.
1608         (WebCore::RenderGrid::columnAxisOffsetForChild):
1609         (WebCore::RenderGrid::rowAxisOffsetForChild):
1610         (WebCore::RenderGrid::offsetBetweenTracks): Deleted.
1611         * rendering/RenderGrid.h: Made some API private. Added new required methods/attributes.
1612
1613         * css/CSSComputedStyleDeclaration.cpp:
1614         (WebCore::valueForGridTrackList):
1615         * rendering/RenderGrid.cpp:
1616         (WebCore::RenderGrid::computeTrackBasedLogicalHeight):
1617         (WebCore::RenderGrid::computeTrackSizesForDirection):
1618         (WebCore::RenderGrid::hasAutoRepeatEmptyTracks):
1619         (WebCore::RenderGrid::isEmptyAutoRepeatTrack):
1620         (WebCore::RenderGrid::gridGapForDirection):
1621         (WebCore::RenderGrid::guttersSize):
1622         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
1623         (WebCore::RenderGrid::computeIntrinsicLogicalHeight):
1624         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1625         (WebCore::RenderGrid::gridTrackSize):
1626         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
1627         (WebCore::RenderGrid::computeAutoRepeatTracksCount):
1628         (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat):
1629         (WebCore::RenderGrid::placeItemsOnGrid):
1630         (WebCore::RenderGrid::trackSizesForComputedStyle):
1631         (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
1632         (WebCore::RenderGrid::assumedRowsSizeForOrthogonalChild):
1633         (WebCore::RenderGrid::gridAreaBreadthForChild):
1634         (WebCore::RenderGrid::populateGridPositionsForDirection):
1635         (WebCore::RenderGrid::columnAxisOffsetForChild):
1636         (WebCore::RenderGrid::rowAxisOffsetForChild):
1637         (WebCore::RenderGrid::offsetBetweenTracks): Deleted.
1638         * rendering/RenderGrid.h:
1639
1640 2016-07-24  Frederic Wang  <fwang@igalia.com>
1641
1642         Move parsing of display, displaystyle and mathvariant attributes into MathML element classes
1643         https://bugs.webkit.org/show_bug.cgi?id=159623
1644
1645         Reviewed by Brent Fulgham.
1646
1647         No new tests, already covered by existing tests.
1648
1649         * mathml/MathMLElement.cpp:
1650         (WebCore::MathMLElement::parseMathVariantAttribute): Move helper function to parse the
1651         mathvariant attribute.
1652         (WebCore::MathMLElement::getSpecifiedDisplayStyle): Helper function to set the displaystyle
1653         value from the attribute specified on the MathML element.
1654         (WebCore::MathMLElement::getSpecifiedMathVariant): Helper function to set the mathvariant
1655         value from the attribute specified on the MathML element.
1656         * mathml/MathMLElement.h: Move the enum for mathvariant values and declare new members.
1657         (WebCore::MathMLElement::acceptsDisplayStyleAttribute): Indicate whether the element accepts
1658         displaystyle attribute (false for most of them).
1659         (WebCore::MathMLElement::acceptsMathVariantAttribute): Indicate whether the element accepts
1660         mathvariant attribute (false for most of them).
1661         * mathml/MathMLInlineContainerElement.cpp:
1662         (WebCore::MathMLInlineContainerElement::acceptsDisplayStyleAttribute): Add mstyle and mtable
1663         to the list of elements accepting the displaystyle attribute.
1664         (WebCore::MathMLInlineContainerElement::acceptsMathVariantAttribute): Add mstyle to the list
1665         of elements accepting the mathvariant attribute.
1666         (WebCore::MathMLInlineContainerElement::parseAttribute): Mark displaystyle and mathvariant
1667         dirty if necessary. Also use the new accepts*Attribute function.
1668         * mathml/MathMLInlineContainerElement.h: Declare overridden accepts*Attribute members.
1669         * mathml/MathMLMathElement.cpp:
1670         (WebCore::MathMLMathElement::getSpecifiedDisplayStyle): Override acceptsDisplayStyleAttribute
1671         so that the display attribute is also used to set the default value if the displaystyle
1672         attribute is absent.
1673         (WebCore::MathMLMathElement::parseAttribute): Mark displaystyle and mathvariant dirty if
1674         necessary. We directly MathMLElement::parseAttribute to avoid duplicate work.
1675         * mathml/MathMLMathElement.h: Add the math tag to the list of elements accepting the
1676         displaystyle and mathvariant attributes. Declare overridden getSpecifiedDisplayStyle.
1677         * mathml/MathMLTextElement.cpp:
1678         (WebCore::MathMLTextElement::parseAttribute): Mark mathvariant as dirty.
1679         * mathml/MathMLTextElement.h: Add token elements to the list of elements accepting the
1680         mathvariant attribute.
1681         * rendering/mathml/MathMLStyle.cpp:
1682         (WebCore::MathMLStyle::updateStyleIfNeeded): Use the new MathMLElement::MathVariant enum.
1683         (WebCore::MathMLStyle::resolveMathMLStyle):  We no longer parse the display value to
1684         initialize the default value on the math tag, because this is handled in
1685         getSpecifiedDisplayStyle. In general, we also just call getSpecifiedDisplayStyle and
1686         getSpecifiedMathVariant on the MathML elements instead of parsing the displaystyle and
1687         mathvariant attributes here.
1688         (WebCore::MathMLStyle::parseMathVariant): Deleted. This is moved into MathMLElement.
1689         * rendering/mathml/MathMLStyle.h: Use the new MathMLElement::MathVariant enum.
1690         * rendering/mathml/RenderMathMLToken.cpp: Ditto.
1691         (WebCore::mathVariant): Ditto.
1692         (WebCore::RenderMathMLToken::updateMathVariantGlyph): Ditto.
1693
1694 2016-07-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1695
1696         Unreviewed. Remove unneeded header includes from CoordinatedGraphicsLayer.
1697
1698         Not only thjey are not needed, they are a layer violation, CoordinatedGraphicsLayer shouldn't know anything
1699         about Page, Frame and FrameView.
1700
1701         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1702         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1703
1704 2016-07-24  Youenn Fablet  <youenn@apple.com>
1705
1706         [Fetch API] Request should be created with any HeadersInit data
1707         https://bugs.webkit.org/show_bug.cgi?id=159672
1708
1709         Reviewed by Sam Weinig.
1710
1711         Made Request use JSBuiltinConstructor.
1712         This allows initializing newly created Request with a JS built-in function, initializeFetchRequest.
1713         initializeFetchRequest can call @fillFetchHeaders internal built-in to handle any HeadersInit data.
1714         Future effort should be made to migrate more initialization code in initializeFetchRequest.
1715
1716         Made window and worker fetch function as a JS built-in.
1717         This becomes more handy as these new functions can construct the Request object.
1718         They can then call a single private function that takes a Request object as input.
1719         Updated DOMWindowFetch and WorkerGlobalScopeFetch code accordingly.
1720
1721         To enable this, the binding generator is updated to support runtime-enabled JS built-in functions and
1722         private functions atttached to global objects.
1723
1724         Covered by existing and modified tests.
1725         Binding generator test covered by updated binding tests.
1726
1727         * CMakeLists.txt: Adding DOMWindowFetch.js, FetchRequest.js and WorkerGlobalScopeFetch.js built-in files.
1728         * DerivedSources.make: Ditto.
1729         * Modules/fetch/DOMWindowFetch.cpp: Removed overloaded fetch and updated according new signature.
1730         (WebCore::DOMWindowFetch::fetch):
1731         * Modules/fetch/DOMWindowFetch.h: Ditto.
1732         * Modules/fetch/DOMWindowFetch.idl: Making fetch a JS built-in and adding a @fetchRequest private function.
1733         * Modules/fetch/DOMWindowFetch.js: Added.
1734         (fetch):
1735         * Modules/fetch/FetchHeaders.h:
1736         (WebCore::FetchHeaders::setGuard): Used by FetchRequest when initializing headers.
1737         * Modules/fetch/FetchRequest.cpp: 
1738         (WebCore::buildHeaders): Removed as implemented in JS.
1739         (WebCore::FetchRequest::initializeOptions): Added to handle most of the dictionary initialization.
1740         (WebCore::FetchRequest::initializeWith): Method called from built-in constructor function.
1741         (WebCore::FetchRequest::setBody): Corresponding to @setBody private method.
1742         (WebCore::buildBody): Deleted.
1743         * Modules/fetch/FetchRequest.h:
1744         * Modules/fetch/FetchRequest.idl:
1745         * Modules/fetch/FetchRequest.js: Added.
1746         (initializeFetchRequest): Implements fetch Request(input, init) constructor.
1747         * Modules/fetch/FetchResponse.cpp:
1748         (WebCore::FetchResponse::fetch): Removed the construction of FetchRequest in fetch method since it is done by JS built-in code.
1749         * Modules/fetch/FetchResponse.h:
1750         * Modules/fetch/WorkerGlobalScopeFetch.cpp: Removed overloaded fetch and updated according new signature.
1751         (WebCore::WorkerGlobalScopeFetch::fetch):
1752         * Modules/fetch/WorkerGlobalScopeFetch.h: Ditto.
1753         * Modules/fetch/WorkerGlobalScopeFetch.idl: Making fetch a JS built-in and adding a @fetchRequest private function.
1754         * Modules/fetch/WorkerGlobalScopeFetch.js: Added.
1755         (fetch):
1756         * bindings/js/WebCoreBuiltinNames.h: Adding fetchRequest, setBody and Request private identifiers.
1757         * bindings/scripts/CodeGenerator.pm:
1758         (WK_lcfirst): Replacing dOM by dom.
1759         * bindings/scripts/CodeGeneratorJS.pm:
1760         (GenerateImplementation): Adding support for runtime-enabled built-in methods and private methods.
1761         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
1762         (WebCore::JSTestGlobalObject::finishCreation):
1763         (WebCore::jsTestGlobalObjectInstanceFunctionTestPrivateFunction):
1764         * bindings/scripts/test/ObjC/DOMTestGlobalObject.mm:
1765         (-[DOMTestGlobalObject testJSBuiltinFunction]):
1766         * bindings/scripts/test/TestGlobalObject.idl: Adding tests for runtime-enabled global built-in methods and private methods.
1767
1768 2016-07-24  Nan Wang  <n_wang@apple.com>
1769
1770         AX: Video Controls: Volume cannot be adjusted using VO.
1771         https://bugs.webkit.org/show_bug.cgi?id=160107
1772
1773         Reviewed by Dean Jackson.
1774
1775         The volume slider in video tag had 0.01 step which caused the screen reader adjusting it slowly.
1776         Changed the step to 0.05 and added the aria-valuetext attribute to the slider, so that the value
1777         is spoken in percentage. 
1778
1779         Test: accessibility/mac/video-volume-slider-accessibility.html
1780
1781         * Modules/mediacontrols/mediaControlsApple.js:
1782         (Controller.prototype.createControls):
1783         (Controller.prototype.handleVolumeSliderInput):
1784         (Controller.prototype.updateVolume):
1785
1786 2016-07-24  David Kilzer  <ddkilzer@apple.com>
1787
1788         REGRESSION (r203106): Crash in WebCore::MathMLElement::parseMathMLLength()
1789         <https://webkit.org/b/160111>
1790         <rdar://problem/27506489>
1791
1792         Reviewed by Chris Dumez.
1793
1794         Test: mathml/mpadded-crash.html
1795
1796         * mathml/MathMLElement.cpp:
1797         (WebCore::skipLeadingAndTrailingWhitespace): Change to take
1798         StringView parameter instead of String to avoid creating a
1799         temporary String that's released on return.
1800
1801 2016-07-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1802
1803         [Coordinated Graphics] ASSERTION FAILED: !m_flushingLayers in fast/repaint/animation-after-layer-scroll.html
1804         https://bugs.webkit.org/show_bug.cgi?id=160142
1805
1806         Reviewed by Michael Catanzaro.
1807
1808         This only happens in layout tests, because it happens when RenderLayerCompositor::layerTreeAsText() is
1809         called. The thing is that CoordinatedGraphicsLayer::flushCompositingState() calls notifyFlushRequired() that
1810         checks if the coordinator is flusing layers and if not it calls RenderLayerCompositor::notifyFlushRequired() and
1811         returns early. This normally works because the coodinator is the one starting the layer flush, so that when
1812         RenderLayerCompositor::flushPendingLayerChanges() is called the coordinator is always flusing layers. But
1813         RenderLayerCompositor::layerTreeAsText() calls RenderLayerCompositor::flushPendingLayerChanges() directly, so at
1814         that moment the coordinator is not flusing layers, what causes that
1815         CoordinatedGraphicsLayer::flushCompositingState() ends up calling RenderLayerCompositor::notifyFlushRequired()
1816         that schedules a new flush while flusing layers causing the
1817         assertion. CoordinatedGraphicsLayer::flushCompositingState() is always called from
1818         CompositingCoordinator::flushPendingLayerChanges() or RenderLayerCompositor::flushPendingLayerChanges() so we
1819         never need to call RenderLayerCompositor::notifyFlushRequired() from there.
1820
1821         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1822         (WebCore::CoordinatedGraphicsLayer::notifyFlushRequired): This is void now since the return value is not checked anywhere.
1823         (WebCore::CoordinatedGraphicsLayer::flushCompositingState): Remove the call to notifyFlushRequired().
1824         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1825
1826 2016-07-24  Darin Adler  <darin@apple.com>
1827
1828         Adding a new WebCore JavaScript built-in source file does not trigger rebuild of WebCoreJSBuiltins*
1829         https://bugs.webkit.org/show_bug.cgi?id=160115
1830
1831         Reviewed by Youenn Fablet.
1832
1833         * DerivedSources.make: Added a missing dependency so the rule that builds WebCore_BUILTINS_WRAPPERS
1834         kicks in when the list of WebCore_BUILTINS_SOURCES is modified. Also added another missing dependency
1835         so that changes to the JavaScript built-ins Python scripts will also trigger WebCore_BUILTINS_WRAPPERS.
1836
1837         * make-generated-sources.sh: Removed. Was unused.
1838
1839 2016-07-23  Zalan Bujtas  <zalan@apple.com>
1840
1841         Stop isEmpty() from leaking out of SVG.
1842         https://bugs.webkit.org/show_bug.cgi?id=160121
1843
1844         Reviewed by Simon Fraser.
1845
1846         It's unclear what isEmpty() actually means and it doesn't bring any value to Render* classes.
1847
1848         No change in functionality.
1849
1850         * editing/CompositeEditCommand.cpp:
1851         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
1852         * rendering/RenderElement.h:
1853         * rendering/RenderListItem.cpp:
1854         (WebCore::RenderListItem::isEmpty): Deleted.
1855         * rendering/RenderListItem.h:
1856         * rendering/RenderObject.h:
1857         (WebCore::RenderObject::isEmpty): Deleted.
1858         * rendering/RenderRubyRun.cpp:
1859         (WebCore::RenderRubyRun::removeChild):
1860         (WebCore::RenderRubyRun::isEmpty): Deleted.
1861         * rendering/RenderRubyRun.h:
1862         * rendering/mathml/RenderMathMLFenced.cpp:
1863         (WebCore::RenderMathMLFenced::updateFromElement):
1864         (WebCore::RenderMathMLFenced::addChild):
1865         * rendering/mathml/RenderMathMLRoot.cpp:
1866         (WebCore::RenderMathMLRoot::paint):
1867         * rendering/svg/RenderSVGShape.h:
1868
1869 2016-07-23  Zalan Bujtas  <zalan@apple.com>
1870
1871         table*BorderAdjoiningCell and borderAdjoiningCell* should take reference instead of RenderTableCell*.
1872         https://bugs.webkit.org/show_bug.cgi?id=160123
1873
1874         Reviewed by Simon Fraser.
1875
1876         No change in functionality.
1877
1878         * rendering/RenderTable.cpp:
1879         (WebCore::RenderTable::tableStartBorderAdjoiningCell):
1880         (WebCore::RenderTable::tableEndBorderAdjoiningCell):
1881         * rendering/RenderTable.h:
1882         * rendering/RenderTableCell.cpp:
1883         (WebCore::RenderTableCell::computeCollapsedStartBorder):
1884         (WebCore::RenderTableCell::computeCollapsedEndBorder):
1885         * rendering/RenderTableCell.h:
1886         (WebCore::RenderTableCell::borderAdjoiningCellBefore):
1887         (WebCore::RenderTableCell::borderAdjoiningCellAfter):
1888         * rendering/RenderTableCol.cpp:
1889         (WebCore::RenderTableCol::borderAdjoiningCellStartBorder):
1890         (WebCore::RenderTableCol::borderAdjoiningCellEndBorder):
1891         (WebCore::RenderTableCol::borderAdjoiningCellBefore):
1892         (WebCore::RenderTableCol::borderAdjoiningCellAfter):
1893         * rendering/RenderTableCol.h:
1894         * rendering/RenderTableRow.cpp:
1895         (WebCore::RenderTableRow::borderAdjoiningStartCell):
1896         (WebCore::RenderTableRow::borderAdjoiningEndCell):
1897         * rendering/RenderTableRow.h:
1898         * rendering/RenderTableSection.cpp:
1899         (WebCore::RenderTableSection::borderAdjoiningStartCell):
1900         (WebCore::RenderTableSection::borderAdjoiningEndCell):
1901         * rendering/RenderTableSection.h:
1902
1903 2016-07-23  Zalan Bujtas  <zalan@apple.com>
1904
1905         Remove unused enum and stale comment from RenderObject.
1906         https://bugs.webkit.org/show_bug.cgi?id=160122
1907
1908         Reviewed by Simon Fraser.
1909
1910         No change in functionality.
1911
1912         * rendering/RenderBox.h:
1913
1914 2016-07-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1915
1916         [Coordinated Graphics] Lots of flaky tests
1917         https://bugs.webkit.org/show_bug.cgi?id=160118
1918
1919         Reviewed by Michael Catanzaro.
1920
1921         Since the GTK+ ported to threaded compositor (coordinated graphics) there are a lot of flaky tests in the
1922         bots. In manu of the cases the diff shows a different size in the FrameView layer.
1923
1924         This happens for tests run in the same WTR after fast/fixed-layout/fixed-layout.html. This is what happens:
1925
1926          1.- Test fast/fixed-layout/fixed-layout.html runs and sets fixed layout to true and fixed layout size to 400x400
1927          2.- When it finishes TestController::resetStateToConsistentValues() is called.
1928          3.- Blank URL is loaded after state has been updated
1929          4.- Then Reset message is handled in the web process and Internals::resetToConsistentState() resets the fixed
1930              layout state and size.
1931          5.- onresize happens and the handler set in fast/fixed-layout/fixed-layout.html is invoked setting the fixed
1932              layout to true and size to 400x400 again.
1933          6.- about_blank is then loaded with the fixed layout enabled, as well as other tests after this one.
1934
1935         In addition to this, coordinated graphics uses a fixedVisibleContentRect in ScrollView that is never reset.
1936
1937         * platform/ScrollView.cpp:
1938         (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea): Only use m_fixedVisibleContentRect when
1939         fixed layout is enabled.
1940         (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize): Ditto.
1941         (WebCore::ScrollView::visibleContentRectInternal): Ditto.
1942         * testing/Internals.cpp:
1943         (WebCore::Internals::resetToConsistentState): Reset also the m_fixedVisibleContentRect.
1944
1945 2016-07-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1946
1947         [Coordinated Graphics] Test imported/blink/svg/custom/svg-image-layers-crash.html crashes
1948         https://bugs.webkit.org/show_bug.cgi?id=160078
1949
1950         Reviewed by Michael Catanzaro.
1951
1952         This is a merge of Blink r155373.
1953         https://chromiumcodereview.appspot.com/20789004
1954
1955         Disable accelerated compositing for SVGImage content layers. SVGImageChromeClient does not support it.
1956
1957         Fixes imported/blink/svg/custom/svg-image-layers-crash.html.
1958
1959         * svg/graphics/SVGImage.cpp:
1960         (WebCore::SVGImage::dataChanged):
1961
1962 2016-07-23  Commit Queue  <commit-queue@webkit.org>
1963
1964         Unreviewed, rolling out r203641.
1965         https://bugs.webkit.org/show_bug.cgi?id=160116
1966
1967         It broke make-based builds (Requested by youenn on #webkit).
1968
1969         Reverted changeset:
1970
1971         "[Fetch API] Request should be created with any HeadersInit
1972         data"
1973         https://bugs.webkit.org/show_bug.cgi?id=159672
1974         http://trac.webkit.org/changeset/203641
1975
1976 2016-07-23  Youenn Fablet  <youenn@apple.com>
1977
1978         [Fetch API] Request should be created with any HeadersInit data
1979         https://bugs.webkit.org/show_bug.cgi?id=159672
1980
1981         Reviewed by Sam Weinig.
1982
1983         Made Request use JSBuiltinConstructor.
1984         This allows initializing newly created Request with a JS built-in function, initializeFetchRequest.
1985         initializeFetchRequest can call @fillFetchHeaders internal built-in to handle any HeadersInit data.
1986         Future effort should be made to migrate more initialization code in initializeFetchRequest.
1987
1988         Made window and worker fetch function as a JS built-in.
1989         This becomes more handy as these new functions can construct the Request object.
1990         They can then call a single private function that takes a Request object as input.
1991         Updated DOMWindowFetch and WorkerGlobalScopeFetch code accordingly.
1992
1993         To enable this, the binding generator is updated to support runtime-enabled JS built-in functions and
1994         private functions atttached to global objects.
1995
1996         Covered by existing and modified tests.
1997         Binding generator test covered by updated binding tests.
1998
1999         * CMakeLists.txt: Adding DOMWindowFetch.js, FetchRequest.js and WorkerGlobalScopeFetch.js built-in files.
2000         * DerivedSources.make: Ditto.
2001         * Modules/fetch/DOMWindowFetch.cpp: Removed overloaded fetch and updated according new signature.
2002         (WebCore::DOMWindowFetch::fetch):
2003         * Modules/fetch/DOMWindowFetch.h: Ditto.
2004         * Modules/fetch/DOMWindowFetch.idl: Making fetch a JS built-in and adding a @fetchRequest private function.
2005         * Modules/fetch/DOMWindowFetch.js: Added.
2006         (fetch):
2007         * Modules/fetch/FetchHeaders.h:
2008         (WebCore::FetchHeaders::setGuard): Used by FetchRequest when initializing headers.
2009         * Modules/fetch/FetchRequest.cpp: 
2010         (WebCore::buildHeaders): Removed as implemented in JS.
2011         (WebCore::FetchRequest::initializeOptions): Added to handle most of the dictionary initialization.
2012         (WebCore::FetchRequest::initializeWith): Method called from built-in constructor function.
2013         (WebCore::FetchRequest::setBody): Corresponding to @setBody private method.
2014         (WebCore::buildBody): Deleted.
2015         * Modules/fetch/FetchRequest.h:
2016         * Modules/fetch/FetchRequest.idl:
2017         * Modules/fetch/FetchRequest.js: Added.
2018         (initializeFetchRequest): Implements fetch Request(input, init) constructor.
2019         * Modules/fetch/FetchResponse.cpp:
2020         (WebCore::FetchResponse::fetch): Removed the construction of FetchRequest in fetch method since it is done by JS built-in code.
2021         * Modules/fetch/FetchResponse.h:
2022         * Modules/fetch/WorkerGlobalScopeFetch.cpp: Removed overloaded fetch and updated according new signature.
2023         (WebCore::WorkerGlobalScopeFetch::fetch):
2024         * Modules/fetch/WorkerGlobalScopeFetch.h: Ditto.
2025         * Modules/fetch/WorkerGlobalScopeFetch.idl: Making fetch a JS built-in and adding a @fetchRequest private function.
2026         * Modules/fetch/WorkerGlobalScopeFetch.js: Added.
2027         (fetch):
2028         * bindings/js/WebCoreBuiltinNames.h: Adding fetchRequest, setBody and Request private identifiers.
2029         * bindings/scripts/CodeGenerator.pm:
2030         (WK_lcfirst): Replacing dOM by dom.
2031         * bindings/scripts/CodeGeneratorJS.pm:
2032         (GenerateImplementation): Adding support for runtime-enabled built-in methods and private methods.
2033         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
2034         (WebCore::JSTestGlobalObject::finishCreation):
2035         (WebCore::jsTestGlobalObjectInstanceFunctionTestPrivateFunction):
2036         * bindings/scripts/test/ObjC/DOMTestGlobalObject.mm:
2037         (-[DOMTestGlobalObject testJSBuiltinFunction]):
2038         * bindings/scripts/test/TestGlobalObject.idl: Adding tests for runtime-enabled global built-in methods and private methods.
2039
2040 2016-07-23  Frederic Wang  <fwang@igalia.com>
2041
2042         Reset font-style on the <math> element
2043         https://bugs.webkit.org/show_bug.cgi?id=160074
2044
2045         Reviewed by Darin Adler.
2046
2047         Mathematical formulas with italic font-style render poorly (slanted operators, mathvariant
2048         italic etc). We align on Gecko and make the user agent stylesheet reset the font-style to
2049         'normal' by default. This addresses the concrete use case of formula inside theorem or
2050         proposition statements, which are often written in italic.
2051
2052         Test: mathml/presentation/math-font-style.html
2053
2054         * css/mathml.css:
2055         (math): Reset the font-style to normal.
2056
2057 2016-07-23  Frederic Wang  <fwang@igalia.com>
2058
2059         [MathML] PaintInfo state is not properly restored after applyTransform.
2060         https://bugs.webkit.org/show_bug.cgi?id=160077
2061
2062         Reviewed by Simon Fraser.
2063
2064         PaintInfo::applyTransform modifies PaintInfo::rect and the original state is not properly
2065         restored by GraphicsContextStateSaver. To avoid some weird rendering bugs in MathOperator
2066         and RenderMathMLMenclose, we follow what is done in SVG renderers and make a copy of the
2067         original PaintInfo before applying the transform.
2068
2069         Test: mathml/presentation/bug160077.html
2070
2071         * rendering/mathml/MathOperator.cpp:
2072         (WebCore::MathOperator::paint):
2073         * rendering/mathml/RenderMathMLMenclose.cpp:
2074         (WebCore::RenderMathMLMenclose::paint):
2075
2076 2016-07-23  Youenn Fablet  <youenn@apple.com>
2077
2078         [Fetch API] Fetch response stream should enqueue Uint8Array
2079         https://bugs.webkit.org/show_bug.cgi?id=160083
2080
2081         Reviewed by Sam Weinig.
2082
2083         Covered by updated tests.
2084
2085         Before enqueuing, ReadableStreamController::enqueue will convert ArrayBuffer as Uint8Array.
2086         It also returns a boolean whether the operation is successful or not.
2087
2088         If returned value is false, calling code will stop loading or if everything is loaded it will refrain from closing the stream.
2089         The enqueuing should be succesful except in OutOfMemory cases. This case is not yet handled in test cases.
2090
2091         Updated the code to remove templated enqueuing as Fetch has no use of it.
2092
2093         * Modules/fetch/FetchBody.cpp:
2094         (WebCore::FetchBody::consumeAsStream): Do not close the stream if enqueuing failed.
2095         * Modules/fetch/FetchBodyOwner.cpp:
2096         (WebCore::FetchBodyOwner::blobChunk): Stop blob loading if enqueuing failed.
2097         * Modules/fetch/FetchResponse.cpp:
2098         (WebCore::FetchResponse::BodyLoader::didReceiveData): Stop resource loading if enqueuing failed.
2099         (WebCore::FetchResponse::consumeBodyAsStream): Ditto.
2100         * Modules/fetch/FetchResponseSource.h:
2101         * bindings/js/ReadableStreamController.h:
2102         (WebCore::ReadableStreamController::enqueue):
2103         (WebCore::ReadableStreamController::enqueue<RefPtr<JSC::ArrayBuffer>>): Deleted.
2104
2105 2016-07-22  Youenn Fablet  <youenn@apple.com>
2106
2107         Use a private property to implement FetchResponse.body getter
2108         https://bugs.webkit.org/show_bug.cgi?id=159808
2109
2110         Reviewed by Sam Weinig.
2111
2112         Covered by existing test sets.
2113
2114         Previously, body was handled as a CachedAttribute.
2115         Using a private property will allow direct use of this property from JS built-ins which will allow easier
2116         handling of ReadableStream cloning in Response.clone.
2117         Also, this allows removing some binding custom code.
2118
2119         Updated redirect and error static methods to take NewObject keyword, as this removes a search into cached wrappers.
2120         Ditto for createReadableStreamSource.
2121
2122         * CMakeLists.txt: Removing JSFetchResponseCustom.cpp.
2123         * Modules/fetch/FetchResponse.idl: Adding createReadableStreamSource and isDisturbed private functions.
2124         Making body getter a JSBuiltin.
2125         * Modules/fetch/FetchResponse.js:
2126         (body): Adding getter which will call createReadableStreamSource if needed.
2127         * WebCore.xcodeproj/project.pbxproj: Removing JSFetchResponseCustom.cpp.
2128         * bindings/js/JSFetchResponseCustom.cpp: Removed.
2129         * bindings/js/ReadableStreamController.cpp:
2130         (WebCore::createReadableStream): Deleted.
2131         (WebCore::getReadableStreamReader): Deleted.
2132         * bindings/js/ReadableStreamController.h: Removing unneeded ReadableStream helper routine now that they can be
2133         handled within JS built-in code.
2134         * bindings/js/WebCoreBuiltinNames.h: Adding @createReadableStreamSource, @isDisturbed  and @Response identifiers.
2135
2136 2016-07-22  Zalan Bujtas  <zalan@apple.com>
2137
2138         Handle cases when IOSurface initialization fails.
2139         https://bugs.webkit.org/show_bug.cgi?id=160006
2140         <rdar://problem/27495102>
2141
2142         Reviewed by Tim Horton and Simon Fraser.
2143
2144         This is an additional fix to r203514 to check if IOSurface initialization was successful.
2145
2146         Unable to test.
2147
2148         * platform/graphics/cg/ImageBufferCG.cpp:
2149         (WebCore::ImageBuffer::ImageBuffer):
2150         * platform/graphics/cocoa/IOSurface.h: Merge 2 c'tors.
2151         * platform/graphics/cocoa/IOSurface.mm: Remove redundant IOSurface::create() code.  
2152         (WebCore::IOSurface::create):
2153         (WebCore::IOSurface::createFromImage):
2154         (WebCore::IOSurface::IOSurface):
2155         (WebCore::IOSurface::convertToFormat):
2156
2157 2016-07-22  Wenson Hsieh  <wenson_hsieh@apple.com>
2158
2159         Media controls should be displayed for media in media documents
2160         https://bugs.webkit.org/show_bug.cgi?id=160104
2161         <rdar://problem/27438936>
2162
2163         Reviewed by Myles C. Maxfield.
2164
2165         Make videos that would otherwise not have been large enough or have the right
2166         aspect ratio cause media controls to appear. This is because media elements in
2167         a media document are implied to be main content.
2168
2169         Added a new API test.
2170
2171         * html/MediaElementSession.cpp:
2172         (WebCore::MediaElementSession::canControlControlsManager):
2173
2174 2016-07-22  Myles C. Maxfield  <mmaxfield@apple.com>
2175
2176         All dancers with bunny ears are female
2177         https://bugs.webkit.org/show_bug.cgi?id=160102
2178         <rdar://problem/27453479>
2179
2180         Reviewed by Simon Fraser.
2181
2182         In r203330 I added support for new emoji group candidates. I accidentally
2183         missed one of the new emoji code points.
2184
2185         Tests: editing/deleting/delete-emoji.html:
2186                fast/text/emoji-gender-2-9.html:
2187                fast/text/emoji-gender-9.html:
2188                fast/text/emoji-gender-fe0f-9.html:
2189
2190         * platform/text/CharacterProperties.h:
2191         (WebCore::isEmojiGroupCandidate):
2192
2193 2016-07-22  Chris Dumez  <cdumez@apple.com>
2194
2195         Parameter to HTMLCollection.item() / namedItem() should be mandatory
2196         https://bugs.webkit.org/show_bug.cgi?id=160099
2197
2198         Reviewed by Sam Weinig.
2199
2200         Parameter to HTMLCollection.item() / namedItem() should be mandatory:
2201         - https://dom.spec.whatwg.org/#interface-htmlcollection
2202         - https://html.spec.whatwg.org/multipage/infrastructure.html#htmlformcontrolscollection
2203         - https://html.spec.whatwg.org/multipage/infrastructure.html#the-htmloptionscollection-interface
2204
2205         Firefox and Chrome agree with the specification.
2206
2207         No new tests, rebaselined existing tests.
2208
2209         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
2210         (WebCore::JSHTMLFormControlsCollection::namedItem):
2211         * html/HTMLCollection.idl:
2212         * html/HTMLFormControlsCollection.idl:
2213         * html/HTMLOptionsCollection.idl:
2214
2215 2016-07-22  Chris Dumez  <cdumez@apple.com>
2216
2217         First parameter to Window.getComputedStyle() should be mandatory and non-nullable
2218         https://bugs.webkit.org/show_bug.cgi?id=160097
2219
2220         Reviewed by Ryosuke Niwa.
2221
2222         First parameter to Window.getComputedStyle() should be mandatory and
2223         non-nullable:
2224         - https://drafts.csswg.org/cssom/#extensions-to-the-window-interface
2225
2226         Firefox and Chrome agree with the specification.
2227
2228         Test: fast/dom/Window/getComputedStyle-missing-parameter.html
2229
2230         * css/CSSComputedStyleDeclaration.cpp:
2231         (WebCore::ComputedStyleExtractor::ComputedStyleExtractor):
2232         (WebCore::CSSComputedStyleDeclaration::CSSComputedStyleDeclaration):
2233         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2234         (WebCore::CSSComputedStyleDeclaration::copyProperties):
2235         (WebCore::CSSComputedStyleDeclaration::length):
2236         (WebCore::CSSComputedStyleDeclaration::item):
2237         (WebCore::CSSComputedStyleDeclaration::getPropertyValue):
2238         * css/CSSComputedStyleDeclaration.h:
2239         * dom/Document.idl:
2240         * inspector/InspectorCSSAgent.cpp:
2241         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
2242         * page/DOMWindow.cpp:
2243         (WebCore::DOMWindow::getComputedStyle):
2244         * page/DOMWindow.h:
2245         * page/DOMWindow.idl:
2246         * testing/Internals.cpp:
2247         (WebCore::Internals::computedStyleIncludingVisitedInfo):
2248         * testing/Internals.h:
2249         * testing/Internals.idl:
2250
2251 2016-07-22  Brady Eidson  <beidson@apple.com>
2252
2253         Removing IndexedDatabases that have stored blobs doesn't remove the blob files.
2254         https://bugs.webkit.org/show_bug.cgi?id=160089
2255
2256         Reviewed by Darin Adler.
2257
2258         Tested by API test IndexedDB.StoreBlobThenDelete.
2259
2260         Blob filenames exist in the IDB directory with the name "[0-9]+.blob".
2261         
2262         That is, one or more digits, followed by ".blob".
2263         
2264         So when we delete an IndexedDB.sqlite3 and related files, we should delete those blob files as well.
2265         
2266         * Modules/indexeddb/server/IDBServer.cpp:
2267         (WebCore::IDBServer::removeAllDatabasesForOriginPath):
2268
2269 2016-07-22  Chris Dumez  <cdumez@apple.com>
2270
2271         Fix default parameter values for window.alert() / prompt() / confirm()
2272         https://bugs.webkit.org/show_bug.cgi?id=160085
2273
2274         Reviewed by Ryosuke Niwa.
2275
2276         Fix default parameter values for window.alert() / prompt() / confirm() to
2277         match the specification:
2278         - https://html.spec.whatwg.org/multipage/browsers.html#the-window-object
2279
2280         They should default to the empty string, not the string "undefined".
2281
2282         Firefox and chrome agree with the specification.
2283
2284         No new tests, updated existing test.
2285
2286         * page/DOMWindow.h:
2287         * page/DOMWindow.idl:
2288
2289 2016-07-22  Daniel Bates  <dabates@apple.com>
2290
2291         CSP: object-src and plugin-types directives are not respected for plugin replacements
2292         https://bugs.webkit.org/show_bug.cgi?id=159761
2293         <rdar://problem/27365724>
2294
2295         Reviewed by Brent Fulgham.
2296
2297         Apply the Content Security Policy (CSP) object-src and plugin-types directives to content that will
2298         load with a plugin replacement.
2299
2300         Tests: security/contentSecurityPolicy/object-src-none-blocks-quicktime-plugin-replacement.html
2301                security/contentSecurityPolicy/object-src-none-blocks-youtube-plugin-replacement.html
2302                security/contentSecurityPolicy/plugins-types-allows-quicktime-plugin-replacement.html
2303                security/contentSecurityPolicy/plugins-types-allows-youtube-plugin-replacement.html
2304                security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement-without-mime-type.html
2305                security/contentSecurityPolicy/plugins-types-blocks-quicktime-plugin-replacement.html
2306                security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html
2307                security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html
2308
2309         * html/HTMLPlugInImageElement.cpp:
2310         (WebCore::HTMLPlugInImageElement::allowedToLoadPluginContent): Added.
2311         (WebCore::HTMLPlugInImageElement::requestObject): Only request loading plugin content if we
2312         are allowed to load such content.
2313         * html/HTMLPlugInImageElement.h:
2314         * loader/SubframeLoader.cpp:
2315         (WebCore::SubframeLoader::pluginIsLoadable): Removed code to check CSP as we will check CSP
2316         earlier in HTMLPlugInImageElement::requestObject().
2317         (WebCore::SubframeLoader::requestPlugin): Ditto.
2318         (WebCore::SubframeLoader::isPluginContentAllowedByContentSecurityPolicy): Deleted; moved implementation
2319         to HTMLPlugInImageElement::allowedToLoadPluginContent().
2320         (WebCore::SubframeLoader::requestObject): Deleted.
2321         * loader/SubframeLoader.h:
2322         * page/csp/ContentSecurityPolicy.cpp:
2323         (WebCore::ContentSecurityPolicy::upgradeInsecureRequestIfNeeded): Changed signature from a non-const
2324         function to a const function since these functions do not modify |this|.
2325         * page/csp/ContentSecurityPolicy.h: 
2326
2327 2016-07-22  Chris Dumez  <cdumez@apple.com>
2328
2329         Parameters to Node.replaceChild() / insertBefore() should be mandatory
2330         https://bugs.webkit.org/show_bug.cgi?id=160091
2331
2332         Reviewed by Darin Adler.
2333
2334         Parameters to Node.replaceChild() / insertBefore() should be mandatory:
2335         - https://dom.spec.whatwg.org/#node
2336
2337         The compatibility risk should be low since Firefox and Chrome both agree
2338         with the specification and because it does not make much sense to omit
2339         parameters when using this API.
2340
2341         No new tests, rebaselined existing tests.
2342
2343         * bindings/js/JSNodeCustom.cpp:
2344         (WebCore::JSNode::insertBefore):
2345         (WebCore::JSNode::replaceChild):
2346
2347 2016-07-22  Chris Dumez  <cdumez@apple.com>
2348
2349         Parameter to Node.contains() should be mandatory
2350         https://bugs.webkit.org/show_bug.cgi?id=160084
2351
2352         Reviewed by Darin Adler.
2353
2354         Parameter to Node.contains() should be mandatory as per the
2355         specification:
2356         - https://dom.spec.whatwg.org/#node
2357
2358         The compatibility risk should be low because both Firefox and Chrome
2359         both agree with the specification. Also, it does not make much sense
2360         to call this API without parameter.
2361
2362         No new tests, rebaselined existing tests.
2363
2364         * dom/Node.idl:
2365
2366 2016-07-22  Said Abou-Hallawa  <sabouhallawa@apple.com>
2367
2368         [iOS] REGRESSION(203378): PDFDocumentImage::updateCachedImageIfNeeded() uses the unscaled size when deciding whether to cache the PDF image
2369         https://bugs.webkit.org/show_bug.cgi?id=159933
2370
2371         Reviewed by Simon Fraser.
2372
2373         We need to use the scaled size when deciding whether to cache the PDF image
2374         or not. This is because ImageBuffer takes the display resolution into account
2375         which gives higher resolution for the image when zooming.
2376
2377         * platform/graphics/cg/PDFDocumentImage.cpp:
2378         (WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
2379
2380 2016-07-22  Chris Dumez  <cdumez@apple.com>
2381
2382         First parameter to getElementById() should be mandatory
2383         https://bugs.webkit.org/show_bug.cgi?id=160087
2384
2385         Reviewed by Darin Adler.
2386
2387         First parameter to getElementById() should be mandatory:
2388         - https://dom.spec.whatwg.org/#nonelementparentnode
2389         - https://www.w3.org/TR/SVG/struct.html#InterfaceSVGSVGElement
2390
2391         Both Firefox and Chrome agree with the specification.
2392
2393         Test: svg/dom/SVGSVGElement-getElementById.html
2394
2395         * dom/NonElementParentNode.idl:
2396         * svg/SVGSVGElement.idl:
2397
2398 2016-07-22  Chris Dumez  <cdumez@apple.com>
2399
2400         Parameter to Node.lookupPrefix() / lookupNamespaceURI() / isDefaultNamespace() should be mandatory
2401         https://bugs.webkit.org/show_bug.cgi?id=160086
2402
2403         Reviewed by Darin Adler.
2404
2405         Parameter to Node.lookupPrefix() / lookupNamespaceURI() / isDefaultNamespace()
2406         should be mandatory:
2407         - https://dom.spec.whatwg.org/#node
2408
2409         Firefox and Chrome both agree with the specification.
2410
2411         No new tests, rebaselined existing tests.
2412
2413         * dom/Node.idl:
2414
2415 2016-07-22  Chris Dumez  <cdumez@apple.com>
2416
2417         Parameter to Node.compareDocumentPosition() should be mandatory and non-nullable
2418         https://bugs.webkit.org/show_bug.cgi?id=160071
2419
2420         Reviewed by Ryosuke Niwa.
2421
2422         
2423         Parameter to Node.compareDocumentPosition() should be mandatory and
2424         non-nullable:
2425         - https://dom.spec.whatwg.org/#interface-node
2426
2427         Firefox and Chrome agree with the specification so the compatibility
2428         risk should be low. Also, it does not make much sense to call this
2429         operation without parameter.
2430
2431         No new tests, rebaselined existing tests.
2432
2433         * accessibility/AccessibilityObject.cpp:
2434         (WebCore::rangeClosestToRange):
2435         * dom/AuthorStyleSheets.cpp:
2436         (WebCore::AuthorStyleSheets::addStyleSheetCandidateNode):
2437         * dom/Node.cpp:
2438         (WebCore::compareDetachedElementsPosition):
2439         (WebCore::Node::compareDocumentPosition):
2440         * dom/Node.h:
2441         * dom/Node.idl:
2442         * dom/Position.h:
2443         (WebCore::operator<):
2444         * html/HTMLFormElement.cpp:
2445         (WebCore::HTMLFormElement::formElementIndexWithFormAttribute):
2446         (WebCore::HTMLFormElement::formElementIndex):
2447         * rendering/RenderNamedFlowThread.cpp:
2448         (WebCore::RenderNamedFlowThread::nextRendererForElement):
2449         (WebCore::compareRenderNamedFlowFragments):
2450         (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
2451
2452 2016-07-22  Konstantin Tokarev  <annulen@yandex.ru>
2453
2454         [cmake] Removed obsolete plugins/win directory
2455         https://bugs.webkit.org/show_bug.cgi?id=160081
2456
2457         Reviewed by Per Arne Vollan.
2458
2459         It was removed in r178219.
2460
2461         No new tests needed.
2462
2463         * PlatformWin.cmake:
2464
2465 2016-07-22  Youenn Fablet  <youenn@apple.com>
2466
2467         run-builtins-generator-tests should be able to test WebCore builtins wrapper with more than one file
2468         https://bugs.webkit.org/show_bug.cgi?id=159921
2469
2470         Reviewed by Brian Burg.
2471
2472         Covered by existing and added built-ins tests.
2473
2474         Updating built system according ---wrappers-only new meaning.
2475         builtin generator is now called for each individual built-in file plus once for WebCore wrapper files.
2476         WebCore wrapper files allow handling things like conditionally guarded features.
2477         They also remove the need to use built-ins macros outside generated code.
2478
2479         * CMakeLists.txt:
2480         * DerivedSources.make:
2481
2482 2016-07-21  Frederic Wang  <fwang@igalia.com>
2483
2484         Move parsing of accentunder and accent attributes from renderer to element classes
2485         https://bugs.webkit.org/show_bug.cgi?id=159625
2486
2487         Reviewed by Brent Fulgham.
2488
2489         We introduce a new MathMLUnderOverElement that is used for elements munder, mover and
2490         munderover in order to create RenderMathMLUnderOver and parse and expose the values of the
2491         accent and accentunder attributes. This is one more step toward moving MathML attribute
2492         parsing to the DOM (bug 156536). We also do minor clean-up for this and previous renderer
2493         classes that no longer do attribute parsing: the MathMLNames namespace is no longer necessary
2494         and constructors can take a more accurate element type.
2495
2496         No new tests, already covered by existing test.
2497
2498         * CMakeLists.txt: Add MathMLUnderOverElement files.
2499         * WebCore.xcodeproj/project.pbxproj: Ditto.
2500         * mathml/MathMLAllInOne.cpp: Ditto.
2501         * mathml/MathMLElement.cpp:
2502         (WebCore::MathMLElement::cachedBooleanAttribute): Add parsing of boolean attributes.
2503         * mathml/MathMLElement.h: New type and helper functions for boolean attributes.
2504         * mathml/MathMLInlineContainerElement.cpp:
2505         (WebCore::MathMLInlineContainerElement::createElementRenderer): Remove handling of
2506         under/over/underover elements.
2507         * mathml/MathMLScriptsElement.cpp:
2508         (WebCore::MathMLScriptsElement::MathMLScriptsElement): Remove inline keyword to avoid link
2509         errors now that MathMLUnderOverElement overrides that class.
2510         * mathml/MathMLScriptsElement.h: Allow MathMLUnderOverElement to override this class.
2511         * mathml/MathMLUnderOverElement.cpp:
2512         (WebCore::MathMLUnderOverElement::MathMLUnderOverElement):
2513         (WebCore::MathMLUnderOverElement::create):
2514         (WebCore::MathMLUnderOverElement::accent): Helper function to access the accent value.
2515         (WebCore::MathMLUnderOverElement::accentUnder): Helper function to access the accentunder value.
2516         (WebCore::MathMLUnderOverElement::parseAttribute): Make accent and accentunder dirty.
2517         (WebCore::MathMLUnderOverElement::createElementRenderer): Create RenderMathMLUnderOver
2518         * mathml/MathMLUnderOverElement.h:
2519         * mathml/mathtags.in: Map under/over/underover to MathMLUnderOverElement.
2520         * rendering/mathml/RenderMathMLFraction.cpp: Remove MathMLNames and make the constructor
2521         take a MathMLFractionElement.
2522         (WebCore::RenderMathMLFraction::RenderMathMLFraction):
2523         * rendering/mathml/RenderMathMLFraction.h:
2524         * rendering/mathml/RenderMathMLPadded.cpp: Remove MathMLNames and make the constructor
2525         take a MathMLPaddedElement.
2526         (WebCore::RenderMathMLPadded::RenderMathMLPadded):
2527         * rendering/mathml/RenderMathMLPadded.h:
2528         * rendering/mathml/RenderMathMLScripts.cpp: Remove MathMLNames and make the constructor
2529         take a MathMLScriptsElement. Also rename scriptsElement() to element().
2530         (WebCore::RenderMathMLScripts::RenderMathMLScripts):
2531         (WebCore::RenderMathMLScripts::element):
2532         (WebCore::RenderMathMLScripts::getScriptMetricsAndLayoutIfNeeded):
2533         (WebCore::RenderMathMLScripts::scriptsElement): Deleted.
2534         * rendering/mathml/RenderMathMLScripts.h:
2535         * rendering/mathml/RenderMathMLUnderOver.cpp: Remove MathMLNames and make the constructor
2536         take a RenderMathMLUnderOver.
2537         (WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver):
2538         (WebCore::RenderMathMLUnderOver::element):
2539         (WebCore::RenderMathMLUnderOver::hasAccent): Use the helper functions for accent and accentunder.
2540         * rendering/mathml/RenderMathMLUnderOver.h:
2541
2542 2016-07-21  Chris Dumez  <cdumez@apple.com>
2543
2544         Parameter to Node.isSameNode() / isEqualNode() should be mandatory
2545         https://bugs.webkit.org/show_bug.cgi?id=160070
2546
2547         Reviewed by Ryosuke Niwa.
2548
2549         Parameter to Node.isSameNode() / isEqualNode() should be mandatory as
2550         per the specification:
2551         - https://dom.spec.whatwg.org/#interface-node
2552
2553         Chrome and Firefox agree with the specification (although Firefox does
2554         not support isSameNode()).
2555
2556         No new tests, rebaselined existing tests.
2557
2558         * dom/Node.idl:
2559
2560 2016-07-21  Chris Dumez  <cdumez@apple.com>
2561
2562         Parameter to Document.createEvent() should be mandatory
2563         https://bugs.webkit.org/show_bug.cgi?id=160065
2564
2565         Reviewed by Darin Adler.
2566
2567         Parameter to Document.createEvent() should be mandatory as per the
2568         specification:
2569         - https://dom.spec.whatwg.org/#document
2570
2571         We already throw anyway when the parameter is omitted because we use
2572         "undefined" as event type, which is invalid. However, we throw the
2573         wrong exception.
2574
2575         Firefox and Chrome agree with the specification here.
2576
2577         No new tests, rebaselined existing tests.
2578
2579         * dom/Document.idl:
2580
2581 2016-07-21  Brian Burg  <bburg@apple.com>
2582
2583         REGRESSION(r62549): Objective-C DOM bindings sometimes fail to regenerate when CodeGenerator.pm is modified
2584         https://bugs.webkit.org/show_bug.cgi?id=160031
2585
2586         Reviewed by Darin Adler.
2587
2588         This bug was caused by a refactoring 6 years ago. Not all uses of a variable
2589         were renamed, so the ObjC bindings target pattern was not specifying any
2590         build scripts as target dependencies.
2591
2592         * DerivedSources.make: Standardize on {COMMON,JS,DOM}_BINDINGS_SCRIPTS.
2593
2594 2016-07-21  Darin Adler  <darin@apple.com>
2595
2596         Remove unneeded content attribute name "playsinline"
2597         https://bugs.webkit.org/show_bug.cgi?id=160069
2598
2599         Reviewed by Chris Dumez.
2600
2601         * html/HTMLVideoElement.idl: Removed explicit content attribute name on Reflect
2602         attribute since it is the same as the name that the code generator will generate.
2603
2604 2016-07-21  Chris Dumez  <cdumez@apple.com>
2605
2606         Make parameters to Element.getElementsBy*() operations mandatory
2607         https://bugs.webkit.org/show_bug.cgi?id=160060
2608
2609         Reviewed by Darin Adler.
2610
2611         Make parameters to Element.getElementsBy*() operations mandatory to
2612         match the specification:
2613         - https://dom.spec.whatwg.org/#interface-element
2614
2615         Firefox and Chrome agree with the specification so the compatibility
2616         risk should be low.
2617
2618         It makes very little sense to call these operations without parameter,
2619         especially considering WebKit uses the string "undefined" if the
2620         parameter is omitted.
2621
2622         No new tests, rebaselined existing tests.
2623
2624         * dom/Element.idl:
2625
2626 2016-07-21  Chris Dumez  <cdumez@apple.com>
2627
2628         Make parameters mandatory for attribute-related API on Element
2629         https://bugs.webkit.org/show_bug.cgi?id=160059
2630
2631         Reviewed by Ryosuke Niwa.
2632
2633         Make parameters mandatory for attribute-related API on Element to match
2634         the specification:
2635         - https://dom.spec.whatwg.org/#element
2636
2637         Firefox and Chrome agree with the specification. Calling this API
2638         without the parameters does not make much sense, especially considering
2639         WebKit uses the string "undefined" when the parameter is omitted.
2640
2641         No new tests, rebaselined existing tests.
2642
2643         * dom/Element.idl:
2644
2645 2016-07-21  Myles C. Maxfield  <mmaxfield@apple.com>
2646
2647         Remove support for deprecated SPI inlineMediaPlaybackRequiresPlaysInlineAttribute
2648         https://bugs.webkit.org/show_bug.cgi?id=160066
2649
2650         Reviewed by Dean Jackson.
2651
2652         r203520 deprecated inlineMediaPlaybackRequiresPlaysInlineAttribute in favor of
2653         allowsInlineMediaPlaybackWithPlaysInlineAttribute and
2654         allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute. The old
2655         inlineMediaPlaybackRequiresPlaysInlineAttribute is SPI and was never released
2656         to the public. Therefore, it can be removed safely.
2657
2658         No new tests because there is no behavior change.
2659
2660         * page/Settings.cpp:
2661         * page/Settings.in:
2662         * testing/InternalSettings.cpp:
2663         (WebCore::InternalSettings::Backup::Backup): Deleted.
2664         (WebCore::InternalSettings::Backup::restoreTo): Deleted.
2665         (WebCore::InternalSettings::setInlineMediaPlaybackRequiresPlaysInlineAttribute): Deleted.
2666         * testing/InternalSettings.h:
2667         * testing/InternalSettings.idl:
2668
2669 2016-07-21  Dean Jackson  <dino@apple.com>
2670
2671         REGRESSION (r202927): The internal size of the ImageBuffer is scaled twice by the context scaleFactor
2672         https://bugs.webkit.org/show_bug.cgi?id=159981
2673         <rdar://problem/27429465>
2674
2675         Reviewed by Myles Maxfield.
2676
2677         The change to propagate color spaces through ImageBuffers created an
2678         alternate version of createCompatibleBuffer. This version accidentally
2679         attempted to take the display resolution (i.e. hidpi) into account
2680         when creating the buffer, which meant it was being applied twice.
2681
2682         The fix is simply to remove that logic. The caller of the method
2683         will take the resolution into account, the same way they did
2684         with the old createCompatibleBuffer method.
2685
2686         Test: fast/hidpi/pdf-image-scaled.html
2687
2688         * platform/graphics/cg/ImageBufferCG.cpp:
2689         (WebCore::ImageBuffer::createCompatibleBuffer): Don't calculate
2690         a resolution - just use the value of 1.0.
2691
2692 2016-07-21  John Wilander  <wilander@apple.com>
2693
2694         Block mixed content synchronous XHR
2695         https://bugs.webkit.org/show_bug.cgi?id=105462
2696         <rdar://problem/13666424>
2697
2698         Reviewed by Brent Fulgham.
2699
2700         Test: http/tests/security/mixedContent/insecure-xhr-sync-in-main-frame.html
2701
2702         * loader/DocumentThreadableLoader.cpp:
2703         (WebCore::DocumentThreadableLoader::loadRequest):
2704
2705 2016-07-21  Chris Dumez  <cdumez@apple.com>
2706
2707         Make parameters to Document.getElementsBy*() operations mandatory
2708         https://bugs.webkit.org/show_bug.cgi?id=160050
2709
2710         Reviewed by Daniel Bates.
2711
2712         Make parameters to Document.getElementsBy*() operations mandatory to
2713         match the specification:
2714         - https://dom.spec.whatwg.org/#interface-document
2715
2716         Firefox and Chrome agree with the specification so the compatibility
2717         risk should be low.
2718
2719         It makes very little sense to call these operations without parameter,
2720         especially considering WebKit uses the string "undefined" if the
2721         parameter is omitted.
2722
2723         No new tests, rebaselined existing tests.
2724
2725         * dom/Document.idl:
2726
2727 2016-07-21  Nan Wang  <n_wang@apple.com>
2728
2729         AX: aria-label not being used correctly in accessible name calculation of heading
2730         https://bugs.webkit.org/show_bug.cgi?id=160009
2731
2732         Reviewed by Chris Fleizach.
2733
2734         Actually we are exposing the correct information for heading objects. On macOS, 
2735         VoiceOver should handle the logic that picks the right information to speak.
2736         On iOS, VoiceOver is speaking the static text child instead of the heading object.
2737         So we should set the accessibilityLabel of the static text based on the parent's 
2738         alternate label.
2739
2740         Test: accessibility/ios-simulator/heading-with-aria-label.html
2741
2742         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2743         (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
2744
2745 2016-07-21  Saam Barati  <sbarati@apple.com>
2746
2747         op_add/ValueAdd should be an IC in all JIT tiers
2748         https://bugs.webkit.org/show_bug.cgi?id=159649
2749
2750         Reviewed by Benjamin Poulain.
2751
2752         * ForwardingHeaders/jit/JITMathICForwards.h: Added.
2753
2754 2016-07-21  Chris Dumez  <cdumez@apple.com>
2755
2756         Make parameters mandatory for Document.create*() operations
2757         https://bugs.webkit.org/show_bug.cgi?id=160047
2758
2759         Reviewed by Ryosuke Niwa.
2760
2761         Make parameters mandatory for Document.create*() operations:
2762         createTextNode(), createComment(), createCDataSection(),
2763         createAttribute() and createProcessingInstruction().
2764
2765         This matches the specification:
2766         - https://dom.spec.whatwg.org/#interface-document
2767
2768         Firefox and Chrome both agree with the specification so the
2769         compatibility risk should be low. Also WebKit uses the string
2770         "undefined" when the parameter is omitted, which is not very
2771         helpful.
2772
2773         No new tests, rebaselined existing tests.
2774
2775         * dom/Document.idl:
2776
2777 2016-07-21  Chris Dumez  <cdumez@apple.com>
2778
2779         Fix null handling of SVGAngle/SVGLength.valueAsString attribute
2780         https://bugs.webkit.org/show_bug.cgi?id=160025
2781
2782         Reviewed by Ryosuke Niwa.
2783
2784         Fix null handling of SVGAngle/SVGLength.valueAsString attribute
2785         to match the specification:
2786         - https://www.w3.org/TR/SVG2/types.html#InterfaceSVGAngle
2787         - https://www.w3.org/TR/SVG2/types.html#InterfaceSVGLength
2788
2789         In particular, this patch drops [TreatNullAs=EmptyString] IDL
2790         extended attribute from this attribute. This is not supposed
2791         to change behavior given that both "" and "null" are invalid
2792         numbers and the specification says to throw a SYNTAX_ERR in
2793         this case.
2794
2795         However, WebKit currently ignores assignments to "" instead
2796         of throwing. As a result, assigning to null will now throw
2797         instead of being ignored. The compatibility risk should be
2798         low because both Firefox and Chrome throw when assigning
2799         null.
2800
2801         I did not change the behavior when assigning to "" because
2802         it is a bit out of scope for this patch and browsers to not
2803         seem to agree:
2804         - Firefox throws
2805         - Chrome set value to "0"
2806         - WebKit ignores the assignment
2807
2808         The specification seems to agree with Firefox as far as I
2809         can tell given that "" is not a valid number as per:
2810         - https://www.w3.org/TR/css3-values/#numbers
2811
2812         Test: svg/dom/valueAsString-null.html
2813
2814         * svg/SVGAngle.idl:
2815         * svg/SVGLength.idl:
2816
2817 2016-07-21  Chris Dumez  <cdumez@apple.com>
2818
2819         Fix null handling of HTMLFontElement.color
2820         https://bugs.webkit.org/show_bug.cgi?id=160036
2821
2822         Reviewed by Ryosuke Niwa.
2823
2824         Fix null handling of HTMLFontElement.color to match the specification:
2825         - https://html.spec.whatwg.org/#htmlfontelement
2826
2827         We are supposed to treat null as the empty string. Both Firefox and
2828         Chrome agree with the specification.
2829
2830         No new tests, rebaselined existing tests.
2831
2832         * html/HTMLFontElement.idl:
2833
2834 2016-07-21  Chris Dumez  <cdumez@apple.com>
2835
2836         Fix null handling for several HTMLTableElement attributes
2837         https://bugs.webkit.org/show_bug.cgi?id=160041
2838
2839         Reviewed by Ryosuke Niwa.
2840
2841         Fix null handling for several HTMLTableElement attributes to match the
2842         specification:
2843         - https://html.spec.whatwg.org/#HTMLTableElement-partial
2844
2845         The attributes in question are 'bicolor', 'cellSpacing' and
2846         'cellPadding'. We are supposed to treat null as the empty string for
2847         these attributes.
2848
2849         Firefox and Chrome both agree with the specification.
2850
2851         No new tests, rebaselined existing tests.
2852
2853         * html/HTMLTableElement.idl:
2854
2855 2016-07-21  Chris Dumez  <cdumez@apple.com>
2856
2857         Fix null handling for HTMLObjectElement.border
2858         https://bugs.webkit.org/show_bug.cgi?id=160040
2859
2860         Reviewed by Ryosuke Niwa.
2861
2862         Fix null handling for HTMLObjectElement.border to match the specification:
2863         - https://html.spec.whatwg.org/#HTMLObjectElement-partial
2864
2865         We are supposed to treat null as the empty string.
2866
2867         Both Firefox and Chrome agree with the specification.
2868
2869         No new tests, rebaselined existing tests.
2870
2871         * html/HTMLObjectElement.idl:
2872
2873 2016-07-21  Chris Dumez  <cdumez@apple.com>
2874
2875         Fix null handling for td.bgColor / tr.bgColor
2876         https://bugs.webkit.org/show_bug.cgi?id=160043
2877
2878         Reviewed by Ryosuke Niwa.
2879
2880         Fix null handling for td.bgColor / tr.bgColor to match the
2881         specification:
2882         - https://html.spec.whatwg.org/#HTMLTableCellElement-partial
2883         - https://html.spec.whatwg.org/#HTMLTableRowElement-partial
2884
2885         We are supposed to treat null as the empty string.
2886
2887         Firefox and Chrome both agree with the specification.
2888
2889         No new tests, rebaselined existing tests.
2890
2891         * html/HTMLTableCellElement.idl:
2892         * html/HTMLTableRowElement.idl:
2893
2894 2016-07-21  Chris Dumez  <cdumez@apple.com>
2895
2896         Fix null handling for several HTMLBodyElement attributes
2897         https://bugs.webkit.org/show_bug.cgi?id=160044
2898
2899         Reviewed by Ryosuke Niwa.
2900
2901         Fix null handling for several HTMLBodyElement attributes to match the
2902         specification:
2903         - https://html.spec.whatwg.org/#HTMLBodyElement-partial
2904
2905         The attributes in question are: 'text', 'link', 'vlink', 'alink' and
2906         'bgcolor'.
2907
2908         We are supposed to treat null as the empty string for these attributes.
2909
2910         Firefox and Chrome both agree with the specification.
2911
2912         No new tests, rebaselined existing tests.
2913
2914         * html/HTMLBodyElement.idl:
2915
2916 2016-07-21  Chris Dumez  <cdumez@apple.com>
2917
2918         Fix null handling for HTMLIFrameElement.marginWidth / marginHeight
2919         https://bugs.webkit.org/show_bug.cgi?id=160037
2920
2921         Reviewed by Ryosuke Niwa.
2922
2923         Fix null handling for HTMLIFrameElement.marginWidth / marginHeight to
2924         match the specification:
2925         - https://html.spec.whatwg.org/#HTMLIFrameElement-partial
2926
2927         We are supposed to treat null as the empty string. Both Firefox and
2928         Chrome agree with the specification.
2929
2930         No new tests, rebaselined existing tests.
2931
2932         * html/HTMLIFrameElement.idl:
2933
2934 2016-07-21  Chris Dumez  <cdumez@apple.com>
2935
2936         Fix null handling for HTMLImageElement.border
2937         https://bugs.webkit.org/show_bug.cgi?id=160039
2938
2939         Reviewed by Ryosuke Niwa.
2940
2941         Fix null handling for HTMLImageElement.border to match the specification:
2942         - https://html.spec.whatwg.org/#HTMLImageElement-partial
2943
2944         We are supposed to treat null as the empty string.
2945
2946         Both Firefox and Chrome agree with the specification.
2947
2948         No new tests, rebaselined existing tests.
2949
2950         * html/HTMLImageElement.idl:
2951
2952 2016-07-21  Daniel Bates  <dabates@apple.com>
2953
2954         REGRESSION: Plugin replaced YouTube Flash videos always have the same width
2955         https://bugs.webkit.org/show_bug.cgi?id=159998
2956         <rdar://problem/27462285>
2957
2958         Reviewed by Simon Fraser.
2959
2960         Fixes an issue where the width of a plugin replaced YouTube video loaded via an HTML embed
2961         element would always have the same width regardless of value of the width attribute.
2962
2963         For YouTube Flash videos the YouTube plugin replacement substitutes a shadow DOM subtree
2964         for the default renderer of an HTML embed element. The root of this shadow DOM subtree
2965         is an HTML div element. Currently we set inline styles on this <div> when it is instantiated.
2966         In particular, we set inline display and position to "inline-block" and "relative", respectively,
2967         and set an invalid height and width (we specify a font weight value instead of a CSS length value
2968         - this causes an ASSERT_NOT_REACHED() assertion failure in StyleBuilderConverter::convertLengthSizing()
2969         in a debug build). These styles never worked as intended and we ultimately created an inline
2970         renderer (ignoring display "inline-block") that had auto width and height. Instead it is sufficient
2971         to remove all these inline styles and create a RenderBlockFlow renderer for this <div> so that it
2972         renders as a block, non-replaced element to achieve the intended illusion that the <embed> is a
2973         single element.
2974
2975         * html/shadow/YouTubeEmbedShadowElement.cpp: Remove unused header HTMLEmbedElement.h and include
2976         header RenderBlockFlow.h. Also update copyright in license block.
2977         (WebCore::YouTubeEmbedShadowElement::YouTubeEmbedShadowElement): Remove inline styles as these
2978         never worked as intended.
2979         (WebCore::YouTubeEmbedShadowElement::createElementRenderer): Override; create a block-flow
2980         renderer for us so that we layout as a block, non-replaced element.
2981         * html/shadow/YouTubeEmbedShadowElement.h:
2982
2983 2016-07-21  Myles C. Maxfield  <mmaxfield@apple.com>
2984
2985         [iPhone] Playing a video on tudou.com plays only sound, no video
2986         https://bugs.webkit.org/show_bug.cgi?id=159967
2987         <rdar://problem/26964090>
2988
2989         Reviewed by Jon Lee, Jeremy Jones, and Anders Carlsson.
2990
2991         WebKit recently starting honoring the playsinline and webkit-playsinline
2992         attribute on iPhones. However, because these attributes previously did
2993         nothing, some sites (such as Todou) were setting them on their content
2994         and expecting that they are not honored. In this specific case, the
2995         video is absolutely positioned to be 1 pixel x 1 pixel.
2996
2997         Previously, with iOS 9, apps could set the allowsInlineMediaPlayback
2998         property on their WKWebView, which would honor the webkit-playsinline
2999         attribute. Safari on iPhones didn't do this.
3000
3001         In order to not break these existing apps, it's important that the
3002         allowsInlineMediaPlayback preference still allows webkit-playsinline
3003         videos to play inline in apps using WKWebView. However, in Safari, these
3004         videos should play fullscreen. (Todou videos have webkit-playsinline
3005         but not playsinline.)
3006
3007         Therefore, in Safari, videos with playsinline should be inline, but
3008         videos with webkit-playsinline should be fullscreen. In apps using
3009         WKWebViews, if the app sets allowsInlineMediaPlayback, then videos with
3010         playsinline should be inline, and videos with webkit-playsinline should
3011         also be inline. Videos on iPad and Mac should all be inline by default.
3012
3013         We can create some truth tables for the cases which need to be covered:
3014
3015         All apps on Mac / iPad:
3016         Presence of playsinline | Presence of webkit-playsinline | Result
3017         ========================|================================|===========
3018         Not present             | Not present                    | Inline
3019         Present                 | Not present                    | Inline
3020         Not Present             | Present                        | Inline
3021         Present                 | Present                        | Inline
3022
3023         Safari on iPhone:
3024         Presence of playsinline | Presence of webkit-playsinline | Result
3025         ========================|================================|===========
3026         Not present             | Not present                    | Fullscreen
3027         Present                 | Not present                    | Inline
3028         Not Present             | Present                        | Fullscreen
3029         Present                 | Present                        | Inline
3030
3031         App on iPhone which sets allowsInlineMediaPlayback:
3032         Presence of playsinline | Presence of webkit-playsinline | Result
3033         ========================|================================|===========
3034         Not present             | Not present                    | Fullscreen
3035         Present                 | Not present                    | Inline
3036         Not Present             | Present                        | Inline
3037         Present                 | Present                        | Inline
3038
3039         The way to distinguish Safari from another app is to create an SPI
3040         boolean preference which Safari can set. This is already how the
3041         iPhone and iPad are differentiated using the requiresPlayInlineAttribute
3042         which Safari sets but other apps don't. However, this preference is
3043         no longer sufficient because Safari should now be discriminating
3044         between the playsinline and webkit-playsinline attributes. Therefore,
3045         this preference should be extended to two boolean preferences, which
3046         this patch adds:
3047
3048         allowsInlineMediaPlaybackWithPlaysInlineAttribute
3049         allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute
3050
3051         Safari on iPhone will set
3052         allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute to true,
3053         and allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute to
3054         false. Other apps on iPhone will get their defaults values (because they
3055         are SPI) which means they will both be true. On iPad and Mac, apps will
3056         use the defaults values where both are false.
3057
3058         This patch adds support for these two preferences, but does not remove
3059         the existing inlineMediaPlaybackRequiresPlaysInlineAttribute preference.
3060         I will remove the exising preference as soon as I update Safari to migrate
3061         off of it.
3062
3063         Test: media/video-playsinline.html
3064
3065         * html/MediaElementSession.cpp:
3066         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
3067         * page/Settings.cpp:
3068         * page/Settings.in:
3069         * testing/InternalSettings.cpp:
3070         (WebCore::InternalSettings::Backup::Backup):
3071         (WebCore::InternalSettings::Backup::restoreTo):
3072         (WebCore::InternalSettings::setAllowsInlineMediaPlaybackWithPlaysInlineAttribute):
3073         (WebCore::InternalSettings::setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute):
3074         * testing/InternalSettings.h:
3075         * testing/InternalSettings.idl:
3076
3077 2016-07-21  Ryosuke Niwa  <rniwa@webkit.org>
3078
3079         Crash accessing null renderer inside WebCore::DeleteSelectionCommand::doApply
3080         https://bugs.webkit.org/show_bug.cgi?id=160011
3081
3082         Reviewed by Chris Dumez.
3083
3084         Add a null pointer check for renderer() call.
3085
3086         Unfortunately no new tests since we don't have a reproduction.
3087
3088         * editing/DeleteSelectionCommand.cpp:
3089         (WebCore::DeleteSelectionCommand::doApply):
3090
3091 2016-07-21  Chris Dumez  <cdumez@apple.com>
3092
3093         The 2 first parameters to DOMImplementation.createDocument() should be mandatory
3094         https://bugs.webkit.org/show_bug.cgi?id=160030
3095
3096         Reviewed by Sam Weinig.
3097
3098         The 2 first parameters to DOMImplementation.createDocument() should be mandatory
3099         as per the specification:
3100         - https://dom.spec.whatwg.org/#domimplementation
3101
3102         Firefox and Chrome both agree with the specification. However, those
3103         parameters were marked as optional in WebKit. Calling this function
3104         without parameters would create a document element whose tag is the
3105         string "undefined", which does not seem helpful. This patch thus
3106         aligns our behavior with the specification and other browsers.
3107
3108         No new tests, rebaselined existing tests.
3109
3110         * dom/DOMImplementation.idl:
3111
3112 2016-07-21  Chris Dumez  <cdumez@apple.com>
3113
3114         Kill legacy valueToStringWithNullCheck() utility function
3115         https://bugs.webkit.org/show_bug.cgi?id=159991
3116
3117         Reviewed by Sam Weinig.
3118
3119         Kill legacy valueToStringWithNullCheck() utility function. Treating null as
3120         a null string is legacy behavior so drop this function so that people are
3121         not tempted to use it. We should be using either:
3122         1. JSValue::toWTFString() for non-nullable DOMStrings
3123         2. valueToStringWithUndefinedOrNullCheck() for nullable DOMStrings
3124         3. valueToStringTreatingNullAsEmptyString() for strings with [TreatNullAs=EmptyString]
3125
3126         No new tests, no web-exposed behavior change.
3127
3128         * bindings/js/JSDOMBinding.cpp:
3129         (WebCore::valueToStringWithNullCheck): Deleted.
3130         * bindings/js/JSDOMBinding.h:
3131         * bindings/js/JSHTMLFrameElementCustom.cpp:
3132         (WebCore::JSHTMLFrameElement::setLocation):
3133         * html/HTMLFrameElement.idl:
3134
3135 2016-07-21  Zalan Bujtas  <zalan@apple.com>
3136
3137         Do not keep invalid IOSurface in ImageBufferData.
3138         https://bugs.webkit.org/show_bug.cgi?id=160005
3139         <rdar://problem/27208636>
3140
3141         Reviewed by Simon Fraser.
3142
3143         When we fail to initialize the IOSurface for the accelerated context, we switch over to
3144         the non-accelerated code path. Since ImageBufferData::surface is used to indicate whether
3145         the graphics context is in accelerated mode, we need to reset it when the initialization fails.
3146
3147         Unable to create a test case.
3148
3149         * platform/graphics/cg/ImageBufferCG.cpp:
3150         (WebCore::ImageBuffer::ImageBuffer):
3151
3152 2016-07-21  Chris Dumez  <cdumez@apple.com>
3153
3154         playsInline IDL attribute has the wrong casing
3155         https://bugs.webkit.org/show_bug.cgi?id=160029
3156         <rdar://problem/27474031>
3157
3158         Reviewed by Jon Lee.
3159
3160         Fix case from video.playsinline to video.playsInline in order to match
3161         the specification:
3162         - https://html.spec.whatwg.org/multipage/embedded-content.html#the-video-element:dom-video-playsinline
3163
3164         It still reflects the "playsinline" content attribute though, as per
3165         the specification:
3166         - https://html.spec.whatwg.org/multipage/embedded-content.html#dom-video-playsinline
3167
3168         No new tests, updated existing test.
3169
3170         * html/HTMLVideoElement.idl:
3171
3172 2016-07-21  Chris Dumez  <cdumez@apple.com>
3173
3174         Drop [TreatNullAs=EmptyString] from CanvasRenderingContext2D.globalCompositeOperation
3175         https://bugs.webkit.org/show_bug.cgi?id=160026
3176
3177         Reviewed by Sam Weinig.
3178
3179         Drop [TreatNullAs=EmptyString] from CanvasRenderingContext2D.globalCompositeOperation
3180         attribute as it does not match the specification:
3181         - https://html.spec.whatwg.org/multipage/scripting.html#canvascompositing
3182
3183         It does not change web-exposed behavior because assigning to "" or "null"
3184         gets ignored as those are not valid operations.
3185
3186         Test: fast/canvas/context-globalCompositeOperation-null.html
3187
3188         * html/canvas/CanvasRenderingContext2D.idl:
3189
3190 2016-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3191
3192         [GTK][Threaded Compositor] Overlay scrollbars shouldn't be a requirement of the threaded compositor
3193         https://bugs.webkit.org/show_bug.cgi?id=160020
3194
3195         Reviewed by Michael Catanzaro.
3196
3197         It has been a requirement only because we didn't really know why frame scrollbars were not rendered when using
3198         the threaded compositor. The reason is that RenderView doesn't use layers for FrameView scrollbars by default,
3199         unless using overlay scrollbars. When using the threaded compositor we really need layers for the FrameView
3200         scrollbars even when not using overlay scrollbars.
3201
3202         * platform/gtk/ScrollbarThemeGtk.cpp:
3203         (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Stop enforcing overlay scrollbars when threaded compositor is enabled.
3204         * rendering/RenderLayerCompositor.cpp:
3205         (WebCore::RenderLayerCompositor::shouldCompositeOverflowControls): Always use layers for scrollbars when
3206         threaded compositor is enabled.
3207
3208 2016-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3209
3210         [Cairo] Fix a crash in fast/canvas/canvas-getImageData-invalid-result-buffer-crash.html
3211         https://bugs.webkit.org/show_bug.cgi?id=160014
3212
3213         Reviewed by Michael Catanzaro.
3214
3215         In r202887 some null checks were added for JSArray::createUninitialized (and related) but not for the
3216         ImageBuffer cairo implementation.
3217
3218         * platform/graphics/cairo/ImageBufferCairo.cpp:
3219         (WebCore::getImageData): Return early if Uint8ClampedArray::createUninitialized() returns nullptr.
3220
3221 2016-07-21  Miguel Gomez  <magomez@igalia.com>
3222
3223         [GTK] The GSTREAMER_GL path in MediaPlayerPrivateGStreamerBase::paintToTextureMapper() is missing a mutex lock
3224         https://bugs.webkit.org/show_bug.cgi?id=160018
3225
3226         Reviewed by Philippe Normand.
3227
3228         Lock the video sample mutex while accessing it.
3229
3230         Covered by existent tests.
3231
3232         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3233         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
3234
3235 2016-07-21  Miguel Gomez  <magomez@igalia.com>
3236
3237         [Threaded Compositor] Flickering when zooming in/out in maps.google.com
3238         https://bugs.webkit.org/show_bug.cgi?id=154069
3239
3240         Reviewed by Carlos Garcia Campos.
3241
3242         Add a new extra buffer to GraphicsContext3D when using the Threaded Compositor,
3243         so it doesn't have to reuse the buffers that are still waiting for composition.
3244
3245         Covered by existing tests.
3246
3247         * platform/graphics/GraphicsContext3D.h:
3248         Add a new texture to use for the rendering. Remove the compositor fbo we were using.
3249         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
3250         (WebCore::GraphicsContext3D::GraphicsContext3D):
3251         Initialize the new texture and remove the previous fbo related code.
3252         (WebCore::GraphicsContext3D::~GraphicsContext3D):
3253         Properly destroy the new texture and remove the previous fbo related code.
3254         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
3255         (WebCore::GraphicsContext3D::reshapeFBOs):
3256         Allocate the new texture and remove the previous fbo allocation.
3257         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3258         (WebCore::GraphicsContext3D::prepareTexture):
3259         Use a single fbo with three textures instead of two fbos with a texture each.
3260         Rotate the three textures usage so:
3261         - m_texture becomes m_compositorTexture to be pushed to the compositor.
3262         - m_intermediateTexture becomes m_texture to receive the next rendering.
3263         - m_compositorTexture becomes m_intermediateTexture.
3264         And add a glFlush() to ensure that the gl commands are sent to the pipeline.
3265         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
3266         (WebCore::GraphicsContext3D::reshapeFBOs):
3267         Allocate the new texture.
3268
3269 2016-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3270
3271         [GTK][Threaded Compositor] Web view background colors don't work
3272         https://bugs.webkit.org/show_bug.cgi?id=159465
3273
3274         Reviewed by Michael Catanzaro.
3275
3276         * rendering/RenderLayerBacking.cpp:
3277         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Initialize frame view layer opacity for platforms not
3278         using the tiled cache layer.
3279
3280 2016-07-20  Youenn Fablet  <youenn@apple.com>
3281
3282         [XHR] Cache response JS object in case of arraybuffer and blob response types
3283         https://bugs.webkit.org/show_bug.cgi?id=128903
3284
3285         Reviewed by Alex Christensen.
3286
3287         Covered by existing and modified tests.
3288
3289         Making response getter a JS builtin that caches response in @response private slot.
3290         Handling invalidation of cached response with @responseCacheIsValid new private method.
3291         Handling creation of cached response with @retrieveResponse new private method which reuses most of
3292         JSXMLHttpRequest::response previous code.
3293
3294         Caching of responses is activated whenever load ended without any error for blob and arraybuffer response types.
3295
3296         Caching of response for document is also activated in case the response getter is used but not if responseXML getter is used.
3297
3298         * CMakeLists.txt: Adding XMLHttpRequest.js.
3299         * DerivedSources.make: Ditto.
3300         * bindings/js/JSXMLHttpRequestCustom.cpp:
3301         (WebCore::JSXMLHttpRequest::retrieveResponse): Implements creation of to-be-cached response.
3302         (WebCore::JSXMLHttpRequest::response): Deleted.
3303         * bindings/js/WebCoreBuiltinNames.h: Adding new private names.
3304         * xml/XMLHttpRequest.cpp:
3305         (WebCore::XMLHttpRequest::didCacheResponse): Renamed from didCacheResponseJSON as all response types are now cached.
3306         (WebCore::XMLHttpRequest::didCacheResponseJSON): Deleted.
3307         * xml/XMLHttpRequest.h:
3308         * xml/XMLHttpRequest.idl:
3309
3310 2016-07-20  Youenn Fablet  <youenn@apple.com>
3311
3312         Remove crossOriginRequestPolicy from ThreadableLoaderOptions
3313         https://bugs.webkit.org/show_bug.cgi?id=159417
3314
3315         Reviewed by Alex Christensen.
3316
3317         No observable change.
3318
3319         * Modules/fetch/FetchLoader.cpp:
3320         (WebCore::FetchLoader::start): DenyCrossOriginRequests -> FetchOptions::Mode::SameOrigin.
3321         * fileapi/FileReaderLoader.cpp:
3322         (WebCore::FileReaderLoader::start): DenyCrossOriginRequests -> FetchOptions::Mode::SameOrigin.
3323         * inspector/InspectorNetworkAgent.cpp:
3324         (WebCore::InspectorNetworkAgent::loadResource): AllowCrossOriginRequests -> FetchOptions::Mode::NoCors.
3325         * loader/DocumentThreadableLoader.cpp:
3326         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Ditto.
3327         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest): UseAccessControl -> FetchOptions::Mode::Cors.
3328         (WebCore::DocumentThreadableLoader::redirectReceived): Ditto.
3329         (WebCore::DocumentThreadableLoader::didReceiveResponse): Ditto.
3330         (WebCore::DocumentThreadableLoader::loadRequest): Use NoCors as option passed to ResourceLoader. This allows
3331         desactivating ResourceLoader CORS checks as they are done in DocumentThreadableLoader right now. In the future,
3332         these checks should be moved to ResourceLoader and DocumentThreadableLoader should directly pass the fetch mode
3333         option.
3334         (WebCore::DocumentThreadableLoader::isAllowedRedirect): AllowCrossOriginRequests -> FetchOptions::Mode::NoCors.
3335         * loader/ThreadableLoader.cpp:
3336         (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Removing CrossOriginRequestPolicy.
3337         * loader/ThreadableLoader.h: Ditto.
3338         * loader/WorkerThreadableLoader.cpp:
3339         (WebCore::LoaderTaskOptions::LoaderTaskOptions): Ditto.
3340         * page/EventSource.cpp:
3341         (WebCore::EventSource::connect): UseAccessControl -> FetchOptions::Mode::Cors.
3342         * workers/Worker.cpp:
3343         (WebCore::Worker::create): DenyCrossOriginRequests -> FetchOptions::Mode::SameOrigin.
3344         * workers/WorkerGlobalScope.cpp:
3345         (WebCore::WorkerGlobalScope::importScripts): AllowCrossOriginRequests -> FetchOptions::Mode::NoCors.
3346         * workers/WorkerScriptLoader.cpp:
3347         (WebCore::WorkerScriptLoader::loadSynchronously):
3348         (WebCore::WorkerScriptLoader::loadAsynchronously):
3349         * workers/WorkerScriptLoader.h:
3350         * xml/XMLHttpRequest.cpp:
3351         (WebCore::XMLHttpRequest::createRequest):
3352
3353 2016-07-20  Chris Dumez  <cdumez@apple.com>
3354
3355         Fix null handling of several Document attributes
3356         https://bugs.webkit.org/show_bug.cgi?id=159997
3357
3358         Reviewed by Ryosuke Niwa.
3359
3360         Fix null handling of the following Document attributes: title, cookie
3361         and domain.
3362
3363         In WebKit, they were all marked as [TreatNullAs=EmptyString], which
3364         does not match the specification:
3365         - https://html.spec.whatwg.org/multipage/dom.html#document
3366
3367         Details for each attribute:
3368         - title: null is now treated as the string "null", thus setting the
3369           document title to "null". This matches Firefox and Chrome.
3370         - cookie: adds a "null" cookie instead of being a no-op. This matches
3371                   both Firefox and Chrome.
3372         - domain: Calls setDomain(String("null")) instead of
3373                   setDomain(String()). This throws an exception because "null"
3374                   is not a suffix of the effective domain name. The behavior
3375                   is the same in Firefox and Chrome. Previously, we were
3376                   already throwing an exception since setting the domain to
3377                   the empty string throws, as per the specification.
3378
3379         Test: http/tests//dom/document-attributes-null-handling.html
3380
3381         * dom/Document.idl:
3382
3383 2016-07-20  Commit Queue  <commit-queue@webkit.org>
3384
3385         Unreviewed, rolling out r203471.
3386         https://bugs.webkit.org/show_bug.cgi?id=160003
3387
3388         many iOS-simulator tests are failing (Requested by litherum on
3389         #webkit).