Timeline



Oct 16, 2019:

10:45 PM Changeset in webkit [251226] by mark.lam@apple.com
  • 9 edits
    1 delete in trunk/Source/JavaScriptCore

Reduce the amount of memory needed to store Options.
https://bugs.webkit.org/show_bug.cgi?id=202105

Reviewed by Yusuke Suzuki.

The size of the JSC::Config needed to store the Options is now reduced to 4K
instead of 16K, enabled by constexpr template magic.

  1. Instead of all options in a large array of OptionEntry (which is a union of all the option types), we now have separate arrays for each of the types of options. For example,

Removed g_jscConfig.options[].
Added g_jscConfig.typeBoolOptions[].
Added g_jscConfig.typeInt32Options[].
Added g_jscConfig.typeDoubleOptions[].
...

We used to find the storage for the option using g_jscConfig.options[Options::ID].
We now find the storage for each type of option using
g_jscConfig.options[optionTypeSpecificIndex<OptionTypeID, OptionID>()]. For
example, Options::useJIT() used to be implemented as:

inline bool& Options::useJIT()
{

return g_jscConfig.options[Options::useJITID];

}

... which is now replaced with:

inline bool& Options::useJIT()
{

return g_jscConfig.typeBoolOptions[optionTypeSpecificIndex<OptionTypeID::Bool, OptionID::useJIT>()];

}

MSVC has a bug where it cannot handle very large source files: see
https://developercommunity.visualstudio.com/content/problem/653301/fatal-error-c1002-compiler-is-out-of-heap-space-in.html.
This bug prevents this patch from building on MSVC. To workaround this bug,
we don't inline the Options accessors when COMPILER(MSVC). This prevents MSVC
from having to parse the large body of template code code to used to implement
the inline accessors in every file that #include "Options.h".

Also add the @no-unify attribute to Options.cpp (where we put the accessors)
so that it doesn't trigger the MSVC bug also.

  1. Introduce the optionTypeSpecificIndex() constexpr template function for computing the index of each option in their respective type specific options array.
  1. Introduce OptionTypes, OptionTypeID, and OptionID.

The OptionTypes namespace replaces OptionEntry as the container of option types.
The OptionID enum class replaces Options::ID.
The OptionTypeID enum class is new and is used together with OptionID in

constexpr templates to compute the typeSpecificIndex of options.

  1. Removed the OptionEntry struct and OptionEntry.h. After (1), this struct is only used in the Option class. We just moved the union of option types (that OptionEntry embeds) into the Option class.

Moved class OptionRange into OptionsList.h.

  1. Removed the large OptionEntry arrays from JSC::Config. Added type specific options arrays. Also ordered these arrays to maximize compactness and minimize internal fragmentation.
  1. Changed scaleJITPolicy() to go directly to g_jscConfig.typeInt32Options[] instead of going through the Option wrapper object. This allows us to simplify things and make the Option class a read only interface of options.
  1. Changed Options::initialize() to only compute the option default value once. The default value specified in the OptionsList may not always be a constant. Sometimes, it is a function call.
  1. The Option class now only gives read only access to the options.

The Option class' role is to provide an interface for reading an option at any
given OptionID without first knowing about the type of the specific option.
It is useful for iterating options, and is currently only used by
Options::dumpOption().

Technically, we could merge all the Option class code into its single client.
We opted not to do this because the amount of code is non-trivial, and the
Option class does a good job of encapsulating this functionality.

  • API/glib/JSCOptions.cpp:

(jscOptionsSetValue):
(jscOptionsGetValue):
(jsc_options_foreach):
(jsc_options_get_option_group):

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • runtime/JSCConfig.h:
  • runtime/OptionEntry.h: Removed.
  • runtime/Options.cpp:

(JSC::Options::isAvailable):
(JSC::overrideOptionWithHeuristic):
(JSC::optionTypeSpecificIndex):
(JSC::scaleJITPolicy):
(JSC::recomputeDependentOptions):
(JSC::Options::initialize):
(JSC::Options::setOptionWithoutAlias):
(JSC::Options::dumpAllOptions):
(JSC::Options::dumpOption):
(JSC::Option::Option):
(JSC::Option::defaultOption const):
(JSC::Option::dump const):
(JSC::Option::operator== const):

  • runtime/Options.h:

(JSC::Option::id const):
(JSC::Option::name const):
(JSC::Option::description const):
(JSC::Option::type const):
(JSC::Option::availability const):
(JSC::Option::isOverridden const):
(JSC::Option::Option):
(JSC::Option::idIndex const):
(JSC::optionTypeSpecificIndex):
(JSC::Option::defaultOption const): Deleted.
(JSC::Option::boolVal): Deleted.
(JSC::Option::unsignedVal): Deleted.
(JSC::Option::doubleVal): Deleted.
(JSC::Option::int32Val): Deleted.
(JSC::Option::optionRangeVal): Deleted.
(JSC::Option::optionStringVal): Deleted.
(JSC::Option::gcLogLevelVal): Deleted.

  • runtime/OptionsList.h:

(JSC::OptionRange::operator= ):
(JSC::OptionRange::rangeString const):
(JSC::countNumberOfJSCOptionsOfType):

8:03 PM Changeset in webkit [251225] by Chris Dumez
  • 2 edits in trunk/Source/WebKitLegacy/mac

Unreviewed, fix iOS Debug build after r251220.

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

7:59 PM Changeset in webkit [251224] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

[Clipboard API] [iOS] Refactor logic for suppressing URL data when the pasteboard may contain files
https://bugs.webkit.org/show_bug.cgi?id=203065

Reviewed by Tim Horton.

Platform-specific pasteboard refactoring before tackling webkit.org/b/203021. See below for details. No new
tests, as there is no change in behavior.

  • platform/Pasteboard.h:

(WebCore::Pasteboard::changeCount const):

Add a stub for Pasteboard::changeCount() on non-Cocoa platforms.

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::safeTypeForDOMToReadAndWriteForPlatformType):

Move this helper function farther up the file, so it can be used in more places.

(WebCore::webSafeTypes):

Add a separate helper to compute the list of web-safe MIME types (for instance, "text/plain") given a list of
platform types, and a function to determine whether to avoid exposing a given URL to the DOM.

(WebCore::shouldTreatAtLeastOneTypeAsFile):

Split this out into a separate helper function, so that it can be invoked when determining whether a given
NSItemProvider is suspected to contain file paths. In the case where we're getting the full list of types that
are safe for the DOM to read, we want to pass in the entire pasteboard object and iterate through all of the
available types in search for something that could feasibly accompany a file URL.

In the case of computing the web-safe types per item, we only have an item provider, in which case we only
iterate through the types in that NSItemProvider. See call sites below for examples.

(WebCore::PlatformPasteboard::informationForItemAtIndex):

Invoke the new webSafeTypes helper method.

(WebCore::pasteboardMayContainFilePaths):
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):

Invoke the new webSafeTypes helper method.

7:45 PM Changeset in webkit [251223] by aestes@apple.com
  • 2 edits in trunk/Tools

[Quick Look] Test that legacy web views load previews before deciding content policy
https://bugs.webkit.org/show_bug.cgi?id=202971

Reviewed by Alex Christensen.

  • TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm:

(-[QuickLookLegacyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]):
(TEST):
(-[QuickLookFrameLoadDelegate webView:didFinishLoadForFrame:]): Deleted.

7:42 PM Changeset in webkit [251222] by emilio
  • 2 edits in trunk/Source/WebKit

Pass network cache directory in WebsiteDataStore::parameters() for non-Cocoa platforms.
https://bugs.webkit.org/show_bug.cgi?id=203043

This was causing various errors in the network process that were
visible in debug builds.

Reviewed by Alex Christensen.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):

6:53 PM Changeset in webkit [251221] by Brent Fulgham
  • 3 edits in trunk/Source/WebCore

[FTW] Correct radial gradient handling of various radius orderings
https://bugs.webkit.org/show_bug.cgi?id=202815

Reviewed by Per Arne Vollan.

Revise the 'generateGradient' implementation to recognize that the
radius arguments might not be in increasing order. Direct2D's
implementation does expect this, so we need to swap order and
revise the gradient range to match.

Drive-by fix: Stop building unused image decoders if building with
the Apple stack.

  • PlatformFTW.cmake: Stop building unused image decoders.
  • platform/graphics/win/GradientDirect2D.cpp:

(WebCore::Gradient::generateGradient):

6:44 PM Changeset in webkit [251220] by Chris Dumez
  • 296 edits
    2 moves in trunk

Rename PageCache to BackForwardCache
https://bugs.webkit.org/show_bug.cgi?id=203048

Reviewed by Alex Christensen.

Rename PageCache to BackForwardCache for clarity and consistency with the UIProcess's WebBackForwardCache.

Source/WebCore:

  • Modules/geolocation/Geolocation.cpp:

(WebCore::Geolocation::suspend):

  • Modules/mediarecorder/MediaRecorder.cpp:

(WebCore::MediaRecorder::canSuspendForDocumentSuspension const):

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::suspend):

  • Modules/websockets/WebSocket.cpp:

(WebCore::WebSocket::suspend):

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::canSuspendForDocumentSuspension const):

  • bindings/js/WindowProxy.cpp:

(WebCore::WindowProxy::clearJSWindowProxiesNotMatchingDOMWindow):

  • bindings/js/WindowProxy.h:
  • dom/ActiveDOMObject.h:
  • dom/Document.cpp:

(WebCore::Document::~Document):
(WebCore::Document::scheduleStyleRecalc):
(WebCore::Document::needsStyleRecalc const):
(WebCore::Document::invalidateMatchedPropertiesCacheAndForceStyleRecalc):
(WebCore::Document::createRenderTree):
(WebCore::Document::didBecomeCurrentDocumentInFrame):
(WebCore::Document::attachToCachedFrame):
(WebCore::Document::detachFromCachedFrame):
(WebCore::Document::prepareForDestruction):
(WebCore::Document::adjustFocusedNodeOnNodeRemoval):
(WebCore::Document::setFocusedElement):
(WebCore::Document::takeDOMWindowFrom):
(WebCore::Document::setBackForwardCacheState):
(WebCore::Document::suspend):
(WebCore::Document::resume):
(WebCore::Document::topDocument const):

  • dom/Document.h:

(WebCore::Document::backForwardCacheState const):

  • dom/FullscreenManager.cpp:

(WebCore::FullscreenManager::willEnterFullscreen):
(WebCore::FullscreenManager::didEnterFullscreen):
(WebCore::FullscreenManager::willExitFullscreen):
(WebCore::FullscreenManager::didExitFullscreen):

  • dom/FullscreenManager.h:
  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
(WebCore::ScriptExecutionContext::resumeActiveDOMObjects):

  • history/BackForwardCache.cpp: Renamed from Source/WebCore/history/PageCache.cpp.

(WebCore::logBackForwardCacheFailureDiagnosticMessage):
(WebCore::canCacheFrame):
(WebCore::canCachePage):
(WebCore::BackForwardCache::singleton):
(WebCore::BackForwardCache::BackForwardCache):
(WebCore::BackForwardCache::dump const):
(WebCore::BackForwardCache::canCache const):
(WebCore::BackForwardCache::pruneToSizeNow):
(WebCore::BackForwardCache::setMaxSize):
(WebCore::BackForwardCache::frameCount const):
(WebCore::BackForwardCache::markPagesForDeviceOrPageScaleChanged):
(WebCore::BackForwardCache::markPagesForContentsSizeChanged):
(WebCore::BackForwardCache::markPagesForCaptionPreferencesChanged):
(WebCore::setBackForwardCacheState):
(WebCore::BackForwardCache::addIfCacheable):
(WebCore::BackForwardCache::take):
(WebCore::BackForwardCache::removeAllItemsForPage):
(WebCore::BackForwardCache::get):
(WebCore::BackForwardCache::remove):
(WebCore::BackForwardCache::prune):

  • history/BackForwardCache.h: Renamed from Source/WebCore/history/PageCache.h.
  • history/CachedFrame.cpp:

(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::CachedFrame):
(WebCore::CachedFrame::clear):
(WebCore::CachedFrame::destroy):

  • history/CachedFramePlatformData.h:
  • history/HistoryItem.cpp:

(WebCore::HistoryItem::setCachedPage):
(WebCore::HistoryItem::setURL):

  • history/HistoryItem.h:

(WebCore::HistoryItem::isInBackForwardCache const):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::createElementRenderer):

  • html/HTMLSourceElement.cpp:

(WebCore::HTMLSourceElement::suspend):

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::autoplayPermitted const):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::addSubresourceLoader):

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

(WebCore::FrameLoader::closeURL):
(WebCore::FrameLoader::clear):
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::stopForBackForwardCache):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::open):
(WebCore::FrameLoader::frameDetached):
(WebCore::FrameLoader::detachFromParent):
(WebCore::FrameLoader::receivedMainResourceError):
(WebCore::FrameLoader::shouldPerformFragmentNavigation):
(WebCore::FrameLoader::dispatchUnloadEvents):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
(WebCore::FrameLoader::loadDifferentDocumentItem):

  • loader/FrameLoader.h:
  • loader/FrameLoaderClient.h:
  • loader/HistoryController.cpp:

(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
(WebCore::HistoryController::restoreScrollPositionAndViewState):
(WebCore::HistoryController::invalidateCurrentItemCachedPage):
(WebCore::HistoryController::updateForReload):

  • loader/appcache/ApplicationCacheHost.cpp:

(WebCore::ApplicationCacheHost::canCacheInBackForwardCache):

  • loader/appcache/ApplicationCacheHost.h:
  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::load):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::suspendForBackForwardCache):
(WebCore::DOMWindow::resumeFromBackForwardCache):
(WebCore::DOMWindow::decrementScrollEventListenersCount):

  • page/DOMWindow.h:
  • page/DOMWindowExtension.cpp:

(WebCore::DOMWindowExtension::suspendForBackForwardCache):
(WebCore::DOMWindowExtension::resumeFromBackForwardCache):

  • page/DOMWindowExtension.h:
  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::backForwardCacheKey):
(WebCore::DiagnosticLoggingKeys::backForwardCacheFailureKey):

  • page/DiagnosticLoggingKeys.h:
  • page/EventSource.cpp:

(WebCore::EventSource::scheduleReconnect):
(WebCore::EventSource::didReceiveResponse):
(WebCore::EventSource::didReceiveData):
(WebCore::EventSource::didFinishLoading):
(WebCore::EventSource::didFail):
(WebCore::EventSource::abortConnectionAttempt):
(WebCore::EventSource::suspend):
(WebCore::EventSource::resume):
(WebCore::EventSource::dispatchMessageEvent):

  • page/EventSource.h:
  • page/Frame.cpp:

(WebCore::Frame::setView):
(WebCore::Frame::setDocument):
(WebCore::Frame::willDetachPage):

  • page/FrameView.cpp:

(WebCore::FrameView::didRestoreFromBackForwardCache):
(WebCore::FrameView::setContentsSize):

  • page/FrameView.h:
  • page/FrameViewLayoutContext.cpp:

(WebCore::FrameViewLayoutContext::layout):
(WebCore::FrameViewLayoutContext::scheduleLayout):

  • page/MemoryRelease.cpp:

(WebCore::releaseCriticalMemory):
(WebCore::releaseMemory):

  • page/MemoryRelease.h:
  • page/Page.cpp:

(WebCore::Page::~Page):
(WebCore::Page::setViewScaleFactor):
(WebCore::Page::setDeviceScaleFactor):

  • page/Page.h:
  • page/PageGroup.cpp:

(WebCore::PageGroup::captionPreferencesChanged):

  • page/PerformanceLogging.cpp:

(WebCore::PerformanceLogging::memoryUsageStatistics):

  • page/Settings.yaml:
  • page/SettingsBase.cpp:

(WebCore::SettingsBase::usesBackForwardCacheChanged):

  • page/SettingsBase.h:
  • page/animation/AnimationBase.cpp:

(WebCore::AnimationBase::setNeedsStyleRecalc):

  • page/animation/CSSAnimationController.cpp:

(WebCore::CSSAnimationControllerPrivate::updateAnimations):
(WebCore::CSSAnimationControllerPrivate::addElementChangeToDispatch):
(WebCore::CSSAnimationController::cancelAnimations):
(WebCore::CSSAnimationController::updateAnimations):

  • page/animation/ImplicitAnimation.cpp:

(WebCore::ImplicitAnimation::sendTransitionEvent):

  • page/animation/KeyframeAnimation.cpp:

(WebCore::KeyframeAnimation::sendAnimationEvent):

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):

  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):

  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::paintIntoLayer):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
(WebCore::RenderLayerCompositor::didAddScrollingLayer):

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

(WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlowsForCurrentPage):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

  • testing/Internals.cpp:

(WebCore::Internals::clearBackForwardCache):
(WebCore::Internals::backForwardCacheSize const):
(WebCore::Internals::preventDocumentForEnteringBackForwardCache):

  • testing/Internals.h:
  • testing/Internals.idl:
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::suspend):

Source/WebKit:

  • Shared/CacheModel.cpp:

(WebKit::calculateMemoryCacheSizes):

  • Shared/CacheModel.h:
  • Shared/WebPreferences.yaml:
  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::willGoToBackForwardListItem):

  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::copy):

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetPageCacheEnabled):
(WKPreferencesGetPageCacheEnabled):
(WKPreferencesSetPageCacheSupportsPlugins):
(WKPreferencesGetPageCacheSupportsPlugins):

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _setUsesPageCache:]):
(-[WKPreferences _usesPageCache]):
(-[WKPreferences _setPageCacheSupportsPlugins:]):
(-[WKPreferences _pageCacheSupportsPlugins]):

  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

(-[_WKProcessPoolConfiguration pageCacheEnabled]):
(-[_WKProcessPoolConfiguration setPageCacheEnabled:]):

  • UIProcess/API/glib/WebKitSettings.cpp:

(webkit_settings_get_enable_page_cache):
(webkit_settings_set_enable_page_cache):

  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::willGoToBackForwardListItem):
(WebKit::NavigationState::NavigationClient::didStartProvisionalNavigation):
(WebKit::NavigationState::NavigationClient::didReceiveServerRedirectForProvisionalNavigation):
(WebKit::NavigationState::NavigationClient::didFailProvisionalNavigationWithError):
(WebKit::NavigationState::NavigationClient::didCommitNavigation):
(WebKit::NavigationState::NavigationClient::didFinishDocumentLoad):
(WebKit::NavigationState::NavigationClient::didFinishNavigation):
(WebKit::NavigationState::NavigationClient::didFailNavigationWithError):
(WebKit::NavigationState::NavigationClient::didSameDocumentNavigation):

  • UIProcess/ViewGestureController.cpp:

(WebKit::ViewGestureController::didReachMainFrameLoadTerminalState):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::shouldUseBackForwardCache const):
(WebKit::WebPageProxy::willGoToBackForwardListItem):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didFailProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFailLoadForFrame):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::updateBackForwardCacheCapacity):

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

(WKBundleBackForwardListItemIsInBackForwardCache):

  • WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h:
  • WebProcess/WebCoreSupport/SessionStateConversion.cpp:

(WebKit::toBackForwardListItemState):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem const):
(WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
(WebKit::WebFrameLoaderClient::didRestoreFromBackForwardCache):
(WebKit::WebFrameLoaderClient::createPlugin):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
  • WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:

(WebKit::WebFrameLoaderClient::forceLayoutOnRestoreFromBackForwardCache):

  • WebProcess/WebPage/VisitedLinkTableController.cpp:
  • WebProcess/WebPage/WebBackForwardListProxy.cpp:

(WebKit::WebBackForwardListProxy::removeItem):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::suspendForProcessSwap):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::setCacheModel):
(WebKit::WebProcess::deleteWebsiteData):
(WebKit::WebProcess::setBackForwardCacheCapacity):
(WebKit::WebProcess::clearCachedPage):

  • WebProcess/WebProcess.h:

Source/WebKitLegacy/ios:

  • WebView/WebUIKitDelegate.h:

Source/WebKitLegacy/mac:

  • History/BackForwardList.mm:

(BackForwardList::addItem):
(BackForwardList::setCapacity):

  • History/WebBackForwardList.mm:

(-[WebBackForwardList pageCacheSize]):

  • History/WebHistoryItem.mm:
  • History/WebHistoryItemPrivate.h:
  • Misc/WebCache.mm:
  • Misc/WebCoreStatistics.mm:

(+[WebCoreStatistics cachedPageCount]):
(+[WebCoreStatistics cachedFrameCount]):

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::forceLayoutOnRestoreFromBackForwardCache):
(WebFrameLoaderClient::didRestoreFromBackForwardCache):

  • WebCoreSupport/WebVisitedLinkStore.mm:
  • WebView/WebHTMLView.mm:

(-[WebHTMLView layoutToMinimumPageWidth:height:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustingViewSize:]):
(-[WebHTMLView setNeedsLayout:]):
(-[WebHTMLView setNeedsToApplyStyles:]):

  • WebView/WebView.mm:

(-[WebView _close]):
(-[WebView _preferencesChanged:]):
(+[WebView _setCacheModel:]):

Source/WebKitLegacy/win:

  • BackForwardList.cpp:

(BackForwardList::addItem):
(BackForwardList::setCapacity):

  • WebCoreStatistics.cpp:

(WebCoreStatistics::cachedPageCount):
(WebCoreStatistics::cachedFrameCount):

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::didRestoreFromBackForwardCache):

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebVisitedLinkStore.cpp:
  • WebFrame.cpp:

(WebFrame::accessible const):

  • WebView.cpp:

(WebView::setCacheModel):
(WebView::notifyPreferencesChanged):

Tools:

  • DumpRenderTree/TestOptions.cpp:

(TestOptions::TestOptions):

  • DumpRenderTree/TestOptions.h:
  • DumpRenderTree/TestRunner.cpp:

(overridePreferenceCallback):

  • DumpRenderTree/mac/DumpRenderTree.mm:

(setWebPreferencesForTestOptions):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(resetWebPreferencesToConsistentValues):
(setWebPreferencesForTestOptions):

  • TestWebKitAPI/Tests/WebKit/DOMWindowExtensionBasic.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/DOMWindowExtensionNoCache_Bundle.cpp:

(TestWebKitAPI::DOMWindowExtensionNoCache::willDisconnectDOMWindowExtensionFromGlobalObject):
(TestWebKitAPI::DOMWindowExtensionNoCache::didReconnectDOMWindowExtensionToGlobalObject):

  • TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp:

(TestWebKitAPI::DidRemoveFrameFromHiearchyInBackForwardCacheTest::DidRemoveFrameFromHiearchyInBackForwardCacheTest):
(TestWebKitAPI::DidRemoveFrameFromHiearchyInBackForwardCacheTest::didCreatePage):

  • TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:

(testWebKitSettings):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::overridePreference):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

  • lldb/lldb_webkit.py:

(WebCoreFrame_SummaryProvider):
(WebCoreDocument_SummaryProvider):
(WebCoreDocumentProvider.page_cache_state):

LayoutTests:

  • animations/resume-after-page-cache.html:
  • compositing/accelerated-layers-after-back.html:
  • compositing/iframes/page-cache-layer-tree.html:
  • compositing/page-cache-back-crash.html:
  • compositing/show-composited-iframe-on-back-button.html:
  • editing/mac/input/unconfirmed-text-navigation-with-page-cache.html:
  • fast/canvas/webgl/canvas-webgl-page-cache.html:
  • fast/css/fontloader-page-cache.html:
  • fast/dom/DeviceMotion/no-page-cache.html:
  • fast/dom/DeviceOrientation/event-after-navigation.html:
  • fast/dom/DeviceOrientation/no-page-cache.html:
  • fast/dom/Window/timer-resume-on-navigation-back.html:
  • fast/events/onunload-back-to-page-cache.html:
  • fast/events/pagehide-timeout.html:
  • fast/events/pagehide-xhr-open.html:
  • fast/events/pageshow-pagehide-on-back-cached-with-frames.html:
  • fast/events/pageshow-pagehide-on-back-cached.html:
  • fast/events/suspend-timers.html:
  • fast/forms/autocomplete-off-with-default-value-does-not-clear.html:
  • fast/frames/frame-crash-with-page-cache.html:
  • fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html:
  • fast/frames/page-hide-document-open.html:
  • fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html:
  • fast/frames/restoring-page-cache-should-not-run-scripts.html:
  • fast/harness/page-cache-crash-on-data-urls.html:
  • fast/harness/use-page-cache.html:
  • fast/history/back-from-page-with-focused-iframe.html:
  • fast/history/go-back-to-iframe-with-plugin.html:
  • fast/history/go-back-to-object-subframe.html:
  • fast/history/history-back-while-pdf-in-pagecache.html:
  • fast/history/page-cache-MessagePort-pending-message.html:
  • fast/history/page-cache-after-window-open.html:
  • fast/history/page-cache-back-navigation-crash.html:
  • fast/history/page-cache-clearing-expected.txt:
  • fast/history/page-cache-clearing.html:
  • fast/history/page-cache-closed-audiocontext.html:
  • fast/history/page-cache-createImageBitmap.html:
  • fast/history/page-cache-createObjectURL-using-open-panel.html:
  • fast/history/page-cache-createObjectURL.html:
  • fast/history/page-cache-destroy-document.html:
  • fast/history/page-cache-element-state-focused.html:
  • fast/history/page-cache-execute-script-during-restore.html:
  • fast/history/page-cache-geolocation-active-oneshot.html:
  • fast/history/page-cache-geolocation-active-watcher.html:
  • fast/history/page-cache-geolocation.html:
  • fast/history/page-cache-iframe-js-url.html:
  • fast/history/page-cache-indexed-closed-db.html:
  • fast/history/page-cache-indexed-opened-db.html:
  • fast/history/page-cache-media-source-closed-2.html:
  • fast/history/page-cache-media-source-closed.html:
  • fast/history/page-cache-media-source-opened.html:
  • fast/history/page-cache-navigate-during-restore.html:
  • fast/history/page-cache-notification-non-suspendable.html:
  • fast/history/page-cache-notification-suspendable.html:
  • fast/history/page-cache-removed-source-buffer.html:
  • fast/history/page-cache-running-audiocontext.html:
  • fast/history/page-cache-subframes-with-provisional-load.html:
  • fast/history/page-cache-suspended-audiocontext.html:
  • fast/history/page-cache-webdatabase-no-transaction-db.html:
  • fast/history/page-cache-webdatabase-pending-transaction.html:
  • fast/history/page-cache-with-opener.html:
  • fast/history/pagehide-remove-iframe-crash.html:
  • fast/history/resources/page-cache-window-with-iframe.html:
  • fast/history/resources/page-cache-window-with-opener.html:
  • fast/history/timed-refresh-in-cached-frame.html:
  • fast/images/animated-gif-restored-from-bfcache.html:
  • fast/loader/frames-with-unload-handlers-in-page-cache.html:
  • fast/loader/image-in-page-cache.html:
  • fast/loader/input-element-page-cache-crash.html:
  • fast/loader/navigate-with-new-target-after-back-forward-navigation.html:
  • fast/loader/navigate-with-post-to-new-target-after-back-forward-navigation.html:
  • fast/loader/scroll-position-restored-on-back.html:
  • fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html:
  • fast/loader/stateobjects/popstate-fires-with-page-cache.html:
  • fast/loader/unschedule-relayout-after-unload.html:
  • fast/loader/window-properties-restored-from-page-cache.html:
  • fast/mediastream/RTCPeerConnection-page-cache.html:
  • fast/overflow/horizontal-scroll-after-back.html:
  • fast/scrolling/iframe-scrollable-after-back.html:
  • fast/scrolling/ios/scroll-events-back-forward-after-pageshow.html:
  • fast/scrolling/ios/scroll-events-back-forward.html:
  • fast/scrolling/ios/touch-scroll-back-forward.html:
  • fast/scrolling/overflow-scrollable-after-back.html:
  • fast/scrolling/page-cache-back-overflow-scroll-restore.html:
  • fast/text-autosizing/ios/text-autosizing-after-back.html:
  • fast/viewport/ios/viewport-shrink-to-fit-on-new-navigation.html:
  • fast/viewport/viewport-128.html:
  • fast/workers/worker-page-cache.html:
  • http/tests/cache/display-image-unset-allows-cached-image-load.html:
  • http/tests/eventsource/eventsource-page-cache-connected.html:
  • http/tests/eventsource/eventsource-page-cache-connecting.html:
  • http/tests/loading/main-resource-delegates-on-back-navigation.html:
  • http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html:
  • http/tests/loading/unfinished-main-resource-back-to-cached-page-callbacks.html:
  • http/tests/media/reload-after-dialog.html:
  • http/tests/navigation/go-back-to-error-page.html:
  • http/tests/navigation/https-in-page-cache.html:
  • http/tests/navigation/https-no-store-subframe-in-page-cache.html:
  • http/tests/navigation/image-load-in-pagehide-handler.html:
  • http/tests/navigation/page-cache-domcache-pending-promise.html:
  • http/tests/navigation/page-cache-domcachestorage-pending-promise.html:
  • http/tests/navigation/page-cache-failed-xhr.html:
  • http/tests/navigation/page-cache-fontfaceset.html:
  • http/tests/navigation/page-cache-fragment-referrer.html:
  • http/tests/navigation/page-cache-iframe-no-current-historyItem.html:
  • http/tests/navigation/page-cache-iframe-provisional-load-async-delegates.html:
  • http/tests/navigation/page-cache-iframe-provisional-load.html:
  • http/tests/navigation/page-cache-pending-image-load-cache-partition.html:
  • http/tests/navigation/page-cache-pending-image-load.html:
  • http/tests/navigation/page-cache-pending-load.html:
  • http/tests/navigation/page-cache-pending-ping-load-cross-origin.html:
  • http/tests/navigation/page-cache-pending-ping-load-same-origin.html:
  • http/tests/navigation/page-cache-requestAnimationFrame.html:
  • http/tests/navigation/page-cache-xhr-in-pagehide.html:
  • http/tests/navigation/page-cache-xhr.html:
  • http/tests/navigation/resources/https-in-page-cache-3.html:
  • http/tests/navigation/subframe-pagehide-handler-starts-load.html:
  • http/tests/navigation/subframe-pagehide-handler-starts-load2.html:
  • http/tests/security/cross-origin-window-open-insert-script.html:
  • http/tests/security/cross-origin-window-open-javascript-url.html:
  • http/tests/security/navigate-when-restoring-cached-page.html:
  • http/tests/security/xss-DENIED-click-and-form-submission-from-inactive-domwindow.html:
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window.html:
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window2-pson.html:
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window2.html:
  • http/tests/security/xss-DENIED-script-inject-into-inactive-window3.html:
  • http/tests/websocket/tests/hybi/closed-when-entering-page-cache.html:
  • http/tests/websocket/tests/hybi/stop-on-resume-in-error-handler.html:
  • http/tests/workers/service/client-added-to-clients-when-restored-from-page-cache.html:
  • http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html:
  • http/tests/workers/service/page-cache-service-worker-pending-promise.https.html:
  • http/tests/workers/service/page-caching.html:
  • http/wpt/beacon/support/sendBeacon-onpagehide-window.html:
  • legacy-animation-engine/animations/resume-after-page-cache.html:
  • loader/go-back-cached-main-resource.html:
  • loader/go-back-to-different-window-size.html:
  • media/crash-closing-page-with-media-as-plugin-fallback.html:
  • media/media-source/media-source-page-cache.html:
  • media/restore-from-page-cache.html:
  • platform/ios/ios/fixed/fixed-back-forward.html:
  • plugins/crash-restoring-plugin-page-from-page-cache.html:
  • plugins/frameset-with-plugin-frame.html:
  • plugins/netscape-plugin-page-cache-works.html:
  • storage/indexeddb/IDBRequest-page-cache.html:
  • storage/indexeddb/IDBTransaction-page-cache.html:
  • swipe/basic-cached-back-swipe.html:
  • swipe/main-frame-pinning-requirement.html:
  • swipe/pushState-cached-back-swipe.html:
  • swipe/pushState-programmatic-back-while-swiping-crash.html:
  • swipe/pushstate-with-manual-scrollrestoration.html:
  • tiled-drawing/scrolling/null-parent-back-crash.html:
  • tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html:
  • webrtc/datachannel/datachannel-page-cache-send.html:
  • webrtc/datachannel/datachannel-page-cache.html:
