1 2017-08-17 Youenn Fablet <youenn@apple.com>
3 Add a DOMPromiseDeferred method to handle ExceptionOr<> results
4 https://bugs.webkit.org/show_bug.cgi?id=175603
6 Reviewed by Darin Adler.
10 Introduce DOMPromiseDeferred::settle to reject/resolve a promise with an ExceptionOr<>.
11 Making batchPutOperation/batchDeleteOperation take a Function with an ExceptionOr<>.
12 Using DOMPromiseDeferred::settle in Cache put/remove.
13 Updated CacheStorageConnection to create ExceptionOr<> from CacheStorageConnection::Error.
15 * Modules/cache/Cache.cpp:
16 (WebCore::Cache::put):
17 (WebCore::Cache::remove):
18 (WebCore::Cache::batchDeleteOperation):
19 (WebCore::Cache::batchPutOperation):
20 * Modules/cache/Cache.h:
21 * Modules/cache/CacheStorage.cpp:
22 (WebCore::CacheStorage::open):
23 (WebCore::CacheStorage::remove):
24 * Modules/cache/CacheStorageConnection.cpp:
25 (WebCore::CacheStorageConnection::errorToException):
26 * Modules/cache/CacheStorageConnection.h:
27 (WebCore::CacheStorageConnection::errorToException):
28 (WebCore::CacheStorageConnection::exceptionOrResult):
29 * bindings/js/JSDOMPromiseDeferred.h:
30 (WebCore::DOMPromiseDeferred::settle):
31 (WebCore::DOMPromiseDeferred<void>::settle):
33 2017-08-17 Zan Dobersek <zdobersek@igalia.com>
35 [GStreamer] AppendPipeline: support dispatch of decryption-specific GstStructure into the pipeline
36 https://bugs.webkit.org/show_bug.cgi?id=175668
38 Reviewed by Xabier Rodriguez-Calvar.
40 Add the AppendPipeline::dispatchDecryptionStructure() method. Callers can
41 pass in a GstStructure object that contains all the information the
42 decryption elements in the pipeline will require to properly decrypt the
43 content. In case the decryptor element isn't available yet, the
44 GstStructure is stored and dispatched when that element becomes available.
46 The dispatch itself simply creates a new custom GstEvent that adopts the
47 given GstStructure object, sends that into the pipeline element, and
48 shifts the state to 'ongoing'.
50 * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
51 (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
52 (WebCore::AppendPipeline::dispatchPendingDecryptionStructure):
53 (WebCore::AppendPipeline::dispatchDecryptionStructure):
54 * platform/graphics/gstreamer/mse/AppendPipeline.h: Remove a redundant private: label.
56 2017-08-17 Zan Dobersek <zdobersek@igalia.com>
58 [GStreamer] GstStructure shouldn't be handled through GRefPtr
59 https://bugs.webkit.org/show_bug.cgi?id=175673
61 Reviewed by Xabier Rodriguez-Calvar.
63 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
64 (webkitMediaCommonEncryptionDecryptTransformCaps): GstStructure isn't
65 ref-counted, so it should be handled through the GUniquePtr<GstStructure>
68 2017-08-17 Youenn Fablet <youenn@apple.com>
70 [Mac/iOS] Increase the audio buffer size when audio capture is on but web audio is not used
71 https://bugs.webkit.org/show_bug.cgi?id=175631
73 Reviewed by Eric Carlson.
75 * platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
76 (PlatformMediaSessionManager::updateSessionState): Change value from 128 to the equivalent of 20ms when audio capture happens but not web audio.
78 2017-08-17 Antti Koivisto <antti@apple.com>
80 RenderListItem - Avoid render tree mutation during layout
81 https://bugs.webkit.org/show_bug.cgi?id=175666
83 Reviewed by Andreas Kling.
85 Mutations should be done by RenderTreeUpdater only.
87 * rendering/RenderListItem.cpp:
88 (WebCore::RenderListItem::updateMarkerRenderer):
90 This is now called by RenderTreeUpdater only.
91 Remove code dealing with this being called at layout time.
92 Merged marker construction code from styleDidChange here and renamed for clarity.
94 (WebCore::RenderListItem::layout):
95 (WebCore::RenderListItem::computePreferredLogicalWidths):
97 Remove mutating calls.
99 (WebCore::RenderListItem::styleDidChange): Deleted.
100 (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded): Deleted.
101 * rendering/RenderListItem.h:
102 * rendering/TextAutoSizing.cpp:
103 (WebCore::TextAutoSizingValue::adjustTextNodeSizes):
105 Call updateMarkerRenderer.
107 * style/RenderTreeUpdater.cpp:
108 (WebCore::RenderTreeUpdater::popParent):
109 (WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
111 Call updateMarkerRenderer.
113 2017-08-17 Don Olmstead <don.olmstead@sony.com>
115 [PAL] Move SessionID into PAL
116 https://bugs.webkit.org/show_bug.cgi?id=174192
118 Reviewed by Antti Koivisto.
120 No new tests. No change in behavior.
123 * Modules/websockets/WebSocketChannel.cpp:
124 (WebCore::WebSocketChannel::connect):
125 * WebCore.xcodeproj/project.pbxproj:
127 (WebCore::Document::sessionID const):
129 * dom/ScriptExecutionContext.h:
130 * html/HTMLMediaElement.cpp:
131 (WebCore::HTMLMediaElement::elementWithID):
132 (WebCore::HTMLMediaElement::finishParsingChildren):
133 (WebCore::HTMLMediaElement::scheduleEvent):
134 (WebCore::HTMLMediaElement::canPlayType const):
135 (WebCore::HTMLMediaElement::load):
136 (WebCore::HTMLMediaElement::loadResource):
137 (WebCore::HTMLMediaElement::textTracksAreReady const):
138 (WebCore::HTMLMediaElement::textTrackModeChanged):
139 (WebCore::HTMLMediaElement::noneSupported):
140 (WebCore::HTMLMediaElement::mediaLoadingFailedFatally):
141 (WebCore::HTMLMediaElement::mediaLoadingFailed):
142 (WebCore::HTMLMediaElement::setReadyState):
143 (WebCore::HTMLMediaElement::addPlayedRange):
144 (WebCore::HTMLMediaElement::seekTask):
145 (WebCore::HTMLMediaElement::refreshCachedTime const):
146 (WebCore::HTMLMediaElement::currentMediaTime const):
147 (WebCore::HTMLMediaElement::setWebkitPreservesPitch):
148 (WebCore::HTMLMediaElement::ended const):
149 (WebCore::HTMLMediaElement::playInternal):
150 (WebCore::HTMLMediaElement::pause):
151 (WebCore::HTMLMediaElement::togglePlayState):
152 (WebCore::HTMLMediaElement::beginScrubbing):
153 (WebCore::HTMLMediaElement::playbackProgressTimerFired):
154 (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack):
155 (WebCore::HTMLMediaElement::didAddTextTrack):
156 (WebCore::HTMLMediaElement::didRemoveTextTrack):
157 (WebCore::controllerJSValue):
158 (WebCore::HTMLMediaElement::configureTextTracks):
159 (WebCore::HTMLMediaElement::selectNextSourceChild):
160 (WebCore::HTMLMediaElement::sourceWasAdded):
161 (WebCore::HTMLMediaElement::sourceWasRemoved):
162 (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
163 (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
164 (WebCore::HTMLMediaElement::potentiallyPlaying const):
165 (WebCore::HTMLMediaElement::endedPlayback const):
166 (WebCore::HTMLMediaElement::stoppedDueToErrors const):
167 (WebCore::HTMLMediaElement::updatePlayState):
168 (WebCore::HTMLMediaElement::userCancelledLoad):
169 (WebCore::HTMLMediaElement::canSuspendForDocumentSuspension const):
170 (WebCore::HTMLMediaElement::addEventListener):
171 (WebCore::HTMLMediaElement::isFullscreen const):
172 (WebCore::HTMLMediaElement::toggleStandardFullscreenState):
173 (WebCore::HTMLMediaElement::waitForPreparedForInlineThen):
174 (WebCore::HTMLMediaElement::setVideoFullscreenLayer):
175 (WebCore::HTMLMediaElement::updateTextTrackDisplay):
176 (WebCore::HTMLMediaElement::mediaControls const):
177 (WebCore::HTMLMediaElement::configureTextTrackDisplay):
178 (WebCore::HTMLMediaElement::setMediaGroup):
179 (WebCore::HTMLMediaElement::setControllerForBindings):
180 (WebCore::HTMLMediaElement::isBlockedOnMediaController const):
181 (WebCore::HTMLMediaElement::prepareMediaFragmentURI):
182 (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
183 (WebCore::HTMLMediaElement::fileSize const):
184 (WebCore::HTMLMediaElement::mediaSessionTitle const):
185 (WebCore::needsSeekingSupportQuirk):
186 (WebCore::HTMLMediaElement::supportsSeeking const):
187 (WebCore::HTMLMediaElement::doesHaveAttribute const):
188 (WebCore::HTMLMediaElement::isVideoTooSmallForInlinePlayback):
189 * loader/DocumentLoader.cpp:
190 (WebCore::DocumentLoader::continueAfterContentPolicy):
191 * loader/EmptyClients.cpp:
192 * loader/FrameLoaderClient.h:
193 * loader/cache/CachedCSSStyleSheet.cpp:
194 (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
195 * loader/cache/CachedCSSStyleSheet.h:
196 * loader/cache/CachedFont.cpp:
197 (WebCore::CachedFont::CachedFont):
198 * loader/cache/CachedFont.h:
199 * loader/cache/CachedImage.cpp:
200 (WebCore::CachedImage::CachedImage):
201 * loader/cache/CachedImage.h:
202 * loader/cache/CachedRawResource.cpp:
203 (WebCore::CachedRawResource::CachedRawResource):
204 * loader/cache/CachedRawResource.h:
205 * loader/cache/CachedResource.cpp:
206 (WebCore::CachedResource::CachedResource):
207 * loader/cache/CachedResource.h:
208 (WebCore::CachedResource::sessionID const):
209 * loader/cache/CachedResourceLoader.cpp:
210 (WebCore::createResource):
211 (WebCore::CachedResourceLoader::sessionID const):
212 * loader/cache/CachedResourceLoader.h:
213 * loader/cache/CachedSVGDocument.cpp:
214 (WebCore::CachedSVGDocument::CachedSVGDocument):
215 * loader/cache/CachedSVGDocument.h:
216 * loader/cache/CachedSVGFont.cpp:
217 (WebCore::CachedSVGFont::CachedSVGFont):
218 * loader/cache/CachedSVGFont.h:
219 * loader/cache/CachedScript.cpp:
220 (WebCore::CachedScript::CachedScript):
221 * loader/cache/CachedScript.h:
222 * loader/cache/CachedTextTrack.cpp:
223 (WebCore::CachedTextTrack::CachedTextTrack):
224 * loader/cache/CachedTextTrack.h:
225 * loader/cache/CachedXSLStyleSheet.cpp:
226 (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
227 * loader/cache/CachedXSLStyleSheet.h:
228 * loader/cache/MemoryCache.cpp:
229 (WebCore::MemoryCache::sessionResourceMap const):
230 (WebCore::MemoryCache::ensureSessionResourceMap):
231 (WebCore::MemoryCache::resourceForRequest):
232 (WebCore::MemoryCache::addImageToCache):
233 (WebCore::MemoryCache::removeImageFromCache):
234 (WebCore::MemoryCache::forEachSessionResource):
235 (WebCore::MemoryCache::removeResourcesWithOrigins):
236 (WebCore::MemoryCache::originsWithCache const):
237 (WebCore::MemoryCache::evictResources):
238 * loader/cache/MemoryCache.h:
239 * loader/cocoa/DiskCacheMonitorCocoa.h:
240 (WebCore::DiskCacheMonitor::sessionID const):
241 * loader/cocoa/DiskCacheMonitorCocoa.mm:
242 (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation):
243 (WebCore::DiskCacheMonitor::DiskCacheMonitor):
244 * page/CacheStorageProvider.h:
245 * page/DatabaseProvider.h:
247 (WebCore::Page::Page):
248 (WebCore::Page::enableLegacyPrivateBrowsing):
249 (WebCore::Page::sessionID const):
250 (WebCore::Page::setSessionID):
252 * page/PlugInClient.h:
253 * page/SocketProvider.cpp:
254 (WebCore::SocketProvider::createSocketStreamHandle):
255 * page/SocketProvider.h:
256 * platform/CookiesStrategy.h:
257 * platform/WebCoreCrossThreadCopier.cpp:
258 (WTF::PAL::SessionID>::copy):
259 (WTF::WebCore::SessionID>::copy): Deleted.
260 * platform/WebCoreCrossThreadCopier.h:
261 * platform/network/CacheValidation.cpp:
262 (WebCore::headerValueForVary):
263 (WebCore::collectVaryingRequestHeaders):
264 (WebCore::verifyVaryingRequestHeaders):
265 * platform/network/CacheValidation.h:
266 * platform/network/NetworkStorageSession.cpp:
267 (WebCore::NetworkStorageSession::globalSessionMap):
268 (WebCore::NetworkStorageSession::storageSession):
269 (WebCore::NetworkStorageSession::destroySession):
270 * platform/network/NetworkStorageSession.h:
271 (WebCore::NetworkStorageSession::sessionID const):
272 * platform/network/NetworkStorageSessionStub.cpp:
273 (WebCore::NetworkStorageSession::NetworkStorageSession):
274 (WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
275 (WebCore::NetworkStorageSession::ensureSession):
276 (WebCore::NetworkStorageSession::defaultStorageSession):
277 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
278 (WebCore::NetworkStorageSession::NetworkStorageSession):
279 (WebCore::NetworkStorageSession::switchToNewTestingSession):
280 (WebCore::NetworkStorageSession::defaultStorageSession):
281 (WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
282 (WebCore::NetworkStorageSession::ensureSession):
283 * platform/network/cf/SocketStreamHandleImpl.h:
284 (WebCore::SocketStreamHandleImpl::create):
285 * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
286 (WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):
287 * platform/network/curl/SocketStreamHandleImpl.h:
288 (WebCore::SocketStreamHandleImpl::create):
289 * platform/network/soup/NetworkStorageSessionSoup.cpp:
290 (WebCore::NetworkStorageSession::NetworkStorageSession):
291 (WebCore::NetworkStorageSession::defaultStorageSession):
292 (WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
293 (WebCore::NetworkStorageSession::ensureSession):
294 (WebCore::NetworkStorageSession::switchToNewTestingSession):
295 * platform/network/soup/SocketStreamHandleImpl.h:
296 * platform/network/soup/SocketStreamHandleImplSoup.cpp:
297 (WebCore::SocketStreamHandleImpl::create):
298 * workers/DedicatedWorkerGlobalScope.cpp:
299 (WebCore::DedicatedWorkerGlobalScope::create):
300 (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
301 * workers/DedicatedWorkerGlobalScope.h:
302 * workers/DedicatedWorkerThread.cpp:
303 (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
304 (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
305 * workers/DedicatedWorkerThread.h:
306 * workers/Worker.cpp:
307 (WebCore::Worker::notifyFinished):
308 * workers/WorkerGlobalScope.cpp:
309 (WebCore::WorkerGlobalScope::WorkerGlobalScope):
310 * workers/WorkerGlobalScope.h:
311 * workers/WorkerGlobalScopeProxy.h:
312 * workers/WorkerMessagingProxy.cpp:
313 (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
314 * workers/WorkerMessagingProxy.h:
315 * workers/WorkerThread.cpp:
316 (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
317 (WebCore::WorkerThread::WorkerThread):
318 * workers/WorkerThread.h:
319 * workers/service/ServiceWorkerContainer.h:
320 * workers/service/ServiceWorkerRegistrationParameters.h:
322 2017-08-17 Carlos Garcia Campos <cgarcia@igalia.com>
324 [GTK][WPE] Add NTLM authentication enabled API
325 https://bugs.webkit.org/show_bug.cgi?id=122952
327 Reviewed by Michael Catanzaro.
329 Add/remove NTLM feature to/from soup session depending on whether the feature is enabled or disabled.
331 * platform/network/soup/SoupNetworkSession.cpp:
332 (WebCore::SoupNetworkSession::SoupNetworkSession):
333 (WebCore::SoupNetworkSession::setInitialNTLMAuthenticationEnabled):
334 (WebCore::SoupNetworkSession::setNTLMAuthenticationEnabled):
335 * platform/network/soup/SoupNetworkSession.h:
337 2017-08-16 Ryosuke Niwa <rniwa@webkit.org>
339 Add the support for mutating clipboard data via DataTransferItemList
340 https://bugs.webkit.org/show_bug.cgi?id=175639
342 Reviewed by Wenson Hsieh.
344 Added the support for adding plaintext data via dataTransfer.items.add, clearing data via clear,
345 and removing an entry via remove. When DataTransferItem is removed from DataTransferItemList,
346 we must put into the disabled mode.
348 To support the removal of DataTransferItem, this patch replaces a reference to DataTransfer by
349 a WeakPtr to DataTransferItemList, and stops forwarding ref from DataTransferItem to DataTransfer.
350 This means that DataTransfer can now be GC'ed before DataTransferItem is GC'ed.
352 Because the identify and the order of DataTransferItems need to be preserved, we can't simply
353 re-popluate m_itemList in DataTransferItemList. Instead, whenever the clipboard content is mutated,
354 we make the parallel modifications to m_itemList. This includes changes made via DataTransfer
355 methods such as setData and clearData.
357 Test: editing/pasteboard/datatransfer-items-copy-plaintext.html
359 * dom/DataTransfer.cpp:
360 (WebCore::DataTransfer::clearData): Invoke didClearStringData when m_itemList exists.
361 (WebCore::DataTransfer::setData): Ditto.
362 (WebCore::DataTransfer::createForInputEvent):
363 (WebCore::DataTransfer::createForDrag):
364 (WebCore::DataTransfer::createForDrop):
365 * dom/DataTransferItem.cpp:
366 (WebCore::DataTransferItem::create):
367 (WebCore::DataTransferItem::DataTransferItem):
368 (WebCore::DataTransferItem::clearListAndPutIntoDisabledMode): Added.
369 (WebCore::DataTransferItem::type const): Moved from the header.
370 (WebCore::DataTransferItem::getAsString const):
371 (WebCore::DataTransferItem::getAsFile const):
372 * dom/DataTransferItem.h:
373 (WebCore::DataTransferItem::ref): Deleted.
374 (WebCore::DataTransferItem::deref): Deleted.
375 (WebCore::DataTransferItem::isFile const): Added.
376 (WebCore::DataTransferItem::type const): Move to the cpp file.
377 * dom/DataTransferItemList.cpp:
378 (WebCore::isSupportedType): Moved.
379 (WebCore::DataTransferItemList::DataTransferItemList): Moved from the header.
380 (WebCore::DataTransferItemList::~DataTransferItemList): Added.
381 (WebCore::DataTransferItemList::item):
382 (WebCore::DataTransferItemList::add): Implemented the variant to add string data.
383 (WebCore::DataTransferItemList::remove): Implemented. For now, we don't have to deal with removing
384 a file since a writable dataTransfer never contains a File object.
385 (WebCore::DataTransferItemList::clear): Implemented.
386 (WebCore::DataTransferItemList::ensureItems const):
387 (WebCore::removeStringItemOfLowercasedType): Added.
388 (WebCore::DataTransferItemList::didClearStringData): Called when dataTransfer.clear is called.
389 (WebCore::DataTransferItemList::didSetStringData): Ditto for
390 * dom/DataTransferItemList.h:
391 (WebCore::DataTransferItemList): Added a WeakPtrFactory. Also use a vector of Ref<DataTransferItem>
392 instead of unique_ptr<DataTransferItem> since DataTransferItem can outlive DataTransferItemList.
393 (WebCore::DataTransferItemList::dataTransfer): Added.
394 * dom/DataTransferItemList.idl:
396 2017-08-16 Andy Estes <aestes@apple.com>
398 [Apple Pay] Rename PaymentRequest to ApplePaySessionPaymentRequest
399 https://bugs.webkit.org/show_bug.cgi?id=175648
401 Reviewed by Tim Horton.
403 The W3C Payment Request API defines an interface called PaymentRequest, which conflicts with
404 an existing Apple Pay class. This patch renames PaymentRequest to
405 ApplePaySessionPaymentRequest so that a follow-on patch can introduce PaymentRequest for the
408 * Modules/applepay/ApplePayError.h:
409 * Modules/applepay/ApplePayLineItem.h:
410 * Modules/applepay/ApplePayPaymentRequest.h:
411 * Modules/applepay/ApplePaySession.cpp:
412 (WebCore::convertAndValidateTotal):
413 (WebCore::convertAndValidate):
414 (WebCore::ApplePaySession::ApplePaySession):
415 (WebCore::ApplePaySession::didSelectShippingMethod):
416 * Modules/applepay/ApplePaySession.h:
417 * Modules/applepay/ApplePaySessionPaymentRequest.cpp: Renamed from Source/WebCore/Modules/applepay/PaymentRequest.cpp.
418 (WebCore::ApplePaySessionPaymentRequest::ApplePaySessionPaymentRequest):
419 (WebCore::ApplePaySessionPaymentRequest::~ApplePaySessionPaymentRequest):
420 (WebCore::ApplePaySessionPaymentRequest::isValidSupportedNetwork):
421 * Modules/applepay/ApplePaySessionPaymentRequest.h: Renamed from Source/WebCore/Modules/applepay/PaymentRequest.h.
422 * Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
424 (WebCore::ApplePayShippingMethodSelectedEvent::ApplePayShippingMethodSelectedEvent):
425 * Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
426 * Modules/applepay/PaymentCoordinator.cpp:
427 (WebCore::PaymentCoordinator::beginPaymentSession):
428 (WebCore::PaymentCoordinator::didSelectShippingMethod):
429 * Modules/applepay/PaymentCoordinator.h:
430 * Modules/applepay/PaymentCoordinatorClient.h:
431 * Modules/applepay/PaymentHeaders.h:
432 * Modules/applepay/PaymentRequestValidator.cpp:
433 (WebCore::PaymentRequestValidator::validate):
434 (WebCore::PaymentRequestValidator::validateTotal):
435 (WebCore::validateMerchantCapabilities):
436 (WebCore::validateShippingMethod):
437 (WebCore::validateShippingMethods):
438 * Modules/applepay/PaymentRequestValidator.h:
439 * WebCore.xcodeproj/project.pbxproj:
440 * loader/EmptyClients.cpp:
442 2017-08-16 Chris Dumez <cdumez@apple.com>
444 Cross origin Beacon requests with a ArrayBuffer / ArrayBufferView payload should not do a CORS preflight
445 https://bugs.webkit.org/show_bug.cgi?id=175628
446 <rdar://problem/33919278>
448 Reviewed by Geoffrey Garen.
450 Cross origin Beacon requests with a ArrayBuffer / ArrayBufferView payload should not do a CORS preflight.
451 To achieve this, the following changes were made:
452 1. Revert r220779 which caused us to use a non CORS-safelisted Content-Type header for such payload
453 2. Teach PingLoad how to deal with "simple" cross origin requests (i.e. Don't assume we need a CORS
454 preflight merely because the fetch mode is set to "cors").
456 Test: http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight.html
458 * Modules/fetch/FetchBody.cpp:
459 (WebCore::FetchBody::extract):
460 * loader/CrossOriginAccessControl.h:
461 * loader/LoaderStrategy.h:
462 * loader/PingLoader.cpp:
463 (WebCore::PingLoader::loadImage):
464 (WebCore::PingLoader::sendPing):
465 (WebCore::PingLoader::sendViolationReport):
466 (WebCore::PingLoader::startPingLoad):
467 * loader/PingLoader.h:
468 * loader/cache/CachedResource.cpp:
469 (WebCore::CachedResource::CachedResource):
470 (WebCore::CachedResource::load):
471 * loader/cache/CachedResource.h:
472 * loader/cache/CachedResourceRequest.cpp:
473 (WebCore::CachedResourceRequest::CachedResourceRequest):
474 * loader/cache/CachedResourceRequest.h:
475 (WebCore::CachedResourceRequest::releaseOriginalRequestHeaders):
476 * platform/network/HTTPHeaderValues.cpp:
477 * platform/network/HTTPHeaderValues.h:
479 2017-08-16 Matt Baker <mattbaker@apple.com>
481 Web Inspector: capture async stack trace when workers/main context posts a message
482 https://bugs.webkit.org/show_bug.cgi?id=167084
483 <rdar://problem/30033673>
485 Reviewed by Brian Burg.
487 Add instrumentation to DOMWindow to support showing asynchronous
488 stack traces when the debugger pauses in a MessageEvent handler.
490 Test: inspector/debugger/async-stack-trace.html
492 * inspector/InspectorInstrumentation.cpp:
493 (WebCore::InspectorInstrumentation::didPostMessageImpl):
494 (WebCore::InspectorInstrumentation::didFailPostMessageImpl):
495 (WebCore::InspectorInstrumentation::willDispatchPostMessageImpl):
496 (WebCore::InspectorInstrumentation::didDispatchPostMessageImpl):
498 * inspector/InspectorInstrumentation.h:
499 (WebCore::InspectorInstrumentation::didPostMessage):
500 (WebCore::InspectorInstrumentation::didFailPostMessage):
501 (WebCore::InspectorInstrumentation::willDispatchPostMessage):
502 (WebCore::InspectorInstrumentation::didDispatchPostMessage):
504 * inspector/PageDebuggerAgent.cpp:
505 (WebCore::PageDebuggerAgent::didClearAsyncStackTraceData):
506 (WebCore::PageDebuggerAgent::didPostMessage):
507 (WebCore::PageDebuggerAgent::didFailPostMessage):
508 (WebCore::PageDebuggerAgent::willDispatchPostMessage):
509 (WebCore::PageDebuggerAgent::didDispatchPostMessage):
510 * inspector/PageDebuggerAgent.h:
512 * page/DOMWindow.cpp:
513 (WebCore::DOMWindow::postMessage):
514 (WebCore::DOMWindow::postMessageTimerFired):
516 2017-08-16 Timothy Horton <timothy_horton@apple.com>
520 * platform/ios/PlatformPasteboardIOS.mm:
522 2017-08-16 Simon Fraser <simon.fraser@apple.com>
524 Build fix after r220812
526 Fix builds where LOG_DISABLED is defined.
528 * css/MediaQueryEvaluator.cpp:
530 2017-08-16 Simon Fraser <simon.fraser@apple.com>
532 Add a log channel for media queries
533 https://bugs.webkit.org/show_bug.cgi?id=175591
535 Reviewed by Zalan Bujtas.
537 Add a "MediaQueries" log channel which logs data about media query evaluation.
540 (WebCore::MediaQuerySet::MediaQuerySet):
541 (WebCore::operator<<):
543 * css/MediaQuery.cpp:
544 (WebCore::operator<<):
546 * css/MediaQueryEvaluator.cpp:
547 (WebCore::operator<<):
548 (WebCore::MediaQueryEvaluator::evaluate const):
549 (WebCore::aspectRatioValueAsString):
550 (WebCore::orientationEvaluate):
551 (WebCore::aspectRatioEvaluate):
552 (WebCore::deviceAspectRatioEvaluate):
553 (WebCore::evaluateResolution):
554 (WebCore::deviceHeightEvaluate):
555 (WebCore::deviceWidthEvaluate):
556 (WebCore::heightEvaluate):
557 (WebCore::widthEvaluate):
558 * css/MediaQueryExpression.cpp:
559 (WebCore::operator<<):
560 * css/MediaQueryExpression.h:
561 * css/MediaQueryMatcher.cpp:
562 (WebCore::MediaQueryMatcher::styleResolverChanged):
563 * css/StyleResolver.cpp:
564 (WebCore::StyleResolver::hasMediaQueriesAffectedByViewportChange const):
565 (WebCore::StyleResolver::hasMediaQueriesAffectedByAccessibilitySettingsChange const):
566 * dom/InlineStyleSheetOwner.cpp:
567 (WebCore::InlineStyleSheetOwner::createSheet):
568 * html/HTMLImageElement.cpp:
569 (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
570 * html/HTMLLinkElement.cpp:
571 (WebCore::HTMLLinkElement::process):
572 * html/HTMLMediaElement.cpp:
573 (WebCore::HTMLMediaElement::selectNextSourceChild):
574 * html/HTMLPictureElement.cpp:
575 (WebCore::HTMLPictureElement::viewportChangeAffectedPicture const):
576 * html/parser/HTMLPreloadScanner.cpp:
577 (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
578 * page/FrameView.cpp:
579 (WebCore::FrameView::layout):
580 * platform/Logging.cpp:
581 (WebCore::initializeLogChannelsIfNecessary):
582 * platform/Logging.h:
584 (WebCore::isSchemeFirstChar):
585 (WebCore::operator<<):
588 2017-08-16 Sam Weinig <sam@webkit.org>
590 [WebIDL] Remove the need for JSSubtleCryptoCustom.cpp
591 https://bugs.webkit.org/show_bug.cgi?id=175526
593 Reviewed by Chris Dumez.
595 - Generates bindings for all of SubtleCrypto except AlgorithmIdentifier normalization,
596 which is defined in the WebCrypto spec to happen after normal IDL operations.
597 - Adds initial support for IDL object types in unions (some, unneeded at the moment,
601 * WebCore.xcodeproj/project.pbxproj:
602 * bindings/js/JSSubtleCryptoCustom.cpp: Removed.
604 Remove JSSubtleCryptoCustom.cpp, added CryptoKeyFormat.h
606 * bindings/js/JSDOMConvertObject.h:
608 Add needed, when included in generated code, #include of StrongInlines.h
610 * bindings/js/JSDOMConvertUnion.h:
612 Add initial support for object (needed for AlgorithmIdentifier which is
613 (object or DOMString)). Remaining support will be handled by https://webkit.org/b/175616
615 Also add remaining spec comments while in the area.
617 * bindings/js/JSDOMPromiseDeferred.cpp:
618 (WebCore::DeferredPromise::reject):
620 Add support for the special ExistingExceptionError error code. Capturing
621 the current exception and using it as the rejection value.
623 * crypto/SubtleCrypto.cpp:
624 (WebCore::SubtleCrypto::~SubtleCrypto):
625 (WebCore::toHashIdentifier):
626 (WebCore::normalizeCryptoAlgorithmParameters):
627 (WebCore::toCryptoKeyUsageBitmap):
628 (WebCore::rejectWithException):
629 (WebCore::normalizeJsonWebKey):
630 (WebCore::toKeyData):
631 (WebCore::copyToVector):
632 (WebCore::isSupportedExportKey):
633 (WebCore::SubtleCrypto::encrypt):
634 (WebCore::SubtleCrypto::decrypt):
635 (WebCore::SubtleCrypto::sign):
636 (WebCore::SubtleCrypto::verify):
637 (WebCore::SubtleCrypto::digest):
638 (WebCore::SubtleCrypto::generateKey):
639 (WebCore::SubtleCrypto::deriveKey):
640 (WebCore::SubtleCrypto::deriveBits):
641 (WebCore::SubtleCrypto::importKey):
642 (WebCore::SubtleCrypto::exportKey):
643 (WebCore::SubtleCrypto::wrapKey):
644 (WebCore::SubtleCrypto::unwrapKey):
645 * crypto/SubtleCrypto.h:
646 * crypto/SubtleCrypto.idl:
648 Moves implementation from JSSubtleCryptoCustom.cpp -> here. Important changes that come
650 - All parameters are now converted / type checked for us.
651 - Rather than throwing exceptions and expecting the bindings layer to convert
652 them to promise rejections, all rejections are now explicitly made.
653 - Algorithms are no longer checked for being supported twice, once in normalizeCryptoAlgorithmParameters
654 and then again in the operation. We instead rely on normalizeCryptoAlgorithmParameters to return
655 an Exception if its not supported.
656 - Shaves 251 lines off the file.
658 * crypto/CryptoKeyFormat.h: Added.
660 Add new header for unified key format enum. (For bindings purposes, SubtleCrypto
661 re aliases it to SubtleCrypto::KeyFormat).
663 * bindings/js/JSWebKitSubtleCryptoCustom.cpp:
664 * crypto/CryptoAlgorithm.cpp:
665 * crypto/CryptoAlgorithm.h:
666 * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
667 * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
668 * crypto/algorithms/CryptoAlgorithmAES_CFB.cpp:
669 * crypto/algorithms/CryptoAlgorithmAES_CFB.h:
670 * crypto/algorithms/CryptoAlgorithmAES_CTR.cpp:
671 * crypto/algorithms/CryptoAlgorithmAES_CTR.h:
672 * crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:
673 * crypto/algorithms/CryptoAlgorithmAES_GCM.h:
674 * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
675 * crypto/algorithms/CryptoAlgorithmAES_KW.h:
676 * crypto/algorithms/CryptoAlgorithmECDH.cpp:
677 * crypto/algorithms/CryptoAlgorithmECDH.h:
678 * crypto/algorithms/CryptoAlgorithmECDSA.cpp:
679 * crypto/algorithms/CryptoAlgorithmECDSA.h:
680 * crypto/algorithms/CryptoAlgorithmHKDF.cpp:
681 * crypto/algorithms/CryptoAlgorithmHKDF.h:
682 * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
683 * crypto/algorithms/CryptoAlgorithmHMAC.h:
684 * crypto/algorithms/CryptoAlgorithmPBKDF2.cpp:
685 * crypto/algorithms/CryptoAlgorithmPBKDF2.h:
686 * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
687 * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
688 * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
689 * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
690 * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
691 * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
692 * crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:
693 * crypto/algorithms/CryptoAlgorithmRSA_PSS.h:
695 Use CryptoKeyFormat enum directly, rather than SubtleCrypto::KeyFormat,
696 to allow not including SubtleCrypto.h.
698 * crypto/parameters/CryptoAlgorithmEcdsaParams.h:
699 * crypto/parameters/CryptoAlgorithmHkdfParams.h:
700 * crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
701 * crypto/parameters/CryptoAlgorithmPbkdf2Params.h:
702 * crypto/parameters/CryptoAlgorithmRsaHashedImportParams.h:
703 * crypto/parameters/CryptoAlgorithmRsaHashedKeyGenParams.h:
704 * crypto/parameters/EcdsaParams.idl:
705 * crypto/parameters/HkdfParams.idl:
706 * crypto/parameters/HmacKeyParams.idl:
707 * crypto/parameters/Pbkdf2Params.idl:
708 * crypto/parameters/RsaHashedImportParams.idl:
709 * crypto/parameters/RsaHashedKeyGenParams.idl:
711 Update IDLs and implementations to use the correct definition of HashAlgorithmIdentifier,
712 which is (object or DOMString), now that it is supported.
714 2017-08-16 Youenn Fablet <youenn@apple.com>
716 [Cache API] Implement Worker connection to the Cache storage engine
717 https://bugs.webkit.org/show_bug.cgi?id=175599
719 Reviewed by Chris Dumez.
721 Covered by existing tests.
723 Adding a WorkerCacheStorageConnection to connect workers Cache/CacheStorage
724 to the cache storage engine.
725 WorkerCacheStorageConnection does this by hopping to the main thread to call the document cache storage connection to do the actual job.
726 Doing some CacheStorageConnection refactoring to share code with WK2 implementation of the cache storage connection.
728 * Modules/cache/CacheQueryOptions.h:
729 (WebCore::CacheQueryOptions::isolatedCopy const):
730 * Modules/cache/CacheStorageConnection.cpp:
731 (WebCore::CacheStorageConnection::open):
732 (WebCore::CacheStorageConnection::remove):
733 (WebCore::CacheStorageConnection::retrieveCaches):
734 (WebCore::CacheStorageConnection::retrieveRecords):
735 (WebCore::CacheStorageConnection::batchDeleteOperation):
736 (WebCore::CacheStorageConnection::batchPutOperation):
737 (WebCore::CacheStorageConnection::openOrRemoveCompleted):
738 (WebCore::CacheStorageConnection::updateCaches):
739 (WebCore::CacheStorageConnection::updateRecords):
740 (WebCore::CacheStorageConnection::removeRecordsCompleted):
741 (WebCore::CacheStorageConnection::putRecordsCompleted):
742 * Modules/cache/CacheStorageConnection.h:
743 (WebCore::CacheStorageConnection::openCompleted):
744 (WebCore::CacheStorageConnection::removeCompleted):
745 (WebCore::CacheStorageConnection::doOpen):
746 (WebCore::CacheStorageConnection::doRemove):
747 (WebCore::CacheStorageConnection::doRetrieveCaches):
748 (WebCore::CacheStorageConnection::doRetrieveRecords):
749 (WebCore::CacheStorageConnection::doBatchDeleteOperation):
750 (WebCore::CacheStorageConnection::doBatchPutOperation):
751 * Modules/cache/WorkerCacheStorageConnection.cpp: Added.
752 (WebCore::toCrossThreadRecordData):
753 (WebCore::fromCrossThreadRecordData):
754 (WebCore::WorkerCacheStorageConnection::create):
755 (WebCore::WorkerCacheStorageConnection::WorkerCacheStorageConnection):
756 (WebCore::WorkerCacheStorageConnection::doOpen):
757 (WebCore::WorkerCacheStorageConnection::doRemove):
758 (WebCore::WorkerCacheStorageConnection::doRetrieveCaches):
759 (WebCore::WorkerCacheStorageConnection::doRetrieveRecords):
760 (WebCore::WorkerCacheStorageConnection::doBatchDeleteOperation):
761 (WebCore::WorkerCacheStorageConnection::doBatchPutOperation):
762 * Modules/cache/WorkerCacheStorageConnection.h: Added.
763 * Modules/cache/WorkerGlobalScopeCaches.cpp:
764 (WebCore::WorkerGlobalScopeCaches::caches const):
765 * WebCore.xcodeproj/project.pbxproj:
766 * loader/FetchOptions.h:
767 (WebCore::FetchOptions::isolatedCopy const):
768 * workers/WorkerGlobalScope.cpp:
769 (WebCore::WorkerGlobalScope::cacheStorageConnection):
770 * workers/WorkerGlobalScope.h:
772 2017-08-16 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com>
774 [PAL] Move spi/ios and spi/win directories into PAL
775 https://bugs.webkit.org/show_bug.cgi?id=175171
777 Reviewed by Antti Koivisto.
780 * WebCore.xcodeproj/project.pbxproj:
781 * editing/cocoa/DataDetection.mm:
782 * loader/ios/PreviewLoader.mm:
783 * page/CaptionUserPreferencesMediaAF.cpp:
784 * page/cocoa/MemoryReleaseCocoa.mm:
785 * page/cocoa/SettingsCocoa.mm:
786 * page/ios/UserAgentIOS.mm:
787 * platform/audio/ios/MediaSessionManagerIOS.mm:
788 * platform/graphics/ca/PlatformCALayer.cpp:
789 * platform/graphics/cocoa/FontCascadeCocoa.mm:
790 * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
791 * platform/graphics/opentype/OpenTypeCG.h:
792 * platform/graphics/win/SimpleFontDataCGWin.cpp:
793 * platform/graphics/win/SimpleFontDataDirect2D.cpp:
794 * platform/ios/Device.h:
795 * platform/ios/PlatformPasteboardIOS.mm:
796 * platform/ios/PlatformScreenIOS.mm:
797 * platform/ios/QuickLookSoftLink.h:
798 * platform/ios/QuickLookSoftLink.mm:
799 * platform/ios/ValidationBubbleIOS.mm:
800 * platform/ios/WebItemProviderPasteboard.mm:
801 * platform/network/ios/PreviewConverter.mm:
802 * platform/sql/SQLiteFileSystem.cpp:
803 * rendering/RenderThemeIOS.mm:
805 2017-08-16 Tim Horton <timothy_horton@apple.com>
807 2-3% of main thread time under UTTypeCreatePreferredIdentifierForTag on wunderground map
808 https://bugs.webkit.org/show_bug.cgi?id=175618
810 Reviewed by Simon Fraser.
812 No new tests, just a perf win.
814 UTTypeCreatePreferredIdentifierForTag is fairly expensive, and is called
815 under every toDataURL, which the Wunderground wundermap does a /lot/.
817 Keep a 16-item LRU cache of MIMEType->UTI mappings.
819 Also, make other callers of UTTypeCreatePreferredIdentifierForTag use
820 the UTIUtilities version so they can share in the caching.
822 Also, as a drive-by, add and make other callers use mimeTypeFromUTI too,
823 and make the UTIUtilities operate on Strings for a slightly more WebCore-y feel.
825 * editing/ios/EditorIOS.mm:
826 (WebCore::Editor::WebContentReader::readImage):
827 * platform/MIMETypeRegistry.cpp:
828 (WebCore::initializeSupportedImageMIMETypes):
829 (WebCore::initializeSupportedImageMIMETypesForEncoding):
830 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
831 (WebCore::createFileTypesSet):
832 * platform/graphics/cg/ImageSourceCGMac.mm:
833 (WebCore::MIMETypeForImageSourceType):
834 Adopt newly-added MIMETypeFromUTI().
836 * platform/graphics/cg/ImageBufferCG.cpp:
837 (WebCore::utiFromImageBufferMIMEType):
838 (WebCore::ImageBuffer::toCFData const):
840 (WebCore::utiFromMIMEType): Deleted.
841 Adopt UTIFromMIMEType, and rename the local helper that does something
842 different (a small static map) on iOS and Windows to not have an overlapping name.
844 * platform/ios/PasteboardIOS.mm:
845 (WebCore::Pasteboard::resourceMIMEType):
846 (WebCore::utiTypeFromCocoaType):
847 Adopt UTIFromMIMEType().
849 * platform/ios/PlatformPasteboardIOS.mm:
850 (WebCore::PlatformPasteboard::writeObjectRepresentations):
851 * platform/mac/PasteboardMac.mm:
852 (WebCore::cocoaTypeFromHTMLClipboardType):
853 Adopt isDeclaredUTI and UTIFromMIMEType().
855 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
856 (WebCore::WebCoreAVFResourceLoader::responseReceived):
857 * platform/network/ios/WebCoreURLResponseIOS.mm:
858 (WebCore::adjustMIMETypeIfNecessary):
859 * platform/network/mac/WebCoreURLResponse.mm:
860 (WebCore::adjustMIMETypeIfNecessary):
861 * rendering/RenderThemeIOS.mm:
862 (WebCore::iconForAttachment):
863 * rendering/RenderThemeMac.mm:
864 (WebCore::iconForAttachment):
865 Deal with the fact that UTI utilities deal in Strings now.
867 * platform/network/mac/UTIUtilities.h:
868 * platform/network/mac/UTIUtilities.mm:
869 (WebCore::MIMETypeFromUTI):
870 Added. This doesn't crawl up the UTI tree if the first conversion fails,
871 which is what most of the existing code does. It's possible we want to
872 use MIMETypeFromUTITree's logic everywhere, but I didn't want to change
875 (WebCore::MIMETypeFromUTITree):
876 (WebCore::isDeclaredUTI):
877 Take and return strings.
879 (WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
880 (WebCore::UTIFromMIMEType):
881 Add the aforementioned cache.
883 2017-08-16 Simon Fraser <simon.fraser@apple.com>
885 Make RenderLayer and RenderLayerBacking TextStream-loggable, and clean up compositing logging
886 https://bugs.webkit.org/show_bug.cgi?id=175634
888 Reviewed by Zalan Bujtas.
890 Add operator<<(TextStream&) for RenderLayer and RenderLayer backing, and use them for compositing logging.
892 Convert CompositingUpdateType to an enum class.
894 * page/FrameView.cpp:
895 (WebCore::FrameView::updateCompositingLayersAfterLayout):
896 (WebCore::FrameView::updateCompositingLayersAfterScrolling):
897 * page/ios/FrameIOS.mm:
898 (WebCore::Frame::viewportOffsetChanged):
899 * rendering/RenderLayer.cpp:
900 (WebCore::RenderLayer::updateLayerPositionsAfterLayout):
901 (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
902 (WebCore::RenderLayer::calculateClipRects const):
903 * rendering/RenderLayer.h:
904 * rendering/RenderLayerBacking.cpp:
905 (WebCore::RenderLayerBacking::updateAfterLayout):
906 (WebCore::RenderLayerBacking::updateGeometry):
907 (WebCore::operator<<):
908 * rendering/RenderLayerBacking.h:
909 * rendering/RenderLayerCompositor.cpp:
910 (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout):
911 (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
912 (WebCore::RenderLayerCompositor::updateCompositingLayersTimerFired):
913 (WebCore::RenderLayerCompositor::updateCompositingLayers):
914 (WebCore::RenderLayerCompositor::layerTreeAsText):
915 (WebCore::operator<<):
916 * rendering/RenderLayerCompositor.h:
918 2017-08-16 Eric Carlson <eric.carlson@apple.com>
920 Consider allow gUM to be called from localhost without https
921 https://bugs.webkit.org/show_bug.cgi?id=173457
922 <rdar://problem/33900527>
924 Reviewed by Youenn Fablet.
926 Tests: http/tests/media/media-stream/get-user-media-localhost.html
927 http/tests/media/media-stream/get-user-media-loopback-ip.html
929 * Modules/mediastream/UserMediaRequest.cpp:
930 (WebCore::isSecure): Call SchemeRegistry::shouldTreatURLSchemeAsSecure instead of looking for
932 (WebCore::canCallGetUserMedia): Allow localhost or loopback address.
934 * page/SecurityOrigin.cpp:
935 (WebCore::isLoopbackIPAddress): Add a comment.
936 (WebCore::shouldTreatAsPotentionallyTrustworthy): Move tests for localhost and loopback address
937 to isLocalHostOrLoopbackIPAddress, call it.
938 (WebCore::SecurityOrigin::isLocalHostOrLoopbackIPAddress):
939 * page/SecurityOrigin.h:
941 2017-08-16 Chris Dumez <cdumez@apple.com>
943 EventSource: ignore IDs with U+0000
944 https://bugs.webkit.org/show_bug.cgi?id=175178
946 Reviewed by Darin Adler.
948 EventSource: ignore IDs with U+0000 as per:
949 https://github.com/whatwg/html/pull/2849
951 Test: imported/w3c/web-platform-tests/eventsource/format-field-id-null.htm
953 * page/EventSource.cpp:
954 (WebCore::EventSource::parseEventStreamLine):
956 2017-08-16 Fujii Hironori <Hironori.Fujii@sony.com>
958 [HarfBuzz] Decomposed Vietnamese characters are rendered incorrectly
959 https://bugs.webkit.org/show_bug.cgi?id=174418
961 Reviewed by Michael Catanzaro.
963 HarfBuzzShaper should normalize the input text before collecting
964 HarfBuzzRuns. Actually, HarfBuzzShaper::setNormalizedBuffer does
965 the task. But, this function hasn't been called from anywhere
968 Test: fast/text/international/vietnamese-nfd.html
969 imported/blink/fast/text/international/text-shaping-arabic-diffs.html
971 * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
972 (WebCore::HarfBuzzShaper::HarfBuzzShaper):
973 Call setNormalizedBuffer instead of normalizeCharacters.
974 (WebCore::normalizeCharacters): Deleted.
975 (WebCore::normalizeSpacesAndMirrorChars) Use
976 FontCascade::treatAsZeroWidthSpaceInComplexScript instead of
977 FontCascade::treatAsZeroWidthSpace to preserve ZWJ and ZWNJ.
979 2017-08-16 Antti Koivisto <antti@apple.com>
981 Move first-letter renderer mutation code out of RenderBlock and into RenderTreeUpdater
982 https://bugs.webkit.org/show_bug.cgi?id=175627
984 Reviewed by Andreas Kling.
986 Render tree should not mutate itself. We already fixed this for first-letter, supporting code
987 can now move to RenderTreeUpdater too.
990 * WebCore.xcodeproj/project.pbxproj:
991 * rendering/RenderBlock.cpp:
992 (WebCore::styleForFirstLetter): Deleted.
993 (WebCore::isPunctuationForFirstLetter): Deleted.
994 (WebCore::shouldSkipForFirstLetter): Deleted.
995 (WebCore::RenderBlock::updateFirstLetterStyle): Deleted.
996 (WebCore::RenderBlock::createFirstLetterRenderer): Deleted.
997 (WebCore::RenderBlock::updateFirstLetter): Deleted.
998 * rendering/RenderBlock.h:
999 * rendering/RenderRubyRun.cpp:
1000 (WebCore::RenderRubyRun::updateFirstLetter): Deleted.
1001 * rendering/RenderRubyRun.h:
1002 * rendering/RenderTable.cpp:
1003 (WebCore::RenderTable::updateFirstLetter): Deleted.
1004 * rendering/RenderTable.h:
1006 Virtual overrides just disabled first letter for some RenderBlock subclasses. This is now achieved via
1007 supportsFirstLetter test in the first letter updater.
1009 * rendering/TextAutoSizing.cpp:
1010 (WebCore::TextAutoSizingValue::adjustTextNodeSizes):
1011 * rendering/svg/RenderSVGText.cpp:
1012 (WebCore::RenderSVGText::updateFirstLetter): Deleted.
1013 * rendering/svg/RenderSVGText.h:
1014 * style/RenderTreeUpdater.cpp:
1015 (WebCore::RenderTreeUpdater::popParent):
1016 * style/RenderTreeUpdater.h:
1017 * style/RenderTreeUpdaterFirstLetter.cpp: Added.
1018 (WebCore::styleForFirstLetter):
1019 (WebCore::isPunctuationForFirstLetter):
1020 (WebCore::shouldSkipForFirstLetter):
1021 (WebCore::updateFirstLetterStyle):
1022 (WebCore::createFirstLetterRenderer):
1023 (WebCore::supportsFirstLetter):
1024 (WebCore::RenderTreeUpdater::FirstLetter::update):
1025 * style/RenderTreeUpdaterFirstLetter.h: Added.
1027 2017-08-16 Xabier Rodriguez Calvar <calvaris@igalia.com>
1029 [GStreamer][EME] Rework handling key systems and UUIDs
1030 https://bugs.webkit.org/show_bug.cgi?id=175567
1032 Reviewed by Žan Doberšek.
1034 The UUIDs and key system strings were moved to the
1035 GStreamerEMEUtilities class because so far they were managed by
1036 the decryptors and that was ugly.
1038 * platform/GStreamer.cmake:
1039 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1040 (WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem):
1041 * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.cpp: Added.
1042 * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h: Added.
1043 (WebCore::GStreamerEMEUtilities::isClearKeyKeySystem):
1044 (WebCore::GStreamerEMEUtilities::keySystemToUuid):
1045 * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
1046 (webkit_media_clear_key_decrypt_class_init):
1047 * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.h:
1049 2017-08-16 Andy Estes <aestes@apple.com>
1051 [Payment Request] Add an ENABLE flag and an experimental feature preference
1052 https://bugs.webkit.org/show_bug.cgi?id=175622
1054 Reviewed by Tim Horton.
1056 * Configurations/FeatureDefines.xcconfig:
1059 2017-08-15 Ryosuke Niwa <rniwa@webkit.org>
1061 Make DataTransferItemList work with plain text entries
1062 https://bugs.webkit.org/show_bug.cgi?id=175596
1064 Reviewed by Wenson Hsieh.
1066 Added the basic machinery to get the list of plain text items to DataTransferItemList and DataTransferItem.
1068 Each DataTransferItem now depends on DataTransfer so it does ref-forwarding like DataTransferItemList to make
1069 DataTransfer alive as long as any DataTransferItem is alive.
1071 Specifications: https://html.spec.whatwg.org/multipage/dnd.html#the-datatransferitem-interface
1072 https://html.spec.whatwg.org/multipage/dnd.html#the-datatransferitemlist-interface
1074 Tests: editing/pasteboard/datatransfer-items-drop-plaintext-file.html
1075 editing/pasteboard/datatransfer-items-paste-plaintext.html
1077 * dom/DataTransferItem.cpp:
1078 (WebCore::DataTransferItem::DataTransferItem): Added two variants one for plain text and another one for a file.
1079 (WebCore::DataTransferItem::kind const): Rewritten.
1080 (WebCore::DataTransferItem::getAsString const): Implemented.
1081 (WebCore::DataTransferItem::getAsFile const): Implemented.
1082 * dom/DataTransferItem.h:
1083 (WebCore::DataTransferItem::ref): Added.
1084 (WebCore::DataTransferItem::deref): Added.
1085 (WebCore::DataTransferItem::type const): Returns String instead of AtomicString.
1086 (WebCore::DataTransferItem::kind const): Moved to cpp.
1087 * dom/DataTransferItem.idl: Removed NoInterfaceObject since the interface object should exist on DOMWindow.
1088 * dom/DataTransferItemList.cpp:
1089 (WebCore::DataTransferItemList::length): Implemented.
1090 (WebCore::DataTransferItemList::item): Ditto.
1091 (WebCore::isSupportedType): Added. For now, we only support text/plain.
1092 (WebCore::DataTransferItemList::ensureItems): Added. Constructs the list of DataTransferItems.
1093 * dom/DataTransferItemList.h:
1094 (DataTransferItemList): Added m_items. The list is filled lazily by ensureItems.
1095 * dom/DataTransferItemList.idl: Removed NoInterfaceObject since the interface object should exist on DOMWindow.
1097 2017-08-15 Simon Fraser <simon.fraser@apple.com>
1099 Remove ScrollView::clipsRepaints() which was only used by Chromium
1100 https://bugs.webkit.org/show_bug.cgi?id=175594
1102 Reviewed by Tim Horton.
1104 clipsRepaints() was added in r74568 but was only used by Chromium. It's always
1105 true for other platforms, so remove conditionals that test for it and assume true.
1107 * page/FrameView.cpp:
1108 (WebCore::FrameView::scrollContentsFastPath):
1109 * platform/ScrollView.cpp:
1110 (WebCore::ScrollView::repaintContentRectangle):
1111 (WebCore::ScrollView::setClipsRepaints): Deleted.
1112 * platform/ScrollView.h:
1113 (WebCore::ScrollView::clipsRepaints const): Deleted.
1115 2017-08-15 Simon Fraser <simon.fraser@apple.com>
1117 Allow WebCore logging channels to be set from the UI process
1118 https://bugs.webkit.org/show_bug.cgi?id=175608
1120 Reviewed by Tim Horton.
1122 Change initializeLogChannelsIfNecessary() to take an optional String, which can
1123 be a list of log channels passed from the UI process.
1125 * platform/LogInitialization.h:
1126 * platform/Logging.cpp:
1127 (WebCore::initializeLogChannelsIfNecessary):
1129 2017-08-15 Chris Dumez <cdumez@apple.com>
1131 Fetch / Beacon: Use "application/octet-stream" Content-Type for payloads of type ArrayBuffer / ArrayBufferView
1132 https://bugs.webkit.org/show_bug.cgi?id=175600
1134 Reviewed by Youenn Fablet.
1136 Use "application/octet-stream" Content-Type for payloads of type ArrayBuffer / ArrayBufferView in Fetch & Beacon.
1137 If we don't set a Content-Type header, our underlying network stack is going to add a "application/x-www-form-urlencoded"
1138 Content-Type header, which is worse.
1140 Chrome is already using "application/octet-stream" Content-Type in Beacon, but use no Content-Type in Fetch.
1141 The Fetch/Beacon specification says we should have no Content-Type header in this case but this is unfortunately
1142 not something we can support at the moment. Using "application/octet-stream" Content-Type for now seems like the
1145 Test: http/wpt/fetch/fetch-request-arraybuffer-content-type.html
1147 * Modules/fetch/FetchBody.cpp:
1148 (WebCore::FetchBody::extract):
1149 * platform/network/HTTPHeaderValues.cpp:
1150 (WebCore::HTTPHeaderValues::octetStreamContentType):
1151 * platform/network/HTTPHeaderValues.h:
1153 2017-08-15 Robin Morisset <rmorisset@apple.com>
1155 Change the order of arguments of JSWithScope::create() for consistency
1156 https://bugs.webkit.org/show_bug.cgi?id=175585
1158 Reviewed by Saam Barati.
1160 No change of behavior.
1162 * bindings/js/JSHTMLElementCustom.cpp:
1163 (WebCore::JSHTMLElement::pushEventHandlerScope const):
1165 2017-08-15 Youenn Fablet <youenn@apple.com>
1167 [Cache API] Ensure ResourceResponse is not null when redirected/tainting/type fields are set
1168 https://bugs.webkit.org/show_bug.cgi?id=175538
1170 Reviewed by Chris Dumez.
1172 No change of behavior.
1173 This change ensures that response type is preserved when encoding/decoding ResourceResponse, in particular the error type.
1174 This will allow Cache API to preserve responses when reading them from a different process.
1176 * platform/network/ResourceResponseBase.cpp:
1177 (WebCore::ResourceResponseBase::setType):
1178 * platform/network/ResourceResponseBase.h:
1179 (WebCore::ResourceResponseBase::setType):
1181 2017-08-15 Chris Dumez <cdumez@apple.com>
1183 Update CachedResourceLoader::requestResource() to return a WTF::Expected
1184 https://bugs.webkit.org/show_bug.cgi?id=175505
1186 Reviewed by Youenn Fablet.
1188 Update CachedResourceLoader::requestResource() to return a WTF::Expected
1189 type instead of using an out parameter for the ResourceError in case of
1190 synchronous failure.
1192 * Modules/beacon/NavigatorBeacon.cpp:
1193 (WebCore::NavigatorBeacon::sendBeacon):
1194 * bindings/js/CachedScriptFetcher.cpp:
1195 (WebCore::CachedScriptFetcher::requestScriptWithCache const):
1196 * css/CSSFontFaceSrcValue.cpp:
1197 (WebCore::CSSFontFaceSrcValue::cachedFont):
1198 * css/CSSImageSetValue.cpp:
1199 (WebCore::CSSImageSetValue::loadBestFitImage):
1200 * css/CSSImageValue.cpp:
1201 (WebCore::CSSImageValue::loadImage):
1202 * css/StyleRuleImport.cpp:
1203 (WebCore::StyleRuleImport::requestStyleSheet):
1204 * dom/ProcessingInstruction.cpp:
1205 (WebCore::ProcessingInstruction::checkStyleSheet):
1206 * html/HTMLLinkElement.cpp:
1207 (WebCore::HTMLLinkElement::process):
1208 * loader/CrossOriginPreflightChecker.cpp:
1209 (WebCore::CrossOriginPreflightChecker::startPreflight):
1210 * loader/DocumentLoader.cpp:
1211 (WebCore::DocumentLoader::startLoadingMainResource):
1212 * loader/DocumentThreadableLoader.cpp:
1213 (WebCore::DocumentThreadableLoader::loadRequest):
1214 * loader/FrameLoader.cpp:
1215 (WebCore::FrameLoader::loadedResourceFromMemoryCache):
1216 * loader/FrameLoader.h:
1217 * loader/ImageLoader.cpp:
1218 (WebCore::ImageLoader::updateFromElement):
1219 * loader/LinkLoader.cpp:
1220 (WebCore::LinkLoader::preloadIfNeeded):
1221 * loader/MediaResourceLoader.cpp:
1222 (WebCore::MediaResourceLoader::requestResource):
1223 * loader/TextTrackLoader.cpp:
1224 (WebCore::TextTrackLoader::load):
1225 * loader/cache/CachedResourceLoader.cpp:
1226 (WebCore::castCachedResourceTo):
1227 (WebCore::CachedResourceLoader::requestImage):
1228 (WebCore::CachedResourceLoader::requestFont):
1229 (WebCore::CachedResourceLoader::requestTextTrack):
1230 (WebCore::CachedResourceLoader::requestCSSStyleSheet):
1231 (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1232 (WebCore::CachedResourceLoader::requestScript):
1233 (WebCore::CachedResourceLoader::requestXSLStyleSheet):
1234 (WebCore::CachedResourceLoader::requestSVGDocument):
1235 (WebCore::CachedResourceLoader::requestLinkResource):
1236 (WebCore::CachedResourceLoader::requestMedia):
1237 (WebCore::CachedResourceLoader::requestIcon):
1238 (WebCore::CachedResourceLoader::requestRawResource):
1239 (WebCore::CachedResourceLoader::requestBeaconResource):
1240 (WebCore::CachedResourceLoader::requestMainResource):
1241 (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
1242 (WebCore::CachedResourceLoader::requestResource):
1243 (WebCore::CachedResourceLoader::preload):
1244 * loader/cache/CachedResourceLoader.h:
1245 * loader/cache/CachedSVGDocumentReference.cpp:
1246 (WebCore::CachedSVGDocumentReference::load):
1247 * loader/icon/IconLoader.cpp:
1248 (WebCore::IconLoader::startLoading):
1249 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1250 (WebCore::WebCoreAVFResourceLoader::startLoading):
1251 * svg/SVGFEImageElement.cpp:
1252 (WebCore::SVGFEImageElement::requestImageResource):
1253 * svg/SVGFontFaceUriElement.cpp:
1254 (WebCore::SVGFontFaceUriElement::loadFont):
1255 * svg/SVGUseElement.cpp:
1256 (WebCore::SVGUseElement::updateExternalDocument):
1257 * xml/XSLImportRule.cpp:
1258 (WebCore::XSLImportRule::loadSheet):
1260 2017-08-15 Don Olmstead <don.olmstead@sony.com>
1262 [PAL] Move Sleep classes into PAL
1263 https://bugs.webkit.org/show_bug.cgi?id=175456
1265 Reviewed by Ryosuke Niwa.
1267 No new tests. No change in behavior.
1270 * PlatformMac.cmake:
1271 * WebCore.xcodeproj/project.pbxproj:
1272 * html/HTMLMediaElement.cpp:
1273 * html/HTMLMediaElement.h:
1274 * platform/audio/PlatformMediaSessionManager.cpp:
1275 * platform/audio/PlatformMediaSessionManager.h:
1276 * platform/mac/WebVideoFullscreenController.h:
1277 * platform/mac/WebVideoFullscreenController.mm:
1279 2017-08-15 Youenn Fablet <youenn@apple.com>
1281 [Cache API] Adding generic support for CacheStorage and Cache methods
1282 https://bugs.webkit.org/show_bug.cgi?id=175455
1284 Reviewed by Chris Dumez.
1286 Covered by existing tests.
1288 Adding a CacheStorageProvider abstraction that creates a CacheStorageConnection.
1289 The CacheStorageProvider is accessed from the page for Document calls.
1290 The CacheStorageConnection is responsible to implement the read/write operations on the cache database.
1291 At the moment, it does nothing but return not implemented errors.
1293 Implementing CacheStorage APIs and Cache APIs based on the CacheStorageConnection except for Cache add and addAll which will be implemented later on.
1294 CacheStoragConnection is responsible to read/write CacheStorage list of caches and each individual cache.
1295 The CacheStorageConnection is a generic connection and not tied to any document/context.
1296 CacheStorage objects are manipulated by providing to the connection the origin of the context.
1297 CacheStorage are global to all contexts with the same origin.
1298 Cache objects are manipulated by an ID that is given initially by the CacheStorageEngine when opening the Cache object.
1300 Adding various accessors and constructors for Fetch constructs as needed by the Cache API implementation.
1302 * Modules/cache/Cache.cpp:
1303 (WebCore::Cache::Cache):
1304 (WebCore::Cache::~Cache):
1305 The CacheStorageConnection is a generic connection and not tied to any document/context.
1306 (WebCore::Cache::match): Implementation of https://www.w3.org/TR/service-workers-1/#cache-match.
1307 Redirect to matchAll as per spec.
1308 (WebCore::Cache::matchAll): Implementation of https://www.w3.org/TR/service-workers-1/#cache-matchAll.
1309 Checks for request as per spec. Then either refresh the request to response map and return all responses.
1310 Or call the query cache algorithm and return copies of the responses (using clone).
1311 (WebCore::Cache::put):
1312 Check the request and response as per spec.
1313 Add temporary rejection cases (being loaded responses, responses with ReadableStream) as there is no support for them right now.
1314 Call the batch put operation.
1315 (WebCore::Cache::remove):
1316 Check the request and response as per spec.
1317 Call the batch delete operation.
1318 (WebCore::Cache::keys):
1319 Refresh the request to response map and return corresponding requests.
1320 Making sure to reuse the same request objects as per spec.
1321 As per spec, the request to response map is ordered. We implement it as a Vector.
1322 (WebCore::Cache::refreshRequestToResponseMap):
1323 Use the cache storage connection to get an up-to-date list of cached records.
1324 (WebCore::Cache::queryCacheMatch):
1325 Implements the match algorithm defined in https://www.w3.org/TR/service-workers-1/#query-cache-algorithm.
1326 This is split for queryCache as cache storage engine will need to use it when implementing the delete operation.
1327 (WebCore::Cache::queryCache):
1328 Full implementation of https://www.w3.org/TR/service-workers-1/#query-cache-algorithm with no targetStorage argument.
1329 (WebCore::Cache::queryCacheWithTargetStorage):
1330 Full implementation of https://www.w3.org/TR/service-workers-1/#query-cache-algorithm with a provided targetStorage argument.
1331 (WebCore::Cache::batchDeleteOperation):
1332 Implementation of https://www.w3.org/TR/service-workers-1/#batch-cache-operations-algorithm but dedicated to a delete operation.
1333 Delete operation are always done one at a time.
1334 (WebCore::Cache::batchPutOperation):
1335 Implementation of https://www.w3.org/TR/service-workers-1/#batch-cache-operations-algorithm dedicated to a put operation.
1336 Put operation takes one record for put but can take several records in the case of addAll, hence the current design.
1337 (WebCore::Cache::updateRequestToResponseMap):
1338 Update the cache request to response map based on the records retrieved from the cache storage connection.
1339 * Modules/cache/Cache.h:
1340 (WebCore::Cache::create):
1341 (WebCore::Cache::name const):
1342 * Modules/cache/Cache.idl:
1343 * Modules/cache/CacheStorage.cpp:
1344 (WebCore::CacheStorage::origin const):
1345 Computing the cache origin that is passed to the CacheStorageConnection.
1346 (WebCore::CacheStorage::has):
1347 Implementation of https://www.w3.org/TR/service-workers-1/#cache-storage-has.
1348 Call the cache storage connection to refresh its cache map.
1349 Then use it to check whether a cache exists.
1350 (WebCore::CacheStorage::refreshCacheMap):
1351 Use the cache storage connection to get the list of existing caches.
1352 (WebCore::CacheStorage::open):
1353 Implementation of https://www.w3.org/TR/service-workers-1/#cache-storage-open.
1354 Refreshing the cache map so as to return a pre-existing cache if any.
1355 (WebCore::CacheStorage::remove):
1356 Implementation of https://www.w3.org/TR/service-workers-1/#cache-storage-delete-method.
1357 Refreshing the cache map so as to do nothing if there is no cache to remove.
1358 (WebCore::CacheStorage::keys):
1359 Implementation of https://www.w3.org/TR/service-workers-1/#cache-storage-keys-method.
1360 Refreshing the cache map and returnin its keys.
1361 As per spec, the cache map is ordered. We implement it as a Vector.
1362 (WebCore::CacheStorage::cacheMap):
1363 Get the list of cache objects, used as a private accessor for JS built-ins.
1364 * Modules/cache/CacheStorage.h:
1365 (WebCore::CacheStorage::create):
1366 (WebCore::CacheStorage::CacheStorage):
1367 * Modules/cache/CacheStorageConnection.cpp: Added.
1368 (WebCore::CacheStorageConnection::exceptionFromError):
1369 * Modules/cache/CacheStorageConnection.h: Added.
1370 Makes the link between Web facing Cache API and the cache storage engine.
1371 Envisioned implementation are:
1372 - One main thread connection used by all documents in the given process.
1373 - One connection per worker that forwards the calls to the main thread and use the main thread connection afterwards.
1374 (WebCore::CacheStorageConnection::create):
1375 (WebCore::CacheStorageConnection::open):
1376 (WebCore::CacheStorageConnection::remove):
1377 (WebCore::CacheStorageConnection::refreshCacheMap):
1378 (WebCore::CacheStorageConnection::refreshRequestToResponseMap):
1379 (WebCore::CacheStorageConnection::batchDeleteOperation):
1380 (WebCore::CacheStorageConnection::batchPutOperation):
1381 * Modules/cache/CacheStorageRecord.h: Added. A fetch record from the Web facing cache API perspective.
1382 * Modules/cache/DOMWindowCaches.cpp:
1383 (WebCore::DOMWindowCaches::caches const):
1384 * Modules/cache/WorkerGlobalScopeCaches.cpp:
1385 (WebCore::WorkerGlobalScopeCaches::from):
1386 (WebCore::WorkerGlobalScopeCaches::caches const):
1387 * Modules/cache/WorkerGlobalScopeCaches.h:
1388 (WebCore::WorkerGlobalScopeCaches::WorkerGlobalScopeCaches):
1389 * Modules/fetch/FetchBodyOwner.h:
1390 (WebCore::FetchBodyOwner::isReadableStreamBody const): Added getter as it is used by cache API.
1391 * Modules/fetch/FetchHeaders.h:
1392 (WebCore::FetchHeaders::create): Add another create as used by the cache API.
1393 (WebCore::FetchHeaders::guard const): Added getter and IPC serializer as this is something that will be stored by the cache engine.
1394 * Modules/fetch/FetchLoader.cpp:
1395 (WebCore::FetchLoader::start):
1396 * Modules/fetch/FetchRequest.cpp:
1397 (WebCore::buildOptions): In case FetchRequest::create is called from C++, there is no need to set init.window to a null value.
1398 Add a check so that no value at all is the same as a null/undefined value.
1399 (WebCore::FetchRequest::resourceRequest const):
1400 * Modules/fetch/FetchRequest.h:
1401 * Modules/fetch/FetchResponse.h:
1402 * WebCore.xcodeproj/project.pbxproj:
1403 * inspector/InspectorOverlay.cpp:
1404 (WebCore::InspectorOverlay::overlayPage):
1405 * page/CacheStorageProvider.h: Added.
1406 Interface to create main thread cache storage connection for the given page.
1407 There will be one provider for each process.
1408 Passing a sessionID so that we will create a connection per session.
1410 (WebCore::Page::Page):
1412 (WebCore::Page::cacheStorageProvider):
1413 * page/PageConfiguration.cpp:
1414 (WebCore::PageConfiguration::PageConfiguration):
1415 * page/PageConfiguration.h:
1416 * svg/graphics/SVGImage.cpp:
1417 (WebCore::SVGImage::dataChanged):
1419 2017-08-15 Chris Dumez <cdumez@apple.com>
1421 Implement quota limitation for keepalive Fetch requests
1422 https://bugs.webkit.org/show_bug.cgi?id=175482
1424 Reviewed by Sam Weinig and Youenn Fablet.
1426 Implement quota limitation for keepalive Fetch requests as per:
1427 - https://fetch.spec.whatwg.org/#http-network-or-cache-fetch (Step 9)
1429 This partly works for Beacon as well, meaning that no Beacon with a body
1430 over 64Kb can be sent. However, we don't keep track about wether or not
1431 beacon loads are inflight or not.
1433 Also update CachedResourceLoader::requestResource() so that the caller
1434 can get a ResourceError when it returns null. This is useful for both
1435 Fetch and Beacon to return better error messages.
1437 Test: http/wpt/beacon/beacon-quota.html
1440 * Modules/beacon/NavigatorBeacon.cpp:
1441 (WebCore::NavigatorBeacon::sendBeacon):
1442 * Modules/fetch/FetchBodyOwner.cpp:
1443 (WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
1444 (WebCore::FetchBodyOwner::BlobLoader::didFail):
1445 * Modules/fetch/FetchBodyOwner.h:
1446 * Modules/fetch/FetchLoader.cpp:
1447 (WebCore::FetchLoader::start):
1448 (WebCore::FetchLoader::didFail):
1449 * Modules/fetch/FetchLoaderClient.h:
1450 * Modules/fetch/FetchResponse.cpp:
1451 (WebCore::FetchResponse::BodyLoader::didFail):
1452 * Modules/fetch/FetchResponse.h:
1453 * WebCore.xcodeproj/project.pbxproj:
1454 * loader/DocumentThreadableLoader.cpp:
1455 (WebCore::DocumentThreadableLoader::loadRequest):
1456 * loader/cache/CachedResource.cpp:
1457 (WebCore::CachedResource::load):
1458 * loader/cache/CachedResource.h:
1459 (WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):
1460 * loader/cache/CachedResourceLoader.cpp:
1461 (WebCore::createResource):
1462 (WebCore::CachedResourceLoader::requestImage):
1463 (WebCore::CachedResourceLoader::requestFont):
1464 (WebCore::CachedResourceLoader::requestTextTrack):
1465 (WebCore::CachedResourceLoader::requestCSSStyleSheet):
1466 (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1467 (WebCore::CachedResourceLoader::requestScript):
1468 (WebCore::CachedResourceLoader::requestXSLStyleSheet):
1469 (WebCore::CachedResourceLoader::requestSVGDocument):
1470 (WebCore::CachedResourceLoader::requestLinkResource):
1471 (WebCore::CachedResourceLoader::requestMedia):
1472 (WebCore::CachedResourceLoader::requestIcon):
1473 (WebCore::CachedResourceLoader::requestRawResource):
1474 (WebCore::CachedResourceLoader::requestBeaconResource):
1475 (WebCore::CachedResourceLoader::requestMainResource):
1476 (WebCore::CachedResourceLoader::requestResource):
1477 (WebCore::CachedResourceLoader::preload):
1478 * loader/cache/CachedResourceLoader.h:
1479 * loader/cache/KeepaliveRequestTracker.cpp: Added.
1480 (WebCore::KeepaliveRequestTracker::~KeepaliveRequestTracker):
1481 (WebCore::KeepaliveRequestTracker::canLoadRequest):
1482 (WebCore::KeepaliveRequestTracker::registerRequest):
1483 (WebCore::KeepaliveRequestTracker::responseReceived):
1484 (WebCore::KeepaliveRequestTracker::notifyFinished):
1485 (WebCore::KeepaliveRequestTracker::unregisterRequest):
1486 * loader/cache/KeepaliveRequestTracker.h: Added.
1487 * platform/network/FormData.cpp:
1488 (WebCore::FormDataElement::lengthInBytes const):
1489 (WebCore::FormData::lengthInBytes const):
1490 * platform/network/FormData.h:
1492 2017-08-15 Darin Adler <darin@apple.com>
1494 REGRESSION(r220052): http/tests/appcache/deferred-events-delete-while-raising-timer.html is crashing.
1495 https://bugs.webkit.org/show_bug.cgi?id=175107
1497 Reviewed by Alexey Proskuryakov.
1499 * loader/FrameLoader.cpp:
1500 (WebCore::FrameLoader::checkLoadComplete): Moved the assertion to after the null page check.
1502 2017-08-15 Commit Queue <commit-queue@webkit.org>
1504 Unreviewed, rolling out r219504.
1505 https://bugs.webkit.org/show_bug.cgi?id=175580
1507 Broke Arabic text shaping (Requested by mcatanzaro on
1512 "[HarfBuzz] Decomposed Vietnamese characters are rendered
1514 https://bugs.webkit.org/show_bug.cgi?id=174418
1515 http://trac.webkit.org/changeset/219504
1517 2017-08-14 Carlos Garcia Campos <cgarcia@igalia.com>
1519 WebDriver: handle click events on option elements
1520 https://bugs.webkit.org/show_bug.cgi?id=174710
1521 <rdar://problem/33459305>
1523 Reviewed by Brian Burg.
1525 Export WebCore symbols required by WebKit layer.
1527 * html/HTMLOptGroupElement.h:
1528 * html/HTMLOptionElement.h:
1530 2017-08-14 Simon Fraser <simon.fraser@apple.com>
1532 Remove Proximity Events and related code
1533 https://bugs.webkit.org/show_bug.cgi?id=175545
1535 Reviewed by Daniel Bates.
1537 No platform enables Proximity Events, so remove code inside ENABLE(PROXIMITY_EVENTS)
1538 and other related code.
1541 * Configurations/FeatureDefines.xcconfig:
1542 * DerivedSources.cpp:
1543 * Modules/proximity/DeviceProximityClient.h: Removed.
1544 * Modules/proximity/DeviceProximityController.cpp: Removed.
1545 * Modules/proximity/DeviceProximityController.h: Removed.
1546 * Modules/proximity/DeviceProximityEvent.cpp: Removed.
1547 * Modules/proximity/DeviceProximityEvent.h: Removed.
1548 * Modules/proximity/DeviceProximityEvent.idl: Removed.
1550 * dom/EventNames.in:
1551 * history/PageCache.cpp:
1552 (WebCore::canCachePage):
1553 * page/DOMWindow.cpp:
1554 (WebCore::DOMWindow::addEventListener):
1555 (WebCore::DOMWindow::removeEventListener):
1556 (WebCore::DOMWindow::removeAllEventListeners):
1557 * page/DOMWindow.idl:
1558 * page/DiagnosticLoggingKeys.cpp:
1559 (WebCore::DiagnosticLoggingKeys::deviceProximityKey): Deleted.
1560 * page/DiagnosticLoggingKeys.h:
1561 * testing/Internals.cpp:
1562 (WebCore::Internals::setDeviceProximity): Deleted.
1563 * testing/Internals.h:
1564 * testing/Internals.idl:
1566 2017-08-14 Simon Fraser <simon.fraser@apple.com>
1568 Remove ENABLE(REQUEST_AUTOCOMPLETE) code, which was disabled everywhere
1569 https://bugs.webkit.org/show_bug.cgi?id=175504
1571 Reviewed by Sam Weinig.
1573 REQUEST_AUTOCOMPLETE was added in r133396 then removed in r148731, but brought back in r173596,
1574 however no further work was done, and it was left disabled. So remove the code.
1576 * Configurations/FeatureDefines.xcconfig:
1577 * DerivedSources.make:
1578 * WebCore.xcodeproj/project.pbxproj:
1579 * dom/AutocompleteErrorEvent.h: Removed.
1580 * dom/AutocompleteErrorEvent.idl: Removed.
1581 * dom/EventNames.in:
1582 * dom/GlobalEventHandlers.idl:
1583 * html/HTMLFormElement.cpp:
1584 (WebCore::HTMLFormElement::HTMLFormElement):
1585 (WebCore::HTMLFormElement::requestAutocomplete): Deleted.
1586 (WebCore::HTMLFormElement::finishRequestAutocomplete): Deleted.
1587 (WebCore::HTMLFormElement::requestAutocompleteTimerFired): Deleted.
1588 * html/HTMLFormElement.h:
1589 * html/HTMLFormElement.idl:
1590 * loader/EmptyClients.cpp:
1591 * loader/FrameLoaderClient.h:
1593 2017-08-14 Chris Dumez <cdumez@apple.com>
1595 XHR should only fire an abort event if the cancellation was requested by the client
1596 https://bugs.webkit.org/show_bug.cgi?id=175546
1598 Reviewed by Youenn Fablet.
1600 XHR should only fire an abort event if the cancellation was requested by the client, otherwise it should fire an error event.
1601 Blink and Gecko already match the specification.
1604 - https://xhr.spec.whatwg.org/#handle-errors
1605 - https://xhr.spec.whatwg.org/#the-abort()-method
1607 Test: http/tests/navigation/page-cache-xhr-in-pagehide.html
1609 * xml/XMLHttpRequest.cpp:
1610 (WebCore::XMLHttpRequest::open):
1611 (WebCore::XMLHttpRequest::abort):
1612 (WebCore::XMLHttpRequest::abortError):
1613 (WebCore::XMLHttpRequest::didFail):
1614 * xml/XMLHttpRequest.h:
1616 2017-08-14 Simon Fraser <simon.fraser@apple.com>
1618 Remove ENABLE_VIEW_MODE_CSS_MEDIA and related code
1619 https://bugs.webkit.org/show_bug.cgi?id=175557
1621 Reviewed by Jon Lee.
1623 No port cares about the ENABLE(VIEW_MODE_CSS_MEDIA) feature, so remove it.
1625 * Configurations/FeatureDefines.xcconfig:
1626 * css/CSSValueKeywords.in:
1627 * css/MediaFeatureNames.h:
1628 * css/MediaQueryEvaluator.cpp:
1629 (WebCore::viewModeEvaluate): Deleted.
1630 * css/MediaQueryExpression.cpp:
1631 (WebCore::featureWithValidIdent):
1632 (WebCore::isFeatureValidWithoutValue):
1634 (WebCore::Page::stringToViewMode): Deleted.
1635 (WebCore::Page::setViewMode): Deleted.
1637 (WebCore::Page::viewMode const): Deleted.
1639 2017-08-14 Myles C. Maxfield <mmaxfield@apple.com>
1642 https://bugs.webkit.org/show_bug.cgi?id=175382
1644 Reviewed by Simon Fraser.
1646 The syntax is very simple: font-display: auto | block | swap | fallback | optional.
1647 So, parsing support is quite straightfoward.
1649 Test: fast/text/font-display/parse.html
1651 * css/CSSComputedStyleDeclaration.cpp:
1652 (WebCore::ComputedStyleExtractor::propertyValue):
1653 * css/CSSFontFace.cpp:
1654 (WebCore::CSSFontFace::setLoadingBehavior):
1655 * css/CSSFontFace.h:
1656 * css/CSSFontSelector.cpp:
1657 (WebCore::CSSFontSelector::addFontFaceRule):
1658 * css/CSSPrimitiveValueMappings.h:
1659 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1660 (WebCore::CSSPrimitiveValue::operator FontLoadingBehavior const):
1661 * css/CSSProperties.json:
1662 * css/CSSProperty.cpp:
1663 (WebCore::CSSProperty::isDescriptorOnly):
1664 * css/CSSValueKeywords.in:
1665 * css/parser/CSSPropertyParser.cpp:
1666 (WebCore::consumeFontFaceFontDisplay):
1667 (WebCore::CSSPropertyParser::parseFontFaceDescriptor):
1668 * rendering/style/RenderStyleConstants.h:
1670 2017-08-14 Jer Noble <jer.noble@apple.com>
1672 Obj-C exception crash in AVStreamSession when using EME in Private Browsing mode
1673 https://bugs.webkit.org/show_bug.cgi?id=175547
1675 Reviewed by Eric Carlson.
1677 When the storagePath() is empty, do not use those AVStreamSession APIs which require a valid file path to stored
1678 proof-of-key-release data.
1680 Drive-by fix: return emptyString() from HTMLMediaElement::mediaPlayerMediaKeysStorageDirectory() when in Private
1681 Browsing mode, to match the behavior of WebKitMediaKeySession.
1683 * html/HTMLMediaElement.cpp:
1684 (WebCore::HTMLMediaElement::mediaPlayerMediaKeysStorageDirectory const):
1685 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
1686 (WebCore::CDMSessionAVStreamSession::releaseKeys):
1687 (WebCore::CDMSessionAVStreamSession::update):
1688 (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage):
1690 2017-08-14 Andy Estes <aestes@apple.com>
1692 REGRESSION (r220456): Crash in PreviewLoader::shouldCreateForMIMEType() when a ResourceResponse has a null MIME type
1693 https://bugs.webkit.org/show_bug.cgi?id=175548
1694 <rdar://problem/33866206>
1696 Reviewed by Brady Eidson.
1698 New API test: QuickLook.ShouldCreateForMIMEType
1700 * WebCore.xcodeproj/project.pbxproj:
1701 * loader/ios/PreviewLoader.h:
1702 * loader/ios/PreviewLoader.mm:
1703 (WebCore::PreviewLoader::shouldCreateForMIMEType): Check if mimeType is a null String before
1704 calling HashSet::contains().
1706 2017-08-14 Andy Estes <aestes@apple.com>
1708 [Apple Pay] Add support for phonetic contact names
1709 https://bugs.webkit.org/show_bug.cgi?id=175537
1710 <rdar://problem/32002644>
1712 Reviewed by Tim Horton.
1714 * Modules/applepay/ApplePayError.idl: Defined "phoneticName" in ApplePayErrorContactField.
1715 * Modules/applepay/ApplePayPaymentContact.h: Defined phoneticGivenName and phoneticFamilyName
1716 in ApplePayPaymentContact.
1717 * Modules/applepay/ApplePayPaymentContact.idl: Ditto.
1718 * Modules/applepay/ApplePayPaymentRequest.h: Defined PhoneticName in
1719 ApplePayPaymentRequest::ContactField.
1720 * Modules/applepay/ApplePayPaymentRequest.idl: Defined "phoneticName" in ApplePayContactField.
1721 * Modules/applepay/ApplePaySession.cpp:
1722 (WebCore::convertAndValidate): Added a version parameter. Added code to convert
1723 ContactField::PhoneticName, throwing an exception if version is less than 3.
1724 * Modules/applepay/PaymentContact.h: Added a version parameter to fromApplePayPaymentContact().
1725 * Modules/applepay/PaymentRequest.h: Defined phoneticName in PaymentRequest::ContactFields
1726 and defined PhoneticName in PaymentError::ContactField.
1727 * Modules/applepay/cocoa/PaymentContactCocoa.mm:
1728 (WebCore::convert): Added a version parameter. Set a phoneticRepresentation on the
1729 PKContact's name if there are non-empty phonetic names and version is 3 or greater.
1730 (WebCore::PaymentContact::fromApplePayPaymentContact): Passed version to convert().
1732 2017-08-14 Said Abou-Hallawa <sabouhallawa@apple.com>
1734 The none smooth stroke applied to an SVG shape breaks its hit testing
1735 https://bugs.webkit.org/show_bug.cgi?id=175506
1737 Reviewed by Simon Fraser.
1739 Clear RenderSVGShape::m_path when calling RenderSVGRect::updateShapeFromElement().
1740 The m_path will be recalculated when RenderSVGShape::updateShapeFromElement()
1741 is called from RenderSVGRect::shapeDependentStrokeContains().
1743 Test: svg/stroke/stroke-linejoin-click.html
1745 * rendering/svg/RenderSVGRect.cpp:
1746 (WebCore::RenderSVGRect::updateShapeFromElement):
1747 * rendering/svg/RenderSVGShape.h:
1748 (WebCore::RenderSVGShape::clearPath):
1750 2017-08-14 Adrian Perez de Castro <aperez@igalia.com>
1752 [WPE] Implement WebCore::standardUserAgent()
1753 https://bugs.webkit.org/show_bug.cgi?id=175507
1755 Reviewed by Michael Catanzaro.
1757 Remove "_GLIB" from user-agent version macros.
1759 * platform/glib/UserAgentGLib.cpp:
1760 (WebCore::versionForUAString):
1762 2017-08-14 Chris Dumez <cdumez@apple.com>
1764 Unreviewed, rollout r220622 & r220696
1765 https://bugs.webkit.org/show_bug.cgi?id=175482
1766 <rdar://problem/33860695>
1768 Seems to have caused failures on iOS.
1771 * Modules/beacon/NavigatorBeacon.cpp:
1772 (WebCore::NavigatorBeacon::sendBeacon):
1773 * Modules/fetch/FetchBodyOwner.cpp:
1774 (WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
1775 (WebCore::FetchBodyOwner::BlobLoader::didFail):
1776 * Modules/fetch/FetchBodyOwner.h:
1777 * Modules/fetch/FetchLoader.cpp:
1778 (WebCore::FetchLoader::start):
1779 (WebCore::FetchLoader::didFail):
1780 * Modules/fetch/FetchLoaderClient.h:
1781 * Modules/fetch/FetchResponse.cpp:
1782 (WebCore::FetchResponse::BodyLoader::didFail):
1783 * Modules/fetch/FetchResponse.h:
1784 * WebCore.xcodeproj/project.pbxproj:
1785 * loader/DocumentThreadableLoader.cpp:
1786 (WebCore::DocumentThreadableLoader::loadRequest):
1787 * loader/cache/CachedRawResource.cpp:
1788 (WebCore::CachedRawResource::finishLoading):
1789 * loader/cache/CachedResource.cpp:
1790 (WebCore::CachedResource::load):
1791 * loader/cache/CachedResource.h:
1792 (WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):
1793 * loader/cache/CachedResourceLoader.cpp:
1794 (WebCore::createResource):
1795 (WebCore::CachedResourceLoader::requestImage):
1796 (WebCore::CachedResourceLoader::requestFont):
1797 (WebCore::CachedResourceLoader::requestTextTrack):
1798 (WebCore::CachedResourceLoader::requestCSSStyleSheet):
1799 (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1800 (WebCore::CachedResourceLoader::requestScript):
1801 (WebCore::CachedResourceLoader::requestXSLStyleSheet):
1802 (WebCore::CachedResourceLoader::requestSVGDocument):
1803 (WebCore::CachedResourceLoader::requestLinkResource):
1804 (WebCore::CachedResourceLoader::requestMedia):
1805 (WebCore::CachedResourceLoader::requestIcon):
1806 (WebCore::CachedResourceLoader::requestRawResource):
1807 (WebCore::CachedResourceLoader::requestBeaconResource):
1808 (WebCore::CachedResourceLoader::requestMainResource):
1809 (WebCore::CachedResourceLoader::requestResource):
1810 (WebCore::CachedResourceLoader::preload):
1811 * loader/cache/CachedResourceLoader.h:
1812 * loader/cache/KeepaliveRequestTracker.cpp: Removed.
1813 * loader/cache/KeepaliveRequestTracker.h: Removed.
1814 * platform/network/FormData.cpp:
1815 (WebCore::FormData::appendFile):
1816 (WebCore::FormData::appendFileRange):
1817 (WebCore::FormData::appendBlob):
1818 (WebCore::FormData::expandDataStore):
1819 * platform/network/FormData.h:
1821 2017-08-14 Daniel Bates <dabates@apple.com>
1823 [css-ui] Implement caret-color support
1824 https://bugs.webkit.org/show_bug.cgi?id=166572
1825 <rdar://problem/33852589>
1827 Reviewed by David Hyatt.
1829 Add support for the CSS property caret-color as per <https://www.w3.org/TR/css-ui-3/#caret-color> (02 March 2017).
1830 The property caret-color specifies the color of the text insertion caret in an editable element,
1831 say an HTML textarea element.
1833 Unlike other CSS color properties caret-color can have value "auto" and this is its initial
1834 value. Internally we treat value "auto" as an invalid caret color to simplify the code.
1836 Tests: editing/pasteboard/preserve-caret-color.html
1837 fast/css/caret-color-auto.html
1838 fast/css/caret-color-fallback-to-color.html
1839 fast/css/caret-color-inherit.html
1840 fast/css/caret-color-span-inside-editable-parent.html
1841 fast/css/caret-color.html
1842 fast/history/visited-link-caret-color.html
1844 * css/CSSComputedStyleDeclaration.cpp:
1845 (WebCore::ComputedStyleExtractor::propertyValue):
1846 * css/CSSProperties.json: Add property caret-color. We represent the initial "auto" Also, fix up
1847 wording in a comment while I am here.
1848 * css/StyleResolver.cpp:
1849 (WebCore::isValidVisitedLinkProperty): Add caret-color to the list of properties that can be
1850 applied to visited hyperlinks.
1851 * css/parser/CSSParserFastPaths.cpp:
1852 (WebCore::parseCaretColor): Added.
1853 (WebCore::CSSParserFastPaths::maybeParseValue): Unlike other CSS color properties caret-color
1854 can be defined to be "auto". We explicitly check if the property is caret-color and use
1855 parseCaretColor() to parse its value.
1856 * css/parser/CSSPropertyParser.cpp:
1857 (WebCore::consumeCaretColor): Added.
1858 (WebCore::CSSPropertyParser::parseSingleValue): Similar to the change to CSSParserFastPaths::maybeParseValue()
1859 use a dedicated code path to parse caret-color.
1860 * editing/EditingStyle.cpp: Preserve caret-color during editing operations.
1861 * editing/FrameSelection.cpp:
1862 (WebCore::CaretBase::paintCaret const): Modified code to query property caret-color instead of
1863 color for the color of the text insertion caret. Always honor the caret-color of the editable
1864 element if it is valid color. Note that "caret-color: auto" is treated as an invalid color
1865 internally. A caret-color can have an invalid color if its inherits from the CSS color property
1866 with an invalid color. If caret-color is a valid color then we take it to be the color of the
1867 text insertion caret. Otherwise, we do what we do today and use a heuristic to determine the
1868 color of the text-insertion caret.
1869 (WebCore::disappearsIntoBackground): Deleted; moved logic into CaretBase::paintCaret().
1870 * page/animation/CSSPropertyAnimation.cpp:
1871 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Add property wrapper
1872 to support animating caret-color.
1873 * rendering/style/RenderStyle.cpp:
1874 (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline const): Modified to consider
1875 changes to caret color.
1876 (WebCore::RenderStyle::colorIncludingFallback const): Modified to compute the appropriate
1877 color for property caret-color with respect to an unvisited or visited link.
1878 * rendering/style/RenderStyle.h:
1879 (WebCore::RenderStyle::setCaretColor): Added.
1880 (WebCore::RenderStyle::setVisitedLinkCaretColor): Added.
1881 (WebCore::RenderStyle::caretColor const): Added.
1882 (WebCore::RenderStyle::visitedLinkCaretColor const): Added.
1883 * rendering/style/StyleRareInheritedData.cpp:
1884 (WebCore::StyleRareInheritedData::StyleRareInheritedData): Modified to consider caret color.
1885 (WebCore::StyleRareInheritedData::operator== const): Ditto.
1886 * rendering/style/StyleRareInheritedData.h:
1888 2017-08-14 Zan Dobersek <zdobersek@igalia.com>
1890 REGRESSION(r220517-r220521) [GTK] Various compositing tests fail
1891 https://bugs.webkit.org/show_bug.cgi?id=175478
1893 Reviewed by Sergio Villar Senin.
1895 Fix a regression introduced in r220519. Move a framebuffer binding in TextureMapperGL
1896 away from GraphicsContext3D and onto the OpenGL API to work around the framebuffer
1897 binding state that's kept in the GraphicsContext3D class. This mismatch in how the
1898 framebuffer was bound was causing a couple of test failures in compositing tests.
1900 No new tests -- regressed tests have their failure expectations removed.
1902 * platform/graphics/texmap/TextureMapperGL.cpp:
1903 (WebCore::TextureMapperGL::bindDefaultSurface): Don't use GraphicsContext3D for the
1904 glBindFramebuffer() call. This would be done in subsequent patches that would move
1905 TextureMapperGL off the GraphicsContext3D usage, but this specific use case clashes
1906 with the framebuffer binding that's done in BitmapTextureGL and was causing test
1909 2017-08-14 Chris Dumez <cdumez@apple.com>
1911 Unreviewed fix after r220622 to address crashes on iOS.
1913 * loader/cache/CachedRawResource.cpp:
1914 (WebCore::CachedRawResource::finishLoading):
1916 2017-08-14 Antti Koivisto <antti@apple.com>
1918 Factor text autosizing into a class
1919 https://bugs.webkit.org/show_bug.cgi?id=175530
1921 Reviewed by Andreas Kling.
1923 Move the remaining parts out of Document.
1925 * css/StyleBuilderCustom.h:
1926 (WebCore::computeLineHeightMultiplierDueToFontSize):
1928 (WebCore::Document::destroyRenderTree):
1929 (WebCore::Document::textAutoSizing):
1930 (WebCore::TextAutoSizingTraits::constructDeletedValue): Deleted.
1931 (WebCore::TextAutoSizingTraits::isDeletedValue): Deleted.
1932 (WebCore::Document::addAutoSizedNode): Deleted.
1933 (WebCore::Document::updateAutoSizedNodes): Deleted.
1934 (WebCore::Document::clearAutoSizedNodes): Deleted.
1936 * rendering/RenderBlockFlow.cpp:
1937 (WebCore::RenderBlockFlow::adjustComputedFontSizes):
1938 * rendering/RenderElement.cpp:
1939 (WebCore::RenderElement::adjustComputedFontSizesOnBlocks):
1940 (WebCore::RenderElement::resetTextAutosizing):
1941 * rendering/TextAutoSizing.cpp:
1942 (WebCore::TextAutoSizingTraits::constructDeletedValue):
1943 (WebCore::TextAutoSizingTraits::isDeletedValue):
1944 (WebCore::TextAutoSizing::addTextNode):
1945 (WebCore::TextAutoSizing::updateRenderTree):
1946 (WebCore::TextAutoSizing::reset):
1947 * rendering/TextAutoSizing.h:
1949 2017-08-14 Antti Koivisto <antti@apple.com>
1951 [Render Tree Mutation] First letter should not mutate the render tree while in layout.
1952 https://bugs.webkit.org/show_bug.cgi?id=163848
1954 Reviewed by Zalan Bujtas.
1956 RenderBlock::updateFirstLetter shouldn't be called during layout. Instead it should
1957 be invoked by the RenderTreeUpdater.
1959 With this future patches can move updateFirstLetter() and the related functions
1960 completely out of the render tree.
1962 * rendering/RenderBlock.cpp:
1963 (WebCore::RenderBlock::layout):
1965 No more updateFirstLetter calls during layout...
1967 (WebCore::RenderBlock::computePreferredLogicalWidths):
1969 ...or preferred width computation.
1971 (WebCore::RenderBlock::updateFirstLetter):
1972 * rendering/RenderBlock.h:
1973 * rendering/RenderRubyRun.cpp:
1974 (WebCore::RenderRubyRun::updateFirstLetter):
1975 * rendering/RenderRubyRun.h:
1976 * rendering/RenderTable.cpp:
1977 (WebCore::RenderTable::updateFirstLetter):
1978 * rendering/RenderTable.h:
1979 * rendering/svg/RenderSVGText.cpp:
1980 (WebCore::RenderSVGText::updateFirstLetter):
1981 * rendering/svg/RenderSVGText.h:
1982 * style/RenderTreeUpdater.cpp:
1983 (WebCore::RenderTreeUpdater::popParent):
1985 Call updateFirstLetter when closing the element. All of of descedant renderers are known here
1986 so this can be resolved correctly.
1988 2017-08-13 Manuel Rego Casasnovas <rego@igalia.com>
1990 Composition underline color is always black
1991 https://bugs.webkit.org/show_bug.cgi?id=174675
1993 Reviewed by Ryosuke Niwa.
1995 This patch uses the current color of the text instead of black
1996 for the composition underline marker.
1997 This makes it visible in the case we have a black/dark background.
1999 Test: editing/composition-underline-color.html
2001 * editing/CompositionUnderline.h:
2002 (WebCore::CompositionUnderline::CompositionUnderline):
2003 Added new attribute compositionUnderlineColor.
2004 * rendering/InlineTextBox.cpp:
2005 (WebCore::InlineTextBox::paintCompositionUnderline):
2006 Use the text color if compositionUnderlineColor is TextColor.
2008 2017-08-13 Carlos Garcia Campos <cgarcia@igalia.com>
2010 [GTK] stop kinetic scrolling when a zero movement is reached
2011 https://bugs.webkit.org/show_bug.cgi?id=175468
2013 Reviewed by Michael Catanzaro.
2015 This is GTK+ change by Christian Hergert.
2016 https://git.gnome.org/browse/gtk+/commit/?h=gtk-3-22&id=4f63d839550f7a9038b391e7d3e1e6fc8bdfafa6
2018 When the kinetic scrolling reduces its speed, there can be multiple frames where the movement is zero pixels,
2019 followed by a 1 pixel movement later on. This causes a "jitter" right at the end of the scroll which makes it
2020 feel less quality than other platforms. Instead, we should just clamp it as soon as we get a zero movement.
2022 * platform/ScrollAnimationKinetic.cpp:
2023 (WebCore::ScrollAnimationKinetic::PerAxisData::animateScroll):
2025 2017-08-13 Chris Dumez <cdumez@apple.com>
2027 Drop non-const getter for CachedResource::resourceRequest()
2028 https://bugs.webkit.org/show_bug.cgi?id=175524
2030 Reviewed by Youenn Fablet.
2032 Drop non-const getter for CachedResource::resourceRequest(). It would be unsafe to modify the request of a CachedResource
2033 after it has been cached. Exposing such a getter is therefore a footgun.
2035 * loader/LinkLoader.cpp:
2036 (WebCore::LinkLoader::preloadIfNeeded):
2037 * loader/cache/CachedImage.cpp:
2038 (WebCore::CachedImage::CachedImage):
2039 * loader/cache/CachedImage.h:
2040 * loader/cache/CachedResource.cpp:
2041 (WebCore::CachedResource::CachedResource):
2042 * loader/cache/CachedResource.h:
2043 (WebCore::CachedResource::resourceRequest const):
2044 (WebCore::CachedResource::ignoreForRequestCount const):
2045 (WebCore::CachedResource::setIgnoreForRequestCount):
2046 * loader/cache/CachedResourceLoader.cpp:
2047 (WebCore::CachedResourceLoader::requestResource):
2048 * loader/cache/CachedResourceRequest.h:
2049 (WebCore::CachedResourceRequest::ignoreForRequestCount const):
2050 (WebCore::CachedResourceRequest::setIgnoreForRequestCount):
2051 * loader/cache/MemoryCache.cpp:
2052 (WebCore::MemoryCache::addImageToCache):
2053 * platform/network/ResourceRequestBase.h:
2055 2017-08-13 Adrian Perez de Castro <aperez@igalia.com>
2057 [WPE] Implement WebCore::standardUserAgent()
2058 https://bugs.webkit.org/show_bug.cgi?id=175507
2060 Reviewed by Carlos Alberto Lopez Perez.
2062 Implement missing User-Agent handling for the WPE port by sharing the code with the GTK+ port.
2064 * PlatformGTK.cmake: Handlde renaming of UserAgentGtk.cpp to UserAgentGLib.cpp.
2065 * PlatformWPE.cmake: Add UserAgentGLib.cpp and UserAgentQuirks.cpp to the list of built WebCore sources.
2066 * platform/glib/UserAgentGLib.cpp: Renamed from Source/WebCore/platform/gtk/UserAgentGtk.cpp.
2067 (WebCore::versionForUAString): Change "GTK" in UA version macros to "GLIB".
2069 2017-08-11 Ryosuke Niwa <rniwa@webkit.org>
2071 Replace DATA_TRANSFER_ITEMS by a runtime flag and add a stub implementation
2072 https://bugs.webkit.org/show_bug.cgi?id=175474
2073 <rdar://problem/33844628>
2075 Reviewed by Wenson Hsieh.
2077 Replaced the build flag by a runtime flag and added a stub implementation for DataTransferItemList
2078 and DataTransferItem to make it compile. DataTransferItemList is created lazily by DataTransfer.items,
2079 and its lifetime is tied to DataTransfer by forwarding ref and deref.
2081 See https://html.spec.whatwg.org/multipage/dnd.html#the-datatransferitemlist-interface
2083 Tests: editing/pasteboard/datatransfer-idl.html
2086 * Configurations/FeatureDefines.xcconfig:
2087 * WebCore.xcodeproj/project.pbxproj:
2088 * dom/DataTransfer.cpp:
2089 (WebCore::DataTransfer::items): Added. Create DataTransferItemList lazily
2090 * dom/DataTransfer.h:
2091 * dom/DataTransfer.idl:
2092 * dom/DataTransferItem.cpp:
2093 (WebCore::DataTransferItem::DataTransferItem): Added a stub implementation.
2094 (WebCore::DataTransferItem::~DataTransferItem): Ditto.
2095 (WebCore::DataTransferItem::getAsString const): Ditto.
2096 (WebCore::DataTransferItem::getAsFile const): Ditto.
2097 * dom/DataTransferItem.h:
2098 (WebCore::DataTransferItemList): Devirtualized functions.
2099 (WebCore::DataTransferItemList::kind const):
2100 (WebCore::DataTransferItemList::type const):
2101 * dom/DataTransferItem.idl:
2102 * dom/DataTransferItemList.cpp: Added.
2103 (WebCore::DataTransferItemList::length const): Added a stub implementation.
2104 (WebCore::DataTransferItemList::item): Ditto.
2105 (WebCore::DataTransferItemList::add): Ditto.
2106 (WebCore::DataTransferItemList::remove): Ditto.
2107 (WebCore::DataTransferItemList::clear): Ditto.
2108 * dom/DataTransferItemList.h:
2109 (WebCore::DataTransferItemList::DataTransferItemList):
2110 (WebCore::DataTransferItemList::~DataTransferItemList): Deleted.
2111 (WebCore::DataTransferItemList::ref): Forwards to DataTransfer's ref.
2112 (WebCore::DataTransferItemList::deref): Ditto.
2113 * dom/DataTransferItemList.idl: Updated to match the latest specification.
2114 * page/RuntimeEnabledFeatures.h:
2115 (WebCore::RuntimeEnabledFeatures::setDataTransferItemsEnabled): Added.
2116 (WebCore::RuntimeEnabledFeatures::dataTransferItemsEnabled const): Added.
2118 2017-08-11 Brady Eidson <beidson@apple.com>
2120 Move files inside WebCore/workers to WebCore/workers/service.
2121 https://bugs.webkit.org/show_bug.cgi?id=175495
2123 Rubberstamped by Tim Horton.
2126 * DerivedSources.make:
2127 * WebCore.xcodeproj/project.pbxproj:
2129 * workers/service/ServiceWorker.cpp: Renamed from Source/WebCore/workers/ServiceWorker.cpp.
2130 * workers/service/ServiceWorker.h: Renamed from Source/WebCore/workers/ServiceWorker.h.
2131 * workers/service/ServiceWorker.idl: Renamed from Source/WebCore/workers/ServiceWorker.idl.
2132 * workers/service/ServiceWorkerContainer.cpp: Renamed from Source/WebCore/workers/ServiceWorkerContainer.cpp.
2133 * workers/service/ServiceWorkerContainer.h: Renamed from Source/WebCore/workers/ServiceWorkerContainer.h.
2134 * workers/service/ServiceWorkerContainer.idl: Renamed from Source/WebCore/workers/ServiceWorkerContainer.idl.
2135 * workers/service/ServiceWorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/ServiceWorkerGlobalScope.cpp.
2136 * workers/service/ServiceWorkerGlobalScope.h: Renamed from Source/WebCore/workers/ServiceWorkerGlobalScope.h.
2137 * workers/service/ServiceWorkerGlobalScope.idl: Renamed from Source/WebCore/workers/ServiceWorkerGlobalScope.idl.
2138 * workers/service/ServiceWorkerJob.cpp: Renamed from Source/WebCore/workers/ServiceWorkerJob.cpp.
2139 * workers/service/ServiceWorkerJob.h: Renamed from Source/WebCore/workers/ServiceWorkerJob.h.
2140 * workers/service/ServiceWorkerJobClient.h: Renamed from Source/WebCore/workers/ServiceWorkerJobClient.h.
2141 * workers/service/ServiceWorkerProvider.cpp: Renamed from Source/WebCore/workers/ServiceWorkerProvider.cpp.
2142 * workers/service/ServiceWorkerProvider.h: Renamed from Source/WebCore/workers/ServiceWorkerProvider.h.
2143 * workers/service/ServiceWorkerRegistration.cpp: Renamed from Source/WebCore/workers/ServiceWorkerRegistration.cpp.
2144 * workers/service/ServiceWorkerRegistration.h: Renamed from Source/WebCore/workers/ServiceWorkerRegistration.h.
2145 * workers/service/ServiceWorkerRegistration.idl: Renamed from Source/WebCore/workers/ServiceWorkerRegistration.idl.
2146 * workers/service/ServiceWorkerRegistrationOptions.h: Renamed from Source/WebCore/workers/ServiceWorkerRegistrationOptions.h.
2147 * workers/service/ServiceWorkerRegistrationParameters.cpp: Renamed from Source/WebCore/workers/ServiceWorkerRegistrationParameters.cpp.
2148 * workers/service/ServiceWorkerRegistrationParameters.h: Renamed from Source/WebCore/workers/ServiceWorkerRegistrationParameters.h.
2149 * workers/service/ServiceWorkerUpdateViaCache.h: Renamed from Source/WebCore/workers/ServiceWorkerUpdateViaCache.h.
2150 * workers/service/ServiceWorkerUpdateViaCache.idl: Renamed from Source/WebCore/workers/ServiceWorkerUpdateViaCache.idl.
2152 2017-08-11 Chris Dumez <cdumez@apple.com>
2154 Implement quota limitation for keepalive Fetch requests
2155 https://bugs.webkit.org/show_bug.cgi?id=175482
2157 Reviewed by Sam Weinig and Youenn Fablet.
2159 Implement quota limitation for keepalive Fetch requests as per:
2160 - https://fetch.spec.whatwg.org/#http-network-or-cache-fetch (Step 9)
2162 This partly works for Beacon as well, meaning that no Beacon with a body
2163 over 64Kb can be sent. However, we don't keep track about wether or not
2164 beacon loads are inflight or not.
2166 Also update CachedResourceLoader::requestResource() so that the caller
2167 can get a ResourceError when it returns null. This is useful for both
2168 Fetch and Beacon to return better error messages.
2170 Test: http/wpt/beacon/beacon-quota.html
2173 * Modules/beacon/NavigatorBeacon.cpp:
2174 (WebCore::NavigatorBeacon::sendBeacon):
2175 * Modules/fetch/FetchBodyOwner.cpp:
2176 (WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
2177 (WebCore::FetchBodyOwner::BlobLoader::didFail):
2178 * Modules/fetch/FetchBodyOwner.h:
2179 * Modules/fetch/FetchLoader.cpp:
2180 (WebCore::FetchLoader::start):
2181 (WebCore::FetchLoader::didFail):
2182 * Modules/fetch/FetchLoaderClient.h:
2183 * Modules/fetch/FetchResponse.cpp:
2184 (WebCore::FetchResponse::BodyLoader::didFail):
2185 * Modules/fetch/FetchResponse.h:
2186 * WebCore.xcodeproj/project.pbxproj:
2187 * loader/DocumentThreadableLoader.cpp:
2188 (WebCore::DocumentThreadableLoader::loadRequest):
2189 * loader/cache/CachedResource.cpp:
2190 (WebCore::CachedResource::load):
2191 * loader/cache/CachedResource.h:
2192 (WebCore::CachedResource::isMainOrMediaOrIconOrRawResource const):
2193 * loader/cache/CachedResourceLoader.cpp:
2194 (WebCore::createResource):
2195 (WebCore::CachedResourceLoader::requestImage):
2196 (WebCore::CachedResourceLoader::requestFont):
2197 (WebCore::CachedResourceLoader::requestTextTrack):
2198 (WebCore::CachedResourceLoader::requestCSSStyleSheet):
2199 (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
2200 (WebCore::CachedResourceLoader::requestScript):
2201 (WebCore::CachedResourceLoader::requestXSLStyleSheet):
2202 (WebCore::CachedResourceLoader::requestSVGDocument):
2203 (WebCore::CachedResourceLoader::requestLinkResource):
2204 (WebCore::CachedResourceLoader::requestMedia):
2205 (WebCore::CachedResourceLoader::requestIcon):
2206 (WebCore::CachedResourceLoader::requestRawResource):
2207 (WebCore::CachedResourceLoader::requestBeaconResource):
2208 (WebCore::CachedResourceLoader::requestMainResource):
2209 (WebCore::CachedResourceLoader::requestResource):
2210 (WebCore::CachedResourceLoader::preload):
2211 * loader/cache/CachedResourceLoader.h:
2212 * loader/cache/KeepaliveRequestTracker.cpp: Added.
2213 (WebCore::KeepaliveRequestTracker::~KeepaliveRequestTracker):
2214 (WebCore::KeepaliveRequestTracker::canLoadRequest):
2215 (WebCore::KeepaliveRequestTracker::registerRequest):
2216 (WebCore::KeepaliveRequestTracker::responseReceived):
2217 (WebCore::KeepaliveRequestTracker::notifyFinished):
2218 (WebCore::KeepaliveRequestTracker::unregisterRequest):
2219 * loader/cache/KeepaliveRequestTracker.h: Added.
2220 * platform/network/FormData.cpp:
2221 (WebCore::FormDataElement::lengthInBytes const):
2222 (WebCore::FormData::lengthInBytes const):
2223 * platform/network/FormData.h:
2225 2017-08-11 Don Olmstead <don.olmstead@sony.com>
2227 [WTF] Move ValueToString into WTF
2228 https://bugs.webkit.org/show_bug.cgi?id=175469
2230 Reviewed by Sam Weinig.
2232 No new tests. No change in behavior.
2234 * WebCore.xcodeproj/project.pbxproj:
2235 * html/HTMLMediaElement.h:
2236 (WTF::ValueToString<WebCore::TextTrackCue::string):
2237 (WebCore::ValueToString<TextTrackCue::string): Deleted.
2238 (WebCore::ValueToString<MediaTime>::string): Deleted.
2239 * platform/LayoutUnit.h:
2240 (WTF::ValueToString<WebCore::LayoutUnit>::string):
2241 (WebCore::ValueToString<LayoutUnit>::string): Deleted.
2242 * platform/PODInterval.h:
2243 * platform/PODIntervalTree.h:
2244 * platform/PODRedBlackTree.h:
2245 * platform/graphics/FloatPolygon.h:
2246 (WTF::ValueToString<WebCore::FloatPolygonEdge::string):
2247 (WebCore::ValueToString<FloatPolygonEdge::string): Deleted.
2248 * rendering/FloatingObjects.h:
2249 (WTF::ValueToString<WebCore::FloatingObject::string):
2250 (WebCore::ValueToString<FloatingObject::string): Deleted.
2251 * rendering/RenderFlowThread.h:
2252 (WTF::ValueToString<WebCore::RenderRegion::string):
2253 (WebCore::ValueToString<RenderRegion::string): Deleted.
2255 2017-08-11 Sam Weinig <sam@webkit.org>
2257 [Bindings] Simplify DOMPromiseProxy now that WTF::Function can return references
2258 https://bugs.webkit.org/show_bug.cgi?id=175394
2260 Reviewed by Chris Dumez.
2262 * bindings/IDLTypes.h:
2263 (WebCore::IDLWrapper::convertToParameterType): Deleted.
2265 Remove no longer used convertToParameterType.
2267 * bindings/js/DOMPromiseProxy.h:
2269 - Replace Variant<Value, Exception> with ExceptionOr<Value> / ExceptionOr<void>.
2270 - Update ResolveCallback to have a return type of IDLType::ParameterType, rather than
2271 IDLType::ImplementationType, now that WTF::Function supports references as the
2272 return type. This is needed, since the IDLType::ParameterType for an interface T
2277 * css/FontFaceSet.cpp:
2278 * css/FontFaceSet.h:
2280 Update resolve callbacks to return a reference rather than a RefPtr, matching
2281 the new signature requirement.
2283 2017-08-11 Sam Weinig <sam@webkit.org>
2285 [WebIDL] Replace JSCryptoKeyCustom and JSCryptoAlgorithmBuilder with generated code
2286 https://bugs.webkit.org/show_bug.cgi?id=175457
2288 Reviewed by Chris Dumez.
2291 * DerivedSources.make:
2292 * WebCore.xcodeproj/project.pbxproj:
2293 * bindings/js/JSCryptoAlgorithmBuilder.cpp: Removed.
2294 * bindings/js/JSCryptoAlgorithmBuilder.h: Removed.
2295 * bindings/js/JSCryptoKeyCustom.cpp: Removed.
2297 Remove JSCryptoAlgorithmBuilder and JSCryptoKeyCustom, add KeyAlgorithm
2300 * crypto/CryptoKey.cpp:
2301 * crypto/CryptoKey.h:
2302 * crypto/CryptoKey.idl:
2304 Replace custom algorithm attribute with a union of the supported key algorithms.
2306 * crypto/keys/CryptoAesKeyAlgorithm.h: Added.
2307 * crypto/keys/CryptoAesKeyAlgorithm.idl: Added.
2308 * crypto/keys/CryptoEcKeyAlgorithm.h: Added.
2309 * crypto/keys/CryptoEcKeyAlgorithm.idl: Added.
2310 * crypto/keys/CryptoHmacKeyAlgorithm.h: Added.
2311 * crypto/keys/CryptoHmacKeyAlgorithm.idl: Added.
2312 * crypto/keys/CryptoKeyAlgorithm.h: Added.
2313 * crypto/keys/CryptoKeyAlgorithm.idl: Added.
2314 * crypto/keys/CryptoRsaHashedKeyAlgorithm.h: Added.
2315 * crypto/keys/CryptoRsaHashedKeyAlgorithm.idl: Added.
2316 * crypto/keys/CryptoRsaKeyAlgorithm.h: Added.
2317 * crypto/keys/CryptoRsaKeyAlgorithm.idl: Added.
2319 Add IDLs and headers fo the supported key algorithms.
2321 * crypto/keys/CryptoKeyAES.h:
2322 * crypto/keys/CryptoKeyEC.h:
2323 * crypto/keys/CryptoKeyHMAC.h:
2324 * crypto/keys/CryptoKeyRSA.h:
2325 * crypto/keys/CryptoKeyRaw.h:
2327 Give each of the existing KeyAlgorithm subclasses a dictionary() function
2328 that returns the populated corresponding spec'd dictionary.
2330 2017-08-11 Simon Fraser <simon.fraser@apple.com>
2332 Some RenderSVGResource cleanup
2333 https://bugs.webkit.org/show_bug.cgi?id=175494
2335 Reviewed by Zalan Bujtas.
2337 Use more initializers. Remove spurious use of bitfields that didn't save any space at all.
2342 * rendering/svg/RenderSVGResourceContainer.cpp:
2343 (WebCore::RenderSVGResourceContainer::RenderSVGResourceContainer):
2344 * rendering/svg/RenderSVGResourceContainer.h:
2345 * rendering/svg/RenderSVGResourceGradient.cpp:
2346 (WebCore::RenderSVGResourceGradient::RenderSVGResourceGradient):
2347 (WebCore::RenderSVGResourceGradient::applyResource):
2348 * rendering/svg/RenderSVGResourceGradient.h:
2349 * rendering/svg/RenderSVGResourcePattern.cpp:
2350 (WebCore::RenderSVGResourcePattern::RenderSVGResourcePattern):
2351 * rendering/svg/RenderSVGResourcePattern.h:
2352 * rendering/svg/RenderSVGShape.cpp:
2353 (WebCore::RenderSVGShape::fillShape):
2354 (WebCore::RenderSVGShape::strokeShape):
2355 * rendering/svg/SVGRenderingContext.cpp:
2356 (WebCore::SVGRenderingContext::~SVGRenderingContext):
2357 (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2358 * rendering/svg/SVGRenderingContext.h:
2359 (WebCore::SVGRenderingContext::SVGRenderingContext):
2361 2017-08-11 Tim Horton <timothy_horton@apple.com>
2363 Fix the build with modern Clang's -Wexpansion-to-defined
2364 https://bugs.webkit.org/show_bug.cgi?id=175467
2365 <rdar://problem/33667497>
2367 Reviewed by Simon Fraser.
2369 * crypto/mac/SerializedCryptoKeyWrapMac.mm:
2371 2017-08-11 Brady Eidson <beidson@apple.com>
2373 Crash under ServiceWorkerJob::failedWithException.
2374 https://bugs.webkit.org/show_bug.cgi?id=175488
2376 Reviewed by Tim Horton.
2378 Covered by existing tests.
2380 * workers/ServiceWorkerJob.cpp:
2381 (WebCore::ServiceWorkerJob::failedWithException): jobDidFinish might cause the Job to be deleted, so make it last.
2383 2017-08-10 Sam Weinig <sam@webkit.org>
2385 WTF::Function does not allow for reference / non-default constructible return types
2386 https://bugs.webkit.org/show_bug.cgi?id=175244
2388 Reviewed by Chris Dumez.
2390 * bindings/js/JSCustomElementInterface.h:
2391 (WebCore::JSCustomElementInterface::invokeCallback):
2392 Update the default value for the addArguments parameter to be an empty lambda, rather than
2393 default initialization, which leads to a null WTF::Function. This allows us to remove support
2394 for calling null WTF::Function. No change in behavior.
2396 2017-08-11 Antti Koivisto <antti@apple.com>
2398 Remove RenderQuote collection from RenderView
2399 https://bugs.webkit.org/show_bug.cgi?id=175479
2401 Reviewed by Andreas Kling.
2403 We can do it well enough without maintaining this pointer structure.
2405 Global updating doesn't work well with future direction for first-letter and similar anyway.
2406 We need to update quote immediately when updating its style.
2408 * rendering/RenderQuote.cpp:
2409 (WebCore::RenderQuote::insertedIntoTree):
2410 (WebCore::RenderQuote::willBeRemovedFromTree):
2412 Just tell the view that there are renderers to update.
2414 (WebCore::RenderQuote::styleDidChange):
2415 (WebCore::RenderQuote::isOpen const):
2416 (WebCore::RenderQuote::updateRenderer):
2417 (WebCore::RenderQuote::updateRenderers): Deleted.
2419 Update single renderer only. RenderTreeUpdater provides the previous renderer to compute the depth.
2421 * rendering/RenderQuote.h:
2422 * rendering/RenderView.cpp:
2423 (WebCore::RenderView::registerQuote): Deleted.
2424 (WebCore::RenderView::unregisterQuote): Deleted.
2425 (WebCore::RenderView::updateSpecialRenderers): Deleted.
2427 Remove the quote list.
2429 * rendering/RenderView.h:
2430 * style/RenderTreeUpdater.cpp:
2431 (WebCore::RenderTreeUpdater::commit):
2433 Ensure that all quotes are updated.
2435 (WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
2436 (WebCore::RenderTreeUpdater::updateQuotesUpTo):
2438 Traverse render tree to find quotes to update starting from the previous updated quote.
2440 * style/RenderTreeUpdater.h:
2442 2017-08-11 Adrian Perez de Castro <aperez@igalia.com>
2444 [CMake] Many warning about missing “override” keywords in ANGLE with Clang
2445 https://bugs.webkit.org/show_bug.cgi?id=175475
2447 Reviewed by Michael Catanzaro.
2449 * CMakeLists.txt: Add "-Wno-inconsistent-missing-override" to the
2450 compiler flags using for building the ANGLE sources.
2452 2017-08-11 Adrian Perez de Castro <aperez@igalia.com>
2454 [GTK][WPE] Overriden virtual function not marked “override” in ImageBufferDataCairo.h
2455 https://bugs.webkit.org/show_bug.cgi?id=175476
2457 Reviewed by Carlos Garcia Campos.
2459 * platform/graphics/cairo/ImageBufferDataCairo.h: Add missing "override" qualifier.
2461 2017-08-11 Carlos Garcia Campos <cgarcia@igalia.com>
2463 [Soup] Cannot access HTTPS sites using a HTTP proxy that requires authentication
2464 https://bugs.webkit.org/show_bug.cgi?id=175378
2466 Reviewed by Sergio Villar Senin.
2468 Bring back part of the code removed in r206732, to keep a reference to the SoupMessage in the
2469 AuthenticationChallenge since it can be different to the resource message.
2471 * platform/network/soup/AuthenticationChallenge.h:
2472 (WebCore::AuthenticationChallenge::AuthenticationChallenge): Deleted.
2473 (WebCore::AuthenticationChallenge::authenticationClient const): Deleted.
2474 (WebCore::AuthenticationChallenge::soupAuth const): Deleted.
2475 (WebCore::AuthenticationChallenge::setProposedCredential): Deleted.
2476 * platform/network/soup/AuthenticationChallengeSoup.cpp:
2477 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2478 (WebCore::AuthenticationChallenge::platformCompare):
2480 2017-08-10 Dan Bernstein <mitz@apple.com>
2482 Fixed building for macOS 10.12 with the macOS 10.13 SDK.
2484 Suppressed the unguarded-availability-new warning around uses of AVSampleBufferAudioRenderer
2485 and AVSampleBufferRenderSynchronizer. Even though the 10.13 SDK declares them as available
2486 starting in that release, they have been available as SPI earlier.
2488 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2489 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2490 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2491 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample):
2492 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
2493 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
2494 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2495 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2496 (-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
2497 (-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
2498 (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
2499 (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
2500 (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
2501 (WebCore::SourceBufferPrivateAVFObjC::flush):
2503 2017-08-10 Brady Eidson <beidson@apple.com>
2505 Rename the source files for the WTF persistent coders.
2506 https://bugs.webkit.org/show_bug.cgi?id=175441
2508 Reviewed by Tim Horton.
2510 * platform/network/NetworkLoadMetrics.h:
2512 2017-08-10 Yusuke Suzuki <utatane.tea@gmail.com>
2514 Make ThreadGlobalData RefCounted for web thread
2515 https://bugs.webkit.org/show_bug.cgi?id=175439
2517 Reviewed by Mark Lam.
2519 When the web thread is enabled, we share ThreadGlobalData between the web thread and the main thread.
2520 The problem happens when the main thread is dying. It could start deallocating TLS and the web
2521 thread may see the destructed ThreadGlobalData.
2523 Even though, the current implementation is safe because the main thread do not perform TLS deallocation
2524 in the Darwin environment. But this is not true in Windows. And we should not rely on this condition
2525 that depends on the platforms.
2527 In this patch, we make ThreadGlobalData ThreadSafeRefCounted. This type verbosely describes that
2528 ThreadGlobalData could be shared between threads when the web thread enabled. And make the life time
2529 management simple instead of relying on the platform dependent TLS implementation.
2531 * platform/ThreadGlobalData.cpp:
2532 (WebCore::ThreadGlobalData::setWebCoreThreadData):
2533 (WebCore::threadGlobalData):
2534 * platform/ThreadGlobalData.h:
2535 (WebCore::ThreadGlobalData::cachedResourceRequestInitiators): Deleted.
2536 (WebCore::ThreadGlobalData::eventNames): Deleted.
2537 (WebCore::ThreadGlobalData::threadTimers): Deleted.
2538 (WebCore::ThreadGlobalData::qualifiedNameCache): Deleted.
2539 (WebCore::ThreadGlobalData::cachedConverterICU): Deleted.
2540 (WebCore::ThreadGlobalData::cachedConverterTEC): Deleted.
2542 2017-08-10 Yusuke Suzuki <utatane.tea@gmail.com>
2544 [JSC] Use @toNumber in builtins
2545 https://bugs.webkit.org/show_bug.cgi?id=172692
2547 Reviewed by Sam Weinig.
2549 Use @toNumber bytecode intrinsic. It emits op_to_number, which efficiently converts
2550 a given argument to a number.
2552 * Modules/streams/ReadableByteStreamInternals.js:
2553 (privateInitializeReadableByteStreamController):
2554 (readableByteStreamControllerRespond):
2555 * Modules/streams/StreamInternals.js:
2556 (validateAndNormalizeQueuingStrategy):
2557 (enqueueValueWithSize):
2559 2017-08-10 Nan Wang <n_wang@apple.com>
2561 AX: crash at WebCore::AccessibilityObject::supportsARIALiveRegion() const + 24
2562 https://bugs.webkit.org/show_bug.cgi?id=175340
2563 <rdar://problem/33782159>
2565 Reviewed by Chris Fleizach.
2567 The issue here is that we manualy set the parent object of the AccessibilitySVGRoot object
2568 and there are chances that the parent doesn't detach it properly during the parent's destroying
2569 process. Accessing the stale parent object will lead to a crash.
2570 Fixed this by making the parent object a weak pointer so we don't access an invalid memory.
2572 Test: accessibility/add-children-pseudo-element.html
2574 * accessibility/AccessibilityRenderObject.cpp:
2575 (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
2576 * accessibility/AccessibilityRenderObject.h:
2577 (WebCore::AccessibilityRenderObject::createWeakPtr):
2578 * accessibility/AccessibilitySVGRoot.cpp:
2579 (WebCore::AccessibilitySVGRoot::AccessibilitySVGRoot):
2580 (WebCore::AccessibilitySVGRoot::setParent):
2581 (WebCore::AccessibilitySVGRoot::parentObject const):
2582 * accessibility/AccessibilitySVGRoot.h:
2584 2017-08-10 Chris Dumez <cdumez@apple.com>
2586 [Beacon] Do connect-src CSP check on redirects as well
2587 https://bugs.webkit.org/show_bug.cgi?id=175410
2588 <rdar://problem/33815470>
2590 Reviewed by Youenn Fablet.
2592 Pass ContentSecurityPolicy object to createPingHandle so that we can send
2593 enough data to the NetworkProcess so do CSP checks for Ping loads such
2594 as Beacon. For the IPC, we serialize the ContentSecurityPolicy's response
2595 headers. Those headers are now cached in ContentSecurityPolicy for
2596 performance reasons. CSP headers are rarely updated in practice but
2597 sendBeacon() may get called repeatedly for a given document.
2599 Tests: http/wpt/beacon/connect-src-beacon-redirect-allowed.sub.html
2600 http/wpt/beacon/connect-src-beacon-redirect-blocked.sub.html
2602 * loader/LoaderStrategy.h:
2603 * loader/PingLoader.cpp:
2604 (WebCore::PingLoader::loadImage):
2605 (WebCore::PingLoader::sendPing):
2606 (WebCore::PingLoader::sendViolationReport):
2607 (WebCore::PingLoader::startPingLoad):
2608 * loader/PingLoader.h:
2609 * loader/cache/CachedResource.cpp:
2610 (WebCore::CachedResource::load):
2611 * page/csp/ContentSecurityPolicy.cpp:
2612 (WebCore::ContentSecurityPolicy::responseHeaders const):
2613 (WebCore::ContentSecurityPolicy::didReceiveHeader):
2614 * page/csp/ContentSecurityPolicy.h:
2615 * page/csp/ContentSecurityPolicyResponseHeaders.h:
2616 (WebCore::ContentSecurityPolicyResponseHeaders::encode const):
2617 (WebCore::ContentSecurityPolicyResponseHeaders::decode):
2619 2017-08-09 Yusuke Suzuki <utatane.tea@gmail.com>
2621 [WTF] ThreadSpecific should not introduce additional indirection
2622 https://bugs.webkit.org/show_bug.cgi?id=175187
2624 Reviewed by Mark Lam.
2626 We drop ThreadSpecific::replace feature which is only used by
2627 Web thread. Instead, we use ThreadSpecific<std::unique_ptr<T>> here.
2629 While this std::unique_ptr<T> shares one instance between main thread
2630 and web thread, this is the same to the current implementation. It is
2631 safe because the web thread never finishes.
2633 And for non-web thread implementation, we just use ThreadSpecific<T>,
2634 since it is the most efficient.
2636 * platform/ThreadGlobalData.cpp:
2637 (WebCore::ThreadGlobalData::ThreadGlobalData):
2638 (WebCore::ThreadGlobalData::setWebCoreThreadData):
2639 (WebCore::threadGlobalData):
2640 We also drop StringImpl::empty() call since it is not necessary now:
2641 StringImpl::empty data is statically initialized by using constexpr.
2643 * platform/ThreadGlobalData.h:
2644 We make it FAST_ALLOCATED since it is previously allocated by fast malloc
2647 2017-08-10 Michael Catanzaro <mcatanzaro@igalia.com>
2649 REGRESSION(r220515) [GTK][CMake] Build with ENABLE_GEOLOCATION fails on Debian Jessie
2650 https://bugs.webkit.org/show_bug.cgi?id=175426
2652 Reviewed by Carlos Alberto Lopez Perez.
2654 Also stop using GEOCLUE_LIBRARIES and GEOCLUE_INCLUDE_DIRS, since they are empty. Apparently
2655 we have not actually been using the client library at all this whole time, only the D-Bus
2658 * PlatformGTK.cmake:
2660 2017-08-10 Brady Eidson <beidson@apple.com>
2662 Add ServiceWorkerJob.
2663 https://bugs.webkit.org/show_bug.cgi?id=175241
2665 Reviewed by Tim Horton.
2667 Test: http/tests/workers/service/basic-register.html
2669 This patch does a few things:
2670 - Adds the spec concept of a ServiceWorkerJob (in the WebProcess, at least)
2671 - Adds a ServiceWorkerProvider interface for WebKit to implement
2672 - Actually creates a job for service worker registration and "schedules" it,
2673 though it always immediately errors out the promise.
2675 Actually queuing jobs and executing asynchronously is coming up soon.
2678 * WebCore.xcodeproj/project.pbxproj:
2681 (WebCore::Document::sessionID const):
2684 * workers/ServiceWorkerContainer.cpp:
2685 (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
2686 (WebCore::ServiceWorkerContainer::addRegistration):
2687 (WebCore::ServiceWorkerContainer::scheduleJob):
2688 (WebCore::ServiceWorkerContainer::jobDidFinish):
2689 * workers/ServiceWorkerContainer.h:
2691 * workers/ServiceWorkerJob.cpp: Added.
2692 (WebCore::ServiceWorkerJob::ServiceWorkerJob):
2693 (WebCore::ServiceWorkerJob::~ServiceWorkerJob):
2694 (WebCore::ServiceWorkerJob::failedWithException):
2695 * workers/ServiceWorkerJob.h: Copied from Source/WebCore/workers/ServiceWorkerContainer.h.
2696 (WebCore::ServiceWorkerJob::createRegisterJob):
2697 (WebCore::ServiceWorkerJob::identifier const):
2699 * workers/ServiceWorkerJobClient.h: Added.
2700 (WebCore::ServiceWorkerJobClient::~ServiceWorkerJobClient):
2702 * workers/ServiceWorkerProvider.cpp: Added.
2703 (WebCore::ServiceWorkerProvider::singleton):
2704 (WebCore::ServiceWorkerProvider::setSharedProvider):
2705 * workers/ServiceWorkerProvider.h: Added.
2706 * workers/ServiceWorkerRegistrationOptions.h: Copied from Source/WebCore/workers/ServiceWorkerContainer.h.
2707 * workers/ServiceWorkerRegistrationParameters.cpp: Added.
2708 * workers/ServiceWorkerRegistrationParameters.h: Added.
2710 2017-08-10 Tim Horton <timothy_horton@apple.com>
2712 Remove some unused lambda captures so that WebKit builds with -Wunused-lambda-capture
2713 https://bugs.webkit.org/show_bug.cgi?id=175436
2714 <rdar://problem/33667497>
2716 Reviewed by Simon Fraser.
2718 * platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
2719 (PlatformMediaSessionManager::updateSessionState):
2720 * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
2721 (WebCore::WebCoreDecompressionSession::handleDecompressionOutput):
2723 2017-08-10 Commit Queue <commit-queue@webkit.org>
2725 Unreviewed, rolling out r220463.
2726 https://bugs.webkit.org/show_bug.cgi?id=175435
2728 unaccepted fix (Requested by n_wang on #webkit).
2733 WebCore::AccessibilityObject::supportsARIALiveRegion() const +
2735 https://bugs.webkit.org/show_bug.cgi?id=175340
2736 http://trac.webkit.org/changeset/220463
2738 2017-08-10 Michael Catanzaro <mcatanzaro@igalia.com>
2740 Remove ENABLE_GAMEPAD_DEPRECATED
2741 https://bugs.webkit.org/show_bug.cgi?id=175361
2743 Reviewed by Carlos Garcia Campos.
2746 * Configurations/FeatureDefines.xcconfig:
2747 * PlatformGTK.cmake:
2748 * PlatformWPE.cmake:
2749 * platform/Linux.cmake: Removed.
2750 * platform/gamepad/deprecated/Gamepads.h: Removed.
2751 * platform/gamepad/glib/GamepadsGlib.cpp: Removed.
2752 * platform/gamepad/linux/GamepadDeviceLinux.cpp: Removed.
2753 * platform/gamepad/linux/GamepadDeviceLinux.h: Removed.
2755 2017-08-10 Myles C. Maxfield <mmaxfield@apple.com>
2757 Addressing post-review comments after r219173.
2758 https://bugs.webkit.org/show_bug.cgi?id=174149
2762 * css/CSSFontStyleValue.h:
2763 * editing/EditingStyle.cpp:
2764 (WebCore::identifierForStyleProperty):
2766 2017-08-10 Antti Koivisto <antti@apple.com>
2768 Try to fix windows build.
2770 * style/StyleUpdate.h:
2771 (WebCore::Style::TextUpdate::TextUpdate):
2773 2017-08-10 Carlos Garcia Campos <cgarcia@igalia.com>
2775 [GTK] Crashes in WebCore::PasteboardHelper::fillSelectionData when source file of drag is unavailable
2776 https://bugs.webkit.org/show_bug.cgi?id=174161
2778 Reviewed by Xabier Rodriguez-Calvar.
2780 In r219385 we changed the early return in fillSelectionData() to check the selection data length instead of the
2781 data pointer. However, the gtk_selection_data_get_length() can return -1, so we need to check also if the value
2782 less than 0. The case of setting an empty string could be valid depending on the target type, so it's better to
2783 return early only when data lenght is less than 0 and handle the 0 length case in each target.
2785 * platform/gtk/PasteboardHelper.cpp:
2786 (WebCore::PasteboardHelper::fillSelectionData):
2788 2017-08-10 Antti Koivisto <antti@apple.com>
2790 Text renderer updates should be done by RenderTreeUpdater
2791 https://bugs.webkit.org/show_bug.cgi?id=175417
2793 Reviewed by Andreas Kling.
2795 All render tree mutations should be done by RenderTreeUpdater. Currently
2796 Text::updateRendererAfterContentChange calls RenderText::setTextWithOffset directly.
2799 (WebCore::Document::updateTextRenderer):
2805 (WebCore::Text::updateRendererAfterContentChange):
2807 Remove call to setTextWithOffset and pass the range to updateTextRenderer
2809 * style/RenderTreeUpdater.cpp:
2810 (WebCore::RenderTreeUpdater::updateRenderTree):
2811 (WebCore::RenderTreeUpdater::updateTextRenderer):
2813 Call setTextWithOffset here.
2815 * style/RenderTreeUpdater.h:
2816 * style/StyleTreeResolver.cpp:
2817 (WebCore::Style::TreeResolver::resolveComposedTree):
2818 * style/StyleUpdate.cpp:
2819 (WebCore::Style::Update::textUpdate const):
2820 (WebCore::Style::Update::addText):
2822 Add TextUpdate struct similar to ElementUpdate to pass the range to the RenderTreeUpdater.
2824 * style/StyleUpdate.h:
2826 2017-08-10 Zan Dobersek <zdobersek@igalia.com>
2828 Unreviewed GTK+ build fix for ENABLE_GLES2=ON.
2830 * platform/graphics/texmap/TextureMapperGLHeaders.h:
2831 Define various GL constants that are not provided in GLES2 headers
2832 but are only leveraged in OpenGL calls if at runtime the underlying
2833 OpenGL is GLES2-capable.
2835 2017-08-10 Zan Dobersek <zdobersek@igalia.com>
2837 [TexMap] Remove GraphicsContext3D usage from BitmapTexturePool
2838 https://bugs.webkit.org/show_bug.cgi?id=175319
2840 Reviewed by Carlos Garcia Campos.
2842 Drop the GraphicsContext3D reference in BitmapTexturePool now
2843 that the BitmapTextureGL doesn't require it anymore.
2845 No new tests -- no change in behavior.
2847 * platform/graphics/texmap/BitmapTexturePool.cpp:
2848 (WebCore::BitmapTexturePool::BitmapTexturePool):
2849 * platform/graphics/texmap/BitmapTexturePool.h:
2850 * platform/graphics/texmap/TextureMapperGL.cpp:
2851 (WebCore::TextureMapperGL::TextureMapperGL):
2853 2017-08-10 Zan Dobersek <zdobersek@igalia.com>
2855 [TexMap] Drop GraphicsContext3D usage from BitmapTextureGL
2856 https://bugs.webkit.org/show_bug.cgi?id=175317
2858 Reviewed by Carlos Garcia Campos.
2860 Have BitmapTextureGL use direct OpenGL API entrypoints and constants
2861 instead of leveraging the GraphicsContext3D class. Any GraphicsContext3D
2862 object passed to BitmapTextureGL would assume rendering to the GL context
2863 that's current on that thread, translating method invocations to the
2864 OpenGL API. We can do this by ourselves and benefit by avoiding allocating
2865 GraphicsContext3D resources like the ANGLE compiler that are by most useful
2868 BitmapTextureGL::create() call sites are adjusted to stop passing a
2869 GraphicsContext3D reference. BitmapTextureGL::bindAsSurface() doesn't need
2870 a replacement for the passed-in GraphicsContext3D object since that object
2871 originated from the TextureMapperGL instance, whose GraphicsContext3D is by
2872 default of the render-to-current-context nature. Other changes are direct
2873 translations of GraphicsContext3D methods to OpenGL API calls, or of
2874 GraphicsContext3D values to OpenGL API constants.
2876 No new tests -- no change in behavior.
2878 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2879 (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
2880 * platform/graphics/texmap/BitmapTextureGL.cpp:
2881 Also remove an unnecessary GraphicsContext.h header inclusion.
2882 (WebCore::BitmapTextureGL::BitmapTextureGL):
2883 (WebCore::BitmapTextureGL::didReset):
2884 (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
2885 (WebCore::BitmapTextureGL::updateContents):
2886 (WebCore::BitmapTextureGL::initializeStencil):
2887 (WebCore::BitmapTextureGL::initializeDepthBuffer):
2888 (WebCore::BitmapTextureGL::clearIfNeeded):
2889 (WebCore::BitmapTextureGL::createFboIfNeeded):
2890 (WebCore::BitmapTextureGL::bindAsSurface):
2891 (WebCore::BitmapTextureGL::~BitmapTextureGL):
2892 (WebCore::BitmapTextureGL::copyFromExternalTexture):
2893 * platform/graphics/texmap/BitmapTextureGL.h:
2894 (WebCore::BitmapTextureGL::create):
2895 (WebCore::BitmapTextureGL::textureTarget const):
2896 (WebCore::BitmapTextureGL::internalFormat const):
2897 * platform/graphics/texmap/BitmapTexturePool.cpp:
2898 (WebCore::BitmapTexturePool::createTexture):
2899 * platform/graphics/texmap/TextureMapperGL.cpp:
2900 (WebCore::TextureMapperGL::bindSurface):
2901 (WebCore::TextureMapperGL::createTexture):
2903 2017-08-09 Michael Catanzaro <mcatanzaro@igalia.com>
2905 [GTK] Remove support for geoclue1
2906 https://bugs.webkit.org/show_bug.cgi?id=164205
2908 Reviewed by Carlos Garcia Campos.
2910 * PlatformGTK.cmake:
2911 * platform/geoclue/GeolocationProviderGeoclue.h:
2912 * platform/geoclue/GeolocationProviderGeoclue1.cpp: Removed.
2913 * platform/geoclue/GeolocationProviderGeoclue2.cpp: Removed.
2915 2017-08-09 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com>
2917 [PAL] Move spi/cocoa and spi/cg directories into PAL
2918 https://bugs.webkit.org/show_bug.cgi?id=175175
2920 Reviewed by Myles C. Maxfield.
2922 * Modules/applepay/cocoa/PaymentCocoa.mm:
2923 * Modules/applepay/cocoa/PaymentContactCocoa.mm:
2924 * Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm:
2925 * Modules/applepay/cocoa/PaymentMethodCocoa.mm:
2926 * PlatformAppleWin.cmake:
2927 * WebCore.xcodeproj/project.pbxproj:
2928 * editing/cocoa/EditorCocoa.mm:
2929 * editing/cocoa/HTMLConverter.mm:
2930 * editing/ios/EditorIOS.mm:
2931 * page/cocoa/ResourceUsageThreadCocoa.mm:
2932 * page/mac/TextIndicatorWindow.mm:
2933 * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
2934 * platform/cocoa/DataDetectorsCoreSoftLink.h:
2935 * platform/cocoa/MIMETypeRegistryCocoa.mm:
2936 * platform/cocoa/NetworkExtensionContentFilter.mm:
2937 * platform/cocoa/ParentalControlsContentFilter.mm:
2938 * platform/cocoa/SleepDisablerCocoa.cpp:
2939 * platform/graphics/Font.cpp:
2940 * platform/graphics/Font.h:
2941 * platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm:
2942 * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2943 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2944 * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm:
2945 * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:
2946 * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
2947 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2948 * platform/graphics/cg/ColorCG.cpp:
2949 * platform/graphics/cg/GraphicsContextCG.cpp:
2950 * platform/graphics/cg/ImageBufferCG.cpp:
2951 * platform/graphics/cg/ImageBufferDataCG.cpp:
2952 * platform/graphics/cg/ImageDecoderCG.cpp:
2953 * platform/graphics/cg/NativeImageCG.cpp:
2954 * platform/graphics/cocoa/FontCacheCoreText.cpp:
2955 * platform/graphics/cocoa/FontCascadeCocoa.mm:
2956 * platform/graphics/cocoa/FontCocoa.mm:
2957 * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
2958 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2959 * platform/graphics/cocoa/IOSurface.mm:
2960 * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:
2961 * platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h:
2962 * platform/graphics/ios/FontAntialiasingStateSaver.h:
2963 * platform/graphics/ios/FontCacheIOS.mm:
2964 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2965 * platform/graphics/mac/FontCacheMac.mm:
2966 * platform/graphics/mac/GlyphPageMac.cpp:
2967 * platform/graphics/win/FontCacheWin.cpp:
2968 * platform/ios/LegacyTileCache.mm:
2969 * platform/ios/LegacyTileGrid.mm:
2970 * platform/ios/LegacyTileGridTile.mm:
2971 * platform/ios/PlaybackSessionInterfaceAVKit.mm:
2972 * platform/ios/QuickLook.mm:
2973 * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2974 * platform/ios/WebAVPlayerController.h:
2975 * platform/ios/WebAVPlayerController.mm:
2976 * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2977 * platform/ios/wak/WKGraphics.mm:
2978 * platform/mac/DragImageMac.mm:
2979 * platform/mac/PlatformScreenMac.mm:
2980 * platform/mac/PlaybackSessionInterfaceMac.mm:
2981 * platform/mac/ThemeMac.mm:
2982 * platform/mac/VideoFullscreenInterfaceMac.mm:
2983 * platform/mac/WebPlaybackControlsManager.h:
2984 * platform/mac/WebVideoFullscreenHUDWindowController.mm:
2985 * platform/network/cocoa/CookieStorageObserver.mm:
2986 * platform/network/cocoa/NetworkLoadMetrics.mm:
2987 * platform/network/mac/AuthenticationMac.mm:
2988 * platform/network/mac/ResourceHandleMac.mm:
2989 * platform/spi/ios/DataDetectorsUISPI.h:
2990 * platform/spi/mac/DataDetectorsSPI.h:
2991 * platform/spi/mac/NSViewSPI.h:
2992 * rendering/RenderThemeCocoa.mm:
2993 * rendering/RenderThemeIOS.mm:
2994 * rendering/RenderThemeMac.mm:
2996 2017-08-09 Don Olmstead <don.olmstead@sony.com>
2998 [WTF] Move TextStream into WTF
2999 https://bugs.webkit.org/show_bug.cgi?id=175211
3001 Reviewed by Myles C. Maxfield.
3003 No new tests. No change in behavior.
3006 * WebCore.xcodeproj/project.pbxproj:
3007 * dom/ComposedTreeIterator.cpp:
3011 (WebCore::operator<<):
3013 * dom/ViewportArguments.cpp:
3014 * dom/ViewportArguments.h:
3015 * editing/VisiblePosition.cpp:
3016 * editing/VisiblePosition.h:
3017 * editing/VisibleSelection.cpp:
3018 * editing/VisibleSelection.h:
3019 * html/HTMLVideoElement.cpp:
3020 * html/canvas/CanvasRenderingContext2D.cpp:
3021 * page/FrameView.cpp:
3022 * page/ViewportConfiguration.cpp:
3023 * page/ViewportConfiguration.h:
3024 * page/WheelEventDeltaFilter.cpp:
3025 * page/animation/CSSPropertyAnimation.cpp:
3026 * page/scrolling/AsyncScrollingCoordinator.cpp:
3027 * page/scrolling/ScrollingConstraints.cpp:
3028 * page/scrolling/ScrollingConstraints.h:
3029 * page/scrolling/ScrollingCoordinator.cpp:
3030 * page/scrolling/ScrollingCoordinator.h:
3031 * page/scrolling/ScrollingStateFixedNode.cpp:
3032 * page/scrolling/ScrollingStateFixedNode.h:
3033 * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
3034 * page/scrolling/ScrollingStateFrameScrollingNode.h:
3035 * page/scrolling/ScrollingStateNode.cpp:
3036 * page/scrolling/ScrollingStateNode.h:
3037 * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
3038 * page/scrolling/ScrollingStateOverflowScrollingNode.h:
3039 * page/scrolling/ScrollingStateScrollingNode.cpp:
3040 * page/scrolling/ScrollingStateScrollingNode.h:
3041 * page/scrolling/ScrollingStateStickyNode.cpp:
3042 * page/scrolling/ScrollingStateStickyNode.h:
3043 * page/scrolling/ScrollingTree.cpp:
3044 * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
3045 * page/scrolling/ScrollingTreeFrameScrollingNode.h:
3046 * page/scrolling/ScrollingTreeNode.cpp:
3047 * page/scrolling/ScrollingTreeNode.h:
3048 * page/scrolling/ScrollingTreeScrollingNode.cpp:
3049 * page/scrolling/ScrollingTreeScrollingNode.h:
3050 * page/scrolling/mac/ScrollingTreeFixedNode.h:
3051 * page/scrolling/mac/ScrollingTreeFixedNode.mm:
3052 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3053 * page/scrolling/mac/ScrollingTreeStickyNode.h:
3054 * page/scrolling/mac/ScrollingTreeStickyNode.mm:
3055 * platform/CalculationValue.cpp:
3056 * platform/CalculationValue.h:
3057 * platform/LayoutUnit.cpp:
3058 * platform/LayoutUnit.h:
3059 * platform/Length.cpp:
3060 * platform/Length.h:
3061 * platform/LengthBox.cpp:
3062 * platform/LengthBox.h:
3063 * platform/LengthPoint.cpp:
3064 * platform/LengthPoint.h:
3065 * platform/LengthSize.cpp:
3066 * platform/LengthSize.h:
3067 * platform/LogMacros.h:
3068 * platform/ScrollView.cpp:
3069 * platform/ScrollableArea.cpp:
3070 * platform/animation/TimingFunction.cpp:
3071 * platform/animation/TimingFunction.h:
3072 * platform/graphics/BitmapImage.cpp:
3073 * platform/graphics/BitmapImage.h:
3074 * platform/graphics/Color.cpp:
3075 * platform/graphics/Color.h:
3076 * platform/graphics/CrossfadeGeneratedImage.cpp:
3077 * platform/graphics/CrossfadeGeneratedImage.h:
3078 * platform/graphics/FloatPoint.cpp:
3079 * platform/graphics/FloatPoint.h:
3080 * platform/graphics/FloatPoint3D.cpp:
3081 * platform/graphics/FloatPoint3D.h:
3082 * platform/graphics/FloatRect.cpp:
3083 * platform/graphics/FloatRect.h:
3084 * platform/graphics/FloatRoundedRect.cpp:
3085 * platform/graphics/FloatRoundedRect.h:
3086 * platform/graphics/FloatSize.cpp:
3087 * platform/graphics/FloatSize.h:
3088 * platform/graphics/FontTaggedSettings.cpp:
3089 * platform/graphics/FontTaggedSettings.h:
3090 * platform/graphics/GradientImage.cpp:
3091 (WebCore::GradientImage::dump const):
3092 * platform/graphics/GradientImage.h:
3093 * platform/graphics/GraphicsContext.cpp:
3094 * platform/graphics/GraphicsContext.h:
3095 * platform/graphics/GraphicsLayer.cpp:
3096 * platform/graphics/GraphicsLayer.h:
3097 (WebCore::GraphicsLayer::dumpAdditionalProperties const):
3098 * platform/graphics/GraphicsTypes.cpp:
3099 * platform/graphics/GraphicsTypes.h:
3100 * platform/graphics/Image.cpp:
3101 * platform/graphics/Image.h:
3102 * platform/graphics/ImageSource.h:
3103 * platform/graphics/IntPoint.cpp:
3104 * platform/graphics/IntPoint.h:
3105 * platform/graphics/IntRect.cpp:
3106 * platform/graphics/IntRect.h:
3107 * platform/graphics/IntSize.cpp:
3108 * platform/graphics/IntSize.h:
3109 * platform/graphics/LayoutPoint.cpp:
3110 * platform/graphics/LayoutPoint.h:
3111 * platform/graphics/LayoutRect.cpp:
3112 * platform/graphics/LayoutRect.h:
3113 * platform/graphics/LayoutSize.cpp:
3114 * platform/graphics/LayoutSize.h:
3115 * platform/graphics/NamedImageGeneratedImage.cpp:
3116 * platform/graphics/NamedImageGeneratedImage.h:
3117 * platform/graphics/Path.cpp:
3118 * platform/graphics/Path.h:
3119 * platform/graphics/ca/GraphicsLayerCA.cpp:
3120 * platform/graphics/ca/GraphicsLayerCA.h:
3121 * platform/graphics/ca/PlatformCAAnimation.cpp:
3122 * platform/graphics/ca/PlatformCAAnimation.h:
3123 * platform/graphics/ca/PlatformCALayer.cpp:
3124 * platform/graphics/ca/PlatformCALayer.h:
3125 * platform/graphics/ca/TileController.cpp:
3126 * platform/graphics/ca/TileGrid.cpp:
3127 * platform/graphics/cg/GraphicsContextCG.cpp:
3128 * platform/graphics/cg/PDFDocumentImage.cpp:
3129 * platform/graphics/cg/PDFDocumentImage.h:
3130 * platform/graphics/cocoa/IOSurface.h:
3131 * platform/graphics/cocoa/IOSurface.mm:
3132 * platform/graphics/displaylists/DisplayList.cpp:
3133 (WebCore::DisplayList::DisplayList::description const):
3134 * platform/graphics/displaylists/DisplayList.h:
3135 * platform/graphics/displaylists/DisplayListItems.cpp:
3136 * platform/graphics/displaylists/DisplayListItems.h:
3137 * platform/graphics/displaylists/DisplayListRecorder.cpp:
3138 * platform/graphics/displaylists/DisplayListReplayer.cpp:
3139 * platform/graphics/filters/DistantLightSource.cpp:
3140 * platform/graphics/filters/DistantLightSource.h:
3141 * platform/graphics/filters/FEBlend.cpp:
3142 * platform/graphics/filters/FEBlend.h:
3143 * platform/graphics/filters/FEColorMatrix.cpp:
3144 * platform/graphics/filters/FEColorMatrix.h:
3145 * platform/graphics/filters/FEComponentTransfer.cpp:
3146 * platform/graphics/filters/FEComponentTransfer.h:
3147 * platform/graphics/filters/FEComposite.cpp:
3148 * platform/graphics/filters/FEComposite.h:
3149 * platform/graphics/filters/FEConvolveMatrix.cpp:
3150 * platform/graphics/filters/FEConvolveMatrix.h:
3151 * platform/graphics/filters/FEDiffuseLighting.cpp:
3152 * platform/graphics/filters/FEDiffuseLighting.h:
3153 * platform/graphics/filters/FEDisplacementMap.cpp:
3154 * platform/graphics/filters/FEDisplacementMap.h:
3155 * platform/graphics/filters/FEDropShadow.cpp:
3156 * platform/graphics/filters/FEDropShadow.h:
3157 * platform/graphics/filters/FEFlood.cpp:
3158 * platform/graphics/filters/FEFlood.h:
3159 * platform/graphics/filters/FEGaussianBlur.cpp:
3160 * platform/graphics/filters/FEGaussianBlur.h:
3161 * platform/graphics/filters/FEMerge.cpp:
3162 * platform/graphics/filters/FEMerge.h:
3163 * platform/graphics/filters/FEMorphology.cpp:
3164 * platform/graphics/filters/FEMorphology.h:
3165 * platform/graphics/filters/FEOffset.cpp:
3166 * platform/graphics/filters/FEOffset.h:
3167 * platform/graphics/filters/FESpecularLighting.cpp:
3168 * platform/graphics/filters/FESpecularLighting.h:
3169 * platform/graphics/filters/FETile.cpp:
3170 * platform/graphics/filters/FETile.h:
3171 * platform/graphics/filters/FETurbulence.cpp:
3172 * platform/graphics/filters/FETurbulence.h:
3173 * platform/graphics/filters/FilterEffect.cpp:
3174 * platform/graphics/filters/FilterEffect.h:
3175 * platform/graphics/filters/FilterOperation.cpp:
3176 * platform/graphics/filters/FilterOperation.h:
3177 * platform/graphics/filters/FilterOperations.cpp:
3178 * platform/graphics/filters/FilterOperations.h:
3179 * platform/graphics/filters/LightSource.h:
3180 * platform/graphics/filters/PointLightSource.cpp:
3181 * platform/graphics/filters/PointLightSource.h:
3182 * platform/graphics/filters/SourceAlpha.cpp:
3183 * platform/graphics/filters/SourceAlpha.h:
3184 * platform/graphics/filters/SourceGraphic.cpp:
3185 * platform/graphics/filters/SourceGraphic.h:
3186 * platform/graphics/filters/SpotLightSource.cpp:
3187 * platform/graphics/filters/SpotLightSource.h:
3188 * platform/graphics/transforms/AffineTransform.cpp:
3189 * platform/graphics/transforms/AffineTransform.h:
3190 * platform/graphics/transforms/IdentityTransformOperation.h:
3191 * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
3192 * platform/graphics/transforms/Matrix3DTransformOperation.h:
3193 * platform/graphics/transforms/MatrixTransformOperation.cpp:
3194 * platform/graphics/transforms/MatrixTransformOperation.h:
3195 * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
3196 * platform/graphics/transforms/PerspectiveTransformOperation.h:
3197 * platform/graphics/transforms/RotateTransformOperation.cpp:
3198 * platform/graphics/transforms/RotateTransformOperation.h:
3199 * platform/graphics/transforms/ScaleTransformOperation.cpp:
3200 * platform/graphics/transforms/ScaleTransformOperation.h:
3201 * platform/graphics/transforms/SkewTransformOperation.cpp:
3202 * platform/graphics/transforms/SkewTransformOperation.h:
3203 * platform/graphics/transforms/TransformOperation.cpp:
3204 * platform/graphics/transforms/TransformOperation.h:
3205 * platform/graphics/transforms/TransformOperations.cpp:
3206 * platform/graphics/transforms/TransformOperations.h:
3207 * platform/graphics/transforms/TransformationMatrix.cpp:
3208 * platform/graphics/transforms/TransformationMatrix.h:
3209 * platform/graphics/transforms/TranslateTransformOperation.cpp:
3210 * platform/graphics/transforms/TranslateTransformOperation.h:
3211 * platform/ios/SelectionRect.cpp:
3212 (WebCore::operator<<):
3213 * platform/ios/SelectionRect.h:
3214 * platform/mac/ScrollAnimatorMac.mm:
3215 * platform/text/TextAllInOne.cpp:
3216 * rendering/InlineBox.cpp:
3217 * rendering/InlineBox.h:
3218 * rendering/InlineFlowBox.cpp:
3219 (WebCore::InlineFlowBox::outputLineTreeAndMark const):
3220 * rendering/InlineFlowBox.h:
3221 * rendering/InlineTextBox.cpp:
3222 * rendering/InlineTextBox.h:
3223 * rendering/RenderBlockFlow.cpp:
3224 (WebCore::RenderBlockFlow::outputLineTreeAndMark const):
3225 * rendering/RenderBlockFlow.h:
3226 * rendering/RenderLayer.cpp:
3227 * rendering/RenderLayerCompositor.cpp:
3228 * rendering/RenderObject.cpp:
3229 * rendering/RenderObject.h:
3230 * rendering/RenderTreeAsText.cpp:
3231 * rendering/RenderTreeAsText.h:
3232 * rendering/ScrollAlignment.cpp:
3233 * rendering/ScrollAlignment.h:
3234 * rendering/SimpleLineLayoutCoverage.cpp:
3235 * rendering/SimpleLineLayoutFunctions.cpp:
3236 * rendering/SimpleLineLayoutFunctions.h:
3237 * rendering/style/FillLayer.cpp:
3238 * rendering/style/FillLayer.h:
3239 * rendering/style/NinePieceImage.cpp:
3240 * rendering/style/NinePieceImage.h:
3241 * rendering/style/RenderStyleConstants.cpp:
3242 * rendering/style/RenderStyleConstants.h:
3243 * rendering/svg/SVGRenderTreeAsText.cpp:
3244 (WebCore::operator<<):
3245 * rendering/svg/SVGRenderTreeAsText.h:
3246 (WebCore::operator<<):
3247 * svg/SVGLengthValue.cpp:
3248 * svg/SVGLengthValue.h:
3249 * svg/graphics/SVGImage.cpp:
3250 * svg/graphics/SVGImage.h:
3251 * svg/graphics/filters/SVGFEImage.cpp:
3252 * svg/graphics/filters/SVGFEImage.h:
3254 2017-08-09 Commit Queue <commit-queue@webkit.org>
3256 Unreviewed, rolling out r220466, r220477, and r220487.
3257 https://bugs.webkit.org/show_bug.cgi?id=175411
3259 This change broke existing API tests and follow up fixes did
3260 not resolve all the issues. (Requested by ryanhaddad on
3263 Reverted changesets:
3265 https://bugs.webkit.org/show_bug.cgi?id=175244
3266 http://trac.webkit.org/changeset/220466
3268 "WTF::Function does not allow for reference / non-default
3269 constructible return types"
3270 https://bugs.webkit.org/show_bug.cgi?id=175244
3271 http://trac.webkit.org/changeset/220477
3273 https://bugs.webkit.org/show_bug.cgi?id=175244
3274 http://trac.webkit.org/changeset/220487
3276 2017-08-09 Chris Dumez <cdumez@apple.com>
3278 [Beacon][NetworkSession] Support CORS-preflighting on redirects
3279 https://bugs.webkit.org/show_bug.cgi?id=175386
3280 <rdar://problem/33801370>
3282 Reviewed by Youenn Fablet.
3284 Export a couple of WebCore symbols so I can use them in WebKit2.
3286 Tests: http/wpt/beacon/cors/cors-preflight-redirect-failure.html
3287 http/wpt/beacon/cors/cors-preflight-redirect-from-crossorigin-to-sameorigin.html
3288 http/wpt/beacon/cors/cors-preflight-redirect-success.html
3290 * loader/CrossOriginAccessControl.h:
3291 * page/SecurityOrigin.h:
3293 2017-08-09 Jeremy Jones <jeremyj@apple.com>
3295 Use MPAVRoutingController instead of deprecated versions.
3296 https://bugs.webkit.org/show_bug.cgi?id=175063
3298 Reviewed by Tim Horton.
3300 No new tests because no behavior change. This uses a different platform class to present
3303 Remove deprecated MPAudioVideoRoutingPopoverController and MPAVRoutingSheet
3304 Add MPMediaControlsViewController.
3306 * platform/spi/ios/MediaPlayerSPI.h:
3308 2017-08-09 Myles C. Maxfield <mmaxfield@apple.com>
3310 Mark font-display as in development
3311 https://bugs.webkit.org/show_bug.cgi?id=175387
3317 2017-08-09 Commit Queue <commit-queue@webkit.org>
3319 Unreviewed, rolling out r219334.
3320 https://bugs.webkit.org/show_bug.cgi?id=175398
3322 Caused bug 175023 (Requested by ap on #webkit).
3326 "[SVG] Leak in SVGAnimatedListPropertyTearOff"
3327 https://bugs.webkit.org/show_bug.cgi?id=172545
3328 http://trac.webkit.org/changeset/219334
3330 2017-08-09 Dave Hyatt <hyatt@apple.com>
3332 [Repaint from Layout Removal] Move layer repaint rects into a map
3333 https://bugs.webkit.org/show_bug.cgi?id=175393
3335 Reviewed by Zalan Bujtas.
3337 Move the two repaint rects held by RenderLayer into a RenderLayerModelObject -> RepaintLayoutRects hash map.
3338 RepaintLayoutRects is a new struct that holds both rects.
3340 Eventually more objects than just self painting layers will be caching repaint rects, so this takes a first
3341 step towards having a common cache for these repaint rects. In addition this change saves memory, since
3342 layers that aren't self-painting no longer have empty repaint rects taking up space in RenderLayer.
3344 * rendering/RenderBlockLineLayout.cpp:
3345 (WebCore::RenderBlockFlow::layoutRunsAndFloats):
3346 * rendering/RenderLayer.cpp:
3347 (WebCore::RenderLayer::RenderLayer):
3348 (WebCore::RenderLayer::updateLayerPositions):
3349 (WebCore::RenderLayer::repaintRectIncludingNonCompositingDescendants):
3350 (WebCore::RenderLayer::computeRepaintRects):
3351 (WebCore::RenderLayer::clearRepaintRects):
3352 (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
3353 (WebCore::RenderLayer::scrollTo):
3354 * rendering/RenderLayer.h:
3355 * rendering/RenderLayerModelObject.cpp:
3356 (WebCore::RepaintLayoutRects::RepaintLayoutRects):
3357 (WebCore::RenderLayerModelObject::willBeDestroyed):
3358 (WebCore::RenderLayerModelObject::destroyLayer):
3359 (WebCore::RenderLayerModelObject::styleDidChange):
3360 (WebCore::RenderLayerModelObject::hasRepaintLayoutRects):
3361 (WebCore::RenderLayerModelObject::setRepaintLayoutRects):
3362 (WebCore::RenderLayerModelObject::clearRepaintLayoutRects):
3363 (WebCore::RenderLayerModelObject::repaintLayoutRects):
3364 (WebCore::RenderLayerModelObject::computeRepaintLayoutRects):
3365 * rendering/RenderLayerModelObject.h:
3366 (WebCore::RepaintLayoutRects::RepaintLayoutRects):
3368 2017-08-09 Sam Weinig <sam@webkit.org>
3370 WTF::Function does not allow for reference / non-default constructible return types
3371 https://bugs.webkit.org/show_bug.cgi?id=175244
3373 Reviewed by Chris Dumez.
3375 * bindings/js/JSCustomElementInterface.h:
3376 (WebCore::JSCustomElementInterface::invokeCallback):
3377 Update the default value for the addArguments parameter to be an empty lambda, rather than
3378 default initialization, which leads to a null WTF::Function. This allows us to remove support
3379 for calling null WTF::Function. No change in behavior.
3381 2017-08-09 Brady Eidson <beidson@apple.com>
3383 Teach ScriptExecutionContexts about their SessionID.
3384 https://bugs.webkit.org/show_bug.cgi?id=175391
3386 Reviewed by Andy Estes.
3388 No new tests (No current change in behavior).
3390 Turns out that Workers need to know their SessionID for future feature development.
3391 So let's teach it to them.
3393 * dom/ScriptExecutionContext.h: Expose a pure virtual SessionID accessor.
3396 (WebCore::Document::sessionID const):
3399 * page/SessionID.cpp:
3400 (WebCore::SessionID::isolatedCopy const):
3403 * workers/DedicatedWorkerGlobalScope.cpp:
3404 (WebCore::DedicatedWorkerGlobalScope::create):
3405 (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
3406 * workers/DedicatedWorkerGlobalScope.h:
3408 * workers/DedicatedWorkerThread.cpp:
3409 (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
3410 (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
3411 * workers/DedicatedWorkerThread.h:
3413 * workers/Worker.cpp:
3414 (WebCore::Worker::notifyFinished):
3416 * workers/WorkerGlobalScope.cpp:
3417 (WebCore::WorkerGlobalScope::WorkerGlobalScope):
3418 * workers/WorkerGlobalScope.h:
3420 * workers/WorkerGlobalScopeProxy.h:
3422 * workers/WorkerMessagingProxy.cpp:
3423 (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
3424 * workers/WorkerMessagingProxy.h:
3426 * workers/WorkerThread.cpp:
3427 (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
3428 (WebCore::WorkerThread::WorkerThread):
3429 (WebCore::WorkerThread::workerThread):
3430 * workers/WorkerThread.h: