1 2017-08-18 Jiewen Tan <jiewen_tan@apple.com>
3 [WebCrypto][Mac] Replace CCECCryptorGetKeyComponents with CCECCryptorExportKey for exporting ECC JWKs
4 https://bugs.webkit.org/show_bug.cgi?id=175657
5 <rdar://problem/33797150>
7 Reviewed by Brent Fulgham.
9 CCECCryptorGetKeyComponents returns components in unpadded formats. In some minor cases, the ECC components
10 do need padding. Therefore, we occasionally see some corrupted outputs in JWKs. To overcome that, this patch
11 replaces CCECCryptorGetKeyComponents with CCECCryptorExportKey which does padding all the time.
13 In the meantime, this patch also makes export* methods return OperationError if any error occur in the
14 underlying operations though very unlikely.
16 Test: crypto/subtle/ecdsa-generate-export-import-jwk-sign-verify.html
18 * crypto/algorithms/CryptoAlgorithmECDH.cpp:
19 (WebCore::CryptoAlgorithmECDH::exportKey):
20 * crypto/algorithms/CryptoAlgorithmECDSA.cpp:
21 (WebCore::CryptoAlgorithmECDSA::exportKey):
22 * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
23 (WebCore::CryptoKeyEC::platformAddFieldElements const):
24 * crypto/keys/CryptoKeyEC.cpp:
25 (WebCore::CryptoKeyEC::exportRaw const):
26 (WebCore::CryptoKeyEC::exportJwk const):
27 (WebCore::CryptoKeyEC::exportSpki const):
28 (WebCore::CryptoKeyEC::exportPkcs8 const):
29 * crypto/keys/CryptoKeyEC.h:
30 * crypto/mac/CryptoKeyECMac.cpp:
31 (WebCore::CryptoKeyEC::platformExportRaw const):
32 (WebCore::CryptoKeyEC::platformAddFieldElements const):
33 (WebCore::CryptoKeyEC::platformExportSpki const):
34 (WebCore::CryptoKeyEC::platformExportPkcs8 const):
36 2017-08-18 Per Arne Vollan <pvollan@apple.com>
38 [Win] accessibility/heading-crash-after-hidden.html is a flaky crash.
39 https://bugs.webkit.org/show_bug.cgi?id=173536
41 Reviewed by Brent Fulgham.
43 If the tree state is dirty, accessible objects are deleted while iterating over children
44 under AccessibilityNodeObject::textUnderElement when the style is updated. Make sure the
45 style is updated before this method is called.
47 No new tests, covered by existing tests.
49 * accessibility/win/AccessibilityObjectWrapperWin.cpp:
50 (WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue):
52 2017-08-18 Youenn Fablet <youenn@apple.com>
54 [Cache API] Add response body storage
55 https://bugs.webkit.org/show_bug.cgi?id=175658
57 Reviewed by Alex Christensen.
59 Covered by rebased tests.
60 Tests are still flaky until waiting for end of fetch load is implemented.
62 Adding a response body within CacheStorageConnection::Record.
63 Adding ability to pass this body from/to the main thread.
65 Adding response body consumption into a CacheStorageConnection::Record.
66 Adding response body setting from a CacheStorageConnection::Record.
68 * Modules/beacon/NavigatorBeacon.cpp:
69 (WebCore::NavigatorBeacon::sendBeacon):
70 * Modules/cache/Cache.cpp:
71 (WebCore::Cache::put):
72 (WebCore::toConnectionRecord):
73 (WebCore::Cache::updateRecords):
74 * Modules/cache/CacheStorageConnection.cpp:
75 (WebCore::CacheStorageConnection::copyResponseBody):
76 (WebCore::CacheStorageConnection::isolatedResponseBody):
77 (WebCore::CacheStorageConnection::Record::copy const):
78 * Modules/cache/CacheStorageConnection.h:
79 * Modules/cache/WorkerCacheStorageConnection.cpp:
80 (WebCore::toCrossThreadRecordData):
81 (WebCore::fromCrossThreadRecordData):
82 * Modules/fetch/FetchBody.cpp:
83 (WebCore::FetchBody::bodyAsFormData const):
84 (WebCore::FetchBody::take):
85 (WebCore::FetchBody::bodyForInternalRequest const): Deleted.
86 * Modules/fetch/FetchBody.h:
87 (WebCore::FetchBody::setAsFormData):
88 * Modules/fetch/FetchBodyConsumer.h:
89 (WebCore::FetchBodyConsumer::setData):
90 * Modules/fetch/FetchRequest.cpp:
91 (WebCore::FetchRequest::resourceRequest const):
92 * Modules/fetch/FetchResponse.cpp:
93 (WebCore::FetchResponse::consumeBody):
94 (WebCore::FetchResponse::setBodyData):
95 * Modules/fetch/FetchResponse.h:
97 2017-08-18 Youenn Fablet <youenn@apple.com>
99 [Fetch API] Add support for a callback-based fetch
100 https://bugs.webkit.org/show_bug.cgi?id=175710
102 Reviewed by Alex Christensen.
104 No change of behavior.
106 Moving from a DOMPromise to a Callback taking an ExceptionOr<FetchResponse&>.
107 Updating window and worker call sites.
109 * Modules/fetch/DOMWindowFetch.cpp:
110 (WebCore::DOMWindowFetch::fetch):
111 * Modules/fetch/FetchResponse.cpp:
112 (WebCore::FetchResponse::fetch):
113 (WebCore::FetchResponse::BodyLoader::didFail):
114 (WebCore::FetchResponse::BodyLoader::BodyLoader):
115 (WebCore::FetchResponse::BodyLoader::didReceiveResponse):
116 (WebCore::FetchResponse::BodyLoader::stop):
117 * Modules/fetch/FetchResponse.h:
118 * Modules/fetch/WorkerGlobalScopeFetch.cpp:
119 (WebCore::WorkerGlobalScopeFetch::fetch):
121 2017-08-18 Brady Eidson <beidson@apple.com>
123 Bounce ServiceWorker jobs to the Storage Process.
124 https://bugs.webkit.org/show_bug.cgi?id=175650
126 Reviewed by Andy Estes.
128 No new tests (Covered by both changes and consistencies in existing tests)
130 This lays the groundwork for the SW job queue being in the StorageProcess by actually
131 setting up some objects for IPC communication and actually sending things over the wire.
133 The main point of IPC is the WebCore abstract base class "SWServer::Connection"
135 A collection of them will soon be managed by the SWServer itself in the StorageProcess.
137 That object will be the stand-in for IPC on both the WebProcess and StorageProcess side.
139 Currently, any job that we try to schedule still immediately rejects (though now it does
140 so asynchronously instead of synchronously).
143 * WebCore.xcodeproj/project.pbxproj:
145 * dom/ExceptionData.h: Copied from Source/WebCore/workers/service/ServiceWorkerProvider.h.
146 (WebCore::ExceptionData::toException const):
147 (WebCore::ExceptionData::encode const):
148 (WebCore::ExceptionData::decode):
150 * workers/service/ServiceWorkerContainer.cpp:
151 (WebCore::ServiceWorkerContainer::addRegistration):
152 (WebCore::ServiceWorkerContainer::scheduleJob):
153 * workers/service/ServiceWorkerContainer.h:
155 * workers/service/ServiceWorkerJob.cpp:
156 (WebCore::ServiceWorkerJob::failedWithException):
157 (WebCore::ServiceWorkerJob::data const):
158 * workers/service/ServiceWorkerJob.h:
160 * workers/service/ServiceWorkerJobData.h: Copied from Source/WebCore/workers/service/ServiceWorkerProvider.h.
161 (WebCore::ServiceWorkerJobData::encode const):
162 (WebCore::ServiceWorkerJobData::decode):
164 * workers/service/ServiceWorkerJobType.h: Copied from Source/WebCore/workers/service/ServiceWorkerProvider.h.
166 * workers/service/ServiceWorkerProvider.h:
168 * workers/service/ServiceWorkerRegistrationParameters.h:
170 * workers/service/server/SWServer.cpp: Copied from Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.cpp.
171 (WebCore::SWServer::Connection::scheduleJob):
172 (WebCore::SWServer::Connection::jobRejected):
173 * workers/service/server/SWServer.h: Copied from Source/WebCore/workers/service/ServiceWorkerProvider.h.
174 (WebCore::SWServer::Connection::~Connection):
176 2017-08-18 Chris Dumez <cdumez@apple.com>
178 [Beacon] Add support for quota limitation
179 https://bugs.webkit.org/show_bug.cgi?id=175443
180 <rdar://problem/33729002>
182 Reviewed by Youenn Fablet.
184 LoaderStrategy::startPingLoad() now takes a completion handler parameter, allowing CachedResource::load()
185 to know when a Beacon load is complete. This was needed in order for the fetch in-flight keepalive request
186 quota limit to work properly for beacon loads as well. We need to know when the beacon load completes in
187 order to know if the beacon is in-flight or not and only free up its allocated quota once it is no longer
190 No new tests, updated existing test.
192 * loader/LoaderStrategy.h:
193 * loader/PingLoader.cpp:
194 (WebCore::PingLoader::startPingLoad):
195 * loader/cache/CachedResource.cpp:
196 (WebCore::CachedResource::load):
197 * platform/network/PingHandle.h:
199 2017-08-18 Youenn Fablet <youenn@apple.com>
201 [Cache API] Add a WK2 implementation of CacheStorageConnection
202 https://bugs.webkit.org/show_bug.cgi?id=175640
204 Reviewed by Alex Christensen & Chris Dumez.
206 * Modules/cache/CacheStorageConnection.cpp: Adding Internal error.
207 * Modules/cache/CacheStorageConnection.h: Ditto.
208 * WebCore.xcodeproj/project.pbxproj: Exporting CacheQueryOptions.h header.
210 2017-08-18 Antti Koivisto <antti@apple.com>
212 Factor render tree mutation code from RenderListItem to RenderTreeUpdater
213 https://bugs.webkit.org/show_bug.cgi?id=175718
215 Reviewed by Andreas Kling.
217 We already stopped doing layout time mutations. We can now move the code out too.
219 * WebCore.xcodeproj/project.pbxproj:
220 * rendering/RenderListItem.cpp:
221 (WebCore::isHTMLListElement):
222 (WebCore::getParentOfFirstLineBox): Deleted.
223 (WebCore::firstNonMarkerChild): Deleted.
224 (WebCore::RenderListItem::updateMarkerRenderer): Deleted.
226 Moved to RenderTreeUpdater::ListItem.
228 * rendering/RenderListItem.h:
229 * rendering/RenderListMarker.cpp:
230 (WebCore::RenderListMarker::willBeDestroyed):
231 * rendering/TextAutoSizing.cpp:
232 (WebCore::TextAutoSizingValue::adjustTextNodeSizes):
233 * style/RenderTreeUpdater.cpp:
234 (WebCore::RenderTreeUpdater::pushParent):
235 (WebCore::RenderTreeUpdater::popParent):
236 (WebCore::RenderTreeUpdater::updateBeforeDescendants):
237 (WebCore::RenderTreeUpdater::updateAfterDescendants):
239 Factor pre/post update into functions.
241 (WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
242 * style/RenderTreeUpdater.h:
243 * style/RenderTreeUpdaterListItem.cpp: Added.
245 Mutation functions move here.
247 (WebCore::getParentOfFirstLineBox):
248 (WebCore::firstNonMarkerChild):
249 (WebCore::RenderTreeUpdater::ListItem::updateMarker):
250 * style/RenderTreeUpdaterListItem.h: Added.
252 2017-08-18 Ms2ger <Ms2ger@gmail.com>
254 [GTK] Show controls if a video element isn't allowed to play inline.
255 https://bugs.webkit.org/show_bug.cgi?id=141705
257 Reviewed by Xabier Rodriguez-Calvar.
259 Test: covered by media/video-fullscreeen-only-controls.html [sic].
261 * Modules/mediacontrols/mediaControlsGtk.js:
262 (ControllerGtk.prototype.shouldHaveControls):
264 2017-08-18 Zan Dobersek <zdobersek@igalia.com>
266 [EME] MediaKeySession has to initiate playback resume on HTMLMediaElement
267 https://bugs.webkit.org/show_bug.cgi?id=175671
269 Reviewed by Xabier Rodriguez-Calvar.
271 In MediaKeySession::updateKeyStatuses(), HTMLMediaElement objects that are
272 associated with the MediaKeys instance that created this session have to
273 be notified in order to run the 'Attempt to Resume Playback If Necessary'
276 MediaKeys object now tracks the sessions that were created through it.
277 MediaKeySession object is passed a MediaKeys reference, and has that
278 reference invalidated if/when the MediaKeys object is destroyed.
280 In MediaKeySession::updateKeyStatuses(), a task is now queued, notifying
281 the MediaKeys object, if any, that the associated HTMLMediaElement
282 instances have to run the mentioned algorithm. The associated media
283 elements are stored through CDMClient pointers, with HTMLMediaElement
284 class inheriting from the newly-introduced CDMClient interface.
286 HTMLMediaElement::cdmClientAttemptToResumePlaybackIfNecessary() is left
287 unimplemented for now. The object will attach itself to and detach from
288 the associated MediaKeys object in setMediaKeys() and the destructor,
289 enabling the MediaKeys object to properly dispatch the playback resume
290 requests for the attached clients.
292 * Modules/encryptedmedia/CDMClient.h: Copied from Source/WebCore/Modules/encryptedmedia/MediaKeys.h.
293 (WebCore::CDMClient::~CDMClient):
294 * Modules/encryptedmedia/MediaKeySession.cpp:
295 (WebCore::MediaKeySession::create):
296 (WebCore::MediaKeySession::MediaKeySession):
297 (WebCore::MediaKeySession::detachKeys):
298 (WebCore::MediaKeySession::updateKeyStatuses):
299 * Modules/encryptedmedia/MediaKeySession.h:
300 * Modules/encryptedmedia/MediaKeys.cpp:
301 (WebCore::MediaKeys::~MediaKeys):
302 (WebCore::MediaKeys::createSession):
303 (WebCore::MediaKeys::attachCDMClient):
304 (WebCore::MediaKeys::detachCDMClient):
305 (WebCore::MediaKeys::attemptToResumePlaybackOnClients):
306 * Modules/encryptedmedia/MediaKeys.h:
307 * html/HTMLMediaElement.cpp:
308 (WebCore::HTMLMediaElement::cdmClientAttemptToResumePlaybackIfNecessary):
309 * html/HTMLMediaElement.h:
311 2017-08-18 Commit Queue <commit-queue@webkit.org>
313 Unreviewed, rolling out r220854.
314 https://bugs.webkit.org/show_bug.cgi?id=175716
316 I'm not sure we really need this (Requested by KaL on
321 "[GTK][WPE] Add NTLM authentication enabled API"
322 https://bugs.webkit.org/show_bug.cgi?id=122952
323 http://trac.webkit.org/changeset/220854
325 2017-08-17 Wenson Hsieh <wenson_hsieh@apple.com>
327 [Input Events] Rename inputType "formatForeColor" to "formatFontColor"
328 https://bugs.webkit.org/show_bug.cgi?id=175703
330 Reviewed by Ryosuke Niwa.
332 Renames an inputType value to match the spec. There is no other change in behavior.
333 Rebaselines fast/events/input-events-selection-forecolor-data.html and fast/events/input-events-forecolor-data.html.
335 * editing/EditCommand.cpp:
336 (WebCore::inputTypeNameForEditingAction):
338 2017-08-17 Daewoong Jang <daewoong.jang@navercorp.com>
340 [Curl] Improve multi-threaded networking
341 https://bugs.webkit.org/show_bug.cgi?id=175253
343 Reviewed by Alex Christensen.
345 * platform/network/curl/CurlContext.cpp:
346 (WebCore::CurlMultiHandle::CurlMultiHandle):
347 (WebCore::CurlHandle::CurlHandle):
348 (WebCore::CurlHandle::initialize):
349 (WebCore::CurlHandle::setSslKeyPassword):
350 (WebCore::CurlHandle::setSslErrors):
351 (WebCore::CurlHandle::getSslErrors):
352 * platform/network/curl/CurlContext.h:
353 * platform/network/curl/CurlDownload.cpp:
354 (WebCore::CurlDownload::init):
355 (WebCore::CurlDownload::getResponse const):
356 (WebCore::CurlDownload::setupRequest):
357 (WebCore::CurlDownload::didReceiveHeader):
358 (WebCore::CurlDownload::didReceiveData):
359 (WebCore::CurlDownload::headerCallback):
360 (WebCore::CurlDownload::getTempPath const): Deleted.
361 (WebCore::CurlDownload::getUrl const): Deleted.
362 (WebCore::CurlDownload::downloadFinishedCallback): Deleted.
363 (WebCore::CurlDownload::downloadFailedCallback): Deleted.
364 (WebCore::CurlDownload::receivedDataCallback): Deleted.
365 (WebCore::CurlDownload::receivedResponseCallback): Deleted.
366 * platform/network/curl/CurlDownload.h:
367 * platform/network/curl/ResourceError.h:
368 (WebCore::ResourceError::ResourceError):
369 (WebCore::ResourceError::sslErrors const):
370 (WebCore::ResourceError::setSSLErrors): Deleted.
371 * platform/network/curl/ResourceHandleCurl.cpp:
372 (WebCore::ResourceHandleInternal::initialize):
373 (WebCore::ResourceHandleInternal::didFail):
374 (WebCore::ResourceHandleInternal::dispatchSynchronousJob):
375 * platform/network/curl/SSLHandle.cpp:
376 (WebCore::allowedClientHosts):
377 (WebCore::addAllowedClientCertificate):
378 (WebCore::getSSLClientCertificate):
379 (WebCore::certVerifyCallback):
380 (WebCore::setSSLVerifyOptions):
381 (WebCore::setSSLClientCertificate): Deleted.
382 * platform/network/curl/SSLHandle.h:
384 2017-08-17 Chris Dumez <cdumez@apple.com>
386 Regression(r220817): We should only copy the original request headers for Ping loads
387 https://bugs.webkit.org/show_bug.cgi?id=175679
389 Reviewed by Youenn Fablet.
391 For performance reason, we should only copy the original request headers for Ping loads
392 (Beacon at the moment), not for all CachedResourceRequests.
394 * loader/LoaderStrategy.h:
395 * loader/cache/CachedResource.cpp:
396 (WebCore::CachedResource::CachedResource):
397 (WebCore::CachedResource::load):
398 * loader/cache/CachedResource.h:
399 (WebCore::CachedResource::shouldUsePingLoad):
400 (WebCore::CachedResource::setOriginalRequestHeaders):
401 * loader/cache/CachedResourceLoader.cpp:
402 (WebCore::CachedResourceLoader::requestResource):
403 * loader/cache/CachedResourceRequest.cpp:
404 (WebCore::CachedResourceRequest::CachedResourceRequest):
405 * loader/cache/CachedResourceRequest.h:
406 (WebCore::CachedResourceRequest::releaseResourceRequest):
407 (WebCore::CachedResourceRequest::releaseOriginalRequestHeaders): Deleted.
409 2017-08-17 Don Olmstead <don.olmstead@sony.com>
411 [PAL] Relocate SessionID to root
412 https://bugs.webkit.org/show_bug.cgi?id=175684
414 Reviewed by Alex Christensen.
416 No new tests. No change in functionality.
419 * html/HTMLMediaElement.cpp:
420 * loader/cache/CachedResource.h:
421 * loader/cache/CachedResourceLoader.cpp:
422 * loader/cache/MemoryCache.h:
423 * loader/cocoa/DiskCacheMonitorCocoa.h:
424 * page/CacheStorageProvider.h:
426 * page/PlugInClient.h:
427 * page/SocketProvider.h:
428 * platform/CookiesStrategy.h:
429 * platform/WebCoreCrossThreadCopier.cpp:
430 * platform/network/CacheValidation.h:
431 * platform/network/NetworkStorageSession.cpp:
432 * platform/network/NetworkStorageSession.h:
433 * platform/network/cf/SocketStreamHandleImpl.h:
434 * platform/network/curl/SocketStreamHandleImpl.h:
435 * platform/network/soup/SocketStreamHandleImpl.h:
436 * workers/WorkerGlobalScope.h:
437 * workers/service/ServiceWorkerContainer.h:
438 * workers/service/ServiceWorkerRegistrationParameters.h:
440 2017-08-17 Wenson Hsieh <wenson_hsieh@apple.com>
442 Fix the build on other platforms after r220865
443 https://bugs.webkit.org/show_bug.cgi?id=175683
445 Reviewed by Tim Horton.
447 Instead of special casing iOS 10 behavior with __IPHONE_OS_VERSION_MAX_ALLOWED < 110000, revert to special
448 casing iOS 11 behavior with __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000. This is because other targets that are
449 neither iOS 10 nor 11 will fail the "before iOS 11" compile-time check, and subsequently assume that item
450 providers exist. To fix this, flip the compiler-time checks and the order of codeblocks in the
451 PlatformPasteboard::write methods.
453 There is no change in behavior.
455 * platform/ios/PlatformPasteboardIOS.mm:
456 (WebCore::registerItemToPasteboard):
457 (WebCore::PlatformPasteboard::write):
459 2017-08-17 Michael Catanzaro <mcatanzaro@igalia.com>
461 -Wreturn-type warnings in CryptoKey.cpp and SubtleCrypto.cpp
462 https://bugs.webkit.org/show_bug.cgi?id=175675
464 Reviewed by Jiewen Tan.
466 * crypto/CryptoKey.cpp:
467 (WebCore::CryptoKey::algorithm const):
468 * crypto/SubtleCrypto.cpp:
469 (WebCore::toCryptoKeyUsageBitmap):
470 (WebCore::toKeyData):
472 2017-08-17 Andreas Kling <akling@apple.com>
474 Disable CSS regions at compile time
475 https://bugs.webkit.org/show_bug.cgi?id=175630
477 Reviewed by Antti Koivisto.
479 * Configurations/FeatureDefines.xcconfig:
481 2017-08-17 Wenson Hsieh <wenson_hsieh@apple.com>
483 [iOS] Respect type fidelities when copying image elements to the pasteboard
484 https://bugs.webkit.org/show_bug.cgi?id=175638
485 <rdar://problem/26556043>
487 Reviewed by Ryosuke Niwa.
489 Ensures that we respect type fidelities when copying on iOS, by unifying pasteboard writing codepaths across
490 dragging and copying. When dragging and copying, we now generate and set UIItemProviders on the UIPasteboard.
492 Tests: ActionSheetTests.CopyImageElementWithHREF
493 ActionSheetTests.CopyImageElementWithoutHREF
495 * platform/PlatformPasteboard.h:
497 Remove all variants of the writeObjectRepresentations helper method. Now that both paths for writing to the
498 pasteboard are unified, it's no longer useful to separate out item-provider-based pasteboard logic.
500 * platform/ios/AbstractPasteboard.h:
501 * platform/ios/PlatformPasteboardIOS.mm:
503 Replaces -setItemsUsingRegistrationInfoLists: with -setRegistrationInfoLists:. Rather than have a helper that
504 both sets up item providers and item registration lists, split this functionality out into two setters. This is
505 because UIPasteboard does not need to know about the registration info lists used to set up the item providers
506 in the first place, but internal drag-and-drop clients require this information immediately when starting a drag
507 in order to construct custom drag previews.
509 (WebCore::richTextRepresentationsForPasteboardWebContent):
510 (WebCore::registerItemToPasteboard):
512 Add a new helper to register item providers to the pasteboard, given an WebItemProviderRegistrationInfoList.
514 (WebCore::PlatformPasteboard::write):
515 (WebCore::PlatformPasteboard::writeObjectRepresentations): Deleted.
517 Refactors PlatformPasteboard::write to always generate and set item providers, unless we're building for an SDK
518 prior to iOS 11. For images, strings and URLs, we can simply transition to using the new item-provider-based
519 codepaths used for drag and drop. For web content, we add two additional UTIs that were present when copying,
520 but not when dragging: flat RTFD and a string constant used to indicate to UIKit that the pasteboard contains
523 * platform/ios/WebItemProviderPasteboard.h:
524 * platform/ios/WebItemProviderPasteboard.mm:
525 (-[WebItemProviderRegistrationInfoList init]):
526 (-[WebItemProviderRegistrationInfoList addData:forType:]):
527 (-[WebItemProviderRegistrationInfoList addRepresentingObject:]):
528 (-[WebItemProviderRegistrationInfoList numberOfItems]):
529 (-[WebItemProviderRegistrationInfoList itemAtIndex:]):
530 (-[WebItemProviderRegistrationInfoList itemProvider]):
531 (-[WebItemProviderRegistrationInfoList description]):
533 Make some small tweaks in WebItemProviderPasteboard (and related classes):
534 1. Transition to preferredPresentationSize from estimatedDisplayedSize, which is now deprecated.
535 2. Remove calls to -initWithItemProviderData:typeIdentifier:error:, which is deprecated.
536 3. Rename _items to _representations to better reflect the role of WebItemProviderRegistrationInfo.
537 4. Implement -description for WebItemProviderRegistrationInfoList for debugging purposes.
539 (-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):
540 (-[WebItemProviderPasteboard setRegistrationInfoLists:]):
541 (-[WebItemProviderPasteboard setItemsUsingRegistrationInfoLists:]): Deleted.
543 2017-08-17 Youenn Fablet <youenn@apple.com>
545 Add a DOMPromiseDeferred method to handle ExceptionOr<> results
546 https://bugs.webkit.org/show_bug.cgi?id=175603
548 Reviewed by Darin Adler.
550 No change of behavior.
552 Introduce DOMPromiseDeferred::settle to reject/resolve a promise with an ExceptionOr<>.
553 Making batchPutOperation/batchDeleteOperation take a Function with an ExceptionOr<>.
554 Using DOMPromiseDeferred::settle in Cache put/remove.
555 Updated CacheStorageConnection to create ExceptionOr<> from CacheStorageConnection::Error.
557 * Modules/cache/Cache.cpp:
558 (WebCore::Cache::put):
559 (WebCore::Cache::remove):
560 (WebCore::Cache::batchDeleteOperation):
561 (WebCore::Cache::batchPutOperation):
562 * Modules/cache/Cache.h:
563 * Modules/cache/CacheStorage.cpp:
564 (WebCore::CacheStorage::open):
565 (WebCore::CacheStorage::remove):
566 * Modules/cache/CacheStorageConnection.cpp:
567 (WebCore::CacheStorageConnection::errorToException):
568 * Modules/cache/CacheStorageConnection.h:
569 (WebCore::CacheStorageConnection::errorToException):
570 (WebCore::CacheStorageConnection::exceptionOrResult):
571 * bindings/js/JSDOMPromiseDeferred.h:
572 (WebCore::DOMPromiseDeferred::settle):
573 (WebCore::DOMPromiseDeferred<void>::settle):
575 2017-08-17 Zan Dobersek <zdobersek@igalia.com>
577 [GStreamer] AppendPipeline: support dispatch of decryption-specific GstStructure into the pipeline
578 https://bugs.webkit.org/show_bug.cgi?id=175668
580 Reviewed by Xabier Rodriguez-Calvar.
582 Add the AppendPipeline::dispatchDecryptionStructure() method. Callers can
583 pass in a GstStructure object that contains all the information the
584 decryption elements in the pipeline will require to properly decrypt the
585 content. In case the decryptor element isn't available yet, the
586 GstStructure is stored and dispatched when that element becomes available.
588 The dispatch itself simply creates a new custom GstEvent that adopts the
589 given GstStructure object, sends that into the pipeline element, and
590 shifts the state to 'ongoing'.
592 * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
593 (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
594 (WebCore::AppendPipeline::dispatchPendingDecryptionStructure):
595 (WebCore::AppendPipeline::dispatchDecryptionStructure):
596 * platform/graphics/gstreamer/mse/AppendPipeline.h: Remove a redundant private: label.
598 2017-08-17 Zan Dobersek <zdobersek@igalia.com>
600 [GStreamer] GstStructure shouldn't be handled through GRefPtr
601 https://bugs.webkit.org/show_bug.cgi?id=175673
603 Reviewed by Xabier Rodriguez-Calvar.
605 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
606 (webkitMediaCommonEncryptionDecryptTransformCaps): GstStructure isn't
607 ref-counted, so it should be handled through the GUniquePtr<GstStructure>
610 2017-08-17 Youenn Fablet <youenn@apple.com>
612 [Mac/iOS] Increase the audio buffer size when audio capture is on but web audio is not used
613 https://bugs.webkit.org/show_bug.cgi?id=175631
615 Reviewed by Eric Carlson.
617 * platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
618 (PlatformMediaSessionManager::updateSessionState): Change value from 128 to the equivalent of 20ms when audio capture happens but not web audio.
620 2017-08-17 Antti Koivisto <antti@apple.com>
622 RenderListItem - Avoid render tree mutation during layout
623 https://bugs.webkit.org/show_bug.cgi?id=175666
625 Reviewed by Andreas Kling.
627 Mutations should be done by RenderTreeUpdater only.
629 * rendering/RenderListItem.cpp:
630 (WebCore::RenderListItem::updateMarkerRenderer):
632 This is now called by RenderTreeUpdater only.
633 Remove code dealing with this being called at layout time.
634 Merged marker construction code from styleDidChange here and renamed for clarity.
636 (WebCore::RenderListItem::layout):
637 (WebCore::RenderListItem::computePreferredLogicalWidths):
639 Remove mutating calls.
641 (WebCore::RenderListItem::styleDidChange): Deleted.
642 (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded): Deleted.
643 * rendering/RenderListItem.h:
644 * rendering/TextAutoSizing.cpp:
645 (WebCore::TextAutoSizingValue::adjustTextNodeSizes):
647 Call updateMarkerRenderer.
649 * style/RenderTreeUpdater.cpp:
650 (WebCore::RenderTreeUpdater::popParent):
651 (WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
653 Call updateMarkerRenderer.
655 2017-08-17 Don Olmstead <don.olmstead@sony.com>
657 [PAL] Move SessionID into PAL
658 https://bugs.webkit.org/show_bug.cgi?id=174192
660 Reviewed by Antti Koivisto.
662 No new tests. No change in behavior.
665 * Modules/websockets/WebSocketChannel.cpp:
666 (WebCore::WebSocketChannel::connect):
667 * WebCore.xcodeproj/project.pbxproj:
669 (WebCore::Document::sessionID const):
671 * dom/ScriptExecutionContext.h:
672 * html/HTMLMediaElement.cpp:
673 (WebCore::HTMLMediaElement::elementWithID):
674 (WebCore::HTMLMediaElement::finishParsingChildren):
675 (WebCore::HTMLMediaElement::scheduleEvent):
676 (WebCore::HTMLMediaElement::canPlayType const):
677 (WebCore::HTMLMediaElement::load):
678 (WebCore::HTMLMediaElement::loadResource):
679 (WebCore::HTMLMediaElement::textTracksAreReady const):
680 (WebCore::HTMLMediaElement::textTrackModeChanged):
681 (WebCore::HTMLMediaElement::noneSupported):
682 (WebCore::HTMLMediaElement::mediaLoadingFailedFatally):
683 (WebCore::HTMLMediaElement::mediaLoadingFailed):
684 (WebCore::HTMLMediaElement::setReadyState):
685 (WebCore::HTMLMediaElement::addPlayedRange):
686 (WebCore::HTMLMediaElement::seekTask):
687 (WebCore::HTMLMediaElement::refreshCachedTime const):
688 (WebCore::HTMLMediaElement::currentMediaTime const):
689 (WebCore::HTMLMediaElement::setWebkitPreservesPitch):
690 (WebCore::HTMLMediaElement::ended const):
691 (WebCore::HTMLMediaElement::playInternal):
692 (WebCore::HTMLMediaElement::pause):
693 (WebCore::HTMLMediaElement::togglePlayState):
694 (WebCore::HTMLMediaElement::beginScrubbing):
695 (WebCore::HTMLMediaElement::playbackProgressTimerFired):
696 (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack):
697 (WebCore::HTMLMediaElement::didAddTextTrack):
698 (WebCore::HTMLMediaElement::didRemoveTextTrack):
699 (WebCore::controllerJSValue):
700 (WebCore::HTMLMediaElement::configureTextTracks):
701 (WebCore::HTMLMediaElement::selectNextSourceChild):
702 (WebCore::HTMLMediaElement::sourceWasAdded):
703 (WebCore::HTMLMediaElement::sourceWasRemoved):
704 (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
705 (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
706 (WebCore::HTMLMediaElement::potentiallyPlaying const):
707 (WebCore::HTMLMediaElement::endedPlayback const):
708 (WebCore::HTMLMediaElement::stoppedDueToErrors const):
709 (WebCore::HTMLMediaElement::updatePlayState):
710 (WebCore::HTMLMediaElement::userCancelledLoad):
711 (WebCore::HTMLMediaElement::canSuspendForDocumentSuspension const):
712 (WebCore::HTMLMediaElement::addEventListener):
713 (WebCore::HTMLMediaElement::isFullscreen const):
714 (WebCore::HTMLMediaElement::toggleStandardFullscreenState):
715 (WebCore::HTMLMediaElement::waitForPreparedForInlineThen):
716 (WebCore::HTMLMediaElement::setVideoFullscreenLayer):
717 (WebCore::HTMLMediaElement::updateTextTrackDisplay):
718 (WebCore::HTMLMediaElement::mediaControls const):
719 (WebCore::HTMLMediaElement::configureTextTrackDisplay):
720 (WebCore::HTMLMediaElement::setMediaGroup):
721 (WebCore::HTMLMediaElement::setControllerForBindings):
722 (WebCore::HTMLMediaElement::isBlockedOnMediaController const):
723 (WebCore::HTMLMediaElement::prepareMediaFragmentURI):
724 (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
725 (WebCore::HTMLMediaElement::fileSize const):
726 (WebCore::HTMLMediaElement::mediaSessionTitle const):
727 (WebCore::needsSeekingSupportQuirk):
728 (WebCore::HTMLMediaElement::supportsSeeking const):
729 (WebCore::HTMLMediaElement::doesHaveAttribute const):
730 (WebCore::HTMLMediaElement::isVideoTooSmallForInlinePlayback):
731 * loader/DocumentLoader.cpp:
732 (WebCore::DocumentLoader::continueAfterContentPolicy):
733 * loader/EmptyClients.cpp:
734 * loader/FrameLoaderClient.h:
735 * loader/cache/CachedCSSStyleSheet.cpp:
736 (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
737 * loader/cache/CachedCSSStyleSheet.h:
738 * loader/cache/CachedFont.cpp:
739 (WebCore::CachedFont::CachedFont):
740 * loader/cache/CachedFont.h:
741 * loader/cache/CachedImage.cpp:
742 (WebCore::CachedImage::CachedImage):
743 * loader/cache/CachedImage.h:
744 * loader/cache/CachedRawResource.cpp:
745 (WebCore::CachedRawResource::CachedRawResource):
746 * loader/cache/CachedRawResource.h:
747 * loader/cache/CachedResource.cpp:
748 (WebCore::CachedResource::CachedResource):
749 * loader/cache/CachedResource.h:
750 (WebCore::CachedResource::sessionID const):
751 * loader/cache/CachedResourceLoader.cpp:
752 (WebCore::createResource):
753 (WebCore::CachedResourceLoader::sessionID const):
754 * loader/cache/CachedResourceLoader.h:
755 * loader/cache/CachedSVGDocument.cpp:
756 (WebCore::CachedSVGDocument::CachedSVGDocument):
757 * loader/cache/CachedSVGDocument.h:
758 * loader/cache/CachedSVGFont.cpp:
759 (WebCore::CachedSVGFont::CachedSVGFont):
760 * loader/cache/CachedSVGFont.h:
761 * loader/cache/CachedScript.cpp:
762 (WebCore::CachedScript::CachedScript):
763 * loader/cache/CachedScript.h:
764 * loader/cache/CachedTextTrack.cpp:
765 (WebCore::CachedTextTrack::CachedTextTrack):
766 * loader/cache/CachedTextTrack.h:
767 * loader/cache/CachedXSLStyleSheet.cpp:
768 (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
769 * loader/cache/CachedXSLStyleSheet.h:
770 * loader/cache/MemoryCache.cpp:
771 (WebCore::MemoryCache::sessionResourceMap const):
772 (WebCore::MemoryCache::ensureSessionResourceMap):
773 (WebCore::MemoryCache::resourceForRequest):
774 (WebCore::MemoryCache::addImageToCache):
775 (WebCore::MemoryCache::removeImageFromCache):
776 (WebCore::MemoryCache::forEachSessionResource):
777 (WebCore::MemoryCache::removeResourcesWithOrigins):
778 (WebCore::MemoryCache::originsWithCache const):
779 (WebCore::MemoryCache::evictResources):
780 * loader/cache/MemoryCache.h:
781 * loader/cocoa/DiskCacheMonitorCocoa.h:
782 (WebCore::DiskCacheMonitor::sessionID const):
783 * loader/cocoa/DiskCacheMonitorCocoa.mm:
784 (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation):
785 (WebCore::DiskCacheMonitor::DiskCacheMonitor):
786 * page/CacheStorageProvider.h:
787 * page/DatabaseProvider.h:
789 (WebCore::Page::Page):
790 (WebCore::Page::enableLegacyPrivateBrowsing):
791 (WebCore::Page::sessionID const):
792 (WebCore::Page::setSessionID):
794 * page/PlugInClient.h:
795 * page/SocketProvider.cpp:
796 (WebCore::SocketProvider::createSocketStreamHandle):
797 * page/SocketProvider.h:
798 * platform/CookiesStrategy.h:
799 * platform/WebCoreCrossThreadCopier.cpp:
800 (WTF::PAL::SessionID>::copy):
801 (WTF::WebCore::SessionID>::copy): Deleted.
802 * platform/WebCoreCrossThreadCopier.h:
803 * platform/network/CacheValidation.cpp:
804 (WebCore::headerValueForVary):
805 (WebCore::collectVaryingRequestHeaders):
806 (WebCore::verifyVaryingRequestHeaders):
807 * platform/network/CacheValidation.h:
808 * platform/network/NetworkStorageSession.cpp:
809 (WebCore::NetworkStorageSession::globalSessionMap):
810 (WebCore::NetworkStorageSession::storageSession):
811 (WebCore::NetworkStorageSession::destroySession):
812 * platform/network/NetworkStorageSession.h:
813 (WebCore::NetworkStorageSession::sessionID const):
814 * platform/network/NetworkStorageSessionStub.cpp:
815 (WebCore::NetworkStorageSession::NetworkStorageSession):
816 (WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
817 (WebCore::NetworkStorageSession::ensureSession):
818 (WebCore::NetworkStorageSession::defaultStorageSession):
819 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
820 (WebCore::NetworkStorageSession::NetworkStorageSession):
821 (WebCore::NetworkStorageSession::switchToNewTestingSession):
822 (WebCore::NetworkStorageSession::defaultStorageSession):
823 (WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
824 (WebCore::NetworkStorageSession::ensureSession):
825 * platform/network/cf/SocketStreamHandleImpl.h:
826 (WebCore::SocketStreamHandleImpl::create):
827 * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
828 (WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):
829 * platform/network/curl/SocketStreamHandleImpl.h:
830 (WebCore::SocketStreamHandleImpl::create):
831 * platform/network/soup/NetworkStorageSessionSoup.cpp:
832 (WebCore::NetworkStorageSession::NetworkStorageSession):
833 (WebCore::NetworkStorageSession::defaultStorageSession):
834 (WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
835 (WebCore::NetworkStorageSession::ensureSession):
836 (WebCore::NetworkStorageSession::switchToNewTestingSession):
837 * platform/network/soup/SocketStreamHandleImpl.h:
838 * platform/network/soup/SocketStreamHandleImplSoup.cpp:
839 (WebCore::SocketStreamHandleImpl::create):
840 * workers/DedicatedWorkerGlobalScope.cpp:
841 (WebCore::DedicatedWorkerGlobalScope::create):
842 (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
843 * workers/DedicatedWorkerGlobalScope.h:
844 * workers/DedicatedWorkerThread.cpp:
845 (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
846 (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
847 * workers/DedicatedWorkerThread.h:
848 * workers/Worker.cpp:
849 (WebCore::Worker::notifyFinished):
850 * workers/WorkerGlobalScope.cpp:
851 (WebCore::WorkerGlobalScope::WorkerGlobalScope):
852 * workers/WorkerGlobalScope.h:
853 * workers/WorkerGlobalScopeProxy.h:
854 * workers/WorkerMessagingProxy.cpp:
855 (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
856 * workers/WorkerMessagingProxy.h:
857 * workers/WorkerThread.cpp:
858 (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
859 (WebCore::WorkerThread::WorkerThread):
860 * workers/WorkerThread.h:
861 * workers/service/ServiceWorkerContainer.h:
862 * workers/service/ServiceWorkerRegistrationParameters.h:
864 2017-08-17 Carlos Garcia Campos <cgarcia@igalia.com>
866 [GTK][WPE] Add NTLM authentication enabled API
867 https://bugs.webkit.org/show_bug.cgi?id=122952
869 Reviewed by Michael Catanzaro.
871 Add/remove NTLM feature to/from soup session depending on whether the feature is enabled or disabled.
873 * platform/network/soup/SoupNetworkSession.cpp:
874 (WebCore::SoupNetworkSession::SoupNetworkSession):
875 (WebCore::SoupNetworkSession::setInitialNTLMAuthenticationEnabled):
876 (WebCore::SoupNetworkSession::setNTLMAuthenticationEnabled):
877 * platform/network/soup/SoupNetworkSession.h:
879 2017-08-16 Ryosuke Niwa <rniwa@webkit.org>
881 Add the support for mutating clipboard data via DataTransferItemList
882 https://bugs.webkit.org/show_bug.cgi?id=175639
884 Reviewed by Wenson Hsieh.
886 Added the support for adding plaintext data via dataTransfer.items.add, clearing data via clear,
887 and removing an entry via remove. When DataTransferItem is removed from DataTransferItemList,
888 we must put into the disabled mode.
890 To support the removal of DataTransferItem, this patch replaces a reference to DataTransfer by
891 a WeakPtr to DataTransferItemList, and stops forwarding ref from DataTransferItem to DataTransfer.
892 This means that DataTransfer can now be GC'ed before DataTransferItem is GC'ed.
894 Because the identify and the order of DataTransferItems need to be preserved, we can't simply
895 re-popluate m_itemList in DataTransferItemList. Instead, whenever the clipboard content is mutated,
896 we make the parallel modifications to m_itemList. This includes changes made via DataTransfer
897 methods such as setData and clearData.
899 Test: editing/pasteboard/datatransfer-items-copy-plaintext.html
901 * dom/DataTransfer.cpp:
902 (WebCore::DataTransfer::clearData): Invoke didClearStringData when m_itemList exists.
903 (WebCore::DataTransfer::setData): Ditto.
904 (WebCore::DataTransfer::createForInputEvent):
905 (WebCore::DataTransfer::createForDrag):
906 (WebCore::DataTransfer::createForDrop):
907 * dom/DataTransferItem.cpp:
908 (WebCore::DataTransferItem::create):
909 (WebCore::DataTransferItem::DataTransferItem):
910 (WebCore::DataTransferItem::clearListAndPutIntoDisabledMode): Added.
911 (WebCore::DataTransferItem::type const): Moved from the header.
912 (WebCore::DataTransferItem::getAsString const):
913 (WebCore::DataTransferItem::getAsFile const):
914 * dom/DataTransferItem.h:
915 (WebCore::DataTransferItem::ref): Deleted.
916 (WebCore::DataTransferItem::deref): Deleted.
917 (WebCore::DataTransferItem::isFile const): Added.
918 (WebCore::DataTransferItem::type const): Move to the cpp file.
919 * dom/DataTransferItemList.cpp:
920 (WebCore::isSupportedType): Moved.
921 (WebCore::DataTransferItemList::DataTransferItemList): Moved from the header.
922 (WebCore::DataTransferItemList::~DataTransferItemList): Added.
923 (WebCore::DataTransferItemList::item):
924 (WebCore::DataTransferItemList::add): Implemented the variant to add string data.
925 (WebCore::DataTransferItemList::remove): Implemented. For now, we don't have to deal with removing
926 a file since a writable dataTransfer never contains a File object.
927 (WebCore::DataTransferItemList::clear): Implemented.
928 (WebCore::DataTransferItemList::ensureItems const):
929 (WebCore::removeStringItemOfLowercasedType): Added.
930 (WebCore::DataTransferItemList::didClearStringData): Called when dataTransfer.clear is called.
931 (WebCore::DataTransferItemList::didSetStringData): Ditto for
932 * dom/DataTransferItemList.h:
933 (WebCore::DataTransferItemList): Added a WeakPtrFactory. Also use a vector of Ref<DataTransferItem>
934 instead of unique_ptr<DataTransferItem> since DataTransferItem can outlive DataTransferItemList.
935 (WebCore::DataTransferItemList::dataTransfer): Added.
936 * dom/DataTransferItemList.idl:
938 2017-08-16 Andy Estes <aestes@apple.com>
940 [Apple Pay] Rename PaymentRequest to ApplePaySessionPaymentRequest
941 https://bugs.webkit.org/show_bug.cgi?id=175648
943 Reviewed by Tim Horton.
945 The W3C Payment Request API defines an interface called PaymentRequest, which conflicts with
946 an existing Apple Pay class. This patch renames PaymentRequest to
947 ApplePaySessionPaymentRequest so that a follow-on patch can introduce PaymentRequest for the
950 * Modules/applepay/ApplePayError.h:
951 * Modules/applepay/ApplePayLineItem.h:
952 * Modules/applepay/ApplePayPaymentRequest.h:
953 * Modules/applepay/ApplePaySession.cpp:
954 (WebCore::convertAndValidateTotal):
955 (WebCore::convertAndValidate):
956 (WebCore::ApplePaySession::ApplePaySession):
957 (WebCore::ApplePaySession::didSelectShippingMethod):
958 * Modules/applepay/ApplePaySession.h:
959 * Modules/applepay/ApplePaySessionPaymentRequest.cpp: Renamed from Source/WebCore/Modules/applepay/PaymentRequest.cpp.
960 (WebCore::ApplePaySessionPaymentRequest::ApplePaySessionPaymentRequest):
961 (WebCore::ApplePaySessionPaymentRequest::~ApplePaySessionPaymentRequest):
962 (WebCore::ApplePaySessionPaymentRequest::isValidSupportedNetwork):
963 * Modules/applepay/ApplePaySessionPaymentRequest.h: Renamed from Source/WebCore/Modules/applepay/PaymentRequest.h.
964 * Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
966 (WebCore::ApplePayShippingMethodSelectedEvent::ApplePayShippingMethodSelectedEvent):
967 * Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
968 * Modules/applepay/PaymentCoordinator.cpp:
969 (WebCore::PaymentCoordinator::beginPaymentSession):
970 (WebCore::PaymentCoordinator::didSelectShippingMethod):
971 * Modules/applepay/PaymentCoordinator.h:
972 * Modules/applepay/PaymentCoordinatorClient.h:
973 * Modules/applepay/PaymentHeaders.h:
974 * Modules/applepay/PaymentRequestValidator.cpp:
975 (WebCore::PaymentRequestValidator::validate):
976 (WebCore::PaymentRequestValidator::validateTotal):
977 (WebCore::validateMerchantCapabilities):
978 (WebCore::validateShippingMethod):
979 (WebCore::validateShippingMethods):
980 * Modules/applepay/PaymentRequestValidator.h:
981 * WebCore.xcodeproj/project.pbxproj:
982 * loader/EmptyClients.cpp:
984 2017-08-16 Chris Dumez <cdumez@apple.com>
986 Cross origin Beacon requests with a ArrayBuffer / ArrayBufferView payload should not do a CORS preflight
987 https://bugs.webkit.org/show_bug.cgi?id=175628
988 <rdar://problem/33919278>
990 Reviewed by Geoffrey Garen.
992 Cross origin Beacon requests with a ArrayBuffer / ArrayBufferView payload should not do a CORS preflight.
993 To achieve this, the following changes were made:
994 1. Revert r220779 which caused us to use a non CORS-safelisted Content-Type header for such payload
995 2. Teach PingLoad how to deal with "simple" cross origin requests (i.e. Don't assume we need a CORS
996 preflight merely because the fetch mode is set to "cors").
998 Test: http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight.html
1000 * Modules/fetch/FetchBody.cpp:
1001 (WebCore::FetchBody::extract):
1002 * loader/CrossOriginAccessControl.h:
1003 * loader/LoaderStrategy.h:
1004 * loader/PingLoader.cpp:
1005 (WebCore::PingLoader::loadImage):
1006 (WebCore::PingLoader::sendPing):
1007 (WebCore::PingLoader::sendViolationReport):
1008 (WebCore::PingLoader::startPingLoad):
1009 * loader/PingLoader.h:
1010 * loader/cache/CachedResource.cpp:
1011 (WebCore::CachedResource::CachedResource):
1012 (WebCore::CachedResource::load):
1013 * loader/cache/CachedResource.h:
1014 * loader/cache/CachedResourceRequest.cpp:
1015 (WebCore::CachedResourceRequest::CachedResourceRequest):
1016 * loader/cache/CachedResourceRequest.h:
1017 (WebCore::CachedResourceRequest::releaseOriginalRequestHeaders):
1018 * platform/network/HTTPHeaderValues.cpp:
1019 * platform/network/HTTPHeaderValues.h:
1021 2017-08-16 Matt Baker <mattbaker@apple.com>
1023 Web Inspector: capture async stack trace when workers/main context posts a message
1024 https://bugs.webkit.org/show_bug.cgi?id=167084
1025 <rdar://problem/30033673>
1027 Reviewed by Brian Burg.
1029 Add instrumentation to DOMWindow to support showing asynchronous
1030 stack traces when the debugger pauses in a MessageEvent handler.
1032 Test: inspector/debugger/async-stack-trace.html
1034 * inspector/InspectorInstrumentation.cpp:
1035 (WebCore::InspectorInstrumentation::didPostMessageImpl):
1036 (WebCore::InspectorInstrumentation::didFailPostMessageImpl):
1037 (WebCore::InspectorInstrumentation::willDispatchPostMessageImpl):
1038 (WebCore::InspectorInstrumentation::didDispatchPostMessageImpl):
1040 * inspector/InspectorInstrumentation.h:
1041 (WebCore::InspectorInstrumentation::didPostMessage):
1042 (WebCore::InspectorInstrumentation::didFailPostMessage):
1043 (WebCore::InspectorInstrumentation::willDispatchPostMessage):
1044 (WebCore::InspectorInstrumentation::didDispatchPostMessage):
1046 * inspector/PageDebuggerAgent.cpp:
1047 (WebCore::PageDebuggerAgent::didClearAsyncStackTraceData):
1048 (WebCore::PageDebuggerAgent::didPostMessage):
1049 (WebCore::PageDebuggerAgent::didFailPostMessage):
1050 (WebCore::PageDebuggerAgent::willDispatchPostMessage):
1051 (WebCore::PageDebuggerAgent::didDispatchPostMessage):
1052 * inspector/PageDebuggerAgent.h:
1054 * page/DOMWindow.cpp:
1055 (WebCore::DOMWindow::postMessage):
1056 (WebCore::DOMWindow::postMessageTimerFired):
1058 2017-08-16 Timothy Horton <timothy_horton@apple.com>
1060 Try to fix the build
1062 * platform/ios/PlatformPasteboardIOS.mm:
1064 2017-08-16 Simon Fraser <simon.fraser@apple.com>
1066 Build fix after r220812
1068 Fix builds where LOG_DISABLED is defined.
1070 * css/MediaQueryEvaluator.cpp:
1072 2017-08-16 Simon Fraser <simon.fraser@apple.com>
1074 Add a log channel for media queries
1075 https://bugs.webkit.org/show_bug.cgi?id=175591
1077 Reviewed by Zalan Bujtas.
1079 Add a "MediaQueries" log channel which logs data about media query evaluation.
1081 * css/MediaList.cpp:
1082 (WebCore::MediaQuerySet::MediaQuerySet):
1083 (WebCore::operator<<):
1085 * css/MediaQuery.cpp:
1086 (WebCore::operator<<):
1088 * css/MediaQueryEvaluator.cpp:
1089 (WebCore::operator<<):
1090 (WebCore::MediaQueryEvaluator::evaluate const):
1091 (WebCore::aspectRatioValueAsString):
1092 (WebCore::orientationEvaluate):
1093 (WebCore::aspectRatioEvaluate):
1094 (WebCore::deviceAspectRatioEvaluate):
1095 (WebCore::evaluateResolution):
1096 (WebCore::deviceHeightEvaluate):
1097 (WebCore::deviceWidthEvaluate):
1098 (WebCore::heightEvaluate):
1099 (WebCore::widthEvaluate):
1100 * css/MediaQueryExpression.cpp:
1101 (WebCore::operator<<):
1102 * css/MediaQueryExpression.h:
1103 * css/MediaQueryMatcher.cpp:
1104 (WebCore::MediaQueryMatcher::styleResolverChanged):
1105 * css/StyleResolver.cpp:
1106 (WebCore::StyleResolver::hasMediaQueriesAffectedByViewportChange const):
1107 (WebCore::StyleResolver::hasMediaQueriesAffectedByAccessibilitySettingsChange const):
1108 * dom/InlineStyleSheetOwner.cpp:
1109 (WebCore::InlineStyleSheetOwner::createSheet):
1110 * html/HTMLImageElement.cpp:
1111 (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
1112 * html/HTMLLinkElement.cpp:
1113 (WebCore::HTMLLinkElement::process):
1114 * html/HTMLMediaElement.cpp:
1115 (WebCore::HTMLMediaElement::selectNextSourceChild):
1116 * html/HTMLPictureElement.cpp:
1117 (WebCore::HTMLPictureElement::viewportChangeAffectedPicture const):
1118 * html/parser/HTMLPreloadScanner.cpp:
1119 (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
1120 * page/FrameView.cpp:
1121 (WebCore::FrameView::layout):
1122 * platform/Logging.cpp:
1123 (WebCore::initializeLogChannelsIfNecessary):
1124 * platform/Logging.h:
1126 (WebCore::isSchemeFirstChar):
1127 (WebCore::operator<<):
1130 2017-08-16 Sam Weinig <sam@webkit.org>
1132 [WebIDL] Remove the need for JSSubtleCryptoCustom.cpp
1133 https://bugs.webkit.org/show_bug.cgi?id=175526
1135 Reviewed by Chris Dumez.
1137 - Generates bindings for all of SubtleCrypto except AlgorithmIdentifier normalization,
1138 which is defined in the WebCrypto spec to happen after normal IDL operations.
1139 - Adds initial support for IDL object types in unions (some, unneeded at the moment,
1143 * WebCore.xcodeproj/project.pbxproj:
1144 * bindings/js/JSSubtleCryptoCustom.cpp: Removed.
1146 Remove JSSubtleCryptoCustom.cpp, added CryptoKeyFormat.h
1148 * bindings/js/JSDOMConvertObject.h:
1150 Add needed, when included in generated code, #include of StrongInlines.h
1152 * bindings/js/JSDOMConvertUnion.h:
1154 Add initial support for object (needed for AlgorithmIdentifier which is
1155 (object or DOMString)). Remaining support will be handled by https://webkit.org/b/175616
1157 Also add remaining spec comments while in the area.
1159 * bindings/js/JSDOMPromiseDeferred.cpp:
1160 (WebCore::DeferredPromise::reject):
1162 Add support for the special ExistingExceptionError error code. Capturing
1163 the current exception and using it as the rejection value.
1165 * crypto/SubtleCrypto.cpp:
1166 (WebCore::SubtleCrypto::~SubtleCrypto):
1167 (WebCore::toHashIdentifier):
1168 (WebCore::normalizeCryptoAlgorithmParameters):
1169 (WebCore::toCryptoKeyUsageBitmap):
1170 (WebCore::rejectWithException):
1171 (WebCore::normalizeJsonWebKey):
1172 (WebCore::toKeyData):
1173 (WebCore::copyToVector):
1174 (WebCore::isSupportedExportKey):
1175 (WebCore::SubtleCrypto::encrypt):
1176 (WebCore::SubtleCrypto::decrypt):
1177 (WebCore::SubtleCrypto::sign):
1178 (WebCore::SubtleCrypto::verify):
1179 (WebCore::SubtleCrypto::digest):
1180 (WebCore::SubtleCrypto::generateKey):
1181 (WebCore::SubtleCrypto::deriveKey):
1182 (WebCore::SubtleCrypto::deriveBits):
1183 (WebCore::SubtleCrypto::importKey):
1184 (WebCore::SubtleCrypto::exportKey):
1185 (WebCore::SubtleCrypto::wrapKey):
1186 (WebCore::SubtleCrypto::unwrapKey):
1187 * crypto/SubtleCrypto.h:
1188 * crypto/SubtleCrypto.idl:
1190 Moves implementation from JSSubtleCryptoCustom.cpp -> here. Important changes that come
1192 - All parameters are now converted / type checked for us.
1193 - Rather than throwing exceptions and expecting the bindings layer to convert
1194 them to promise rejections, all rejections are now explicitly made.
1195 - Algorithms are no longer checked for being supported twice, once in normalizeCryptoAlgorithmParameters
1196 and then again in the operation. We instead rely on normalizeCryptoAlgorithmParameters to return
1197 an Exception if its not supported.
1198 - Shaves 251 lines off the file.
1200 * crypto/CryptoKeyFormat.h: Added.
1202 Add new header for unified key format enum. (For bindings purposes, SubtleCrypto
1203 re aliases it to SubtleCrypto::KeyFormat).
1205 * bindings/js/JSWebKitSubtleCryptoCustom.cpp:
1206 * crypto/CryptoAlgorithm.cpp:
1207 * crypto/CryptoAlgorithm.h:
1208 * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
1209 * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
1210 * crypto/algorithms/CryptoAlgorithmAES_CFB.cpp:
1211 * crypto/algorithms/CryptoAlgorithmAES_CFB.h:
1212 * crypto/algorithms/CryptoAlgorithmAES_CTR.cpp:
1213 * crypto/algorithms/CryptoAlgorithmAES_CTR.h:
1214 * crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:
1215 * crypto/algorithms/CryptoAlgorithmAES_GCM.h:
1216 * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
1217 * crypto/algorithms/CryptoAlgorithmAES_KW.h:
1218 * crypto/algorithms/CryptoAlgorithmECDH.cpp:
1219 * crypto/algorithms/CryptoAlgorithmECDH.h:
1220 * crypto/algorithms/CryptoAlgorithmECDSA.cpp:
1221 * crypto/algorithms/CryptoAlgorithmECDSA.h:
1222 * crypto/algorithms/CryptoAlgorithmHKDF.cpp:
1223 * crypto/algorithms/CryptoAlgorithmHKDF.h:
1224 * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
1225 * crypto/algorithms/CryptoAlgorithmHMAC.h:
1226 * crypto/algorithms/CryptoAlgorithmPBKDF2.cpp:
1227 * crypto/algorithms/CryptoAlgorithmPBKDF2.h:
1228 * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
1229 * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
1230 * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
1231 * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
1232 * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
1233 * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
1234 * crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:
1235 * crypto/algorithms/CryptoAlgorithmRSA_PSS.h:
1237 Use CryptoKeyFormat enum directly, rather than SubtleCrypto::KeyFormat,
1238 to allow not including SubtleCrypto.h.
1240 * crypto/parameters/CryptoAlgorithmEcdsaParams.h:
1241 * crypto/parameters/CryptoAlgorithmHkdfParams.h:
1242 * crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
1243 * crypto/parameters/CryptoAlgorithmPbkdf2Params.h:
1244 * crypto/parameters/CryptoAlgorithmRsaHashedImportParams.h:
1245 * crypto/parameters/CryptoAlgorithmRsaHashedKeyGenParams.h:
1246 * crypto/parameters/EcdsaParams.idl:
1247 * crypto/parameters/HkdfParams.idl:
1248 * crypto/parameters/HmacKeyParams.idl:
1249 * crypto/parameters/Pbkdf2Params.idl:
1250 * crypto/parameters/RsaHashedImportParams.idl:
1251 * crypto/parameters/RsaHashedKeyGenParams.idl:
1253 Update IDLs and implementations to use the correct definition of HashAlgorithmIdentifier,
1254 which is (object or DOMString), now that it is supported.
1256 2017-08-16 Youenn Fablet <youenn@apple.com>
1258 [Cache API] Implement Worker connection to the Cache storage engine
1259 https://bugs.webkit.org/show_bug.cgi?id=175599
1261 Reviewed by Chris Dumez.
1263 Covered by existing tests.
1265 Adding a WorkerCacheStorageConnection to connect workers Cache/CacheStorage
1266 to the cache storage engine.
1267 WorkerCacheStorageConnection does this by hopping to the main thread to call the document cache storage connection to do the actual job.
1268 Doing some CacheStorageConnection refactoring to share code with WK2 implementation of the cache storage connection.
1270 * Modules/cache/CacheQueryOptions.h:
1271 (WebCore::CacheQueryOptions::isolatedCopy const):
1272 * Modules/cache/CacheStorageConnection.cpp:
1273 (WebCore::CacheStorageConnection::open):
1274 (WebCore::CacheStorageConnection::remove):
1275 (WebCore::CacheStorageConnection::retrieveCaches):
1276 (WebCore::CacheStorageConnection::retrieveRecords):
1277 (WebCore::CacheStorageConnection::batchDeleteOperation):
1278 (WebCore::CacheStorageConnection::batchPutOperation):
1279 (WebCore::CacheStorageConnection::openOrRemoveCompleted):
1280 (WebCore::CacheStorageConnection::updateCaches):
1281 (WebCore::CacheStorageConnection::updateRecords):
1282 (WebCore::CacheStorageConnection::removeRecordsCompleted):
1283 (WebCore::CacheStorageConnection::putRecordsCompleted):
1284 * Modules/cache/CacheStorageConnection.h:
1285 (WebCore::CacheStorageConnection::openCompleted):
1286 (WebCore::CacheStorageConnection::removeCompleted):
1287 (WebCore::CacheStorageConnection::doOpen):
1288 (WebCore::CacheStorageConnection::doRemove):
1289 (WebCore::CacheStorageConnection::doRetrieveCaches):
1290 (WebCore::CacheStorageConnection::doRetrieveRecords):
1291 (WebCore::CacheStorageConnection::doBatchDeleteOperation):
1292 (WebCore::CacheStorageConnection::doBatchPutOperation):
1293 * Modules/cache/WorkerCacheStorageConnection.cpp: Added.
1294 (WebCore::toCrossThreadRecordData):
1295 (WebCore::fromCrossThreadRecordData):
1296 (WebCore::WorkerCacheStorageConnection::create):
1297 (WebCore::WorkerCacheStorageConnection::WorkerCacheStorageConnection):
1298 (WebCore::WorkerCacheStorageConnection::doOpen):
1299 (WebCore::WorkerCacheStorageConnection::doRemove):
1300 (WebCore::WorkerCacheStorageConnection::doRetrieveCaches):
1301 (WebCore::WorkerCacheStorageConnection::doRetrieveRecords):
1302 (WebCore::WorkerCacheStorageConnection::doBatchDeleteOperation):
1303 (WebCore::WorkerCacheStorageConnection::doBatchPutOperation):
1304 * Modules/cache/WorkerCacheStorageConnection.h: Added.
1305 * Modules/cache/WorkerGlobalScopeCaches.cpp:
1306 (WebCore::WorkerGlobalScopeCaches::caches const):
1307 * WebCore.xcodeproj/project.pbxproj:
1308 * loader/FetchOptions.h:
1309 (WebCore::FetchOptions::isolatedCopy const):
1310 * workers/WorkerGlobalScope.cpp:
1311 (WebCore::WorkerGlobalScope::cacheStorageConnection):
1312 * workers/WorkerGlobalScope.h:
1314 2017-08-16 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com>
1316 [PAL] Move spi/ios and spi/win directories into PAL
1317 https://bugs.webkit.org/show_bug.cgi?id=175171
1319 Reviewed by Antti Koivisto.
1321 * PlatformWin.cmake:
1322 * WebCore.xcodeproj/project.pbxproj:
1323 * editing/cocoa/DataDetection.mm:
1324 * loader/ios/PreviewLoader.mm:
1325 * page/CaptionUserPreferencesMediaAF.cpp:
1326 * page/cocoa/MemoryReleaseCocoa.mm:
1327 * page/cocoa/SettingsCocoa.mm:
1328 * page/ios/UserAgentIOS.mm:
1329 * platform/audio/ios/MediaSessionManagerIOS.mm:
1330 * platform/graphics/ca/PlatformCALayer.cpp:
1331 * platform/graphics/cocoa/FontCascadeCocoa.mm:
1332 * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
1333 * platform/graphics/opentype/OpenTypeCG.h:
1334 * platform/graphics/win/SimpleFontDataCGWin.cpp:
1335 * platform/graphics/win/SimpleFontDataDirect2D.cpp:
1336 * platform/ios/Device.h:
1337 * platform/ios/PlatformPasteboardIOS.mm:
1338 * platform/ios/PlatformScreenIOS.mm:
1339 * platform/ios/QuickLookSoftLink.h:
1340 * platform/ios/QuickLookSoftLink.mm:
1341 * platform/ios/ValidationBubbleIOS.mm:
1342 * platform/ios/WebItemProviderPasteboard.mm:
1343 * platform/network/ios/PreviewConverter.mm:
1344 * platform/sql/SQLiteFileSystem.cpp:
1345 * rendering/RenderThemeIOS.mm:
1347 2017-08-16 Tim Horton <timothy_horton@apple.com>
1349 2-3% of main thread time under UTTypeCreatePreferredIdentifierForTag on wunderground map
1350 https://bugs.webkit.org/show_bug.cgi?id=175618
1352 Reviewed by Simon Fraser.
1354 No new tests, just a perf win.
1356 UTTypeCreatePreferredIdentifierForTag is fairly expensive, and is called
1357 under every toDataURL, which the Wunderground wundermap does a /lot/.
1359 Keep a 16-item LRU cache of MIMEType->UTI mappings.
1361 Also, make other callers of UTTypeCreatePreferredIdentifierForTag use
1362 the UTIUtilities version so they can share in the caching.
1364 Also, as a drive-by, add and make other callers use mimeTypeFromUTI too,
1365 and make the UTIUtilities operate on Strings for a slightly more WebCore-y feel.
1367 * editing/ios/EditorIOS.mm:
1368 (WebCore::Editor::WebContentReader::readImage):
1369 * platform/MIMETypeRegistry.cpp:
1370 (WebCore::initializeSupportedImageMIMETypes):
1371 (WebCore::initializeSupportedImageMIMETypesForEncoding):
1372 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1373 (WebCore::createFileTypesSet):
1374 * platform/graphics/cg/ImageSourceCGMac.mm:
1375 (WebCore::MIMETypeForImageSourceType):
1376 Adopt newly-added MIMETypeFromUTI().
1378 * platform/graphics/cg/ImageBufferCG.cpp:
1379 (WebCore::utiFromImageBufferMIMEType):
1380 (WebCore::ImageBuffer::toCFData const):
1382 (WebCore::utiFromMIMEType): Deleted.
1383 Adopt UTIFromMIMEType, and rename the local helper that does something
1384 different (a small static map) on iOS and Windows to not have an overlapping name.
1386 * platform/ios/PasteboardIOS.mm:
1387 (WebCore::Pasteboard::resourceMIMEType):
1388 (WebCore::utiTypeFromCocoaType):
1389 Adopt UTIFromMIMEType().
1391 * platform/ios/PlatformPasteboardIOS.mm:
1392 (WebCore::PlatformPasteboard::writeObjectRepresentations):
1393 * platform/mac/PasteboardMac.mm:
1394 (WebCore::cocoaTypeFromHTMLClipboardType):
1395 Adopt isDeclaredUTI and UTIFromMIMEType().
1397 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1398 (WebCore::WebCoreAVFResourceLoader::responseReceived):
1399 * platform/network/ios/WebCoreURLResponseIOS.mm:
1400 (WebCore::adjustMIMETypeIfNecessary):
1401 * platform/network/mac/WebCoreURLResponse.mm:
1402 (WebCore::adjustMIMETypeIfNecessary):
1403 * rendering/RenderThemeIOS.mm:
1404 (WebCore::iconForAttachment):
1405 * rendering/RenderThemeMac.mm:
1406 (WebCore::iconForAttachment):
1407 Deal with the fact that UTI utilities deal in Strings now.
1409 * platform/network/mac/UTIUtilities.h:
1410 * platform/network/mac/UTIUtilities.mm:
1411 (WebCore::MIMETypeFromUTI):
1412 Added. This doesn't crawl up the UTI tree if the first conversion fails,
1413 which is what most of the existing code does. It's possible we want to
1414 use MIMETypeFromUTITree's logic everywhere, but I didn't want to change
1417 (WebCore::MIMETypeFromUTITree):
1418 (WebCore::isDeclaredUTI):
1419 Take and return strings.
1421 (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
1422 (WebCore::UTIFromMIMEType):
1423 Add the aforementioned cache.
1425 2017-08-16 Simon Fraser <simon.fraser@apple.com>
1427 Make RenderLayer and RenderLayerBacking TextStream-loggable, and clean up compositing logging
1428 https://bugs.webkit.org/show_bug.cgi?id=175634
1430 Reviewed by Zalan Bujtas.
1432 Add operator<<(TextStream&) for RenderLayer and RenderLayer backing, and use them for compositing logging.
1434 Convert CompositingUpdateType to an enum class.
1436 * page/FrameView.cpp:
1437 (WebCore::FrameView::updateCompositingLayersAfterLayout):
1438 (WebCore::FrameView::updateCompositingLayersAfterScrolling):
1439 * page/ios/FrameIOS.mm:
1440 (WebCore::Frame::viewportOffsetChanged):
1441 * rendering/RenderLayer.cpp:
1442 (WebCore::RenderLayer::updateLayerPositionsAfterLayout):
1443 (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
1444 (WebCore::RenderLayer::calculateClipRects const):
1445 * rendering/RenderLayer.h:
1446 * rendering/RenderLayerBacking.cpp:
1447 (WebCore::RenderLayerBacking::updateAfterLayout):
1448 (WebCore::RenderLayerBacking::updateGeometry):
1449 (WebCore::operator<<):
1450 * rendering/RenderLayerBacking.h:
1451 * rendering/RenderLayerCompositor.cpp:
1452 (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout):
1453 (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1454 (WebCore::RenderLayerCompositor::updateCompositingLayersTimerFired):
1455 (WebCore::RenderLayerCompositor::updateCompositingLayers):
1456 (WebCore::RenderLayerCompositor::layerTreeAsText):
1457 (WebCore::operator<<):
1458 * rendering/RenderLayerCompositor.h:
1460 2017-08-16 Eric Carlson <eric.carlson@apple.com>
1462 Consider allow gUM to be called from localhost without https
1463 https://bugs.webkit.org/show_bug.cgi?id=173457
1464 <rdar://problem/33900527>
1466 Reviewed by Youenn Fablet.
1468 Tests: http/tests/media/media-stream/get-user-media-localhost.html
1469 http/tests/media/media-stream/get-user-media-loopback-ip.html
1471 * Modules/mediastream/UserMediaRequest.cpp:
1472 (WebCore::isSecure): Call SchemeRegistry::shouldTreatURLSchemeAsSecure instead of looking for
1474 (WebCore::canCallGetUserMedia): Allow localhost or loopback address.
1476 * page/SecurityOrigin.cpp:
1477 (WebCore::isLoopbackIPAddress): Add a comment.
1478 (WebCore::shouldTreatAsPotentionallyTrustworthy): Move tests for localhost and loopback address
1479 to isLocalHostOrLoopbackIPAddress, call it.
1480 (WebCore::SecurityOrigin::isLocalHostOrLoopbackIPAddress):
1481 * page/SecurityOrigin.h:
1483 2017-08-16 Chris Dumez <cdumez@apple.com>
1485 EventSource: ignore IDs with U+0000
1486 https://bugs.webkit.org/show_bug.cgi?id=175178
1488 Reviewed by Darin Adler.
1490 EventSource: ignore IDs with U+0000 as per:
1491 https://github.com/whatwg/html/pull/2849
1493 Test: imported/w3c/web-platform-tests/eventsource/format-field-id-null.htm
1495 * page/EventSource.cpp:
1496 (WebCore::EventSource::parseEventStreamLine):
1498 2017-08-16 Fujii Hironori <Hironori.Fujii@sony.com>
1500 [HarfBuzz] Decomposed Vietnamese characters are rendered incorrectly
1501 https://bugs.webkit.org/show_bug.cgi?id=174418
1503 Reviewed by Michael Catanzaro.
1505 HarfBuzzShaper should normalize the input text before collecting
1506 HarfBuzzRuns. Actually, HarfBuzzShaper::setNormalizedBuffer does
1507 the task. But, this function hasn't been called from anywhere
1510 Test: fast/text/international/vietnamese-nfd.html
1511 imported/blink/fast/text/international/text-shaping-arabic-diffs.html
1513 * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1514 (WebCore::HarfBuzzShaper::HarfBuzzShaper):
1515 Call setNormalizedBuffer instead of normalizeCharacters.
1516 (WebCore::normalizeCharacters): Deleted.
1517 (WebCore::normalizeSpacesAndMirrorChars) Use
1518 FontCascade::treatAsZeroWidthSpaceInComplexScript instead of
1519 FontCascade::treatAsZeroWidthSpace to preserve ZWJ and ZWNJ.
1521 2017-08-16 Antti Koivisto <antti@apple.com>
1523 Move first-letter renderer mutation code out of RenderBlock and into RenderTreeUpdater
1524 https://bugs.webkit.org/show_bug.cgi?id=175627
1526 Reviewed by Andreas Kling.
1528 Render tree should not mutate itself. We already fixed this for first-letter, supporting code
1529 can now move to RenderTreeUpdater too.
1532 * WebCore.xcodeproj/project.pbxproj:
1533 * rendering/RenderBlock.cpp:
1534 (WebCore::styleForFirstLetter): Deleted.
1535 (WebCore::isPunctuationForFirstLetter): Deleted.
1536 (WebCore::shouldSkipForFirstLetter): Deleted.
1537 (WebCore::RenderBlock::updateFirstLetterStyle): Deleted.
1538 (WebCore::RenderBlock::createFirstLetterRenderer): Deleted.
1539 (WebCore::RenderBlock::updateFirstLetter): Deleted.
1540 * rendering/RenderBlock.h:
1541 * rendering/RenderRubyRun.cpp:
1542 (WebCore::RenderRubyRun::updateFirstLetter): Deleted.
1543 * rendering/RenderRubyRun.h:
1544 * rendering/RenderTable.cpp:
1545 (WebCore::RenderTable::updateFirstLetter): Deleted.
1546 * rendering/RenderTable.h:
1548 Virtual overrides just disabled first letter for some RenderBlock subclasses. This is now achieved via
1549 supportsFirstLetter test in the first letter updater.
1551 * rendering/TextAutoSizing.cpp:
1552 (WebCore::TextAutoSizingValue::adjustTextNodeSizes):
1553 * rendering/svg/RenderSVGText.cpp:
1554 (WebCore::RenderSVGText::updateFirstLetter): Deleted.
1555 * rendering/svg/RenderSVGText.h:
1556 * style/RenderTreeUpdater.cpp:
1557 (WebCore::RenderTreeUpdater::popParent):
1558 * style/RenderTreeUpdater.h:
1559 * style/RenderTreeUpdaterFirstLetter.cpp: Added.
1560 (WebCore::styleForFirstLetter):
1561 (WebCore::isPunctuationForFirstLetter):
1562 (WebCore::shouldSkipForFirstLetter):
1563 (WebCore::updateFirstLetterStyle):
1564 (WebCore::createFirstLetterRenderer):
1565 (WebCore::supportsFirstLetter):
1566 (WebCore::RenderTreeUpdater::FirstLetter::update):
1567 * style/RenderTreeUpdaterFirstLetter.h: Added.
1569 2017-08-16 Xabier Rodriguez Calvar <calvaris@igalia.com>
1571 [GStreamer][EME] Rework handling key systems and UUIDs
1572 https://bugs.webkit.org/show_bug.cgi?id=175567
1574 Reviewed by Žan Doberšek.
1576 The UUIDs and key system strings were moved to the
1577 GStreamerEMEUtilities class because so far they were managed by
1578 the decryptors and that was ugly.
1580 * platform/GStreamer.cmake:
1581 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1582 (WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem):
1583 * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp: Added.
1584 * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h: Added.
1585 (WebCore::GStreamerEMEUtilities::isClearKeyKeySystem):
1586 (WebCore::GStreamerEMEUtilities::keySystemToUuid):
1587 * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
1588 (webkit_media_clear_key_decrypt_class_init):
1589 * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.h:
1591 2017-08-16 Andy Estes <aestes@apple.com>
1593 [Payment Request] Add an ENABLE flag and an experimental feature preference
1594 https://bugs.webkit.org/show_bug.cgi?id=175622
1596 Reviewed by Tim Horton.
1598 * Configurations/FeatureDefines.xcconfig:
1601 2017-08-15 Ryosuke Niwa <rniwa@webkit.org>
1603 Make DataTransferItemList work with plain text entries
1604 https://bugs.webkit.org/show_bug.cgi?id=175596
1606 Reviewed by Wenson Hsieh.
1608 Added the basic machinery to get the list of plain text items to DataTransferItemList and DataTransferItem.
1610 Each DataTransferItem now depends on DataTransfer so it does ref-forwarding like DataTransferItemList to make
1611 DataTransfer alive as long as any DataTransferItem is alive.
1613 Specifications: https://html.spec.whatwg.org/multipage/dnd.html#the-datatransferitem-interface
1614 https://html.spec.whatwg.org/multipage/dnd.html#the-datatransferitemlist-interface
1616 Tests: editing/pasteboard/datatransfer-items-drop-plaintext-file.html
1617 editing/pasteboard/datatransfer-items-paste-plaintext.html
1619 * dom/DataTransferItem.cpp:
1620 (WebCore::DataTransferItem::DataTransferItem): Added two variants one for plain text and another one for a file.
1621 (WebCore::DataTransferItem::kind const): Rewritten.
1622 (WebCore::DataTransferItem::getAsString const): Implemented.
1623 (WebCore::DataTransferItem::getAsFile const): Implemented.
1624 * dom/DataTransferItem.h:
1625 (WebCore::DataTransferItem::ref): Added.
1626 (WebCore::DataTransferItem::deref): Added.
1627 (WebCore::DataTransferItem::type const): Returns String instead of AtomicString.
1628 (WebCore::DataTransferItem::kind const): Moved to cpp.
1629 * dom/DataTransferItem.idl: Removed NoInterfaceObject since the interface object should exist on DOMWindow.
1630 * dom/DataTransferItemList.cpp:
1631 (WebCore::DataTransferItemList::length): Implemented.
1632 (WebCore::DataTransferItemList::item): Ditto.
1633 (WebCore::isSupportedType): Added. For now, we only support text/plain.
1634 (WebCore::DataTransferItemList::ensureItems): Added. Constructs the list of DataTransferItems.
1635 * dom/DataTransferItemList.h:
1636 (DataTransferItemList): Added m_items. The list is filled lazily by ensureItems.
1637 * dom/DataTransferItemList.idl: Removed NoInterfaceObject since the interface object should exist on DOMWindow.
1639 2017-08-15 Simon Fraser <simon.fraser@apple.com>
1641 Remove ScrollView::clipsRepaints() which was only used by Chromium
1642 https://bugs.webkit.org/show_bug.cgi?id=175594
1644 Reviewed by Tim Horton.
1646 clipsRepaints() was added in r74568 but was only used by Chromium. It's always
1647 true for other platforms, so remove conditionals that test for it and assume true.
1649 * page/FrameView.cpp:
1650 (WebCore::FrameView::scrollContentsFastPath):
1651 * platform/ScrollView.cpp:
1652 (WebCore::ScrollView::repaintContentRectangle):
1653 (WebCore::ScrollView::setClipsRepaints): Deleted.
1654 * platform/ScrollView.h:
1655 (WebCore::ScrollView::clipsRepaints const): Deleted.
1657 2017-08-15 Simon Fraser <simon.fraser@apple.com>
1659 Allow WebCore logging channels to be set from the UI process
1660 https://bugs.webkit.org/show_bug.cgi?id=175608
1662 Reviewed by Tim Horton.
1664 Change initializeLogChannelsIfNecessary() to take an optional String, which can
1665 be a list of log channels passed from the UI process.
1667 * platform/LogInitialization.h:
1668 * platform/Logging.cpp:
1669 (WebCore::initializeLogChannelsIfNecessary):
1671 2017-08-15 Chris Dumez <cdumez@apple.com>
1673 Fetch / Beacon: Use "application/octet-stream" Content-Type for payloads of type ArrayBuffer / ArrayBufferView
1674 https://bugs.webkit.org/show_bug.cgi?id=175600
1676 Reviewed by Youenn Fablet.
1678 Use "application/octet-stream" Content-Type for payloads of type ArrayBuffer / ArrayBufferView in Fetch & Beacon.
1679 If we don't set a Content-Type header, our underlying network stack is going to add a "application/x-www-form-urlencoded"
1680 Content-Type header, which is worse.
1682 Chrome is already using "application/octet-stream" Content-Type in Beacon, but use no Content-Type in Fetch.
1683 The Fetch/Beacon specification says we should have no Content-Type header in this case but this is unfortunately
1684 not something we can support at the moment. Using "application/octet-stream" Content-Type for now seems like the
1687 Test: http/wpt/fetch/fetch-request-arraybuffer-content-type.html
1689 * Modules/fetch/FetchBody.cpp:
1690 (WebCore::FetchBody::extract):
1691 * platform/network/HTTPHeaderValues.cpp:
1692 (WebCore::HTTPHeaderValues::octetStreamContentType):
1693 * platform/network/HTTPHeaderValues.h:
1695 2017-08-15 Robin Morisset <rmorisset@apple.com>
1697 Change the order of arguments of JSWithScope::create() for consistency
1698 https://bugs.webkit.org/show_bug.cgi?id=175585
1700 Reviewed by Saam Barati.
1702 No change of behavior.
1704 * bindings/js/JSHTMLElementCustom.cpp:
1705 (WebCore::JSHTMLElement::pushEventHandlerScope const):
1707 2017-08-15 Youenn Fablet <youenn@apple.com>
1709 [Cache API] Ensure ResourceResponse is not null when redirected/tainting/type fields are set
1710 https://bugs.webkit.org/show_bug.cgi?id=175538
1712 Reviewed by Chris Dumez.
1714 No change of behavior.
1715 This change ensures that response type is preserved when encoding/decoding ResourceResponse, in particular the error type.
1716 This will allow Cache API to preserve responses when reading them from a different process.
1718 * platform/network/ResourceResponseBase.cpp:
1719 (WebCore::ResourceResponseBase::setType):
1720 * platform/network/ResourceResponseBase.h:
1721 (WebCore::ResourceResponseBase::setType):
1723 2017-08-15 Chris Dumez <cdumez@apple.com>
1725 Update CachedResourceLoader::requestResource() to return a WTF::Expected
1726 https://bugs.webkit.org/show_bug.cgi?id=175505
1728 Reviewed by Youenn Fablet.
1730 Update CachedResourceLoader::requestResource() to return a WTF::Expected
1731 type instead of using an out parameter for the ResourceError in case of
1732 synchronous failure.
1734 * Modules/beacon/NavigatorBeacon.cpp:
1735 (WebCore::NavigatorBeacon::sendBeacon):
1736 * bindings/js/CachedScriptFetcher.cpp:
1737 (WebCore::CachedScriptFetcher::requestScriptWithCache const):
1738 * css/CSSFontFaceSrcValue.cpp:
1739 (WebCore::CSSFontFaceSrcValue::cachedFont):
1740 * css/CSSImageSetValue.cpp:
1741 (WebCore::CSSImageSetValue::loadBestFitImage):
1742 * css/CSSImageValue.cpp:
1743 (WebCore::CSSImageValue::loadImage):
1744 * css/StyleRuleImport.cpp:
1745 (WebCore::StyleRuleImport::requestStyleSheet):
1746 * dom/ProcessingInstruction.cpp:
1747 (WebCore::ProcessingInstruction::checkStyleSheet):
1748 * html/HTMLLinkElement.cpp:
1749 (WebCore::HTMLLinkElement::process):
1750 * loader/CrossOriginPreflightChecker.cpp:
1751 (WebCore::CrossOriginPreflightChecker::startPreflight):
1752 * loader/DocumentLoader.cpp:
1753 (WebCore::DocumentLoader::startLoadingMainResource):
1754 * loader/DocumentThreadableLoader.cpp:
1755 (WebCore::DocumentThreadableLoader::loadRequest):
1756 * loader/FrameLoader.cpp:
1757 (WebCore::FrameLoader::loadedResourceFromMemoryCache):
1758 * loader/FrameLoader.h:
1759 * loader/ImageLoader.cpp:
1760 (WebCore::ImageLoader::updateFromElement):
1761 * loader/LinkLoader.cpp:
1762 (WebCore::LinkLoader::preloadIfNeeded):
1763 * loader/MediaResourceLoader.cpp:
1764 (WebCore::MediaResourceLoader::requestResource):
1765 * loader/TextTrackLoader.cpp:
1766 (WebCore::TextTrackLoader::load):
1767 * loader/cache/CachedResourceLoader.cpp:
1768 (WebCore::castCachedResourceTo):
1769 (WebCore::CachedResourceLoader::requestImage):
1770 (WebCore::CachedResourceLoader::requestFont):
1771 (WebCore::CachedResourceLoader::requestTextTrack):
1772 (WebCore::CachedResourceLoader::requestCSSStyleSheet):
1773 (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1774 (WebCore::CachedResourceLoader::requestScript):
1775 (WebCore::CachedResourceLoader::requestXSLStyleSheet):
1776 (WebCore::CachedResourceLoader::requestSVGDocument):
1777 (WebCore::CachedResourceLoader::requestLinkResource):
1778 (WebCore::CachedResourceLoader::requestMedia):
1779 (WebCore::CachedResourceLoader::requestIcon):
1780 (WebCore::CachedResourceLoader::requestRawResource):
1781 (WebCore::CachedResourceLoader::requestBeaconResource):
1782 (WebCore::CachedResourceLoader::requestMainResource):
1783 (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
1784 (WebCore::CachedResourceLoader::requestResource):
1785 (WebCore::CachedResourceLoader::preload):
1786 * loader/cache/CachedResourceLoader.h:
1787 * loader/cache/CachedSVGDocumentReference.cpp:
1788 (WebCore::CachedSVGDocumentReference::load):
1789 * loader/icon/IconLoader.cpp:
1790 (WebCore::IconLoader::startLoading):
1791 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1792 (WebCore::WebCoreAVFResourceLoader::startLoading):
1793 * svg/SVGFEImageElement.cpp:
1794 (WebCore::SVGFEImageElement::requestImageResource):
1795 * svg/SVGFontFaceUriElement.cpp:
1796 (WebCore::SVGFontFaceUriElement::loadFont):
1797 * svg/SVGUseElement.cpp:
1798 (WebCore::SVGUseElement::updateExternalDocument):
1799 * xml/XSLImportRule.cpp:
1800 (WebCore::XSLImportRule::loadSheet):
1802 2017-08-15 Don Olmstead <don.olmstead@sony.com>
1804 [PAL] Move Sleep classes into PAL
1805 https://bugs.webkit.org/show_bug.cgi?id=175456
1807 Reviewed by Ryosuke Niwa.
1809 No new tests. No change in behavior.
1812 * PlatformMac.cmake:
1813 * WebCore.xcodeproj/project.pbxproj:
1814 * html/HTMLMediaElement.cpp:
1815 * html/HTMLMediaElement.h:
1816 * platform/audio/PlatformMediaSessionManager.cpp:
1817 * platform/audio/PlatformMediaSessionManager.h:
1818 * platform/mac/WebVideoFullscreenController.h:
1819 * platform/mac/WebVideoFullscreenController.mm:
1821 2017-08-15 Youenn Fablet <youenn@apple.com>
1823 [Cache API] Adding generic support for CacheStorage and Cache methods
1824 https://bugs.webkit.org/show_bug.cgi?id=175455
1826 Reviewed by Chris Dumez.
1828 Covered by existing tests.
1830 Adding a CacheStorageProvider abstraction that creates a CacheStorageConnection.
1831 The CacheStorageProvider is accessed from the page for Document calls.
1832 The CacheStorageConnection is responsible to implement the read/write operations on the cache database.
1833 At the moment, it does nothing but return not implemented errors.
1835 Implementing CacheStorage APIs and Cache APIs based on the CacheStorageConnection except for Cache add and addAll which will be implemented later on.
1836 CacheStoragConnection is responsible to read/write CacheStorage list of caches and each individual cache.
1837 The CacheStorageConnection is a generic connection and not tied to any document/context.
1838 CacheStorage objects are manipulated by providing to the connection the origin of the context.
1839 CacheStorage are global to all contexts with the same origin.
1840 Cache objects are manipulated by an ID that is given initially by the CacheStorageEngine when opening the Cache object.
1842 Adding various accessors and constructors for Fetch constructs as needed by the Cache API implementation.
1844 * Modules/cache/Cache.cpp:
1845 (WebCore::Cache::Cache):
1846 (WebCore::Cache::~Cache):
1847 The CacheStorageConnection is a generic connection and not tied to any document/context.
1848 (WebCore::Cache::match): Implementation of https://www.w3.org/TR/service-workers-1/#cache-match.
1849 Redirect to matchAll as per spec.
1850 (WebCore::Cache::matchAll): Implementation of https://www.w3.org/TR/service-workers-1/#cache-matchAll.
1851 Checks for request as per spec. Then either refresh the request to response map and return all responses.
1852 Or call the query cache algorithm and return copies of the responses (using clone).
1853 (WebCore::Cache::put):
1854 Check the request and response as per spec.
1855 Add temporary rejection cases (being loaded responses, responses with ReadableStream) as there is no support for them right now.
1856 Call the batch put operation.
1857 (WebCore::Cache::remove):
1858 Check the request and response as per spec.
1859 Call the batch delete operation.
1860 (WebCore::Cache::keys):
1861 Refresh the request to response map and return corresponding requests.
1862 Making sure to reuse the same request objects as per spec.
1863 As per spec, the request to response map is ordered. We implement it as a Vector.
1864 (WebCore::Cache::refreshRequestToResponseMap):
1865 Use the cache storage connection to get an up-to-date list of cached records.
1866 (WebCore::Cache::queryCacheMatch):
1867 Implements the match algorithm defined in https://www.w3.org/TR/service-workers-1/#query-cache-algorithm.
1868 This is split for queryCache as cache storage engine will need to use it when implementing the delete operation.
1869 (WebCore::Cache::queryCache):
1870 Full implementation of https://www.w3.org/TR/service-workers-1/#query-cache-algorithm with no targetStorage argument.
1871 (WebCore::Cache::queryCacheWithTargetStorage):
1872 Full implementation of https://www.w3.org/TR/service-workers-1/#query-cache-algorithm with a provided targetStorage argument.
1873 (WebCore::Cache::batchDeleteOperation):
1874 Implementation of https://www.w3.org/TR/service-workers-1/#batch-cache-operations-algorithm but dedicated to a delete operation.
1875 Delete operation are always done one at a time.
1876 (WebCore::Cache::batchPutOperation):
1877 Implementation of https://www.w3.org/TR/service-workers-1/#batch-cache-operations-algorithm dedicated to a put operation.
1878 Put operation takes one record for put but can take several records in the case of addAll, hence the current design.
1879 (WebCore::Cache::updateRequestToResponseMap):
1880 Update the cache request to response map based on the records retrieved from the cache storage connection.
1881 * Modules/cache/Cache.h:
1882 (WebCore::Cache::create):
1883 (WebCore::Cache::name const):
1884 * Modules/cache/Cache.idl:
1885 * Modules/cache/CacheStorage.cpp:
1886 (WebCore::CacheStorage::origin const):
1887 Computing the cache origin that is passed to the CacheStorageConnection.
1888 (WebCore::CacheStorage::has):
1889 Implementation of https://www.w3.org/TR/service-workers-1/#cache-storage-has.
1890 Call the cache storage connection to refresh its cache map.
1891 Then use it to check whether a cache exists.
1892 (WebCore::CacheStorage::refreshCacheMap):
1893 Use the cache storage connection to get the list of existing caches.
1894 (WebCore::CacheStorage::open):
1895 Implementation of https://www.w3.org/TR/service-workers-1/#cache-storage-open.
1896 Refreshing the cache map so as to return a pre-existing cache if any.
1897 (WebCore::CacheStorage::remove):
1898 Implementation of https://www.w3.org/TR/service-workers-1/#cache-storage-delete-method.
1899 Refreshing the cache map so as to do nothing if there is no cache to remove.
1900 (WebCore::CacheStorage::keys):
1901 Implementation of https://www.w3.org/TR/service-workers-1/#cache-storage-keys-method.
1902 Refreshing the cache map and returnin its keys.
1903 As per spec, the cache map is ordered. We implement it as a Vector.
1904 (WebCore::CacheStorage::cacheMap):
1905 Get the list of cache objects, used as a private accessor for JS built-ins.
1906 * Modules/cache/CacheStorage.h:
1907 (WebCore::CacheStorage::create):
1908 (WebCore::CacheStorage::CacheStorage):
1909 * Modules/cache/CacheStorageConnection.cpp: Added.
1910 (WebCore::CacheStorageConnection::exceptionFromError):
1911 * Modules/cache/CacheStorageConnection.h: Added.
1912 Makes the link between Web facing Cache API and the cache storage engine.
1913 Envisioned implementation are:
1914 - One main thread connection used by all documents in the given process.
1915 - One connection per worker that forwards the calls to the main thread and use the main thread connection afterwards.
1916 (WebCore::CacheStorageConnection::create):
1917 (WebCore::CacheStorageConnection::open):
1918 (WebCore::CacheStorageConnection::remove):
1919 (WebCore::CacheStorageConnection::refreshCacheMap):
1920 (WebCore::CacheStorageConnection::refreshRequestToResponseMap):
1921 (WebCore::CacheStorageConnection::batchDeleteOperation):
1922 (WebCore::CacheStorageConnection::batchPutOperation):
1923 * Modules/cache/CacheStorageRecord.h: Added. A fetch record from the Web facing cache API perspective.
1924 * Modules/cache/DOMWindowCaches.cpp:
1925 (WebCore::DOMWindowCaches::caches const):
1926 * Modules/cache/WorkerGlobalScopeCaches.cpp:
1927 (WebCore::WorkerGlobalScopeCaches::from):
1928 (WebCore::WorkerGlobalScopeCaches::caches const):
1929 * Modules/cache/WorkerGlobalScopeCaches.h:
1930 (WebCore::WorkerGlobalScopeCaches::WorkerGlobalScopeCaches):
1931 * Modules/fetch/FetchBodyOwner.h:
1932 (WebCore::FetchBodyOwner::isReadableStreamBody const): Added getter as it is used by cache API.
1933 * Modules/fetch/FetchHeaders.h:
1934 (WebCore::FetchHeaders::create): Add another create as used by the cache API.
1935 (WebCore::FetchHeaders::guard const): Added getter and IPC serializer as this is something that will be stored by the cache engine.
1936 * Modules/fetch/FetchLoader.cpp:
1937 (WebCore::FetchLoader::start):
1938 * Modules/fetch/FetchRequest.cpp:
1939 (WebCore::buildOptions): In case FetchRequest::create is called from C++, there is no need to set init.window to a null value.
1940 Add a check so that no value at all is the same as a null/undefined value.
1941 (WebCore::FetchRequest::resourceRequest const):
1942 * Modules/fetch/FetchRequest.h:
1943 * Modules/fetch/FetchResponse.h:
1944 * WebCore.xcodeproj/project.pbxproj:
1945 * inspector/InspectorOverlay.cpp:
1946 (WebCore::InspectorOverlay::overlayPage):
1947 * page/CacheStorageProvider.h: Added.
1948 Interface to create main thread cache storage connection for the given page.
1949 There will be one provider for each process.
1950 Passing a sessionID so that we will create a connection per session.
1952 (WebCore::Page::Page):
1954 (WebCore::Page::cacheStorageProvider):
1955 * page/PageConfiguration.cpp:
1956 (WebCore::PageConfiguration::PageConfiguration):
1957 * page/PageConfiguration.h:
1958 * svg/graphics/SVGImage.cpp:
1959 (WebCore::SVGImage::dataChanged):
1961 2017-08-15 Chris Dumez <cdumez@apple.com>
1963 Implement quota limitation for keepalive Fetch requests
1964 https://bugs.webkit.org/show_bug.cgi?id=175482
1966 Reviewed by Sam Weinig and Youenn Fablet.
1968 Implement quota limitation for keepalive Fetch requests as per:
1969 - https://fetch.spec.whatwg.org/#http-network-or-cache-fetch (Step 9)
1971 This partly works for Beacon as well, meaning that no Beacon with a body
1972 over 64Kb can be sent. However, we don't keep track about wether or not
1973 beacon loads are inflight or not.
1975 Also update CachedResourceLoader::requestResource() so that the caller
1976 can get a ResourceError when it returns null. This is useful for both
1977 Fetch and Beacon to return better error messages.
1979 Test: http/wpt/beacon/beacon-quota.html
1982 * Modules/beacon/NavigatorBeacon.cpp:
1983 (WebCore::NavigatorBeacon::sendBeacon):
1984 * Modules/fetch/FetchBodyOwner.cpp:
1985 (WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
1986 (WebCore::FetchBodyOwner::BlobLoader::didFail):
1987 * Modules/fetch/FetchBodyOwner.h:
1988 * Modules/fetch/FetchLoader.cpp:
1989 (WebCore::FetchLoader::start):
1990 (WebCore::FetchLoader::didFail):
1991 * Modules/fetch/FetchLoaderClient.h:
1992 * Modules/fetch/FetchResponse.cpp:
1993 (WebCore::FetchResponse::BodyLoader::didFail):
1994 * Modules/fetch/FetchResponse.h:
1995 * WebCore.xcodeproj/project.pbxproj:
1996 * loader/DocumentThreadableLoader.cpp:
1997 (WebCore::DocumentThreadableLoader::loadRequest):
1998 * loader/cache/CachedResource.cpp:
1999 (WebCore::CachedResource::load):
2000 * loader/cache/CachedResource.h:
2001 (WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):
2002 * loader/cache/CachedResourceLoader.cpp:
2003 (WebCore::createResource):
2004 (WebCore::CachedResourceLoader::requestImage):
2005 (WebCore::CachedResourceLoader::requestFont):
2006 (WebCore::CachedResourceLoader::requestTextTrack):
2007 (WebCore::CachedResourceLoader::requestCSSStyleSheet):
2008 (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
2009 (WebCore::CachedResourceLoader::requestScript):
2010 (WebCore::CachedResourceLoader::requestXSLStyleSheet):
2011 (WebCore::CachedResourceLoader::requestSVGDocument):
2012 (WebCore::CachedResourceLoader::requestLinkResource):
2013 (WebCore::CachedResourceLoader::requestMedia):
2014 (WebCore::CachedResourceLoader::requestIcon):
2015 (WebCore::CachedResourceLoader::requestRawResource):
2016 (WebCore::CachedResourceLoader::requestBeaconResource):
2017 (WebCore::CachedResourceLoader::requestMainResource):
2018 (WebCore::CachedResourceLoader::requestResource):
2019 (WebCore::CachedResourceLoader::preload):
2020 * loader/cache/CachedResourceLoader.h:
2021 * loader/cache/KeepaliveRequestTracker.cpp: Added.
2022 (WebCore::KeepaliveRequestTracker::~KeepaliveRequestTracker):
2023 (WebCore::KeepaliveRequestTracker::canLoadRequest):
2024 (WebCore::KeepaliveRequestTracker::registerRequest):
2025 (WebCore::KeepaliveRequestTracker::responseReceived):
2026 (WebCore::KeepaliveRequestTracker::notifyFinished):
2027 (WebCore::KeepaliveRequestTracker::unregisterRequest):
2028 * loader/cache/KeepaliveRequestTracker.h: Added.
2029 * platform/network/FormData.cpp:
2030 (WebCore::FormDataElement::lengthInBytes const):
2031 (WebCore::FormData::lengthInBytes const):
2032 * platform/network/FormData.h:
2034 2017-08-15 Darin Adler <darin@apple.com>
2036 REGRESSION(r220052): http/tests/appcache/deferred-events-delete-while-raising-timer.html is crashing.
2037 https://bugs.webkit.org/show_bug.cgi?id=175107
2039 Reviewed by Alexey Proskuryakov.
2041 * loader/FrameLoader.cpp:
2042 (WebCore::FrameLoader::checkLoadComplete): Moved the assertion to after the null page check.
2044 2017-08-15 Commit Queue <commit-queue@webkit.org>
2046 Unreviewed, rolling out r219504.
2047 https://bugs.webkit.org/show_bug.cgi?id=175580
2049 Broke Arabic text shaping (Requested by mcatanzaro on
2054 "[HarfBuzz] Decomposed Vietnamese characters are rendered
2056 https://bugs.webkit.org/show_bug.cgi?id=174418
2057 http://trac.webkit.org/changeset/219504
2059 2017-08-14 Carlos Garcia Campos <cgarcia@igalia.com>
2061 WebDriver: handle click events on option elements
2062 https://bugs.webkit.org/show_bug.cgi?id=174710
2063 <rdar://problem/33459305>
2065 Reviewed by Brian Burg.
2067 Export WebCore symbols required by WebKit layer.
2069 * html/HTMLOptGroupElement.h:
2070 * html/HTMLOptionElement.h:
2072 2017-08-14 Simon Fraser <simon.fraser@apple.com>
2074 Remove Proximity Events and related code
2075 https://bugs.webkit.org/show_bug.cgi?id=175545
2077 Reviewed by Daniel Bates.
2079 No platform enables Proximity Events, so remove code inside ENABLE(PROXIMITY_EVENTS)
2080 and other related code.
2083 * Configurations/FeatureDefines.xcconfig:
2084 * DerivedSources.cpp:
2085 * Modules/proximity/DeviceProximityClient.h: Removed.
2086 * Modules/proximity/DeviceProximityController.cpp: Removed.
2087 * Modules/proximity/DeviceProximityController.h: Removed.
2088 * Modules/proximity/DeviceProximityEvent.cpp: Removed.
2089 * Modules/proximity/DeviceProximityEvent.h: Removed.
2090 * Modules/proximity/DeviceProximityEvent.idl: Removed.
2092 * dom/EventNames.in:
2093 * history/PageCache.cpp:
2094 (WebCore::canCachePage):
2095 * page/DOMWindow.cpp:
2096 (WebCore::DOMWindow::addEventListener):
2097 (WebCore::DOMWindow::removeEventListener):
2098 (WebCore::DOMWindow::removeAllEventListeners):
2099 * page/DOMWindow.idl:
2100 * page/DiagnosticLoggingKeys.cpp:
2101 (WebCore::DiagnosticLoggingKeys::deviceProximityKey): Deleted.
2102 * page/DiagnosticLoggingKeys.h:
2103 * testing/Internals.cpp:
2104 (WebCore::Internals::setDeviceProximity): Deleted.
2105 * testing/Internals.h:
2106 * testing/Internals.idl:
2108 2017-08-14 Simon Fraser <simon.fraser@apple.com>
2110 Remove ENABLE(REQUEST_AUTOCOMPLETE) code, which was disabled everywhere
2111 https://bugs.webkit.org/show_bug.cgi?id=175504
2113 Reviewed by Sam Weinig.
2115 REQUEST_AUTOCOMPLETE was added in r133396 then removed in r148731, but brought back in r173596,
2116 however no further work was done, and it was left disabled. So remove the code.
2118 * Configurations/FeatureDefines.xcconfig:
2119 * DerivedSources.make:
2120 * WebCore.xcodeproj/project.pbxproj:
2121 * dom/AutocompleteErrorEvent.h: Removed.
2122 * dom/AutocompleteErrorEvent.idl: Removed.
2123 * dom/EventNames.in:
2124 * dom/GlobalEventHandlers.idl:
2125 * html/HTMLFormElement.cpp:
2126 (WebCore::HTMLFormElement::HTMLFormElement):
2127 (WebCore::HTMLFormElement::requestAutocomplete): Deleted.
2128 (WebCore::HTMLFormElement::finishRequestAutocomplete): Deleted.
2129 (WebCore::HTMLFormElement::requestAutocompleteTimerFired): Deleted.
2130 * html/HTMLFormElement.h:
2131 * html/HTMLFormElement.idl:
2132 * loader/EmptyClients.cpp:
2133 * loader/FrameLoaderClient.h:
2135 2017-08-14 Chris Dumez <cdumez@apple.com>
2137 XHR should only fire an abort event if the cancellation was requested by the client
2138 https://bugs.webkit.org/show_bug.cgi?id=175546
2140 Reviewed by Youenn Fablet.
2142 XHR should only fire an abort event if the cancellation was requested by the client, otherwise it should fire an error event.
2143 Blink and Gecko already match the specification.
2146 - https://xhr.spec.whatwg.org/#handle-errors
2147 - https://xhr.spec.whatwg.org/#the-abort()-method
2149 Test: http/tests/navigation/page-cache-xhr-in-pagehide.html
2151 * xml/XMLHttpRequest.cpp:
2152 (WebCore::XMLHttpRequest::open):
2153 (WebCore::XMLHttpRequest::abort):
2154 (WebCore::XMLHttpRequest::abortError):
2155 (WebCore::XMLHttpRequest::didFail):
2156 * xml/XMLHttpRequest.h:
2158 2017-08-14 Simon Fraser <simon.fraser@apple.com>
2160 Remove ENABLE_VIEW_MODE_CSS_MEDIA and related code
2161 https://bugs.webkit.org/show_bug.cgi?id=175557
2163 Reviewed by Jon Lee.
2165 No port cares about the ENABLE(VIEW_MODE_CSS_MEDIA) feature, so remove it.
2167 * Configurations/FeatureDefines.xcconfig:
2168 * css/CSSValueKeywords.in:
2169 * css/MediaFeatureNames.h:
2170 * css/MediaQueryEvaluator.cpp:
2171 (WebCore::viewModeEvaluate): Deleted.
2172 * css/MediaQueryExpression.cpp:
2173 (WebCore::featureWithValidIdent):
2174 (WebCore::isFeatureValidWithoutValue):
2176 (WebCore::Page::stringToViewMode): Deleted.
2177 (WebCore::Page::setViewMode): Deleted.
2179 (WebCore::Page::viewMode const): Deleted.
2181 2017-08-14 Myles C. Maxfield <mmaxfield@apple.com>
2184 https://bugs.webkit.org/show_bug.cgi?id=175382
2186 Reviewed by Simon Fraser.
2188 The syntax is very simple: font-display: auto | block | swap | fallback | optional.
2189 So, parsing support is quite straightfoward.
2191 Test: fast/text/font-display/parse.html
2193 * css/CSSComputedStyleDeclaration.cpp:
2194 (WebCore::ComputedStyleExtractor::propertyValue):
2195 * css/CSSFontFace.cpp:
2196 (WebCore::CSSFontFace::setLoadingBehavior):
2197 * css/CSSFontFace.h:
2198 * css/CSSFontSelector.cpp:
2199 (WebCore::CSSFontSelector::addFontFaceRule):
2200 * css/CSSPrimitiveValueMappings.h:
2201 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2202 (WebCore::CSSPrimitiveValue::operator FontLoadingBehavior const):
2203 * css/CSSProperties.json:
2204 * css/CSSProperty.cpp:
2205 (WebCore::CSSProperty::isDescriptorOnly):
2206 * css/CSSValueKeywords.in:
2207 * css/parser/CSSPropertyParser.cpp:
2208 (WebCore::consumeFontFaceFontDisplay):
2209 (WebCore::CSSPropertyParser::parseFontFaceDescriptor):
2210 * rendering/style/RenderStyleConstants.h:
2212 2017-08-14 Jer Noble <jer.noble@apple.com>
2214 Obj-C exception crash in AVStreamSession when using EME in Private Browsing mode
2215 https://bugs.webkit.org/show_bug.cgi?id=175547
2217 Reviewed by Eric Carlson.
2219 When the storagePath() is empty, do not use those AVStreamSession APIs which require a valid file path to stored
2220 proof-of-key-release data.
2222 Drive-by fix: return emptyString() from HTMLMediaElement::mediaPlayerMediaKeysStorageDirectory() when in Private
2223 Browsing mode, to match the behavior of WebKitMediaKeySession.
2225 * html/HTMLMediaElement.cpp:
2226 (WebCore::HTMLMediaElement::mediaPlayerMediaKeysStorageDirectory const):
2227 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
2228 (WebCore::CDMSessionAVStreamSession::releaseKeys):
2229 (WebCore::CDMSessionAVStreamSession::update):
2230 (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
2232 2017-08-14 Andy Estes <aestes@apple.com>
2234 REGRESSION (r220456): Crash in PreviewLoader::shouldCreateForMIMEType() when a ResourceResponse has a null MIME type
2235 https://bugs.webkit.org/show_bug.cgi?id=175548
2236 <rdar://problem/33866206>
2238 Reviewed by Brady Eidson.
2240 New API test: QuickLook.ShouldCreateForMIMEType
2242 * WebCore.xcodeproj/project.pbxproj:
2243 * loader/ios/PreviewLoader.h:
2244 * loader/ios/PreviewLoader.mm:
2245 (WebCore::PreviewLoader::shouldCreateForMIMEType): Check if mimeType is a null String before
2246 calling HashSet::contains().
2248 2017-08-14 Andy Estes <aestes@apple.com>
2250 [Apple Pay] Add support for phonetic contact names
2251 https://bugs.webkit.org/show_bug.cgi?id=175537
2252 <rdar://problem/32002644>
2254 Reviewed by Tim Horton.
2256 * Modules/applepay/ApplePayError.idl: Defined "phoneticName" in ApplePayErrorContactField.
2257 * Modules/applepay/ApplePayPaymentContact.h: Defined phoneticGivenName and phoneticFamilyName
2258 in ApplePayPaymentContact.
2259 * Modules/applepay/ApplePayPaymentContact.idl: Ditto.
2260 * Modules/applepay/ApplePayPaymentRequest.h: Defined PhoneticName in
2261 ApplePayPaymentRequest::ContactField.
2262 * Modules/applepay/ApplePayPaymentRequest.idl: Defined "phoneticName" in ApplePayContactField.
2263 * Modules/applepay/ApplePaySession.cpp:
2264 (WebCore::convertAndValidate): Added a version parameter. Added code to convert
2265 ContactField::PhoneticName, throwing an exception if version is less than 3.
2266 * Modules/applepay/PaymentContact.h: Added a version parameter to fromApplePayPaymentContact().
2267 * Modules/applepay/PaymentRequest.h: Defined phoneticName in PaymentRequest::ContactFields
2268 and defined PhoneticName in PaymentError::ContactField.
2269 * Modules/applepay/cocoa/PaymentContactCocoa.mm:
2270 (WebCore::convert): Added a version parameter. Set a phoneticRepresentation on the
2271 PKContact's name if there are non-empty phonetic names and version is 3 or greater.
2272 (WebCore::PaymentContact::fromApplePayPaymentContact): Passed version to convert().
2274 2017-08-14 Said Abou-Hallawa <sabouhallawa@apple.com>
2276 The none smooth stroke applied to an SVG shape breaks its hit testing
2277 https://bugs.webkit.org/show_bug.cgi?id=175506
2279 Reviewed by Simon Fraser.
2281 Clear RenderSVGShape::m_path when calling RenderSVGRect::updateShapeFromElement().
2282 The m_path will be recalculated when RenderSVGShape::updateShapeFromElement()
2283 is called from RenderSVGRect::shapeDependentStrokeContains().
2285 Test: svg/stroke/stroke-linejoin-click.html
2287 * rendering/svg/RenderSVGRect.cpp:
2288 (WebCore::RenderSVGRect::updateShapeFromElement):
2289 * rendering/svg/RenderSVGShape.h:
2290 (WebCore::RenderSVGShape::clearPath):
2292 2017-08-14 Adrian Perez de Castro <aperez@igalia.com>
2294 [WPE] Implement WebCore::standardUserAgent()
2295 https://bugs.webkit.org/show_bug.cgi?id=175507
2297 Reviewed by Michael Catanzaro.
2299 Remove "_GLIB" from user-agent version macros.
2301 * platform/glib/UserAgentGLib.cpp:
2302 (WebCore::versionForUAString):
2304 2017-08-14 Chris Dumez <cdumez@apple.com>
2306 Unreviewed, rollout r220622 & r220696
2307 https://bugs.webkit.org/show_bug.cgi?id=175482
2308 <rdar://problem/33860695>
2310 Seems to have caused failures on iOS.
2313 * Modules/beacon/NavigatorBeacon.cpp:
2314 (WebCore::NavigatorBeacon::sendBeacon):
2315 * Modules/fetch/FetchBodyOwner.cpp:
2316 (WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
2317 (WebCore::FetchBodyOwner::BlobLoader::didFail):
2318 * Modules/fetch/FetchBodyOwner.h:
2319 * Modules/fetch/FetchLoader.cpp:
2320 (WebCore::FetchLoader::start):
2321 (WebCore::FetchLoader::didFail):
2322 * Modules/fetch/FetchLoaderClient.h:
2323 * Modules/fetch/FetchResponse.cpp:
2324 (WebCore::FetchResponse::BodyLoader::didFail):
2325 * Modules/fetch/FetchResponse.h:
2326 * WebCore.xcodeproj/project.pbxproj:
2327 * loader/DocumentThreadableLoader.cpp:
2328 (WebCore::DocumentThreadableLoader::loadRequest):
2329 * loader/cache/CachedRawResource.cpp:
2330 (WebCore::CachedRawResource::finishLoading):
2331 * loader/cache/CachedResource.cpp:
2332 (WebCore::CachedResource::load):
2333 * loader/cache/CachedResource.h:
2334 (WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):
2335 * loader/cache/CachedResourceLoader.cpp:
2336 (WebCore::createResource):
2337 (WebCore::CachedResourceLoader::requestImage):
2338 (WebCore::CachedResourceLoader::requestFont):
2339 (WebCore::CachedResourceLoader::requestTextTrack):
2340 (WebCore::CachedResourceLoader::requestCSSStyleSheet):
2341 (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
2342 (WebCore::CachedResourceLoader::requestScript):
2343 (WebCore::CachedResourceLoader::requestXSLStyleSheet):
2344 (WebCore::CachedResourceLoader::requestSVGDocument):
2345 (WebCore::CachedResourceLoader::requestLinkResource):
2346 (WebCore::CachedResourceLoader::requestMedia):
2347 (WebCore::CachedResourceLoader::requestIcon):
2348 (WebCore::CachedResourceLoader::requestRawResource):
2349 (WebCore::CachedResourceLoader::requestBeaconResource):
2350 (WebCore::CachedResourceLoader::requestMainResource):
2351 (WebCore::CachedResourceLoader::requestResource):
2352 (WebCore::CachedResourceLoader::preload):
2353 * loader/cache/CachedResourceLoader.h:
2354 * loader/cache/KeepaliveRequestTracker.cpp: Removed.
2355 * loader/cache/KeepaliveRequestTracker.h: Removed.
2356 * platform/network/FormData.cpp:
2357 (WebCore::FormData::appendFile):
2358 (WebCore::FormData::appendFileRange):
2359 (WebCore::FormData::appendBlob):
2360 (WebCore::FormData::expandDataStore):
2361 * platform/network/FormData.h:
2363 2017-08-14 Daniel Bates <dabates@apple.com>
2365 [css-ui] Implement caret-color support
2366 https://bugs.webkit.org/show_bug.cgi?id=166572
2367 <rdar://problem/33852589>
2369 Reviewed by David Hyatt.
2371 Add support for the CSS property caret-color as per <https://www.w3.org/TR/css-ui-3/#caret-color> (02 March 2017).
2372 The property caret-color specifies the color of the text insertion caret in an editable element,
2373 say an HTML textarea element.
2375 Unlike other CSS color properties caret-color can have value "auto" and this is its initial
2376 value. Internally we treat value "auto" as an invalid caret color to simplify the code.
2378 Tests: editing/pasteboard/preserve-caret-color.html
2379 fast/css/caret-color-auto.html
2380 fast/css/caret-color-fallback-to-color.html
2381 fast/css/caret-color-inherit.html
2382 fast/css/caret-color-span-inside-editable-parent.html
2383 fast/css/caret-color.html
2384 fast/history/visited-link-caret-color.html
2386 * css/CSSComputedStyleDeclaration.cpp:
2387 (WebCore::ComputedStyleExtractor::propertyValue):
2388 * css/CSSProperties.json: Add property caret-color. We represent the initial "auto" Also, fix up
2389 wording in a comment while I am here.
2390 * css/StyleResolver.cpp:
2391 (WebCore::isValidVisitedLinkProperty): Add caret-color to the list of properties that can be
2392 applied to visited hyperlinks.
2393 * css/parser/CSSParserFastPaths.cpp:
2394 (WebCore::parseCaretColor): Added.
2395 (WebCore::CSSParserFastPaths::maybeParseValue): Unlike other CSS color properties caret-color
2396 can be defined to be "auto". We explicitly check if the property is caret-color and use
2397 parseCaretColor() to parse its value.
2398 * css/parser/CSSPropertyParser.cpp:
2399 (WebCore::consumeCaretColor): Added.
2400 (WebCore::CSSPropertyParser::parseSingleValue): Similar to the change to CSSParserFastPaths::maybeParseValue()
2401 use a dedicated code path to parse caret-color.
2402 * editing/EditingStyle.cpp: Preserve caret-color during editing operations.
2403 * editing/FrameSelection.cpp:
2404 (WebCore::CaretBase::paintCaret const): Modified code to query property caret-color instead of
2405 color for the color of the text insertion caret. Always honor the caret-color of the editable
2406 element if it is valid color. Note that "caret-color: auto" is treated as an invalid color
2407 internally. A caret-color can have an invalid color if its inherits from the CSS color property
2408 with an invalid color. If caret-color is a valid color then we take it to be the color of the
2409 text insertion caret. Otherwise, we do what we do today and use a heuristic to determine the
2410 color of the text-insertion caret.
2411 (WebCore::disappearsIntoBackground): Deleted; moved logic into CaretBase::paintCaret().
2412 * page/animation/CSSPropertyAnimation.cpp:
2413 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Add property wrapper
2414 to support animating caret-color.
2415 * rendering/style/RenderStyle.cpp:
2416 (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline const): Modified to consider
2417 changes to caret color.
2418 (WebCore::RenderStyle::colorIncludingFallback const): Modified to compute the appropriate
2419 color for property caret-color with respect to an unvisited or visited link.
2420 * rendering/style/RenderStyle.h:
2421 (WebCore::RenderStyle::setCaretColor): Added.
2422 (WebCore::RenderStyle::setVisitedLinkCaretColor): Added.
2423 (WebCore::RenderStyle::caretColor const): Added.
2424 (WebCore::RenderStyle::visitedLinkCaretColor const): Added.
2425 * rendering/style/StyleRareInheritedData.cpp:
2426 (WebCore::StyleRareInheritedData::StyleRareInheritedData): Modified to consider caret color.
2427 (WebCore::StyleRareInheritedData::operator== const): Ditto.
2428 * rendering/style/StyleRareInheritedData.h:
2430 2017-08-14 Zan Dobersek <zdobersek@igalia.com>
2432 REGRESSION(r220517-r220521) [GTK] Various compositing tests fail
2433 https://bugs.webkit.org/show_bug.cgi?id=175478
2435 Reviewed by Sergio Villar Senin.
2437 Fix a regression introduced in r220519. Move a framebuffer binding in TextureMapperGL
2438 away from GraphicsContext3D and onto the OpenGL API to work around the framebuffer
2439 binding state that's kept in the GraphicsContext3D class. This mismatch in how the
2440 framebuffer was bound was causing a couple of test failures in compositing tests.
2442 No new tests -- regressed tests have their failure expectations removed.
2444 * platform/graphics/texmap/TextureMapperGL.cpp:
2445 (WebCore::TextureMapperGL::bindDefaultSurface): Don't use GraphicsContext3D for the
2446 glBindFramebuffer() call. This would be done in subsequent patches that would move
2447 TextureMapperGL off the GraphicsContext3D usage, but this specific use case clashes
2448 with the framebuffer binding that's done in BitmapTextureGL and was causing test
2451 2017-08-14 Chris Dumez <cdumez@apple.com>
2453 Unreviewed fix after r220622 to address crashes on iOS.
2455 * loader/cache/CachedRawResource.cpp:
2456 (WebCore::CachedRawResource::finishLoading):
2458 2017-08-14 Antti Koivisto <antti@apple.com>
2460 Factor text autosizing into a class
2461 https://bugs.webkit.org/show_bug.cgi?id=175530
2463 Reviewed by Andreas Kling.
2465 Move the remaining parts out of Document.
2467 * css/StyleBuilderCustom.h:
2468 (WebCore::computeLineHeightMultiplierDueToFontSize):
2470 (WebCore::Document::destroyRenderTree):
2471 (WebCore::Document::textAutoSizing):
2472 (WebCore::TextAutoSizingTraits::constructDeletedValue): Deleted.
2473 (WebCore::TextAutoSizingTraits::isDeletedValue): Deleted.
2474 (WebCore::Document::addAutoSizedNode): Deleted.
2475 (WebCore::Document::updateAutoSizedNodes): Deleted.
2476 (WebCore::Document::clearAutoSizedNodes): Deleted.
2478 * rendering/RenderBlockFlow.cpp:
2479 (WebCore::RenderBlockFlow::adjustComputedFontSizes):
2480 * rendering/RenderElement.cpp:
2481 (WebCore::RenderElement::adjustComputedFontSizesOnBlocks):
2482 (WebCore::RenderElement::resetTextAutosizing):
2483 * rendering/TextAutoSizing.cpp:
2484 (WebCore::TextAutoSizingTraits::constructDeletedValue):
2485 (WebCore::TextAutoSizingTraits::isDeletedValue):
2486 (WebCore::TextAutoSizing::addTextNode):
2487 (WebCore::TextAutoSizing::updateRenderTree):
2488 (WebCore::TextAutoSizing::reset):
2489 * rendering/TextAutoSizing.h:
2491 2017-08-14 Antti Koivisto <antti@apple.com>
2493 [Render Tree Mutation] First letter should not mutate the render tree while in layout.
2494 https://bugs.webkit.org/show_bug.cgi?id=163848
2496 Reviewed by Zalan Bujtas.
2498 RenderBlock::updateFirstLetter shouldn't be called during layout. Instead it should
2499 be invoked by the RenderTreeUpdater.
2501 With this future patches can move updateFirstLetter() and the related functions
2502 completely out of the render tree.
2504 * rendering/RenderBlock.cpp:
2505 (WebCore::RenderBlock::layout):
2507 No more updateFirstLetter calls during layout...
2509 (WebCore::RenderBlock::computePreferredLogicalWidths):
2511 ...or preferred width computation.
2513 (WebCore::RenderBlock::updateFirstLetter):
2514 * rendering/RenderBlock.h:
2515 * rendering/RenderRubyRun.cpp:
2516 (WebCore::RenderRubyRun::updateFirstLetter):
2517 * rendering/RenderRubyRun.h:
2518 * rendering/RenderTable.cpp:
2519 (WebCore::RenderTable::updateFirstLetter):
2520 * rendering/RenderTable.h:
2521 * rendering/svg/RenderSVGText.cpp:
2522 (WebCore::RenderSVGText::updateFirstLetter):
2523 * rendering/svg/RenderSVGText.h:
2524 * style/RenderTreeUpdater.cpp:
2525 (WebCore::RenderTreeUpdater::popParent):
2527 Call updateFirstLetter when closing the element. All of of descedant renderers are known here
2528 so this can be resolved correctly.
2530 2017-08-13 Manuel Rego Casasnovas <rego@igalia.com>
2532 Composition underline color is always black
2533 https://bugs.webkit.org/show_bug.cgi?id=174675
2535 Reviewed by Ryosuke Niwa.
2537 This patch uses the current color of the text instead of black
2538 for the composition underline marker.
2539 This makes it visible in the case we have a black/dark background.
2541 Test: editing/composition-underline-color.html
2543 * editing/CompositionUnderline.h:
2544 (WebCore::CompositionUnderline::CompositionUnderline):
2545 Added new attribute compositionUnderlineColor.
2546 * rendering/InlineTextBox.cpp:
2547 (WebCore::InlineTextBox::paintCompositionUnderline):
2548 Use the text color if compositionUnderlineColor is TextColor.
2550 2017-08-13 Carlos Garcia Campos <cgarcia@igalia.com>
2552 [GTK] stop kinetic scrolling when a zero movement is reached
2553 https://bugs.webkit.org/show_bug.cgi?id=175468
2555 Reviewed by Michael Catanzaro.
2557 This is GTK+ change by Christian Hergert.
2558 https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=4f63d839550f7a9038b391e7d3e1e6fc8bdfafa6
2560 When the kinetic scrolling reduces its speed, there can be multiple frames where the movement is zero pixels,
2561 followed by a 1 pixel movement later on. This causes a "jitter" right at the end of the scroll which makes it
2562 feel less quality than other platforms. Instead, we should just clamp it as soon as we get a zero movement.
2564 * platform/ScrollAnimationKinetic.cpp:
2565 (WebCore::ScrollAnimationKinetic::PerAxisData::animateScroll):
2567 2017-08-13 Chris Dumez <cdumez@apple.com>
2569 Drop non-const getter for CachedResource::resourceRequest()
2570 https://bugs.webkit.org/show_bug.cgi?id=175524
2572 Reviewed by Youenn Fablet.
2574 Drop non-const getter for CachedResource::resourceRequest(). It would be unsafe to modify the request of a CachedResource
2575 after it has been cached. Exposing such a getter is therefore a footgun.
2577 * loader/LinkLoader.cpp:
2578 (WebCore::LinkLoader::preloadIfNeeded):
2579 * loader/cache/CachedImage.cpp:
2580 (WebCore::CachedImage::CachedImage):
2581 * loader/cache/CachedImage.h:
2582 * loader/cache/CachedResource.cpp:
2583 (WebCore::CachedResource::CachedResource):
2584 * loader/cache/CachedResource.h:
2585 (WebCore::CachedResource::resourceRequest const):
2586 (WebCore::CachedResource::ignoreForRequestCount const):
2587 (WebCore::CachedResource::setIgnoreForRequestCount):
2588 * loader/cache/CachedResourceLoader.cpp:
2589 (WebCore::CachedResourceLoader::requestResource):
2590 * loader/cache/CachedResourceRequest.h:
2591 (WebCore::CachedResourceRequest::ignoreForRequestCount const):
2592 (WebCore::CachedResourceRequest::setIgnoreForRequestCount):
2593 * loader/cache/MemoryCache.cpp:
2594 (WebCore::MemoryCache::addImageToCache):
2595 * platform/network/ResourceRequestBase.h:
2597 2017-08-13 Adrian Perez de Castro <aperez@igalia.com>
2599 [WPE] Implement WebCore::standardUserAgent()
2600 https://bugs.webkit.org/show_bug.cgi?id=175507
2602 Reviewed by Carlos Alberto Lopez Perez.
2604 Implement missing User-Agent handling for the WPE port by sharing the code with the GTK+ port.
2606 * PlatformGTK.cmake: Handlde renaming of UserAgentGtk.cpp to UserAgentGLib.cpp.
2607 * PlatformWPE.cmake: Add UserAgentGLib.cpp and UserAgentQuirks.cpp to the list of built WebCore sources.
2608 * platform/glib/UserAgentGLib.cpp: Renamed from Source/WebCore/platform/gtk/UserAgentGtk.cpp.
2609 (WebCore::versionForUAString): Change "GTK" in UA version macros to "GLIB".
2611 2017-08-11 Ryosuke Niwa <rniwa@webkit.org>
2613 Replace DATA_TRANSFER_ITEMS by a runtime flag and add a stub implementation
2614 https://bugs.webkit.org/show_bug.cgi?id=175474
2615 <rdar://problem/33844628>
2617 Reviewed by Wenson Hsieh.
2619 Replaced the build flag by a runtime flag and added a stub implementation for DataTransferItemList
2620 and DataTransferItem to make it compile. DataTransferItemList is created lazily by DataTransfer.items,
2621 and its lifetime is tied to DataTransfer by forwarding ref and deref.
2623 See https://html.spec.whatwg.org/multipage/dnd.html#the-datatransferitemlist-interface
2625 Tests: editing/pasteboard/datatransfer-idl.html
2628 * Configurations/FeatureDefines.xcconfig:
2629 * WebCore.xcodeproj/project.pbxproj:
2630 * dom/DataTransfer.cpp:
2631 (WebCore::DataTransfer::items): Added. Create DataTransferItemList lazily
2632 * dom/DataTransfer.h:
2633 * dom/DataTransfer.idl:
2634 * dom/DataTransferItem.cpp:
2635 (WebCore::DataTransferItem::DataTransferItem): Added a stub implementation.
2636 (WebCore::DataTransferItem::~DataTransferItem): Ditto.
2637 (WebCore::DataTransferItem::getAsString const): Ditto.
2638 (WebCore::DataTransferItem::getAsFile const): Ditto.
2639 * dom/DataTransferItem.h:
2640 (WebCore::DataTransferItemList): Devirtualized functions.
2641 (WebCore::DataTransferItemList::kind const):
2642 (WebCore::DataTransferItemList::type const):
2643 * dom/DataTransferItem.idl:
2644 * dom/DataTransferItemList.cpp: Added.
2645 (WebCore::DataTransferItemList::length const): Added a stub implementation.
2646 (WebCore::DataTransferItemList::item): Ditto.
2647 (WebCore::DataTransferItemList::add): Ditto.
2648 (WebCore::DataTransferItemList::remove): Ditto.
2649 (WebCore::DataTransferItemList::clear): Ditto.
2650 * dom/DataTransferItemList.h:
2651 (WebCore::DataTransferItemList::DataTransferItemList):
2652 (WebCore::DataTransferItemList::~DataTransferItemList): Deleted.
2653 (WebCore::DataTransferItemList::ref): Forwards to DataTransfer's ref.
2654 (WebCore::DataTransferItemList::deref): Ditto.
2655 * dom/DataTransferItemList.idl: Updated to match the latest specification.
2656 * page/RuntimeEnabledFeatures.h:
2657 (WebCore::RuntimeEnabledFeatures::setDataTransferItemsEnabled): Added.
2658 (WebCore::RuntimeEnabledFeatures::dataTransferItemsEnabled const): Added.
2660 2017-08-11 Brady Eidson <beidson@apple.com>
2662 Move files inside WebCore/workers to WebCore/workers/service.
2663 https://bugs.webkit.org/show_bug.cgi?id=175495
2665 Rubberstamped by Tim Horton.
2668 * DerivedSources.make:
2669 * WebCore.xcodeproj/project.pbxproj:
2671 * workers/service/ServiceWorker.cpp: Renamed from Source/WebCore/workers/ServiceWorker.cpp.
2672 * workers/service/ServiceWorker.h: Renamed from Source/WebCore/workers/ServiceWorker.h.
2673 * workers/service/ServiceWorker.idl: Renamed from Source/WebCore/workers/ServiceWorker.idl.
2674 * workers/service/ServiceWorkerContainer.cpp: Renamed from Source/WebCore/workers/ServiceWorkerContainer.cpp.
2675 * workers/service/ServiceWorkerContainer.h: Renamed from Source/WebCore/workers/ServiceWorkerContainer.h.
2676 * workers/service/ServiceWorkerContainer.idl: Renamed from Source/WebCore/workers/ServiceWorkerContainer.idl.
2677 * workers/service/ServiceWorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/ServiceWorkerGlobalScope.cpp.
2678 * workers/service/ServiceWorkerGlobalScope.h: Renamed from Source/WebCore/workers/ServiceWorkerGlobalScope.h.
2679 * workers/service/ServiceWorkerGlobalScope.idl: Renamed from Source/WebCore/workers/ServiceWorkerGlobalScope.idl.
2680 * workers/service/ServiceWorkerJob.cpp: Renamed from Source/WebCore/workers/ServiceWorkerJob.cpp.
2681 * workers/service/ServiceWorkerJob.h: Renamed from Source/WebCore/workers/ServiceWorkerJob.h.
2682 * workers/service/ServiceWorkerJobClient.h: Renamed from Source/WebCore/workers/ServiceWorkerJobClient.h.
2683 * workers/service/ServiceWorkerProvider.cpp: Renamed from Source/WebCore/workers/ServiceWorkerProvider.cpp.
2684 * workers/service/ServiceWorkerProvider.h: Renamed from Source/WebCore/workers/ServiceWorkerProvider.h.
2685 * workers/service/ServiceWorkerRegistration.cpp: Renamed from Source/WebCore/workers/ServiceWorkerRegistration.cpp.
2686 * workers/service/ServiceWorkerRegistration.h: Renamed from Source/WebCore/workers/ServiceWorkerRegistration.h.
2687 * workers/service/ServiceWorkerRegistration.idl: Renamed from Source/WebCore/workers/ServiceWorkerRegistration.idl.
2688 * workers/service/ServiceWorkerRegistrationOptions.h: Renamed from Source/WebCore/workers/ServiceWorkerRegistrationOptions.h.
2689 * workers/service/ServiceWorkerRegistrationParameters.cpp: Renamed from Source/WebCore/workers/ServiceWorkerRegistrationParameters.cpp.
2690 * workers/service/ServiceWorkerRegistrationParameters.h: Renamed from Source/WebCore/workers/ServiceWorkerRegistrationParameters.h.
2691 * workers/service/ServiceWorkerUpdateViaCache.h: Renamed from Source/WebCore/workers/ServiceWorkerUpdateViaCache.h.
2692 * workers/service/ServiceWorkerUpdateViaCache.idl: Renamed from Source/WebCore/workers/ServiceWorkerUpdateViaCache.idl.
2694 2017-08-11 Chris Dumez <cdumez@apple.com>
2696 Implement quota limitation for keepalive Fetch requests
2697 https://bugs.webkit.org/show_bug.cgi?id=175482
2699 Reviewed by Sam Weinig and Youenn Fablet.
2701 Implement quota limitation for keepalive Fetch requests as per:
2702 - https://fetch.spec.whatwg.org/#http-network-or-cache-fetch (Step 9)
2704 This partly works for Beacon as well, meaning that no Beacon with a body
2705 over 64Kb can be sent. However, we don't keep track about wether or not
2706 beacon loads are inflight or not.
2708 Also update CachedResourceLoader::requestResource() so that the caller
2709 can get a ResourceError when it returns null. This is useful for both
2710 Fetch and Beacon to return better error messages.
2712 Test: http/wpt/beacon/beacon-quota.html
2715 * Modules/beacon/NavigatorBeacon.cpp:
2716 (WebCore::NavigatorBeacon::sendBeacon):
2717 * Modules/fetch/FetchBodyOwner.cpp:
2718 (WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
2719 (WebCore::FetchBodyOwner::BlobLoader::didFail):
2720 * Modules/fetch/FetchBodyOwner.h:
2721 * Modules/fetch/FetchLoader.cpp:
2722 (WebCore::FetchLoader::start):
2723 (WebCore::FetchLoader::didFail):
2724 * Modules/fetch/FetchLoaderClient.h:
2725 * Modules/fetch/FetchResponse.cpp:
2726 (WebCore::FetchResponse::BodyLoader::didFail):
2727 * Modules/fetch/FetchResponse.h:
2728 * WebCore.xcodeproj/project.pbxproj:
2729 * loader/DocumentThreadableLoader.cpp:
2730 (WebCore::DocumentThreadableLoader::loadRequest):
2731 * loader/cache/CachedResource.cpp:
2732 (WebCore::CachedResource::load):
2733 * loader/cache/CachedResource.h:
2734 (WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):
2735 * loader/cache/CachedResourceLoader.cpp:
2736 (WebCore::createResource):
2737 (WebCore::CachedResourceLoader::requestImage):
2738 (WebCore::CachedResourceLoader::requestFont):
2739 (WebCore::CachedResourceLoader::requestTextTrack):
2740 (WebCore::CachedResourceLoader::requestCSSStyleSheet):
2741 (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
2742 (WebCore::CachedResourceLoader::requestScript):
2743 (WebCore::CachedResourceLoader::requestXSLStyleSheet):
2744 (WebCore::CachedResourceLoader::requestSVGDocument):
2745 (WebCore::CachedResourceLoader::requestLinkResource):
2746 (WebCore::CachedResourceLoader::requestMedia):
2747 (WebCore::CachedResourceLoader::requestIcon):
2748 (WebCore::CachedResourceLoader::requestRawResource):
2749 (WebCore::CachedResourceLoader::requestBeaconResource):
2750 (WebCore::CachedResourceLoader::requestMainResource):
2751 (WebCore::CachedResourceLoader::requestResource):
2752 (WebCore::CachedResourceLoader::preload):
2753 * loader/cache/CachedResourceLoader.h:
2754 * loader/cache/KeepaliveRequestTracker.cpp: Added.
2755 (WebCore::KeepaliveRequestTracker::~KeepaliveRequestTracker):
2756 (WebCore::KeepaliveRequestTracker::canLoadRequest):
2757 (WebCore::KeepaliveRequestTracker::registerRequest):
2758 (WebCore::KeepaliveRequestTracker::responseReceived):
2759 (WebCore::KeepaliveRequestTracker::notifyFinished):
2760 (WebCore::KeepaliveRequestTracker::unregisterRequest):
2761 * loader/cache/KeepaliveRequestTracker.h: Added.
2762 * platform/network/FormData.cpp:
2763 (WebCore::FormDataElement::lengthInBytes const):
2764 (WebCore::FormData::lengthInBytes const):
2765 * platform/network/FormData.h:
2767 2017-08-11 Don Olmstead <don.olmstead@sony.com>
2769 [WTF] Move ValueToString into WTF
2770 https://bugs.webkit.org/show_bug.cgi?id=175469
2772 Reviewed by Sam Weinig.
2774 No new tests. No change in behavior.
2776 * WebCore.xcodeproj/project.pbxproj:
2777 * html/HTMLMediaElement.h:
2778 (WTF::ValueToString<WebCore::TextTrackCue::string):
2779 (WebCore::ValueToString<TextTrackCue::string): Deleted.
2780 (WebCore::ValueToString<MediaTime>::string): Deleted.
2781 * platform/LayoutUnit.h:
2782 (WTF::ValueToString<WebCore::LayoutUnit>::string):
2783 (WebCore::ValueToString<LayoutUnit>::string): Deleted.
2784 * platform/PODInterval.h:
2785 * platform/PODIntervalTree.h:
2786 * platform/PODRedBlackTree.h:
2787 * platform/graphics/FloatPolygon.h:
2788 (WTF::ValueToString<WebCore::FloatPolygonEdge::string):
2789 (WebCore::ValueToString<FloatPolygonEdge::string): Deleted.
2790 * rendering/FloatingObjects.h:
2791 (WTF::ValueToString<WebCore::FloatingObject::string):
2792 (WebCore::ValueToString<FloatingObject::string): Deleted.
2793 * rendering/RenderFlowThread.h:
2794 (WTF::ValueToString<WebCore::RenderRegion::string):
2795 (WebCore::ValueToString<RenderRegion::string): Deleted.
2797 2017-08-11 Sam Weinig <sam@webkit.org>
2799 [Bindings] Simplify DOMPromiseProxy now that WTF::Function can return references
2800 https://bugs.webkit.org/show_bug.cgi?id=175394
2802 Reviewed by Chris Dumez.
2804 * bindings/IDLTypes.h:
2805 (WebCore::IDLWrapper::convertToParameterType): Deleted.
2807 Remove no longer used convertToParameterType.
2809 * bindings/js/DOMPromiseProxy.h:
2811 - Replace Variant<Value, Exception> with ExceptionOr<Value> / ExceptionOr<void>.
2812 - Update ResolveCallback to have a return type of IDLType::ParameterType, rather than
2813 IDLType::ImplementationType, now that WTF::Function supports references as the
2814 return type. This is needed, since the IDLType::ParameterType for an interface T
2819 * css/FontFaceSet.cpp:
2820 * css/FontFaceSet.h:
2822 Update resolve callbacks to return a reference rather than a RefPtr, matching
2823 the new signature requirement.
2825 2017-08-11 Sam Weinig <sam@webkit.org>
2827 [WebIDL] Replace JSCryptoKeyCustom and JSCryptoAlgorithmBuilder with generated code
2828 https://bugs.webkit.org/show_bug.cgi?id=175457
2830 Reviewed by Chris Dumez.
2833 * DerivedSources.make:
2834 * WebCore.xcodeproj/project.pbxproj:
2835 * bindings/js/JSCryptoAlgorithmBuilder.cpp: Removed.
2836 * bindings/js/JSCryptoAlgorithmBuilder.h: Removed.
2837 * bindings/js/JSCryptoKeyCustom.cpp: Removed.
2839 Remove JSCryptoAlgorithmBuilder and JSCryptoKeyCustom, add KeyAlgorithm
2842 * crypto/CryptoKey.cpp:
2843 * crypto/CryptoKey.h:
2844 * crypto/CryptoKey.idl:
2846 Replace custom algorithm attribute with a union of the supported key algorithms.
2848 * crypto/keys/CryptoAesKeyAlgorithm.h: Added.
2849 * crypto/keys/CryptoAesKeyAlgorithm.idl: Added.
2850 * crypto/keys/CryptoEcKeyAlgorithm.h: Added.
2851 * crypto/keys/CryptoEcKeyAlgorithm.idl: Added.
2852 * crypto/keys/CryptoHmacKeyAlgorithm.h: Added.
2853 * crypto/keys/CryptoHmacKeyAlgorithm.idl: Added.
2854 * crypto/keys/CryptoKeyAlgorithm.h: Added.
2855 * crypto/keys/CryptoKeyAlgorithm.idl: Added.
2856 * crypto/keys/CryptoRsaHashedKeyAlgorithm.h: Added.
2857 * crypto/keys/CryptoRsaHashedKeyAlgorithm.idl: Added.
2858 * crypto/keys/CryptoRsaKeyAlgorithm.h: Added.
2859 * crypto/keys/CryptoRsaKeyAlgorithm.idl: Added.
2861 Add IDLs and headers fo the supported key algorithms.
2863 * crypto/keys/CryptoKeyAES.h:
2864 * crypto/keys/CryptoKeyEC.h:
2865 * crypto/keys/CryptoKeyHMAC.h:
2866 * crypto/keys/CryptoKeyRSA.h:
2867 * crypto/keys/CryptoKeyRaw.h:
2869 Give each of the existing KeyAlgorithm subclasses a dictionary() function
2870 that returns the populated corresponding spec'd dictionary.
2872 2017-08-11 Simon Fraser <simon.fraser@apple.com>
2874 Some RenderSVGResource cleanup
2875 https://bugs.webkit.org/show_bug.cgi?id=175494
2877 Reviewed by Zalan Bujtas.
2879 Use more initializers. Remove spurious use of bitfields that didn't save any space at all.
2884 * rendering/svg/RenderSVGResourceContainer.cpp:
2885 (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
2886 * rendering/svg/RenderSVGResourceContainer.h:
2887 * rendering/svg/RenderSVGResourceGradient.cpp:
2888 (WebCore::RenderSVGResourceGradient::RenderSVGResourceGradient):
2889 (WebCore::RenderSVGResourceGradient::applyResource):
2890 * rendering/svg/RenderSVGResourceGradient.h:
2891 * rendering/svg/RenderSVGResourcePattern.cpp:
2892 (WebCore::RenderSVGResourcePattern::RenderSVGResourcePattern):
2893 * rendering/svg/RenderSVGResourcePattern.h:
2894 * rendering/svg/RenderSVGShape.cpp:
2895 (WebCore::RenderSVGShape::fillShape):
2896 (WebCore::RenderSVGShape::strokeShape):
2897 * rendering/svg/SVGRenderingContext.cpp:
2898 (WebCore::SVGRenderingContext::~SVGRenderingContext):
2899 (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2900 * rendering/svg/SVGRenderingContext.h:
2901 (WebCore::SVGRenderingContext::SVGRenderingContext):
2903 2017-08-11 Tim Horton <timothy_horton@apple.com>
2905 Fix the build with modern Clang's -Wexpansion-to-defined
2906 https://bugs.webkit.org/show_bug.cgi?id=175467
2907 <rdar://problem/33667497>
2909 Reviewed by Simon Fraser.
2911 * crypto/mac/SerializedCryptoKeyWrapMac.mm:
2913 2017-08-11 Brady Eidson <beidson@apple.com>
2915 Crash under ServiceWorkerJob::failedWithException.
2916 https://bugs.webkit.org/show_bug.cgi?id=175488
2918 Reviewed by Tim Horton.
2920 Covered by existing tests.
2922 * workers/ServiceWorkerJob.cpp:
2923 (WebCore::ServiceWorkerJob::failedWithException): jobDidFinish might cause the Job to be deleted, so make it last.
2925 2017-08-10 Sam Weinig <sam@webkit.org>
2927 WTF::Function does not allow for reference / non-default constructible return types
2928 https://bugs.webkit.org/show_bug.cgi?id=175244
2930 Reviewed by Chris Dumez.
2932 * bindings/js/JSCustomElementInterface.h:
2933 (WebCore::JSCustomElementInterface::invokeCallback):
2934 Update the default value for the addArguments parameter to be an empty lambda, rather than
2935 default initialization, which leads to a null WTF::Function. This allows us to remove support
2936 for calling null WTF::Function. No change in behavior.
2938 2017-08-11 Antti Koivisto <antti@apple.com>
2940 Remove RenderQuote collection from RenderView
2941 https://bugs.webkit.org/show_bug.cgi?id=175479
2943 Reviewed by Andreas Kling.
2945 We can do it well enough without maintaining this pointer structure.
2947 Global updating doesn't work well with future direction for first-letter and similar anyway.
2948 We need to update quote immediately when updating its style.
2950 * rendering/RenderQuote.cpp:
2951 (WebCore::RenderQuote::insertedIntoTree):
2952 (WebCore::RenderQuote::willBeRemovedFromTree):
2954 Just tell the view that there are renderers to update.
2956 (WebCore::RenderQuote::styleDidChange):
2957 (WebCore::RenderQuote::isOpen const):
2958 (WebCore::RenderQuote::updateRenderer):
2959 (WebCore::RenderQuote::updateRenderers): Deleted.
2961 Update single renderer only. RenderTreeUpdater provides the previous renderer to compute the depth.
2963 * rendering/RenderQuote.h:
2964 * rendering/RenderView.cpp:
2965 (WebCore::RenderView::registerQuote): Deleted.
2966 (WebCore::RenderView::unregisterQuote): Deleted.
2967 (WebCore::RenderView::updateSpecialRenderers): Deleted.
2969 Remove the quote list.
2971 * rendering/RenderView.h:
2972 * style/RenderTreeUpdater.cpp:
2973 (WebCore::RenderTreeUpdater::commit):
2975 Ensure that all quotes are updated.
2977 (WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
2978 (WebCore::RenderTreeUpdater::updateQuotesUpTo):
2980 Traverse render tree to find quotes to update starting from the previous updated quote.
2982 * style/RenderTreeUpdater.h:
2984 2017-08-11 Adrian Perez de Castro <aperez@igalia.com>
2986 [CMake] Many warning about missing “override” keywords in ANGLE with Clang
2987 https://bugs.webkit.org/show_bug.cgi?id=175475
2989 Reviewed by Michael Catanzaro.
2991 * CMakeLists.txt: Add "-Wno-inconsistent-missing-override" to the
2992 compiler flags using for building the ANGLE sources.
2994 2017-08-11 Adrian Perez de Castro <aperez@igalia.com>
2996 [GTK][WPE] Overriden virtual function not marked “override” in ImageBufferDataCairo.h
2997 https://bugs.webkit.org/show_bug.cgi?id=175476
2999 Reviewed by Carlos Garcia Campos.
3001 * platform/graphics/cairo/ImageBufferDataCairo.h: Add missing "override" qualifier.
3003 2017-08-11 Carlos Garcia Campos <cgarcia@igalia.com>
3005 [Soup] Cannot access HTTPS sites using a HTTP proxy that requires authentication
3006 https://bugs.webkit.org/show_bug.cgi?id=175378
3008 Reviewed by Sergio Villar Senin.
3010 Bring back part of the code removed in r206732, to keep a reference to the SoupMessage in the
3011 AuthenticationChallenge since it can be different to the resource message.
3013 * platform/network/soup/AuthenticationChallenge.h:
3014 (WebCore::AuthenticationChallenge::AuthenticationChallenge): Deleted.
3015 (WebCore::AuthenticationChallenge::authenticationClient const): Deleted.
3016 (WebCore::AuthenticationChallenge::soupAuth const): Deleted.
3017 (WebCore::AuthenticationChallenge::setProposedCredential): Deleted.
3018 * platform/network/soup/AuthenticationChallengeSoup.cpp:
3019 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
3020 (WebCore::AuthenticationChallenge::platformCompare):
3022 2017-08-10 Dan Bernstein <mitz@apple.com>
3024 Fixed building for macOS 10.12 with the macOS 10.13 SDK.
3026 Suppressed the unguarded-availability-new warning around uses of AVSampleBufferAudioRenderer
3027 and AVSampleBufferRenderSynchronizer. Even though the 10.13 SDK declares them as available
3028 starting in that release, they have been available as SPI earlier.
3030 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
3031 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3032 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3033 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample):
3034 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
3035 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
3036 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
3037 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3038 (-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
3039 (-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
3040 (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
3041 (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
3042 (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
3043 (WebCore::SourceBufferPrivateAVFObjC::flush):
3045 2017-08-10 Brady Eidson <beidson@apple.com>
3047 Rename the source files for the WTF persistent coders.
3048 https://bugs.webkit.org/show_bug.cgi?id=175441
3050 Reviewed by Tim Horton.
3052 * platform/network/NetworkLoadMetrics.h:
3054 2017-08-10 Yusuke Suzuki <utatane.tea@gmail.com>
3056 Make ThreadGlobalData RefCounted for web thread
3057 https://bugs.webkit.org/show_bug.cgi?id=175439
3059 Reviewed by Mark Lam.
3061 When the web thread is enabled, we share ThreadGlobalData between the web thread and the main thread.
3062 The problem happens when the main thread is dying. It could start deallocating TLS and the web
3063 thread may see the destructed ThreadGlobalData.
3065 Even though, the current implementation is safe because the main thread do not perform TLS deallocation
3066 in the Darwin environment. But this is not true in Windows. And we should not rely on this condition
3067 that depends on the platforms.
3069 In this patch, we make ThreadGlobalData ThreadSafeRefCounted. This type verbosely describes that
3070 ThreadGlobalData could be shared between threads when the web thread enabled. And make the life time
3071 management simple instead of relying on the platform dependent TLS implementation.
3073 * platform/ThreadGlobalData.cpp:
3074 (WebCore::ThreadGlobalData::setWebCoreThreadData):
3075 (WebCore::threadGlobalData):
3076 * platform/ThreadGlobalData.h:
3077 (WebCore::ThreadGlobalData::cachedResourceRequestInitiators): Deleted.
3078 (WebCore::ThreadGlobalData::eventNames): Deleted.
3079 (WebCore::ThreadGlobalData::threadTimers): Deleted.
3080 (WebCore::ThreadGlobalData::qualifiedNameCache): Deleted.
3081 (WebCore::ThreadGlobalData::cachedConverterICU): Deleted.
3082 (WebCore::ThreadGlobalData::cachedConverterTEC): Deleted.
3084 2017-08-10 Yusuke Suzuki <utatane.tea@gmail.com>
3086 [JSC] Use @toNumber in builtins
3087 https://bugs.webkit.org/show_bug.cgi?id=172692
3089 Reviewed by Sam Weinig.
3091 Use @toNumber bytecode intrinsic. It emits op_to_number, which efficiently converts
3092 a given argument to a number.
3094 * Modules/streams/ReadableByteStreamInternals.js:
3095 (privateInitializeReadableByteStreamController):
3096 (readableByteStreamControllerRespond):
3097 * Modules/streams/StreamInternals.js:
3098 (validateAndNormalizeQueuingStrategy):
3099 (enqueueValueWithSize):
3101 2017-08-10 Nan Wang <n_wang@apple.com>
3103 AX: crash at WebCore::AccessibilityObject::supportsARIALiveRegion() const + 24
3104 https://bugs.webkit.org/show_bug.cgi?id=175340
3105 <rdar://problem/33782159>
3107 Reviewed by Chris Fleizach.
3109 The issue here is that we manualy set the parent object of the AccessibilitySVGRoot object
3110 and there are chances that the parent doesn't detach it properly during the parent's destroying
3111 process. Accessing the stale parent object will lead to a crash.
3112 Fixed this by making the parent object a weak pointer so we don't access an invalid memory.
3114 Test: accessibility/add-children-pseudo-element.html
3116 * accessibility/AccessibilityRenderObject.cpp:
3117 (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
3118 * accessibility/AccessibilityRenderObject.h:
3119 (WebCore::AccessibilityRenderObject::createWeakPtr):
3120 * accessibility/AccessibilitySVGRoot.cpp:
3121 (WebCore::AccessibilitySVGRoot::AccessibilitySVGRoot):
3122 (WebCore::AccessibilitySVGRoot::setParent):
3123 (WebCore::AccessibilitySVGRoot::parentObject const):
3124 * accessibility/AccessibilitySVGRoot.h:
3126 2017-08-10 Chris Dumez <cdumez@apple.com>
3128 [Beacon] Do connect-src CSP check on redirects as well
3129 https://bugs.webkit.org/show_bug.cgi?id=175410
3130 <rdar://problem/33815470>
3132 Reviewed by Youenn Fablet.
3134 Pass ContentSecurityPolicy object to createPingHandle so that we can send
3135 enough data to the NetworkProcess so do CSP checks for Ping loads such
3136 as Beacon. For the IPC, we serialize the ContentSecurityPolicy's response
3137 headers. Those headers are now cached in ContentSecurityPolicy for
3138 performance reasons. CSP headers are rarely updated in practice but
3139 sendBeacon() may get called repeatedly for a given document.
3141 Tests: http/wpt/beacon/connect-src-beacon-redirect-allowed.sub.html
3142 http/wpt/beacon/connect-src-beacon-redirect-blocked.sub.html
3144 * loader/LoaderStrategy.h:
3145 * loader/PingLoader.cpp:
3146 (WebCore::PingLoader::loadImage):
3147 (WebCore::PingLoader::sendPing):
3148 (WebCore::PingLoader::sendViolationReport):
3149 (WebCore::PingLoader::startPingLoad):
3150 * loader/PingLoader.h:
3151 * loader/cache/CachedResource.cpp:
3152 (WebCore::CachedResource::load):
3153 * page/csp/ContentSecurityPolicy.cpp:
3154 (WebCore::ContentSecurityPolicy::responseHeaders const):
3155 (WebCore::ContentSecurityPolicy::didReceiveHeader):
3156 * page/csp/ContentSecurityPolicy.h:
3157 * page/csp/ContentSecurityPolicyResponseHeaders.h:
3158 (WebCore::ContentSecurityPolicyResponseHeaders::encode const):
3159 (WebCore::ContentSecurityPolicyResponseHeaders::decode):
3161 2017-08-09 Yusuke Suzuki <utatane.tea@gmail.com>
3163 [WTF] ThreadSpecific should not introduce additional indirection
3164 https://bugs.webkit.org/show_bug.cgi?id=175187
3166 Reviewed by Mark Lam.
3168 We drop ThreadSpecific::replace feature which is only used by
3169 Web thread. Instead, we use ThreadSpecific<std::unique_ptr<T>> here.
3171 While this std::unique_ptr<T> shares one instance between main thread
3172 and web thread, this is the same to the current implementation. It is
3173 safe because the web thread never finishes.
3175 And for non-web thread implementation, we just use ThreadSpecific<T>,
3176 since it is the most efficient.
3178 * platform/ThreadGlobalData.cpp:
3179 (WebCore::ThreadGlobalData::ThreadGlobalData):
3180 (WebCore::ThreadGlobalData::setWebCoreThreadData):
3181 (WebCore::threadGlobalData):
3182 We also drop StringImpl::empty() call since it is not necessary now:
3183 StringImpl::empty data is statically initialized by using constexpr.
3185 * platform/ThreadGlobalData.h:
3186 We make it FAST_ALLOCATED since it is previously allocated by fast malloc
3189 2017-08-10 Michael Catanzaro <mcatanzaro@igalia.com>
3191 REGRESSION(r220515) [GTK][CMake] Build with ENABLE_GEOLOCATION fails on Debian Jessie
3192 https://bugs.webkit.org/show_bug.cgi?id=175426
3194 Reviewed by Carlos Alberto Lopez Perez.
3196 Also stop using GEOCLUE_LIBRARIES and GEOCLUE_INCLUDE_DIRS, since they are empty. Apparently
3197 we have not actually been using the client library at all this whole time, only the D-Bus
3200 * PlatformGTK.cmake:
3202 2017-08-10 Brady Eidson <beidson@apple.com>
3204 Add ServiceWorkerJob.
3205 https://bugs.webkit.org/show_bug.cgi?id=175241
3207 Reviewed by Tim Horton.
3209 Test: http/tests/workers/service/basic-register.html
3211 This patch does a few things:
3212 - Adds the spec concept of a ServiceWorkerJob (in the WebProcess, at least)
3213 - Adds a ServiceWorkerProvider interface for WebKit to implement
3214 - Actually creates a job for service worker registration and "schedules" it,
3215 though it always immediately errors out the promise.
3217 Actually queuing jobs and executing asynchronously is coming up soon.
3220 * WebCore.xcodeproj/project.pbxproj:
3223 (WebCore::Document::sessionID const):
3226 * workers/ServiceWorkerContainer.cpp:
3227 (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
3228 (WebCore::ServiceWorkerContainer::addRegistration):
3229 (WebCore::ServiceWorkerContainer::scheduleJob):
3230 (WebCore::ServiceWorkerContainer::jobDidFinish):
3231 * workers/ServiceWorkerContainer.h:
3233 * workers/ServiceWorkerJob.cpp: Added.
3234 (WebCore::ServiceWorkerJob::ServiceWorkerJob):
3235 (WebCore::ServiceWorkerJob::~ServiceWorkerJob):
3236 (WebCore::ServiceWorkerJob::failedWithException):
3237 * workers/ServiceWorkerJob.h: Copied from Source/WebCore/workers/ServiceWorkerContainer.h.
3238 (WebCore::ServiceWorkerJob::createRegisterJob):
3239 (WebCore::ServiceWorkerJob::identifier const):
3241 * workers/ServiceWorkerJobClient.h: Added.
3242 (WebCore::ServiceWorkerJobClient::~ServiceWorkerJobClient):
3244 * workers/ServiceWorkerProvider.cpp: Added.
3245 (WebCore::ServiceWorkerProvider::singleton):
3246 (WebCore::ServiceWorkerProvider::setSharedProvider):
3247 * workers/ServiceWorkerProvider.h: Added.
3248 * workers/ServiceWorkerRegistrationOptions.h: Copied from Source/WebCore/workers/ServiceWorkerContainer.h.
3249 * workers/ServiceWorkerRegistrationParameters.cpp: Added.
3250 * workers/ServiceWorkerRegistrationParameters.h: Added.
3252 2017-08-10 Tim Horton <timothy_horton@apple.com>
3254 Remove some unused lambda captures so that WebKit builds with -Wunused-lambda-capture
3255 https://bugs.webkit.org/show_bug.cgi?id=175436
3256 <rdar://problem/33667497>
3258 Reviewed by Simon Fraser.
3260 * platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
3261 (PlatformMediaSessionManager::updateSessionState):
3262 * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
3263 (WebCore::WebCoreDecompressionSession::handleDecompressionOutput):
3265 2017-08-10 Commit Queue <commit-queue@webkit.org>
3267 Unreviewed, rolling out r220463.
3268 https://bugs.webkit.org/show_bug.cgi?id=175435
3270 unaccepted fix (Requested by n_wang on #webkit).
3275 WebCore::AccessibilityObject::supportsARIALiveRegion() const +
3277 https://bugs.webkit.org/show_bug.cgi?id=175340
3278 http://trac.webkit.org/changeset/220463
3280 2017-08-10 Michael Catanzaro <mcatanzaro@igalia.com>
3282 Remove ENABLE_GAMEPAD_DEPRECATED
3283 https://bugs.webkit.org/show_bug.cgi?id=175361
3285 Reviewed by Carlos Garcia Campos.
3288 * Configurations/FeatureDefines.xcconfig:
3289 * PlatformGTK.cmake:
3290 * PlatformWPE.cmake:
3291 * platform/Linux.cmake: Removed.
3292 * platform/gamepad/deprecated/Gamepads.h: Removed.
3293 * platform/gamepad/glib/GamepadsGlib.cpp: Removed.
3294 * platform/gamepad/linux/GamepadDeviceLinux.cpp: Removed.
3295 * platform/gamepad/linux/GamepadDeviceLinux.h: Removed.
3297 2017-08-10 Myles C. Maxfield <mmaxfield@apple.com>
3299 Addressing post-review comments after r219173.
3300 https://bugs.webkit.org/show_bug.cgi?id=174149
3304 * css/CSSFontStyleValue.h:
3305 * editing/EditingStyle.cpp:
3306 (WebCore::identifierForStyleProperty):
3308 2017-08-10 Antti Koivisto <antti@apple.com>
3310 Try to fix windows build.
3312 * style/StyleUpdate.h:
3313 (WebCore::Style::TextUpdate::TextUpdate):
3315 2017-08-10 Carlos Garcia Campos <cgarcia@igalia.com>
3317 [GTK] Crashes in WebCore::PasteboardHelper::fillSelectionData when source file of drag is unavailable
3318 https://bugs.webkit.org/show_bug.cgi?id=174161
3320 Reviewed by Xabier Rodriguez-Calvar.
3322 In r219385 we changed the early return in fillSelectionData() to check the selection data length instead of the
3323 data pointer. However, the gtk_selection_data_get_length() can return -1, so we need to check also if the value
3324 less than 0. The case of setting an empty string could be valid depending on the target type, so it's better to
3325 return early only when data lenght is less than 0 and handle the 0 length case in each target.
3327 * platform/gtk/PasteboardHelper.cpp:
3328 (WebCore::PasteboardHelper::fillSelectionData):
3330 2017-08-10 Antti Koivisto <antti@apple.com>
3332 Text renderer updates should be done by RenderTreeUpdater
3333 https://bugs.webkit.org/show_bug.cgi?id=175417
3335 Reviewed by Andreas Kling.
3337 All render tree mutations should be done by RenderTreeUpdater. Currently
3338 Text::updateRendererAfterContentChange calls RenderText::setTextWithOffset directly.
3341 (WebCore::Document::updateTextRenderer):
3347 (WebCore::Text::updateRendererAfterContentChange):
3349 Remove call to setTextWithOffset and pass the range to updateTextRenderer
3351 * style/RenderTreeUpdater.cpp:
3352 (WebCore::RenderTreeUpdater::updateRenderTree):
3353 (WebCore::RenderTreeUpdater::updateTextRenderer):
3355 Call setTextWithOffset here.
3357 * style/RenderTreeUpdater.h:
3358 * style/StyleTreeResolver.cpp:
3359 (WebCore::Style::TreeResolver::resolveComposedTree):
3360 * style/StyleUpdate.cpp:
3361 (WebCore::Style::Update::textUpdate const):
3362 (WebCore::Style::Update::addText):
3364 Add TextUpdate struct similar to ElementUpdate to pass the range to the RenderTreeUpdater.
3366 * style/StyleUpdate.h:
3368 2017-08-10 Zan Dobersek <zdobersek@igalia.com>
3370 Unreviewed GTK+ build fix for ENABLE_GLES2=ON.
3372 * platform/graphics/texmap/TextureMapperGLHeaders.h:
3373 Define various GL constants that are not provided in GLES2 headers
3374 but are only leveraged in OpenGL calls if at runtime the underlying
3375 OpenGL is GLES2-capable.
3377 2017-08-10 Zan Dobersek <zdobersek@igalia.com>
3379 [TexMap] Remove GraphicsContext3D usage from BitmapTexturePool
3380 https://bugs.webkit.org/show_bug.cgi?id=175319
3382 Reviewed by Carlos Garcia Campos.
3384 Drop the GraphicsContext3D reference in BitmapTexturePool now
3385 that the BitmapTextureGL doesn't require it anymore.
3387 No new tests -- no change in behavior.
3389 * platform/graphics/texmap/BitmapTexturePool.cpp:
3390 (WebCore::BitmapTexturePool::BitmapTexturePool):
3391 * platform/graphics/texmap/BitmapTexturePool.h:
3392 * platform/graphics/texmap/TextureMapperGL.cpp:
3393 (WebCore::TextureMapperGL::TextureMapperGL):
3395 2017-08-10 Zan Dobersek <zdobersek@igalia.com>
3397 [TexMap] Drop GraphicsContext3D usage from BitmapTextureGL
3398 https://bugs.webkit.org/show_bug.cgi?id=175317
3400 Reviewed by Carlos Garcia Campos.
3402 Have BitmapTextureGL use direct OpenGL API entrypoints and constants
3403 instead of leveraging the GraphicsContext3D class. Any GraphicsContext3D
3404 object passed to BitmapTextureGL would assume rendering to the GL context
3405 that's current on that thread, translating method invocations to the
3406 OpenGL API. We can do this by ourselves and benefit by avoiding allocating
3407 GraphicsContext3D resources like the ANGLE compiler that are by most useful
3410 BitmapTextureGL::create() call sites are adjusted to stop passing a
3411 GraphicsContext3D reference. BitmapTextureGL::bindAsSurface() doesn't need
3412 a replacement for the passed-in GraphicsContext3D object since that object
3413 originated from the TextureMapperGL instance, whose GraphicsContext3D is by
3414 default of the render-to-current-context nature. Other changes are direct
3415 translations of GraphicsContext3D methods to OpenGL API calls, or of
3416 GraphicsContext3D values to OpenGL API constants.
3418 No new tests -- no change in behavior.
3420 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3421 (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
3422 * platform/graphics/texmap/BitmapTextureGL.cpp:
3423 Also remove an unnecessary GraphicsContext.h header inclusion.
3424 (WebCore::BitmapTextureGL::BitmapTextureGL):
3425 (WebCore::BitmapTextureGL::didReset):
3426 (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
3427 (WebCore::BitmapTextureGL::updateContents):
3428 (WebCore::BitmapTextureGL::initializeStencil):
3429 (WebCore::BitmapTextureGL::initializeDepthBuffer):
3430 (WebCore::BitmapTextureGL::clearIfNeeded):
3431 (WebCore::BitmapTextureGL::createFboIfNeeded):
3432 (WebCore::BitmapTextureGL::bindAsSurface):
3433 (WebCore::BitmapTextureGL::~BitmapTextureGL):
3434 (WebCore::BitmapTextureGL::copyFromExternalTexture):