5:36 PM Changeset in webkit [251219] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Remove ubiquity client rule from sandbox
https://bugs.webkit.org/show_bug.cgi?id=201347

Reviewed by Brent Fulgham.

This rule is most likely not needed, since we have already blocked all of its associated mach services,
and no issues have been reported.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
5:15 PM Changeset in webkit [251218] by timothy_horton@apple.com
  • 3 edits
    1 add in trunk

iOS: inputmode=none is not respected with a hardware keyboard attached
https://bugs.webkit.org/show_bug.cgi?id=203061

Reviewed by Daniel Bates.

Source/WebKit:

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView shouldShowAutomaticKeyboardUI]):
We can resolve this FIXME, as the underlying bug was fixed in <rdar://problem/52706523>.
This now means that we will respect inputmode=none even when a hardware
keyboard is attached, significantly improving the experience on sites that use it
by avoiding an intermittent input bar.

LayoutTests:

  • fast/forms/ios/inputmode-none-with-hardware-keyboard.html: Added.

Clone inputmode-none.html to inputmode-none-with-hardware-keyboard.html
and remove the line to faux-detach the hardware keyboard.

4:39 PM Changeset in webkit [251217] by Alan Coon
  • 1 copy in tags/Safari-608.3.10.1.4

Tag Safari-608.3.10.1.4.

4:01 PM Changeset in webkit [251216] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Remove send-signal from mach-lookup rule
https://bugs.webkit.org/show_bug.cgi?id=201203

Reviewed by Brent Fulgham.

The send-signal can be removed, since crashes have not been reported from this rule.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
3:49 PM Changeset in webkit [251215] by dino@apple.com
  • 3 edits
    1 move
    2 adds in trunk/Source/WebKit

Add Swift modulemap for WebKit Private APIs
https://bugs.webkit.org/show_bug.cgi?id=203059

Reviewed by Tim Horton.

Provide a Swift modulemap for WebKit_Private, and
ensure WKPreferencesPrivate.h is exposed.

Renamed OSX.modulemap to macOS.modulemap while here.

  • Configurations/WebKit.xcconfig:
  • Modules/iOS.private.modulemap: Added.
  • Modules/macOS.modulemap: Renamed from Source/WebKit/Modules/OSX.modulemap.
  • Modules/macOS.private.modulemap: Added.
  • Shared/API/Cocoa/WebKitPrivate.h: Include WKPreferencesPrivate.h.
3:47 PM Changeset in webkit [251214] by Jonathan Bedard
  • 4 edits in trunk/Tools

Python 3: Add support in webkitpy.common.net.bugzilla
https://bugs.webkit.org/show_bug.cgi?id=202468

Reviewed by Stephanie Lewis.

Make the irc library we use Python 3 compatible.

  • Scripts/test-webkitpy-python3: Add webkitpy.common.net.bugzilla to the test list.
  • Scripts/webkitpy/thirdparty/irc/ircbot.py: Use full import paths.
  • Scripts/webkitpy/thirdparty/irc/irclib.py: Fix exceptions, printing for Python 3.

(Connection._get_socket):
(ServerConnection.connect):
(ServerConnection.process_data):
(ServerConnection.disconnect):
(ServerConnection.send_raw):
(DCCConnection.connect):
(DCCConnection.listen):
(DCCConnection.disconnect):
(DCCConnection.process_data):
(DCCConnection.privmsg):

3:38 PM Changeset in webkit [251213] by wilander@apple.com
  • 37 edits
    4 adds in trunk

Resource Load Statistics (experimental): Block all third-party cookies on websites without prior user interaction
https://bugs.webkit.org/show_bug.cgi?id=203017
<rdar://problem/56262708>

Reviewed by Alex Christensen.

Source/WebCore:

NetworkStorageSession::shouldBlockCookies() now checks if the first-party website has
received user interaction and if not, blocks all third-party cookies, regardless of the
status of those third-party domains (prevalent or not).

Bundled cleanup task: Remove the two month old feature flag for NSURLSession switching.

Tests: http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction-database.html

http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction.html

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setIsITPSessionSwitchingEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::isITPSessionSwitchingEnabled const): Deleted.

  • page/Settings.yaml:
  • platform/network/NetworkStorageSession.cpp:

(WebCore::NetworkStorageSession::hasHadUserInteractionAsFirstParty const):
(WebCore::NetworkStorageSession::shouldBlockCookies const):
(WebCore::NetworkStorageSession::setDomainsWithUserInteractionAsFirstParty):

  • platform/network/NetworkStorageSession.h:

(WebCore::NetworkStorageSession::setIsThirdPartyCookieBlockingOnSitesWithoutUserInteractionEnabled):

Source/WebKit:

This enhancement is off by default and controlled by an internal feature flag.

The functional change is in WebCore::NetworkStorageSession::shouldBlockCookies() which is
called from:

  • NetworkDataTaskCocoa::NetworkDataTaskCocoa()
  • NetworkDataTaskCocoa::willPerformHTTPRedirection

shouldBlockCookies() now checks if the first-party website has received user interaction
and if not, blocks all third-party cookies, regardless of the status of those third-party
domains (prevalent or not).

The changes to ResourceLoadStatisticsDatabaseStore and ResourceLoadStatisticsMemoryStore
are about communicating which domains have received user interaction (prevalent or not)
to the network storage session so that it can enforce the new restriction.

The C API change and piping through the WebsiteDataStore is test infrastructure.

Bundled cleanup task: Remove the two month old feature flag for NSURLSession switching.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::CompletionHandler<void):

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::clear):
(WebKit::ResourceLoadStatisticsMemoryStore::updateCookieBlocking):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:

(WebKit::RegistrableDomainsToBlockCookiesFor::isolatedCopy const):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::setShouldBlockThirdPartyCookiesForTesting):

  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::NetworkSession):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::setResourceLoadStatisticsLogTestingEvent):
(WebKit::NetworkSession::shouldIsolateSessionsForPrevalentTopFrames const): Deleted.

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

  • NetworkProcess/NetworkSessionCreationParameters.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • Shared/WebPreferences.yaml:
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetResourceLoadStatisticsShouldBlockThirdPartyCookiesForTesting):
(WKWebsiteDataStoreStatisticsResetToConsistentState):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::setShouldBlockThirdPartyCookiesForTesting):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::setResourceLoadStatisticsShouldBlockThirdPartyCookiesForTesting):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

These changes are test infrastructure to be able to toggle the function
through testRunner.setStatisticsShouldBlockThirdPartyCookies().

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setStatisticsShouldBlockThirdPartyCookies):
(WTR::TestRunner::statisticsCallDidSetShouldBlockThirdPartyCookiesCallback):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::setStatisticsShouldBlockThirdPartyCookies):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::didSetShouldBlockThirdPartyCookies):

  • WebKitTestRunner/TestInvocation.h:

LayoutTests:

  • http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction-database.html: Added.
  • http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction-expected.txt: Added.
  • http/tests/resourceLoadStatistics/third-party-cookie-blocking-on-sites-without-user-interaction.html: Added.
3:16 PM Changeset in webkit [251212] by commit-queue@webkit.org
  • 12 edits in trunk

WKWebsiteDataStoreStatisticsResetToConsistentState() should call store.setUseITPDatabase(false)
https://bugs.webkit.org/show_bug.cgi?id=203020
<rdar://problem/56314484>

Patch by Kate Cheney <Kate Cheney> on 2019-10-16
Reviewed by Chris Dumez.

Source/WebKit:

The resourceLoadStatisticsStore should be reset between tests to use
a memory store, and any test that needs to use the database store
can use the setUseITPDatabase function.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::setUseITPDatabase):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetUseITPDatabase):
(WKWebsiteDataStoreStatisticsResetToConsistentState):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::setUseITPDatabase):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::setUseITPDatabase):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

Added a completion handler to setUseITPDatabase() to avoid race
conditions.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::setUseITPDatabase):

3:01 PM Changeset in webkit [251211] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Add style and text content to Display::Run
https://bugs.webkit.org/show_bug.cgi?id=203045
<rdar://problem/56340105>

Reviewed by Antti Koivisto.

Painting Display::Runs requires style and text content. Currently there's no mapping structure to connect Display::Runs to Display::Boxes to access style and content.

  • layout/displaytree/DisplayRun.h:

(WebCore::Display::Run::TextContext::content const):
(WebCore::Display::Run::style const):
(WebCore::Display::Run::Run):
(WebCore::Display::Run::TextContext::TextContext):
(WebCore::Display::Run::TextContext::expand):

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::appendNonBreakableSpace):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::appendHardLineBreak):

  • layout/inlineformatting/InlineLine.h:

(WebCore::Layout::Line::Run::expand):

2:52 PM Changeset in webkit [251210] by Alan Coon
  • 25 edits
    13 deletes in tags/Safari-609.1.7

Revert r250540. rdar://problem/56306218

2:51 PM Changeset in webkit [251209] by keith_miller@apple.com
  • 3 edits
    1 add in trunk

Move assert in Wasm::Plan::fail.
https://bugs.webkit.org/show_bug.cgi?id=203052

Reviewed by Mark Lam.

JSTests:

  • wasm/regress/wasm-plan-fail-bad-error-message-assert.js: Added.

(Binary):
(Binary.prototype.trunc_buffer):
(Binary.prototype.emit_leb_u):
(Binary.prototype.emit_u32v):
(Binary.prototype.emit_bytes):
(Binary.prototype.emit_header):
(f_576):
(
f_587):

Source/JavaScriptCore:

Since we changed how Wasm::Plan interacts with the streaming
parser it's possible for the streaming parser to call fail with no
error message (because the corresponding Wasm::Plan already
failed). This patch moves an erroneous assert so it no longer
trips when this happens.

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::fail):

2:49 PM Changeset in webkit [251208] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

checkConsistency in Air O0 should only run when validation is enabled
https://bugs.webkit.org/show_bug.cgi?id=203050

Reviewed by Saam Barati.

I resued the validateGraph and validateGraphAtEachPhase options
because adding a new option and threading it through all our
testing infrastructure didn't seem worthwhile for this.

  • b3/air/AirAllocateRegistersAndStackAndGenerateCode.cpp:

(JSC::B3::Air::GenerateAndAllocateRegisters::checkConsistency):

2:24 PM Changeset in webkit [251207] by Simon Fraser
  • 8 edits
    1 add in trunk/Source/WebCore

Add dumping for BorderData and StyleBackgroundData
https://bugs.webkit.org/show_bug.cgi?id=203038

Reviewed by Zalan Bujtas.

As part of adding dumping for all RenderStyle data, add dumping support for
BorderData and StyleBackgroundData.

For large classes it's beneficial to avoid dumping default values; those classes
get a dump() function that can take an argument to say whether values which are default
should be printed.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/LengthSize.h:

(WebCore::LengthSize::isZero const):

  • rendering/style/BorderData.cpp: Added.

(WebCore::operator<<):
(WebCore::BorderData::dump const):

  • rendering/style/BorderData.h:
  • rendering/style/RenderStyleConstants.h:
  • rendering/style/StyleBackgroundData.cpp:

(WebCore::StyleBackgroundData::dump const):
(WebCore::operator<<):

  • rendering/style/StyleBackgroundData.h:
2:14 PM Changeset in webkit [251206] by Alan Coon
  • 3 edits in branches/safari-608.3.10.1-branch/Source/WebCore

Cherry-pick r251188. rdar://problem/56340800

WebAudioSourceProviderAVFObjC::provideInput should set its WebAudioBufferList parameters correctly
https://bugs.webkit.org/show_bug.cgi?id=202930
<rdar://problem/56006776>

Reviewed by Eric Carlson.

Source/WebCore:

There is a time where the bus channel number and audio source channel numbers may be different.
In case the bus channel number is less than the audio source channel number, initialization of
the WebAudioBufferList might not be fully done.
In that case, output silence and return early.
Reduce the number of frames to process based on the number of frames the output audio bus plans to process.

Partially covered by new API test (this a race so we cannot reproduce the crash easily).

  • Modules/webaudio/MediaStreamAudioSourceNode.cpp: (WebCore::MediaStreamAudioSourceNode::process): Make sure to process the number of frames the output bus expect.
  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm: (WebCore::WebAudioSourceProviderAVFObjC::provideInput):

Tools:

Add a test that has an audio track that goes from 1 to 2 channels while being piped to a WebAudio pipeline.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm: (-[GUMMessageHandler userContentController:didReceiveScriptMessage:]): (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKit/getUserMedia-webaudio.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251188 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2:09 PM Changeset in webkit [251205] by Alan Coon
  • 7 edits in branches/safari-608.3.10.1-branch/Source

Versioning.

1:54 PM Changeset in webkit [251204] by Chris Dumez
  • 9 edits in trunk/Source

Source/WebCore:
[WK2] Handle back/forward cache entry expiration in the UIProcess instead of the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=203034
<rdar://problem/56332453>

Reviewed by Antti Koivisto.

Use Seconds type for backForwardCacheExpirationInterval setting instead of
double, for clarity.

  • history/CachedPage.cpp:

(WebCore::CachedPage::CachedPage):
(WebCore::CachedPage::hasExpired const):

  • page/Settings.yaml:

Source/WebKit:
[WK2] Handle back/forward cache entry expiration in the UIProcess instead of the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=203034
<rdar://problem/56332453>

Reviewed by Antti Koivisto.

Handle back/forward cache entry expiration in the UIProcess instead of the WebProcess,
now that back/forward cache management is done in the UIProcess.

  • UIProcess/WebBackForwardCacheEntry.cpp:

(WebKit::WebBackForwardCacheEntry::WebBackForwardCacheEntry):
(WebKit::WebBackForwardCacheEntry::takeSuspendedPage):
(WebKit::WebBackForwardCacheEntry::expirationTimerFired):

  • UIProcess/WebBackForwardCacheEntry.h:

Add a Timer to WebBackForwardCacheEntry to make the entry expire after 30 minutes, which is what used
to happen on WebContent process side. One difference in behavior is that when the entry expires we
now remove it from the cache right away to free-up memory, instead of simply refusing to use it later
on.

  • WebProcess/WebPage/WebPage.cpp:

Disable back forward cache expiration in the WebContent process when using modern
WebKit.

Source/WebKitLegacy/mac:
[WK2] Move back/forward cache entry expiration from the WebProcess to the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=203034
<rdar://problem/56332453>

Reviewed by Antti Koivisto.

  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

1:49 PM Changeset in webkit [251203] by Alan Coon
  • 1 copy in tags/Safari-608.3.10.10.1

Tag Safari-608.3.10.10.1.

1:47 PM Changeset in webkit [251202] by Alan Coon
  • 4 edits in branches/safari-608.3.10.10-branch

Cherry-pick r251188. rdar://problem/56340800

WebAudioSourceProviderAVFObjC::provideInput should set its WebAudioBufferList parameters correctly
https://bugs.webkit.org/show_bug.cgi?id=202930
<rdar://problem/56006776>

Reviewed by Eric Carlson.

Source/WebCore:

There is a time where the bus channel number and audio source channel numbers may be different.
In case the bus channel number is less than the audio source channel number, initialization of
the WebAudioBufferList might not be fully done.
In that case, output silence and return early.
Reduce the number of frames to process based on the number of frames the output audio bus plans to process.

Partially covered by new API test (this a race so we cannot reproduce the crash easily).

  • Modules/webaudio/MediaStreamAudioSourceNode.cpp: (WebCore::MediaStreamAudioSourceNode::process): Make sure to process the number of frames the output bus expect.
  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm: (WebCore::WebAudioSourceProviderAVFObjC::provideInput):

Tools:

Add a test that has an audio track that goes from 1 to 2 channels while being piped to a WebAudio pipeline.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm: (-[GUMMessageHandler userContentController:didReceiveScriptMessage:]): (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKit/getUserMedia-webaudio.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251188 268f45cc-cd09-0410-ab3c-d52691b4dbfc

1:44 PM Changeset in webkit [251201] by Alan Coon
  • 5 edits
    1 delete in branches/safari-608.3.10.10-branch

Revert "Cherry-pick r251188. rdar://problem/56340800"

This reverts commit 251199.

1:32 PM Changeset in webkit [251200] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Fix various vertical alignment issues.
https://bugs.webkit.org/show_bug.cgi?id=203041

Reviewed by Antti Koivisto.

This patch fixes both regular inline box and inline-block baseline aligment. It also addresses a few related vertical positioning issues.

  • layout/inlineformatting/InlineLine.cpp:

(WebCore::Layout::Line::alignContentVertically):
(WebCore::Layout::Line::appendInlineContainerStart):
(WebCore::Layout::Line::appendInlineContainerEnd):
(WebCore::Layout::Line::appendTextContent):
(WebCore::Layout::Line::appendNonReplacedInlineBox):
(WebCore::Layout::Line::appendHardLineBreak):
(WebCore::Layout::Line::adjustBaselineAndLineHeight):
(WebCore::Layout::Line::inlineItemContentHeight const):

  • layout/inlineformatting/InlineLine.h:
  • layout/inlineformatting/InlineLineBox.h:

(WebCore::Layout::LineBox::resetDescent):
(WebCore::Layout::LineBox::setLogicalHeightIfGreater):
(WebCore::Layout::LineBox::setBaselineOffsetIfGreater):
(WebCore::Layout::LineBox::setAscentIfGreater):
(WebCore::Layout::LineBox::setDescentIfGreater):
(WebCore::Layout::LineBox::resetBaseline):
(WebCore::Layout::LineBox::setBaseline): Deleted.
(WebCore::Layout::LineBox::baseline): Deleted.
(WebCore::Layout::LineBox::setBaselineOffset): Deleted.
(WebCore::Layout::LineBox::Baseline::setAscentIfGreater): Deleted.
(WebCore::Layout::LineBox::Baseline::setDescentIfGreater): Deleted.

1:30 PM Changeset in webkit [251199] by Alan Coon
  • 5 edits
    1 add in branches/safari-608.3.10.10-branch

Cherry-pick r251188. rdar://problem/56340800

WebAudioSourceProviderAVFObjC::provideInput should set its WebAudioBufferList parameters correctly
https://bugs.webkit.org/show_bug.cgi?id=202930
<rdar://problem/56006776>

Reviewed by Eric Carlson.

Source/WebCore:

There is a time where the bus channel number and audio source channel numbers may be different.
In case the bus channel number is less than the audio source channel number, initialization of
the WebAudioBufferList might not be fully done.
In that case, output silence and return early.
Reduce the number of frames to process based on the number of frames the output audio bus plans to process.

Partially covered by new API test (this a race so we cannot reproduce the crash easily).

  • Modules/webaudio/MediaStreamAudioSourceNode.cpp: (WebCore::MediaStreamAudioSourceNode::process): Make sure to process the number of frames the output bus expect.
  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm: (WebCore::WebAudioSourceProviderAVFObjC::provideInput):

Tools:

Add a test that has an audio track that goes from 1 to 2 channels while being piped to a WebAudio pipeline.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm: (-[GUMMessageHandler userContentController:didReceiveScriptMessage:]): (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/WebKit/getUserMedia-webaudio.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251188 268f45cc-cd09-0410-ab3c-d52691b4dbfc

1:06 PM Changeset in webkit [251198] by Alan Coon
  • 7 edits in branches/safari-608.3.10.10-branch/Source

Versioning.

12:53 PM Changeset in webkit [251197] by Alan Coon
  • 1 copy in branches/safari-608.3.10.10-branch

New branch.

12:50 PM Changeset in webkit [251196] by Caio Lima
  • 2 edits in trunk/Source/JavaScriptCore

Invalid instruction generated for ARM_THUMB2 in llint
https://bugs.webkit.org/show_bug.cgi?id=202844

Reviewed by Saam Barati.

Do not allow instruction execution to reach OSR return label on ARMv7.
Currently we are seeing the instruction execution hitting a .word directive in
the instruction stream and segfaulting. There are two words used to represent a
global label which was generated as part of the work on OSR Exit to LLInt work
(r250806). The double word generation only occurs in ARMv7 and therefore only here
the segfault manifests itself.

  • llint/LowLevelInterpreter.asm:
12:22 PM Changeset in webkit [251195] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[iOS] Stop terminating the prewarmed process on application suspension
https://bugs.webkit.org/show_bug.cgi?id=203033

Reviewed by Alex Christensen.

Stop terminating the prewarmed process on application suspension. Having no prewarmed process when the
application resumes means the next cross-site load will be significantly slower. If the system needs
memory, this process can be jetsammed.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::applicationIsAboutToSuspend):

11:24 AM Changeset in webkit [251194] by Chris Dumez
  • 21 edits in trunk/Source

Drop unused WKPageSetResourceCachingDisabled() SPI
https://bugs.webkit.org/show_bug.cgi?id=203035

Reviewed by Alex Christensen.

Source/WebCore:

  • history/PageCache.cpp:

(WebCore::canCachePage):
(WebCore::PageCache::take):
(WebCore::PageCache::get):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerShouldUsePersistentCache const):

  • inspector/agents/page/PageNetworkAgent.cpp:

(WebCore::PageNetworkAgent::setResourceCachingDisabled):

  • inspector/agents/worker/WorkerNetworkAgent.cpp:

(WebCore::WorkerNetworkAgent::setResourceCachingDisabled):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::subresourceCachePolicy const):
(WebCore::FrameLoader::addExtraFieldsToRequest):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::cachePolicy const):

  • page/Page.h:

(WebCore::Page::isResourceCachingDisabledByWebInspector const):
(WebCore::Page::setResourceCachingDisabledByWebInspector):
(WebCore::Page::isResourceCachingDisabled const): Deleted.
(WebCore::Page::setResourceCachingDisabled): Deleted.
(WebCore::Page::setResourceCachingDisabledOverride): Deleted.

  • workers/WorkerDebuggerProxy.h:
  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::setResourceCachingDisabledByWebInspector):
(WebCore::WorkerMessagingProxy::setResourceCachingDisabled): Deleted.

  • workers/WorkerMessagingProxy.h:
  • workers/service/context/ServiceWorkerThreadProxy.cpp:

(WebCore::ServiceWorkerThreadProxy::setResourceCachingDisabledByWebInspector):
(WebCore::ServiceWorkerThreadProxy::setResourceCachingDisabled): Deleted.

  • workers/service/context/ServiceWorkerThreadProxy.h:

Source/WebKit:

  • UIProcess/API/C/WKPage.cpp:

(WKPageGetResourceCachingDisabled): Deleted.
(WKPageSetResourceCachingDisabled): Deleted.

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setResourceCachingDisabled): Deleted.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::isResourceCachingDisabled const): Deleted.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setResourceCachingDisabled): Deleted.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
11:15 AM Changeset in webkit [251193] by Fujii Hironori
  • 9 edits in trunk

DumpRenderTree should clear WTFLogChannelState::OnWithAccumulation state set by testRunner.accummulateLogsForChannel
https://bugs.webkit.org/show_bug.cgi?id=203024

Reviewed by Alex Christensen.

Source/WebCore:

  • platform/LogInitialization.h:
  • platform/Logging.cpp:

(WebCore::clearAllLogChannelsToAccumulate): Added.

  • platform/Logging.h:
  • testing/js/WebCoreTestSupport.cpp:

(WebCoreTestSupport::clearAllLogChannelsToAccumulate): Added.

  • testing/js/WebCoreTestSupport.h:

Tools:

If a test case calls testRunner.accummulateLogsForChannel("IndexedDB"),
all subsequent IndexedDB tests also dump the log.
This is unnecessarily bloating DumpRenderTree log because
DumpRenderTree is run with --debug-rwt-logging switch on Buildbot.

Add a function to clear WTFLogChannelState::OnWithAccumulation
state, and call it for every test execution.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebViewToConsistentStateBeforeTesting):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(resetWebViewToConsistentStateBeforeTesting):
Call WebCoreTestSupport::clearAllLogChannelsToAccumulate.

10:37 AM Changeset in webkit [251192] by Wenson Hsieh
  • 2 edits in trunk/Tools

Remove an API test workaround that is no longer needed
https://bugs.webkit.org/show_bug.cgi?id=203037

Reviewed by Tim Horton.

This worked around <rdar://problem/51510554> by avoiding codepaths that resulted in failure to read dropped
content from NSItemProviders on iOS. <rdar://problem/51510554> is fixed in iOS 13, so we can remove this hack.

  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[TestWKWebView initWithFrame:configuration:addToWindow:]):
(applyWorkaroundToAllowWritingAttributedStringsToItemProviders): Deleted.

10:26 AM Changeset in webkit [251191] by Pablo Saavedra
  • 1 edit
    1 add in trunk/Tools

[Tools] Add a driver for cog for benchmark_runner.py
https://bugs.webkit.org/show_bug.cgi?id=202995

Reviewed by Žan Doberšek.

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_cog_driver.py: Added.

(CogBrowserDriver):
(CogBrowserDriver.launch_url):
(CogBrowserDriver.launch_driver):
(CogFdoBrowserDriver):
(CogFdoBrowserDriver.launch_url):

10:12 AM Changeset in webkit [251190] by Wenson Hsieh
  • 4 edits in trunk/Source

Unreviewed, fix the internal macOS 10.13 and 10.14 builds after r251171

Source/WebKit:

  • Platform/spi/mac/ApplicationServicesSPI.h: Guard SPI declarations that use AXClientType with HAVE(AX_CLIENT_TYPE).

