Timeline



Sep 17, 2018:

11:36 PM Changeset in webkit [236102] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebKit

Unreviewed build fix after r236101.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::flushAndDestroyPersistentStore):
Correct a BinarySemaphore::wait() call which now accepts no arguments.

10:47 PM Changeset in webkit [236101] by yusukesuzuki@slowstart.org
  • 28 edits
    1 add in trunk

[WTF] Use Semaphore and BinarySemaphore instead of dispatch_semaphore_t
https://bugs.webkit.org/show_bug.cgi?id=185339

Patch by Yusuke Suzuki <Yusuke Suzuki> on 2018-09-17
Reviewed by Mark Lam.

Source/WebCore:

  • fileapi/ThreadableBlobRegistry.cpp:

(WebCore::ThreadableBlobRegistry::blobSize):

  • platform/cocoa/NetworkExtensionContentFilter.h:
  • platform/cocoa/NetworkExtensionContentFilter.mm:

(WebCore::NetworkExtensionContentFilter::initialize):
(WebCore::NetworkExtensionContentFilter::willSendRequest):
(WebCore::NetworkExtensionContentFilter::responseReceived):
(WebCore::NetworkExtensionContentFilter::addData):
(WebCore::NetworkExtensionContentFilter::finishedAddingData):
(WebCore::NetworkExtensionContentFilter::handleDecision):
Use per-function BinarySemaphore instead of holding it in NetworkExtensionContentFilter's field.

  • platform/glib/FileMonitorGLib.cpp:

(WebCore::FileMonitor::FileMonitor):
(WebCore::FileMonitor::~FileMonitor):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange):
(WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
Use BinarySemaphore. And remove unused dispatch_semaphore_t.

  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]):
(-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]):
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
(WebCore::SourceBufferPrivateAVFObjC::abort):
(WebCore::SourceBufferPrivateAVFObjC::setCDMSession):
(WebCore::SourceBufferPrivateAVFObjC::setCDMInstance):
Use Box<Semaphore> and Box<BinarySemaphore>.

  • platform/graphics/cocoa/WebCoreDecompressionSession.h:
  • platform/graphics/cocoa/WebCoreDecompressionSession.mm:

(WebCore::WebCoreDecompressionSession::WebCoreDecompressionSession):
Remove unused dispatch_semaphore_t.

  • platform/network/cf/ResourceHandleCFNet.cpp:

(WebCore::ResourceHandle::platformLoadResourceSynchronously):

  • platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:

(WebCore::getRunLoop):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate initWithHandle:messageQueue:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate detachHandle]):
(-[WebCoreResourceHandleAsOperationQueueDelegate dealloc]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
(-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]):
Use BinarySemaphore instead.

Source/WebKit:

  • Platform/IPC/Connection.cpp:

(IPC::Connection::SyncMessageState::wait):

  • Shared/mac/SecItemShim.cpp:

(WebKit::sendSecItemRequest):
Use BinarySemaphore.

  • UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:

(WebKit::ResourceLoadStatisticsPersistentStorage::finishAllPendingWorkSynchronously):

  • UIProcess/WebStorage/StorageManager.cpp:

(WebKit::StorageManager::applicationWillTerminate):

  • UIProcess/ios/WKActionSheetAssistant.mm:

(appLinkForURL):
Use BinarySemaphore to wait for async completion handler. We also fix memory leak
since the old code does not call dispatch_release for the used semaphore.

Source/WTF:

This patch adds WTF::Semaphore, which is based on WTF::Lock and WTF::Condition.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/Semaphore.h: Added.

(WTF::Semaphore::Semaphore):
(WTF::Semaphore::signal):
(WTF::Semaphore::waitUntil):
(WTF::Semaphore::waitFor):
(WTF::Semaphore::wait):

  • wtf/generic/WorkQueueGeneric.cpp:

(WorkQueue::platformInitialize):

  • wtf/threads/BinarySemaphore.cpp:

(WTF::BinarySemaphore::waitUntil):
(WTF::BinarySemaphore::wait): Deleted.

  • wtf/threads/BinarySemaphore.h:

(WTF::BinarySemaphore::waitFor):
(WTF::BinarySemaphore::wait):
Align the names of the functions to WTF::Condition.
Add BinarySemaphore::wait(), which is the same to waitUntil(WallTime::infinity()).

Tools:

  • TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp:

(TestWebKitAPI::ToUpperConverter::stopProducing):
(TestWebKitAPI::ToUpperConverter::stopConsuming):

9:14 PM Changeset in webkit [236100] by Simon Fraser
  • 7 edits in trunk

Many modern media control tests leak documents in testing
https://bugs.webkit.org/show_bug.cgi?id=189437

Reviewed by Darin Adler.
Source/WebCore:

In order to accurately detect leaks in media controls tests which use lots of
SVGImages, we have to:

  • Fire a zero-delay timer after the postTask, in order for ImagesLoader's m_derefElementTimer to clear references to elements.
  • Have releaseCriticalMemory() call CachedResourceLoader's garbageCollectDocumentResources() to drop the last handle to the CachedResource for an SVGImage.
  • Call WKBundleReleaseMemory() after the GC and timer, since we need garbageCollectDocumentResources() to run again after that timer has fired.

This should fix most of the spurious leak reports involving SVGImage documents.

  • page/MemoryRelease.cpp:

(WebCore::releaseCriticalMemory):

Source/WebKit:

In order to accurately detect leaks in media controls tests which use lots of
SVGImages, we have to:

  • Fire a zero-delay timer after the postTask, in order for ImagesLoader's m_derefElementTimer to clear references to elements.
  • Have releaseCriticalMemory() call CachedResourceLoader's garbageCollectDocumentResources() to drop the last handle to the CachedResource for an SVGImage.
  • Call WKBundleReleaseMemory() after the GC and timer, since we need garbageCollectDocumentResources() to run again after that timer has fired.

This should fix most of the spurious leak reports involving SVGImage documents.

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageCallAfterTasksAndTimers):
(WKBundlePagePostTask): Deleted.

  • WebProcess/InjectedBundle/API/c/WKBundlePage.h:

Tools:

In order to accurately detect leaks in media controls tests which use lots of
SVGImages, we have to:

  • Fire a zero-delay timer after the postTask, in order for ImagesLoader's m_derefElementTimer to clear references to elements.
  • Have releaseCriticalMemory() call CachedResourceLoader's garbageCollectDocumentResources() to drop the last handle to the CachedResource for an SVGImage.
  • Call WKBundleReleaseMemory() after the GC and timer, since we need garbageCollectDocumentResources() to run again after that timer has fired.

This should fix most of the spurious leak reports involving SVGImage documents.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::reportLiveDocuments):
(WTR::InjectedBundle::didReceiveMessageToPage):

7:54 PM Changeset in webkit [236099] by Fujii Hironori
  • 3 edits in trunk/Source/WebKitLegacy/win

[Win][Clang][WebKitLegacy] error: cannot pass object of non-trivial type through variadic function
https://bugs.webkit.org/show_bug.cgi?id=189612

Reviewed by Alex Christensen.

Non-trivial types can't be used as aruguments of LOG_ERROR and
ASSERT_WITH_MESSAGE.

  • DefaultPolicyDelegate.cpp:

(DefaultPolicyDelegate::unableToImplementPolicyWithError): Apply
static_cast<BSTR> to convert BString.

  • WebLocalizableStrings.cpp:

(copyLocalizedStringFromBundle): Convert 'key' from WTF::String to
char* by using 'key.utf8().data()'.

6:42 PM Changeset in webkit [236098] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit

Try to fix Apple internal builds with the iOS 12.0 SDK.

  • Configurations/WebKit.xcconfig: Disable framework header postprocessing for iOS 12.0.
6:01 PM Changeset in webkit [236097] by Ryan Haddad
  • 2 edits
    1 delete in trunk/Source/WebKit

Unreviewed, rolling out r236092 because it breaks internal builds. Also, remove stray '+' character from ChangeLog file.

  • Scripts/copy-webcontent-resources-to-private-headers.sh: Removed.
  • WebKit.xcodeproj/project.pbxproj:
5:54 PM Changeset in webkit [236096] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Layout Test legacy-animation-engine/animations/play-state-in-shorthand.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=185651

Unreviewed test gardening.

  • platform/mac/TestExpectations: Mark test as flaky.
5:31 PM Changeset in webkit [236095] by Justin Fan
  • 2538 edits in trunk/LayoutTests

Updated expected test [ PASS ] messages for new test-harness format for webgl tests
https://bugs.webkit.org/show_bug.cgi?id=189677

Reviewed by Dean Jackson.