Source/WTF:

  • wtf/Platform.h: Add a HAVE() macro for AXClientType, which is only available on macOS 10.15+ SDKs.
10:07 AM Changeset in webkit [251189] by russell_e@apple.com
  • 2 edits in trunk/LayoutTests

Correct TestExpectations from r251119.
https://bugs.webkit.org/show_bug.cgi?id=202826

Unreviewed Test Gardening.

  • platform/ios/TestExpectations:
9:48 AM Changeset in webkit [251188] by youenn@apple.com
  • 6 edits
    1 add in trunk

WebAudioSourceProviderAVFObjC::provideInput should set its WebAudioBufferList parameters correctly
https://bugs.webkit.org/show_bug.cgi?id=202930
<rdar://problem/56006776>

Reviewed by Eric Carlson.

Source/WebCore:

There is a time where the bus channel number and audio source channel numbers may be different.
In case the bus channel number is less than the audio source channel number, initialization of
the WebAudioBufferList might not be fully done.
In that case, output silence and return early.
Reduce the number of frames to process based on the number of frames the output audio bus plans to process.

Partially covered by new API test (this a race so we cannot reproduce the crash easily).

  • Modules/webaudio/MediaStreamAudioSourceNode.cpp:

(WebCore::MediaStreamAudioSourceNode::process):
Make sure to process the number of frames the output bus expect.

  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:

(WebCore::WebAudioSourceProviderAVFObjC::provideInput):

Tools:

Add a test that has an audio track that goes from 1 to 2 channels while being piped to a WebAudio pipeline.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

(-[GUMMessageHandler userContentController:didReceiveScriptMessage:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/getUserMedia-webaudio.html: Added.
7:43 AM Changeset in webkit [251187] by commit-queue@webkit.org
  • 1 edit
    7 deletes in trunk/LayoutTests

Remove duplicate MathML tests
https://bugs.webkit.org/show_bug.cgi?id=202979

Patch by Rob Buis <rbuis@igalia.com> on 2019-10-16
Reviewed by Frédéric Wang.

Remove mo-form-dynamic.html, this got imported
as presentation-markup/operators/mo-form-dynamic.html.

Remove mo-form-minus-plus.html, this got imported
as presentation-markup/operators/mo-form-minus-plus.html.

Remove mo-form-fallback.html, this got imported
as presentation-markup/operators/mo-form-fallback.html.

  • mathml/presentation/mo-form-dynamic-expected.html: Removed.
  • mathml/presentation/mo-form-dynamic-expected.html: Removed.
  • mathml/presentation/mo-form-dynamic.html: Removed.
  • mathml/presentation/mo-form-fallback-expected.html: Removed.
  • mathml/presentation/mo-form-fallback.html: Removed.
  • mathml/presentation/mo-form-minus-plus-expected.html: Removed.
  • mathml/presentation/mo-form-minus-plus.html: Removed.
6:27 AM Changeset in webkit [251186] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][TFC] TableFormattingContext::distributeExtraHorizontalSpace should not ignore fixed width columns
https://bugs.webkit.org/show_bug.cgi?id=203010

Reviewed by Antti Koivisto.

Fixed width columns (e.g. <col width=100px>) don't participate in the extra horizontal space distribution.

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::computedTableWidth):
(WebCore::Layout::TableFormattingContext::distributeExtraHorizontalSpace):
(WebCore::Layout::TableFormattingContext::distributeAvailableWidth): Deleted.

  • layout/tableformatting/TableFormattingContext.h:
  • layout/tableformatting/TableGrid.cpp:

(WebCore::Layout::TableGrid::Column::hasFixedWidth const):
(WebCore::Layout::TableGrid::widthConstraints const):

  • layout/tableformatting/TableGrid.h:

(WebCore::Layout::TableGrid::totalHorizontalSpacing const):
(WebCore::Layout::TableGrid::columnsContext const):

3:57 AM Changeset in webkit [251185] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK][WPE] ASSERTION FAILED: blob in SQLiteStatement.cpp(163) : int WebCore::SQLiteStatement::bindBlob()
https://bugs.webkit.org/show_bug.cgi?id=202976

Reviewed by Adrian Perez de Castro.

This is because IconDatabases passes a nullptr blob to store emtpty icons. sqlite3_bind_blob() allows nullptr as
blob, so we shouldn't assert.

  • platform/sql/SQLiteStatement.cpp:

(WebCore::SQLiteStatement::bindBlob): Update the assert to only fail when blob is nullptr and size > 0.

2:47 AM Changeset in webkit [251184] by Antti Koivisto
  • 2 edits
    2 adds in trunk/LayoutTests/imported/w3c

[CSS Shadow Parts] Import css/css-shadow-parts/simple-inline.html WPT
https://bugs.webkit.org/show_bug.cgi?id=203029

Reviewed by Adrian Perez de Castro.

  • web-platform-tests/css/css-shadow-parts/simple-inline-expected.txt: Added.
  • web-platform-tests/css/css-shadow-parts/simple-inline.html: Added.
  • web-platform-tests/css/css-shadow-parts/w3c-import.log:
2:11 AM Changeset in webkit [251183] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix for Windows ports
https://bugs.webkit.org/show_bug.cgi?id=203016
<rdar://problem/56317774>

  • page/DOMTimer.h: Added WEBCORE_EXPORT to ~DOMTimer().
2:00 AM Changeset in webkit [251182] by clopez@igalia.com
  • 4 edits in trunk

image/apng not recognized in source tag
https://bugs.webkit.org/show_bug.cgi?id=202785

Reviewed by Dean Jackson.

Source/WebCore:

Add image/apng as supported mime type for images on Mac/iOS and
on all the other platforms that enable apng support.

This fixes the test imported/w3c/web-platform-tests/apng/supported-in-source-type.html

  • platform/MIMETypeRegistry.cpp:

(WebCore::MIMETypeRegistry::supportedImageMIMETypes):

LayoutTests:

  • TestExpectations: Remove test imported/w3c/web-platform-tests/apng/supported-in-source-type.html

from the list of expected failures.

12:36 AM Changeset in webkit [251181] by Carlos Garcia Campos
  • 57 edits
    5 copies
    5 adds in trunk

[GTK][WPE] Add user messages API
https://bugs.webkit.org/show_bug.cgi?id=202847

Reviewed by Adrian Perez de Castro.

Source/WebCore/platform/gtk/po:

  • POTFILES.in: Add new files containing translatable strings.

Source/WebKit:

We have never exposed an API to send/receive messages to/from Web extensions, to allow applications use their own
IPC. Now, with PSON enabled, it's a lot more difficult to implement the custom IPC on the application side,
because applications need to keep track of all the web processes launched, and the changes of web process in the
web view to send the messages to the right extension. That's already done internally by WebKit, so it would be
easier to provide a simple API so that apps don't need to worry about the web process being used. This patch adds
WebKitUserMessage, a simple message API consisting on a message name, parameters and file descriptors. Messages
can be sent from a WebKitWebContext to all the WebKitWebExtensions, or from a WebKitWebExtension to its
WebKitWebContext, or from a WebKitWebView to its WebKitWebPage (and vice versa).

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • Shared/API/glib/WebKitUserMessage.cpp: Added.

(webkitUserMessageDispose):
(webkitUserMessageGetProperty):
(webkitUserMessageSetProperty):
(webkit_user_message_class_init):
(webkitUserMessageCreate):
(webkitUserMessageGetMessage):
(webkit_user_message_new):
(webkit_user_message_new_with_fd_list):
(webkit_user_message_get_name):
(webkit_user_message_get_parameters):
(webkit_user_message_get_fd_list):
(webkit_user_message_send_reply):

  • Shared/API/glib/WebKitUserMessagePrivate.h: Added.
  • Shared/glib/ArgumentCodersGLib.cpp: Added.

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

  • Shared/glib/ArgumentCodersGLib.h: Added.
  • Shared/glib/UserMessage.cpp: Added.

(WebKit::UserMessage::encode const):
(WebKit::UserMessage::decode):

  • Shared/glib/UserMessage.h: Added.

(WebKit::UserMessage::UserMessage):

  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkitWebContextConstructed):
(webkit_web_context_class_init):
(webkit_web_context_send_message_to_all_extensions):

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkit_web_view_class_init):
(webkitWebViewDidReceiveUserMessage):
(webkit_web_view_send_message_to_page):
(webkit_web_view_send_message_to_page_finish):

  • UIProcess/API/glib/WebKitWebViewPrivate.h:
  • UIProcess/API/gtk/WebKitUserMessage.h: Added.
  • UIProcess/API/gtk/WebKitWebContext.h:
  • UIProcess/API/gtk/WebKitWebView.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
  • UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
  • UIProcess/API/gtk/webkit2.h:
  • UIProcess/API/wpe/APIViewClient.h:

(API::ViewClient::didReceiveUserMessage):

  • UIProcess/API/wpe/PageClientImpl.cpp:

(WebKit::PageClientImpl::sendMessageToWebView):

  • UIProcess/API/wpe/PageClientImpl.h:
  • UIProcess/API/wpe/WPEView.cpp:

(WKWPE::View::didReceiveUserMessage):

  • UIProcess/API/wpe/WPEView.h:
  • UIProcess/API/wpe/WebKitUserMessage.h: Added.
  • UIProcess/API/wpe/WebKitWebContext.h:
  • UIProcess/API/wpe/WebKitWebView.h:
  • UIProcess/API/wpe/docs/wpe-1.0-sections.txt:
  • UIProcess/API/wpe/docs/wpe-docs.sgml:
  • UIProcess/API/wpe/webkit.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebProcessProxy.messages.in:
  • UIProcess/glib/WebProcessProxyGLib.cpp:

(WebKit::WebProcessProxy::sendMessageToWebContextWithReply):
(WebKit::WebProcessProxy::sendMessageToWebContext):

  • UIProcess/gtk/WebPageProxyGtk.cpp:

(WebKit::WebPageProxy::sendMessageToWebViewWithReply):
(WebKit::WebPageProxy::sendMessageToWebView):

  • UIProcess/wpe/WebPageProxyWPE.cpp:

(WebKit::WebPageProxy::sendMessageToWebViewWithReply):
(WebKit::WebPageProxy::sendMessageToWebView):

  • WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h:

(WebKit::WebKitExtensionManager::extension const):

  • WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp:

(webkitWebExtensionDidReceiveUserMessage):
(webkit_web_extension_send_message_to_context):
(webkit_web_extension_send_message_to_context_finish):

  • WebProcess/InjectedBundle/API/glib/WebKitWebExtensionPrivate.h:
  • WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:

(webkit_web_page_class_init):
(webkitWebPageDidReceiveUserMessage):
(webkit_web_page_send_message_to_view):
(webkit_web_page_send_message_to_view_finish):

  • WebProcess/InjectedBundle/API/glib/WebKitWebPagePrivate.h:
  • WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h:
  • WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h:
  • WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
  • WebProcess/InjectedBundle/API/wpe/WebKitWebExtension.h:
  • WebProcess/InjectedBundle/API/wpe/WebKitWebPage.h:
  • WebProcess/InjectedBundle/API/wpe/docs/wpe-webextensions-1.0-sections.txt:
  • WebProcess/InjectedBundle/API/wpe/webkit-web-extension.h:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/glib/WebPageGLib.cpp: Added.

(WebKit::WebPage::sendMessageToWebExtensionWithReply):
(WebKit::WebPage::sendMessageToWebExtension):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/glib/WebProcessGLib.cpp:

(WebKit::WebProcess::sendMessageToWebExtension):

Tools:

Add a test to check the new API.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:

(UserMessageTest::webViewUserMessageReceivedCallback):
(UserMessageTest::webContextUserMessageReceivedCallback):
(UserMessageTest::UserMessageTest):
(UserMessageTest::~UserMessageTest):
(UserMessageTest::sendMessage):
(UserMessageTest::sendMedssageToAllExtensions):
(UserMessageTest::viewUserMessageReceived):
(UserMessageTest::contextUserMessageReceived):
(UserMessageTest::waitUntilViewMessageReceived):
(UserMessageTest::waitUntilContextMessageReceived):
(readFileDescritpor):
(testWebExtensionUserMessages):
(beforeAll):

  • TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:

(documentLoadedCallback):
(pageMessageReceivedCallback):
(pageCreatedCallback):
(extensionMessageReceivedCallback):
(webkit_web_extension_initialize_with_user_data):

12:36 AM Changeset in webkit [251180] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Fix GCC warning on MIPS about dead variable metadata
https://bugs.webkit.org/show_bug.cgi?id=202987

Patch by Paulo Matos <pmatos@linki.tools> on 2019-10-16
Reviewed by Keith Miller.

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_get_internal_field):

Oct 15, 2019:

10:39 PM Changeset in webkit [251179] by Wenson Hsieh
  • 5 edits
    1 move in trunk/Source/WebKit

Fix the internal macOS build after r251171
https://bugs.webkit.org/show_bug.cgi?id=203022

Reviewed by Dan Bernstein.

Attempts to include <HIServices/AccessibilityPriv.h> in WebKit result in:

`
fatal error: 'HIServices/AccessibilityPriv.h' file not found
`

At least on macOS 10.15, it appears that HIServices.framework exists within the ApplicationServices framework.
To fix this build error, we can instead turn AccessibilityPrivSPI.h into an SPI header for ApplicationServices,
ApplicationServicesSPI.h, and use it in several places where we currently directly import <ApplicationServices/
ApplicationServicesPriv.h>.

  • Platform/IPC/cocoa/ConnectionCocoa.mm:

Bring some more constants that were defined in the !USE(APPLE_INTERNAL_SDK) case into the ApplicationServices
SPI header.

  • Platform/spi/mac/ApplicationServicesSPI.h: Renamed from Source/WebKit/Platform/spi/mac/AccessibilityPrivSPI.h.
  • Shared/mac/AuxiliaryProcessMac.mm:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
9:01 PM Changeset in webkit [251178] by mark.lam@apple.com
  • 5 edits
    2 adds in trunk

operationSwitchCharWithUnknownKeyType failed to handle OOME when resolving rope string.
https://bugs.webkit.org/show_bug.cgi?id=202312
<rdar://problem/55782280>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/operationSwitchCharWithUnknownKeyType-should-avoid-resolving-rope-strings.js: Added.
  • stress/operationSwitchCharWithUnknownKeyType-should-avoid-resolving-rope-strings2.js: Added.
  • stress/switch-on-char-llint-rope.js:
  • Changed this test to make a new rope string for each iterations. Otherwise, the rope will get resolved, and subsequent tiers will not be testing with a rope.

Source/JavaScriptCore:

operationSwitchCharWithUnknownKeyType() can only dispatch to a case handler
if the key string is of length 1. All other cases should dispatch to the default
handler. This patch also adds the missing OOME check.

Also fixed a bug in SpeculativeJIT::emitSwitchCharStringJump() where the slow
path rope resolution was returning after the length check. It needs to return to
the point before the length check.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitSwitchCharStringJump):

  • jit/JITOperations.cpp:
7:32 PM Changeset in webkit [251177] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

adoptRef DOMTimer in install instead of its constructor
https://bugs.webkit.org/show_bug.cgi?id=203016

Reviewed by Simon Fraser.

Moved the code to add DOMTimer to ScriptExecutionContext's map to DOMTimer::install
instead of its constructor so that we can adoptRef there instead for clarity & simplicity.

  • dom/ScriptExecutionContext.h:

(WebCore::ScriptExecutionContext::addTimeout):

  • page/DOMTimer.cpp:

(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::fired):

7:08 PM Changeset in webkit [251176] by commit-queue@webkit.org
  • 4 edits in trunk

REGRESSION (~244100) [Mac WK2 Debug] Layout Test http/tests/resourceLoadStatistics/prune-statistics.html is a flaky failure (197285)
https://bugs.webkit.org/show_bug.cgi?id=197285
<rdar://problem/50208370>

Patch by Kate Cheney <Kate Cheney> on 2019-10-15
Reviewed by Chris Dumez.

Source/WebKit:

This patch fixes a flaky failure which was being caused by other
resourceLoadStatistics tests scheduling processing checks which
were called during execution of prune-statistics.html.
Now, any pending processing checks are cancelled between tests.

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):

LayoutTests:

Remove a "skipped" expectation for a previously flaky test that should
be fixed by this patch.

  • platform/mac-wk2/TestExpectations:
7:06 PM Changeset in webkit [251175] by Wenson Hsieh
  • 2 edits in trunk/LayoutTests

editing/async-clipboard/clipboard-item-basic.html is a flaky failure on macOS and iOS
https://bugs.webkit.org/show_bug.cgi?id=203015

Reviewed by Tim Horton.

This test, for the most part, finishes and dumps its final output before a couple of (intentionally) rejected
promises finish and log their uncaught rejections to the console. In the case where we lose this race and the
console messages happen earlier, we end up with a text diff failure.

Avoid this issue by making sure that we catch these promise rejections.

  • editing/async-clipboard/clipboard-item-basic.html:

Also give this test a tiny bit more variety, by making one of the promises reject immediately, while the other
still waits for a short delay (50 ms).

6:49 PM Changeset in webkit [251174] by Chris Dumez
  • 7 edits in trunk/Source/WebKit

[iOS] Maintain the last Back/Forward cache entry when the application gets suspended
https://bugs.webkit.org/show_bug.cgi?id=203014

Reviewed by Geoffrey Garen.

Previously, we would clear all back/forward cache entries when the application is about to
be suspended. This means that we would lose fast-back when coming back to the application.
To be memory-friendly but maintain the fast-back when coming back to the application, we now
maintain the last back/forward cache entry when the application gets suspended.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::applicationIsAboutToSuspend):
(WebKit::WebProcessPool::notifyProcessPoolsApplicationIsAboutToSuspend):

  • UIProcess/WebBackForwardCache.cpp:

(WebKit::WebBackForwardCache::pruneToSize):

  • UIProcess/WebBackForwardCache.h:
  • UIProcess/WebProcessPool.h:
  • UIProcess/ios/ProcessAssertionIOS.mm:

(-[WKProcessAssertionBackgroundTaskManager init]):
(-[WKProcessAssertionBackgroundTaskManager _releaseBackgroundTask]):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):
A WebProcess no longer clears its PageCache on suspension on iOS. We let the UIProcess's
back/forward cache control when PageCache entries should get destroyed. The back/forward
cache will properly wake up a suspended process to clear one of its PageCache entries if
needed.

6:27 PM Changeset in webkit [251173] by Simon Fraser
  • 9 edits in trunk/Source/WebCore

ScrollingTreeScrollingNodeDelegateMac::stretchAmount() should not have side effects
https://bugs.webkit.org/show_bug.cgi?id=203009

Reviewed by Dean Jackson.

Calling ScrollingTreeScrollingNodeDelegateMac::stretchAmount() had the side effect of calling
setMainFrameIsRubberBanding() on the scrolling tree.

Remove this badness and replace it by modifying updateMainFramePinState() (which is called every time
the scroll position changes) to also compute if we're rubber-banding.

Also make a bunch of methods on ScrollControllerClient const, which makes it clear that
they don't have side effects.

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::currentScrollPositionChanged):
(WebCore::ScrollingTreeFrameScrollingNodeMac::updateMainFramePinAndRubberbandState):
(WebCore::ScrollingTreeFrameScrollingNodeMac::updateMainFramePinState): Deleted.

  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h:
  • page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm:

(WebCore::ScrollingTreeScrollingNodeDelegateMac::isAlreadyPinnedInDirectionOfGesture const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsHorizontalStretching const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsVerticalStretching const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::stretchAmount const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::pinnedInDirection const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::canScrollHorizontally const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::canScrollVertically const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::shouldRubberBandInDirection const):
(WebCore::ScrollingTreeScrollingNodeDelegateMac::isAlreadyPinnedInDirectionOfGesture): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsHorizontalStretching): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateMac::allowsVerticalStretching): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateMac::stretchAmount): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateMac::pinnedInDirection): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateMac::canScrollHorizontally): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateMac::canScrollVertically): Deleted.
(WebCore::ScrollingTreeScrollingNodeDelegateMac::shouldRubberBandInDirection): Deleted.

  • platform/cocoa/ScrollController.h:
  • platform/mac/ScrollAnimatorMac.h:
  • platform/mac/ScrollAnimatorMac.mm:

(WebCore::ScrollAnimatorMac::shouldForwardWheelEventsToParent const):
(WebCore::ScrollAnimatorMac::pinnedInDirection const):
(WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture const):
(WebCore::ScrollAnimatorMac::allowsVerticalStretching const):
(WebCore::ScrollAnimatorMac::allowsHorizontalStretching const):
(WebCore::ScrollAnimatorMac::stretchAmount const):
(WebCore::ScrollAnimatorMac::canScrollHorizontally const):
(WebCore::ScrollAnimatorMac::canScrollVertically const):
(WebCore::ScrollAnimatorMac::shouldRubberBandInDirection const):
(WebCore::ScrollAnimatorMac::shouldForwardWheelEventsToParent): Deleted.
(WebCore::ScrollAnimatorMac::pinnedInDirection): Deleted.
(WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture): Deleted.
(WebCore::ScrollAnimatorMac::allowsVerticalStretching): Deleted.
(WebCore::ScrollAnimatorMac::allowsHorizontalStretching): Deleted.
(WebCore::ScrollAnimatorMac::stretchAmount): Deleted.
(WebCore::ScrollAnimatorMac::canScrollHorizontally): Deleted.
(WebCore::ScrollAnimatorMac::canScrollVertically): Deleted.
(WebCore::ScrollAnimatorMac::shouldRubberBandInDirection): Deleted.

  • platform/mock/ScrollAnimatorMock.h:
6:04 PM Changeset in webkit [251172] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

WheelEventTestMonitor doesn't need to be threadsafe
https://bugs.webkit.org/show_bug.cgi?id=203012

Reviewed by Dean Jackson.

WheelEventTestMonitor is only called on the main thread, so doesn't need a lock to protect
m_deferCompletionReasons, and add main thread assertions.

  • page/WheelEventTestMonitor.cpp:

(WebCore::WheelEventTestMonitor::clearAllTestDeferrals):
(WebCore::WheelEventTestMonitor::setTestCallbackAndStartNotificationTimer):
(WebCore::WheelEventTestMonitor::deferForReason):
(WebCore::WheelEventTestMonitor::removeDeferralForReason):
(WebCore::WheelEventTestMonitor::triggerTestTimerFired):

  • page/WheelEventTestMonitor.h:
5:27 PM Changeset in webkit [251171] by commit-queue@webkit.org
  • 11 edits in trunk/Source

AX: Make AXIsolatedTree compile again
https://bugs.webkit.org/show_bug.cgi?id=202702
<rdar://problem/56084968>

Patch by Andres Gonzalez <Andres Gonzalez> on 2019-10-15
Reviewed by Joanmarie Diggs.

Re-submitting r251045 with a fix for internal builds.

Source/WebCore:

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::createIsolatedAccessibilityTreeHierarchy):

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::treePageCache):
(WebCore::AXIsolatedTree::nodeForID const):
(WebCore::AXIsolatedTree::applyPendingChanges):
(WebCore::AXIsolatedTree::initializePageTreeForID): Deleted.
(WebCore::AXIsolatedTree::setInitialRequestInProgress): Deleted.

  • accessibility/isolatedtree/AXIsolatedTree.h:
  • accessibility/isolatedtree/AXIsolatedTreeNode.cpp:

(WebCore::AXIsolatedTreeNode::setTreeIdentifier):
(WebCore::AXIsolatedTreeNode::rectAttributeValue const):

  • accessibility/isolatedtree/AXIsolatedTreeNode.h:
  • accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

(convertToNSArray):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper childrenVectorArray]):

Source/WebKit:

  • Platform/spi/mac/AccessibilityPrivSPI.h:
  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:

(-[WKAccessibilityWebPageObjectBase isolatedTreeRootObject]):

5:01 PM Changeset in webkit [251170] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Debugger: prevent source mapped resources from being blackboxed
https://bugs.webkit.org/show_bug.cgi?id=203007

Reviewed by Matt Baker.

Since source mapped resources are entirely a frontend concept, it doesn't make sense to
allow them to be blackboxed.

  • UserInterface/Models/SourceMapResource.js:

(WI.SourceMapResource.prototype.get supportsScriptBlackboxing):

4:40 PM Changeset in webkit [251169] by Brent Fulgham
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Unreviewed build fix after r251018

  • PlatformFTW.cmake: Add missing dxgi library.
4:39 PM Changeset in webkit [251168] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Convert CSSRule selectorText setter to setSelectorText method because it's asynchronous
https://bugs.webkit.org/show_bug.cgi?id=202840

Reviewed by Matt Baker.

  • UserInterface/Models/CSSRule.js:

(WI.CSSRule.prototype.setSelectorText):
(WI.CSSRule.prototype._selectorRejected):
(WI.CSSRule.prototype._selectorResolved):
Remove WI.CSSRule.Event.SelectorChanged event and since it wasn't used anywhere else.

(WI.CSSRule):
(WI.CSSRule.prototype.set selectorText): Deleted.
(WI.CSSRule.prototype.setSelectorText): Added.
(WI.CSSRule.prototype._selectorRejected): Deleted.
(WI.CSSRule.Event.SelectorChanged): Deleted.
Remove {valid: ...} object since it wasn't used.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidCommit):

4:20 PM Changeset in webkit [251167] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Improve summary for WebKitPerl Tests build step
https://bugs.webkit.org/show_bug.cgi?id=203006

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(RunWebKitPerlTests.getResultSummary): Override method to customize summary.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
4:17 PM Changeset in webkit [251166] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Webview's drawing area may stay frozen on cross-site back/forward navigation
https://bugs.webkit.org/show_bug.cgi?id=203004

Reviewed by Tim Horton.

Whenever the UIScene becomes foreground / background, the WebPageProxy notifies its currently associated
WebPage in the committed WebProcess so that it can freeze / unfreeze its layer tree with the
BackgroundApplication reason. The issue is that if a WebPage gets suspended on cross-site navigation
(because the UIScene is in the background when the load commits), then the suspended WebPage kept its
a BackgroundApplication freeze. When the UIScene becomes foreground, the WebPage only notifies its
committed page so the suspended page keeps its BackgroundApplication freeze still. If the user now
navigates back, it will restore the suspended WebPage and the view will stay frozen.

To address the issue, we now have the WebPage drop its BackgroundApplication freeze reason, whenever
it transitions from committed to suspended.

  • UIProcess/ios/WKApplicationStateTrackingView.mm:

(-[WKApplicationStateTrackingView didMoveToWindow]):
Fix logging, [self isBackground] needs to be called *after* _applicationStateTracker has been
initialized, or it will return YES unconditionally.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setIsSuspended):

3:54 PM Changeset in webkit [251165] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

[iOS] Crash in WebCore::DOMWindow::incrementScrollEventListenersCount
https://bugs.webkit.org/show_bug.cgi?id=202878

Unreviewed. Addressed Darin's post-commit review comment.

  • dom/Node.cpp:

(WebCore::tryAddEventListener):

3:43 PM Changeset in webkit [251164] by Chris Dumez
  • 32 edits in trunk/Source

[macOS] Simplify main thread initialization
https://bugs.webkit.org/show_bug.cgi?id=203001

Reviewed by Geoff Garen.

Source/WebCore:

  • bridge/objc/WebScriptObject.mm:

(+[WebScriptObject initialize]):

  • platform/cocoa/SharedBufferCocoa.mm:

(+[WebCoreSharedBufferData initialize]):

Source/WebKitLegacy/mac:

  • History/WebBackForwardList.mm:

(+[WebBackForwardList initialize]):

  • History/WebHistoryItem.mm:

(+[WebHistoryItem initialize]):

  • Misc/WebCache.mm:

(+[WebCache initialize]):

  • Misc/WebElementDictionary.mm:

(+[WebElementDictionary initialize]):

  • Misc/WebIconDatabase.mm:
  • Misc/WebStringTruncator.mm:

(+[WebStringTruncator initialize]):

  • Plugins/Hosted/WebHostedNetscapePluginView.mm:

(+[WebHostedNetscapePluginView initialize]):

  • Plugins/WebBaseNetscapePluginView.mm:
  • Plugins/WebBasePluginPackage.mm:

(+[WebBasePluginPackage initialize]):

  • Plugins/WebNetscapePluginView.mm:

(+[WebNetscapePluginView initialize]):

  • WebCoreSupport/WebEditorClient.mm:

(+[WebUndoStep initialize]):

  • WebCoreSupport/WebFrameLoaderClient.mm:

(+[WebFramePolicyListener initialize]):

  • WebView/WebArchive.mm:

(+[WebArchivePrivate initialize]):

  • WebView/WebDataSource.mm:

(+[WebDataSource initialize]):

  • WebView/WebHTMLView.mm:

(+[WebHTMLViewPrivate initialize]):
(+[WebHTMLView initialize]):

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

  • WebView/WebResource.mm:

(+[WebResourcePrivate initialize]):

  • WebView/WebTextIterator.mm:

(+[WebTextIteratorPrivate initialize]):

  • WebView/WebView.mm:

(+[WebView initialize]):

  • WebView/WebViewData.mm:

(+[WebViewPrivate initialize]):

Source/WTF:

Simplify main thread initialization on macOS by always using pthread main as main thread.
The complexity is now isolated to the USE(WEB_THREAD) code path.

This patch also adds a debug assertion in WTF::initializeWebThreadPlatform() to make sure
it gets called on the actual main thread. In release, it will log a fault message indicating
it was called on the wrong thread.

  • wtf/MainThread.cpp:
  • wtf/MainThread.h:
  • wtf/RefCounted.h:

(WTF::RefCountedBase::RefCountedBase):
(WTF::RefCountedBase::applyRefDerefThreadingCheck const):

  • wtf/cocoa/MainThreadCocoa.mm:

(WTF::initializeMainThreadPlatform):
(WTF::scheduleDispatchFunctionsOnMainThread):
(WTF::initializeWebThreadPlatform):
(WTF::canAccessThreadLocalDataForThread):
(WTF::isMainThread):

  • wtf/generic/MainThreadGeneric.cpp:
  • wtf/text/cf/StringImplCF.cpp:

(WTF::StringImpl::createCFString):

  • wtf/win/MainThreadWin.cpp:
3:36 PM Changeset in webkit [251163] by clopez@igalia.com
  • 4 edits
    7 adds in trunk/LayoutTests

Import apng testcases from WPT.
https://bugs.webkit.org/show_bug.cgi?id=202783

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

Import apng tests from WTP.

  • resources/import-expectations.json:
  • web-platform-tests/apng/META.yml: Added.
  • web-platform-tests/apng/animated-png-timeout-expected.html: Added.
  • web-platform-tests/apng/animated-png-timeout.html: Added.
  • web-platform-tests/apng/supported-in-source-type-expected.txt: Added.
  • web-platform-tests/apng/supported-in-source-type.html: Added.
  • web-platform-tests/apng/w3c-import.log: Added.

LayoutTests:

Import apng tests from WTP

has a fix and the other would pass once the support for reftest-wait
is implemented in the tooling.

3:33 PM Changeset in webkit [251162] by Alan Coon
  • 1 copy in tags/Safari-608.3.10.0.3

Tag Safari-608.3.10.0.3.

3:24 PM Changeset in webkit [251161] by zhifei_fang@apple.com
  • 3 edits
    1 add in trunk/Tools

Tool to mark jsc test skip/enable
https://bugs.webkit.org/show_bug.cgi?id=202063

Reviewed by Keith Miller.

  • Scripts/run-javascriptcore-tests:

(runJSCStressTests):

  • Scripts/run-jsc-stress-tests:
3:06 PM Changeset in webkit [251160] by commit-queue@webkit.org
  • 46 edits
    33 adds in trunk

[Picture-in-Picture Web API] Implement HTMLVideoElement.requestPictureInPicture() / Document.exitPictureInPicture()
https://bugs.webkit.org/show_bug.cgi?id=201024

Patch by Peng Liu <Peng Liu> on 2019-10-15
Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Import wpt/picture-in-picture.

  • resources/import-expectations.json:
  • web-platform-tests/picture-in-picture/META.yml: Added.
  • web-platform-tests/picture-in-picture/css-selector.html: Added.
  • web-platform-tests/picture-in-picture/disable-picture-in-picture.html: Added.
  • web-platform-tests/picture-in-picture/enter-picture-in-picture.html: Added.
  • web-platform-tests/picture-in-picture/exit-picture-in-picture.html: Added.
  • web-platform-tests/picture-in-picture/idlharness.window.html: Added.
  • web-platform-tests/picture-in-picture/idlharness.window.js: Added.
  • web-platform-tests/picture-in-picture/leave-picture-in-picture.html: Added.
  • web-platform-tests/picture-in-picture/mediastream.html: Added.
  • web-platform-tests/picture-in-picture/picture-in-picture-element.html: Added.
  • web-platform-tests/picture-in-picture/picture-in-picture-window.html: Added.
  • web-platform-tests/picture-in-picture/request-picture-in-picture-twice.html: Added.
  • web-platform-tests/picture-in-picture/request-picture-in-picture.html: Added.
  • web-platform-tests/picture-in-picture/resources/picture-in-picture-helpers.js: Added.

(loadVideo):
(async.requestPictureInPictureWithTrustedClick):

  • web-platform-tests/picture-in-picture/resources/w3c-import.log: Added.
  • web-platform-tests/picture-in-picture/shadow-dom.html: Added.
  • web-platform-tests/picture-in-picture/w3c-import.log: Added.

Source/JavaScriptCore:

Add configurations for Picture-in-Picture API.

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Implement the support to enter and exit PiP mode with the Picture-in-Picture API.
Majority work of this patch was done by Carlos Eduardo Ramalho <cadubentzen@gmail.com>.

Also, fix a build error of Modules/webaudio/OfflineAudioContext.cpp because of this patch (due to unified build).

Tests: imported/w3c/web-platform-tests/picture-in-picture/css-selector.html

imported/w3c/web-platform-tests/picture-in-picture/disable-picture-in-picture.html
imported/w3c/web-platform-tests/picture-in-picture/enter-picture-in-picture.html
imported/w3c/web-platform-tests/picture-in-picture/exit-picture-in-picture.html
imported/w3c/web-platform-tests/picture-in-picture/idlharness.window.html
imported/w3c/web-platform-tests/picture-in-picture/leave-picture-in-picture.html
imported/w3c/web-platform-tests/picture-in-picture/mediastream.html
imported/w3c/web-platform-tests/picture-in-picture/picture-in-picture-element.html
imported/w3c/web-platform-tests/picture-in-picture/picture-in-picture-window.html
imported/w3c/web-platform-tests/picture-in-picture/request-picture-in-picture-twice.html
imported/w3c/web-platform-tests/picture-in-picture/request-picture-in-picture.html
imported/w3c/web-platform-tests/picture-in-picture/shadow-dom.html

  • CMakeLists.txt:
  • Configurations/FeatureDefines.xcconfig:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/pictureinpicture/DocumentPictureInPicture.cpp: Added.

(WebCore::DocumentPictureInPicture::exitPictureInPicture):
(WebCore::DocumentPictureInPicture::from):

  • Modules/pictureinpicture/DocumentPictureInPicture.h: Added.

(WebCore::DocumentPictureInPicture::pictureInPictureEnabled):
(WebCore::DocumentPictureInPicture::supplementName):

  • Modules/pictureinpicture/DocumentPictureInPicture.idl: Added.
  • Modules/pictureinpicture/EnterPictureInPictureEvent.cpp: Added.

(WebCore::EnterPictureInPictureEvent::create):
(WebCore::EnterPictureInPictureEvent::EnterPictureInPictureEvent):

  • Modules/pictureinpicture/EnterPictureInPictureEvent.h: Added.
  • Modules/pictureinpicture/EnterPictureInPictureEvent.idl: Added.
  • Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp: Added.

(WebCore::HTMLVideoElementPictureInPicture::HTMLVideoElementPictureInPicture):
(WebCore::HTMLVideoElementPictureInPicture::~HTMLVideoElementPictureInPicture):
(WebCore::HTMLVideoElementPictureInPicture::from):
(WebCore::HTMLVideoElementPictureInPicture::requestPictureInPicture):
(WebCore::HTMLVideoElementPictureInPicture::autoPictureInPicture):
(WebCore::HTMLVideoElementPictureInPicture::setAutoPictureInPicture):
(WebCore::HTMLVideoElementPictureInPicture::disablePictureInPicture):
(WebCore::HTMLVideoElementPictureInPicture::setDisablePictureInPicture):
(WebCore::HTMLVideoElementPictureInPicture::exitPictureInPicture):
(WebCore::HTMLVideoElementPictureInPicture::didEnterPictureInPicture):
(WebCore::HTMLVideoElementPictureInPicture::didExitPictureInPicture):

  • Modules/pictureinpicture/HTMLVideoElementPictureInPicture.h: Added.

(WebCore::HTMLVideoElementPictureInPicture::supplementName):

  • Modules/pictureinpicture/HTMLVideoElementPictureInPicture.idl: Added.
  • Modules/pictureinpicture/PictureInPictureWindow.cpp: Added.

(WebCore::PictureInPictureWindow::create):
(WebCore::PictureInPictureWindow::PictureInPictureWindow):
(WebCore::PictureInPictureWindow::activeDOMObjectName const):
(WebCore::PictureInPictureWindow::canSuspendForDocumentSuspension const):
(WebCore::PictureInPictureWindow::eventTargetInterface const):
(WebCore::PictureInPictureWindow::scriptExecutionContext const):

  • Modules/pictureinpicture/PictureInPictureWindow.h: Added.
  • Modules/pictureinpicture/PictureInPictureWindow.idl: Added.
  • Modules/webaudio/OfflineAudioContext.cpp:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:
  • dom/Document.cpp:

(WebCore::Document::pictureInPictureElement const):
(WebCore::Document::setPictureInPictureElement):

  • dom/Document.h:
  • dom/DocumentOrShadowRoot.idl:
  • dom/EventNames.h:
  • dom/EventNames.in:
  • dom/EventTargetFactory.in:
  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::pictureInPictureElement const):

  • dom/ShadowRoot.h:
  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::fullscreenModeChanged):
(WebCore::HTMLVideoElement::setPictureInPictureObserver):

  • html/HTMLVideoElement.h:
  • page/Settings.yaml:
  • platform/PictureInPictureObserver.h: Added.

(WebCore::PictureInPictureObserver::~PictureInPictureObserver):

  • testing/InternalSettings.h:

Source/WebCore/PAL:

Add configurations for the Picture-in-Picture API.

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Add configurations for Picture-in-Picture API and add a preference option for it.

  • Configurations/FeatureDefines.xcconfig:
  • Shared/WebPreferences.yaml:

Source/WebKitLegacy/mac:

Add configurations for Picture-in-Picture API and also a preference option for it.

  • Configurations/FeatureDefines.xcconfig:
  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences pictureInPictureAPIEnabled]):
(-[WebPreferences setPictureInPictureAPIEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Tools:

Add configurations for Picture-in-Picture API and enable it in the test runner.

  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setPictureInPictureAPIEnabled):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

Skip imported/w3c/web-platform-tests/picture-in-picture because of http://webkit.org/b/202617.

2:29 PM Changeset in webkit [251159] by Simon Fraser
  • 4 edits
    1 add in trunk/Source/WebCore

Add TextStream dumping for ThemeTypes enums
https://bugs.webkit.org/show_bug.cgi?id=202972

Reviewed by Dean Jackson.

Make ControlPart, SelectionPart, ThemeFont and ThemeColor dumpable.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/ThemeTypes.cpp: Added.

(WebCore::operator<<):

  • platform/ThemeTypes.h:
2:18 PM Changeset in webkit [251158] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

Add dumping for Animation and AnimationList
https://bugs.webkit.org/show_bug.cgi?id=202973

Reviewed by Dean Jackson.

Make Animation, AnimationList and related enums dumpable.

  • platform/animation/Animation.cpp:

(WebCore::operator<<):

  • platform/animation/Animation.h:
  • platform/animation/AnimationList.cpp:

(WebCore::operator<<):

  • platform/animation/AnimationList.h:
2:16 PM Changeset in webkit [251157] by dino@apple.com
  • 2 edits in trunk/LayoutTests

Layout test fast/events/touch/ios/passive-by-default-on-document-and-window.html is a flaky failure on Internal iOS Testers
https://bugs.webkit.org/show_bug.cgi?id=202858
<rdar://51829520>

Update expected results.

  • fast/events/touch/ios/passive-by-default-on-document-and-window-expected.txt:
2:06 PM Changeset in webkit [251156] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

Don't mutate a NinePieceImage to create a mask default image
https://bugs.webkit.org/show_bug.cgi?id=202967

Reviewed by Dean Jackson.

For every StyleRareNonInheritedData, the maskBoxImage undergoes copy-on-write
via maskBoxImage.setMaskDefaults(). Fix by giving NinePieceImage a constructor
argument that cna make the mask flavor of image.

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertBorderMask):
(WebCore::StyleBuilderConverter::convertReflection):

  • rendering/style/NinePieceImage.cpp:

(WebCore::NinePieceImage::defaultMaskData):
(WebCore::NinePieceImage::NinePieceImage):

  • rendering/style/NinePieceImage.h:

(WebCore::NinePieceImage::setMaskDefaults): Deleted.

  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):

  • rendering/style/StyleReflection.h:

(WebCore::StyleReflection::StyleReflection):

1:54 PM Changeset in webkit [251155] by youenn@apple.com
  • 7 edits in trunk/Source

Move headers to keep from a HTTPHeaderNameSet to an OptionSet
https://bugs.webkit.org/show_bug.cgi?id=202977

Reviewed by Anders Carlsson.

Source/WebCore:

Covered by existing tests.
New representation is smaller and more efficient to process.

  • loader/CrossOriginAccessControl.cpp:

(WebCore::httpHeadersToKeepFromCleaning):
(WebCore::cleanHTTPRequestHeadersForAccessControl):

  • loader/CrossOriginAccessControl.h:

(WebCore::cleanHTTPRequestHeadersForAccessControl): Deleted.

  • loader/ResourceLoaderOptions.h:

Source/WebKit:

  • NetworkProcess/NetworkResourceLoadParameters.cpp:

(WebKit::NetworkResourceLoadParameters::decode):

  • NetworkProcess/NetworkResourceLoadParameters.h:
1:45 PM Changeset in webkit [251154] by jiewen_tan@apple.com
  • 5 edits in trunk

[WebAuthn] Rename -[WKUIDelegatePrivate webView:runWebAuthenticationPanel:initiatedByFrame:completionHandler:] to -[WKUIDelegatePrivate _webView:runWebAuthenticationPanel:initiatedByFrame:completionHandler:]
https://bugs.webkit.org/show_bug.cgi?id=202564
<rdar://problem/55974027>

Reviewed by Brent Fulgham.

Source/WebKit:

Rename the SPI to a proper SPI style.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::runWebAuthenticationPanel):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(-[TestWebAuthenticationPanelUIDelegate _webView:runWebAuthenticationPanel:initiatedByFrame:completionHandler:]):
(-[TestWebAuthenticationPanelUIDelegate webView:runWebAuthenticationPanel:initiatedByFrame:completionHandler:]): Deleted.

1:29 PM Changeset in webkit [251153] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews] Use python 3 compatible way to represent octal in buildbot code
https://bugs.webkit.org/show_bug.cgi?id=202999

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/buildbot.tac:
  • BuildSlaveSupport/ews-build/steps.py:
1:13 PM Changeset in webkit [251152] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Scheduling a service worker job in server should wait for finishing the registration import
https://bugs.webkit.org/show_bug.cgi?id=202975

Reviewed by Chris Dumez.

  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::scheduleJobInServer):
We should not schedule a job until the registrations are fully imported.
Covered by ServiceWorkerBasic API test flakily hitting debug asserts.

12:29 PM Changeset in webkit [251151] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][TFC] Use <col> to adjust the preferred column width.
https://bugs.webkit.org/show_bug.cgi?id=202997
<rdar://problem/56300345>

Reviewed by Antti Koivisto.

The <col> elment can set the preferred width on the table column. Let's take these values into account while computing the preferred width for columns.

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns):

  • layout/tableformatting/TableFormattingContext.h:
  • layout/tableformatting/TableFormattingContextGeometry.cpp:

(WebCore::Layout::TableFormattingContext::Geometry::computedColumnWidth const):

  • layout/tableformatting/TableGrid.h:

(WebCore::Layout::TableGrid::Column::columnBox const):

12:13 PM Changeset in webkit [251150] by Jonathan Bedard
  • 2 edits in trunk/Tools

results.webkit.org: Add os version to various unix ports
https://bugs.webkit.org/show_bug.cgi?id=202955

Rubber-stamped by Aakash Jain.

  • Scripts/webkitpy/common/system/platforminfo.py:

(PlatformInfo.init): Use platform.release() to defined the os_version.

11:38 AM Changeset in webkit [251149] by Wenson Hsieh
  • 22 edits in trunk

REGRESSION: editing/async-clipboard/clipboard-interfaces.html is failing in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=202940
<rdar://problem/56262298>

Reviewed by Ryosuke Niwa.

Source/WebKitLegacy/win:

Add support for the asyncClipboardAPIEnabled feature flag in legacy WebKit on Windows.

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::initializeDefaultSettings):
(WebPreferences::asyncClipboardAPIEnabled):
(WebPreferences::setAsyncClipboardAPIEnabled):

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Tools:

Add some plumbing to support the async clipboard API experimental test option in Windows.

  • DumpRenderTree/win/DumpRenderTree.cpp:

(setWebPreferencesForTestOptions):

LayoutTests:

  • editing/async-clipboard/clipboard-interfaces.html:
  • editing/async-clipboard/clipboard-item-basic.html:
  • editing/async-clipboard/clipboard-wrapper-stays-alive.html:

Tweak a few layout tests to actually turn the experimental feature on (this previously worked because
experimental feature flags are already on by default in WebKit2).

  • platform/ios-wk1/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:

Unskip and unmark these layout tests as failing in WebKit1 on iOS, macOS, and Windows.

11:21 AM Changeset in webkit [251148] by jiewen_tan@apple.com
  • 3 edits
    2 adds in trunk/Tools

[WebAuthn] Write more tests for _WKWebAuthenticationPanel
https://bugs.webkit.org/show_bug.cgi?id=202565
<rdar://problem/55974128>

Reviewed by Brent Fulgham.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(-[TestWebAuthenticationPanelDelegate panel:dismissWebAuthenticationPanelWithResult:]):
(-[TestWebAuthenticationPanelUIDelegate init]):
(-[TestWebAuthenticationPanelUIDelegate webView:runWebAuthenticationPanel:initiatedByFrame:completionHandler:]):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-hid.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/web-authentication-get-assertion-nfc.html: Added.
10:31 AM Changeset in webkit [251147] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][TFC] Add support for colgroup/col
https://bugs.webkit.org/show_bug.cgi?id=202991
<rdar://problem/56294715>

Reviewed by Antti Koivisto.

This patch sets up the column context when <colgroup> is present. This is in preparation for using <col>'s width to adjust the preferred width on table columns.

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createLayoutBox):

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::ensureTableGrid):

  • layout/tableformatting/TableGrid.cpp:

(WebCore::Layout::TableGrid::Column::Column):
(WebCore::Layout::TableGrid::ColumnsContext::addColumn):

  • layout/tableformatting/TableGrid.h:
10:19 AM Changeset in webkit [251146] by achristensen@apple.com
  • 21 edits
    2 deletes in trunk/Source

Unreviewed, rolling out r251138.

Broke API tests

Reverted changeset:

"Pass CORS-enabled schemes through WebProcess instead of
having them NetworkProcess-global"
https://bugs.webkit.org/show_bug.cgi?id=202891
https://trac.webkit.org/changeset/251138

10:16 AM Changeset in webkit [251145] by dino@apple.com
  • 3 edits in trunk/LayoutTests

Reset maxCanvasPixelMemory between tests
https://bugs.webkit.org/show_bug.cgi?id=202941
<rdar://problem/56260865>

Attempt to fix flakiness.

  • fast/canvas/canvas-too-large-to-draw-expected.txt:
  • fast/canvas/canvas-too-large-to-draw.html:
10:15 AM Changeset in webkit [251144] by Devin Rousso
  • 14 edits in trunk/Source/WebInspectorUI

Web Inspector: Local Resource Overrides: automatically create an image/font local override when dragging content over a non-overridden resource
https://bugs.webkit.org/show_bug.cgi?id=202957

Reviewed by Joseph Pecoraro.

Since non-text resources aren't editable, some users of local resource overrides kept trying
to drag image/font files over the actual resource content view (not the local override),
which didn't do anything. Rather than having to click "Create Local Override" and then do a
drag/drop, we should support the "shorter" workflow of drag/drop over the actual resource.

  • UserInterface/Base/FileUtilities.js:

(WI.FileUtilities.import): Added.
(WI.FileUtilities.importText):
(WI.FileUtilities.importJSON):
(WI.FileUtilities.importData): Added.
(WI.FileUtilities.async readText):
(WI.FileUtilities.async readJSON):
(WI.FileUtilities.async readData): Added.
(WI.FileUtilities.async _read): Added.
Create utility functions for importing non-text content as data.
Drive-by: fix a bug in the import* functions where the callback would be bound on the

first call, meaning that since the <input> was cached for all calls, we'd only
ever use the first callback in subsequent calls.

  • UserInterface/Views/DropZoneView.js:

(WI.DropZoneView):
(WI.DropZoneView.prototype.set text): Added.
Support the text content of the drop zone changing after it's initialized.

  • UserInterface/Views/FontResourceContentView.js:

(WI.FontResourceContentView):
(WI.FontResourceContentView.prototype.contentAvailable):
(WI.FontResourceContentView.prototype.dropZoneHandleDragEnter): Added.
(WI.FontResourceContentView.prototype.dropZoneHandleDrop):
(WI.FontResourceContentView.prototype._handleLocalResourceContentDidChange): Added.

  • UserInterface/Views/ImageResourceContentView.js:

(WI.ImageResourceContentView):
(WI.ImageResourceContentView.prototype.contentAvailable):
(WI.ImageResourceContentView.prototype.dropZoneHandleDragEnter): Added.
(WI.ImageResourceContentView.prototype.dropZoneHandleDrop):
(WI.ImageResourceContentView.prototype._handleLocalResourceContentDidChange): Added.
Support drag/drop on non-override image/font content views, which will create/update the
local resource override for that resource.

  • UserInterface/Views/ResourceContentView.js:

(WI.ResourceContentView):
(WI.ResourceContentView.prototype.get navigationItems):
(WI.ResourceContentView.prototype._handleImportLocalResourceOverride): Added.
When viewing a local resource override, add an "Import" navigation item for non-drag/drop
updating of the contents of the local resource override. This is also exposed for text-based
local resource overrides, since drag/drop inserts the contents of the file (if it's text),
which attempts to determine whether the dropped file is text or data based on the MIME type.

  • UserInterface/Views/AuditNavigationSidebarPanel.js:

(WI.AuditNavigationSidebarPanel.prototype._handleImportButtonNavigationItemClicked):

  • UserInterface/Views/CanvasOverviewContentView.js:

(WI.CanvasOverviewContentView.prototype._handleImportButtonNavigationItemClicked):

  • UserInterface/Views/CanvasSidebarPanel.js:

(WI.CanvasSidebarPanel.prototype._handleImportButtonNavigationItemClicked):

  • UserInterface/Views/HeapAllocationsTimelineView.js:

(WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked):

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.prototype._importHAR):

  • UserInterface/Views/TimelineRecordingContentView.js:

(WI.TimelineRecordingContentView.prototype._importButtonNavigationItemClicked):
Explicitly allow multiple files to be imported at the same time.

  • UserInterface/Base/BlobUtilities.js:

(WI.BlobUtilities.blobForContent):
Drive-by: remove extra base64Encoded argument when calling decodeBase64ToBlob, which

caused SVG-based image local resource overrides to show a broken image when
closing and reopening Web Inspector.

  • Localizations/en.lproj/localizedStrings.js:
10:10 AM Changeset in webkit [251143] by Alan Coon
  • 7 edits in branches/safari-608-branch/Source

Versioning.

9:56 AM Changeset in webkit [251142] by Chris Dumez
  • 8 edits
    1 copy in trunk/Source

Stop using inheritance for WebBackForwardCacheEntry
https://bugs.webkit.org/show_bug.cgi?id=202989

Reviewed by Alex Christensen.

Source/WebCore:

  • history/BackForwardItemIdentifier.h:

(WebCore::BackForwardItemIdentifier::operator bool const):

Source/WebKit:

Stop using inheritance for WebBackForwardCacheEntry. This simplifies the code a bit.

  • Sources.txt:
  • UIProcess/WebBackForwardCache.cpp:

(WebKit::WebBackForwardCache::addEntry):
(): Deleted.

  • UIProcess/WebBackForwardCacheEntry.cpp: Copied from Source/WebKit/UIProcess/WebBackForwardCacheEntry.h.

(WebKit::WebBackForwardCacheEntry::WebBackForwardCacheEntry):
(WebKit::WebBackForwardCacheEntry::~WebBackForwardCacheEntry):
(WebKit::WebBackForwardCacheEntry::takeSuspendedPage):
(WebKit::WebBackForwardCacheEntry::process const):

  • UIProcess/WebBackForwardCacheEntry.h:

(WebKit::WebBackForwardCacheEntry::suspendedPage const):
(WebKit::WebBackForwardCacheEntry::processIdentifier const):
(WebKit::WebBackForwardCacheEntry::WebBackForwardCacheEntry): Deleted.

  • WebKit.xcodeproj/project.pbxproj:
9:42 AM Changeset in webkit [251141] by Alan Coon
  • 2 edits in branches/safari-608.3.10.0-branch/Source/WebKit

Cherry-pick r250773. rdar://problem/56271907

WebPageProxy::updatePlayingMediaDidChange should protect from a null m_userMediaPermissionRequestManager
https://bugs.webkit.org/show_bug.cgi?id=202628
<rdar://problem/55935091>

Reviewed by Eric Carlson.

On process swap on navigation or process crash, m_userMediaPermissionRequestManager is made null.
At the same time, the media state is set back to not playing.
Future calls of updatePlayingMediaDidChange should not have any capture state change until getUserMedia/getDisplayMedia
is called, which would create m_userMediaPermissionRequestManager.
But this assumption is not always true given that the media state is computed as process-wide in MediaStreamTrack::captureState on iOS.
The above behavior is fixed as part of https://bugs.webkit.org/show_bug.cgi?id=202627.
Since the call to updatePlayingMediaDidChange is triggered straight from IPC, it should not be trusted and a null check should be added.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::updatePlayingMediaDidChange):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250773 268f45cc-cd09-0410-ab3c-d52691b4dbfc

9:40 AM Changeset in webkit [251140] by Alan Coon
  • 7 edits in branches/safari-608.3.10.0-branch/Source

Versioning.

9:35 AM Changeset in webkit [251139] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Interpreter: Don't assert that reference is nonnull
https://bugs.webkit.org/show_bug.cgi?id=202986

Patch by Angelos Oikonomopoulos <aoikonomopoulos@igalia.com> on 2019-10-15
Reviewed by Keith Miller.

G++ 9.2 can assume that the address of a reference is nonnull and
emits multiple warnings to that effect in --debug builds.

  • interpreter/FrameTracers.h:

(JSC::NativeCallFrameTracer::NativeCallFrameTracer):

9:09 AM Changeset in webkit [251138] by achristensen@apple.com
  • 23 edits
    2 adds in trunk

Pass CORS-enabled schemes through WebProcess instead of having them NetworkProcess-global
https://bugs.webkit.org/show_bug.cgi?id=202891

Reviewed by Youenn Fablet.

Source/WebCore:

  • platform/LegacySchemeRegistry.cpp:

(WebCore::LegacySchemeRegistry::registerURLSchemeAsCORSEnabled):
(WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsCORSEnabled):
(WebCore::LegacySchemeRegistry::allURLSchemesRegisteredAsCORSEnabled):

  • platform/LegacySchemeRegistry.h:

Source/WebKit:

No change in behavior. Now the LegacySchemeRegistry is not used as much in the NetworkProcess, a step towards no use at all.
This functionality is currently only available through the glib API webkit_security_manager_register_uri_scheme_as_cors_enabled
but it has been requested in bug 201180 and bug 199064.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
(WebKit::NetworkConnectionToWebProcess::loadPing):
(WebKit::NetworkConnectionToWebProcess::registerURLSchemesAsCORSEnabled):

  • NetworkProcess/NetworkConnectionToWebProcess.h:

(WebKit::NetworkConnectionToWebProcess::schemeRegistry):

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

(WebKit::NetworkLoadChecker::NetworkLoadChecker):
(WebKit::NetworkLoadChecker::doesNotNeedCORSCheck const):

  • NetworkProcess/NetworkLoadChecker.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::registerURLSchemeAsCORSEnabled const): Deleted.

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

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

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::m_shouldCaptureExtraNetworkLoadMetrics):

  • NetworkProcess/NetworkSchemeRegistry.cpp: Added.

(WebKit::NetworkSchemeRegistry::registerURLSchemeAsCORSEnabled):
(WebKit::NetworkSchemeRegistry::shouldTreatURLSchemeAsCORSEnabled):

  • NetworkProcess/NetworkSchemeRegistry.h: Added.