Update generate-webgl-tests.py's test expectation template
for my new version of webgl-test-harness.js for the webgl 2 suite,
and update all webgl/2.0.0 test expectations to match.

  • webgl/resources/webgl-expectation-template.txt:
  • webgl/2.0.0/.../*expected.txt: Modified all *expected.txts to match.
4:24 PM Changeset in webkit [236094] by jer.noble@apple.com
  • 15 edits
    9 adds in trunk

Add support for HEVC codec types in Media Capabilities
https://bugs.webkit.org/show_bug.cgi?id=189565

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/hevc-codec-parameters.html

Add some utility methods for parsing HEVC codec strings, and using those parsed
values to query the platform for detailed support for HEVC decoding.

Drive-by fix: Modify MediaEngineConfigurationFactory to allow for null function
pointers in the encode/decode factory pair.

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/cocoa/VideoToolboxSoftLink.cpp:
  • platform/cocoa/VideoToolboxSoftLink.h:
  • platform/graphics/HEVCUtilities.cpp: Added.

(WebCore::parseHEVCCodecParameters):

  • platform/graphics/HEVCUtilities.h: Added.
  • platform/graphics/cocoa/HEVCUtilitiesCocoa.cpp: Added.

(WebCore::validateHEVCParameters):

  • platform/graphics/cocoa/HEVCUtilitiesCocoa.h: Added.
  • platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp: Added.

(WebCore::videoCodecTypeFromRFC4281Type):
(WebCore::createMediaPlayerDecodingConfigurationCocoa):

  • platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.h: Added.
  • platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:

(WebCore::factories):
(WebCore::MediaEngineConfigurationFactory::createDecodingConfiguration):
(WebCore::MediaEngineConfigurationFactory::createEncodingConfiguration):

  • testing/Internals.cpp:

(WebCore::Internals::parseHEVCCodecParameters):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WTF:

Extract the toIntegralType template into its own header.

  • wtf/CMakeLists.txt:
  • wtf/text/StringConversion.h: Added.

(isCharacterAllowedInBase):
(toIntegralType):

  • wtf/text/WTFString.cpp:

LayoutTests:

  • media/hevc-codec-parameters-expected.txt: Added.
  • media/hevc-codec-parameters.html: Added.
4:21 PM Changeset in webkit [236093] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Build fix after https://trac.webkit.org/changeset/236070
https://bugs.webkit.org/show_bug.cgi?id=189635
<rdar://problem/44361849>

Unreviewed.
Fix for iOS internal builds.

  • Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:

(-[RTCVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):

4:00 PM Changeset in webkit [236092] by achristensen@apple.com
  • 2 edits
    1 add in trunk/Source/WebKit

+2018-08-17 Ben Richards <benton_richards@apple.com>

Add script to generate WebContent service resource files and change XPC service main SPI to have it's own header
https://bugs.webkit.org/show_bug.cgi?id=188601

Reviewed by Dan Bernstein.

Added a script to the process entitlements build phase of the WebContent service that copies resource
files to WebKit.framework/PrivateHeaders/CustomWebContentResources. These resource files are to
be used by clients who would like to make a custom WebContent service.

  • Scripts/copy-webcontent-resources-to-private-headers.sh: Added.
  • WebKit.xcodeproj/project.pbxproj:
3:43 PM Changeset in webkit [236091] by Devin Rousso
  • 16 edits in trunk

Web Inspector: generate CSSKeywordCompletions from backend values
https://bugs.webkit.org/show_bug.cgi?id=189041

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/CSS.json:

Include an optional aliases array and inherited boolean for CSSPropertyInfo.

Source/WebCore:

Modified existing test inspector/css/getSupportedCSSProperties.html.

  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::getSupportedCSSProperties):
Send alias and longhand information for all properties, and any known keyword values for
those applicable. This makes use of CSSParserFastPaths::isValidKeywordPropertyAndValue to
determine if a given keyword is a valid value for each property. This only generates a list
for properties who have no non-keyword values.

  • css/makeprop.pl:
  • css/makevalues.pl:

Create additional helper functions/constants for retrieving strings of each CSS keyword.

  • css/CSSProperty.h:

(WebCore::CSSProperty::aliasesForProperty):

  • css/CSSPrimitiveValue.cpp:

(WebCore::valueName):

  • css/CSSValuePool.cpp:

(WebCore::CSSValuePool::CSSValuePool):
(WebCore::CSSValuePool::createIdentifierValue):

Source/WebInspectorUI:

Moves the longhands map to WI.CSSKeywordCompletions for more global access. Creates an
aliases map to support completions on aliases with the same values as the non-alias name.
Removes all keyword-only properties from WI.CSSKeywordCompletions._propertyKeywordMap as
they are now generated by the backend (kept for compatibility).

  • UserInterface/Models/CSSCompletions.js:

(WI.CSSCompletions):
(WI.CSSCompletions.requestCSSCompletions.propertyNamesCallback):
(WI.CSSCompletions.prototype.isShorthandPropertyName):

  • UserInterface/Models/CSSKeywordCompletions.js:

(WI.CSSKeywordCompletions.forProperty.addKeywordsForName): Added.
(WI.CSSKeywordCompletions.forProperty):
(WI.CSSKeywordCompletions.addCustomCompletions):

  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.isInheritedPropertyName):

LayoutTests:

  • inspector/css/getSupportedCSSProperties-expected.txt:
  • inspector/css/getSupportedCSSProperties.html:
3:22 PM Changeset in webkit [236090] by youenn@apple.com
  • 5 edits
    2 adds in trunk

track.onmute isn't called for a remote MediaStreamTrack when its counter part track is removed from the peer connection
https://bugs.webkit.org/show_bug.cgi?id=176281
<rdar://problem/44525674>

Reviewed by Eric Carlson.

Source/WebCore:

Listen to libwebrtc remove track callbacks.
Implement handling as per https://w3c.github.io/webrtc-pc/#process-remote-track-removal.
This triggers a mute event on the track.

Test: webrtc/remove-track.html

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::removeRemoteTrack):
(WebCore::LibWebRTCMediaEndpoint::OnRemoveTrack):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::LibWebRTCPeerConnectionBackend::shouldOfferAllowToReceive const):
Drive by fix: Plan B code path does not mandate having an rtc backend for each sender.

LayoutTests:

  • webrtc/remove-track-expected.txt: Added.
  • webrtc/remove-track.html: Added.
3:21 PM Changeset in webkit [236089] by sbarati@apple.com
  • 4 edits
    1 add in trunk

We must convert ProfileType to CheckStructureOrEmpty instead of CheckStructure
https://bugs.webkit.org/show_bug.cgi?id=189676
<rdar://problem/39682897>

Reviewed by Michael Saboff.

JSTests:

  • typeProfiler/check-structure-or-empty-in-fixup.js: Added.

(A):
(K):
(i.catch):

Source/JavaScriptCore:

Because the incoming value may be TDZ, CheckStructure may end up crashing.
Since the Type Profile does not currently record TDZ values in any of its
data structures, this is not a semantic change in how it will show you data.
It just fixes crashes when we emit a CheckStructure and the incoming value
is TDZ.

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToCheckStructureOrEmpty):

3:05 PM Changeset in webkit [236088] by Simon Fraser
  • 5 edits in trunk/Source

Add more Fullscreen logging
https://bugs.webkit.org/show_bug.cgi?id=189656

Reviewed by Jer Noble.

Add some fullscreen logging so I can tell whether WebFullScreenManager ever releases
the fullscreen element.

Source/WebCore:

  • platform/cocoa/VideoFullscreenModelVideoElement.mm:

(VideoFullscreenModelVideoElement::VideoFullscreenModelVideoElement):
(VideoFullscreenModelVideoElement::~VideoFullscreenModelVideoElement):
(VideoFullscreenModelVideoElement::setVideoElement):

Source/WebKit:

  • WebProcess/FullScreen/WebFullScreenManager.cpp:

(WebKit::WebFullScreenManager::WebFullScreenManager):
(WebKit::WebFullScreenManager::videoControlsManagerDidChange):
(WebKit::WebFullScreenManager::setPIPStandbyElement):
(WebKit::WebFullScreenManager::enterFullScreenForElement):
(WebKit::WebFullScreenManager::exitFullScreenForElement):
(WebKit::WebFullScreenManager::willEnterFullScreen):
(WebKit::WebFullScreenManager::didEnterFullScreen):
(WebKit::WebFullScreenManager::willExitFullScreen):
(WebKit::WebFullScreenManager::didExitFullScreen):
(WebKit::WebFullScreenManager::close):

  • WebProcess/FullScreen/WebFullScreenManager.h:
3:05 PM Changeset in webkit [236087] by Simon Fraser
  • 7 edits in trunk/Source/WebCore

Add support for dumping the GraphicsLayer tree via notifyutil
https://bugs.webkit.org/show_bug.cgi?id=189639

Reviewed by Zalan Bujtas.

Make "notifyutil -p com.apple.WebKit.showGraphicsLayerTree" work. It dumps the GraphicsLayer tree
for each top-level document (GraphicsLayers are connected across frame boundaries, so this prints
the entire tree for each main frame).

It uses WTFLogAlways rather than fprintf() so output shows on all platforms (other tree dumps should
be converted in the same way).

  • page/mac/PageMac.mm:

(WebCore::Page::platformInitialize):

  • platform/graphics/GraphicsLayer.cpp:

(showGraphicsLayerTree):

  • rendering/RenderLayerCompositor.cpp:

(showGraphicsLayerTreeForCompositor):

  • rendering/RenderLayerCompositor.h:
  • rendering/RenderObject.cpp:

(WebCore::printGraphicsLayerTreeForLiveDocuments):

  • rendering/RenderObject.h:
2:59 PM Changeset in webkit [236086] by timothy_horton@apple.com
  • 4 edits in trunk/Source/WebKit

Swipe snapshot can get stuck if swiping is disabled while it is visible
https://bugs.webkit.org/show_bug.cgi?id=189667
<rdar://problem/40367780>

Reviewed by Simon Fraser.

If navigation gestures are disabled while a swipe snapshot is visible,
WKWebView will tear down the ViewGestureController, which means that
the SnapshotRemovalTracker will no longer be around to ever remove
the snapshot.

It's currently very hard to write a test for this because we have
yet to come up with a good mechanism for testing swiping on iOS.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView setAllowsBackForwardNavigationGestures:]):
Instead of tearing down the ViewGestureController when navigation
gestures are disabled, just set a bit on it that disables gestures.

  • UIProcess/Cocoa/ViewGestureController.cpp:

(WebKit::ViewGestureController::canSwipeInDirection const):

  • UIProcess/Cocoa/ViewGestureController.h:

(WebKit::ViewGestureController::setSwipeGestureEnabled):
(WebKit::ViewGestureController::isSwipeGestureEnabled):
Add a bit to ViewGestureController that makes starting new gestures
always fail, but allows e.g. snapshots from existing swipes to continue
their usual behavior.

2:41 PM Changeset in webkit [236085] by chris.reid@sony.com
  • 5 edits in trunk/Source/WebCore

[Curl] Add schema version and enable auto vacuum for cookie database.
https://bugs.webkit.org/show_bug.cgi?id=189669

Reviewed by Alex Christensen.

Turning on auto incremental vacuuming and adding versioning to the database. Right now we
reset tables if there's an unknown schema or if the none is set. There is placeholder logic
in place to upgrade databases as the schema changes in the future.

Tested by checking the database manually after launching MiniBrowser.

  • platform/network/curl/CookieJarDB.cpp:

(WebCore::CookieJarDB::openDatabase):
(WebCore::CookieJarDB::verifySchemaVersion):
(WebCore::CookieJarDB::deleteAllTables):
(WebCore::CookieJarDB::createPrepareStatement):
(WebCore::CookieJarDB::getPrepareStatement):
(WebCore::CookieJarDB::executeSimpleSql):

  • platform/network/curl/CookieJarDB.h:
  • platform/network/curl/NetworkStorageSessionCurl.cpp:

(WebCore::defaultSession):

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::SQLiteDatabase::turnOnIncrementalAutoVacuum): fixed a bug.

2:14 PM Changeset in webkit [236084] by david_fenton@apple.com
  • 2 edits in trunk/LayoutTests

Fixed typo in TestExpectations file.
https://bugs.webkit.org/show_bug.cgi?id=188020.

Unreviewed test gardening.

Patch by Dawei Fenton <realdawei@apple.com> on 2018-09-17

  • platform/ios/TestExpectations:
2:07 PM Changeset in webkit [236083] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Re-order Node flags based on semantics
https://bugs.webkit.org/show_bug.cgi?id=189643

Reviewed by Simon Fraser.

Re-ordered Node flags based on their category and subclasses of Node which use them.

  • dom/Node.h:
1:50 PM Changeset in webkit [236082] by mitz@apple.com
  • 7 copies
    1 add in releases/Apple/watchOS 5.0

Added a tag for watchOS 5.0.

1:50 PM Changeset in webkit [236081] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/iOS 12.0

Added a tag for iOS 12.0.

1:50 PM Changeset in webkit [236080] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari 12.0

Added a tag for Safari 12.0.

1:36 PM Changeset in webkit [236079] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Expose WKWebProcess.h as a private header
https://bugs.webkit.org/show_bug.cgi?id=189636

  • WebKit.xcodeproj/project.pbxproj:
12:39 PM Changeset in webkit [236078] by Simon Fraser
  • 4 edits in trunk/Source/WebCore

Add more ResourceLoading logging, particularly in MemoryCache code
https://bugs.webkit.org/show_bug.cgi?id=189651

Reviewed by Tim Horton.

Adding more logging to the ResourceLoading log channel, which I found useful
when trying to understand cached SVGImage lifetimes (bug 189437).

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::deleteIfPossible):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::garbageCollectDocumentResources):

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::add):
(WebCore::MemoryCache::pruneLiveResourcesToSize):
(WebCore::MemoryCache::pruneDeadResources):
(WebCore::MemoryCache::pruneDeadResourcesToSize):
(WebCore::MemoryCache::remove):
(WebCore::MemoryCache::dumpLRULists const):

11:57 AM Changeset in webkit [236077] by jer.noble@apple.com
  • 9 edits
    1 move
    2 deletes in trunk

Enable USE_MEDIAREMOTE on iOS
https://bugs.webkit.org/show_bug.cgi?id=189096

Reviewed by Eric Carlson.

Source/WebCore:

Migrate to using MediaRemote.framework on iOS from MediaPlayer.framework. This unifies the
Now Playing implementation on iOS and Mac.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/cocoa/MediaSessionManagerCocoa.cpp: Removed.
  • platform/audio/cocoa/MediaSessionManagerCocoa.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm: Renamed from Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm.

(PlatformMediaSessionManager::sharedManager):
(PlatformMediaSessionManager::sharedManagerIfExists):
(MediaSessionManagerCocoa::updateSessionState):
(MediaSessionManagerCocoa::beginInterruption):
(MediaSessionManagerCocoa::scheduleUpdateNowPlayingInfo):
(MediaSessionManagerCocoa::sessionWillBeginPlayback):
(MediaSessionManagerCocoa::sessionDidEndRemoteScrubbing):
(MediaSessionManagerCocoa::removeSession):
(MediaSessionManagerCocoa::sessionWillEndPlayback):
(MediaSessionManagerCocoa::clientCharacteristicsChanged):
(MediaSessionManagerCocoa::sessionCanProduceAudioChanged):
(MediaSessionManagerCocoa::nowPlayingEligibleSession):
(MediaSessionManagerCocoa::updateNowPlayingInfo):

  • platform/audio/ios/MediaSessionManagerIOS.h:

(): Deleted.

  • platform/audio/ios/MediaSessionManagerIOS.mm:

(WebCore::MediaSessionManageriOS::nowPlayingEligibleSession): Deleted.
(WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Deleted.
(WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): Deleted.
(WebCore::MediaSessionManageriOS::removeSession): Deleted.
(WebCore::MediaSessionManageriOS::sessionWillEndPlayback): Deleted.
(WebCore::MediaSessionManageriOS::clientCharacteristicsChanged): Deleted.

  • platform/audio/mac/MediaSessionManagerMac.h: Removed.

Source/WTF:

  • wtf/Platform.h:
11:49 AM Changeset in webkit [236076] by youenn@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

Enable VCP for iOS and reenable it for MacOS
https://bugs.webkit.org/show_bug.cgi?id=189635
<rdar://problem/43621029>

Unreviewed, build fix for iOS simulator.

  • Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h:
11:45 AM Changeset in webkit [236075] by commit-queue@webkit.org
  • 9 edits
    4 adds in trunk/Source/WebKit

Expose XPCServiceMain in a WebProcess header rather than WKProcessPool
https://bugs.webkit.org/show_bug.cgi?id=189636

Patch by Alex Christensen <achristensen@webkit.org> on 2018-09-17
Reviewed by Dan Bernstein.

Fix a few build failures along the way.

  • PluginProcess/mac/PluginControllerProxyMac.mm:

(WebKit::PluginControllerProxy::windowAndViewFramesChanged):
(WebKit::PluginControllerProxy::updateLayerHostingContext):

  • PluginProcess/mac/PluginProcessMac.mm:

(WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error):
(WebKit::PluginProcess::platformInitializeProcess):

  • Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
  • Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:

(WebKit::XPCServiceMain):
(main):

  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/WKProcessPool.mm:

(+[WKProcessPool _webContentProcessXPCMain]): Deleted.

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/API: Added.
  • WebProcess/API/Cocoa: Added.
  • WebProcess/API/Cocoa/WKWebProcess.cpp: Added.

(WKWebProcessMain):

  • WebProcess/API/Cocoa/WKWebProcess.h: Added.
  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:

(-[WKAccessibilityWebPageObject convertScreenPointToRootView:]):
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):

11:24 AM Changeset in webkit [236074] by commit-queue@webkit.org
  • 6 edits in trunk/Source

Build error in ImageBufferCG when compiled with IOSurfacePool
https://bugs.webkit.org/show_bug.cgi?id=189579

Patch by Frederic Wang <fwang@igalia.com> on 2018-09-17
Reviewed by Tim Horton.

IOSurface.h might be included with different value of IOSURFACE_CANVAS_BACKING_STORE, causing
compilation errors when files in the same unified source do not agree on the definition.
This patch moves the definition of IOSURFACE_CANVAS_BACKING_STORE from ImageBufferDataCG.h
to Platform.h so that IOSURFACE_CANVAS_BACKING_STORE is set to the same value in all files.
Finally some minors changes to explicitly declare/define ImageBuffer are performed in order
to prevent future issues with Unified build rotating.

Source/WebCore:

No new tests, behavior unchanged.

  • html/HTMLCanvasElement.cpp: Explicitly include ImageBuffer.h since it's used in this file.
  • platform/graphics/cg/ImageBufferDataCG.h: Move definition into Platform.h.
  • platform/graphics/cocoa/IOSurface.h: Forward-declare ImageBuffer since it's used in this

header.

Source/WTF:

  • wtf/Platform.h: Move definition from ImageBufferDataCG.h.
11:19 AM Changeset in webkit [236073] by Basuke Suzuki
  • 12 edits in trunk

[Curl] Respond with requested authentication scheme for authentication challenge.
https://bugs.webkit.org/show_bug.cgi?id=189318

Reviewed by Alex Christensen.

Source/WebCore:

Curl port depends on libcurl's authentication handling by enabling CURLAUTH_ANY. With this
mode, the round-trip communication between the client and the server is handled by libcurl
internally. That's okay for many cases. But when initial request has a credentials
(i.e. XMLHttpRequest), there's no valid chance to store credential to the storage because
the returned response is not 401.

Passes following tests:

  • http/tests/websocket/tests/hybi/httponly-cookie.pl
  • http/tests/websocket/tests/hybi/secure-cookie-insecure-connection.pl
  • http/tests/websocket/tests/hybi/secure-cookie-secure-connection.pl
  • http/tests/xmlhttprequest/basic-auth-default.html
  • http/tests/xmlhttprequest/cross-origin-authorization.html
  • http/tests/xmlhttprequest/logout.html
  • http/tests/xmlhttprequest/null-auth.php
  • http/tests/xmlhttprequest/re-login-async.html
  • http/tests/xmlhttprequest/re-login.html
  • http/tests/xmlhttprequest/redirect-credentials-responseURL.html
  • http/tests/xmlhttprequest/remember-bad-password.html
  • platform/network/ResourceHandle.h:
  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::setHttpAuthUserPass):
(WebCore::CurlHandle::enableHttpAuthentication): Deleted.

  • platform/network/curl/CurlContext.h:
  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::setAuthenticationScheme):
(WebCore::CurlRequest::setupTransfer):

  • platform/network/curl/CurlRequest.h:
  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::getCredential):
(WebCore::ResourceHandle::restartRequestWithCredential):
(WebCore::ResourceHandle::platformLoadResourceSynchronously):
(WebCore::ResourceHandle::continueAfterWillSendRequest):

Source/WebKit:

Curl port depends on libcurl's authentication handling by enabling CURLAUTH_ANY. With this
mode, the round-trip communication between the client and the server is handled by libcurl
internally. That's okay for many cases. But when initial request has a credentials
(i.e. XMLHttpRequest), there's no valid chance to store credential to the storage because
the returned response is not 401.

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::NetworkDataTaskCurl):
(WebKit::NetworkDataTaskCurl::willPerformHTTPRedirection):
(WebKit::NetworkDataTaskCurl::tryHttpAuthentication):
(WebKit::NetworkDataTaskCurl::tryProxyAuthentication):
(WebKit::NetworkDataTaskCurl::restartWithCredential):

  • NetworkProcess/curl/NetworkDataTaskCurl.h:

LayoutTests:

  • platform/wincairo/TestExpectations:
10:37 AM Changeset in webkit [236072] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

[Web Animations] Positive delays of accelerated animations are not respected
https://bugs.webkit.org/show_bug.cgi?id=189411
<rdar://problem/44151416>

Reviewed by Dean Jackson.

Use a mask over the animated rectangle to allow for a 1px rounding error when seeking to fix flakiness.

  • webanimations/accelerated-animation-with-delay-and-seek-expected.html:
  • webanimations/accelerated-animation-with-delay-and-seek.html:
10:18 AM Changeset in webkit [236071] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Clear pending resource load statistics' writes after tests
https://bugs.webkit.org/show_bug.cgi?id=189632
<rdar://problem/44469275>

Patch by Woodrow Wang <woodrow_wang@apple.com> on 2018-09-17
Reviewed by Chris Dumez.

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreStatisticsResetToConsistentState):

10:15 AM Changeset in webkit [236070] by youenn@apple.com
  • 20 edits in trunk

Enable VCP for iOS and reenable it for MacOS
https://bugs.webkit.org/show_bug.cgi?id=189635
<rdar://problem/43621029>

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Make sure VCP API is used to set encoding session parameters.

  • Source/webrtc/sdk/WebKit/VideoProcessingSoftLink.h:
  • Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoEncoderH264.mm:

(-[RTCVideoEncoderH264 resetCompressionSessionWithPixelFormat:]):

  • Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/helpers.cc:
  • Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/helpers.h:

Source/WebCore:

Covered by exsiting and modified tests.
Instead of using libwebrtc YUV frames for black frames, use CVPixelBuffer to make it efficient.
Add internal API to know whether VCP is enabled so as to make capture-webrtc test pass on all platforms.

  • platform/mediastream/RealtimeOutgoingVideoSource.cpp:

(WebCore::RealtimeOutgoingVideoSource::sendBlackFramesIfNeeded):

  • platform/mediastream/RealtimeOutgoingVideoSource.h:
  • platform/mediastream/gstreamer/RealtimeOutgoingVideoSourceLibWebRTC.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:

(WebCore::createBlackPixelBuffer):
(WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferFromVideoFrame):

  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:

(WebCore::RealtimeOutgoingVideoSourceCocoa::createBlackFrame):

  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
  • testing/Internals.cpp:

(WebCore::Internals::supportsVCPEncoder):

  • testing/Internals.h:
  • testing/Internals.idl:

LayoutTests:

  • platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html:

For platforms suppporting VCP, arbitrary size should be supported.

  • webrtc/routines.js:
10:15 AM Changeset in webkit [236069] by Chris Dumez
  • 19 edits in trunk

PSON: window.open() with 'noopener' should only process-swap cross-site, not cross-origin
https://bugs.webkit.org/show_bug.cgi?id=189602
<rdar://problem/44430549>

Reviewed by Geoff Garen.

Source/WebCore:

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::setTriggeringAction):

  • loader/DocumentLoader.h:
  • loader/FrameLoadRequest.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::loadDifferentDocumentItem):
Move NavigationAction's opener setting to loadWithNavigationAction() as this is a better bottleneck.
Otherwise, we'd have to set it at several call sites. Also move the NavigationAction around instead
of copying it.

  • loader/FrameLoader.h:

(WebCore::FrameLoader::loadWithNavigationAction):

  • loader/NavigationAction.h:

(WebCore::NavigationAction::setShouldOpenExternalURLsPolicy):

  • loader/PolicyChecker.cpp:

(WebCore::PolicyChecker::checkNavigationPolicy):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createWindow):

Source/WebKit:

The following fixes were made to our process swap on navigation logic:

  • Browsing contexts opened via window.open() with 'noopener' option now only same if they are cross-site, instead of doing a stricter cross-origin check.
  • Support process swapping when opening a new window via <a target="_blank" rel="noopener"> that is cross-site.

In order to support this, the following changes were made:

  • Stop passing a 'isCrossOriginWindowOpenNavigation' flag to the UIProcess when navigating because:
    • This is specific to window.open() and does not apply to other windows opened by DOM
    • This forces the origin check to happens on WebContent process side instead of relying on the one in WebProcessPool in the UIProcess
  • Pass the origin of the requester to the UIProcess when navigating, so that the WebProcessPool can use the requester's host for the cross-site check for the initial navigation in a new window created by DOM.
  • Add 2 flags to WebPageProxy which indicate if the page was created by the DOM and if any provisional loads have been committed. The WebProcessPool uses theses flags to recognize initial loads in new windows created by the DOM, so that it uses the requester's origin for the cross-site check.
  • Shared/NavigationActionData.cpp:

(WebKit::NavigationActionData::encode const):
(WebKit::NavigationActionData::decode):

  • Shared/NavigationActionData.h:
  • UIProcess/API/APINavigation.h:

(API::Navigation::setRequesterOrigin):
(API::Navigation::requesterOrigin const):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::createNewPage):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::setOpenedByDOM):
(WebKit::WebPageProxy::openedByDOM const):
(WebKit::WebPageProxy::hasCommittedAnyProvisionalLoads const):

  • UIProcess/WebProcessPool.cpp:

(WebKit::shouldUseSameProcessBasedOnURLs):
(WebKit::WebProcessPool::processForNavigationInternal):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
10:11 AM Changeset in webkit [236068] by ap@apple.com
  • 4 edits
    2 deletes in trunk

Revert https://trac.webkit.org/r235910, because the new test times out.
Crash under PlatformPopupMenuData::encode when interacting with a select menu that has variable fonts
https://bugs.webkit.org/show_bug.cgi?id=188008

Source/WebKit:

  • Shared/cf/ArgumentCodersCF.cpp:

(IPC::encode):
(IPC::decode):

LayoutTests:

  • fast/text/variations/ipc2-expected.txt: Removed.
  • fast/text/variations/ipc2.html: Removed.
  • platform/mac-wk1/TestExpectations:
10:09 AM Changeset in webkit [236067] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebKit

Refactoring related to Safe Browsing
https://bugs.webkit.org/show_bug.cgi?id=189631

Patch by Alex Christensen <achristensen@webkit.org> on 2018-09-17
Reviewed by Tim Horton.

Make SafeBrowsingResult RefCounted.
Move logic from an unnamed lambda to WebPageProxy::receivedNavigationPolicyDecision.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::beginSafeBrowsingCheck):
(WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Deleted.
(WebKit::WebPageProxy::addPlatformLoadParameters): Deleted.
(WebKit::WebPageProxy::createSandboxExtensionsIfNeeded): Deleted.
(WebKit::WebPageProxy::startDrag): Deleted.
(WebKit::WebPageProxy::setPromisedDataForImage): Deleted.
(WebKit::WebPageProxy::setDragCaretRect): Deleted.
(WebKit::WebPageProxy::platformRegisterAttachment): Deleted.
(WebKit::WebPageProxy::platformCloneAttachment): Deleted.

  • UIProcess/SafeBrowsingResult.h:

(WebKit::SafeBrowsingResult::create):

  • UIProcess/WebFramePolicyListenerProxy.cpp:

(WebKit::WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults):

  • UIProcess/WebFramePolicyListenerProxy.h:
  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::setUpPolicyListenerProxy):

  • UIProcess/WebFrameProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):

  • UIProcess/WebPageProxy.h:
9:54 AM Changeset in webkit [236066] by Darin Adler
  • 17 edits in trunk/Source

Use OpaqueJSString rather than JSRetainPtr inside WebKit
https://bugs.webkit.org/show_bug.cgi?id=189652

Reviewed by Saam Barati.

Source/JavaScriptCore:

  • API/JSCallbackObjectFunctions.h: Removed an uneeded include of

JSStringRef.h.

  • API/JSContext.mm:

(-[JSContext evaluateScript:withSourceURL:]): Use OpaqueJSString::create rather
than JSStringCreateWithCFString, simplifying the code and also obviating the
need for explicit JSStringRelease.
(-[JSContext setName:]): Ditto.

  • API/JSStringRef.cpp:

(JSStringIsEqualToUTF8CString): Use adoptRef rather than explicit JSStringRelease.
It seems that additional optimization is possible, obviating the need to allocate
an OpaqueJSString, but that's true almost everywhere else in this patch, too.

  • API/JSValue.mm:

(+[JSValue valueWithNewRegularExpressionFromPattern:flags:inContext:]): Use
OpaqueJSString::create and adoptRef as appropriate.
(+[JSValue valueWithNewErrorFromMessage:inContext:]): Ditto.
(+[JSValue valueWithNewSymbolFromDescription:inContext:]): Ditto.
(performPropertyOperation): Ditto.
(-[JSValue invokeMethod:withArguments:]): Ditto.
(valueToObjectWithoutCopy): Ditto.
(containerValueToObject): Ditto.
(valueToString): Ditto.
(objectToValueWithoutCopy): Ditto.
(objectToValue): Ditto.

Source/WebCore:

  • Modules/plugins/QuickTimePluginReplacement.mm:

(WebCore::jsValueWithDictionaryInContext): Use OpaqueJSString::create.
(WebCore::jsValueWithAVMetadataItemInContext): Use adoptCF.

  • platform/mac/SerializedPlatformRepresentationMac.mm:

(WebCore::jsValueWithDictionaryInContext): Use OpaqueJSString::create.

Source/WebKit:

  • Shared/API/c/WKString.cpp: Removed unneeded include of JSStringRef.h.
  • WebProcess/Automation/WebAutomationSessionProxy.cpp: Removed unneeded

include of JSRetainPtr.
(WebKit::toJSString): Deleted.
(WebKit::toJSValue): Use OpaqueJSString::create.
(WebKit::callPropertyFunction): Ditto.
(WebKit::evaluate): Use adoptRef.
(WebKit::evaluateJavaScriptCallback): Ditto.
(WebKit::WebAutomationSessionProxy::scriptObjectForFrame):
Use OpaqueJSString::create.
(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Use
String rather than JSStringRef.

  • WebProcess/Plugins/PDF/PDFPlugin.mm: Removed unneeded includes.

(WebKit::PDFPlugin::runScriptsInPDFDocument): Use OpaqueJSString::create.

Source/WebKitLegacy/ios:

  • WebView/WebPDFViewIOS.mm:

(-[WebPDFView finishedLoadingWithDataSource:]): Use OpaqueJSString::create.

  • WebView/WebPDFViewPlaceholder.mm:

(-[WebPDFViewPlaceholder _evaluateJSForDocument:]): Ditto.

Source/WebKitLegacy/mac:

  • WebView/WebPDFRepresentation.mm:

(-[WebPDFRepresentation finishedLoadingWithDataSource:]): Use OpaqueJSString::create.

9:41 AM Changeset in webkit [236065] by david_fenton@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=188020.

Unreviewed test gardening.

Patch by Dawei Fenton <realdawei@apple.com> on 2018-09-17

  • platform/ios/TestExpectations:
8:04 AM Changeset in webkit [236064] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[WPE] Add new failure

Unreviewed gardening.

  • platform/wpe/TestExpectations:
7:36 AM Changeset in webkit [236063] by Claudio Saavedra
  • 4 edits in trunk/LayoutTests

[GTK][WPE] Update baseline for fast/dom/navigator-detached-no-crash

In GTK it's just a matter of updating the baseline. In WPE
there's some JS output that just needs to be ignored.

  • platform/gtk/TestExpectations:
  • platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt:
  • platform/wpe/TestExpectations:
7:09 AM Changeset in webkit [236062] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[WPE] Mark crashing animations test.

animations/play-state-start-paused.html crashing.
Unreviewed gardening.

  • platform/wpe/TestExpectations:
6:42 AM Changeset in webkit [236061] by Carlos Garcia Campos
  • 7 edits
    1 add in releases/WebKitGTK/webkit-2.22

[JSC] Array.prototype.reverse modifies JSImmutableButterfly
https://bugs.webkit.org/show_bug.cgi?id=188794

Reviewed by Saam Barati.

JSTests:

  • stress/reverse-with-immutable-butterfly.js: Added.

(shouldBe):
(reverseInt):
(reverseDouble):
(reverseContiguous):

Source/JavaScriptCore:

While Array.prototype.reverse modifies the butterfly of the given Array,
it does not account JSImmutableButterfly case. So it accidentally modifies
the content of JSImmutableButterfly.
This patch converts CoW arrays to writable arrays before reversing.

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncReverse):

  • runtime/JSObject.h:

(JSC::JSObject::ensureWritable):

5:45 AM WebKitGTK/2.22.x edited by Adrian Perez de Castro
Add a few items for WPE noted by Pablo Saavedra (diff)
5:23 AM Changeset in webkit [236060] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[WPE] Unmark now passing tests

Unreviewed gardening.

  • platform/wpe/TestExpectations:
5:07 AM Changeset in webkit [236059] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[GTK] Unmark now passing tests.

Unreviewed gardening.

  • platform/gtk/TestExpectations:
5:03 AM Changeset in webkit [236058] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.22/Source

Merge r235355 - Shrink size of XMLHttpRequest
https://bugs.webkit.org/show_bug.cgi?id=188944

Reviewed by Saam Barati.

Source/WebCore:

Shrink the size of XMLHttpRequest by packing bits and reordering members.
It reduces the size from 1248 to 1176.

No behavior change.

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::XMLHttpRequest):
(WebCore::XMLHttpRequest::responseText):
(WebCore::XMLHttpRequest::createResponseBlob):
(WebCore::XMLHttpRequest::createResponseArrayBuffer):
(WebCore::XMLHttpRequest::setResponseType):
(WebCore::XMLHttpRequest::changeState):
(WebCore::XMLHttpRequest::callReadyStateChangeListener):
(WebCore::XMLHttpRequest::setWithCredentials):
(WebCore::XMLHttpRequest::open):
(WebCore::XMLHttpRequest::prepareToSend):
(WebCore::XMLHttpRequest::createRequest):
(WebCore::XMLHttpRequest::abort):
(WebCore::XMLHttpRequest::overrideMimeType):
(WebCore::XMLHttpRequest::setRequestHeader):
(WebCore::XMLHttpRequest::getAllResponseHeaders const):
(WebCore::XMLHttpRequest::getResponseHeader const):
(WebCore::XMLHttpRequest::status const):
(WebCore::XMLHttpRequest::statusText const):
(WebCore::XMLHttpRequest::didFinishLoading):
(WebCore::XMLHttpRequest::createDecoder const):
(WebCore::XMLHttpRequest::didReceiveData):
(WebCore::XMLHttpRequest::didReachTimeout):
(WebCore::XMLHttpRequest::readyState const): Deleted.

  • xml/XMLHttpRequest.h:

(WebCore::XMLHttpRequest::responseType const):
(WebCore::XMLHttpRequest::readyState const):

  • xml/XMLHttpRequestProgressEventThrottle.cpp:

(WebCore::XMLHttpRequestProgressEventThrottle::XMLHttpRequestProgressEventThrottle):

  • xml/XMLHttpRequestProgressEventThrottle.h:

Source/WTF:

StringBuilder is included in XMLHttpRequest. We reduce the size of StringBuilder too
by reordering members.

  • wtf/text/StringBuilder.h:

(WTF::StringBuilder::StringBuilder):

5:03 AM Changeset in webkit [236057] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.22/Source/WebCore

Merge r235345 - Make IDBCursor::m_request a WeakPtr
https://bugs.webkit.org/show_bug.cgi?id=188938

Reviewed by Alex Christensen.

Make m_request a WeakPtr so that if m_request is destroyed, the related cursor will not use the invalid pointer.

Covered by existing tests.

  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::continuePrimaryKey): Other continue and advance methods that are calling uncheckedIterateCursor do check for m_request.
Apply the same check for continuePrimaryKey.
(WebCore::IDBCursor::uncheckedIterateCursor):

  • Modules/indexeddb/IDBCursor.h:

(WebCore::IDBCursor::setRequest):
(WebCore::IDBCursor::clearRequest):
(WebCore::IDBCursor::request):

  • Modules/indexeddb/IDBRequest.h:
5:02 AM Changeset in webkit [236056] by Carlos Garcia Campos
  • 10 edits in releases/WebKitGTK/webkit-2.22/Source/WebCore

Merge r235344 - IDBCursor does not need to be an ActiveDOMObject
https://bugs.webkit.org/show_bug.cgi?id=188937

Reviewed by Alex Christensen.

Remove ActiveDOMObject from IDBCursor IDL.
Update constructors and call sites accordingly.
This allows removing m_outstandingRequestCount and related code in IDBRequest.

Covered by existing tests.

  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::create):
(WebCore::IDBCursor::IDBCursor):
(WebCore::IDBCursor::update):
(WebCore::IDBCursor::uncheckedIterateCursor):
(WebCore::IDBCursor::deleteFunction):
(WebCore::IDBCursor::activeDOMObjectName const): Deleted.
(WebCore::IDBCursor::canSuspendForDocumentSuspension const): Deleted.
(WebCore::IDBCursor::hasPendingActivity const): Deleted.
(WebCore::IDBCursor::decrementOutstandingRequestCount): Deleted.

  • Modules/indexeddb/IDBCursor.h:
  • Modules/indexeddb/IDBCursor.idl:
  • Modules/indexeddb/IDBCursorWithValue.cpp:

(WebCore::IDBCursorWithValue::create):
(WebCore::IDBCursorWithValue::IDBCursorWithValue):

  • Modules/indexeddb/IDBCursorWithValue.h:
  • Modules/indexeddb/IDBCursorWithValue.idl:
  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::setSource):
(WebCore::IDBRequest::dispatchEvent):
(WebCore::IDBRequest::willIterateCursor):
(WebCore::IDBRequest::didOpenOrIterateCursor):

  • Modules/indexeddb/IDBRequest.h:
  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::requestOpenCursor):

  • WebCore.xcodeproj/project.pbxproj:
5:02 AM Changeset in webkit [236055] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/WTF

Merge r235336 - Improve unified source generator script logging and error messages
https://bugs.webkit.org/show_bug.cgi?id=188932

Reviewed by Simon Fraser.

  • Scripts/generate-unified-source-bundles.rb:

Add the ability to explain why you're getting usage() instead of just printing it.
Capitalize log messages, and improve the wording in a few places.

5:02 AM Changeset in webkit [236054] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r235333 - YARR: Update UCS canonicalization tables for Unicode 11
https://bugs.webkit.org/show_bug.cgi?id=188928

Reviewed by Mark Lam.

Generated YarrCanonicalizeUCS2.cpp from YarrCanonicalizeUCS2.js.

This passes JavaScriptCore and test262 tests.

  • yarr/YarrCanonicalizeUCS2.cpp:
  • yarr/YarrCanonicalizeUCS2.js:

(printHeader):

5:02 AM Changeset in webkit [236053] by Carlos Garcia Campos
  • 13 edits
    1 copy
    3 adds in releases/WebKitGTK/webkit-2.22

Merge r235329 - Add getModifierState to MouseEvent
https://bugs.webkit.org/show_bug.cgi?id=188913
<rdar://problem/43668772>

Reviewed by Simon Fraser.

Source/WebCore:

Moved getModifierState from KeyboardEvent to UIEventWithKeyState and exposed it in MouseEvent.
See https://www.w3.org/TR/2016/WD-uievents-20160804/#mouseevent

This patch also fixes the bug that initMouseEvent was not clearing AltGraph and CapsLock states,
which was preserved in the refactoring done in r235158.

Tests: fast/events/constructors/mouse-event-getModifierState.html

fast/events/dblclick-event-getModifierState.html

  • dom/KeyboardEvent.cpp:

(WebCore::KeyboardEvent::getModifierState const): Moved to UIEventWithKeyState.

  • dom/KeyboardEvent.h:
  • dom/KeyboardEvent.idl: Insert a blank line to match the spec's IDL.
  • dom/MouseEvent.idl: Added getModifierState.
  • dom/UIEventWithKeyState.cpp:

(WebCore::UIEventWithKeyState::modifiersFromInitializer): Moved from the header file.
(WebCore::UIEventWithKeyState::getModifierState const):
(WebCore::UIEventWithKeyState::setModifierKeys): Moved from the header file.

  • dom/UIEventWithKeyState.h:

(WebCore::UIEventWithKeyState::modifierKeys const):
(WebCore::UIEventWithKeyState::setModifierKeys): Deleted the variant which didn't take altGraphKey
since that variant behaves same as the one which takes altGraphKey.

LayoutTests:

Added two tests for getModifierState: one manually setting modifier key states in MouseEvent's constructor,
and another one for dblclick inheriting modifier key states from the click event.

Also improved the test coverage for KeyboardEvent's getModifierState.

  • fast/events/constructors/keyboard-event-getModifierState-expected.txt:
  • fast/events/constructors/keyboard-event-getModifierState.html: Added more test cases.
  • fast/events/constructors/mouse-event-getModifierState-expected.txt: Added.
  • fast/events/constructors/mouse-event-getModifierState.html: Added.
  • fast/events/dblclick-event-getModifierState-expected.txt: Added.
  • fast/events/dblclick-event-getModifierState.html: Added.
  • fast/events/init-event-clears-capslock-expected.txt:
  • fast/events/init-event-clears-capslock.html: Added tests for MouseEvent. Note that initMouseEvent doesn't

take altGraphKey boolean unlike initKeyboardEvent.

  • platform/ios/TestExpectations: Skip the dblclick test in iOS since click event isn't supported on iOS.
5:02 AM Changeset in webkit [236052] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r235322 - YARR: JIT RegExps with non-greedy parenthesized sub patterns
https://bugs.webkit.org/show_bug.cgi?id=180876

Reviewed by Filip Pizlo.

Implemented the non-greedy nested parenthesis based on the prior greedy nested parenthesis work.
For the matching code, the greedy path was correct except that we don't try matching for the
non-greedy case. Added a jump out to the term after the parenthesis and a label to perform the
first / next match when we backtrack. The backtracking code needs to check to see if we have
tried the first match or if we can do another match.

Updated the disassembly annotations to include parenthesis capturing info, quantifier type and
count. Did other minor cleanup as well.

Fixed function name typo, added missing 't' in "setUsesPaternContextBuffer()".

Updated the text in some comments, both for this change as well as accuracy for existing code.

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::generate):
(JSC::Yarr::YarrGenerator::backtrack):
(JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern):
(JSC::Yarr::YarrGenerator::compile):
(JSC::Yarr::dumpCompileFailure):
(JSC::Yarr::jitCompile):

  • yarr/YarrJIT.h:

(JSC::Yarr::YarrCodeBlock::setUsesPatternContextBuffer):
(JSC::Yarr::YarrCodeBlock::setUsesPaternContextBuffer): Deleted.

4:23 AM Changeset in webkit [236051] by Michael Catanzaro
  • 3 edits in trunk/Source/WebKit

Unreviewed, fix incorrect WPE build fix made in r236009

This isn't the right place to add the typedef. I failed to notice that the WebKitWebView
type is not actually used anywhere in this header. Actually, the problematic function is no
longer declared or used anywhere and was just missed when WebKitScriptDialog was refactored,
so remove it.

  • UIProcess/API/wpe/WebKitScriptDialog.h:
  • UIProcess/API/wpe/WebKitScriptDialogWPE.cpp:

(webkitScriptDialogRun): Deleted.

4:06 AM Changeset in webkit [236050] by Philippe Normand
  • 2 edits in trunk/Tools

[JHBuild] Update to GStreamer 1.14.3
https://bugs.webkit.org/show_bug.cgi?id=189450

Reviewed by Xabier Rodriguez-Calvar.

  • gstreamer/jhbuild.modules: Bump GStreamer modules from 1.14.1 to 1.14.3.
2:54 AM Changeset in webkit [236049] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.22

Merge r235315 - Allow creating WeakPtrs to const objects
https://bugs.webkit.org/show_bug.cgi?id=188785

Reviewed by Geoff Garen.

Source/WebCore:

Remove some unneeded const_casts.

  • css/MediaQueryEvaluator.cpp:

(WebCore::MediaQueryEvaluator::MediaQueryEvaluator):
(WebCore::MediaQueryEvaluator::evaluate const):

  • css/MediaQueryEvaluator.h:
  • rendering/FloatingObjects.cpp:

(WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
(WebCore::ComputeFloatOffsetForFloatLayoutAdapter::ComputeFloatOffsetForFloatLayoutAdapter):
(WebCore::ComputeFloatOffsetForLineLayoutAdapter::ComputeFloatOffsetForLineLayoutAdapter):
(WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
(WebCore::FloatingObjects::FloatingObjects):

  • rendering/FloatingObjects.h:

(WebCore::FloatingObjects::renderer const):

Source/WTF:

const Foo foo;
WeakPtr<const Foo> weakConstFoo = makeWeakPtr(foo);

  • wtf/WeakPtr.h:

(WTF::WeakPtrFactory::createWeakPtr const):

Add a separate factory function for const T.
The underlying WeakReference is kept non-const in all cases.

Tools:

  • TestWebKitAPI/Tests/WTF/WeakPtr.cpp:

(TestWebKitAPI::Base::weakPtrFactory const):
(TestWebKitAPI::TEST):
(TestWebKitAPI::Base::weakPtrFactory): Deleted.

2:54 AM Changeset in webkit [236048] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.22

Merge r235268 - initKeyboardEvent doesn't clear CapsLock state
https://bugs.webkit.org/show_bug.cgi?id=188909

Reviewed by Wenson Hsieh.

Source/WebCore:

Fixed the bug by not preserving CapsLock state in setModifierKeys variant which takes boolean
for altGraphKey, which is only called by KeyboardEvent::initKeyboardEvent.

Test: fast/events/init-event-clears-capslock.html

  • dom/UIEventWithKeyState.h:

(WebCore::UIEventWithKeyState::setModifierKeys):

LayoutTests:

Added a regression test. Note that altGraph is only supported in WebKit
so Chrome and Firefox would fail to reset it via initKeyboardEvent.

  • fast/events/init-event-clears-capslock-expected.txt: Added.
  • fast/events/init-event-clears-capslock.html: Added.
2:54 AM Changeset in webkit [236047] by Carlos Garcia Campos
  • 116 edits in releases/WebKitGTK/webkit-2.22/Source/WebKit

Merge r235265 - Use unified build for UIProcess
https://bugs.webkit.org/show_bug.cgi?id=185014

Reviewed by Alex Christensen.

  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/API/APIWebsiteDataStore.h:
  • UIProcess/API/Cocoa/WKWebView.mm:
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration urlSchemeHandlerForURLScheme:]):

  • UIProcess/API/glib/IconDatabase.cpp:
  • UIProcess/API/gtk/PageClientImpl.cpp:
  • UIProcess/API/gtk/WebKitColorChooser.cpp:
  • UIProcess/API/gtk/WebKitPopupMenu.cpp:
  • UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
  • UIProcess/ApplicationStateTracker.mm:
  • UIProcess/Authentication/mac/WebCredentialMac.mm:
  • UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
  • UIProcess/Automation/ios/WebAutomationSessionIOS.mm:
  • UIProcess/Automation/mac/WebAutomationSessionMac.mm:
  • UIProcess/Cocoa/NavigationState.mm:
  • UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
  • UIProcess/Cocoa/ViewGestureController.cpp:
  • UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:

(-[WKWebViewContentProviderRegistry initWithConfiguration:]):
(-[WKWebViewContentProviderRegistry addPage:]):
(-[WKWebViewContentProviderRegistry removePage:]):

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:
  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:
  • UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:
  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKTextTouchBarItemController itemForIdentifier:]):
(WebKit::WebViewImpl::performDragOperation):

  • UIProcess/Downloads/DownloadProxy.cpp:
  • UIProcess/DrawingAreaProxy.cpp:
  • UIProcess/Gamepad/UIGamepad.cpp:
  • UIProcess/Gamepad/UIGamepadProvider.cpp:
  • UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm:
  • UIProcess/HighPerformanceGraphicsUsageSampler.cpp:
  • UIProcess/Network/NetworkProcessProxy.cpp:
  • UIProcess/Notifications/WebNotificationManagerProxy.cpp:
  • UIProcess/PerActivityStateCPUUsageSampler.cpp:
  • UIProcess/Plugins/PluginInfoStore.cpp:
  • UIProcess/Plugins/PluginProcessProxy.cpp:
  • UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
  • UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.mm:
  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
  • UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
  • UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
  • UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
  • UIProcess/RemoteWebInspectorProxy.cpp:
  • UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
  • UIProcess/ServiceWorkerProcessProxy.cpp:
  • UIProcess/Storage/StorageProcessProxy.cpp:
  • UIProcess/SuspendedPageProxy.cpp:
  • UIProcess/TextCheckerCompletion.cpp:
  • UIProcess/UIMessagePortChannelProvider.cpp:
  • UIProcess/UserMediaPermissionCheckProxy.cpp:
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
  • UIProcess/UserMediaPermissionRequestProxy.cpp:
  • UIProcess/VisitedLinkStore.cpp:
  • UIProcess/WKInspectorHighlightView.mm:

(findIntersectionOnLineBetweenPoints):
(quadIntersection):
(layerPathWithHole):
(layerPath):
(-[WKInspectorHighlightView _layoutForNodeHighlight:offset:]):
(-[WKInspectorHighlightView _layoutForNodeListHighlight:]):
(-[WKInspectorHighlightView _layoutForRectsHighlight:]):
(-[WKInspectorHighlightView update:]):

  • UIProcess/WebBackForwardList.cpp:
  • UIProcess/WebContextMenuListenerProxy.cpp:
  • UIProcess/WebCookieManagerProxy.cpp:
  • UIProcess/WebEditCommandProxy.cpp:
  • UIProcess/WebFrameProxy.cpp:
  • UIProcess/WebFullScreenManagerProxy.cpp:
  • UIProcess/WebInspectorProxy.cpp:
  • UIProcess/WebNavigationState.cpp:
  • UIProcess/WebOpenPanelResultListenerProxy.cpp:
  • UIProcess/WebPageInjectedBundleClient.cpp:
  • UIProcess/WebPageProxy.cpp:
  • UIProcess/WebProcessPool.cpp:
  • UIProcess/WebProcessProxy.cpp:
  • UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:
  • UIProcess/WebURLSchemeHandler.cpp:
  • UIProcess/WebURLSchemeTask.cpp:
  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:
  • UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
  • UIProcess/ios/DragDropInteractionState.mm:
  • UIProcess/ios/InputViewUpdateDeferrer.mm:
  • UIProcess/ios/PageClientImplIOS.mm:

(-[WKEditCommandObjC initWithWebEditCommandProxy:]):
(-[WKEditCommandObjC command]):

  • UIProcess/ios/SmartMagnificationController.mm:
  • UIProcess/ios/TextCheckerIOS.mm:
  • UIProcess/ios/ViewGestureControllerIOS.mm:

(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):

  • UIProcess/ios/WKActionSheetAssistant.mm:

(presentationStyleForView):

  • UIProcess/ios/WKApplicationStateTrackingView.mm:

(-[WKApplicationStateTrackingView initWithFrame:webView:]):
(-[WKApplicationStateTrackingView _applicationDidEnterBackground]):
(-[WKApplicationStateTrackingView _applicationDidFinishSnapshottingAfterEnteringBackground]):
(-[WKApplicationStateTrackingView _applicationWillEnterForeground]):

  • UIProcess/ios/WKGeolocationProviderIOS.mm:

(-[WKGeolocationProviderIOS _startUpdating]):
(-[WKGeolocationProviderIOS _stopUpdating]):
(-[WKGeolocationProviderIOS _setEnableHighAccuracy:]):
(-[WKGeolocationProviderIOS init]):
(-[WKGeolocationProviderIOS initWithProcessPool:]):
(-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:completionHandler:view:]):
(-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
(-[WKLegacyCoreLocationProvider positionChanged:]):

  • UIProcess/ios/WKKeyboardScrollingAnimator.mm:

(-[WKKeyboardScrollingAnimator _scrollOffsetForEvent:]):
(-[WKKeyboardScrollingAnimator beginWithEvent:]):
(-[WKKeyboardScrollingAnimator handleKeyEvent:]):
(-[WKKeyboardScrollingAnimator startAnimatedScroll]):
(-[WKKeyboardScrollingAnimator stopAnimatedScroll]):

  • UIProcess/ios/WKLegacyPDFView.mm:
  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView web_setContentProviderData:suggestedFilename:]):

  • UIProcess/ios/WKScrollView.mm:

(-[WKScrollView _systemContentInset]):

  • UIProcess/ios/WKSystemPreviewView.mm:
  • UIProcess/ios/WebPageProxyIOS.mm:
  • UIProcess/mac/CorrectionPanel.mm:

(correctionIndicatorType):

  • UIProcess/mac/PageClientImplMac.mm:
  • UIProcess/mac/RemoteWebInspectorProxyMac.mm:

(-[WKRemoteWebInspectorProxyObjCAdapter initWithRemoteWebInspectorProxy:]):

  • UIProcess/mac/TextCheckerMac.mm:
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
  • UIProcess/mac/ViewGestureControllerMac.mm:
  • UIProcess/mac/ViewSnapshotStore.mm:
  • UIProcess/mac/WKFullKeyboardAccessWatcher.mm:

(-[WKFullKeyboardAccessWatcher notifyAllProcessPools]):

  • UIProcess/mac/WKFullScreenWindowController.mm:

(WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::setInterface):
(WebKit::WKFullScreenWindowControllerVideoFullscreenModelClient::interface const):
(-[WKFullScreenWindowController initWithWindow:webView:page:]):
(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
(-[WKFullScreenWindowController windowDidEnterFullScreen:]):
(-[WKFullScreenWindowController windowDidExitFullScreen:]):
(-[WKFullScreenWindowController _manager]):
(-[WKFullScreenWindowController _replaceView:with:]):
(zoomAnimation):
(createMask):
(maskAnimation):

  • UIProcess/mac/WKImmediateActionController.mm:

(-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]):
(-[WKImmediateActionController willDestroyView:]):
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
(-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
(-[WKImmediateActionController immediateActionRecognizerWillBeginAnimation:]):
(-[WKImmediateActionController _webHitTestResult]):
(-[WKImmediateActionController _defaultAnimationController]):
(-[WKImmediateActionController menuItem:maxSizeForPoint:]):
(-[WKImmediateActionController _animationControllerForDataDetectedText]):
(-[WKImmediateActionController _animationControllerForDataDetectedLink]):
(-[WKImmediateActionController _animationControllerForText]):

  • UIProcess/mac/WKInspectorViewController.mm:

(-[WKInspectorViewController initWithInspectedPage:]):
(-[WKInspectorViewController webView]):
(-[WKInspectorViewController configuration]):
(-[WKInspectorViewController webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):
(-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[WKInspectorViewController inspectorWKWebViewReload:]):

  • UIProcess/mac/WKPrintingView.mm:

(-[WKPrintingView _expectedPreviewCallbackForRect:]):
(pageDidDrawToImage):
(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
(pageDidComputePageRects):
(-[WKPrintingView _askPageToComputePageRects]):
(-[WKPrintingView _pageForRect:]):
(-[WKPrintingView _drawPDFDocument:page:atPoint:]):
(-[WKPrintingView _drawPreview:]):
(-[WKPrintingView drawRect:]):
(-[WKPrintingView rectForPage:]):

  • UIProcess/mac/WKTextFinderClient.mm:

(-[WKTextFinderClient initWithPage:view:]):
(-[WKTextFinderClient findMatchesForString:relativeToMatch:findOptions:maxResults:resultCollector:]):
(-[WKTextFinderClient getSelectedText:]):
(arrayFromRects):
(-[WKTextFinderClient didFindStringMatchesWithRects:didWrapAround:]):
(-[WKTextFinderClient didGetImageForMatchResult:]):

  • UIProcess/mac/WKTextInputWindowController.mm:
  • UIProcess/mac/WKViewLayoutStrategy.mm:

(+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]):
(-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]):
(-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):

  • UIProcess/mac/WebColorPickerMac.mm:
  • UIProcess/mac/WebContextMenuProxyMac.mm:

(-[WKMenuTarget forwardContextMenuAction:]):
(WebKit::menuItemIdentifier):
(WebKit::WebContextMenuProxyMac::createContextMenuItem):

  • UIProcess/mac/WebInspectorProxyMac.mm:

(-[WKWebInspectorProxyObjCAdapter initWithWebInspectorProxy:]):

  • UIProcess/mac/WebPageProxyMac.mm:
  • UIProcess/mac/WebPopupMenuProxyMac.mm:
  • UIProcess/win/PageClientImpl.cpp:
  • UIProcess/win/TextCheckerWin.cpp:
  • UIProcess/win/WebContextMenuProxyWin.cpp:
  • UIProcess/win/WebPopupMenuProxyWin.cpp:
  • UIProcess/win/WebView.cpp:
  • UIProcess/wpe/TextCheckerWPE.cpp:
  • UIProcess/wpe/WebPasteboardProxyWPE.cpp:
  • WebKit.xcodeproj/project.pbxproj:
2:25 AM Changeset in webkit [236046] by Carlos Garcia Campos
  • 22 edits in releases/WebKitGTK/webkit-2.22/Source

Merge r235261 - JSRunLoopTimer may run part of a member function after it's destroyed
https://bugs.webkit.org/show_bug.cgi?id=188426

Reviewed by Mark Lam.

Source/JavaScriptCore:

When I was reading the JSRunLoopTimer code, I noticed that it is possible
to end up running timer code after the class had been destroyed.

The issue I spotted was in this function:
`
void JSRunLoopTimer::timerDidFire()
{

JSLock* apiLock = m_apiLock.get();
if (!apiLock) {

Likely a buggy usage: the timer fired while JSRunLoopTimer was being destroyed.
return;

}
HERE
std::lock_guard<JSLock> lock(*apiLock);
RefPtr<VM> vm = apiLock->vm();
if (!vm) {

The VM has been destroyed, so we should just give up.
return;

}

doWork();

}
`

Look at the comment 'HERE'. Let's say that the timer callback thread gets context
switched before grabbing the API lock. Then, some other thread destroys the VM.
And let's say that the VM owns (perhaps transitively) this timer. Then, the
timer would run code and access member variables after it was destroyed.

This patch fixes this issue by introducing a new timer manager class.
This class manages timers on a per VM basis. When a timer is scheduled,
this class refs the timer. It also calls the timer callback while actively
maintaining a +1 ref to it. So, it's no longer possible to call the timer
callback after the timer has been destroyed. However, calling a timer callback
can still race with the VM being destroyed. We continue to detect this case and
bail out of the callback early.

This patch also removes a lot of duplicate code between GCActivityCallback
and JSRunLoopTimer.

  • heap/EdenGCActivityCallback.cpp:

(JSC::EdenGCActivityCallback::doCollection):
(JSC::EdenGCActivityCallback::lastGCLength):
(JSC::EdenGCActivityCallback::deathRate):

  • heap/EdenGCActivityCallback.h:
  • heap/FullGCActivityCallback.cpp:

(JSC::FullGCActivityCallback::doCollection):
(JSC::FullGCActivityCallback::lastGCLength):
(JSC::FullGCActivityCallback::deathRate):

  • heap/FullGCActivityCallback.h:
  • heap/GCActivityCallback.cpp:

(JSC::GCActivityCallback::doWork):
(JSC::GCActivityCallback::scheduleTimer):
(JSC::GCActivityCallback::didAllocate):
(JSC::GCActivityCallback::willCollect):
(JSC::GCActivityCallback::cancel):
(JSC::GCActivityCallback::cancelTimer): Deleted.
(JSC::GCActivityCallback::nextFireTime): Deleted.

  • heap/GCActivityCallback.h:
  • heap/Heap.cpp:

(JSC::Heap::reportAbandonedObjectGraph):
(JSC::Heap::notifyIncrementalSweeper):
(JSC::Heap::updateAllocationLimits):
(JSC::Heap::didAllocate):

  • heap/IncrementalSweeper.cpp:

(JSC::IncrementalSweeper::scheduleTimer):
(JSC::IncrementalSweeper::doWork):
(JSC::IncrementalSweeper::doSweep):
(JSC::IncrementalSweeper::sweepNextBlock):
(JSC::IncrementalSweeper::startSweeping):
(JSC::IncrementalSweeper::stopSweeping):

  • heap/IncrementalSweeper.h:
  • heap/StopIfNecessaryTimer.cpp:

(JSC::StopIfNecessaryTimer::doWork):
(JSC::StopIfNecessaryTimer::scheduleSoon):

  • heap/StopIfNecessaryTimer.h:
  • runtime/JSRunLoopTimer.cpp:

(JSC::epochTime):
(JSC::JSRunLoopTimer::Manager::timerDidFireCallback):
(JSC::JSRunLoopTimer::Manager::PerVMData::setRunLoop):
(JSC::JSRunLoopTimer::Manager::PerVMData::PerVMData):
(JSC::JSRunLoopTimer::Manager::PerVMData::~PerVMData):
(JSC::JSRunLoopTimer::Manager::timerDidFire):
(JSC::JSRunLoopTimer::Manager::shared):
(JSC::JSRunLoopTimer::Manager::registerVM):
(JSC::JSRunLoopTimer::Manager::unregisterVM):
(JSC::JSRunLoopTimer::Manager::scheduleTimer):
(JSC::JSRunLoopTimer::Manager::cancelTimer):
(JSC::JSRunLoopTimer::Manager::timeUntilFire):
(JSC::JSRunLoopTimer::Manager::didChangeRunLoop):
(JSC::JSRunLoopTimer::timerDidFire):
(JSC::JSRunLoopTimer::JSRunLoopTimer):
(JSC::JSRunLoopTimer::timeUntilFire):
(JSC::JSRunLoopTimer::setTimeUntilFire):
(JSC::JSRunLoopTimer::cancelTimer):
(JSC::JSRunLoopTimer::setRunLoop): Deleted.
(JSC::JSRunLoopTimer::timerDidFireCallback): Deleted.
(JSC::JSRunLoopTimer::scheduleTimer): Deleted.

  • runtime/JSRunLoopTimer.h:

(JSC::JSRunLoopTimer::Manager::PerVMData::PerVMData):

  • runtime/PromiseDeferredTimer.cpp:

(JSC::PromiseDeferredTimer::doWork):
(JSC::PromiseDeferredTimer::runRunLoop):
(JSC::PromiseDeferredTimer::addPendingPromise):
(JSC::PromiseDeferredTimer::hasPendingPromise):
(JSC::PromiseDeferredTimer::hasDependancyInPendingPromise):
(JSC::PromiseDeferredTimer::cancelPendingPromise):
(JSC::PromiseDeferredTimer::scheduleWorkSoon):

  • runtime/PromiseDeferredTimer.h:
  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::~VM):
(JSC::VM::setRunLoop):
(JSC::VM::registerRunLoopTimer): Deleted.
(JSC::VM::unregisterRunLoopTimer): Deleted.

  • runtime/VM.h:

(JSC::VM::runLoop const):

  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::webAssemblyModuleValidateAsyncInternal):
(JSC::instantiate):
(JSC::compileAndInstantiate):
(JSC::webAssemblyModuleInstantinateAsyncInternal):
(JSC::webAssemblyCompileStreamingInternal):
(JSC::webAssemblyInstantiateStreamingInternal):

Source/WebCore:

  • page/cocoa/ResourceUsageThreadCocoa.mm:

(WebCore::ResourceUsageThread::platformThreadBody):

  • page/linux/ResourceUsageThreadLinux.cpp:

(WebCore::ResourceUsageThread::platformThreadBody):

2:25 AM Changeset in webkit [236045] by Carlos Garcia Campos
  • 30 edits in releases/WebKitGTK/webkit-2.22/Source

Merge r235254 - Move vmEntryGlobalObject() to VM from CallFrame.
https://bugs.webkit.org/show_bug.cgi?id=188900
<rdar://problem/43655753>

Reviewed by Michael Saboff.

Source/JavaScriptCore:

Also introduced CallFrame::isGlobalExec() which makes use of one property of
GlobalExecs to identify them i.e. GlobalExecs have null callerFrame and returnPCs.
CallFrame::initGlobalExec() ensures this.

In contrast, normal CallFrames always have a callerFrame (because they must at
least be preceded by a VM EntryFrame) and a returnPC (at least return to the
VM entry glue).

  • API/APIUtils.h:

(handleExceptionIfNeeded):
(setException):

  • API/JSBase.cpp:

(JSEvaluateScript):
(JSCheckScriptSyntax):

  • API/JSContextRef.cpp:

(JSGlobalContextRetain):
(JSGlobalContextRelease):
(JSGlobalContextCopyName):
(JSGlobalContextSetName):
(JSGlobalContextGetRemoteInspectionEnabled):
(JSGlobalContextSetRemoteInspectionEnabled):
(JSGlobalContextGetIncludesNativeCallStackWhenReportingExceptions):
(JSGlobalContextSetIncludesNativeCallStackWhenReportingExceptions):
(JSGlobalContextGetDebuggerRunLoop):
(JSGlobalContextSetDebuggerRunLoop):
(JSGlobalContextGetAugmentableInspectorController):

  • API/JSValue.mm:

(reportExceptionToInspector):

  • API/glib/JSCClass.cpp:

(jscContextForObject):

  • API/glib/JSCContext.cpp:

(jsc_context_evaluate_in_object):

  • debugger/Debugger.cpp:

(JSC::Debugger::pauseIfNeeded):

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::vmEntryGlobalObject const):
(JSC::DebuggerCallFrame::evaluateWithScopeExtension):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::vmEntryGlobalObject): Deleted.

  • interpreter/CallFrame.h:

(JSC::ExecState::scope const):
(JSC::ExecState::noCaller):
(JSC::ExecState::isGlobalExec const):

  • interpreter/Interpreter.cpp:

(JSC::notifyDebuggerOfUnwinding):
(JSC::Interpreter::notifyDebuggerOfExceptionToBeThrown):
(JSC::Interpreter::debug):

  • runtime/CallData.cpp:

(JSC::profiledCall):

  • runtime/Completion.cpp:

(JSC::evaluate):
(JSC::profiledEvaluate):
(JSC::evaluateWithScopeExtension):
(JSC::loadAndEvaluateModule):
(JSC::loadModule):
(JSC::linkAndEvaluateModule):
(JSC::importModule):

  • runtime/ConstructData.cpp:

(JSC::profiledConstruct):

  • runtime/Error.cpp:

(JSC::getStackTrace):

  • runtime/VM.cpp:

(JSC::VM::throwException):
(JSC::VM::vmEntryGlobalObject const):

  • runtime/VM.h:

Source/WebCore:

No new tests needed because this patch does not introduce new functionality.

  • bindings/js/JSCustomXPathNSResolver.cpp:

(WebCore::JSCustomXPathNSResolver::create):

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::callerGlobalObject):
(WebCore::toJSDOMGlobalObject): Deleted.

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::firstDOMWindow):

  • bridge/c/c_utility.cpp:

(JSC::Bindings::convertValueToNPVariant):

  • bridge/objc/WebScriptObject.mm:

(WebCore::addExceptionToConsole):

  • bridge/objc/objc_instance.mm:

(ObjcInstance::moveGlobalExceptionToExecState):

  • bridge/objc/objc_runtime.mm:

(JSC::Bindings::convertValueToObjcObject):

  • bridge/objc/objc_utility.mm:

(JSC::Bindings::convertValueToObjcValue):

  • testing/Internals.cpp:

(WebCore::Internals::cloneArrayBuffer):

Source/WebKitLegacy/mac:

  • WebView/WebScriptDebugger.mm:

(WebScriptDebugger::sourceParsed):

2:24 AM Changeset in webkit [236044] by Carlos Garcia Campos
  • 8 edits
    2 adds in releases/WebKitGTK/webkit-2.22

Merge r235243 - Assert in NetworkBlobRegistry::unregisterBlobURL after network process had terminated
https://bugs.webkit.org/show_bug.cgi?id=188880

Reviewed by Saam Barati.

Source/WebKit:

Removed the debug assertion. WebContent process might be asking this network process
to unregister a blob registered from another network processs which had since crashed.

We could keep track of which blob had been registered with which network process
in WebContent process and avoid sending IPC to the network process but that's a lot of
house-keeping for virtually no benefit other than not hitting this assertion.

  • NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:

(WebKit::NetworkBlobRegistry::unregisterBlobURL):

Tools:

Fixed the bug that testRunner's terminateNetworkProcess, terminateServiceWorkerProcess, and terminateStorageProcess
were asynchronously terminating respective processes. Do so synchronously so that we can deterministically
test WebKit's behavior in layout tests.

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::terminateNetworkProcess):
(WTR::TestRunner::terminateServiceWorkerProcess):
(WTR::TestRunner::terminateStorageProcess):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

Added a layout test which demonstrates this debug assertion.

  • TestExpectations:
  • fast/files/blob-network-process-crash-expected.txt: Added.
  • fast/files/blob-network-process-crash.html: Added.
  • platform/wk2/TestExpectations:
1:50 AM Changeset in webkit [236043] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore

Merge r235238 - YARR: Need to JIT compile a RegExp before using containsNestedSubpatterns flag
https://bugs.webkit.org/show_bug.cgi?id=188895

Reviewed by Mark Lam.

Found while working on another change. This will allow processing of nested
parenthesis that require saved ParenContext structures.

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::compile):

1:50 AM Changeset in webkit [236042] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/WebKit

Merge r235208 - De-unify WebPage
https://bugs.webkit.org/show_bug.cgi?id=188865

Reviewed by Wenson Hsieh.

  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:

WebPage being unified is causing mysterious build issues inside Carbon headers
on High Sierra only. Also, WebPage by itself takes longer to build than
most full unified source files, so it might not make sense to unify it
with others (to maximize parallelism).

1:50 AM Changeset in webkit [236041] by Carlos Garcia Campos
  • 159 edits in releases/WebKitGTK/webkit-2.22/Source/WebKit

Merge r235176 - Use unified build for WebProcess
https://bugs.webkit.org/show_bug.cgi?id=185015

Reviewed by Alex Christensen.

  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
  • WebProcess/Databases/WebDatabaseProvider.cpp:
  • WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
  • WebProcess/FileAPI/BlobRegistryProxy.cpp:
  • WebProcess/FullScreen/WebFullScreenManager.cpp:
  • WebProcess/Gamepad/WebGamepadProvider.cpp:
  • WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
  • WebProcess/Geolocation/WebGeolocationManager.cpp:
  • WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm:
  • WebProcess/InjectedBundle/API/gtk/DOM/GObjectEventListener.cpp:
  • WebProcess/InjectedBundle/DOM/InjectedBundleCSSStyleDeclarationHandle.cpp:
  • WebProcess/InjectedBundle/DOM/InjectedBundleFileHandle.cpp:
  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
  • WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:
  • WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
  • WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
  • WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
  • WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
  • WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
  • WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
  • WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
  • WebProcess/Network/NetworkProcessConnection.cpp:
  • WebProcess/Network/WebLoaderStrategy.cpp:
  • WebProcess/Network/WebResourceLoader.cpp:
  • WebProcess/Network/WebSocketProvider.cpp:
  • WebProcess/Network/WebSocketStream.cpp:
  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
  • WebProcess/Network/webrtc/LibWebRTCResolver.cpp:
  • WebProcess/Network/webrtc/LibWebRTCResolver.h:
  • WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
  • WebProcess/Network/webrtc/LibWebRTCSocket.h:
  • WebProcess/Network/webrtc/WebMDNSRegister.cpp:
  • WebProcess/Network/webrtc/WebRTCMonitor.cpp:
  • WebProcess/Network/webrtc/WebRTCMonitor.h:
  • WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
  • WebProcess/Notifications/WebNotificationManager.cpp:
  • WebProcess/Plugins/Netscape/JSNPMethod.cpp:
  • WebProcess/Plugins/Netscape/JSNPObject.cpp:
  • WebProcess/Plugins/Netscape/NPJSObject.cpp:
  • WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
  • WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
  • WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
  • WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
  • WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
  • WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:
  • WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
  • WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
  • WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
  • WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
  • WebProcess/Plugins/Plugin.cpp:
  • WebProcess/Plugins/PluginProcessConnection.cpp:
  • WebProcess/Plugins/PluginProxy.cpp:
  • WebProcess/Plugins/PluginView.cpp:
  • WebProcess/Plugins/WebPluginInfoProvider.cpp:
  • WebProcess/Storage/ServiceWorkerClientFetch.cpp:
  • WebProcess/Storage/WebSWClientConnection.cpp:
  • WebProcess/Storage/WebSWContextManagerConnection.cpp:
  • WebProcess/Storage/WebSWOriginTable.cpp:
  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.cpp:
  • WebProcess/Storage/WebServiceWorkerProvider.cpp:
  • WebProcess/Storage/WebToStorageProcessConnection.cpp:
  • WebProcess/UserContent/WebUserContentController.cpp:
  • WebProcess/WebConnectionToUIProcess.cpp:
  • WebProcess/WebCoreSupport/SessionStateConversion.cpp:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:
  • WebProcess/WebCoreSupport/WebColorChooser.cpp:
  • WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
  • WebProcess/WebCoreSupport/WebDataListSuggestionPicker.cpp:
  • WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
  • WebProcess/WebCoreSupport/WebDragClient.cpp:
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
  • WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
  • WebProcess/WebCoreSupport/WebInspectorClient.cpp:
  • WebProcess/WebCoreSupport/WebMessagePortChannelProvider.cpp:
  • WebProcess/WebCoreSupport/WebNotificationClient.cpp:
  • WebProcess/WebCoreSupport/WebPerformanceLoggingClient.cpp:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
  • WebProcess/WebCoreSupport/WebPopupMenu.cpp:
  • WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:
  • WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
  • WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
  • WebProcess/WebCoreSupport/WebValidationMessageClient.cpp:
  • WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
  • WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
  • WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
  • WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
  • WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
  • WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
  • WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
  • WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
  • WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp:
  • WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
  • WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:
  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
  • WebProcess/WebPage/DrawingArea.cpp:
  • WebProcess/WebPage/EventDispatcher.cpp:
  • WebProcess/WebPage/FindController.cpp:
  • WebProcess/WebPage/LayerTreeHost.cpp:
  • WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.cpp:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm:
  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteTiledBacking.cpp:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDisplayRefreshMonitor.mm:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
  • WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:
  • WebProcess/WebPage/RemoteWebInspectorUI.cpp:
  • WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
  • WebProcess/WebPage/VisitedLinkTableController.cpp:
  • WebProcess/WebPage/WebBackForwardListProxy.cpp:
  • WebProcess/WebPage/WebContextMenu.cpp:
  • WebProcess/WebPage/WebDocumentLoader.cpp:
  • WebProcess/WebPage/WebFrame.cpp:
  • WebProcess/WebPage/WebInspector.cpp:
  • WebProcess/WebPage/WebInspectorUI.cpp:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/WebPageOverlay.cpp:
  • WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp:
  • WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
  • WebProcess/WebPage/ios/FindControllerIOS.mm:
  • WebProcess/WebPage/ios/WebPageIOS.mm:
  • WebProcess/WebPage/mac/DrawingAreaMac.cpp:
  • WebProcess/WebPage/mac/PageBannerMac.mm:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
  • WebProcess/WebPage/mac/WebPageMac.mm:
  • WebProcess/WebPage/win/WebPageWin.cpp:
  • WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
  • WebProcess/WebPage/wpe/WebPageWPE.cpp:
  • WebProcess/WebProcess.cpp:
  • WebProcess/WebStorage/StorageAreaImpl.cpp:
  • WebProcess/WebStorage/StorageAreaMap.cpp:
  • WebProcess/WebStorage/StorageNamespaceImpl.cpp:
  • WebProcess/WebStorage/WebStorageNamespaceProvider.cpp:
  • WebProcess/cocoa/PlaybackSessionManager.mm:
  • WebProcess/cocoa/UserMediaCaptureManager.cpp:
  • WebProcess/cocoa/VideoFullscreenManager.mm:
  • WebProcess/cocoa/WebProcessCocoa.mm:
  • WebProcess/win/WebProcessMainWin.cpp:
  • WebProcess/win/WebProcessWin.cpp:
  • WebProcess/wpe/WebProcessMainWPE.cpp:
1:49 AM Changeset in webkit [236040] by Carlos Garcia Campos
  • 4 edits
    1 add in releases/WebKitGTK/webkit-2.22

Merge r235177 - The DFG CFGSimplification phase shouldn’t jettison a block when it’s the target of both branch directions.
https://bugs.webkit.org/show_bug.cgi?id=188298
<rdar://problem/42888427>

Reviewed by Saam Barati.

JSTests:

  • stress/bug-188298.js: Added.

Source/JavaScriptCore:

In the event that both targets of a Branch is the same block, then even if we'll
always take one path of the branch, the other target is not unreachable because
it is the same target as the one in the taken path. Hence, it should not be
jettisoned.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Added DFGCFG.h which is in use and should have been added to the project.
  • dfg/DFGCFGSimplificationPhase.cpp:

(JSC::DFG::CFGSimplificationPhase::run):

1:49 AM Changeset in webkit [236039] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.22

Merge r235174 - Fetch: Stop checking Request.integrity's value in no-cors mode
https://bugs.webkit.org/show_bug.cgi?id=188802

Patch by Rob Buis <rbuis@igalia.com> on 2018-08-22
Reviewed by Frédéric Wang.

LayoutTests/imported/w3c:

Update integrity.html expected result.

  • web-platform-tests/fetch/api/basic/integrity-expected.txt:

Source/WebCore:

Remove this check since it was removed from the spec.

Behavior matches Chrome and Firefox.

Test: http/tests/subresource-integrity/sri-fetch.js:

  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::initializeOptions):

LayoutTests:

Unskip fetch/api/basic/integrity.html and adjust sri-fetch.js.

1:49 AM Changeset in webkit [236038] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.22/Source/WebCore

Merge r235171 - [GTK] Never return an uninitialized ImageGStreamer object.
https://bugs.webkit.org/show_bug.cgi?id=188305

Reviewed by Philippe Normand.

The single caller was already checking for a null return value, so
make that check actually do something. Also remove the null-check on
the return value of image(), which asserted that it would never return
null.

Test: fast/canvas/canvas-createPattern-video-loading.html

  • platform/graphics/gstreamer/ImageGStreamer.h:

(WebCore::ImageGStreamer::createImage): Return null if m_image wasn't created.
(WebCore::ImageGStreamer::image): Return a reference.
(WebCore::ImageGStreamer::rect): Always assert that m_image is present.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::paint): Update for new signature.

1:30 AM Changeset in webkit [236037] by Philippe Normand
  • 2 edits in trunk/Tools

[JHBuild] Doesn't check sha256 sums
https://bugs.webkit.org/show_bug.cgi?id=189646

Reviewed by Michael Catanzaro.

  • gstreamer/jhbuild.modules: Properly set the sha256: prefix on hashes.
1:14 AM Changeset in webkit [236036] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.22/Source/WebCore

Merge r235170 - Add changes missing from r234925.

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::isMarginTopCollapsedWithParent):
(WebCore::Layout::isMarginBottomCollapsedThrough):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::isMarginBottomCollapsedWithParent):

12:11 AM Changeset in webkit [236035] by sihui_liu@apple.com
  • 47 edits
    3 copies
    1 add
    1 delete in trunk

Move IndexedDB to Network Process
https://bugs.webkit.org/show_bug.cgi?id=189415
<rdar://problem/44396973>

Reviewed by Chris Dumez.

Source/WebKit:

We are going to eliminate storage process and move its functionality to network process.
The reasons why we want to do this:

  1. Lower resource usage of having an additional process for storage operations, especially

memory. Single storage process takes about 5MB memory on macOS.

  1. Reduce latency of Service Workers. After enabling Service Workers, we've seen

regression in app launch. The launch time of storage process is partly attributed to this:
Service Workers delay page loading until receiving response from storage process.

  1. We choose network process because UI process may have broader access in file system

that we don't want the storage operations to have.

This patch is the first piece towards the goal. It mainly moves indexedDB from storage process
to corresponding components of network process. Moving of Service Worker and stopping to
launch storage process will be done in following patches.

We expect to see the higher cpu and memory usage of network process as it is taking more work,
but the overall gain in memory and latency after we completely remove storage process should be
positive.

  • CMakeLists.txt:
  • DerivedSources.make:
  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp.

(WebKit::WebIDBConnectionToClient::create):
(WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
(WebKit::WebIDBConnectionToClient::~WebIDBConnectionToClient):
(WebKit::WebIDBConnectionToClient::disconnectedFromWebProcess):
(WebKit::WebIDBConnectionToClient::messageSenderConnection):
(WebKit::WebIDBConnectionToClient::connectionToClient):
(WebKit::WebIDBConnectionToClient::didDeleteDatabase):
(WebKit::WebIDBConnectionToClient::didOpenDatabase):
(WebKit::WebIDBConnectionToClient::didAbortTransaction):
(WebKit::WebIDBConnectionToClient::didCommitTransaction):
(WebKit::WebIDBConnectionToClient::didCreateObjectStore):
(WebKit::WebIDBConnectionToClient::didDeleteObjectStore):
(WebKit::WebIDBConnectionToClient::didRenameObjectStore):
(WebKit::WebIDBConnectionToClient::didClearObjectStore):
(WebKit::WebIDBConnectionToClient::didCreateIndex):
(WebKit::WebIDBConnectionToClient::didDeleteIndex):
(WebKit::WebIDBConnectionToClient::didRenameIndex):
(WebKit::WebIDBConnectionToClient::didPutOrAdd):
(WebKit::WebIDBConnectionToClient::handleGetResult):
(WebKit::WebIDBConnectionToClient::didGetRecord):
(WebKit::WebIDBConnectionToClient::didGetAllRecords):
(WebKit::WebIDBConnectionToClient::didGetCount):
(WebKit::WebIDBConnectionToClient::didDeleteRecord):
(WebKit::WebIDBConnectionToClient::didOpenCursor):
(WebKit::WebIDBConnectionToClient::didIterateCursor):
(WebKit::WebIDBConnectionToClient::fireVersionChangeEvent):
(WebKit::WebIDBConnectionToClient::didStartTransaction):
(WebKit::WebIDBConnectionToClient::didCloseFromServer):
(WebKit::WebIDBConnectionToClient::notifyOpenDBRequestBlocked):
(WebKit::WebIDBConnectionToClient::didGetAllDatabaseNames):
(WebKit::WebIDBConnectionToClient::deleteDatabase):
(WebKit::WebIDBConnectionToClient::openDatabase):
(WebKit::WebIDBConnectionToClient::abortTransaction):
(WebKit::WebIDBConnectionToClient::commitTransaction):
(WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
(WebKit::WebIDBConnectionToClient::createObjectStore):
(WebKit::WebIDBConnectionToClient::deleteObjectStore):
(WebKit::WebIDBConnectionToClient::renameObjectStore):
(WebKit::WebIDBConnectionToClient::clearObjectStore):
(WebKit::WebIDBConnectionToClient::createIndex):
(WebKit::WebIDBConnectionToClient::deleteIndex):
(WebKit::WebIDBConnectionToClient::renameIndex):
(WebKit::WebIDBConnectionToClient::putOrAdd):
(WebKit::WebIDBConnectionToClient::getRecord):
(WebKit::WebIDBConnectionToClient::getAllRecords):
(WebKit::WebIDBConnectionToClient::getCount):
(WebKit::WebIDBConnectionToClient::deleteRecord):
(WebKit::WebIDBConnectionToClient::openCursor):
(WebKit::WebIDBConnectionToClient::iterateCursor):
(WebKit::WebIDBConnectionToClient::establishTransaction):
(WebKit::WebIDBConnectionToClient::databaseConnectionPendingClose):
(WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
(WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
(WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
(WebKit::WebIDBConnectionToClient::openDBRequestCancelled):
(WebKit::WebIDBConnectionToClient::confirmDidCloseFromServer):
(WebKit::WebIDBConnectionToClient::getAllDatabaseNames):

  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.h: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.h.
  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Renamed from Source/WebKit/StorageProcess/IndexedDB/WebIDBConnectionToClient.messages.in.
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):

Code moved from StorageToWebProcessConnection::didReceiveMessage.

(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):

Network process receives and stores sandbox extension of temporary files for later indexedDB
use.

(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):
(WebKit::generateIDBConnectionToServerIdentifier):
(WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):
(WebKit::NetworkConnectionToWebProcess::removeIDBConnectionToServer):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::idbServer):
(WebKit::NetworkProcess::ensurePathExists):
(WebKit::NetworkProcess::postStorageTask):
(WebKit::NetworkProcess::performNextStorageTask):
(WebKit::NetworkProcess::prepareForAccessToTemporaryFile):
(WebKit::NetworkProcess::accessToTemporaryFileComplete):
(WebKit::NetworkProcess::indexedDatabaseOrigins):
(WebKit::NetworkProcess::addIndexedDatabaseSession):
(WebKit::NetworkProcess::getSandboxExtensionsForBlobFiles):

Instead of asking UI process to grant sandbox extension to storage process, now network
process just asks for sandbox extension fot itself.

(WebKit::NetworkProcess::didGetSandboxExtensionsForBlobFiles):
(WebKit::NetworkProcess::updateTemporaryFileSandboxExtensions):
(WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs): Deleted.
(WebKit::NetworkProcess::didGrantSandboxExtensionsToStorageProcessForBlobs): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • Shared/Storage/StorageProcessCreationParameters.cpp:

(WebKit::StorageProcessCreationParameters::encode const):
(WebKit::StorageProcessCreationParameters::decode):

  • Shared/Storage/StorageProcessCreationParameters.h:
  • Shared/WebsiteDataStoreParameters.cpp:

(WebKit::WebsiteDataStoreParameters::encode const):
(WebKit::WebsiteDataStoreParameters::decode):
(WebKit::WebsiteDataStoreParameters::privateSessionParameters):

  • Shared/WebsiteDataStoreParameters.h:
  • Sources.txt:
  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::initializeWebsiteDataStore):
(WebKit::StorageProcess::fetchWebsiteData):
(WebKit::StorageProcess::deleteWebsiteData):
(WebKit::StorageProcess::deleteWebsiteDataForOrigins):
(WebKit::StorageProcess::idbServer): Deleted.
(WebKit::StorageProcess::grantSandboxExtensionsForBlobs): Deleted.
(WebKit::StorageProcess::prepareForAccessToTemporaryFile): Deleted.
(WebKit::StorageProcess::accessToTemporaryFileComplete): Deleted.
(WebKit::StorageProcess::indexedDatabaseOrigins): Deleted.
(WebKit::StorageProcess::getSandboxExtensionsForBlobFiles): Deleted.
(WebKit::StorageProcess::didGetSandboxExtensionsForBlobFiles): Deleted.

  • StorageProcess/StorageProcess.h:

(WebKit::StorageProcess::queue): Deleted.

  • StorageProcess/StorageProcess.messages.in:
  • StorageProcess/StorageToWebProcessConnection.cpp:

(WebKit::StorageToWebProcessConnection::didReceiveMessage):
(WebKit::StorageToWebProcessConnection::didClose):
(WebKit::generateIDBConnectionToServerIdentifier): Deleted.
(WebKit::StorageToWebProcessConnection::establishIDBConnectionToServer): Deleted.
(WebKit::StorageToWebProcessConnection::removeIDBConnectionToServer): Deleted.

  • StorageProcess/StorageToWebProcessConnection.h:
  • StorageProcess/StorageToWebProcessConnection.messages.in:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::getSandboxExtensionsForBlobFiles):
(WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/Storage/StorageProcessProxy.cpp:

(WebKit::StorageProcessProxy::getSandboxExtensionsForBlobFiles): Deleted.

  • UIProcess/Storage/StorageProcessProxy.h:
  • UIProcess/Storage/StorageProcessProxy.messages.in:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
(WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::computeNetworkProcessAccessTypeForDataFetch):
(WebKit::WebsiteDataStore::fetchDataAndApply):
(WebKit::computeNetworkProcessAccessTypeForDataRemoval):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::storageProcessParameters):
(WebKit::WebsiteDataStore::parameters):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

(WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
(WebKit::WebIDBConnectionToServer::~WebIDBConnectionToServer):
(WebKit::WebIDBConnectionToServer::messageSenderConnection):

  • WebProcess/Databases/WebDatabaseProvider.cpp:

(WebKit::WebDatabaseProvider::idbConnectionToServerForSession):

  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::didReceiveMessage):
(WebKit::NetworkProcessConnection::didClose):
(WebKit::NetworkProcessConnection::idbConnectionToServerForSession):

  • WebProcess/Network/NetworkProcessConnection.h:

(WebKit::NetworkProcessConnection::existingIDBConnectionToServerForIdentifier const):

  • WebProcess/Storage/WebToStorageProcessConnection.cpp:

(WebKit::WebToStorageProcessConnection::didReceiveMessage):
(WebKit::WebToStorageProcessConnection::didClose):
(WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession): Deleted.

  • WebProcess/Storage/WebToStorageProcessConnection.h:

(WebKit::WebToStorageProcessConnection::existingIDBConnectionToServerForIdentifier): Deleted.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::networkProcessConnectionClosed):
(WebKit::WebProcess::webToStorageProcessConnectionClosed):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/IDBDeleteRecovery.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBDatabaseProcessKill.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:

(TEST):

LayoutTests:

  • storage/indexeddb/modern/opendatabase-after-storage-crash.html:

Sep 16, 2018:

5:35 PM Changeset in webkit [236034] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening, mark fast/text/variations/ipc2.html as slow.

  • platform/mac-wk2/TestExpectations:

Sep 15, 2018:

11:41 AM Changeset in webkit [236033] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION: breakpoint context menu appears twice in DOM tree
https://bugs.webkit.org/show_bug.cgi?id=189308

Reviewed by Joseph Pecoraro.

  • UserInterface/Controllers/DOMBreakpointTreeController.js:

(WI.DOMBreakpointTreeController.appendBreakpointContextMenuItems):
Set a symbol on the contextMenu to ensure that the same items are not added twice.

9:17 AM Changeset in webkit [236032] by Darin Adler
  • 60 edits in trunk

Streamline JSRetainPtr, fix leaks of JSString and JSGlobalContext
https://bugs.webkit.org/show_bug.cgi?id=189455

Reviewed by Keith Miller.

Source/JavaScriptCore:

  • API/JSObjectRef.cpp:

(OpaqueJSPropertyNameArray): Use Ref<OpaqueJSString> instead of
JSRetainPtr<JSStringRef>.
(JSObjectCopyPropertyNames): Remove now-unneeded use of leakRef and
adopt constructor.
(JSPropertyNameArrayGetNameAtIndex): Use ptr() instead of get() since
the array elements are now Ref.

  • API/JSRetainPtr.h: While JSRetainPtr is written as a template,

it only works for two specific unrelated types, JSStringRef and
JSGlobalContextRef. Simplified the default constructor using data
member initialization. Prepared to make the adopt constructor private
(got everything compiling that way, then made it public again so that
Apple internal software will still build). Got rid of unneeded
templated constructor and assignment operator, since it's not relevant
since there is no inheritance between JSRetainPtr template types.
Added WARN_UNUSED_RETURN to leakRef as in RefPtr and RetainPtr.
Added move constructor and move assignment operator for slightly better
performance. Simplified implementations of various member functions
so they are more obviously correct, by using leakPtr in more of them
and using std::exchange to make the flow of values more obvious.

  • API/JSValue.mm:

(+[JSValue valueWithNewSymbolFromDescription:inContext:]): Added a
missing JSStringRelease to fix a leak.

  • API/tests/CustomGlobalObjectClassTest.c:

(customGlobalObjectClassTest): Added a JSGlobalContextRelease to fix a leak.
(globalObjectSetPrototypeTest): Ditto.
(globalObjectPrivatePropertyTest): Ditto.

  • API/tests/ExecutionTimeLimitTest.cpp:

(testResetAfterTimeout): Added a call to JSStringRelease to fix a leak.
(testExecutionTimeLimit): Ditto, lots more.

  • API/tests/FunctionOverridesTest.cpp:

(testFunctionOverrides): Added a call to JSStringRelease to fix a leak.

  • API/tests/JSObjectGetProxyTargetTest.cpp:

(testJSObjectGetProxyTarget): Added a call to JSGlobalContextRelease to fix
a leak.

  • API/tests/PingPongStackOverflowTest.cpp:

(testPingPongStackOverflow): Added calls to JSGlobalContextRelease and
JSStringRelease to fix leaks.

  • API/tests/testapi.c:

(throwException): Added. Helper function for repeated idiom where we want
to throw an exception, but with additional JSStringRelease calls so we don't
have to leak just to keep the code simpler to read.
(MyObject_getProperty): Use throwException.
(MyObject_setProperty): Ditto.
(MyObject_deleteProperty): Ditto.
(isValueEqualToString): Added. Helper function for an idiom where we check
if something is a string and then if it's equal to a particular string
constant, but a version that has an additional JSStringRelease call so we
don't have to leak just to keep the code simpler to read.
(MyObject_callAsFunction): Use isValueEqualToString and throwException.
(MyObject_callAsConstructor): Ditto.
(MyObject_hasInstance): Ditto.
(globalContextNameTest): Added a JSGlobalContextRelease to fix a leak.
(testMarkingConstraintsAndHeapFinalizers): Ditto.

Source/WebCore:

  • Modules/plugins/QuickTimePluginReplacement.mm:

(WebCore::jsValueWithDictionaryInContext): Adding a missing
JSStringRelease to fix a leak.

Source/WebKit:

  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::toJSString): Use adopt function instead of adopt construuctor.
(WebKit::evaluate): Ditto.
(WebKit::evaluateJavaScriptCallback): Ditto.
(WebKit::WebAutomationSessionProxy::evaluateJavaScriptFunction): Ditto.

Tools:

There is a lot of copied and pasted code for WebKit vs. Legacy WebKit
testing and even for macOS vs. iOS vs. Windows platform-specific code.
For now, this patch just makes corresponding changes to the copied code.
Later we might get better results by merging more code instead of having
all these separate copies.

  • DumpRenderTree/AccessibilityController.cpp:

(AccessibilityController::makeWindowObject): Use the adopt function
instead of the special Adopt constructor of JSRetainPtr.

  • DumpRenderTree/AccessibilityTextMarker.cpp: Removed unneeded include.
  • DumpRenderTree/AccessibilityUIElement.cpp: Ditto.

(allAttributesCallback): Don't adopt at this level; changed the
underlying function to return a JSRetainPtr so the adopt is right next
to the call to the create or copy function.
(attributesOfLinkedUIElementsCallback): Ditto.
(attributesOfDocumentLinksCallback): Ditto.
(attributesOfChildrenCallback): Ditto.
(parameterizedAttributeNamesCallback): Ditto.
(attributesOfColumnHeadersCallback): Ditto.
(attributesOfRowHeadersCallback): Ditto.
(attributesOfColumnsCallback): Ditto.
(attributesOfRowsCallback): Ditto.
(attributesOfVisibleCellsCallback): Ditto.
(attributesOfHeaderCallback): Ditto.
(rowIndexRangeCallback): Ditto.
(columnIndexRangeCallback): Ditto.
(rangeForLineCallback): Ditto.
(boundsForRangeCallback): Ditto.
(rangeForPositionCallback): Ditto.
(stringForRangeCallback): Ditto.
(attributedStringForRangeCallback): Ditto.
(uiElementCountForSearchPredicateCallback): Use the free adopt
function instead of the adopt member function.
(uiElementForSearchPredicateCallback): Ditto.
(selectTextWithCriteriaCallback): Don't adopt at this level.
(attributedStringForElementCallback): Ditto.
(setValueCallback): Use free adopt.
(stringAttributeValueCallback): Don't adopt at this level.
(uiElementArrayAttributeValueCallback): Ditto.
(uiElementAttributeValueCallback): Ditto.
(stringForTextMarkerRangeCallback): Ditto.
(attributedStringForTextMarkerRangeCallback): Ditto.
(attributedStringForTextMarkerRangeWithOptionsCallback): Ditto.
(getARIADropEffectsCallback): Ditto.
(getClassListCallback): Ditto.
(getRoleCallback): Ditto.
(getSubroleCallback): Ditto.
(getRoleDescriptionCallback): Ditto.
(getComputedRoleStringCallback): Ditto.
(getTitleCallback): Ditto.
(getDescriptionCallback): Ditto.
(getStringValueCallback): Ditto.
(getLanguageCallback): Ditto.
(getHelpTextCallback): Ditto.
(getOrientationCallback): Ditto.
(getPathDescriptionCallback): Ditto.
(getSelectedTextRangeCallback): Ditto.
(speakAsCallback): Ditto.
(getValueDescriptionCallback): Ditto.
(getAccessibilityValueCallback): Ditto.
(getDocumentEncodingCallback): Ditto.
(getDocumentURICallback): Ditto.
(getURLCallback): Ditto.
(characterAtOffsetCallback): Ditto.
(wordAtOffsetCallback): Ditto.
(lineAtOffsetCallback): Ditto.
(sentenceAtOffsetCallback): Ditto.
(stringForSelectionCallback): Ditto.
(getIdentifierCallback): Ditto.
(getTraitsCallback): Ditto.
(supportedActionsCallback): Ditto.
(mathPostscriptsDescriptionCallback): Ditto.
(mathPrescriptsDescriptionCallback): Ditto.
(AccessibilityUIElement::rangeForLine): Updated to return JSRetainPtr.
(AccessibilityUIElement::rangeForPosition): Ditto.
(AccessibilityUIElement::speakAs): Ditto.
(AccessibilityUIElement::pathDescription const): Ditto.
(AccessibilityUIElement::stringForTextMarkerRange): Ditto.
(AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.

  • DumpRenderTree/AccessibilityUIElement.h: Use JSRetainPtr instead of

raw pointers for the results of the functions that create strings.
The old way was difficult to get right; the functions didn't even follow
the create/copy naming rule.

  • DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:

(_platformTypeConstructor): Use the adopt function instead of the
JSRetainPtr adopt constructor. Also nullptr instead of 0.

  • DumpRenderTree/GCController.cpp:

(GCController::makeWindowObject): Use adopt function instead of constructor.

  • DumpRenderTree/TestRunner.cpp:

(pathToLocalResourceCallback): Use adopt function instead of constructor.
(addDisallowedURLCallback): Ditto.
(addURLToRedirectCallback): Ditto.
(clearApplicationCacheForOriginCallback): Ditto.
(applicationCacheDiskUsageForOriginCallback): Ditto.
(decodeHostNameCallback): Don't adopt at this level.
(encodeHostNameCallback): Ditto.
(execCommandCallback): Use adopt instead of JSRetainPtr::adopt.
(findStringCallback): Use adopt function instead of constructor.
(isCommandEnabledCallback): Ditto.
(overridePreferenceCallback): Ditto.
(queueLoadCallback): Ditto.
(queueLoadHTMLStringCallback): Ditto.
(queueLoadingScriptCallback): Ditto.
(queueNonLoadingScriptCallback): Ditto.
(setAuthenticationPasswordCallback): Ditto.
(setAuthenticationUsernameCallback): Ditto.
(setDomainRelaxationForbiddenForURLSchemeCallback): Ditto.
(setMockGeolocationPositionUnavailableErrorCallback): Ditto.
(setPOSIXLocaleCallback): Ditto.
(setPersistentUserStyleSheetLocationCallback): Ditto.
(setUserStyleSheetLocationCallback): Ditto.
(setValueForUserCallback): Ditto.
(setWillSendRequestClearHeaderCallback): Ditto.
(setPageVisibilityCallback): Ditto.
(evaluateInWebInspectorCallback): Ditto.
(evaluateScriptInIsolatedWorldCallback): Ditto.
(evaluateScriptInIsolatedWorldAndReturnValueCallback): Ditto.
(addOriginAccessWhitelistEntryCallback): Ditto.
(removeOriginAccessWhitelistEntryCallback): Ditto.
(setScrollbarPolicyCallback): Ditto.
(addUserScriptCallback): Ditto.
(addUserStyleSheetCallback): Ditto.
(apiTestNewWindowDataLoadBaseURLCallback): Ditto.
(authenticateSessionCallback): Ditto.
(getTitleTextDirectionCallback): Ditto.
(getInspectorTestStubURLCallback): Ditto.
(simulateLegacyWebNotificationClickCallback): Ditto.
(setTextDirectionCallback): Ditto.
(grantWebNotificationPermissionCallback): Ditto.
(denyWebNotificationPermissionCallback): Ditto.
(accummulateLogsForChannel): Ditto.
(runUIScriptCallback): Ditto.
(TestRunner::makeWindowObject): Ditto.
(TestRunner::uiScriptDidComplete): Ditto.
(TestRunner::setOpenPanelFiles): Ditto.

  • DumpRenderTree/TestRunner.h: Use JSRetainPtr instead of

raw pointers for the results of the functions that create strings.

  • DumpRenderTree/ios/AccessibilityControllerIOS.mm:

(AccessibilityController::platformName const): Use the adopt
function instead of the adopt constructor.

  • DumpRenderTree/ios/AccessibilityUIElementIOS.mm:

(createEmptyJSString): Added. This helper function makes reduces the
repetitive code to create empty strings.
(concatenateAttributeAndValue): Changed to return a JSRetainPtr.
(AccessibilityUIElement::identifier): Ditto.
(AccessibilityUIElement::traits): Ditto.
(AccessibilityUIElement::url): Ditto.
(AccessibilityUIElement::speakAs): Ditto.
(AccessibilityUIElement::stringForSelection): Ditto.
(AccessibilityUIElement::stringForRange): Ditto.
(AccessibilityUIElement::attributedStringForRange): Ditto.
(AccessibilityUIElement::attributedStringForElement): Ditto.
(AccessibilityUIElement::pathDescription const): Ditto.
(AccessibilityUIElement::stringForTextMarkerRange): Ditto.
(AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
(AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
(AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
(AccessibilityUIElement::attributesOfChildren): Ditto.
(AccessibilityUIElement::allAttributes): Ditto.
(AccessibilityUIElement::stringAttributeValue): Ditto.
(AccessibilityUIElement::parameterizedAttributeNames): Ditto.
(AccessibilityUIElement::role): Ditto.
(AccessibilityUIElement::subrole): Ditto.
(AccessibilityUIElement::roleDescription): Ditto.
(AccessibilityUIElement::computedRoleString): Ditto.
(AccessibilityUIElement::title): Ditto.
(AccessibilityUIElement::description): Ditto.
(AccessibilityUIElement::orientation const): Ditto.
(AccessibilityUIElement::stringValue): Ditto.
(AccessibilityUIElement::language): Ditto.
(AccessibilityUIElement::helpText const): Ditto.
(AccessibilityUIElement::valueDescription): Ditto.
(AccessibilityUIElement::ariaDropEffects const): Ditto.
(AccessibilityUIElement::boundsForRange): Ditto.
(AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
(AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(AccessibilityUIElement::attributesOfColumns): Ditto.
(AccessibilityUIElement::attributesOfRows): Ditto.
(AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(AccessibilityUIElement::attributesOfHeader): Ditto.
(AccessibilityUIElement::rowIndexRange): Ditto.
(AccessibilityUIElement::columnIndexRange): Ditto.
(AccessibilityUIElement::selectedTextRange): Ditto.
(AccessibilityUIElement::accessibilityValue const): Ditto.
(AccessibilityUIElement::documentEncoding): Ditto.
(AccessibilityUIElement::documentURI): Ditto.
(AccessibilityUIElement::selectTextWithCriteria): Ditto.
(AccessibilityUIElement::classList const): Ditto.

  • DumpRenderTree/mac/AccessibilityCommonMac.h: Changed the

createJSStringRef method to return a JSRetainPtr.

  • DumpRenderTree/mac/AccessibilityCommonMac.mm:

(-[NSString createJSStringRef]): Ditto.
(searchPredicateParameterizedAttributeForSearchCriteria): Use the
adopt function instead of the adopt constructor.

  • DumpRenderTree/mac/AccessibilityControllerMac.mm:

(AccessibilityController::platformName const): Ditto.

  • DumpRenderTree/mac/AccessibilityNotificationHandler.mm:

(-[NSString createJSStringRef]): Return a JSRetainPtr.
(makeValueRefForValue): Updated for the above, no adopt needed here now.
(makeObjectRefForDictionary): Ditto.
(-[AccessibilityNotificationHandler _notificationReceived:]): Ditto.

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(createEmptyJSString): Added. This helper function makes reduces the
repetitive code to create empty strings.
(concatenateAttributeAndValue): Changed to return a JSRetainPtr.
(descriptionOfElements): Ditto.
(selectTextParameterizedAttributeForCriteria): Ditto.
(AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
(AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
(AccessibilityUIElement::attributesOfChildren): Ditto.
(AccessibilityUIElement::allAttributes): Ditto.
(AccessibilityUIElement::stringAttributeValue): Ditto.
(AccessibilityUIElement::parameterizedAttributeNames): Ditto.
(AccessibilityUIElement::role): Ditto.
(AccessibilityUIElement::subrole): Ditto.
(AccessibilityUIElement::roleDescription): Ditto.
(AccessibilityUIElement::computedRoleString): Ditto.
(AccessibilityUIElement::title): Ditto.
(AccessibilityUIElement::description): Ditto.
(AccessibilityUIElement::orientation const): Ditto.
(AccessibilityUIElement::stringValue): Ditto.
(AccessibilityUIElement::language): Ditto.
(AccessibilityUIElement::helpText const): Ditto.
(AccessibilityUIElement::valueDescription): Ditto.
(AccessibilityUIElement::speakAs): Ditto.
(AccessibilityUIElement::classList const): Ditto.
(AccessibilityUIElement::ariaDropEffects const): Ditto.
(AccessibilityUIElement::rangeForLine): Ditto.
(AccessibilityUIElement::rangeForPosition): Ditto.
(AccessibilityUIElement::boundsForRange): Ditto.
(AccessibilityUIElement::stringForRange): Ditto.
(AccessibilityUIElement::attributedStringForRange): Ditto.
(AccessibilityUIElement::selectTextWithCriteria): Ditto.
(AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
(AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(AccessibilityUIElement::attributesOfColumns): Ditto.
(AccessibilityUIElement::attributesOfRows): Ditto.
(AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(AccessibilityUIElement::attributesOfHeader): Ditto.
(AccessibilityUIElement::rowIndexRange): Ditto.
(AccessibilityUIElement::columnIndexRange): Ditto.
(AccessibilityUIElement::pathDescription const): Ditto.
(AccessibilityUIElement::selectedTextRange): Ditto.
(AccessibilityUIElement::accessibilityValue const): Ditto.
(AccessibilityUIElement::documentEncoding): Ditto.
(AccessibilityUIElement::documentURI): Ditto.
(AccessibilityUIElement::url): Ditto.
(AccessibilityUIElement::stringForTextMarkerRange): Ditto.
(createJSStringRef): Ditto.
(AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
(AccessibilityUIElement::supportedActions): Ditto.
(AccessibilityUIElement::mathPostscriptsDescription const): Ditto.
(AccessibilityUIElement::mathPrescriptsDescription const): Ditto.

  • DumpRenderTree/mac/FrameLoadDelegate.mm:

(-[FrameLoadDelegate didClearWindowObjectForFrame:inIsolatedWorld:]):
Use the adopt function instead of the adopt constructor.

  • DumpRenderTree/mac/TestRunnerMac.mm:

(originsArrayToJS): Ditto.
(TestRunner::copyDecodedHostName): Return a JSRetainPtr.
(TestRunner::copyEncodedHostName): Ditto.
(TestRunner::pathToLocalResource): Ditto.
(TestRunner::queueLoad): Use adopt function instead of constructor.
(TestRunner::findString): Ditto.
(TestRunner::inspectorTestStubURL): Return a JSRetainPtr.

  • DumpRenderTree/win/AccessibilityControllerWin.cpp:

(AccessibilityController::winNotificationReceived): Use adopt function
instead of adopt constructor.
(AccessibilityController::platformName const): Ditto.

  • DumpRenderTree/win/AccessibilityUIElementWin.cpp:

(createEmptyJSString): Added. This helper function makes reduces the
repetitive code to create empty strings.
(AccessibilityUIElement::allAttributes): Changed to return a JSRetainPtr.
(AccessibilityUIElement::attributesOfLinkedUIElements): Ditto.
(AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
(AccessibilityUIElement::attributesOfChildren): Ditto.
(AccessibilityUIElement::parameterizedAttributeNames): Ditto.
(AccessibilityUIElement::role): Ditto.
(AccessibilityUIElement::subrole): Ditto.
(AccessibilityUIElement::roleDescription): Ditto.
(AccessibilityUIElement::computedRoleString): Ditto.
(AccessibilityUIElement::title): Ditto.
(AccessibilityUIElement::description): Ditto.
(AccessibilityUIElement::stringValue): Ditto.
(AccessibilityUIElement::language): Ditto.
(AccessibilityUIElement::helpText const): Ditto.
(AccessibilityUIElement::valueDescription): Ditto.
(AccessibilityUIElement::ariaDropEffects const): Ditto.
(AccessibilityUIElement::orientation const): Ditto.
(AccessibilityUIElement::attributesOfColumnHeaders): Ditto.
(AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(AccessibilityUIElement::attributesOfColumns): Ditto.
(AccessibilityUIElement::attributesOfRows): Ditto.
(AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(AccessibilityUIElement::attributesOfHeader): Ditto.
(AccessibilityUIElement::rowIndexRange): Ditto.
(AccessibilityUIElement::columnIndexRange): Ditto.
(AccessibilityUIElement::boundsForRange): Ditto.
(AccessibilityUIElement::stringForRange): Ditto.
(AccessibilityUIElement::attributedStringForRange): Ditto.
(AccessibilityUIElement::selectTextWithCriteria): Ditto.
(AccessibilityUIElement::selectedTextRange): Ditto.
(AccessibilityUIElement::stringAttributeValue): Ditto.
(AccessibilityUIElement::accessibilityValue const): Ditto.
(AccessibilityUIElement::documentEncoding): Ditto.
(AccessibilityUIElement::documentURI): Ditto.
(AccessibilityUIElement::url): Ditto.
(AccessibilityUIElement::classList const): Ditto.

  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::copyDecodedHostName): Changed to return a JSRetainPtr.
(TestRunner::copyEncodedHostName): Ditto.
(TestRunner::pathToLocalResource): Ditto.
(TestRunner::queueLoad): Ditto.
(TestRunner::findString): Ditto.
(TestRunner::inspectorTestStubURL): Ditto.

  • TestRunnerShared/Bindings/JSWrapper.h:

(WTR::setProperty): Use adopt function instead of constructor.

  • TestRunnerShared/UIScriptContext/UIScriptContext.cpp:

(UIScriptContext::UIScriptContext): Ditto.
(UIScriptContext::runUIScript): Ditto.

  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::toDeviceOrientation): Ditto.

  • TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:

(nsTextCheckingType): Changed this function to not take an rvalue
reference to a JSRetainPtr since it doesn't take ownership.
(-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Updated
for the above change.

  • TestWebKitAPI/JavaScriptTest.cpp:

(TestWebKitAPI::javaScriptCallback): Use adopt function instead of
adopt member function.

  • TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp: Removed unneeded include.
  • TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm: Ditto.
  • TestWebKitAPI/Tests/mac/DOMNodeFromJSObject.mm: Use adopt function instead of

adopt constructor.

  • TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm: Ditto.
  • WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:

Removed unneeded includes.

  • WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp: Ditto.
  • WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp: Ditto.
  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: Ditto.
  • WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:

(_platformTypeConstructor): Use the adopt function instead of the
JSRetainPtr adopt constructor. Also nullptr instead of 0.

  • WebKitTestRunner/InjectedBundle/EventSendingController.cpp:

(WTR::arrayLength): Use adopt function instead of constructor.
(WTR::parseModifierArray): Ditto.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::propertyValue): Ditto.
(WTR::dumpPath): Ditto.
(WTR::toJS): Ditto.

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::findString): Ditto.
(WTR::TestRunner::statisticsDidRunTelemetryCallback): Ditto.
(WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback): Ditto.
(WTR::TestRunner::setOpenPanelFiles): Ditto.

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:

(WTR::AccessibilityController::platformName): Ditto.

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(-[NSString createJSStringRef]): Return a JSRetainPtr.
This fixes storage leaks in many functions below, which were using
the create function and putting the value right into a JSRetainPtr
without adoption.
(WTR::createEmptyJSString): Added. This helper function reduces the
repetitive code to create empty strings.
(WTR::concatenateAttributeAndValue): Return a JSRetainPtr.
(WTR::AccessibilityUIElement::attributesOfLinkedUIElements):
Use createEmptyJSString, fixing a storage leak due to missing adoption.
(WTR::AccessibilityUIElement::attributesOfDocumentLinks): Ditto.
(WTR::AccessibilityUIElement::attributesOfChildren): Ditto.
(WTR::AccessibilityUIElement::allAttributes): Ditto.
(WTR::AccessibilityUIElement::stringAttributeValue): Ditto.
(WTR::AccessibilityUIElement::parameterizedAttributeNames): Ditto.
(WTR::AccessibilityUIElement::role): Ditto.
(WTR::AccessibilityUIElement::subrole): Ditto.
(WTR::AccessibilityUIElement::roleDescription): Ditto.
(WTR::AccessibilityUIElement::computedRoleString): Ditto.
(WTR::AccessibilityUIElement::title): Ditto.
(WTR::AccessibilityUIElement::orientation const): Ditto.
(WTR::AccessibilityUIElement::language): Ditto.
(WTR::AccessibilityUIElement::valueDescription): Ditto.
(WTR::AccessibilityUIElement::ariaDropEffects const): Ditto.
(WTR::AccessibilityUIElement::boundsForRange): Ditto.
(WTR::AccessibilityUIElement::stringForRange): Removed unneeded null check.
(WTR::AccessibilityUIElement::attributedStringForRange): Ditto.
(WTR::AccessibilityUIElement::attributesOfColumnHeaders):
Use createEmptyJSString, fixing a storage leak due to missing adoption.
(WTR::AccessibilityUIElement::attributesOfRowHeaders): Ditto.
(WTR::AccessibilityUIElement::attributesOfColumns): Ditto.
(WTR::AccessibilityUIElement::attributesOfRows): Ditto.
(WTR::AccessibilityUIElement::attributesOfVisibleCells): Ditto.
(WTR::AccessibilityUIElement::attributesOfHeader): Ditto.
(WTR::AccessibilityUIElement::selectedTextRange): Ditto.
(WTR::AccessibilityUIElement::accessibilityValue const): Ditto.
(WTR::AccessibilityUIElement::documentEncoding): Ditto.
(WTR::AccessibilityUIElement::documentURI): Ditto.
(WTR::AccessibilityUIElement::stringForSelection): Removed unneeded
null check.
(WTR::AccessibilityUIElement::stringForTextMarkerRange):
Use createEmptyJSString, fixing a storage leak due to missing adoption.

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h:

Use JSRetainPtr for the return value of createJSStringRef.

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm:

(-[NSString createJSStringRef]): Ditto.
(WTR::searchPredicateParameterizedAttributeForSearchCriteria): Use the
adopt function instead of the adopt constructor.

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:

(WTR::AccessibilityController::platformName): Ditto

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:

(-[NSString createJSStringRef]): Return a JSRetainPtr.
(makeValueRefForValue): Updated for above by removing adopt.
(makeObjectRefForDictionary): Ditto.
(-[AccessibilityNotificationHandler _notificationReceived:]): Ditto.

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::createEmptyJSString): Added. This helper function makes reduces the
repetitive code to create empty strings.
(WTR::concatenateAttributeAndValue): Return a JSRetainPtr.
(WTR::descriptionOfElements): Ditto.
(WTR::selectTextParameterizedAttributeForCriteria): Ditto.
(WTR::AccessibilityUIElement::accessibilityValue const): Use createEmptyJSString,
fixing a storage leak due to missing adoption.
(WTR::AccessibilityUIElement::documentEncoding): Ditto.
(WTR::AccessibilityUIElement::documentURI): Ditto.
(WTR::createJSStringRef): Return a JSRetainPtr.

  • WebKitTestRunner/StringFunctions.h:

(WTR::toWK): Take a const& to eliminate a little bit of reference count churn.
(WTR::toJS): Use the adopt function instead of the constructor.

7:08 AM Changeset in webkit [236031] by rwlbuis@webkit.org
  • 7 edits in trunk

2018-09-15 Rob Buis <rbuis@igalia.com>

XMLHttpRequest::createResponseBlob() should create a Blob with type for empty response
https://bugs.webkit.org/show_bug.cgi?id=189627

Reviewed by Alexey Proskuryakov.

Right now we return an empty Blob without type when the response is empty, but
it should always include the type [1].

Test: web-platform-tests/xhr/overridemimetype-blob.html

[1] https://xhr.spec.whatwg.org/#blob-response

  • xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createResponseBlob):

Sep 14, 2018:

6:20 PM Changeset in webkit [236030] by Matt Lewis
  • 9 edits in trunk/Source/WebKit

Unreviewed, rolling out r236020.

This caused an api failure on High Sierra

Reverted changeset:

"Refactoring related to Safe Browsing"
https://bugs.webkit.org/show_bug.cgi?id=189631
https://trac.webkit.org/changeset/236020

5:46 PM Changeset in webkit [236029] by Basuke Suzuki
  • 10 edits in trunk/Source

[Curl] Bug fix on some inaccurate values in NetworkLoadMetrics.
https://bugs.webkit.org/show_bug.cgi?id=189530

Reviewed by Alex Christensen.

Curl port uses the start time libcurl provided. But there's a lug between main thread and Curl thread.
Record the start time of request instead of libcurl's start timing and use it to measure the metrics.
Source/WebCore:

Also respondEnd was not correctly recorded and fixed.

No new tests because it cannot be measured from DRT.

  • platform/network/ResourceHandleInternal.h:
  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::getNetworkLoadMetrics):

  • platform/network/curl/CurlContext.h:
  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::start):
(WebCore::CurlRequest::setupTransfer):
(WebCore::CurlRequest::didCompleteTransfer):
(WebCore::CurlRequest::updateNetworkLoadMetrics):

  • platform/network/curl/CurlRequest.h:

(WebCore::CurlRequest::setStartTime):

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::restartRequestWithCredential):
(WebCore::ResourceHandle::platformLoadResourceSynchronously):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::continueAfterWillSendRequest):

Source/WebKit:

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::NetworkDataTaskCurl):
(WebKit::NetworkDataTaskCurl::willPerformHTTPRedirection):
(WebKit::NetworkDataTaskCurl::restartWithCredential):

  • NetworkProcess/curl/NetworkDataTaskCurl.h:
5:39 PM Changeset in webkit [236028] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Source View doesn't scroll to show line when breakpoint is hit inside of <script> in HTML resource
https://bugs.webkit.org/show_bug.cgi?id=189638
<rdar://problem/43359278>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-09-14
Reviewed by Matt Baker.

Pausing in Document resources on page load have special considerations where we
may not receive their full content immediately, so we may synthesize inline script
content for the resource until we have full content. Unfortunately, when we get
full content and update the TextEditor we were losing the revealed position and
other editor information. This change specifically targets those cases, by
re-applying editor state when updating such a resource from partial to full content.

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype._contentAvailable):
Signal to the editor that when updating the content it should carry
over editor state. Only do this if we had partial content before.

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor):
(WI.TextEditor.prototype.set repeatReveal):
Provide a way to signal we should restore state when update the content.

(WI.TextEditor.set string.update):
(WI.TextEditor.prototype.set string):
When repeatReveal was enabled, restore editor state such as the
revealed location and text selection.

5:33 PM Changeset in webkit [236027] by Megan Gardner
  • 4 edits
    6 adds in trunk/LayoutTests

Additional tests for conic gradients
https://bugs.webkit.org/show_bug.cgi?id=189566

Reviewed by Simon Fraser.

Adding tests that actually test the gradient nature of gradients.
This is done by using an svg filter to consolidate the sections
of the gradient to sections we can actuall test the color of. Also,
the seams are clipped out, to reduce noise. Since gradients are
highly noise prone, this is the best way to check and make sure
that gradients are functional without sevear noise issues.

  • TestExpectations:
  • fast/gradients/conic-gradient-alpha-expected.html: Added.
  • fast/gradients/conic-gradient-alpha.html: Added.
  • fast/gradients/conic-gradient-expected.html: Added.
  • fast/gradients/conic-gradient-extended-stops-expected.html: Added.
  • fast/gradients/conic-gradient-extended-stops.html: Added.
  • fast/gradients/conic-gradient.html: Added.
  • platform/ios-12/TestExpectations:
  • platform/mac/TestExpectations:
5:22 PM Changeset in webkit [236026] by dino@apple.com
  • 2 edits in trunk/Tools

Add Justin Michaud.

  • Scripts/webkitpy/common/config/contributors.json:
5:05 PM Changeset in webkit [236025] by Justin Fan
  • 8 edits in trunk

WebGL 2 conformance: rgb-format-support.html
https://bugs.webkit.org/show_bug.cgi?id=189610
<rdar://problem/44403343>

Reviewed by Dean Jackson.

Source/WebCore:

Implementing getInternalformatParameter (emulating on macOS) and updating
renderbufferStorage{Multisample} for WebGL 2 conformance.

Test: webgl/2.0.0/conformance2/rendering/rgb-format-support.html enabled.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::isRenderableInternalformat):
(WebCore::WebGL2RenderingContext::getInternalformatParameter):
(WebCore::WebGL2RenderingContext::renderbufferStorageMultisample):
(WebCore::WebGL2RenderingContext::renderbufferStorage):
(WebCore::WebGL2RenderingContext::baseInternalFormatFromInternalFormat):
(WebCore::WebGL2RenderingContext::isIntegerFormat):

  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::getInternalformativ):
(WebCore::GraphicsContext3D::renderbufferStorageMultisample):

LayoutTests:

Enabled rgb-format-support.html, and updated expectation for gl-teximage.html.

  • TestExpectations:
  • platform/mac/TestExpectations:
  • webgl/2.0.0/conformance2/rendering/rgb-format-support-expected.txt:
4:55 PM Changeset in webkit [236024] by commit-queue@webkit.org
  • 5 edits
    25 adds in trunk

Add support for spreadMethod=reflect and repeat on SVG gradients (for CoreGraphics platforms)
https://bugs.webkit.org/show_bug.cgi?id=5968

Source/WebCore:

Add support for spreadMethod=repeat and reflect. Also, the opacity of a gradient is now
the result of multiplying stop-opacity with the opacity of the color.

Patch by Justin Michaud <Justin Michaud> on 2018-09-14
Reviewed by Simon Fraser.

Tests: svg/gradients/spreadMethod-expected.svg

svg/gradients/spreadMethod.svg
svg/gradients/spreadMethodAlpha-expected.svg
svg/gradients/spreadMethodAlpha.svg
svg/gradients/spreadMethodClose0-expected-mismatch.svg
svg/gradients/spreadMethodClose0.svg
svg/gradients/spreadMethodClose1-expected-mismatch.svg
svg/gradients/spreadMethodClose1.svg
svg/gradients/spreadMethodClose2-expected.svg
svg/gradients/spreadMethodClose2.svg
svg/gradients/spreadMethodDiagonal-expected.svg
svg/gradients/spreadMethodDiagonal.svg
svg/gradients/spreadMethodDiagonal2-expected.svg
svg/gradients/spreadMethodDiagonal2.svg
svg/gradients/spreadMethodDuplicateStop-expected.svg
svg/gradients/spreadMethodDuplicateStop.svg
svg/gradients/spreadMethodReversed-expected.svg
svg/gradients/spreadMethodReversed.svg
svg/gradients/stopAlpha-expected.svg
svg/gradients/stopAlpha.svg

  • platform/graphics/cg/GradientCG.cpp:

(WebCore::Gradient::paint):

  • svg/SVGStopElement.cpp:

(WebCore::SVGStopElement::stopColorIncludingOpacity const):

LayoutTests:

Add new svg tests for linear gradients with spreadMethod, and alpha values specified in
both stop-opacity and color.

Patch by Justin Michaud <Justin Michaud> on 2018-09-14
Reviewed by Simon Fraser.

  • platform/mac/svg/W3C-SVG-1.1/pservers-grad-10-b-expected.png:
  • svg/gradients/spreadMethod-expected.svg: Added.
  • svg/gradients/spreadMethod.svg: Added.
  • svg/gradients/spreadMethodAlpha-expected.svg: Added.
  • svg/gradients/spreadMethodAlpha.svg: Added.
  • svg/gradients/spreadMethodClose0-expected-mismatch.svg: Added.
  • svg/gradients/spreadMethodClose0.svg: Added.
  • svg/gradients/spreadMethodClose1-expected-mismatch.svg: Added.
  • svg/gradients/spreadMethodClose1.svg: Added.
  • svg/gradients/spreadMethodClose2-expected.svg: Added.
  • svg/gradients/spreadMethodClose2.svg: Added.
  • svg/gradients/spreadMethodDiagonal-expected.svg: Added.
  • svg/gradients/spreadMethodDiagonal.svg: Added.
  • svg/gradients/spreadMethodDiagonal2-expected.svg: Added.
  • svg/gradients/spreadMethodDiagonal2.svg: Added.
  • svg/gradients/spreadMethodDuplicateStop-expected.svg: Added.
  • svg/gradients/spreadMethodDuplicateStop.svg: Added.
  • svg/gradients/spreadMethodReversed-expected.svg: Added.
  • svg/gradients/spreadMethodReversed.svg: Added.
  • svg/gradients/stopAlpha-expected.svg: Added.
  • svg/gradients/stopAlpha.svg: Added.
4:54 PM Changeset in webkit [236023] by Ross Kirsling
  • 3 edits in trunk/LayoutTests

[WinCairo] Unreviewed test gardening.

4:47 PM Changeset in webkit [236022] by sbarati@apple.com
  • 3 edits
    1 add in trunk

Don't dump OSRAvailabilityData in Graph::dump because a stale Availability may point to a Node that is already freed
https://bugs.webkit.org/show_bug.cgi?id=189628
<rdar://problem/39481690>

Reviewed by Mark Lam.

JSTests:

  • stress/verbose-failure-dont-graph-dump-availability-already-freed.js: Added.

(foo):

Source/JavaScriptCore:

An Availability may point to a Node. And that Node may be removed from
the graph, e.g, it's freed and its memory is no longer owned by Graph.
This patch makes it so we no longer dump this metadata by default. If
this metadata is interesting to you, you'll need to go in and change
Graph::dump to dump the needed metadata.

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):

4:15 PM Changeset in webkit [236021] by commit-queue@webkit.org
  • 9 edits in trunk/LayoutTests

Add stability to tests for web API statistics
https://bugs.webkit.org/show_bug.cgi?id=189560
<rdar://problem/44396413>

Patch by Woodrow Wang <woodrow_wang@apple.com> on 2018-09-14
Reviewed by Chris Dumez.

Using js-test added some data to the font loading collection, which made the tests dependent on
js-test.js. Thus, if any changes were made to js-test.js the tests for web API statistics would
fail. This patch removes the dependency on js-test. Also, this patch speeds up each test
significantly by bypassing the timer in ResourceLoadObserver for recording the statistics.

  • http/tests/webAPIStatistics/canvas-read-and-write-data-collection-expected.txt:
  • http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html:
  • http/tests/webAPIStatistics/font-load-data-collection-expected.txt:
  • http/tests/webAPIStatistics/font-load-data-collection.html:
  • http/tests/webAPIStatistics/navigator-functions-accessed-data-collection-expected.txt:
  • http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html:
  • http/tests/webAPIStatistics/screen-functions-accessed-data-collection-expected.txt:
  • http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html:
3:09 PM Changeset in webkit [236020] by commit-queue@webkit.org
  • 9 edits in trunk/Source/WebKit

Refactoring related to Safe Browsing
https://bugs.webkit.org/show_bug.cgi?id=189631

Patch by Alex Christensen <achristensen@webkit.org> on 2018-09-14
Reviewed by Tim Horton.

Make SafeBrowsingResult RefCounted.
Move logic from an unnamed lambda to WebPageProxy::receivedNavigationPolicyDecision.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::beginSafeBrowsingCheck):
(WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Deleted.
(WebKit::WebPageProxy::addPlatformLoadParameters): Deleted.
(WebKit::WebPageProxy::createSandboxExtensionsIfNeeded): Deleted.
(WebKit::WebPageProxy::startDrag): Deleted.
(WebKit::WebPageProxy::setPromisedDataForImage): Deleted.
(WebKit::WebPageProxy::setDragCaretRect): Deleted.
(WebKit::WebPageProxy::platformRegisterAttachment): Deleted.
(WebKit::WebPageProxy::platformCloneAttachment): Deleted.

  • UIProcess/SafeBrowsingResult.h:

(WebKit::SafeBrowsingResult::create):

  • UIProcess/WebFramePolicyListenerProxy.cpp:

(WebKit::WebFramePolicyListenerProxy::didReceiveSafeBrowsingResults):

  • UIProcess/WebFramePolicyListenerProxy.h:
  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::setUpPolicyListenerProxy):

  • UIProcess/WebFrameProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
(WebKit::WebPageProxy::decidePolicyForResponse):

  • UIProcess/WebPageProxy.h:
2:59 PM Changeset in webkit [236019] by ggaren@apple.com
  • 2 edits in trunk/Source/WebKit

Clarify the configuration used by WKUIDelegate's createWebViewWithConfiguration
https://bugs.webkit.org/show_bug.cgi?id=189634

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/WKUIDelegate.h:
2:00 PM Changeset in webkit [236018] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Refactor some ForInContext code for better encapsulation.
https://bugs.webkit.org/show_bug.cgi?id=189626
<rdar://problem/44466415>

Reviewed by Keith Miller.

  1. Add a ForInContext::m_type field to store the context type. This does not increase the class size, but eliminates the need for a virtual call to get the type.

Note: we still need a virtual destructor because we'll be mingling
IndexedForInContexts and StructureForInContexts in the BytecodeGenerator::m_forInContextStack.

  1. Add ForInContext::isIndexedForInContext() and ForInContext::isStructureForInContext() convenience methods.
  1. Add ForInContext::asIndexedForInContext() and ForInContext::asStructureForInContext() to do the casting to the subclass types. This ensures that we'll properly assert that the casting is legal.
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitGetByVal):
(JSC::BytecodeGenerator::popIndexedForInScope):
(JSC::BytecodeGenerator::popStructureForInScope):

  • bytecompiler/BytecodeGenerator.h:

(JSC::ForInContext::type const):
(JSC::ForInContext::isIndexedForInContext const):
(JSC::ForInContext::isStructureForInContext const):
(JSC::ForInContext::asIndexedForInContext):
(JSC::ForInContext::asStructureForInContext):
(JSC::ForInContext::ForInContext):
(JSC::StructureForInContext::StructureForInContext):
(JSC::IndexedForInContext::IndexedForInContext):
(JSC::ForInContext::~ForInContext): Deleted.

1:36 PM Changeset in webkit [236017] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Unreviewed, attempt to fix the iOSMac build after r236015.

  • platform/graphics/cv/PixelBufferResizer.mm:

(WebCore::PixelBufferResizer::PixelBufferResizer):

12:49 PM Changeset in webkit [236016] by Simon Fraser
  • 34 edits in trunk/Source

Make GraphicsLayers ref-counted, so their tree can persist when disconnected from RenderLayerBackings
https://bugs.webkit.org/show_bug.cgi?id=189521

Reviewed by Tim Horton.
Source/WebCore:

Make GraphicsLayer be RefCounted<GraphicsLayer>. GraphicsLayers own their children, via a Vector<Ref<GraphicsLayer>>.

RenderLayerBacking and other holders of GraphicsLayers use RefPtr<GraphicsLayer>.

All the other changes are just to adapt to the new ownership patterns.

I verified that no GraphicsLayers were leaked or abandoned after this change.

No behavior change.

  • page/PageOverlayController.cpp:

(WebCore::PageOverlayController::layerWithDocumentOverlays):
(WebCore::PageOverlayController::layerWithViewOverlays):
(WebCore::PageOverlayController::installPageOverlay):
(WebCore::PageOverlayController::uninstallPageOverlay):
(WebCore::PageOverlayController::setPageOverlayNeedsDisplay):
(WebCore::PageOverlayController::didChangeViewSize):
(WebCore::PageOverlayController::didChangeDocumentSize):
(WebCore::PageOverlayController::didChangeSettings):
(WebCore::PageOverlayController::paintContents):
(WebCore::PageOverlayController::didChangeOverlayFrame):
(WebCore::PageOverlayController::didChangeOverlayBackgroundColor):

  • page/PageOverlayController.h:
  • page/mac/ServicesOverlayController.h:

(WebCore::ServicesOverlayController::Highlight::layer const):

  • page/mac/ServicesOverlayController.mm:

(WebCore::ServicesOverlayController::Highlight::Highlight):
(WebCore::ServicesOverlayController::Highlight::invalidate):
(WebCore::ServicesOverlayController::Highlight::fadeIn):
(WebCore::ServicesOverlayController::Highlight::fadeOut):
(WebCore::ServicesOverlayController::Highlight::didFinishFadeOutAnimation):
(WebCore::ServicesOverlayController::determineActiveHighlight):

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::GraphicsLayer):
(WebCore::GraphicsLayer::willBeDestroyed):
(WebCore::GraphicsLayer::setChildren):
(WebCore::GraphicsLayer::addChild):
(WebCore::GraphicsLayer::addChildAtIndex):
(WebCore::GraphicsLayer::addChildBelow):
(WebCore::GraphicsLayer::addChildAbove):
(WebCore::GraphicsLayer::replaceChild):
(WebCore::GraphicsLayer::removeAllChildren):
(WebCore::GraphicsLayer::removeFromParent):
(WebCore::GraphicsLayer::setMaskLayer):
(WebCore::GraphicsLayer::noteDeviceOrPageScaleFactorChangedIncludingDescendants):
(WebCore::GraphicsLayer::distributeOpacity):
(WebCore::GraphicsLayer::traverse):
(WebCore::dumpChildren):

  • platform/graphics/GraphicsLayer.h:

(WebCore::GraphicsLayer::children const):
(WebCore::GraphicsLayer::children):
(WebCore::GraphicsLayer::maskLayer const):
(WebCore::GraphicsLayer::replicaLayer const):
(WebCore::GraphicsLayer::beingDestroyed const):
(WebCore::GraphicsLayer:: const): Deleted.

  • platform/graphics/GraphicsLayerFactory.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerCA::setChildren):
(WebCore::GraphicsLayerCA::addChild):
(WebCore::GraphicsLayerCA::addChildAtIndex):
(WebCore::GraphicsLayerCA::addChildBelow):
(WebCore::GraphicsLayerCA::addChildAbove):
(WebCore::GraphicsLayerCA::replaceChild):
(WebCore::GraphicsLayerCA::setMaskLayer):
(WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush const):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::updateSublayerList):
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerTextureMapper::setChildren):
(WebCore::GraphicsLayerTextureMapper::addChild):
(WebCore::GraphicsLayerTextureMapper::addChildAtIndex):
(WebCore::GraphicsLayerTextureMapper::addChildAbove):
(WebCore::GraphicsLayerTextureMapper::addChildBelow):
(WebCore::GraphicsLayerTextureMapper::replaceChild):
(WebCore::GraphicsLayerTextureMapper::setMaskLayer):
(WebCore::GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers):

  • platform/graphics/texmap/GraphicsLayerTextureMapper.h:
  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::GraphicsLayer::create):
(WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
(WebCore::CoordinatedGraphicsLayer::addChild):
(WebCore::CoordinatedGraphicsLayer::addChildAtIndex):
(WebCore::CoordinatedGraphicsLayer::addChildAbove):
(WebCore::CoordinatedGraphicsLayer::addChildBelow):
(WebCore::CoordinatedGraphicsLayer::replaceChild):
(WebCore::CoordinatedGraphicsLayer::setMaskLayer):
(WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
(WebCore::CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
  • platform/graphics/win/GraphicsLayerDirect2D.cpp:

(WebCore::GraphicsLayer::create):
(WebCore::GraphicsLayerDirect2D::GraphicsLayerDirect2D): Deleted.
(WebCore::GraphicsLayerDirect2D::initialize): Deleted.
(WebCore::GraphicsLayerDirect2D::~GraphicsLayerDirect2D): Deleted.
(WebCore::GraphicsLayerDirect2D::setNeedsDisplay): Deleted.
(WebCore::GraphicsLayerDirect2D::setNeedsDisplayInRect): Deleted.

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::updateConfiguration):
(WebCore::RenderLayerBacking::updateInternalHierarchy):
(WebCore::RenderLayerBacking::updateMaskingLayer):
(WebCore::RenderLayerBacking::updateChildClippingStrategy):
(WebCore::RenderLayerBacking::updateScrollingLayers):

  • rendering/RenderLayerBacking.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
(WebCore::RenderLayerCompositor::setCompositingParent):
(WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
(WebCore::RenderLayerCompositor::parentFrameContentLayers):
(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):
(WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):

  • rendering/RenderLayerCompositor.h:

Source/WebKit:

Make GraphicsLayer be RefCounted<GraphicsLayer>. GraphicsLayers own their children, via a Vector<Ref<GraphicsLayer>>.

RenderLayerBacking and other holders of GraphicsLayers use RefPtr<GraphicsLayer>.

Added some helper functions to null out a RefPtr<GraphicsLayer> after removing from the tree,
clearing the client. GraphicsLayer.m_client becomes a pointer, so it can be set to point to a singleton
empty client when a GraphicsLayer gets detached from its owner. More explicit layer unparenting,
and removed some unnecessary parent checks, and redundant unparenting.

Other changes are just to adapt to the new ownership patterns.

I verified that no GraphicsLayers were leaked or abandoned after this change.

  • WebProcess/WebCoreSupport/WebInspectorClient.cpp:

(WebKit::WebInspectorClient::~WebInspectorClient):
(WebKit::WebInspectorClient::showPaintRect):
(WebKit::WebInspectorClient::animationEndedForLayer):

  • WebProcess/WebCoreSupport/WebInspectorClient.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::createGraphicsLayer):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:
  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::updateRootLayers):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

12:01 PM Changeset in webkit [236015] by eric.carlson@apple.com
  • 50 edits
    1 copy
    2 adds in trunk

Support arbitrary video resolution in getUserMedia API
https://bugs.webkit.org/show_bug.cgi?id=178109
<rdar://problem/35083128>

Reviewed by Youenn Fablet.

Source/WebCore:

Support arbitrary video resolutions by configuring the camera to capture at the closest
larger size it supports and scaling/cropping frames as necessary.

No new tests, existing tests updated.

  • Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
  • Modules/webaudio/MediaStreamAudioSource.cpp:

(WebCore::MediaStreamAudioSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::MediaStreamAudioSource::settings): Ditto.
(WebCore::MediaStreamAudioSource::capabilities const): Deleted.
(WebCore::MediaStreamAudioSource::settings const): Deleted.

  • Modules/webaudio/MediaStreamAudioSource.h:
  • SourcesCocoa.txt: Add PixelBufferResizer.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • platform/cocoa/CoreVideoSoftLink.h:
  • platform/cocoa/VideoToolboxSoftLink.cpp:
  • platform/cocoa/VideoToolboxSoftLink.h:
  • platform/graphics/cv/PixelBufferResizer.h: Added.

(WebCore::PixelBufferResizer::canResizeTo):

  • platform/graphics/cv/PixelBufferResizer.mm: Added.

(WebCore::PixelBufferResizer::PixelBufferResizer):
(WebCore::PixelBufferResizer::resize):

  • platform/mediastream/RealtimeIncomingAudioSource.cpp:

(WebCore::RealtimeIncomingAudioSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::RealtimeIncomingAudioSource::settings): Ditto.
(WebCore::RealtimeIncomingAudioSource::capabilities const): Deleted.
(WebCore::RealtimeIncomingAudioSource::settings const): Deleted.

  • platform/mediastream/RealtimeIncomingAudioSource.h:
  • platform/mediastream/RealtimeIncomingVideoSource.cpp:

(WebCore::RealtimeIncomingVideoSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::RealtimeIncomingVideoSource::settings): Ditto.
(WebCore::RealtimeIncomingVideoSource::capabilities const): Deleted.
(WebCore::RealtimeIncomingVideoSource::settings const): Deleted.

  • platform/mediastream/RealtimeIncomingVideoSource.h:
  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::supportsConstraint):
(WebCore::RealtimeMediaSource::supportsConstraint const): Deleted.

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::presets):
(WebCore::RealtimeVideoSource::setSupportedPresets):
(WebCore::standardVideoSizes):
(WebCore::RealtimeVideoSource::updateCapabilities): Make non-const, it wasn't helpful.
(WebCore::presetSupportsFrameRate):
(WebCore::RealtimeVideoSource::supportsCaptureSize):
(WebCore::RealtimeVideoSource::shouldUsePreset):
(WebCore::RealtimeVideoSource::bestSupportedSizeAndFrameRate):
(WebCore::RealtimeVideoSource::setSizeAndFrameRate):
(WebCore::RealtimeVideoSource::addSupportedCapabilities const): Deleted.

  • platform/mediastream/RealtimeVideoSource.h:

(WebCore::VideoPresetData::encode const):
(WebCore::VideoPresetData::decode):
(WebCore::VideoPreset::create):
(WebCore::VideoPreset::VideoPreset):
(WebCore::RealtimeVideoSource::prefersPreset):
(WebCore::RealtimeVideoSource::canResizeVideoFrames const):
(WebCore::RealtimeVideoSource::setDefaultSize):
(WebCore::RealtimeVideoSource::observedFrameRate const):
(WebCore::VideoPreset::encode const): Deleted.
(WebCore::VideoPreset::decode): Deleted.

  • platform/mediastream/mac/AVVideoCaptureSource.h:

(WebCore::AVVideoCaptureSource::videoPresets): Deleted.

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoPreset::create):
(WebCore::AVVideoPreset::AVVideoPreset):
(WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
(WebCore::AVVideoCaptureSource::settings):
(WebCore::AVVideoCaptureSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::AVVideoCaptureSource::setFrameRate):
(WebCore::AVVideoCaptureSource::prefersPreset):
(WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset):
(WebCore::AVVideoCaptureSource::frameDurationForFrameRate):
(WebCore::AVVideoCaptureSource::setupCaptureSession):
(WebCore::AVVideoCaptureSource::processNewFrame):
(WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
(WebCore::AVVideoCaptureSource::isFrameRateSupported):
(WebCore::AVVideoCaptureSource::generatePresets):
(WebCore::updateSizeMinMax): Deleted.
(WebCore::updateAspectRatioMinMax): Deleted.
(WebCore::AVVideoCaptureSource::settings const): Deleted.
(WebCore::AVVideoCaptureSource::capabilities const): Deleted.
(WebCore::AVVideoCaptureSource::sizeForPreset): Deleted.
(WebCore::AVVideoCaptureSource::setPreset): Deleted.
(WebCore::AVVideoCaptureSource::setSizeAndFrameRate): Deleted.
(WebCore::AVVideoCaptureSource::bestSessionPresetForVideoDimensions): Deleted.
(WebCore::AVVideoCaptureSource::supportsSizeAndFrameRate): Deleted.

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::CoreAudioCaptureSource::settings): Ditto.
(WebCore::CoreAudioCaptureSource::capabilities const): Deleted.
(WebCore::CoreAudioCaptureSource::settings const): Deleted.

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
  • platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:

(WebCore::DisplayCaptureSourceCocoa::capabilities): Make non-const, it wasn't helpful.
(WebCore::DisplayCaptureSourceCocoa::settings): Ditto.
(WebCore::DisplayCaptureSourceCocoa::capabilities const): Deleted.
(WebCore::DisplayCaptureSourceCocoa::settings const): Deleted.

  • platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
  • platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:

(WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer):
(WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer):
(WebCore::MockRealtimeVideoSourceMac::setSizeAndFrameRateWithPreset):

  • platform/mock/MockMediaDevice.h:

(WebCore::MockCameraProperties::decode):

  • platform/mock/MockRealtimeAudioSource.cpp:

(WebCore::MockRealtimeAudioSource::settings): Make non-const, it wasn't helpful.
(WebCore::MockRealtimeAudioSource::capabilities): Ditto.
(WebCore::MockRealtimeAudioSource::settings const): Deleted.
(WebCore::MockRealtimeAudioSource::capabilities const): Deleted.

  • platform/mock/MockRealtimeAudioSource.h:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::defaultDevices): Change video device presets to trigger resize code more often.

  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
(WebCore::MockRealtimeVideoSource::generatePresets):
(WebCore::MockRealtimeVideoSource::capabilities): Make non-const, it wasn't helpful.
(WebCore::MockRealtimeVideoSource::settings): Ditto.
(WebCore::MockRealtimeVideoSource::capabilities const): Deleted.
(WebCore::MockRealtimeVideoSource::settings const): Deleted.

  • platform/mock/MockRealtimeVideoSource.h:

Source/WebCore/PAL:

  • pal/cf/CoreMediaSoftLink.cpp:
  • pal/cf/CoreMediaSoftLink.h:

Source/WebKit:

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

LayoutTests:

  • fast/mediastream/MediaStreamTrack-getCapabilities-expected.txt:
  • fast/mediastream/apply-constraints-advanced-expected.txt:
  • fast/mediastream/apply-constraints-advanced.html:
  • fast/mediastream/apply-constraints-video.html:
11:47 AM Changeset in webkit [236014] by Ryan Haddad
  • 2 edits in trunk/Tools

bots should pass --clobber-old-results to run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=189623

Reviewed by Aakash Jain.

In order to ensure that bots to not produce confusing results due to transient execptions,
or run out of space if they continually hit an exception, old layout test results should be clobbered.

  • BuildSlaveSupport/build.webkit.org-config/steps.py:

(RunWebKitTests):

11:33 AM Changeset in webkit [236013] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Bug 189541 - Build error in FontDescriptionKey::computeHash when compiling FontTaggedSettings and FontCascadeFonts together
https://bugs.webkit.org/show_bug.cgi?id=189541

Patch by Frederic Wang <fwang@igalia.com> on 2018-09-14
Reviewed by Alex Christensen.

FontDescriptionKey::computeHash() from In FontCache.h requires implicit instantiation of the
FontTaggedSettings::hash() template function. This instantiation may happen before
FontTaggedSettings::hash() is actually fully specialized in FontTaggedSettings.cpp. To avoid
compiler errors when FontCache.h and FontTaggedSettings.cpp are in the same translation unit,
we declare full specialization of the hash() functions in FontTaggedSettings.h.

No new tests, behavior unchanged.

  • platform/graphics/FontCache.h: Explicitly include FontTaggedSettings to avoid possible future breakage.
  • platform/graphics/FontTaggedSettings.h: Declare full specialization of FontTaggedSettings::hash().
11:28 AM Changeset in webkit [236012] by Basuke Suzuki
  • 3 edits in trunk/Source/WebKit

[Curl][WebKit] Bug fix for continuously retrying with empty credentials.
https://bugs.webkit.org/show_bug.cgi?id=189601

Reviewed by Alex Christensen.

Added stop condition for empty credentials passed by client.

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::curlDidReceiveResponse):
(WebKit::NetworkDataTaskCurl::invokeDidReceiveResponse):
(WebKit::NetworkDataTaskCurl::tryHttpAuthentication):
(WebKit::NetworkDataTaskCurl::tryProxyAuthentication):

  • NetworkProcess/curl/NetworkDataTaskCurl.h:
11:17 AM Changeset in webkit [236011] by Ryan Haddad
  • 8 edits
    1 copy
    1 move
    1 add in trunk/Source

Unreviewed, rolling out r235990.

Introduced TestWebKitAPI.NowPlayingTest timeouts on iOS

Reverted changeset:

"Enable USE_MEDIAREMOTE on iOS"
https://bugs.webkit.org/show_bug.cgi?id=189096
https://trac.webkit.org/changeset/235990

10:03 AM Changeset in webkit [236010] by jer.noble@apple.com
  • 7 edits in trunk/Source

Turn SourceBufferChangeTypeEnabled on by default
https://bugs.webkit.org/show_bug.cgi?id=189527

Reviewed by Eric Carlson.

Source/WebCore:

  • page/Settings.yaml:

Source/WebKit:

  • Shared/WebPreferences.yaml:
  • UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WebKitLegacy/mac:

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

9:50 AM Changeset in webkit [236009] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, speculative WPE build fix after r236004
https://bugs.webkit.org/show_bug.cgi?id=189545

  • UIProcess/API/wpe/WebKitScriptDialog.h:
9:44 AM Changeset in webkit [236008] by webkit@devinrousso.com
  • 19 edits
    2 adds in trunk

Web Inspector: Record actions performed on ImageBitmapRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=181341

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/Recording.json:
  • inspector/scripts/codegen/generator.py:

Source/WebCore:

Test: inspector/canvas/recording-bitmaprenderer.html

  • html/canvas/ImageBitmapRenderingContext.idl:
  • inspector/InspectorCanvas.cpp:

(WebCore::shouldSnapshotBitmapRendererAction):
(WebCore::InspectorCanvas::recordAction):

  • inspector/agents/InspectorCanvasAgent.cpp:

(WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):

  • page/PageConsoleClient.cpp:

(canvasRenderingContext):

Source/WebInspectorUI:

  • UserInterface/Models/Recording.js:

(WI.Recording.fromPayload):
(WI.Recording.prototype.createContext):

  • UserInterface/Models/RecordingAction.js:

(WI.RecordingAction._prototypeForType):
(WI.RecordingAction.prototype.getImageParameters):

  • UserInterface/Views/RecordingActionTreeElement.js:

(WI.RecordingActionTreeElement._classNameForAction.classNameForActionName):

  • UserInterface/Views/RecordingContentView.js:

(WI.RecordingContentView):
(WI.RecordingContentView.prototype.get navigationItems):
(WI.RecordingContentView.prototype.updateActionIndex):
(WI.RecordingContentView.prototype.shown):
(WI.RecordingContentView.prototype.hidden):
(WI.RecordingContentView.prototype._generateContentFromSnapshot): Renamed.
(WI.RecordingContentView.prototype._updateImageGrid):
(WI.RecordingContentView.prototype._generateContentCanvasWebGL): Deleted.

  • UserInterface/Views/CanvasContentView.js:

(WI.CanvasContentView):

LayoutTests:

  • inspector/canvas/recording-2d-expected.txt:
  • inspector/canvas/recording-bitmaprenderer-expected.txt: Added.
  • inspector/canvas/recording-bitmaprenderer.html: Added.
  • inspector/canvas/recording-webgl-expected.txt:
  • inspector/canvas/recording-webgl-snapshots-expected.txt:
  • inspector/canvas/resources/recording-utilities.js:

Simplify the test output to avoid unrelated failures, such as if line numbers change.
Also remove non-human-readable text, as it makes it more difficult for those unfamiliar with
the test to determine if any differences are acceptable.

9:38 AM Changeset in webkit [236007] by ddkilzer@apple.com
  • 7 edits in trunk/Source/WebCore

REGRESSION (r235954): Fix build failure on watchOS
<https://webkit.org/b/189605>

Reviewed by Geoffrey Garen.

Remove using WebCore::IndexedDB::KeyType; from
Source/WebCore/Modules/indexeddb/IDBKey.h and fix all the
resulting build failures.

  • Modules/indexeddb/IDBKey.cpp:

(WebCore::IDBKey::IDBKey):
(WebCore::IDBKey::isValid const):
(WebCore::IDBKey::compare const):

  • Modules/indexeddb/IDBKey.h:

(WebCore::IDBKey::createNumber):
(WebCore::IDBKey::createDate):
(WebCore::IDBKey::type const):
(WebCore::IDBKey::array const):
(WebCore::IDBKey::string const):
(WebCore::IDBKey::date const):
(WebCore::IDBKey::number const):
(WebCore::IDBKey::binary const):
(WebCore::IDBKey::compareTypes):
(WebCore::IDBKey::IDBKey):

  • Modules/indexeddb/IDBKeyData.cpp:

(WebCore::IDBKeyData::IDBKeyData):
(WebCore::IDBKeyData::maybeCreateIDBKey const):
(WebCore::IDBKeyData::isolatedCopy):
(WebCore::IDBKeyData::encode const):
(WebCore::IDBKeyData::decode):
(WebCore::IDBKeyData::compare const):
(WebCore::IDBKeyData::loggingString const):
(WebCore::IDBKeyData::setArrayValue):
(WebCore::IDBKeyData::setBinaryValue):
(WebCore::IDBKeyData::setStringValue):
(WebCore::IDBKeyData::setDateValue):
(WebCore::IDBKeyData::setNumberValue):
(WebCore::IDBKeyData::isValid const):
(WebCore::IDBKeyData::operator== const):

  • Modules/indexeddb/IDBKeyData.h:

(WebCore::IDBKeyData::IDBKeyData):
(WebCore::IDBKeyData::minimum):
(WebCore::IDBKeyData::maximum):
(WebCore::IDBKeyData::type const):
(WebCore::IDBKeyData::hash const):
(WebCore::IDBKeyData::string const):
(WebCore::IDBKeyData::date const):
(WebCore::IDBKeyData::number const):
(WebCore::IDBKeyData::binary const):
(WebCore::IDBKeyData::array const):
(WebCore::IDBKeyData::encode const):
(WebCore::IDBKeyData::decode):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):

  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::toJS):

8:37 AM Changeset in webkit [236006] by calvaris@igalia.com
  • 5 edits in trunk/Source/WebCore

[EME] Add support the waitingforkey event
https://bugs.webkit.org/show_bug.cgi?id=189616

Reviewed by Philippe Normand.

Crossplatform support to fire the waitingforkey event from the
player to the element. The element implements the W3C specified
algorithm.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerWaitingForKey):
(WebCore::HTMLMediaElement::attemptToResumePlaybackIfNecessary):

  • html/HTMLMediaElement.h:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::waitingForKey):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayerClient::mediaPlayerWaitingForKey):

8:16 AM Changeset in webkit [236005] by commit-queue@webkit.org
  • 8 edits
    13 copies
    1 add
    1 delete in trunk/Source

builtins directory causes name conflict on Python 3
https://bugs.webkit.org/show_bug.cgi?id=189552

Patch by Mike Gorse <mgorse@suse.com> on 2018-09-14
Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

  • CMakeLists.txt: builtins -> wkbuiltins.
  • DerivedSources.make: builtins -> wkbuiltins.
  • Scripts/generate-js-builtins.py: import wkbuiltins, rather than builtins.
  • Scripts/wkbuiltins/init.py: Renamed from Source/JavaScriptCore/Scripts/builtins/init.py.
  • Scripts/wkbuiltins/builtins_generate_combined_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py.
  • Scripts/wkbuiltins/builtins_generate_internals_wrapper_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_implementation.py.
  • Scripts/wkbuiltins/builtins_generate_separate_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py.
  • Scripts/wkbuiltins/builtins_generate_separate_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_implementation.py.
  • Scripts/wkbuiltins/builtins_generate_wrapper_header.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_wrapper_header.py.
  • Scripts/wkbuiltins/builtins_generate_wrapper_implementation.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generate_wrapper_implementation.py.
  • Scripts/wkbuiltins/builtins_generator.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_generator.py.
  • Scripts/wkbuiltins/builtins_model.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_model.py.
  • Scripts/wkbuiltins/builtins_templates.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins_templates.py.
  • Scripts/wkbuiltins/wkbuiltins.py: Renamed from Source/JavaScriptCore/Scripts/builtins/builtins.py.
  • JavaScriptCore.xcodeproj/project.pbxproj: Update for the renaming.

Source/WebCore:

No new tests (No behavior change).

  • CMakeLists.txt: builtins -> wkbuiltins.
  • DerivedSources.make: builtins -> wkbuiltins.
4:01 AM Changeset in webkit [236004] by Carlos Garcia Campos
  • 11 edits
    4 adds in trunk/Source

[GTK] Make script dialogs modal to the current web view only
https://bugs.webkit.org/show_bug.cgi?id=189545

Reviewed by Michael Catanzaro.

Source/WebCore/platform/gtk/po:

  • POTFILES.in:

Source/WebKit:

Change the default implementation of script dialogs to use an embedded window, like the HTTP auth dialog,
instead of a GtkMessageDialog. This patch adds a base class WebKitWebViewDialog shared by
WebKitAuthenticationDialog and the new WebKitScriptDialogImpl.

  • SourcesGTK.txt: Add new files to compilation.
  • UIProcess/API/glib/WebKitScriptDialogPrivate.h:
  • UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:

(webkitAuthenticationDialogInitialize): Do not use a frame and use a better styled title.
(webkit_authentication_dialog_class_init): Remove implementation of vfuncs that are now implemented by the
parent.

  • UIProcess/API/gtk/WebKitAuthenticationDialog.h:
  • UIProcess/API/gtk/WebKitScriptDialogGtk.cpp:

(webkitScriptDialogAccept): Use WebKitScriptDialogImpl API.
(webkitScriptDialogDismiss): Ditto.
(webkitScriptDialogSetUserInput): Ditto.

  • UIProcess/API/gtk/WebKitScriptDialogImpl.cpp: Added.

(webkitScriptDialogImplClose):
(webkitScriptDialogImplKeyPressEvent):
(webkitScriptDialogImplMap):
(webkitScriptDialogImplConstructed):
(webkitScriptDialogImplDispose):
(webkit_script_dialog_impl_class_init):
(webkitScriptDialogImplAddButton):
(webkitScriptDialogImplNew):
(webkitScriptDialogImplCancel):
(webkitScriptDialogImplConfirm):
(webkitScriptDialogImplSetEntryText):

  • UIProcess/API/gtk/WebKitScriptDialogImpl.h: Added.
  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewChildIsInternalWidget): Rename authenticationDialog as just dialog.
(webkitWebViewBaseAddDialog): Ditto.
(webkitWebViewBaseContainerRemove): Ditto.
(webkitWebViewBaseContainerForall): Ditto.
(webkitWebViewBaseConstructed): Ditto.
(webkitWebViewBaseSizeAllocate): Ditto.
(webkitWebViewBaseKeyPressEvent): Ditto.
(webkitWebViewBaseHandleMouseEvent): Ditto.
(webkitWebViewBaseButtonPressEvent): Ditto.
(webkitWebViewBaseButtonReleaseEvent): Ditto.
(webkitWebViewBaseHandleWheelEvent): Ditto.
(webkitWebViewBaseScrollEvent): Ditto.
(webkitWebViewBaseMotionNotifyEvent): Ditto.
(webkitWebViewBaseCrossingNotifyEvent): Ditto.
(webkitWebViewBaseTouchEvent): Ditto.
(webkitWebViewBaseFocus): Ditto.
(webkitWebViewBaseDestroy): Ditto.

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/API/gtk/WebKitWebViewDialog.cpp: Added.

(webkitWebViewDialogDraw):
(webkitWebViewDialogSizeAllocate):
(webkitWebViewDialogConstructed):
(webkit_web_view_dialog_class_init):

  • UIProcess/API/gtk/WebKitWebViewDialog.h: Added.
  • UIProcess/API/gtk/WebKitWebViewGtk.cpp:

(webkitWebViewAuthenticate):
(webkitWebViewScriptDialog):

12:20 AM Changeset in webkit [236003] by Ms2ger@igalia.com
  • 3 edits
    29 deletes in trunk/LayoutTests

Remove some obsolete XHR tests
https://bugs.webkit.org/show_bug.cgi?id=189581

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

These tests were removed upstream, but stuck around in WebKit.

  • web-platform-tests/xhr/OWNERS: Removed.
  • web-platform-tests/xhr/abort-during-open-expected.txt: Removed.
  • web-platform-tests/xhr/abort-during-open.htm: Removed.
  • web-platform-tests/xhr/abort-during-open.js: Removed.
  • web-platform-tests/xhr/abort-during-open.worker-expected.txt: Removed.
  • web-platform-tests/xhr/abort-during-open.worker.html: Removed.
  • web-platform-tests/xhr/abort-during-open.worker.js: Removed.
  • web-platform-tests/xhr/getallresponseheaders-cl-expected.txt: Removed.
  • web-platform-tests/xhr/getallresponseheaders-cl.htm: Removed.
  • web-platform-tests/xhr/interfaces-expected.txt: Removed.
  • web-platform-tests/xhr/interfaces.html: Removed.
  • web-platform-tests/xhr/open-url-bogus-expected.txt: Removed.
  • web-platform-tests/xhr/open-url-bogus.htm: Removed.
  • web-platform-tests/xhr/overridemimetype-done-state-expected.txt: Removed.
  • web-platform-tests/xhr/overridemimetype-done-state.htm: Removed.
  • web-platform-tests/xhr/readme.txt: Removed.
  • web-platform-tests/xhr/responsetype-expected.txt: Removed.
  • web-platform-tests/xhr/responsetype.html: Removed.
  • web-platform-tests/xhr/send-non-same-origin.sub-expected.txt: Removed.
  • web-platform-tests/xhr/send-non-same-origin.sub.htm: Removed.
  • web-platform-tests/xhr/send-send-expected.txt: Removed.
  • web-platform-tests/xhr/send-send.htm: Removed.
  • web-platform-tests/xhr/send-send.js: Removed.
  • web-platform-tests/xhr/send-send.worker-expected.txt: Removed.
  • web-platform-tests/xhr/send-send.worker.html: Removed.
  • web-platform-tests/xhr/send-send.worker.js: Removed.
  • web-platform-tests/xhr/send-usp-expected.txt: Removed.
  • web-platform-tests/xhr/send-usp.html: Removed.
  • web-platform-tests/xhr/send-usp.js: Removed.

LayoutTests:

Sep 13, 2018:

10:56 PM Changeset in webkit [236002] by rniwa@webkit.org
  • 20 edits
    2 adds in trunk

Capturing event listeners are called during bubbling phase for shadow hosts
https://bugs.webkit.org/show_bug.cgi?id=174288
LayoutTests/imported/w3c:

Reviewed by Darin Adler.

  • web-platform-tests/dom/events/Event-dispatch-handlers-changed-expected.txt: Rebaselined. This test's

expectation is now wrong because event listner 3 is added after the event listener list is cloned for
capturing event listeners but before cloned for bubbling event listeners. As a result, event listener 3
is now invoked. It used to be not called because both bubbling and capturing event listeners are called
after cloning the event listner list once, which didn't have event listener 3.

  • web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt: Rebaselined. This test expects

event listener 2, which is bubbling, to be called between two capturing event listeners 1 and 3, which
is no longer true after this patch.

Source/WebCore:

<rdar://problem/33530455>

Reviewed by Darin Adler.

Implemented the new behavior proposed in https://github.com/whatwg/dom/pull/686 [1] to fix the problem
that capturing event listeners on a shadow host is invoked during bubbling phase when an event is
dispatched within its shadow tree.

To see why this is a problem, suppose we fire a composed event at span#target in the following DOM tree:

section#hostParent

+ div#host -- ShadowRoot

  • p#parent
    • span#target

Then capturing and bubbling event listeners on #target, #parent, #host, and #hostParent are invoked in
the following order in WebKit & Chrome right now:

  1. #hostParent, capturing, eventPhase: CAPTURING_PHASE
  2. #parent, capturing, eventPhase: CAPTURING_PHASE
  3. #target, capturing, eventPhase: AT_TARGET
  4. #target, non-capturing, eventPhase: AT_TARGET
  5. #parent, non-capturing, eventPhase: BUBBLING_PHASE
  6. #host, capturing, eventPhase: AT_TARGET
  7. #host, non-capturing, eventPhase: AT_TARGET
  8. #hostParent, non-capturing, eventPhase: BUBBLING_PHASE

This is counter-intuitive because capturing event listeners on #host isn't invoked until bubblign phase
started. A more natural ordering would be:

  1. #hostParent, capturing, eventPhase: CAPTURING_PHASE
  2. #host, capturing, eventPhase: AT_TARGET
  3. #parent, capturing, eventPhase: CAPTURING_PHASE
  4. #target, capturing, eventPhase: AT_TARGET
  5. #target, non-capturing, eventPhase: AT_TARGET
  6. #parent, non-capturing, eventPhase: BUBBLING_PHASE
  7. #host, non-capturing, eventPhase: AT_TARGET
  8. #hostParent, non-capturing, eventPhase: BUBBLING_PHASE

This also happens to be the order by which Gecko's current shadow DOM implementation invoke event listners.
This patch implements this new behavior using the spec-change proposed in [1]. Note that this patch also
impacts the invocation order of event listeners when there is no shadow tree. Namely, before this patch,
event listeners on the event's target is invoked in the registration order. After this patch, all capturing
event listeners are invoked before bubbling event listeners are invoked.

To implement this behavior, this patch introduces EventTarget::EventInvokePhase indicating whether we're
in the capturing phase or bubbling phase to EventTarget::fireEventListeners. We can't use Event's eventPhase
enum because that's set to Event::Phase::AT_TARGET when we're at a shadow host.

Test: fast/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html

  • Modules/modern-media-controls/media/media-controller-support.js:

(MediaControllerSupport.prototype.enable): Use capturing event listeners so that we can update the states of
media controls before author scripts recieve the event.
(MediaControllerSupport.prototype.disable): Ditto.

  • dom/EventContext.cpp:

(WebCore::EventContext::handleLocalEvents const):
(WebCore::MouseOrFocusEventContext::handleLocalEvents const):
(WebCore::TouchEventContext::handleLocalEvents const):

  • dom/EventContext.h:
  • dom/EventDispatcher.cpp:

(WebCore::dispatchEventInDOM): Invoke capturing event listners even when target and current target are same.
This happens when the current target is a shadow host and event's target is in its shadow tree. Also merged
the special code path for the event's target with the code in the bubbling phase.

  • dom/EventPath.cpp:

(WebCore::WindowEventContext::handleLocalEvents const):

  • dom/EventTarget.cpp:

(WebCore::EventTarget::dispatchEvent): Invoke capturing and bubbling event listeners in the order.
(WebCore::EventTarget::fireEventListeners):
(WebCore::EventTarget::innerInvokeEventListeners): Renamed from fireEventListeners to match the spec. Use
EventInvokePhase to filter out event listeners so that we can invoke capturing event listners before bubbling
event listeners even when eventPhase is Event::Phase::AT_TARGET.

  • dom/EventTarget.h:
  • dom/Node.cpp:

(WebCore::Node::handleLocalEvents):

  • dom/Node.h:
  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::handleLocalEvents):

  • html/HTMLFormElement.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::dispatchEvent):

LayoutTests:

Reviewed by Darin Adler.

Added a W3C style testharness.js test and rebaselined two tests. See below for rationals of rebaselines.

  • fast/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees-expected.txt: Added.
  • fast/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html: Added.
  • media/media-load-event-expected.txt: Rebaselined. The logging of oncanplaythrough event is now happening

before canplaythrough() is called because the logging is done by waitForEvent which uses a capturing event
listener whereas canplaythrough is called by a event handler, which is non-capturing.

  • platform/ios-11/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt:
7:19 PM Changeset in webkit [236001] by Justin Fan
  • 34 edits in trunk/LayoutTests

Update webkit-webgl-test-harness.js for more details on WebGL 2 conformance tests part 4
https://bugs.webkit.org/show_bug.cgi?id=189609

Unreviewed small change for only the few webgl 2 tests' harness; completely passing
tests now only report the PASS line, to avoid discrepancies between e.g. feature ability
of different graphics cards causing diffs to fail.

  • webgl/2.0.0/conformance2/glsl3/array-as-return-value-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/array-assign-constructor-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/array-assign-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/array-complex-indexing-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/array-element-increment-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/array-equality-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/array-in-complex-expression-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/bool-type-cast-bug-uint-ivec-uvec-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/compare-structs-containing-arrays-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/compound-assignment-type-combination-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/const-array-init-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/forbidden-operators-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/frag-depth-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/invalid-default-precision-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/invalid-invariant-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/loops-with-side-effects-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/misplaced-version-directive-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/no-attribute-vertex-shader-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/sampler-no-precision-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/sequence-operator-returns-non-constant-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/shader-with-1025-character-define-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/shader-with-1025-character-identifier.frag-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/short-circuiting-in-loop-condition-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/texture-offset-out-of-range-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/texture-offset-uniform-texture-coordinate-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/tricky-loop-conditions-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/uniform-block-layout-match-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/uniform-block-layouts-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/vector-dynamic-indexing-expected.txt:
  • webgl/2.0.0/conformance2/glsl3/vector-dynamic-indexing-nv-driver-bug-expected.txt:
  • webgl/2.0.0/conformance2/renderbuffers/framebuffer-test-expected.txt:
  • webgl/2.0.0/conformance2/vertex_arrays/vertex-array-object-expected.txt:
  • webgl/2.0.0/resources/webkit-webgl-test-harness.js:

(window.webglTestHarness.notifyFinished):

6:37 PM Changeset in webkit [236000] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Layout Test imported/w3c/web-platform-tests/streams/piping/error-propagation-backward.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=188070

Unreviewed test gardening.

  • platform/ios/TestExpectations: Mark test as flaky.
  • platform/mac-wk1/TestExpectations: Ditto.
5:25 PM Changeset in webkit [235999] by Megan Gardner
  • 6 edits
    2 adds in trunk

Fix color stop blending in conic gradients for stops past 1
https://bugs.webkit.org/show_bug.cgi?id=189532
<rdar://problem/44158221>

Reviewed by Simon Fraser.

Source/WebCore:

Calculation was wrong, fixed it, and wrote a test that failed
without the change, and passes with it.

Test: fast/gradients/conic-repeating-last-stop.html

  • css/CSSGradientValue.cpp:

(WebCore::ConicGradientAdapter::normalizeStopsAndEndpointsOutsideRange):

LayoutTests:

Tests that last stop in the gradient is correct.

  • fast/gradients/conic-repeating-last-stop-expected.html: Added.
  • fast/gradients/conic-repeating-last-stop.html: Added.
  • platform/ios-12/TestExpectations:
  • platform/mac/TestExpectations:
5:08 PM Changeset in webkit [235998] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Dark Mode: bezier curve editor should be updated
https://bugs.webkit.org/show_bug.cgi?id=187657

Patch by Jamal Nasser <jamaln@mail.com> on 2018-09-13
Reviewed by Matt Baker.

  • UserInterface/Views/DarkMode.css:

(@media (prefers-dark-interface)):
(.bezier-editor > .bezier-preview-timing):
(.bezier-editor > .bezier-container .bezier-curve):
(.bezier-editor > .bezier-container .linear-curve):
(.bezier-editor > .bezier-preview):
(.bezier-editor > .bezier-preview > div):
(.bezier-editor > .bezier-container .control-handle):
(.bezier-editor > .bezier-container .control-line):

5:03 PM Changeset in webkit [235997] by Matt Baker
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Timelines: clicking a row in Script > Events grid triggers Location popover when column is hidden
https://bugs.webkit.org/show_bug.cgi?id=189603
<rdar://problem/44431403>

Reviewed by Joseph Pecoraro.

TimelineDataGrid controls showing/hiding the call frame popover, with subclasses
overriding callFramePopoverAnchorElement to position it. This patch adds
another overridable base class method, shouldShowCallFramePopover, which subclasses
can use to block the popover when the Location column is hidden.

  • UserInterface/Views/DataGrid.js:

(WI.DataGrid.prototype.layout):
(WI.DataGrid.prototype._positionResizerElements):
(WI.DataGrid.prototype._isColumnVisible): Deleted.

  • UserInterface/Views/LayoutTimelineDataGrid.js:

(WI.LayoutTimelineDataGrid.prototype.shouldShowCallFramePopover):
(WI.LayoutTimelineDataGrid):

  • UserInterface/Views/ScriptTimelineDataGrid.js:

(WI.ScriptTimelineDataGrid.prototype.shouldShowCallFramePopover):
(WI.ScriptTimelineDataGrid):

  • UserInterface/Views/TimelineDataGrid.js:

(WI.TimelineDataGrid.prototype.shouldShowCallFramePopover):
(WI.TimelineDataGrid.prototype._dataGridSelectedNodeChanged):

4:58 PM Changeset in webkit [235996] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Opening inspector with a selected element might immediately scroll that element off screen in the DOM Tree outline
https://bugs.webkit.org/show_bug.cgi?id=189569
<rdar://problem/44397098>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-09-13
Reviewed by Devin Rousso.

  • UserInterface/Views/DOMTreeContentView.js:

(WI.DOMTreeContentView.prototype.layout):
Re-select the selected DOM node in the DOM Tree when the view resizes.
Typically this can happen if the sidebar opens/closes/resizes, in which
case we will want the selected DOM node to stay in view even if the DOM
tree starts wrapping earlier content.

3:50 PM Changeset in webkit [235995] by Ryan Haddad
  • 47 edits
    3 copies
    1 add
    1 delete in trunk

Unreviewed, rolling out r235954.

Breaks the watchOS build.

Reverted changeset:

"Move IndexedDB to Network Process"
https://bugs.webkit.org/show_bug.cgi?id=189415
https://trac.webkit.org/changeset/235954

3:38 PM Changeset in webkit [235994] by Chris Dumez
  • 13 edits
    3 adds in trunk

Regression(PSON): setting window.opener to null allows process swapping in cases that are not web-compatible
https://bugs.webkit.org/show_bug.cgi?id=189590
<rdar://problem/44422725>

Reviewed by Geoffrey Garen.

Source/WebCore:

Set a flag on the navigation action to indicate if the page was opened via window.open() without 'noopener'.

Test: http/tests/navigation/window-open-cross-origin-then-navigated-back-same-origin.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):

  • loader/NavigationAction.h:

(WebCore::NavigationAction::openedViaWindowOpenWithOpener const):
(WebCore::NavigationAction::setOpenedViaWindowOpenWithOpener):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createWindow):

  • page/Page.h:

(WebCore::Page::openedViaWindowOpenWithOpener const):
(WebCore::Page::setOpenedViaWindowOpenWithOpener):

Source/WebKit:

If script calls window.open() without 'noopener' and the newly navigated window gets navigated cross-site,
we are currently unable to process-swap because the opener has a WindowProxy handle to this new Window and
may interact with it (which we currently do not support cross-process). We were dealing with this by not
process-swapping if window.opener is not null. This works most of the time but is not sufficient because the
opener may get nulled out, while the opener still has a valid WindowProxy handle to its openee.

Therefore, we now also check for a flag indicating if the frame was opened via window.open() without
'nooopener'. We still need to check if the browsing context has an opener for browsing context created
via <a target="_blank"> for example (the opener does not have a handle to the new window but the openee
has access to its opener).

  • Shared/NavigationActionData.cpp:

(WebKit::NavigationActionData::encode const):
(WebKit::NavigationActionData::decode):

  • Shared/NavigationActionData.h:
  • UIProcess/API/APINavigation.h:

(API::Navigation::openedViaWindowOpenWithOpener const):
(API::Navigation::setOpenedViaWindowOpenWithOpener):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::processForNavigationInternal):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

LayoutTests:

Add layout test coverage.

  • http/tests/navigation/resources/navigate-helper.html: Added.
  • http/tests/navigation/window-open-cross-origin-then-navigated-back-same-origin-expected.txt: Added.
  • http/tests/navigation/window-open-cross-origin-then-navigated-back-same-origin.html: Added.
3:33 PM Changeset in webkit [235993] by dino@apple.com
  • 9 edits in trunk/Source/WebKit

Generate warnings for Preferences files
https://bugs.webkit.org/show_bug.cgi?id=189573

Reviewed by Sam Weinig.

Generate the "DO NOT EDIT" warnings, rather than have
them in the template (which was confusing).

While here, simplify some of the templating generation code
to avoid duplication.

  • Scripts/GeneratePreferences.rb:
  • Scripts/PreferencesTemplates/WebPageUpdatePreferences.cpp.erb:
  • Scripts/PreferencesTemplates/WebPreferencesDefinitions.h.erb:
  • Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
  • Scripts/PreferencesTemplates/WebPreferencesInternalDebugFeatures.cpp.erb:
  • Scripts/PreferencesTemplates/WebPreferencesKeys.cpp.erb:
  • Scripts/PreferencesTemplates/WebPreferencesKeys.h.erb:
  • Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
3:32 PM Changeset in webkit [235992] by Keith Rollin
  • 2 edits in trunk/Source/WebKit

WebPageProxy::reportPageLoadResult can crash on some code paths
https://bugs.webkit.org/show_bug.cgi?id=189568

Reviewed by Chris Dumez.

WebPageProxy::reportPageLoadResult (which is called from
WebPageProxy::didFinishLoadForFrame) can sometimes crash when
accessing m_pageLoadStart (a std::optional) in its unloaded state.
Normally, m_pageLoadStart is initialized in
WebPageProxy::didStartProvisionalLoadForFrame, which one would expect
would be called before WebPageProxy::didFinishLoadForFrame. But that
turns out to not always be the case. It's not apparent under what
conditions didStartProvisionalLoadForFrame will not be called, but
it's happening in the wild, leading to crashes now that std::optional
asserts in release builds on bad accesses (see
https://bugs.webkit.org/show_bug.cgi?id=189568).

Fix this by checking m_pageLoadState on entry to reportPageLoadResult.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::reportPageLoadResult):

3:28 PM Changeset in webkit [235991] by dino@apple.com
  • 1 edit in trunk/LayoutTests/webanimations/accelerated-transition-interrupted-on-composited-element.html

Header parsing for experimental and internal debug features
https://bugs.webkit.org/show_bug.cgi?id=189486
<rdar://problem/44320618>

Missed this test header.

  • webanimations/accelerated-transition-interrupted-on-composited-element.html:
3:19 PM Changeset in webkit [235990] by jer.noble@apple.com
  • 8 edits
    1 move
    2 deletes in trunk/Source

Enable USE_MEDIAREMOTE on iOS
https://bugs.webkit.org/show_bug.cgi?id=189096

Reviewed by Eric Carlson.

Source/WebCore:

Migrate to using MediaRemote.framework on iOS from MediaPlayer.framework. This unifies the
Now Playing implementation on iOS and Mac.

  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/cocoa/MediaSessionManagerCocoa.cpp: Removed.
  • platform/audio/cocoa/MediaSessionManagerCocoa.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm: Renamed from Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm.

(PlatformMediaSessionManager::sharedManager):
(PlatformMediaSessionManager::sharedManagerIfExists):
(MediaSessionManagerCocoa::updateSessionState):
(MediaSessionManagerCocoa::beginInterruption):
(MediaSessionManagerCocoa::scheduleUpdateNowPlayingInfo):
(MediaSessionManagerCocoa::sessionWillBeginPlayback):
(MediaSessionManagerCocoa::sessionDidEndRemoteScrubbing):
(MediaSessionManagerCocoa::removeSession):
(MediaSessionManagerCocoa::sessionWillEndPlayback):
(MediaSessionManagerCocoa::clientCharacteristicsChanged):
(MediaSessionManagerCocoa::sessionCanProduceAudioChanged):
(MediaSessionManagerCocoa::nowPlayingEligibleSession):
(MediaSessionManagerCocoa::updateNowPlayingInfo):

  • platform/audio/ios/MediaSessionManagerIOS.h:

(): Deleted.

  • platform/audio/ios/MediaSessionManagerIOS.mm:

(WebCore::MediaSessionManageriOS::nowPlayingEligibleSession): Deleted.
(WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Deleted.
(WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): Deleted.
(WebCore::MediaSessionManageriOS::removeSession): Deleted.
(WebCore::MediaSessionManageriOS::sessionWillEndPlayback): Deleted.
(WebCore::MediaSessionManageriOS::clientCharacteristicsChanged): Deleted.

  • platform/audio/mac/MediaSessionManagerMac.h: Removed.

Source/WTF:

  • wtf/Platform.h:
2:49 PM Changeset in webkit [235989] by yusukesuzuki@slowstart.org
  • 10 edits
    1 move in trunk/Source/JavaScriptCore

[WebAssembly] Inline WasmContext accessor functions
https://bugs.webkit.org/show_bug.cgi?id=189416

Reviewed by Saam Barati.

WasmContext accessor functions are very small while it resides in the critical path of
JS to Wasm function call. This patch makes them inline to improve performance.
This change improves a small benchmark (calling JS to Wasm function 1e7 times) from 320ms to 270ms.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • interpreter/CallFrame.cpp:
  • jit/AssemblyHelpers.cpp:
  • wasm/WasmB3IRGenerator.cpp:
  • wasm/WasmContextInlines.h: Renamed from Source/JavaScriptCore/wasm/WasmContext.cpp.

(JSC::Wasm::Context::useFastTLS):
(JSC::Wasm::Context::load const):
(JSC::Wasm::Context::store):

  • wasm/WasmMemoryInformation.cpp:
  • wasm/WasmModuleParser.cpp: Include <wtf/SHA1.h> due to changes of unified source combinations.
  • wasm/js/JSToWasm.cpp:
  • wasm/js/WebAssemblyFunction.cpp:
1:52 PM Changeset in webkit [235988] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

ProcessSwap.BackWithoutSuspendedPage API test hits assertion under WebPageProxy::didCreateMainFrame()
https://bugs.webkit.org/show_bug.cgi?id=189599

Reviewed by Geoffrey Garen.

The code in WebPageProxy::reattachToWebProcess() was re-initializing m_mainFrame unconditionally in case
of a HistoryNavigation. The reason we need to initialize m_mainFrame in reattachToWebProcess() is if the
process we're reattaching to already has a WebPage (with a main frame), in which case
WebPageProxy::didCreateMainFrame() would not get called to initialize WebPageProxy::m_mainFrame.

The process we're reattaching to can be in such a state only if it comes from a SuspendedPageProxy (we
detached the WebProcessProxy from the WebPageProxy but kept the WebPage in the "suspended" WebProcess).
It is true that we're only reattaching to a SuspendedPageProxy's process in the event of history
navigations. However, it is not true that all history navigations will use a SuspendedPageProxy's process.
For example, no SuspendedPageProxy may be available for the history navigation because the history
was restored to a new view from disk, or because the WebBackForwardListItem no longer has a
SuspendedPageProxy (we currently only keep a single SuspendedPageProxy for the last HistoryItem).

Therefore, unconditionally initializating m_mainFrame in reattachToWebProcess() for history navigations
is incorrect and we should instead check if we're reattaching to a SuspendedPage's process.

Change is covered by ProcessSwap.BackWithoutSuspendedPage API test which is no longer crashes and
existing Back/Forward PSON API tests which are still passing.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::continueNavigationInNewProcess):

  • UIProcess/WebPageProxy.h:
1:44 PM Changeset in webkit [235987] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

Add release logging to help debug PSON issues
https://bugs.webkit.org/show_bug.cgi?id=189562

Reviewed by Ryosuke Niwa.

Add release logging to help debug issues related to process swap on navigation.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::processForNavigation):
(WebKit::WebProcessPool::processForNavigationInternal):

  • UIProcess/WebProcessPool.h:
1:11 PM Changeset in webkit [235986] by Fujii Hironori
  • 6 edits in trunk/Source/WebCore

Remove the workaround for friend class LazyNeverDestroyed<X> statements for MSVC
https://bugs.webkit.org/show_bug.cgi?id=189576

Reviewed by Alex Christensen.

Old MSVC can't compile "friend class LazyNeverDestroyed<X>"
statements, but "friend LazyNeverDestroyed<X>".

No new tests (No behavior change).

  • css/CSSInheritedValue.h: Removed the code for COMPILER(MSVC).

Removed 'class' keyword in "friend class LazyNeverDestroyed<X>"
statement.

  • css/CSSInitialValue.h: Ditto.
  • css/CSSPrimitiveValue.h: Ditto.
  • css/CSSRevertValue.h: Ditto.
  • css/CSSUnsetValue.h: Ditto.
12:44 PM Changeset in webkit [235985] by dino@apple.com
  • 3 edits in trunk/LayoutTests

https://bugs.webkit.org/show_bug.cgi?id=189594

Mark this test as failing on WK1.

  • platform/ios-wk1/TestExpectations:
  • platform/mac-wk1/TestExpectations:
12:18 PM Changeset in webkit [235984] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Add null check for drawing area in WebPage::didCompletePageTransition() after r235867
https://bugs.webkit.org/show_bug.cgi?id=189587

Reviewed by Geoffrey Garen.

Add null check for drawing area in WebPage::didCompletePageTransition() after r235867
as this is causing crashes on the bots.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didCompletePageTransition):

12:11 PM Changeset in webkit [235983] by dino@apple.com
  • 3 edits in trunk/LayoutTests

Header parsing for experimental and internal debug features
https://bugs.webkit.org/show_bug.cgi?id=189486
<rdar://problem/44320618>

Add feature headers to more tests.

  • fast/animation/css-animation-resuming-when-visible-with-style-change2.html:
  • legacy-animation-engine/animations/duplicate-keys-expected.html:
12:08 PM Changeset in webkit [235982] by Ms2ger@igalia.com
  • 2 edits in trunk/Source/WebCore

[GLib] Fix format string in KeyedEncoderGlib::beginObject().
https://bugs.webkit.org/show_bug.cgi?id=189585

Reviewed by Michael Catanzaro.

This appears to fix the following assertion locally:

GLib-CRITICAL : g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type
g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed

Covered by existing tests.

  • platform/glib/KeyedEncoderGlib.cpp:

(WebCore::KeyedEncoderGlib::beginObject):

11:07 AM Changeset in webkit [235981] by dbates@webkit.org
  • 1 edit
    2 copies
    1 move
    9 adds
    1 delete in trunk/Tools

Add Copy WebKit Permalink plugin for Sublime Text
https://bugs.webkit.org/show_bug.cgi?id=189589

Rubber-stamped by Joseph Pecoraro.

Port the Copy WebKit Permalink Automator service to a Sublime Text plugin. Once installed you can
use the plugin to copy to the Clipboard a trac.webkit.org hyperlink to the selected line in the
active document with or without blame annotations.

Once installed, you can Control-click (on Mac) or right-click (on Windows and Linux) on a line and
choose Copy WebKit Permalink or Copy WebKit Permalink to Blame from the context menu to copy to the
Clipboard a permanent hyperlink to the selected line without or with blame annotations, respectively.
On Mac you can also invoke the same functionality using the keyboard shortcuts Command + Shift + Control + C
and Command + Shift + Control + Option + C, respectively.

  • CopyPermalink/Sublime Text/CopyWebKitPermalink/Context.sublime-menu: Added.
  • CopyPermalink/Sublime Text/CopyWebKitPermalink/CopyWebKitPermalink.py: Added.
  • CopyPermalink/Sublime Text/CopyWebKitPermalink/Default (OSX).sublime-keymap: Added.
  • CopyPermalink/Sublime Text/INSTALL: Added.
  • CopyPermalink/Xcode/Copy WebKit Permalink.workflow/Contents/Info.plist: Renamed from Tools/CopyPermalink/Copy WebKit Permalink.workflow/Contents/Info.plist.
  • CopyPermalink/Xcode/Copy WebKit Permalink.workflow/Contents/document.wflow: Renamed from Tools/CopyPermalink/Copy WebKit Permalink.workflow/Contents/document.wflow.
  • CopyPermalink/Xcode/INSTALL: Renamed from Tools/CopyPermalink/README.
11:07 AM Changeset in webkit [235980] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline imported/w3c/web-platform-tests/web-share/idlharness.https.html after r235925.

Unreviewed test gardening.

  • platform/mac-wk2/imported/w3c/web-platform-tests/web-share/idlharness.https-expected.txt:
10:20 AM Changeset in webkit [235979] by Ryan Haddad
  • 35 edits in trunk/Source

Unreviewed, rolling out r235953.

Caused layout test crashes under GuardMalloc.

Reverted changeset:

"Make GraphicsLayers ref-counted, so their tree can persist
when disconnected from RenderLayerBackings"
https://bugs.webkit.org/show_bug.cgi?id=189521
https://trac.webkit.org/changeset/235953

10:17 AM Changeset in webkit [235978] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

Remove a MSVC workaround in XPath::Step::NodeTest
https://bugs.webkit.org/show_bug.cgi?id=189578

Reviewed by Alex Christensen.

XPath::Step::NodeTest has a special code for MSVC bug workaround.
It has been introduced in 5 years ago in Bug 121082 Comment 19.

I think it is safe just to remove the workaround.

No new tests (No behavior change).

  • xml/XPathStep.h: Removed the MSVC workaround.
10:16 AM Changeset in webkit [235977] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

Remove a MSVC workaround in InspectorStyle::styleWithProperties
https://bugs.webkit.org/show_bug.cgi?id=189577

Reviewed by Alex Christensen.

No new tests (No behavior change).

  • inspector/InspectorStyleSheet.cpp:

(WebCore::InspectorStyle::styleWithProperties const): Use 'auto' for the type of 'status'.

10:02 AM Changeset in webkit [235976] by commit-queue@webkit.org
  • 7 edits in trunk/Source

Use a Variant instead of a union in CSSSelector
https://bugs.webkit.org/show_bug.cgi?id=188559

Patch by Alex Christensen <achristensen@webkit.org> on 2018-09-13
Reviewed by Antti Koivisto.

Source/WebCore:

No change in behavior. This just makes some of the existing problems more obvious and easy to fix.

I moved m_caseInsensitiveAttributeValueMatching to RareData because it's only used with RareData.
I only have m_isForPage when assertions are enabled because it's only used for an assertion.
The rest is pretty straightforward translating union syntax to Variant syntax.
I use RefPtr for now where I could use Ref because it's never null to make copying easier, but that's temporary.

  • css/CSSSelector.cpp:

(WebCore::CSSSelector::CSSSelector):
(WebCore::CSSSelector::createRareData):
(WebCore::CSSSelector::setAttribute):
(WebCore::CSSSelector::setArgument):
(WebCore::CSSSelector::setLangArgumentList):
(WebCore::CSSSelector::setSelectorList):
(WebCore::CSSSelector::setNth):
(WebCore::CSSSelector::matchNth const):
(WebCore::CSSSelector::nthA const):
(WebCore::CSSSelector::nthB const):
(WebCore::CSSSelector::RareData::RareData):

  • css/CSSSelector.h:

(WebCore::CSSSelector::argument const):
(WebCore::CSSSelector::langArgumentList const):
(WebCore::CSSSelector::selectorList const):
(WebCore::CSSSelector::attribute const):
(WebCore::CSSSelector::attributeCanonicalLocalName const):
(WebCore::CSSSelector::setValue):
(WebCore::CSSSelector::CSSSelector):
(WebCore::CSSSelector::~CSSSelector):
(WebCore::CSSSelector::tagQName const):
(WebCore::CSSSelector::tagLowercaseLocalName const):
(WebCore::CSSSelector::value const):
(WebCore::CSSSelector::serializingValue const):
(WebCore::CSSSelector::attributeValueMatchingIsCaseInsensitive const):
(WebCore::CSSSelector::RareData::create): Deleted.

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::parsePageSelector):

  • css/parser/CSSParserSelector.h:

Source/WTF:

  • wtf/Variant.h:

Add packing macros to make it so Variant-containing structures don't always have 7 bytes of padding per Variant.

9:43 AM Changeset in webkit [235975] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[Win][Clang] error: type 'float' cannot be narrowed to 'LONG' (aka 'long') in initializer list in WheelEventWin.cpp
https://bugs.webkit.org/show_bug.cgi?id=189575

Reviewed by Alex Christensen.

No new tests (No behavior change).

  • platform/win/WheelEventWin.cpp:

(WebCore::PlatformWheelEvent::PlatformWheelEvent): Use flooredIntPoint to convert FloatPoint to POINT.

8:40 AM Changeset in webkit [235974] by Ms2ger@igalia.com
  • 2 edits
    1 delete in trunk/LayoutTests

[GTK] Enable media-source/interfaces.html.
https://bugs.webkit.org/show_bug.cgi?id=183613

Unreviewed test gardening.

The platform-neutral expectation applies to the GTK port as well.

  • platform/gtk/TestExpectations: Remove expectation.
  • platform/gtk/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt: Removed.
8:31 AM Changeset in webkit [235973] by youenn@apple.com
  • 22 edits
    6 copies in trunk

Introduce RTCRtpSendParameters
https://bugs.webkit.org/show_bug.cgi?id=189563

Reviewed by Eric Carlson.

Source/WebCore:

Introduce RTCRtpSendParameters to match the WebRTC specification.
Split RTCRtpPrameters fields accordingly and update call sites.

Covered by updated test.

  • CMakeLists.txt:
  • DerivedSources.make:
  • Modules/mediastream/PeerConnectionBackend.h:
  • Modules/mediastream/RTCRtpCodingParameters.h: Added
  • Modules/mediastream/RTCRtpCodingParameters.idl: Added
  • Modules/mediastream/RTCRtpDecodingParameters.h: Added
  • Modules/mediastream/RTCRtpDecodingParameters.idl: Added
  • Modules/mediastream/RTCRtpEncodingParameters.h:
  • Modules/mediastream/RTCRtpEncodingParameters.idl:
  • Modules/mediastream/RTCRtpParameters.h:
  • Modules/mediastream/RTCRtpParameters.idl:
  • Modules/mediastream/RTCRtpReceiver.cpp:
  • Modules/mediastream/RTCRtpSendParameters.h: Added.

(WebCore::RTCRtpSendParameters::RTCRtpSendParameters):

  • Modules/mediastream/RTCRtpSendParameters.idl: Added.
  • Modules/mediastream/RTCRtpSender.cpp:

(WebCore::RTCRtpSender::getParameters):
(WebCore::RTCRtpSender::setParameters):

  • Modules/mediastream/RTCRtpSender.h:
  • Modules/mediastream/RTCRtpSender.idl:
  • Modules/mediastream/RTCRtpSenderBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:

(WebCore::LibWebRTCRtpSenderBackend::getParameters const):
(WebCore::LibWebRTCRtpSenderBackend::setParameters):

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:

(WebCore::toRTCRtpParameters):
(WebCore::toRTCRtpSendParameters):
(WebCore::fromRTCRtpSendParameters):

  • Modules/mediastream/libwebrtc/LibWebRTCUtils.h:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

LayoutTests:

  • webrtc/video-getParameters-expected.txt:
  • webrtc/video-getParameters.html:
6:39 AM Changeset in webkit [235972] by ddkilzer@apple.com
  • 7 edits
    4 moves in trunk/Source/JavaScriptCore

Move JavaScriptCore files to match Xcode project hierarchy
<https://webkit.org/b/189574>

Reviewed by Filip Pizlo.

  • API/JSAPIValueWrapper.cpp: Rename from Source/JavaScriptCore/runtime/JSAPIValueWrapper.cpp.
  • API/JSAPIValueWrapper.h: Rename from Source/JavaScriptCore/runtime/JSAPIValueWrapper.h.
  • CMakeLists.txt: Update for new path to

generateYarrUnicodePropertyTables.py, hasher.py and
JSAPIValueWrapper.h.

  • DerivedSources.make: Ditto. Add missing dependency on

hasher.py captured by CMakeLists.txt.

reference paths. Add hasher.py library to project.

  • Sources.txt: Update for new path to

JSAPIValueWrapper.cpp.

  • runtime/JSImmutableButterfly.h: Add missing includes

after changes to Sources.txt and regenerating unified
sources.

  • runtime/RuntimeType.h: Ditto.
  • yarr/generateYarrUnicodePropertyTables.py: Rename from Source/JavaScriptCore/Scripts/generateYarrUnicodePropertyTables.py.
  • yarr/hasher.py: Rename from Source/JavaScriptCore/Scripts/hasher.py.
2:14 AM Changeset in webkit [235971] by calvaris@igalia.com
  • 3 edits in trunk/Source/WebCore

[GStreamer][EME] decrypt-key-needed message renamed to drm-cdm-instance-needed
https://bugs.webkit.org/show_bug.cgi?id=189547

Reviewed by Philippe Normand.

decrypt-key-needed message renamed to drm-cdm-instance-needed.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Apart from
renaming the message, removed the class prefix for
dispatchCDMInstance.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:

(webkitMediaCommonEncryptionDecryptTransformInPlace):

1:33 AM Changeset in webkit [235970] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix WebDriver tests after r235225.

Use wpt serve command to run the http server.

  • Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:

(WebDriverW3CWebServer.init):
(WebDriverW3CWebServer.start):
(WebDriverW3CWebServer.stop):

1:24 AM Changeset in webkit [235969] by Carlos Garcia Campos
  • 14 edits in trunk

[GTK][WPE] Allow to run script dialogs asynchronously in the UI process
https://bugs.webkit.org/show_bug.cgi?id=189544

Reviewed by Michael Catanzaro.

Source/WebKit:

Script dialogs are sync in the WebProcess, but we don't need to block the UI process while they are running. Our
current API doesn't allow it, because it always expects the dialog to be closed in the signal handler. API
changes are backwards compatible.

  • UIProcess/API/glib/WebKitScriptDialog.cpp:

(webkitScriptDialogCreate): Added to heap allocate a WebKitScriptDialog.
(webkitScriptDialogIsRunning): Common implementation here, a script dialog is considered to be running if it has
a competion handler pending.
(webkit_script_dialog_ref): WebKitScriptDialog is now refcounted.
(webkit_script_dialog_unref): Ditto.
(webkit_script_dialog_close): New method to notify that we are done with the dialog.

  • UIProcess/API/glib/WebKitScriptDialogPrivate.h:

(_WebKitScriptDialog::_WebKitScriptDialog): Use a single constructor and keep the completion handler.

  • UIProcess/API/glib/WebKitUIClient.cpp: Do not call the completion handler, pass it to the web view.
  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewDispose): Close the current script dialog if there's any.
(webkit_web_view_class_init): Document how to handle dialogs asynchronously.
(webkitWebViewRunJavaScriptAlert): Do not stack allocate the WebKitScriptDialog, create it with
webkitScriptDialogCreate() passing the completion handler.
(webkitWebViewRunJavaScriptConfirm): Ditto.
(webkitWebViewRunJavaScriptPrompt): Ditto.
(webkitWebViewRunJavaScriptBeforeUnloadConfirm): Ditto.

  • UIProcess/API/glib/WebKitWebViewPrivate.h:
  • UIProcess/API/gtk/WebKitScriptDialog.h:
  • UIProcess/API/gtk/WebKitScriptDialogGtk.cpp:

(scriptDialogResponseCallback): Hnadle the response callback.
(webkitScriptDialogRun): Do not use gtk_dialog_run(), connect to response signal and show the dialogs instead.

  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
  • UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
  • UIProcess/API/wpe/WebKitScriptDialogWPE.cpp:

Tools:

Add test cases for the new API.

  • TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:

(testWebViewJavaScriptDialogs):

12:20 AM Changeset in webkit [235968] by Kocsen Chung
  • 7 edits in trunk/Source

Versioning.

Note: See TracTimeline for information about the timeline view.