(WebKit::NetworkSchemeRegistry::create):

  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::PingLoad):
Use nullptr, indicating that the PingLoad constructor that is used in ad click attribution should not check the custom scheme registry.
This is Ok because ad click attribution is only used for HTTP family schemes.
(WebKit::m_blobFiles):

  • NetworkProcess/PingLoad.h:
  • Sources.txt:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::registerURLSchemeAsCORSEnabled):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::registerURLSchemeAsCORSEnabled):
(WebKit::WebProcess::ensureNetworkProcessConnection):
(WebKit::WebProcess::registerURLSchemeAsCORSEnabled const): Deleted.

  • WebProcess/WebProcess.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

(-[SWMessageHandlerWithExpectedMessage userContentController:didReceiveScriptMessage:]):
Use EXPECT_WK_STREQ so I can see what is going on on EWS.

8:09 AM Changeset in webkit [251137] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC] Adjust computed width value when box sizing is border-box
https://bugs.webkit.org/show_bug.cgi?id=202966
<rdar://problem/56277954>

Reviewed by Antti Koivisto.

box-sizing: border-box; means the width value sets the size of the border box (and not the content box).

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):

  • layout/FormattingContext.h:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::computedContentWidth const):
(WebCore::Layout::FormattingContext::Geometry::computedMinWidth const):
(WebCore::Layout::FormattingContext::Geometry::computedMaxWidth const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):

8:03 AM Changeset in webkit [251136] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][TFC] Add <col> element's width attribute value to Layout::Box rare data
https://bugs.webkit.org/show_bug.cgi?id=202988
<rdar://problem/56291048>

Reviewed by Antti Koivisto.

Sadly RenderStyle does not have this value.

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::setColumnWidth):
(WebCore::Layout::Box::columnWidth const):

  • layout/layouttree/LayoutBox.h:
  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::createLayoutBox):
(WebCore::Layout::outputLayoutBox):

7:47 AM Changeset in webkit [251135] by Alan Bujtas
  • 18 edits in trunk/Source/WebCore

[LFC] Adjust computed height value when box sizing is border-box
https://bugs.webkit.org/show_bug.cgi?id=202965
<rdar://problem/56276771>

Reviewed by Antti Koivisto.

box-sizing: border-box; means the height value sets the size of the border box (and not the content box).

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry):

  • layout/FormattingContext.h:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::computedContentHeight const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const):
(WebCore::Layout::FormattingContext::Geometry::complicatedCases const):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const):

  • layout/LayoutState.cpp:

(WebCore::Layout::LayoutState::displayBoxForLayoutBox):

  • layout/LayoutUnits.h:
  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin):

  • layout/blockformatting/BlockFormattingContext.h:
  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin const):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):

  • layout/blockformatting/BlockFormattingContextQuirks.cpp:

(WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):

  • layout/displaytree/DisplayBox.cpp:

(WebCore::Display::Box::Box):
(WebCore::Display::Box::Style::Style): Deleted.

  • layout/displaytree/DisplayBox.h:
  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
(WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):

  • layout/inlineformatting/InlineFormattingContext.h:
  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
(WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin const):

  • layout/tableformatting/TableFormattingContext.cpp:

(WebCore::Layout::TableFormattingContext::layoutTableCellBox):

  • layout/tableformatting/TableFormattingContext.h:
  • layout/tableformatting/TableFormattingContextGeometry.cpp:

(WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin const):

7:30 AM Changeset in webkit [251134] by Wenson Hsieh
  • 11 edits
    4 copies
    5 adds in trunk

[Clipboard API] Implement getType() for ClipboardItems created from bindings
https://bugs.webkit.org/show_bug.cgi?id=202943

Reviewed by Tim Horton.

Source/WebCore:

Adds basic support for ClipboardItem.getType(), in the case where the ClipboardItems are created by the page. To
achieve this, we introduce ClipboardItemDataSource, which represents the data source backing a given clipboard
item. This backing may either consist of a list of types and their corresponding DOMPromises (for ClipboardItems
that come from the page), or may consist of a list of items that will ask the platformr pasteboard for their
data (to be supported in a future patch).

See below for more details.

Test: editing/async-clipboard/clipboard-item-basic.html

  • Modules/async-clipboard/Clipboard.h:
  • Modules/async-clipboard/ClipboardItem.cpp:

(WebCore::clipboardItemPresentationStyle):
(WebCore::ClipboardItem::ClipboardItem):

Pass in the parent Clipboard object for ClipboardItems that are backed by the platform pasteboard (which are
returned by Clipboard.read()). (Note that this doesn't make any difference until this codepath is actually
exercised when we add support for Clipboard.read()).

(WebCore::ClipboardItem::create):
(WebCore::ClipboardItem::types const):
(WebCore::ClipboardItem::getType):

Plumb types() and getType() to the clipboard item's datasource.

(WebCore::ClipboardItem::navigator):

Make navigator() return the parent Clipboard object's navigator.

  • Modules/async-clipboard/ClipboardItem.h:
  • Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp: Added.

(WebCore::blobFromString):
(WebCore::ClipboardItemBindingsDataSource::ClipboardItemBindingsDataSource):

Store the given list of types and DOM promises.

(WebCore::ClipboardItemBindingsDataSource::types const):
(WebCore::ClipboardItemBindingsDataSource::getType):

Implement getType() by finding the matching promised type in the item's array of types, and waiting for the
promise to either resolve or reject. If the promise resolves to either a string or blob, we deliver the result
back to the page by resolving the promise returned by getType(). Otherwise, we reject it.

  • Modules/async-clipboard/ClipboardItemBindingsDataSource.h:
  • Modules/async-clipboard/ClipboardItemDataSource.h:

(WebCore::ClipboardItemDataSource::ClipboardItemDataSource):

  • Modules/async-clipboard/ClipboardItemPasteboardDataSource.cpp:

Add a stub implementation of a clipboard item data source that is backed by data in the platform pasteboard. In
a future patch, this will implement getType() by calling out to the platform pasteboard.

(WebCore::ClipboardItemPasteboardDataSource::ClipboardItemPasteboardDataSource):
(WebCore::ClipboardItemPasteboardDataSource::types const):
(WebCore::ClipboardItemPasteboardDataSource::getType):

  • Modules/async-clipboard/ClipboardItemPasteboardDataSource.h:
  • Modules/mediastream/RTCRtpReceiver.cpp:
  • Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:

Unrelated build fixes, due to changes in unified source groupings.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/network/mac/UTIUtilities.mm:

More build fixes, due to changes in unified source groupings.

LayoutTests:

Add a new layout test to verify that we can create and ask ClipboardItems for data. Exercises the following
corner cases:

  • Promise rejection when returning item data.
  • Resolving promises to incorrect data types.
  • Setting types to custom strings (including emojis and non-ASCII characters).
  • Returning values with emojis and non-ASCII characters.
  • Resolving promises using both Blobs and DOMStrings.
  • Delayed promise rejection/resolution (using setTimeout).
  • editing/async-clipboard/clipboard-item-basic-expected.txt: Added.
  • editing/async-clipboard/clipboard-item-basic.html: Added.
  • editing/async-clipboard/resources/async-clipboard-helpers.js: Added.

Add a resource file with some helper functions for creating blobs, and loading images and text from blobs.

  • platform/win/TestExpectations:

Temporarily mark a test as failing; I'll fix this and some other failing tests in a followup. See
<https://webkit.org/b/202940>.

6:45 AM Changeset in webkit [251133] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Add support for text-transform: uppercase/lowercase
https://bugs.webkit.org/show_bug.cgi?id=202968
<rdar://problem/56278141>

Reviewed by Antti Koivisto.

The text content on the layout box should be in its final state (This might change if we actually need the original content for some reason though).

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::applyTextTransform):
(WebCore::Layout::TreeBuilder::createLayoutBox):

5:20 AM Changeset in webkit [251132] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Fix several GTK tests in /WebKit2Gtk/TestUIClient crashing since r241988

Source/WebKit:

Show a warning message and return nullptr from WebKitWebView::create if the new web view is not related to the
given one. Also make it clear in the documentation that the new web view should be related to the given one.

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkit_web_view_class_init):
(webkitWebViewCreateNewPage):

Tools:

This was not caused by r241988, but revealed the existing bug. We were not creating the new WebKitWebView in
UIClientTest with the related WebKitWebView. Since r241988, the new WebPageProxy drawing area is passed to
creationParameters(), but it's nullptr because the WebPageProxy hasn't been initialized yet. When using related
views, the new WebPageProxy is already initialized because it has running processes on creation.

  • TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:

(testWebViewCreateNavigationData):

4:01 AM Changeset in webkit [251131] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix GTK test /WebKit2Gtk/TestWebViewEditor

It's failing since we delay the web process launch until the first load. Load about:blank in the test
constructor to fix it.

  • TestWebKitAPI/Tests/WebKitGtk/TestWebViewEditor.cpp:
3:39 AM Changeset in webkit [251130] by commit-queue@webkit.org
  • 1 edit
    18 deletes in trunk/LayoutTests

Remove duplicate MathML tests
https://bugs.webkit.org/show_bug.cgi?id=202979

Patch by Rob Buis <rbuis@igalia.com> on 2019-10-15
Reviewed by Frédéric Wang.

Remove mo-paint-lspace-rspace.html, this got imported
as presentation-markup/operators/mo-paint-lspace-rspace.html.

Remove mo-movablelimits.html, this got imported
as presentation-markup/operators/mo-movablelimits.html.

Remove mo-movablelimits-dynamic.html, this got imported as
presentation-markup/operators/mo-movablelimits-dynamic.html.

Remove mo-movablelimits-default.html, this got imported as
presentation-markup/operators/mo-movablelimits-default.html.

Remove direction.html, this got imported as
presentation-markup/direction/direction.html.

Remove direction-token.html, this got imported as
presentation-markup/direction/direction-token.html.

Remove direction-overall.html, this got imported as
presentation-markup/direction/direction-overall.html.

Remove inferred-mrow-baseline.html, this got imported as
presentation-markup/mrow/inferred-mrow-baseline.html.

Remove inferred-mrow-stretchy.html, this got imported as
presentation-markup/mrow/inferred-mrow-stretchy.html.

  • mathml/presentation/direction-expected.html: Removed.
  • mathml/presentation/direction-overall-expected.html: Removed.
  • mathml/presentation/direction-overall.html: Removed.
  • mathml/presentation/direction-token-expected.html: Removed.
  • mathml/presentation/direction-token.html: Removed.
  • mathml/presentation/direction.html: Removed.
  • mathml/presentation/inferred-mrow-baseline-expected.txt: Removed.
  • mathml/presentation/inferred-mrow-baseline.html: Removed.
  • mathml/presentation/inferred-mrow-stretchy-expected.txt: Removed.
  • mathml/presentation/inferred-mrow-stretchy.html: Removed.
  • mathml/presentation/mo-movablelimits-default-expected.html: Removed.
  • mathml/presentation/mo-movablelimits-default.html: Removed.
  • mathml/presentation/mo-movablelimits-dynamic-expected.html: Removed.
  • mathml/presentation/mo-movablelimits-dynamic.html: Removed.
  • mathml/presentation/mo-movablelimits-expected.html: Removed.
  • mathml/presentation/mo-movablelimits.html: Removed.
  • mathml/presentation/mo-paint-lspace-rspace-expected.html: Removed.
  • mathml/presentation/mo-paint-lspace-rspace.html: Removed.
3:37 AM Changeset in webkit [251129] by Carlos Garcia Campos
  • 6 edits in trunk

Unreviewed. Fix GTK test /webkit/Authentication/authentication-storage after r249962

Source/WebKit:

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewHandleAuthenticationChallenge): Do not use webkit_settings_get_enable_private_browsing().

Tools:

The test was still using the legacy private browsing API that is a no-op since r249962. This partch updates the
test to use a ephemeral WebView instead.

  • TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp:

(EphemeralAuthenticationTest::setup):
(EphemeralAuthenticationTest::teardown):
(testWebViewAuthenticationEphemeral):
(testWebViewAuthenticationStorage):
(beforeAll):

  • TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:

(WebViewTest::initializeWebView):

  • TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
3:12 AM Changeset in webkit [251128] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Fix GTK test /webkit/WebKitSettings/webkit-settings after r249962.

Source/WebKit:

Legacy private browsing was removed in r249962, so webkit_settings_set_enable_private_browsing() is now no-op.

  • UIProcess/API/glib/WebKitSettings.cpp:

(webKitSettingsSetProperty): Only call webkit_settings_set_enable_private_browsing() when trying to enable it.
(webkit_settings_set_enable_private_browsing): Show a warning to let users know that it does nothing now.

Tools:

Stop testing WebKitSettings:enable-private-browsing.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:

(testWebKitSettings):

2:11 AM Changeset in webkit [251127] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] WebKitWebContext should identify web views by their WebPageProxy identifier
https://bugs.webkit.org/show_bug.cgi?id=202924

Reviewed by Adrian Perez de Castro.

Instead of the WebPage identifier, since it maps WebPageProxy to WebKitWebView.

  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkitWebContextCreatePageForWebView):
(webkitWebContextWebViewDestroyed):
(webkitWebContextGetWebViewForPage):

1:59 AM Changeset in webkit [251126] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Handle service worker loads through NetworkResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=202309

Unreviewed.
Fix !ENABLE(SERVICE_WORKER) builds.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::NetworkResourceLoader::continueDidReceiveResponse):
(WebKit::NetworkResourceLoader::serviceWorkerDidNotHandle):

1:43 AM Changeset in webkit [251125] by aboya@igalia.com
  • 2 edits in trunk/Tools

gdb webkit.py: Fix iterator error in Python3
https://bugs.webkit.org/show_bug.cgi?id=202926

Reviewed by Jonathan Bedard.

Some distros use Python3 for gdb, so the script needs to be compatible with both versions for it to work.

  • gdb/webkit.py:

(WTFVectorPrinter.Iterator.next):

Oct 14, 2019:

11:59 PM Changeset in webkit [251124] by youenn@apple.com
  • 36 edits
    3 deletes in trunk

Handle service worker loads through NetworkResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=202309

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/service-workers/service-worker/fetch-request-xhr.https-expected.txt:

Source/WebCore:

Allow to serialize HTTP header names as enumeration.
Updated SWServer ability to handle schemes by adding built-in support for HTTP and HTTPS as done in LegacySchemeRegistry.

Covered by existing tests.

  • loader/ResourceLoaderOptions.h:
  • platform/network/create-http-header-name-table:
  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::canHandleScheme const):

  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerJobQueue.cpp:

(WebCore::SWServerJobQueue::runRegisterJob):

Source/WebKit:

Remove ServiceWorkerFetchClient.
Instead we use the normal NetworkResourceLoader/WebResourceLoader communication channel.
We pass additional parameters, in particular service worker mode and registration identifier.

Based on that information, network process will decide whether to load from service worker or network.
The first advantage is that in case of service worker not handling the load, going to the network is faster.
This will also allow us to do the registration matching in network process when receiving a navigation request.

ServiceWorkerFetchTask is now beefed up to do the link between service worker and NetworkResourceLoader/WebResourceLoader.
To support the same console logging, we add a new message called DidFailServiceWorkerLoad.

To support API tests, we continue to go to the service worker before trying to go to URL scheme handlers.
This adds some burden as we need to go to network process/service worker process and, in case load is not handled
by service worker, we go back to the web process to do the load through URL scheme handlers.
For that purpose we use ServiceWorkersMode::Only.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):

  • NetworkProcess/NetworkResourceLoadParameters.cpp:

(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):

  • NetworkProcess/NetworkResourceLoadParameters.h:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::didFailLoading):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
(WebKit::NetworkResourceLoader::continueDidReceiveResponse):
(WebKit::NetworkResourceLoader::startWithServiceWorker):
(WebKit::NetworkResourceLoader::serviceWorkerDidNotHandle):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:

(WebKit::ServiceWorkerFetchTask::ServiceWorkerFetchTask):
(WebKit::ServiceWorkerFetchTask::~ServiceWorkerFetchTask):
(WebKit::ServiceWorkerFetchTask::sendToServiceWorker):
(WebKit::ServiceWorkerFetchTask::sendToClient):
(WebKit::ServiceWorkerFetchTask::start):
(WebKit::ServiceWorkerFetchTask::startFetch):
(WebKit::ServiceWorkerFetchTask::didReceiveRedirectResponse):
(WebKit::ServiceWorkerFetchTask::didReceiveResponse):
(WebKit::ServiceWorkerFetchTask::didReceiveData):
(WebKit::ServiceWorkerFetchTask::didReceiveFormData):
(WebKit::ServiceWorkerFetchTask::didFinish):
(WebKit::ServiceWorkerFetchTask::didFail):
(WebKit::ServiceWorkerFetchTask::didNotHandle):
(WebKit::ServiceWorkerFetchTask::cancelFromClient):
(WebKit::ServiceWorkerFetchTask::continueDidReceiveFetchResponse):
(WebKit::ServiceWorkerFetchTask::continueFetchTaskWith):
(WebKit::ServiceWorkerFetchTask::timeoutTimerFired):

  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:

(WebKit::ServiceWorkerFetchTask::fetchIdentifier const):
(WebKit::ServiceWorkerFetchTask::serviceWorkerIdentifier const):

  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::cancelFetch):
(WebKit::WebSWServerConnection::createFetchTask):
(WebKit::WebSWServerConnection::startFetch):

  • NetworkProcess/ServiceWorker/WebSWServerConnection.h:
  • NetworkProcess/ServiceWorker/WebSWServerConnection.messages.in:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:

(WebKit::WebSWServerToContextConnection::startFetch):
(WebKit::WebSWServerToContextConnection::continueDidReceiveFetchResponse):
(WebKit::WebSWServerToContextConnection::didReceiveFetchTaskMessage):
(WebKit::WebSWServerToContextConnection::registerFetch):
(WebKit::WebSWServerToContextConnection::unregisterFetch):
(WebKit::WebSWServerToContextConnection::fetchTaskTimedOut):

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:

(WebKit::WebSWServerToContextConnection::ipcConnection const):

  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::didReceiveMessage):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::didFailServiceWorkerLoad):
(WebKit::WebResourceLoader::serviceWorkerDidNotHandle):

  • WebProcess/Network/WebResourceLoader.h:
  • WebProcess/Network/WebResourceLoader.messages.in:
  • WebProcess/Storage/ServiceWorkerClientFetch.cpp: Removed.
  • WebProcess/Storage/ServiceWorkerClientFetch.h: Removed.
  • WebProcess/Storage/ServiceWorkerClientFetch.messages.in: Removed.
  • WebProcess/Storage/WebSWClientConnection.cpp:
  • WebProcess/Storage/WebSWClientConnection.h:
  • WebProcess/Storage/WebServiceWorkerProvider.cpp:
  • WebProcess/Storage/WebServiceWorkerProvider.h:
10:53 PM Changeset in webkit [251123] by timothy_horton@apple.com
  • 7 edits in trunk/Source

Unify sources for bindings more densely
https://bugs.webkit.org/show_bug.cgi?id=202918

Reviewed by Simon Fraser.

Source/WebCore:

No new tests, just a build time speedup.
For me, this is a reliable 17% boost on the WebCore Build Time Benchmark.

  • Scripts/generate-unified-sources.sh:

Use dense bundles for JS* and bindings/js/*.
This seems acceptable for a few reasons:

  • most of the time building these files is spent parsing the exact

same set of JSC headers, because the generated bindings code ends
up including the same set of things

  • the incremental build cost of bundling more bindings sources together

is small, because the JSC headers dominate the time

  • folks will frequently have to rebuild all of the bindings (on every

pull, for example, because they indirectly include most JSC headers),
but rarely end up rebuilding only a single one (in my experience)

  • bindings/js/ReadableStreamDefaultController.cpp:

(WebCore::readableStreamCallFunction):
(WebCore::ReadableStreamDefaultController::invoke):
(WebCore::callFunction): Deleted.
Deduplicate static functions that now get bundled together.

  • platform/graphics/ca/PlatformCALayer.cpp:

(WebCore::PlatformCALayer::currentTimeToMediaTime):

  • platform/graphics/ca/PlatformCALayer.h:

In older macOS SDKs, CABase.h included ApplicationServices.h, which
causes lots of trouble.

Source/WTF:

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

Add an option to separate and more densely unify sources that match
a given glob pattern.

10:30 PM Changeset in webkit [251122] by Carlos Garcia Campos
  • 7 edits in trunk/Source

[GTK] White pages in AC mode: Cannot get default EGL display: EGL_BAD_PARAMETER
https://bugs.webkit.org/show_bug.cgi?id=202362

Reviewed by Carlos Alberto Lopez Perez.

Source/WebCore:

The problem is that PlatformDisplayLibWPE::initialize() is failing to initialize the EGL display for some
reason. We need to understand why, but we should also handle the case of failing to initialize the EGL display
and simply disable accelerated compositing mode to avoid white pages and crashes in websites using WebGL. This
patch doesn't actually fix the bug, it just handles the EGL display initialization failure.

  • platform/graphics/PlatformDisplay.cpp:

(WebCore::PlatformDisplay::~PlatformDisplay): Set s_sharedDisplayForCompositing to nullptr when the shared
display for compositing is destroyed.

  • platform/graphics/libwpe/PlatformDisplayLibWPE.cpp:

(WebCore::PlatformDisplayLibWPE::initialize): Return false when EGL display initialization fails.

  • platform/graphics/libwpe/PlatformDisplayLibWPE.h:

Source/WebKit:

  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:

(WebKit::DrawingAreaCoordinatedGraphics::updatePreferences): Disable accelerated compositing mode when we failed
to reate the shared display for compositing.

  • WebProcess/glib/WebProcessGLib.cpp:

(WebKit::WebProcess::platformInitializeWebProcess): Destroy the wpe display when initialization fails.

10:28 PM Changeset in webkit [251121] by Chris Dumez
  • 43 edits
    1 copy in trunk/Source

[WK2] Have WebBackForwardCache class coordinate page caching in all WebProcesses
https://bugs.webkit.org/show_bug.cgi?id=202929
<rdar://problem/56250421>

Reviewed by Alex Christensen.

Source/WebCore:

Drop FrameLoaderClient::didSaveToPageCache() function as it is no longer needed.
Instead, we now call HistoryItem::notifyChanged() whenever HistoryItem::m_cachedPage
changes. This communicates to the UIProcess whether or not a HistoryItem has an
associated CachedPage.

I also added more release logging to the PageCache and renamed its logging channel
from PageCache to WebBackForwardCache to match the UIProcess's channel.

  • history/BackForwardItemIdentifier.h:

(WebCore::BackForwardItemIdentifier::string const):

  • history/CachedFrame.cpp:

(WebCore::CachedFrame::CachedFrame):

  • history/HistoryItem.cpp:

(WebCore::HistoryItem::setCachedPage):
(WebCore::HistoryItem::takeCachedPage):

  • history/HistoryItem.h:
  • history/PageCache.cpp:

(WebCore::PageCache::addIfCacheable):
(WebCore::PageCache::take):
(WebCore::PageCache::removeAllItemsForPage):
(WebCore::PageCache::get):
(WebCore::PageCache::remove):
(WebCore::PageCache::prune):

  • loader/EmptyFrameLoaderClient.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::loadProvisionalItemFromCachedPage):

  • loader/FrameLoaderClient.h:
  • platform/Logging.h:

Source/WebKit:

Have WebBackForwardCache class coordinate page caching in all WebProcesses. To achieve this, the
following changes were made:

  1. Whenever HistoryItem::m_cachedPage changes in WebCore, we notify the client that the HistoryItem has changed. I added a "hasCachedPage" boolean to the item info being passed the the UIProcess that is set based on whether or not HistoryItem::m_cachedPage is null.
  2. The WebBackForwardCache now contains WebBackForwardCacheEntry objects instead of SuspendedPage objects. A WebBackForwardCacheEntry may have a SuspendedPage or not. As a result, we can now add the the back/forward cache CachedPage entries from the WebContent process, which do not have a SuspendedPageProxy in the UIProcess.
  3. Now that WebBackForwardCache is aware of all CachedPages, it can properly enforce a cache capacity across call processes. Whenever a WebBackForwardCacheEntry is pruned from the cache and this entry does not have a SuspendedPageProxy, we send an IPC to the WebContent process to remove this cached page from the PageCache in WebCore.

Previously, as soon as we would cache a page in the WebContent process, we would send an IPC to the
UIProcess so that it would clear the PageCache in any previous WebContent process. This was a stop-gap
measure to avoid blowing up memory in a multi-process model by keeping a PageCache around in all
WebContent process. This would make sure only one process could have a PageCache at any point in time.
This logic is now dropped since the WebBackForwardCache can keep track of all cached pages across all
processes and enforce a cross-process limit on the number of cached pages. This means we can now have
PageCache entries across several WebContent processes, as long as we do not exceed the maximum number
of cached pages.

  • Platform/Logging.h:

Add new BackForwardCache logging channel.

  • Shared/SessionState.cpp:

(WebKit::BackForwardListItemState::encode const):
(WebKit::BackForwardListItemState::decode):

  • Shared/SessionState.h:

Add new bit to BackForwardListItemState to indicate whether a HistoryItem has an associated
CachedPage or not.

  • Shared/WebBackForwardListItem.cpp:

(WebKit::WebBackForwardListItem::~WebBackForwardListItem):
(WebKit::WebBackForwardListItem::wasRemovedFromBackForwardList):
(WebKit::WebBackForwardListItem::removeFromBackForwardCache):
(WebKit::WebBackForwardListItem::setBackForwardCacheEntry):
(WebKit::WebBackForwardListItem::suspendedPage const):
(WebKit::WebBackForwardListItem::loggingString):

  • Shared/WebBackForwardListItem.h:

(WebKit::WebBackForwardListItem::backForwardCacheEntry const):
WebBackForwardListItem now own a WebBackForwardCacheEntry instead of simply a
SuspendedPage. The WebBackForwardCacheEntry may have a SuspendedPage or not.
Now, whenever a HistoryItem has a CachedPage in WebCore, its corresponding
WebBackForwardListItem in the UIProcess has an associated WebBackForwardCacheEntry
whether we have a SuspendedPageProxy for it in the UIProcess or not.

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:

Pass the PageCache capacity to the WebContent process on creation, so that it matches the
capacity of the WebBackForwardCache in the UIProcess.

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::goToBackForwardItem):

  • UIProcess/SuspendedPageProxy.cpp:

(WebKit::messageNamesToIgnoreWhileSuspended):
(WebKit::SuspendedPageProxy::suspensionTimedOut):

  • UIProcess/SuspendedPageProxy.h:

Stop storing the WebBackForwardListItem on the SuspendedPageProxy. This avoids having to
keep this pointer up to date. We do not really need it as we can now ask the WebBackForwardCache
to clear an entry by giving it a SuspendedPageProxy to match. Given how many entries we have at
most in the cache (2), iterating over them to find the one with a given suspended page is cheap.

  • UIProcess/WebBackForwardCache.cpp:

(WebKit::WebBackForwardCache::WebBackForwardCache):
(WebKit::WebBackForwardCache::~WebBackForwardCache):

(WebKit::WebBackForwardCache::setCapacity):
Send an IPC of each WebProcess whenever the capacity of the WebBackForwardCache changes, in order
to update the capacity of the PageCache in those processes.

(WebKit::WebBackForwardCache::addEntry):
(WebKit::WebBackForwardCache::removeEntry):
(WebKit::WebBackForwardCache::takeSuspendedPage):
(WebKit::WebBackForwardCache::removeEntriesForProcess):
(WebKit::WebBackForwardCache::removeEntriesForSession):
(WebKit::WebBackForwardCache::removeEntriesMatching):
(WebKit::WebBackForwardCache::clear):

  • UIProcess/WebBackForwardCache.h:

Use a Vector instead of a ListHashSet to store the entries. Given that we have at most 2 entries, using
a Vector will likely be more efficient and definitely use less memory.

  • UIProcess/WebBackForwardCacheEntry.h: Added.

(WebKit::WebBackForwardCacheEntry::backForwardCache const):
(WebKit::WebBackForwardCacheEntry::WebBackForwardCacheEntry):
Add new WebBackForwardCacheEntry abstraction to match the concept of WebCore::CachedPage in the UIProcess.
A WebBackForwardCacheEntry may have a SuspendedPageProxy associated with it in the UIProcess or not.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Drop didSaveToPageCache as it is no longer necessary.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::initializeNewWebProcess):
(WebKit::WebProcessPool::disconnectProcess):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::updateBackForwardItem):
Whenever we get a BackForwardItem from the WebContent process, we now check it now has
an associated CachedPage or not. If it does, we make sure we add a corresponding
entry in the WebBackForwardCache so that the UIProcess knows about it. If it no longer
has a CachedPage and we don't have a SuspendedPageProxy for this item in the UIProcess,
then we remove the corresponding entry from the back/forward cache. Note that we don't
drop SuspendedPageProxy objects in the UIProcess simply because their corresponding
CachedPage in the WebProcess is gone, to maintain previous behavior. This is an
optimization that is useful on iOS, where we do not have a WebProcessCache, since we
can reuse processes from SuspendedPageProxies on navigation.

  • UIProcess/WebProcessProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/SessionStateConversion.cpp:

(WebKit::toBackForwardListItemState):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::setBackForwardCacheCapacity):
(WebKit::WebProcess::clearCachedPage):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

Source/WebKitLegacy/win:

  • WebCoreSupport/WebFrameLoaderClient.cpp:
  • WebCoreSupport/WebFrameLoaderClient.h:
8:50 PM Changeset in webkit [251120] by rniwa@webkit.org
  • 4 edits
    33 adds in trunk/LayoutTests

Import W3C tests for requestidlecallback
https://bugs.webkit.org/show_bug.cgi?id=202946

Reviewed by Wenson Hsieh.

LayoutTests/imported/w3c:

Imported web platform tests for requestidlecallback as of 38c2e8d53c9e54f5c4a914d1528aff4e60f07cdf.

  • resources/import-expectations.json:
  • web-platform-tests/requestidlecallback/META.yml: Added.
  • web-platform-tests/requestidlecallback/basic-expected.txt: Added.
  • web-platform-tests/requestidlecallback/basic.html: Added.
  • web-platform-tests/requestidlecallback/callback-exception-expected.txt: Added.
  • web-platform-tests/requestidlecallback/callback-exception.html: Added.
  • web-platform-tests/requestidlecallback/callback-idle-periods-expected.txt: Added.
  • web-platform-tests/requestidlecallback/callback-idle-periods.html: Added.
  • web-platform-tests/requestidlecallback/callback-iframe-expected.txt: Added.
  • web-platform-tests/requestidlecallback/callback-iframe.html: Added.
  • web-platform-tests/requestidlecallback/callback-invoked-expected.txt: Added.
  • web-platform-tests/requestidlecallback/callback-invoked.html: Added.
  • web-platform-tests/requestidlecallback/callback-multiple-calls-expected.txt: Added.
  • web-platform-tests/requestidlecallback/callback-multiple-calls.html: Added.
  • web-platform-tests/requestidlecallback/callback-removed-frame-expected.txt: Added.
  • web-platform-tests/requestidlecallback/callback-removed-frame.html: Added.
  • web-platform-tests/requestidlecallback/callback-suspended-expected.txt: Added.
  • web-platform-tests/requestidlecallback/callback-suspended.html: Added.
  • web-platform-tests/requestidlecallback/callback-timeout-expected.txt: Added.
  • web-platform-tests/requestidlecallback/callback-timeout-when-busy-expected.txt: Added.
  • web-platform-tests/requestidlecallback/callback-timeout-when-busy.html: Added.
  • web-platform-tests/requestidlecallback/callback-timeout.html: Added.
  • web-platform-tests/requestidlecallback/callback-xhr-sync-expected.txt: Added.
  • web-platform-tests/requestidlecallback/callback-xhr-sync.html: Added.
  • web-platform-tests/requestidlecallback/cancel-invoked-expected.txt: Added.
  • web-platform-tests/requestidlecallback/cancel-invoked.html: Added.
  • web-platform-tests/requestidlecallback/idlharness.window-expected.txt: Added.
  • web-platform-tests/requestidlecallback/idlharness.window.html: Added.
  • web-platform-tests/requestidlecallback/idlharness.window.js: Added.

(async.idl_array.await.new.Promise.resolve.resolve):

  • web-platform-tests/requestidlecallback/resources/post_name_on_load.html: Added.
  • web-platform-tests/requestidlecallback/resources/w3c-import.log: Added.
  • web-platform-tests/requestidlecallback/w3c-import.log: Added.

LayoutTests:

  • tests-options.json:
7:00 PM Changeset in webkit [251119] by commit-queue@webkit.org
  • 17 edits
    2 adds in trunk

Outsets for referenced SVG filters are always zero
https://bugs.webkit.org/show_bug.cgi?id=202826

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-10-14
Reviewed by Simon Fraser.

Source/WebCore:

Sometimes the filter is applied only to a part of the image, so we need
to enlarge the source rectangle such that the border of the result image
looks like as if the filter were applied to the whole image.

The filter outsets should only be calculated for the blur and the drop
shadow filters. The problem is FilterOperations::outsets() was returning
empty outsets always for the referenced filters.

Since the referenced filters must be software filters, the fix is to rely
on CSSFilter in calculating the filter outsets for software filters.

By adding a virtual function called outset() to the FilterEffect class,
we can loop through the CSSFilter::m_effects asking every FilterEffect
to return its outset(). This function is only overridden by FEDropShadow
and FEGaussianBlur.

This should work because RenderLayer builds the CSSFilter when the styleChanged()
happens through its updateFilterPaintingStrategy(). This will guarantee
that m_filters->filter()->outsets() will return the correct outsets for
the referenced and the non-referenced software filters.

We should keep FilterOperations::outsets() because it has be used for
the hardware non-referenced filters. In that case, RenderLayer does not
build the the filter effects. Therefore m_filters can't be used because
it is null in this case.

For accuracy, hasOutsets() implementation is deleted. Having a blur or
drop shadow filter effect is not enough to say hasOutsets() is true. We
need to calculate the outsets first and then ask if it isZero() or not.

Test: css3/filters/svg-blur-filter-clipped.html

  • platform/graphics/IntRectExtent.h:

(WebCore::operator==):
(WebCore::operator+=):
(WebCore::IntRectExtent::expandRect const): Deleted.
IntRectExtent is only used as a filter outsets. So add the definition of
IntOutsets in IntRectExtent.h.

  • platform/graphics/filters/FEDropShadow.cpp:

(WebCore::FEDropShadow::outsets const):

  • platform/graphics/filters/FEDropShadow.h:
  • platform/graphics/filters/FEGaussianBlur.cpp:

(WebCore::FEGaussianBlur::calculateOutsetSize):
(WebCore::FEGaussianBlur::outsets const):

  • platform/graphics/filters/FEGaussianBlur.h:
  • platform/graphics/filters/FilterEffect.h:

(WebCore::FilterEffect::outsets const):

  • platform/graphics/filters/FilterOperations.cpp:

(WebCore::FilterOperations::outsets const):
(WebCore::outsetSizeForBlur): Deleted.
(WebCore::FilterOperations::hasOutsets const): Deleted.

  • platform/graphics/filters/FilterOperations.h:

(WebCore::FilterOperations::hasOutsets const):

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::computeOverlapRegions):

  • rendering/CSSFilter.cpp:

(WebCore::CSSFilter::build):
(WebCore::CSSFilter::computeSourceImageRectForDirtyRect):
(WebCore::CSSFilter::outsets const):
Calculate m_outsets once and cache its value for later uses.

  • rendering/CSSFilter.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
(WebCore::RenderLayer::hasAncestorWithFilterOutsets const):
(WebCore::transparencyClipBox):
(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderLayer.h:
  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::filterOutsets const):
(WebCore::RenderStyle::hasFilterOutsets const): Deleted.

LayoutTests:

  • css3/filters/svg-blur-filter-clipped-expected.html: Added.
  • css3/filters/svg-blur-filter-clipped.html: Added.
  • platform/ios/TestExpectations:
6:37 PM Changeset in webkit [251118] by commit-queue@webkit.org
  • 2 edits in trunk/Websites/webkit.org

Update WebKit Build Archives page on webkit.org
https://bugs.webkit.org/show_bug.cgi?id=202871

Patch by Ling Ho <lingcherd_ho@apple.com> on 2019-10-14
Reviewed by Alexey Proskuryakov.

Added Catalina and remove Sierra.

  • wp-content/themes/webkit/build-archives.php:
6:20 PM Changeset in webkit [251117] by Wenson Hsieh
  • 24 edits in trunk/Source

[Clipboard API] Refactor custom pasteboard writing codepaths to handle multiple items
https://bugs.webkit.org/show_bug.cgi?id=202916

Reviewed by Tim Horton.

Source/WebCore:

Adjusts the Pasteboard::write codepath for writing PasteboardCustomData to the platform pasteboard, such that
it accepts multiple PasteboardCustomDatas. No new tests, since there is no behavior change.

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::commitToPasteboard):

Pass in the PasteboardCustomData as a single-item vector.

  • platform/Pasteboard.h:
  • platform/PasteboardStrategy.h:
  • platform/PlatformPasteboard.h:
  • platform/StaticPasteboard.h:
  • platform/cocoa/PasteboardCocoa.mm:

(WebCore::Pasteboard::writeCustomData):

  • platform/gtk/PasteboardGtk.cpp:

(WebCore::Pasteboard::writeCustomData):

  • platform/gtk/PlatformPasteboardGtk.cpp:

(WebCore::PlatformPasteboard::write):

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::write):

Adjust this method to return the updated change count.

  • platform/libwpe/PasteboardLibWPE.cpp:

(WebCore::Pasteboard::writeCustomData):

  • platform/libwpe/PlatformPasteboardLibWPE.cpp:

(WebCore::PlatformPasteboard::write):

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::write):

Add logic to fall back to writing legacy pasteboard types in the case where there is only one item.

  • platform/win/PasteboardWin.cpp:

(WebCore::Pasteboard::writeCustomData):

Source/WebKit:

Change more function and method signatures from const PasteboardCustomData& to
const Vector<PasteboardCustomData>&.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::writeCustomData):

  • UIProcess/WebPasteboardProxy.cpp:

(WebKit::WebPasteboardProxy::writeCustomData):

  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::writeCustomData):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Source/WebKitLegacy/mac:

Adjust some method signatures.

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::writeCustomData):

6:03 PM Changeset in webkit [251116] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION(251087): Several API tests are failing
https://bugs.webkit.org/show_bug.cgi?id=202961

Reviewed by Brent Fulgham.

WebPageProxy::maybeInitializeSandboxExtensionHandle returns early if the WebContent process is currently launching,
since the audit token is needed to create the sandbox extension. The audit token will not be available until the
process has finished launching. In the same way, the method should return early if the WebContent process has
terminated.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):

5:59 PM Changeset in webkit [251115] by mmaxfield@apple.com
  • 2 edits in trunk/LayoutTests

[Mac] Update fast/text/font-cursive-italic-cjk-2.html for Catalina
https://bugs.webkit.org/show_bug.cgi?id=202779
<rdar://problem/54317204>

Unreviewed gardening.

  • platform/mac/TestExpectations:
5:47 PM Changeset in webkit [251114] by zhifei_fang@apple.com
  • 2 edits in trunk/Tools

results.webkit.org: TypeError when evaluating empty commits
https://bugs.webkit.org/show_bug.cgi?id=202936

Reviewed by Jonathan Bedard.

*resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js: Draw empty line when invaild scales or dots state pass in

5:34 PM Changeset in webkit [251113] by Alan Coon
  • 1 copy in tags/Safari-608.2.40.1.3

Tag Safari-608.2.40.1.3.

5:02 PM Changeset in webkit [251112] by Jonathan Bedard
  • 26 edits
    1 copy in trunk/Tools

Python 3: Add support in webkitpy.common.net.bugzilla
https://bugs.webkit.org/show_bug.cgi?id=202465

Reviewed by Dewei Zhu.

  • Scripts/test-webkitpy-python3: Add webkitpy.common.net.bugzilla to the test list.
  • Scripts/webkitpy/common/net/bugzilla/init.py: Use full import paths.
  • Scripts/webkitpy/common/net/bugzilla/attachment_unittest.py: Ditto.
  • Scripts/webkitpy/common/net/bugzilla/bug.py: Ditto.

(Bug.commit_revision): Dictionary sorting is no longer well defined in Python 3.

  • Scripts/webkitpy/common/net/bugzilla/bug_unittest.py: Use full import paths.
  • Scripts/webkitpy/common/net/bugzilla/bugzilla.py: Ditto.

(EditUsersParser.login_userid_pairs_from_edit_user_results): Return list, not an iterator.
(EditUsersParser.user_dict_from_edit_user_page): HTML_ENTITIES is logically connected to BeautifulSoup, not
BeautifulStoneSoup.
(BugzillaQueries._parse_attachment_ids_request_query): Explicitly cast date_tag to unicode.
(Bugzilla._parse_attachment_element): Legacy BeautifulSoup and bs4 Elements have different function calls.
(Bugzilla._file_object_for_upload): Use BytesIO instead of StringIO.
(Bugzilla.create_bug):
(reopen_bug): Access map as list, not iterator.

  • Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py: Use full import paths.
  • Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py: Ditto.
  • Scripts/webkitpy/common/net/bugzilla/test_expectation_updater.py:

(TestExpectationUpdater._update_from_generic_attachment): Use items over iteritems().
(TestExpectationUpdater._update_from_platform_specific_attachment): Ditto.
(TestExpectationUpdater.do_update): Ditto.

  • Scripts/webkitpy/common/net/buildbot/buildbot.py: Use Python 2/3 compatible urllib.
  • Scripts/webkitpy/common/net/credentials.py: Use import statement to force autoinstall logic.
  • Scripts/webkitpy/common/net/file_uploader.py: Use Python 2/3 compatible urllib.

(FileUploader._upload_data.callback):
(FileUploader):

  • Scripts/webkitpy/common/net/resultsjsonparser.py:

(JSONTestResult._tokenize): Force map() call to return a list.

  • Scripts/webkitpy/common/net/web_mock.py: Use Python 2/3 compatible urllib.
  • Scripts/webkitpy/common/system/autoinstall.py:

(AutoInstaller.install): Return True if install was required, otherwise, return False.

  • Scripts/webkitpy/common/system/filesystem_mock.py:

(MockFileSystem.init): Encode strings before writing them to the filesystem.

  • Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py: Use Python 2/3 compatible urllib.
  • Scripts/webkitpy/layout_tests/models/test_expectations.py:

(TestExpectationParser): Use items over iteritems().

  • Scripts/webkitpy/layout_tests/models/test_failures.py: Use Python 3 compatible Pickle library.
  • Scripts/webkitpy/layout_tests/models/test_results.py: Ditto.
  • Scripts/webkitpy/port/darwin_testcase.py:

(DarwinTest.test_crashlog_path): Use dictionary for files.

  • Scripts/webkitpy/test/main.py:

(Tester._run_tests): Update directories excluded from testing.

  • Scripts/webkitpy/thirdparty/BeautifulSoup.py: Replaced.

(BeautifulSoup):Wrapper class making bs4 BeautifulSoup compatible with legacy BeautifulSoup calls.
(BeautifulStoneSoup): Ditto.

  • Scripts/webkitpy/thirdparty/BeautifulSoup_legacy.py: Copied from Tools/Scripts/webkitpy/thirdparty/BeautifulSoup.py.
  • Scripts/webkitpy/thirdparty/init.py:

(AutoinstallImportHook.init): Accept executive.
(AutoinstallImportHook.find_module): Add beautifulsoup.
(AutoinstallImportHook._install_beautifulsoup): bs4 must be converted via 2to3 before use in Python 3.
(AutoinstallImportHook._install): Return result from installer.

  • Scripts/webkitpy/thirdparty/mock.py:

(Mock.reset_mock): Use values() instead of itervalues().

4:42 PM Changeset in webkit [251111] by commit-queue@webkit.org
  • 7 edits in trunk

FindController::findString always updates foundStringMatchIndex even if match is the same as before
https://bugs.webkit.org/show_bug.cgi?id=201775
<rdar://problem/55352425>

Patch by Matt Mokary <mmokary@apple.com> on 2019-10-14
Reviewed by Tim Horton.

Source/WebKit:

Allow an update to a find string without changing current match index, as is often the desired behavior when
modifying a query rather than moving forward or backward through a match set.

  • Shared/WebFindOptions.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(toFindOptions):

  • UIProcess/API/Cocoa/_WKFindOptions.h:
  • WebProcess/WebPage/FindController.cpp:

(WebKit::FindController::findString):
Do not change match index if NoIndexChange bit is set. Otherwise, no change in behavior.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewFindString.mm:

(TestWebKitAPI::TEST):
_WKFindOptionsNoIndexChange test

4:38 PM Changeset in webkit [251110] by rniwa@webkit.org
  • 6 edits in trunk/Source/WebCore

Deploy smart pointers in RadioButtonGroups and RadioButtonGroup
https://bugs.webkit.org/show_bug.cgi?id=202942

Reviewed by Zalan Bujtas.

Use Ref & WeakPtr instead of raw pointers in RadioButtonGroups and RadioButtonGroup.

Also made RadioButtonGroups::m_nameToGroupMap a HashMap instead of a unique_ptr of HashMap
since RadioButtonGroups is lazily created in TreeScope as of r250708.

No new tests since there should be no observable behavioral change.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers const):

  • dom/RadioButtonGroups.cpp:

(WebCore::RadioButtonGroup): Use WeakHashSet and WeakPtr instead of raw pointers.
(WebCore::RadioButtonGroup::isEmpty const):
(WebCore::RadioButtonGroup::checkedButton const):
(WebCore::RadioButtonGroup::members const):
(WebCore::RadioButtonGroup::setCheckedButton):
(WebCore::RadioButtonGroup::updateCheckedState):
(WebCore::RadioButtonGroup::requiredStateChanged):
(WebCore::RadioButtonGroup::remove):
(WebCore::RadioButtonGroup::setNeedsStyleRecalcForAllButtons):
(WebCore::RadioButtonGroup::updateValidityForAllButtons):
(WebCore::RadioButtonGroup::contains const):
(WebCore::RadioButtonGroups::addButton):
(WebCore::RadioButtonGroups::groupMembers const):
(WebCore::RadioButtonGroups::updateCheckedState):
(WebCore::RadioButtonGroups::requiredStateChanged):
(WebCore::RadioButtonGroups::checkedButtonForGroup const):
(WebCore::RadioButtonGroups::hasCheckedButton const):
(WebCore::RadioButtonGroups::isInRequiredGroup const):
(WebCore::RadioButtonGroups::removeButton):

  • dom/RadioButtonGroups.h:

(WebCore::RadioButtonGroups):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::radioButtonGroup const):
(WebCore::HTMLInputElement::checkedRadioButtonForGroup const):

  • html/HTMLInputElement.h:
4:33 PM Changeset in webkit [251109] by Chris Dumez
  • 2 edits
    1 add in trunk/LayoutTests

[ iOS13 ] Layout test imported/w3c/web-platform-tests/html/dom/idlharness.https.html is consistently Failing
https://bugs.webkit.org/show_bug.cgi?id=202960
<rdar://problem/56267775>

Unreviewed, unskip test and land new iOS baseline instead.

  • TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: Added.
4:24 PM Changeset in webkit [251108] by david_quesada@apple.com
  • 7 edits in trunk/Source

Remove WebCore::IOSApplication::isWebApp()
https://bugs.webkit.org/show_bug.cgi?id=181259

Reviewed by Alex Christensen.

Source/WebCore:

As of iOS 11, the Web.app process no longer uses WebKit directly, so IOSApplication::isWebApp()
is never true. Since it's no longer needed, remove it.

  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm:

(WebCore::IOSApplication::isWebApp): Deleted.

Source/WebKit:

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::defaultApplicationCacheDirectory):

Remove the wording "this is not supported as of right now", as it seems to be supported
since r247686, which added SPI on _WKWebsiteDataStoreConfiguration to set the application
cache directory.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebApplicationCache.mm:

(applicationCacheBundleIdentifier):

3:56 PM Changeset in webkit [251107] by russell_e@apple.com
  • 2 edits in trunk/LayoutTests

[ iOS13 ] Layout test imported/w3c/web-platform-tests/html/dom/idlharness.https.html is consistently Failing (202960)
https://bugs.webkit.org/show_bug.cgi?id=202960

Unreviewed Test Gardening.

  • platform/ios-wk2/TestExpectations: Changed expectation from Crash

to Failure for imported/w3c/web-platform-tests/html/dom/idlharness.https.html

3:52 PM Changeset in webkit [251106] by commit-queue@webkit.org
  • 39 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling out r251090.
https://bugs.webkit.org/show_bug.cgi?id=202959

"broke tests" (Requested by RMorisset on #webkit).

Reverted changeset:

"Split ArithProfile into a Unary and a Binary version"
https://bugs.webkit.org/show_bug.cgi?id=202832
https://trac.webkit.org/changeset/251090

3:50 PM Changeset in webkit [251105] by aestes@apple.com
  • 16 edits in trunk

REGRESSION (r243682): Quick Look previews loaded from the memory cache render with the wrong content type
https://bugs.webkit.org/show_bug.cgi?id=202935
<rdar://problem/54318133>

Reviewed by Tim Horton.

Source/WebCore:

When loading a Quick Look preview after deciding content policy, PreviewLoader would update
DocumentLoader with the preview response (the response that contains the preview's
Content-Type). It would not update the CachedResource representing the preview main
resource, however, which caches the underlying ResourceResponse in m_response.

When loading from the memory cache, it's the CachedResource's response that's used to
synthesize DocumentLoader::responseReceived. When loading Quick Look previews *before*
deciding content policy, this response would be the preview response, but as described
above, when loading after deciding content policy it's the underlying response.

This patch updates a Quick Look preview's CachedResource with the preview response along
with updating DocumentLoader so that there is not a mismatch between the resource's content
type and its underlying data.

Added a new API test.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::previewResponseReceived):

  • loader/DocumentLoader.h:
  • loader/ResourceLoader.h:

(WebCore::ResourceLoader::didReceivePreviewResponse):

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceivePreviewResponse):

  • loader/SubresourceLoader.h:
  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::previewResponseReceived):

  • loader/cache/CachedRawResource.h:
  • loader/cache/CachedRawResourceClient.h:

(WebCore::CachedRawResourceClient::previewResponseReceived):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::previewResponseReceived):

  • loader/cache/CachedResource.h:
  • loader/ios/PreviewLoader.mm:

(-[WebPreviewLoader _loadPreviewIfNeeded]):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm:

(TEST):

  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[WKWebView synchronouslyGoBack]):
(-[WKWebView synchronouslyGoForward]):

3:50 PM Changeset in webkit [251104] by Alan Coon
  • 7 edits in tags/Safari-609.1.6.1/Source

Versioning.

3:46 PM Changeset in webkit [251103] by Alan Coon
  • 1 copy in tags/Safari-609.1.6.1

New tag.

3:29 PM Changeset in webkit [251102] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r250991): Sources: local resource overrides should be enabled when not in tests
https://bugs.webkit.org/show_bug.cgi?id=202944

Reviewed by Joseph Pecoraro.

  • UserInterface/Controllers/NetworkManager.js:

(WI.NetworkManager):

3:14 PM Changeset in webkit [251101] by youenn@apple.com
  • 3 edits
    3 adds in trunk

A response body promise should be rejected in case of a failure happening after the HTTP response
https://bugs.webkit.org/show_bug.cgi?id=202792

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/service-workers/service-worker/fetch-error-worker.js: Added.

(doTest):

  • web-platform-tests/service-workers/service-worker/fetch-error.https-expected.txt: Added.
  • web-platform-tests/service-workers/service-worker/fetch-error.https.html: Added.

Source/WebCore:

Test: imported/w3c/web-platform-tests/service-workers/service-worker/fetch-error.https.html

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::BodyLoader::didFail):
Propagate error to fetch body consumer if any.

2:52 PM Changeset in webkit [251100] by Wenson Hsieh
  • 31 edits
    3 adds in trunk/Source

[Clipboard API] Support writing multiple PasteboardCustomData with SharedBuffers to the pasteboard
https://bugs.webkit.org/show_bug.cgi?id=202851

Reviewed by Darin Adler.

Source/WebCore:

This patch refactors some logic around WebCore::PasteboardCustomData, in preparation for implementing the async
clipboard API. There are two main goals of this refactoring:

  1. Enable writing multiple items (each backed by PasteboardCustomData) to the platform pasteboard.
  2. Enable writing platform data in the form of SharedBuffers to the platform pasteboard.

See below for more details; no tests, as there is no change in behavior yet.

  • Headers.cmake:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:

Move PasteboardCustomData out of Pasteboard.h and into its own file.

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::commitToPasteboard):

  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::getPasteboardTypesAndDataForAttachment):

  • platform/Pasteboard.cpp:

(WebCore::PasteboardCustomData::createSharedBuffer const): Deleted.
(WebCore::PasteboardCustomData::fromSharedBuffer): Deleted.

Moved these method implementations to PasteboardCustomData.cpp.

  • platform/Pasteboard.h:

Refactor PasteboardCustomData so that its member variables are now private, and encapsulated behind methods
Additionally, make it so that the only way to set data on PasteboardCustomData is to use the writeString,
writeData, and writeStringInCustomData methods, which ensure that the PasteboardCustomData is always in a
consistent state.

  • platform/PasteboardCustomData.cpp: Added.

(WebCore::copyPlatformData):
(WebCore::PasteboardCustomData::Entry::Entry):
(WebCore::PasteboardCustomData::Entry::operator=):

Refactor the implementation of PasteboardCustomData, so that it contains a list of PasteboardCustomData entries
instead of individual Vectors and HashMaps.

(WebCore::PasteboardCustomData::PasteboardCustomData):
(WebCore::PasteboardCustomData::createSharedBuffer const):
(WebCore::PasteboardCustomData::fromSharedBuffer):
(WebCore::PasteboardCustomData::writeString):
(WebCore::PasteboardCustomData::writeData):
(WebCore::PasteboardCustomData::writeStringInCustomData):
(WebCore::PasteboardCustomData::addOrMoveEntryToEnd):

Move logic from StaticPasteboard into PasteboardCustomData, and refactor these methods to handle
Vector<PasteboardCustomData::Entry>.

(WebCore::PasteboardCustomData::clear):
(WebCore::PasteboardCustomData::operator=):
(WebCore::PasteboardCustomData::orderedTypes const):
(WebCore::PasteboardCustomData::hasData const):
(WebCore::PasteboardCustomData::hasSameOriginCustomData const):
(WebCore::PasteboardCustomData::sameOriginCustomStringData const):
(WebCore::PasteboardCustomData::readBuffer const):
(WebCore::PasteboardCustomData::readString const):
(WebCore::PasteboardCustomData::readStringInCustomData const):
(WebCore::PasteboardCustomData::forEachType const):
(WebCore::PasteboardCustomData::forEachPlatformString const):
(WebCore::PasteboardCustomData::forEachCustomString const):
(WebCore::PasteboardCustomData::forEachPlatformStringOrBuffer const):

Moved these method implementations from StaticPasteboard to PasteboardCustomData, and also introduced some new
methods to help iterate through types and data.

  • platform/PasteboardCustomData.h: Added.

(WebCore::PasteboardCustomData::origin const):
(WebCore::PasteboardCustomData::setOrigin):
(WebCore::PasteboardCustomData::data const):

  • platform/PasteboardStrategy.h:
  • platform/PlatformPasteboard.h:
  • platform/SharedBuffer.cpp:

(WebCore::SharedBuffer::decoder const):

  • platform/SharedBuffer.h:
  • platform/StaticPasteboard.cpp:

(WebCore::StaticPasteboard::hasData):
(WebCore::StaticPasteboard::typesSafeForBindings):
(WebCore::StaticPasteboard::typesForLegacyUnsafeBindings):
(WebCore::StaticPasteboard::readString):
(WebCore::StaticPasteboard::readStringInCustomData):
(WebCore::StaticPasteboard::writeString):
(WebCore::StaticPasteboard::writeData):
(WebCore::StaticPasteboard::writeStringInCustomData):
(WebCore::StaticPasteboard::clear):
(WebCore::StaticPasteboard::takeCustomData):
(WebCore::StaticPasteboard::StaticPasteboard): Deleted.

Refactor StaticPasteboard to now contain a PasteboardCustomData; additionally, adjust several methods in
StaticPasteboard to simply call into PasteboardCustomData to write, read, or clear data.

(WebCore::updateTypes): Deleted.

  • platform/StaticPasteboard.h:
  • platform/cocoa/PasteboardCocoa.mm:

(WebCore::Pasteboard::readStringInCustomData):
(WebCore::Pasteboard::readOrigin):
(WebCore::PasteboardCustomData::cocoaType): Deleted.

Moved the implementation of PasteboardCustomData::cocoaType from PasteboardCocoa.mm to
PasteboardCustomDataCocoa.mm.

  • platform/cocoa/PasteboardCustomDataCocoa.mm: Added.

(WebCore::PasteboardCustomData::cocoaType):

  • platform/ios/AbstractPasteboard.h:
  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::changeCount const):
(WebCore::registerItemsToPasteboard):
(WebCore::registerItemToPasteboard):
(WebCore::PlatformPasteboard::write):

Support writing multiple PasteboardCustomData objects to the platform pasteboard on iOS, by generating
NSItemProviders for each one. This refactors the existing registerItemToPasteboard helper to handle multiple
registration lists, renames it to registerItemsToPasteboard (plural), and then reimplements
registerItemToPasteboard in terms of registerItemsToPasteboard.

(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::createItemProviderRegistrationList):

Adjust these to use getters on PasteboardCustomData instead of accessing the member variables directly.

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard init]):
(-[WebItemProviderPasteboard stageRegistrationLists:]):
(-[WebItemProviderPasteboard clearRegistrationLists]):
(-[WebItemProviderPasteboard takeRegistrationLists]):

Refactor registration list staging on WebItemProviderPasteboard to support multiple registration lists, each
representing a single item provider.

(-[WebItemProviderPasteboard stageRegistrationList:]): Deleted.
(-[WebItemProviderPasteboard takeRegistrationList]): Deleted.

  • platform/mac/PasteboardMac.mm:

(WebCore::Pasteboard::write):

  • platform/mac/PasteboardWriter.mm:

(WebCore::createPasteboardWriter):

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::PlatformPasteboard::write):

Support writing multiple PasteboardCustomData objects to the platform pasteboard on macOS, by creating and
setting NSPasteboardItems for each custom data. This means that instead of using legacy macOS pasteboard types,
we need to use the "modern" NSPasteboardTypes when writing each item. This is because NSPasteboardItem quietly
fails when attempting to set data for a legacy pasteboard type.

(WebCore::createPasteboardItem):

Source/WebKit:

See WebCore ChangeLog for more details.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<PasteboardCustomData::Entry>::encode):
(IPC::ArgumentCoder<PasteboardCustomData::Entry>::decode):

Add helpers to encode and decode PasteboardCustomData::Entry.

(IPC::ArgumentCoder<PasteboardCustomData>::encode):
(IPC::ArgumentCoder<PasteboardCustomData>::decode):

  • Shared/WebCoreArgumentCoders.h:

Add support for encoding and decoding PasteboardCustomData by encoding and decoding each of its items (see
above).

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::requestDOMPasteAccess):

  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView canPerformActionForWebView:withSender:]):
(allPasteboardItemOriginsMatchOrigin):
(-[WKContentView _didHandleAdditionalDragItemsRequest:]):

Tweak several methods to use the new methods on PasteboardCustomData instead of accessing the member variables
directly.

(-[WKContentView cleanUpDragSourceSessionState]):
(-[WKContentView _prepareToDragPromisedAttachment:]):
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationLists:stagedDragSource:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):
(-[WKContentView _itemsForBeginningOrAddingToSessionWithRegistrationList:stagedDragSource:]): Deleted.

Adjust these methods to handle multiple staged item providers (for now, it remains that iOS drag and drop
codepaths will still only write a single item to the pasteboard).

Source/WebKitLegacy/mac:

See WebCore ChangeLog for more details.

  • WebCoreSupport/WebPlatformStrategies.h:
2:42 PM Changeset in webkit [251099] by Alan Coon
  • 7 edits in tags/Safari-609.1.7/Source

Versioning.

2:16 PM Changeset in webkit [251098] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Mass Marking failing tests on Windows

Unreviewed test gardening.

  • platform/win/TestExpectations:
2:15 PM Changeset in webkit [251097] by Truitt Savell
  • 2 edits in trunk

Unreviewed, rolling out r251081.

Broke macOS and iOS builds

Reverted changeset:

"transform-box: content-box, stroke-box missing"
https://bugs.webkit.org/show_bug.cgi?id=201892
https://trac.webkit.org/changeset/251081

2:14 PM Changeset in webkit [251096] by Keith Rollin
  • 2 edits in trunk/Source/WTF

Remove some support for < iOS 13
https://bugs.webkit.org/show_bug.cgi?id=202820
<rdar://problem/56164838>

Reviewed by Anders Carlsson.

Remove some support for iOS versions less than 13.0.

Update conditionals that reference IPHONE_OS_VERSION_MIN_REQUIRED
and
IPHONE_OS_VERSION_MAX_ALLOWED, assuming that they both have
values >= 130000. This means that expressions like
"IPHONE_OS_VERSION_MIN_REQUIRED < 101300" are always False and
"
IPHONE_OS_VERSION_MIN_REQUIRED >= 101300" are always True.

This removal is part of a series of patches effecting the removal of
dead code for old versions of iOS. This particular pass involves
changes in which Devin Rousso was involved. These changes are isolated
from other similar changes in order to facilitate the reviewing
process.

  • wtf/Platform.h:
2:05 PM Changeset in webkit [251095] by Alan Coon
  • 1 copy in tags/Safari-609.1.7

Tag Safari-609.1.7.

2:05 PM Changeset in webkit [251094] by dino@apple.com
  • 4 edits in trunk

Reset maxCanvasPixelMemory between tests
https://bugs.webkit.org/show_bug.cgi?id=202941
<rdar://problem/56260865>

Reviewed by Wenson Hsieh.

Source/WebCore:

Reset the maximum canvas memory between tests.

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):

LayoutTests:

Swap the order of the tests, because a previous test might have
already allocated canvas memory that is sitting around.

  • fast/canvas/canvas-too-large-to-draw.html:
2:00 PM Changeset in webkit [251093] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

[Cocoa] font-family:system-ui on Chinese systems don't get Chinese quote marks
https://bugs.webkit.org/show_bug.cgi?id=202778

Unreviewed.

Addressing post-review comment.

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp:

(WebCore::SystemFontDatabaseCoreText::createSystemUIFont):

1:52 PM Changeset in webkit [251092] by mmaxfield@apple.com
  • 2 edits in trunk/LayoutTests

[Mac] Update fast/text/font-cursive-italic-cjk-2.html for Catalina
https://bugs.webkit.org/show_bug.cgi?id=202779
<rdar://problem/54317204>

Reviewed by Alexey Proskuryakov.

The platform-specific generic font family mappings changed. Luckily, we already had a (skipped) test that tests the new mappings.

  • platform/mac/TestExpectations:
1:43 PM Changeset in webkit [251091] by Alan Coon
  • 8 edits
    2 copies
    2 adds in branches/safari-608.2.40.1-branch

Cherry-pick r251086. rdar://problem/56237426

[Cocoa] REGRESSION (r245672): Contenteditable with optical sizing freezes Safari
https://bugs.webkit.org/show_bug.cgi?id=202262

Reviewed by Tim Horton.

Source/WebKit:

r250640 didn't go far enough. We need to apply the same fix everywhere [NSFontDescriptor fontDescriptorWithFontAttributes:] is called.

  • Shared/Cocoa/ArgumentCodersCocoa.mm: (IPC::decodeFontInternal):
  • Shared/Cocoa/CoreTextHelpers.h: Added.
  • Shared/Cocoa/CoreTextHelpers.mm: Added. (fontDescriptorWithFontAttributes):
  • SourcesCocoa.txt:
  • UIProcess/Cocoa/WebViewImpl.mm: (WebKit::WebViewImpl::updateFontManagerIfNeeded):
  • UIProcess/mac/WebPopupMenuProxyMac.mm: (WebKit::WebPopupMenuProxyMac::showPopupMenu):
  • WebKit.xcodeproj/project.pbxproj:

LayoutTests:

  • fast/forms/contenteditable-font-optical-size-expected.txt: Added.
  • fast/forms/contenteditable-font-optical-size.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251086 268f45cc-cd09-0410-ab3c-d52691b4dbfc

1:28 PM Changeset in webkit [251090] by rmorisset@apple.com
  • 39 edits in trunk/Source/JavaScriptCore

Split ArithProfile into a Unary and a Binary version
https://bugs.webkit.org/show_bug.cgi?id=202832

Reviewed by Keith Miller.

ArithProfile was for a long time only used for add/sub/mul/div, but recently it started being used for negate. And it will soon also have to be used for inc and dec due to BigInt.
So in this patch I make a separate version that only has the data for a single argument, and thus takes half as much memory.

  • bytecode/ArithProfile.cpp:

(JSC::ArithProfile<BitfieldType>::emitObserveResult):
(JSC::ArithProfile<BitfieldType>::shouldEmitSetDouble const):
(JSC::ArithProfile<BitfieldType>::emitSetDouble const):
(JSC::ArithProfile<BitfieldType>::shouldEmitSetNonNumeric const):
(JSC::ArithProfile<BitfieldType>::shouldEmitSetBigInt const):
(JSC::ArithProfile<BitfieldType>::emitSetNonNumeric const):
(JSC::ArithProfile<BitfieldType>::emitSetBigInt const):
(WTF::printInternal):

  • bytecode/ArithProfile.h:

(JSC::ArithProfile::didObserveNonInt32 const):
(JSC::ArithProfile::didObserveDouble const):
(JSC::ArithProfile::didObserveNonNegZeroDouble const):
(JSC::ArithProfile::didObserveNegZeroDouble const):
(JSC::ArithProfile::didObserveNonNumeric const):
(JSC::ArithProfile::didObserveBigInt const):
(JSC::ArithProfile::didObserveInt32Overflow const):
(JSC::ArithProfile::didObserveInt52Overflow const):
(JSC::ArithProfile::setObservedNonNegZeroDouble):
(JSC::ArithProfile::setObservedNegZeroDouble):
(JSC::ArithProfile::setObservedNonNumeric):
(JSC::ArithProfile::setObservedBigInt):
(JSC::ArithProfile::setObservedInt32Overflow):
(JSC::ArithProfile::setObservedInt52Overflow):
(JSC::ArithProfile::observeResult):
(JSC::ArithProfile::addressOfBits const):
(JSC::ArithProfile::bits const):
(JSC::ArithProfile::ArithProfile):
(JSC::ArithProfile::hasBits const):
(JSC::ArithProfile::setBit):
(JSC::UnaryArithProfile::UnaryArithProfile):
(JSC::UnaryArithProfile::observedIntBits):
(JSC::UnaryArithProfile::observedNumberBits):
(JSC::UnaryArithProfile::argResultType const):
(JSC::UnaryArithProfile::argObservedType const):
(JSC::UnaryArithProfile::setArgObservedType):
(JSC::UnaryArithProfile::argSawInt32):
(JSC::UnaryArithProfile::argSawNumber):
(JSC::UnaryArithProfile::argSawNonNumber):
(JSC::UnaryArithProfile::observeArg):
(JSC::UnaryArithProfile::isObservedTypeEmpty):
(JSC::BinaryArithProfile::BinaryArithProfile):
(JSC::BinaryArithProfile::observedIntIntBits):
(JSC::BinaryArithProfile::observedNumberIntBits):
(JSC::BinaryArithProfile::observedIntNumberBits):
(JSC::BinaryArithProfile::observedNumberNumberBits):
(JSC::BinaryArithProfile::observeLHS):
(JSC::BinaryArithProfile::observeLHSAndRHS):
(JSC::BinaryArithProfile::isObservedTypeEmpty):

  • bytecode/BytecodeList.rb:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::addJITAddIC):
(JSC::CodeBlock::addJITMulIC):
(JSC::CodeBlock::addJITSubIC):
(JSC::CodeBlock::addJITNegIC):
(JSC::CodeBlock::binaryArithProfileForBytecodeOffset):
(JSC::CodeBlock::unaryArithProfileForBytecodeOffset):
(JSC::CodeBlock::binaryArithProfileForPC):
(JSC::CodeBlock::unaryArithProfileForPC):
(JSC::CodeBlock::couldTakeSpecialFastCase):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::addMathIC):

  • bytecode/Fits.h:
  • bytecode/MethodOfGettingAValueProfile.cpp:

(JSC::MethodOfGettingAValueProfile::emitReportValue const):
(JSC::MethodOfGettingAValueProfile::reportValue):

  • bytecode/MethodOfGettingAValueProfile.h:

(JSC::MethodOfGettingAValueProfile::MethodOfGettingAValueProfile):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitUnaryOp):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::UnaryOpNode::emitBytecode):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::makeSafe):
(JSC::DFG::ByteCodeParser::makeDivSafe):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::methodOfGettingAValueProfileFor):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileValueAdd):
(JSC::DFG::SpeculativeJIT::compileValueSub):
(JSC::DFG::SpeculativeJIT::compileValueNegate):
(JSC::DFG::SpeculativeJIT::compileValueMul):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileValueAdd):
(JSC::FTL::DFG::LowerDFGToB3::compileValueSub):
(JSC::FTL::DFG::LowerDFGToB3::compileValueMul):
(JSC::FTL::DFG::LowerDFGToB3::compileUnaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compileBinaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compileArithAddOrSub):
(JSC::FTL::DFG::LowerDFGToB3::compileValueNegate):

  • jit/JIT.h:
  • jit/JITAddGenerator.cpp:

(JSC::JITAddGenerator::generateInline):
(JSC::JITAddGenerator::generateFastPath):

  • jit/JITAddGenerator.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_op_negate):
(JSC::JIT::emit_op_add):
(JSC::JIT::emitMathICFast):
(JSC::JIT::emitMathICSlow):
(JSC::JIT::emit_op_div):
(JSC::JIT::emit_op_mul):
(JSC::JIT::emit_op_sub):

  • jit/JITDivGenerator.cpp:

(JSC::JITDivGenerator::generateFastPath):

  • jit/JITDivGenerator.h:

(JSC::JITDivGenerator::JITDivGenerator):

  • jit/JITInlines.h:

(JSC::JIT::copiedArithProfile):

  • jit/JITMathIC.h:

(JSC::JITMathIC::JITMathIC):
(JSC::JITMathIC::generateInline):
(JSC::JITMathIC::arithProfile const):
(JSC::isBinaryProfileEmpty):
(JSC::JITBinaryMathIC::JITBinaryMathIC):
(JSC::isUnaryProfileEmpty):
(JSC::JITUnaryMathIC::JITUnaryMathIC):

  • jit/JITMulGenerator.cpp:

(JSC::JITMulGenerator::generateInline):
(JSC::JITMulGenerator::generateFastPath):

  • jit/JITMulGenerator.h:
  • jit/JITNegGenerator.cpp:

(JSC::JITNegGenerator::generateInline):
(JSC::JITNegGenerator::generateFastPath):

  • jit/JITNegGenerator.h:
  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/JITSubGenerator.cpp:

(JSC::JITSubGenerator::generateInline):
(JSC::JITSubGenerator::generateFastPath):

  • jit/JITSubGenerator.h:
  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LLIntOffsetsExtractor.cpp:

(JSC::LLIntOffsetsExtractor::dummy):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • parser/ResultType.h:

(JSC::ResultType::ResultType):

  • runtime/CommonSlowPaths.cpp:

(JSC::updateArithProfileForUnaryArithOp):
(JSC::updateArithProfileForBinaryArithOp):
(JSC::SLOW_PATH_DECL):

1:25 PM Changeset in webkit [251089] by achristensen@apple.com
  • 6 edits in trunk

REGRESSION: [iOS 13?] TestWebKitAPI.SharedBufferTest.tryCreateArrayBufferLargeSegments is failing
https://bugs.webkit.org/show_bug.cgi?id=201902

Reviewed by Ryosuke Niwa.

Source/WebCore:

  • Modules/webauthn/fido/U2fResponseConverter.cpp:

(fido::WebCore::createAttestedCredentialDataFromU2fRegisterResponse):

Source/WTF:

  • wtf/Vector.h:

The code introduced in r108153 to workaround a warning when building Chrome was causing us to use uninitialized memory
when we create a Vector with the size_t/{signed,unsigned}char constructor with a constexpr size_t.
This was the cause of bug 201902 and bug 201620 which only manifested themselves in release builds with some compilers.

Tools:

  • TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:

(TestWebKitAPI::TEST_F):

12:54 PM Changeset in webkit [251088] by ysuzuki@apple.com
  • 11 edits
    1 add in trunk

[JSC] GetterSetter should be JSCell, not JSObject
https://bugs.webkit.org/show_bug.cgi?id=202656

Reviewed by Tadeu Zagallo and Saam Barati.

JSTests:

  • stress/getter-setter-should-be-cell.js: Added.

(foo.with.):
(foo.with.get for):
(foo.with.bar):
(foo):

Source/JavaScriptCore:

Essentially, GetterSetter is not a JSObject. It is like a JSCell. But we made GetterSetter JSObject
to leverage existing strict-eq implementations for JSObject: pointer-comparison. But given the following
conditions,

  1. GetterSetter strict-eq comparison only happens in builtin code when using @tryGetById.
  2. RHS of that comparison is always folded into constant in DFG.
  3. We already use pointer-comparison for cells that are neither JSString nor JSBigInt.
  4. DFG strength reduction already has a rule which makes CompareStrictEq(Cell-not-JSString/JSBigInt, Constant) ComparePtrEq.

So we already support non-JSString/JSBigInt cell comparison in JSC JS code. We should use it instead of making GetterSetter JSObject.
This patch makes GetterSetter JSCell, and makes getterSetterStructure per-VM structure.

The attached test reported AI validation failure. AI assumed that GetterSetter's realm should be the same to the base object. But
this is incorrect in our runtime code: we are creating GetterSetter with lexical realm (JSGlobalObject). But the fundamental problem
is that GetterSetter is JSObject and tied to JSGlobalObject while it is not necessary.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGFixupPhase.cpp:
  • runtime/GetterSetter.cpp:
  • runtime/GetterSetter.h:
  • runtime/JSGlobalObject.cpp:

(JSC::getGetterById):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::regExpProtoGlobalGetter const):
(JSC::JSGlobalObject::regExpProtoUnicodeGetter const):
(JSC::JSGlobalObject::customGetterSetterFunctionStructure const):
(JSC::JSGlobalObject::getterSetterStructure const): Deleted.

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

(JSC::VM::VM):

  • runtime/VM.h:
12:50 PM Changeset in webkit [251087] by pvollan@apple.com
  • 10 edits in trunk/Source

[macOS] Sandbox extensions should be created with audit tokens, not PIDs
https://bugs.webkit.org/show_bug.cgi?id=201828

Reviewed by Brent Fulgham.

Source/WebKit:

Stop issuing mach/read sandbox extensions by PID in the UI process, and use audit tokens instead.
The audit tokens for the WebContent processes are retrieved from the IPC connection to the process.

  • Shared/Cocoa/SandboxExtensionCocoa.mm:

(WebKit::SandboxExtensionImpl::create):
(WebKit::SandboxExtensionImpl::sandboxExtensionForType):
(WebKit::SandboxExtensionImpl::SandboxExtensionImpl):
(WebKit::SandboxExtension::createHandleForMachLookupByAuditToken):
(WebKit::SandboxExtension::createHandleForReadByAuditToken):
(WebKit::SandboxExtension::createHandleForMachLookupByPid): Deleted.
(WebKit::SandboxExtension::createHandleForReadByPid): Deleted.

  • Shared/SandboxExtension.h:
  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
(WebKit::WebPageProxy::loadFile):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::shouldSendPendingMessage):
(WebKit::WebProcessProxy::didFinishLaunching):

  • UIProcess/ios/WebProcessProxyIOS.mm:

(WebKit::WebProcessProxy::unblockAccessibilityServerIfNeeded):

Source/WTF:

Remove HAVE macro for issuing sandbox extension by PID, and fix version checks for the HAVE
macros related to issuing sandbox extensions by audit token. Remove SPI for creating
extensions by PID, and add SPI for creating mach extension by audit token. Also remove an
unneeded flag.

  • wtf/Platform.h:
  • wtf/spi/darwin/SandboxSPI.h:
12:42 PM Changeset in webkit [251086] by mmaxfield@apple.com
  • 8 edits
    2 copies
    2 adds in trunk

[Cocoa] REGRESSION (r245672): Contenteditable with optical sizing freezes Safari
https://bugs.webkit.org/show_bug.cgi?id=202262

Reviewed by Tim Horton.

Source/WebKit:

r250640 didn't go far enough. We need to apply the same fix everywhere [NSFontDescriptor fontDescriptorWithFontAttributes:] is called.

  • Shared/Cocoa/ArgumentCodersCocoa.mm:

(IPC::decodeFontInternal):

  • Shared/Cocoa/CoreTextHelpers.h: Added.
  • Shared/Cocoa/CoreTextHelpers.mm: Added.

(fontDescriptorWithFontAttributes):

  • SourcesCocoa.txt:
  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::updateFontManagerIfNeeded):

  • UIProcess/mac/WebPopupMenuProxyMac.mm:

(WebKit::WebPopupMenuProxyMac::showPopupMenu):

  • WebKit.xcodeproj/project.pbxproj:

LayoutTests:

  • fast/forms/contenteditable-font-optical-size-expected.txt: Added.
  • fast/forms/contenteditable-font-optical-size.html: Added.
12:11 PM Changeset in webkit [251085] by sbarati@apple.com
  • 11 edits
    1 add in trunk

Canonicalize how we prepare the prototype chain for inline caching
https://bugs.webkit.org/show_bug.cgi?id=202827
<rdar://problem/56193919>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/cache-correct-offset-after-flattening.js: Added.

(assert):

Source/JavaScriptCore:

This patch canonicalizes how we prepare the prototype chain for caching. Both
in the poly proto chain, and the generateConditions*, we were flattening
dictionaries as we walk the prototype chain. We now unify that into one
function called preparePrototypeChainForCaching. In that, we flatten
dictionaries as we traverse the prototype chain, and note if any objects
are poly proto.

My patch in r250540 made it so we now flatten uncacheable dictionaries (this
was the intention all along, but it was a perf bug that we didn't do this). That
revealed that the inline caching code could use a stale PropertyOffset when
flattening an uncacheable dictionary. This patch makes it so we universally
try just defer caching to later if we encounter a situation where we flatten
a dictionary that could be a property holder.

  • bytecode/ObjectPropertyConditionSet.cpp:

(JSC::generateConditionsForPrototypeEquivalenceConcurrently):
(JSC::generateConditionsForPropertyMissConcurrently):
(JSC::generateConditionsForPropertySetterMissConcurrently):
(JSC::preparePrototypeChainForCaching):

  • bytecode/ObjectPropertyConditionSet.h:
  • bytecode/PolyProtoAccessChain.cpp:

(JSC::PolyProtoAccessChain::create):

  • bytecode/PolyProtoAccessChain.h:

(JSC::PolyProtoAccessChain::slotBaseStructure const):

  • jit/Repatch.cpp:

(JSC::tryCacheGetByID):
(JSC::tryCachePutByID):
(JSC::tryCacheInByID):
(JSC::tryCacheInstanceOf):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setupGetByIdPrototypeCache):

  • runtime/StructureRareData.cpp:

(JSC::StructureRareData::setObjectToStringValue):

Tools:

  • Scripts/run-jsc-stress-tests:
11:18 AM Changeset in webkit [251084] by russell_e@apple.com
  • 13 edits
    2 deletes in trunk

Unreviewed, rolling out r251081.

Broke macOS and iOS builds.

Reverted changeset:

"transform-box: content-box, stroke-box missing"
https://bugs.webkit.org/show_bug.cgi?id=201892
https://trac.webkit.org/changeset/251081

10:39 AM Changeset in webkit [251083] by eric.carlson@apple.com
  • 2 edits in trunk/LayoutTests

[ Mac ] REGRESSION (r243033) Assertion failed: m_logger Layout Test imported/w3c/web-platform-tests/mst-content-hint/MediaStreamTrack-contentHint.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=196517
<rdar://problem/49540704>

Unreviewed, unskipping a passing test.

  • platform/mac/TestExpectations: Unskip MediaStreamTrack-contentHint.html.
10:29 AM Changeset in webkit [251082] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Remove expectations for fast/scrolling/ios/body-overflow-hidden-height-100-percent-keyboard.html
<rdar://problem/52699318>

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
10:23 AM Changeset in webkit [251081] by Nikolas Zimmermann
  • 13 edits
    2 adds in trunk

transform-box: content-box, stroke-box missing
https://bugs.webkit.org/show_bug.cgi?id=201892

Patch by Dirk Schulze <krit@webkit.org> on 2019-10-14
Reviewed by Simon Fraser.

Source/WebCore:

Added the keywords content-box and stroke-box to the
transform-box CSS property.
Those keywords were added to the spec after the implementation
in WebKit.

Test: transforms/transform-box.html

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator TransformBox const):

  • css/CSSProperties.json:
  • css/CSSValueKeywords.in:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):

  • rendering/RenderLayer.cpp:

(WebCore::computeReferenceBox):
(WebCore::transformBoxToCSSBoxType):
(WebCore::RenderLayer::currentTransform const):

  • rendering/style/RenderStyleConstants.h:
  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::animatedLocalTransform const):

LayoutTests:

  • fast/css/transform-box-parsing.html:
  • svg/transforms/svg-transform-box-expected.html:
  • svg/transforms/svg-transform-box.html:
  • transforms/transform-box-expected.html: Added.
  • transforms/transform-box.html: Added.
10:16 AM Changeset in webkit [251080] by Alan Coon
  • 7 edits in trunk/Source

Versioning.

10:11 AM Changeset in webkit [251079] by Alan Coon
  • 2 edits in branches/safari-608.2.40.1-branch/Source/WebKit

Cherry-pick r250197. rdar://problem/55611999

Fix an assertion failure introduced in r250186.

  • UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::platformGetLaunchOptionsWithAttributes): Corrected the assertion.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250197 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:11 AM Changeset in webkit [251078] by Alan Coon
  • 4 edits in branches/safari-608.2.40.1-branch/Source/WebKit

Cherry-pick r250186. rdar://problem/55611999

Safari 13 may launch leftover 32-bit plug-in process from Safari 12’s WebKit, which crashes
https://bugs.webkit.org/show_bug.cgi?id=202077
<rdar://problem/55547063>

Reviewed by Sam Weinig.

  • Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::getPluginArchitecture): Removed support for i386 plug-ins.
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): Assert that the requested process type is not Plugin32.
  • UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::platformGetLaunchOptionsWithAttributes): Assert that the plug-in architecture is x86_64.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250186 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10:10 AM Changeset in webkit [251077] by Alan Coon
  • 7 edits in trunk/Source

Versioning.

9:56 AM Changeset in webkit [251076] by Nikolas Zimmermann
  • 2 edits in trunk/Tools

Update my nickname.

Unreviewed.

  • Scripts/webkitpy/common/config/contributors.json:
9:42 AM Changeset in webkit [251075] by Nikolas Zimmermann
  • 2 edits in trunk/Tools

Fix Tools/Scripts/update-webkitgtk-libs build failure in 'gst-plugins-bad'
https://bugs.webkit.org/show_bug.cgi?id=202931

Reviewed by Philippe Normand.

OpenEXR dependency is not required and causes a build failure on Ubuntu
19.04 with OpenEXR 2.2.1, as described here:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1089

  • gstreamer/jhbuild.modules: Disable openexr in meson build options.
9:05 AM Changeset in webkit [251074] by Truitt Savell
  • 11 edits in trunk/Source

Unreviewed, rolling out r251045.

Broke internal builds

Reverted changeset:

"AX: Make AXIsolatedTree compile again"
https://bugs.webkit.org/show_bug.cgi?id=202702
https://trac.webkit.org/changeset/251045

8:37 AM Changeset in webkit [251073] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Reuse existing web processes for running service workers
https://bugs.webkit.org/show_bug.cgi?id=202195

Unreviewed.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::disableServiceWorkers):
(WebKit::WebProcessProxy::enableServiceWorkers):
Fix case where ENABLE_SERVICE_WORKER is not defined.

8:21 AM Changeset in webkit [251072] by Jonathan Bedard
  • 3 edits in trunk/Tools

results.webkit.org: Make recent=False more usable
https://bugs.webkit.org/show_bug.cgi?id=202873

Rubber-stamped by Aakash Jain.

  • resultsdbpy/resultsdbpy/model/configuration_context.py:

(ConfigurationContext.search_for_configuration): If no configuration is specified,
use a set of configurations defined by recent platform.

  • resultsdbpy/resultsdbpy/model/configuration_context_unittest.py:

(ConfigurationContextTest.test_expired_configurations): Test that recent=False works.

7:00 AM Changeset in webkit [251071] by commit-queue@webkit.org
  • 2 edits in trunk/JSTests

Skip memcpy-typed-loop timing out on ARMv7 pending investigation
https://bugs.webkit.org/show_bug.cgi?id=202923

Patch by Paulo Matos <Paulo Matos> on 2019-10-14
Reviewed by Adrian Perez de Castro.

  • microbenchmarks/memcpy-typed-loop.js:
4:32 AM Changeset in webkit [251070] by commit-queue@webkit.org
  • 1 edit
    1 delete in trunk/LayoutTests

Replace reftest scripts-height.html with script tests
https://bugs.webkit.org/show_bug.cgi?id=159423

Patch by Rob Buis <rbuis@igalia.com> on 2019-10-14
Reviewed by Frédéric Wang.

Remove the expected result as well.

  • mathml/presentation/scripts-height-expected.html: Removed.
2:21 AM Changeset in webkit [251069] by Philippe Normand
  • 3 edits in trunk/Source/WebKit

[GTK][WebInspector] Support for saving data
https://bugs.webkit.org/show_bug.cgi?id=202894

Reviewed by Carlos Garcia Campos.

Implement the WebInspectorProxy::platformSave() method. This
allows users to save the inspector performance measurements, for
instance.

  • UIProcess/gtk/WebInspectorProxyGtk.cpp:

(WebKit::WebInspectorProxy::platformSave):

  • WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp:

(WebKit::WebInspectorUI::canSave):

1:42 AM Changeset in webkit [251068] by Adrian Perez de Castro
  • 2 edits in trunk/Tools

Unreviewed, set Adrian Perez de Castro as WebKit Reviewer

  • Scripts/webkitpy/common/config/contributors.json:
12:54 AM Changeset in webkit [251067] by youenn@apple.com
  • 44 edits
    3 adds in trunk

Reuse existing web processes for running service workers
https://bugs.webkit.org/show_bug.cgi?id=202195

Reviewed by Chris Dumez.

Source/WebCore:

Update implementation to be able to run service workers jointly with page.
Add internals API to get the process ID.
This allows writing tests to check whether a service worker is in the same process as its client or not.

Test: http/wpt/service-workers/service-worker-different-process.https.html

  • testing/Internals.cpp:

(WebCore::Internals::processIdentifier const):

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

(WebCore::ServiceWorkerInternals::processIdentifier const):

  • testing/ServiceWorkerInternals.h:
  • testing/ServiceWorkerInternals.idl:
  • workers/service/ServiceWorkerProvider.cpp:

(WebCore::ServiceWorkerProvider::registerServiceWorkerClients):
Do not register dummy documents whose sole purpose is to do loading for service workers.

  • workers/service/context/SWContextManager.cpp:

(WebCore::SWContextManager::setConnection):
Now that connections might be created more than once on a given process,
Make sure that the replaced connection is stopped or there is no replaced connection.
(WebCore::SWContextManager::stopAllServiceWorkers):
Add routine to stop all service workers running in a given web process.

  • workers/service/context/SWContextManager.h:

(WebCore::SWContextManager::Connection::isClosed const):
(WebCore::SWContextManager::Connection::setAsClosed):

Source/WebKit:

When network process asks for a service worker context connection,
we now iterate through existing web processes and reuse one if both session
and registrable domain match.
We then ask the web process to create a context connection to the network process.

When network process no longer needs the connection, it instructs the UIProcess
that will update its state so that the web process is no longer considered as running
service workers.
UIProcess then instructs the web process to stop its service workers and its connection.

Later on, the same web process may be reused for running service workers in which case
a new connection will replace the stopped connection.

Similarly, on network process crash, all web process running service workers are updated
so that they are no longer considered as running service workers.

Add a boolean state to WebProcessPool to control whether creating a separate service worker process.

We no longer terminate the web process when stopping service workers or when network process crash.
We use the enableTermination/disableTermination at context connection start/stop time.
We consider that the context connection is similar to running a page in the process and creating/removing a page
calls disableTermination/enableTermination.

NetworkProcess is handling the management of service worker processes by checking for clients.
In case there is no client, the process is terminated.
This removes the need for the WebProcessPool service worker process timer.
This patch removes this timer.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
(WebKit::NetworkConnectionToWebProcess::establishSWContextConnection):
(WebKit::NetworkConnectionToWebProcess::closeSWContextConnection):
(WebKit::NetworkConnectionToWebProcess::serverToContextConnectionNoLongerNeeded):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:

(WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection):
(WebKit::WebSWServerToContextConnection::~WebSWServerToContextConnection):
(WebKit::WebSWServerToContextConnection::messageSenderConnection const):
(WebKit::WebSWServerToContextConnection::connectionIsNoLongerNeeded):
(WebKit::WebSWServerToContextConnection::startFetch):

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
  • UIProcess/API/C/WKContext.cpp:

(WKContextSetUseSeparateServiceWorkerProcess):

  • UIProcess/API/C/WKContextPrivate.h:
  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _setUseSeparateServiceWorkerProcess:]):
(-[WKProcessPool _webPageContentProcessCount]):

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::workerContextConnectionNoLongerNeeded):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::networkProcessCrashed):
(WebKit::WebProcessPool::establishWorkerContextConnectionToNetworkProcess):
(WebKit::WebProcessPool::removeFromServiceWorkerProcesses):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::terminateNetworkProcess):
(WebKit::WebProcessPool::setUseSeparateServiceWorkerProcess):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::createForServiceWorkers):
(WebKit::WebProcessProxy::canTerminateAuxiliaryProcess):
(WebKit::WebProcessProxy::didStartProvisionalLoadForMainFrame):
(WebKit::WebProcessProxy::disableServiceWorkers):
(WebKit::WebProcessProxy::enableServiceWorkers):

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::isMatchingRegistrableDomain const):

  • WebProcess/Storage/WebSWContextManagerConnection.cpp:

(WebKit::m_userAgent):
(WebKit::WebSWContextManagerConnection::terminateWorker):
(WebKit::WebSWContextManagerConnection::syncTerminateWorker):
(WebKit::WebSWContextManagerConnection::close):

  • WebProcess/Storage/WebSWContextManagerConnection.h:
  • WebProcess/Storage/WebSWContextManagerConnection.messages.in:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::networkProcessConnectionClosed):
(WebKit::WebProcess::registerServiceWorkerClients):

Tools:

Add support for enforcing a separate process for service workers.
This is useful for tests trying to crash the service worker process.

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:

Update test to use serviceWorkerProcessCount.
Add test to check for in process and out of process service workers.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setUseSeparateServiceWorkerProcess):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/workers/service/resources/postmessage-after-sw-process-crash.js:

(async.doTest):

  • http/tests/workers/service/resources/postmessage-after-terminate.js:

(async.doTest):

  • http/tests/workers/service/resources/postmessage-after-terminating-hung-worker.js:

(async.doTest):

  • http/wpt/service-workers/online.https.html:
  • http/wpt/service-workers/service-worker-different-process.https-expected.txt: Added.
  • http/wpt/service-workers/service-worker-different-process.https.html: Added.
  • http/wpt/service-workers/service-worker-process-worker.js: Added.

Oct 13, 2019:

11:07 PM Changeset in webkit [251066] by Alan Coon
  • 5 edits
    2 adds in branches/safari-608.2.40.1-branch

Cherry-pick r250640. rdar://problem/56237430

REGRESSION (r245672): <select> dropdown with text-rendering: optimizeLegibility freezes Safari
https://bugs.webkit.org/show_bug.cgi?id=202198

Reviewed by Tim Horton.

Source/WebKit:

NSFont has a bug where passing "auto" to kCTFontOpticalSizeAttribute
causes an exception to be thrown. We don't catch the exception, so we
pop up back to the runloop, which confuses the UI process.

The solution is twofold: 1) Workaround the bug by passing the font size
to kCTFontOpticalSizeAttribute instead, and 2) catch any exceptions that
this part of the code might throw.

  • UIProcess/mac/WebPopupMenuProxyMac.mm: (WebKit::WebPopupMenuProxyMac::showPopupMenu):

Source/WTF:

  • wtf/Platform.h:

LayoutTests:

  • fast/forms/select-font-optical-size-expected.txt: Added.
  • fast/forms/select-font-optical-size.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250640 268f45cc-cd09-0410-ab3c-d52691b4dbfc

11:03 PM Changeset in webkit [251065] by Alan Coon
  • 7 edits in branches/safari-608.2.40.1-branch/Source

Versioning.

10:04 PM Changeset in webkit [251064] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Stop 'using namespace *Names' in files generated by make_names.pl
https://bugs.webkit.org/show_bug.cgi?id=202907

Reviewed by Geoffrey Garen.

  • dom/make_names.pl:

(printFunctionTable):
(printFactoryCppFile):
(printWrapperFactoryCppFile):
Stop 'using namespace SVGNames' and 'using namepace HTMLNames' in
files generated by make_names.pl. Just use fully-qualified names.

There is some overlap between the two namespaces, so this is a
prerequsite for doing more aggressive unified source bundling in bindings.

5:05 PM Changeset in webkit [251063] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Don't include ApplicationServices in npapi.h
https://bugs.webkit.org/show_bug.cgi?id=202911

Reviewed by Sam Weinig.

  • plugins/npapi.h:

Just include CoreGraphics.h, not ApplicationServices.h.
ApplicationServices.h pulls in all sorts of crazy things like
QuickDraw headers that have symbol conflicts with JSC (like Handle).

4:49 PM Changeset in webkit [251062] by stephan.szabo@sony.com
  • 2 edits in trunk/Source/WebCore

Wincairo build broken: EventLoop.h: No such file or directory
https://bugs.webkit.org/show_bug.cgi?id=202893

Reviewed by Fujii Hironori.

Remove include of EventLoop.h.

  • platform/network/curl/SynchronousLoaderClientCurl.cpp:
12:25 PM Changeset in webkit [251061] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebCore

Fix compilation of Crypto.cpp on macOS with !WEB_CRYPTO
https://bugs.webkit.org/show_bug.cgi?id=202895

Reviewed by Alexey Proskuryakov.

Crypto.cpp does not use getCommonCryptoDigestAlgorithm(), defined in
CommonCryptoUtilities.h, but requires CommonCrypto includes which are
coming with it. However, when WEB_CRYPTO is disabled necessary
transitive includes are missing.

  • page/Crypto.cpp:
10:08 AM Changeset in webkit [251060] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

Convert ENinePieceImageRule into an enum class and rename
https://bugs.webkit.org/show_bug.cgi?id=202889

Reviewed by Alex Christensen.

Enum classify ENinePieceImageRule.

The bitfield in NinePieceImage isn't saving anything so don't use one there.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForRepeatRule):

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapNinePieceImageRepeat):

  • css/StyleBuilderCustom.h:

(WebCore::ApplyPropertyBorderImageModifier::applyInitialValue):

  • rendering/style/NinePieceImage.cpp:

(WebCore::NinePieceImage::NinePieceImage):
(WebCore::NinePieceImage::computeMiddleTileScale):
(WebCore::NinePieceImage::computeTileScales):
(WebCore::NinePieceImage::Data::Data):
(WebCore::NinePieceImage::Data::create):

  • rendering/style/NinePieceImage.h:

(WebCore::NinePieceImage::horizontalRule const):
(WebCore::NinePieceImage::setHorizontalRule):
(WebCore::NinePieceImage::verticalRule const):
(WebCore::NinePieceImage::setVerticalRule):

9:23 AM Changeset in webkit [251059] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

Clarify the naming of the radius-related functions on BorderData
https://bugs.webkit.org/show_bug.cgi?id=202888

Reviewed by Alex Christensen.

BorderData had some confusingly named data members and functions ("topLeft"'"). Renamed
to include the term "radius".

  • platform/graphics/PathUtilities.cpp:

(WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):

  • rendering/style/BorderData.h:

(WebCore::BorderData::BorderData):
(WebCore::BorderData::hasBorderRadius const):
(WebCore::BorderData::operator== const):
(WebCore::BorderData::topLeftRadius const):
(WebCore::BorderData::topRightRadius const):
(WebCore::BorderData::bottomLeftRadius const):
(WebCore::BorderData::bottomRightRadius const):
(WebCore::BorderData::topLeft const): Deleted.
(WebCore::BorderData::topRight const): Deleted.
(WebCore::BorderData::bottomLeft const): Deleted.
(WebCore::BorderData::bottomRight const): Deleted.

  • rendering/style/RenderStyle.cpp:

(WebCore::calcRadiiFor):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::borderTopLeftRadius const):
(WebCore::RenderStyle::borderTopRightRadius const):
(WebCore::RenderStyle::borderBottomLeftRadius const):
(WebCore::RenderStyle::borderBottomRightRadius const):
(WebCore::RenderStyle::resetBorderTopLeftRadius):
(WebCore::RenderStyle::resetBorderTopRightRadius):
(WebCore::RenderStyle::resetBorderBottomLeftRadius):
(WebCore::RenderStyle::resetBorderBottomRightRadius):
(WebCore::RenderStyle::setBorderTopLeftRadius):
(WebCore::RenderStyle::setBorderTopRightRadius):
(WebCore::RenderStyle::setBorderBottomLeftRadius):
(WebCore::RenderStyle::setBorderBottomRightRadius):

9:02 AM Changeset in webkit [251058] by Simon Fraser
  • 13 edits in trunk/Source/WebCore

Convert LineBoxContain to use an OptionSet<>
https://bugs.webkit.org/show_bug.cgi?id=202890

Reviewed by Alex Christensen.

Use OptionSet<LineBoxContain>.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::createLineBoxContainValue):

  • css/CSSLineBoxContainValue.cpp:

(WebCore::CSSLineBoxContainValue::CSSLineBoxContainValue):
(WebCore::CSSLineBoxContainValue::customCSSText const):

  • css/CSSLineBoxContainValue.h:
  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertLineBoxContain):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeLineBoxContain):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::minLineHeightForReplacedRenderer const):

  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::ascentAndDescentForBox const):
(WebCore::RootInlineBox::includeLeadingForBox const):
(WebCore::RootInlineBox::includeFontForBox const):
(WebCore::RootInlineBox::includeGlyphsForBox const):
(WebCore::RootInlineBox::includeInitialLetterForBox const):
(WebCore::RootInlineBox::includeMarginForBox const):
(WebCore::RootInlineBox::fitsToGlyphs const):
(WebCore::RootInlineBox::includesRootLineBoxFontOrLeading const):

  • rendering/SimpleLineLayout.cpp:

(WebCore::SimpleLineLayout::canUseForFontAndText):
(WebCore::SimpleLineLayout::canUseForStyle):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::lineBoxContain const):
(WebCore::RenderStyle::setLineBoxContain):
(WebCore::RenderStyle::initialLineBoxContain):

  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):

  • rendering/style/StyleRareInheritedData.h:
  • rendering/updating/RenderTreeBuilderFirstLetter.cpp:

(WebCore::styleForFirstLetter):

Oct 12, 2019:

11:26 PM Changeset in webkit [251057] by rniwa@webkit.org
  • 3 edits
    2 adds in trunk

[iOS] Crash in WebCore::DOMWindow::incrementScrollEventListenersCount
https://bugs.webkit.org/show_bug.cgi?id=202878

Reviewed by Alex Christensen.

Source/WebCore:

Added the missing null check in tryAddEventListener and tryRemoveEventListener for scroll event.

Test: fast/events/scroll-event-on-document-without-window.html

  • dom/Node.cpp:

(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):

LayoutTests:

Added a regression test for the crash.

  • fast/events/scroll-event-on-document-without-window-expected.txt: Added.
  • fast/events/scroll-event-on-document-without-window.html: Added.
10:35 PM Changeset in webkit [251056] by stephan.szabo@sony.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Regression (251018): Wincairo build broken: unresolved external symbol
https://bugs.webkit.org/show_bug.cgi?id=202879

Reviewed by Alex Christensen.

  • PlatformWin.cmake: Add dxgi library for CreateDXGIFactory1
6:39 PM Changeset in webkit [251055] by Simon Fraser
  • 10 edits
    1 delete in trunk/Source/WebCore

Move CSSReflectionDirection into RenderStyleConstants as ReflectionDirection
https://bugs.webkit.org/show_bug.cgi?id=202886

Reviewed by Sam Weinig.

Make CSSReflectionDirection an enum class ReflectionDirection, and fix the usage sites.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForReflection):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ReflectionDirection const):
(WebCore::CSSPrimitiveValue::operator CSSReflectionDirection const): Deleted.

  • css/CSSReflectionDirection.h: Removed.
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::reflectionOffset const):
(WebCore::RenderBox::reflectedRect const):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):

  • rendering/style/RenderStyleConstants.cpp:

(WebCore::operator<<):

  • rendering/style/RenderStyleConstants.h:
  • rendering/style/StyleReflection.h:

(WebCore::StyleReflection::direction const):
(WebCore::StyleReflection::setDirection):
(WebCore::StyleReflection::StyleReflection):

6:14 PM Changeset in webkit [251054] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Fix the spelling of ThreeDDarkDhasowColor and unwrap the ThemeType enums
https://bugs.webkit.org/show_bug.cgi?id=202887

Reviewed by Wenson Hsieh.

ThreeDDarkDhasowColor was misspelled, and one enum value per line please.

  • platform/ThemeTypes.h:
4:40 PM Changeset in webkit [251053] by Chris Dumez
  • 89 edits in trunk/Source/WebCore

Add [ActiveDOMObject] to IDLs of ActiveDOMObjects
https://bugs.webkit.org/show_bug.cgi?id=202869

Reviewed by Ryosuke Niwa.

Add [ActiveDOMObject] to IDLs of ActiveDOMObjects, this is necessary so that the wrapper
stays alive as long as ActiveDOMObject::hasPendingActivity() returns true. We may have
subtle lifetime bugs otherwise.

  • Modules/encryptedmedia/MediaKeySession.h:
  • Modules/encryptedmedia/MediaKeySession.idl:
  • Modules/entriesapi/FileSystemDirectoryReader.idl:
  • Modules/entriesapi/FileSystemEntry.idl:
  • Modules/geolocation/Geolocation.idl:
  • Modules/indexeddb/IDBObjectStore.h:
  • Modules/indexeddb/IDBObjectStore.idl:
  • Modules/paymentrequest/PaymentResponse.idl:
  • Modules/webvr/VRDisplay.h:
  • Modules/webvr/VRDisplay.idl:
  • workers/service/ServiceWorkerContainer.idl:
3:05 PM Changeset in webkit [251052] by Simon Fraser
  • 7 edits in trunk/Source/WebCore

Implement TextStream-based dumping for all the RenderStyle and SVGRenderStyle enum classes
https://bugs.webkit.org/show_bug.cgi?id=202877

Reviewed by Dean Jackson.

Make style-related enum classes dumpable with TextStream, and make some SVG style-related
classes dumpable.

  • rendering/style/RenderStyleConstants.cpp:

(WebCore::operator<<):

  • rendering/style/RenderStyleConstants.h:
  • rendering/style/SVGRenderStyleDefs.cpp:

(WebCore::operator<<):

  • rendering/style/SVGRenderStyleDefs.h:
  • rendering/style/ShadowData.cpp:

(WebCore::operator<<):

  • rendering/style/ShadowData.h:
2:04 PM Changeset in webkit [251051] by Chris Dumez
  • 88 edits in trunk/Source/WebCore

Unreviewed, rolling out r251040.

Broke IDB tests in Debug

Reverted changeset:

"Add [ActiveDOMObject] to IDLs of ActiveDOMObjects"
https://bugs.webkit.org/show_bug.cgi?id=202869
https://trac.webkit.org/changeset/251040

1:34 PM Changeset in webkit [251050] by rniwa@webkit.org
  • 10 edits
    6 adds in trunk

Source/WebCore:
Invoke callbacks registered by requestIdleCallback
https://bugs.webkit.org/show_bug.cgi?id=202824

Reviewed by Antti Koivisto.

Invoke callbacks registered by requestIdleCallback unless it's canceled.

To do this, this patch introduces WindowEventLoop class, which represents the HTML5 event loop:
https://html.spec.whatwg.org/multipage/webappapis.html#window-event-loop

Because each and only each agent cluster is meant to have its own window event loop, this class will be shared
across multiple documents of the same registrable domain:
https://html.spec.whatwg.org/multipage/webappapis.html#integration-with-the-javascript-agent-cluster-formalism

Tests: requestidlecallback/requestidlecallback-is-called.html

requestidlecallback/requestidlecallback-is-not-called-when-canceled.html

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.cpp:

(WebCore::Document::eventLoop): Added.
(WebCore::Document::requestIdleCallback): Associate IdleCallbackController with this document.

  • dom/Document.h:

(WebCore::Document::idleCallbackController): Added. Used for release assertions.

  • dom/IdleCallbackController.cpp:

(WebCore::IdleCallbackController::IdleCallbackController): Keeps a weak pointer to Document.
(WebCore::IdleCallbackController::queueIdleCallback):
(WebCore::IdleCallbackController::removeIdleCallback):
(WebCore::IdleCallbackController::queueTaskToStartIdlePeriod): Added.
(WebCore::IdleCallbackController::startIdlePeriod): Added. Implements the start an idle period algorithm:
https://w3c.github.io/requestidlecallback/#start-an-idle-period-algorithm
(WebCore::IdleCallbackController::queueTaskToInvokeIdleCallbacks): Added.
(WebCore::IdleCallbackController::invokeIdleCallbacks): Added. The invoke idle callback timeout algorithm:
https://w3c.github.io/requestidlecallback/#invoke-idle-callback-timeout-algorithm

  • dom/IdleCallbackController.h:
  • dom/IdleDeadline.h:
  • dom/WindowEventLoop.cpp: Added.

(WebCore::WindowEventLoop::create): Added.
(WebCore::WindowEventLoop::WindowEventLoop): Added.
(WebCore::WindowEventLoop::queueTask): Added.
(WebCore::WindowEventLoop::run): Added.

  • dom/WindowEventLoop.h: Added.
  • page/Page.cpp:

(WebCore::Page::updateRendering): Added comments for the missing pieces.

LayoutTests:
Invoke callback registered by requestIdleCallback
https://bugs.webkit.org/show_bug.cgi?id=202824

Reviewed by Antti Koivisto.

Added basic regression tests. The second test (requestidlecallback-is-not-called-when-canceled.html)
found a spec bug (https://github.com/w3c/requestidlecallback/issues/83).

  • requestidlecallback/requestidlecallback-is-called-expected.txt: Added.
  • requestidlecallback/requestidlecallback-is-called.html: Added.
  • requestidlecallback/requestidlecallback-is-not-called-when-canceled-expected.txt: Added.
  • requestidlecallback/requestidlecallback-is-not-called-when-canceled.html: Added.
12:17 PM Changeset in webkit [251049] by Chris Dumez
  • 9 edits in trunk

Back/Forward cache does not work after doing a favorite navigation
https://bugs.webkit.org/show_bug.cgi?id=202762
<rdar://problem/56126911>

Reviewed by Antti Koivisto.

Source/WebCore:

When a subframe goes into the page cache, make sure we null out the opener
link of any windows that were opened by this frame. This matches what would
happened if this frame were closed.

Covered by the following API tests:
ProcessSwap.PageCacheAfterProcessSwapByClient
ProcessSwap.OpenerLinkAfterAPIControlledProcessSwappingOfOpener

  • history/CachedFrame.cpp:

(WebCore::CachedFrame::CachedFrame):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::~FrameLoader):
(WebCore::FrameLoader::detachFromAllOpenedFrames):

  • loader/FrameLoader.h:

Source/WebKit:

When a process-swap was forced by the client, we would always close the page in the previous
process after navigating. This would prevent leveraging the back/forward cache when navigating
back after such a process-swap. The reason we were doing this is that other pages may have
opener link to this page and closing the page was an easy way to break this opener link.

To address the issue, we no longer close the previous page when a process-swap is forced by the
client. Instead, we make sure to disconnect the frames' openees from their opener then the opener
enters the page cache.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::suspendCurrentPageIfPossible):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::suspendForProcessSwap):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
9:17 AM Changeset in webkit [251048] by Chris Dumez
  • 10 edits in trunk/Source/WebKit

Clearing Website data for a given session should not shut down cached processes for other sessions
https://bugs.webkit.org/show_bug.cgi?id=202865
<rdar://problem/56202912>

Reviewed by Antti Koivisto.

When clearing Website data for a given data store, we now only clear cached processes
(either if BackForwardCache or WebProcessCache) if they are associated with this
particular data store. It is very wasteful otherwise.

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):

  • UIProcess/SuspendedPageProxy.cpp:

(WebKit::SuspendedPageProxy::~SuspendedPageProxy):
ProvisionalPageProxy & SuspendedPageProxy's destructors no longer call
WebProcessProxy::maybeShutdown() asynchronously. We now call maybeShutdown()
synchronously in WebProcessProxy::decrementSuspendedPageCount() and
WebProcessProxy::removeProvisionalPageProxy() instead. This makes things a
lot more predictable.

  • UIProcess/WebBackForwardCache.cpp:

(WebKit::WebBackForwardCache::removeEntriesForSession):
Add new removeEntriesForSession() method to clear only back / forward cache
entries associated with a particular session.

(WebKit::WebBackForwardCache::clear):
Stop taking a parameter indicating if we allow the processes to enter the
process cache. Now that we call maybeShutdown() synchronously when destroying
a SuspendedPageProxy, we can simply allow the processes to enter the process
cache unconditionally. If the caller does not want this processes in the page
cache, they can clear the process cache afterwards.

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

(WebKit::WebPageProxy::receivedNavigationPolicyDecision):
Now that destroying a SuspendedPageProxy or a ProvisionalPageProxy may shutdown
their process synchronously, add a scope here to prevent shutdown of the process
for the duration of this scope, since we're about to use it for a navigation and
we don't want it to get shutdown, even if there is no longer anything using it.

(WebKit::WebPageProxy::continueNavigationInNewProcess):
Add new assertion and rename parameter for consistency.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::handleMemoryPressureWarning):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::addProvisionalPageProxy):
Add new assertion.

(WebKit::WebProcessProxy::removeProvisionalPageProxy):
Call maybeShutDown() if this was the last provisional page.

(WebKit::WebProcessProxy::maybeShutDown):
Drop parameter indicating if we want to allow the process to enter the process
cache and allow caching unconditionally.

(WebKit::WebProcessProxy::canTerminateAuxiliaryProcess):
Prevent termination if there is a ScopePreventingShutdown.

(WebKit::WebProcessProxy::decrementSuspendedPageCount):
Call maybeShutDown() if this was the last suspended page.

  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::ScopePreventingShutdown::ScopePreventingShutdown):
(WebKit::WebProcessProxy::ScopePreventingShutdown::~ScopePreventingShutdown):
(WebKit::WebProcessProxy::makeScopePreventingShutdown):
Add new facility to prevent shutdown of a process for the duration of the scope.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):
When removing website data, only clear cached processes if they are associated with
the current data store.

7:29 AM WebKitGTK/2.26.x edited by Michael Catanzaro
(diff)
2:19 AM Changeset in webkit [251047] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebKitLegacy/win

requestIdleCallback is not enabled in DumpRenderTree on Windows
https://bugs.webkit.org/show_bug.cgi?id=202876

Address the forgotten review comment.

  • WebPreferenceKeysPrivate.h:
2:16 AM Changeset in webkit [251046] by rniwa@webkit.org
  • 8 edits in trunk

Source/WebKitLegacy/win:
requestIdleCallback is not enabled in DumpRenderTree on Windows
https://bugs.webkit.org/show_bug.cgi?id=202876

Reviewed by Wenson Hsieh.

Added the missing plumbing to enable requestIdleCallback.

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::initializeDefaultSettings):
(WebPreferences::requestIdleCallbackEnabled):
(WebPreferences::setRequestIdleCallbackEnabled):

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Tools:
requestIdleCallback cannot be enabled in DumpRenderTree on Windows
https://bugs.webkit.org/show_bug.cgi?id=202876

Reviewed by Wenson Hsieh.

Added the missing plumbing for Windows port.

  • DumpRenderTree/win/DumpRenderTree.cpp:

(setWebPreferencesForTestOptions):

12:57 AM Changeset in webkit [251045] by Chris Fleizach
  • 11 edits in trunk/Source

AX: Make AXIsolatedTree compile again
https://bugs.webkit.org/show_bug.cgi?id=202702
<rdar://problem/56084968>

Reviewed by Joanmarie Diggs.

Source/WebCore:

Fix compilation and runtime issues when building with ACCESSIBILITY_ISOLATED_TREE.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::treePageCache):
(WebCore::AXIsolatedTree::nodeForID const):

  • Remove release assert here because the initial request that comes through happens on the main thread. We need to handle that case specific case.

(WebCore::AXIsolatedTree::applyPendingChanges):
(WebCore::AXIsolatedTree::initializePageTreeForID): Deleted.
(WebCore::AXIsolatedTree::setInitialRequestInProgress): Deleted.

  • accessibility/isolatedtree/AXIsolatedTree.h:
  • accessibility/isolatedtree/AXIsolatedTreeNode.cpp:

(WebCore::AXIsolatedTreeNode::rectAttributeValue const):

  • accessibility/mac/WebAccessibilityObjectWrapperBase.mm:

(convertToNSArray):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper childrenVectorArray]):

Source/WebKit:

  • WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:

(-[WKAccessibilityWebPageObjectBase isolatedTreeRootObject]):

Note: See TracTimeline for information about the timeline view.