Timeline



Jan 7, 2019:

8:27 PM Changeset in webkit [239720] by Chris Dumez
  • 7 edits in trunk/Source

Cannot scoll for 5 seconds after swiping back on quoteunquoteapps.com
https://bugs.webkit.org/show_bug.cgi?id=193215
<rdar://problem/45108222>

Reviewed by Tim Horton.

When doing the history navigation, if the source and destination history
items are clones then we will not trigger a main frame load. We may
however trigger loads in subframes if needed. This was an issue for the
ViewGestureController because it was expecting a main frame load after
calling WebPageProxy::goToBackForwardItem() in order to determine when
taking down the view snapshot is appropriate.

To address the problem, the ViewGestureController now takes the snapshot
down as soon as the swipe gesture ends when the source and destination
items are clones.

  • Shared/WebBackForwardListItem.cpp:

(WebKit::childItemWithTarget):
(WebKit::WebBackForwardListItem::itemIsInSameDocument const):
(WebKit::hasSameFrames):
(WebKit::WebBackForwardListItem::itemIsClone):

  • Shared/WebBackForwardListItem.h:
  • UIProcess/ios/ViewGestureControllerIOS.mm:

(WebKit::ViewGestureController::endSwipeGesture):

  • UIProcess/mac/ViewGestureControllerMac.mm:

(WebKit::ViewGestureController::endSwipeGesture):

6:07 PM Changeset in webkit [239719] by ddkilzer@apple.com
  • 5 edits in trunk

Leak of ScrollCompletionCallbackData (16 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
<https://webkit.org/b/193222>
<rdar://problem/46862309>

Reviewed by Joseph Pecoraro.

Source/WebKit:

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

(WKBundlePageRegisterScrollOperationCompletionCallback): Change
to return true if callback will be called, else false.

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

(WKBundlePageRegisterScrollOperationCompletionCallback): Change
to return bool value to denote whether callback will be called
(true) or not called (false).

Tools:

  • WebKitTestRunner/InjectedBundle/EventSendingController.cpp:

(WTR::executeCallback): Fix camel case of variable name.
(WTR::EventSendingController::callAfterScrollingCompletes): If
WKBundlePageRegisterScrollOperationCompletionCallback() returns
false, make sure to release the ScrollCompletionCallbackData
object. This fixes the leak.

5:37 PM Changeset in webkit [239718] by Fujii Hironori
  • 2 edits in trunk/Tools

[Win] EWS: wincairo-ews cannot apply a patch with *.png
https://bugs.webkit.org/show_bug.cgi?id=193044

Reviewed by Daniel Bates.

WinCairo EWS bots are using Windows Perl. Binary files should be
opened as binary mode.

  • Scripts/svn-apply:

(handleGitBinaryChange): Use 'binmode' for binary file handles.

5:18 PM Changeset in webkit [239717] by Alan Coon
  • 7 edits in trunk/Source

Versioning.

4:55 PM Changeset in webkit [239716] by don.olmstead@sony.com
  • 4 edits in trunk

[CMake] Add ENABLE_CSS_TYPED_OM option
https://bugs.webkit.org/show_bug.cgi?id=193216

Reviewed by Michael Catanzaro.

.:

  • Source/cmake/WebKitFeatures.cmake:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
4:39 PM Changeset in webkit [239715] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Crash in SWServer::Connection::resolveRegistrationReadyRequests
https://bugs.webkit.org/show_bug.cgi?id=193217

Reviewed by Chris Dumez.

As can be seen from the traces, SWServer might clear its connections HashMap in its destructor.
This might then trigger calling SWServer::resolveRegistrationReadyRequests.
This method is iterating on the connections HashMap which is being cleared.
To remove this problem, move the HashMap in a temporary variable and clear the temporary variable.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::~SWServer):

4:14 PM Changeset in webkit [239714] by Alan Coon
  • 1 copy in tags/Safari-606.4.5.2.1

Tag Safari-606.4.5.2.1.

4:09 PM Changeset in webkit [239713] by Alan Coon
  • 2 edits in branches/safari-606.4.5.2-branch/Source/WebCore

Apply patch. rdar://problem/46941524

4:05 PM Changeset in webkit [239712] by Alan Coon
  • 7 edits in branches/safari-606.4.5.2-branch/Source

Versioning.

4:04 PM Changeset in webkit [239711] by jer.noble@apple.com
  • 4 edits in trunk/Source/WebCore

REGRESSION (r239519): ASSERTION FAILED: !m_adoptionIsRequired in com.apple.WebCore: void WTF::refIfNotNull<WebCore::CDMSessionMediaSourceAVFObjC> + 53
https://bugs.webkit.org/show_bug.cgi?id=193211
<rdar://problem/46937412>

Reviewed by Eric Carlson.

Make CDMSessionMediaSourceAVFObjC a CanMakeWeakPtr rather than RefCounted, as CDMSessions are stored in
std::unique_ptrs, and not in Ref or RefPtr.

  • platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):

4:04 PM Changeset in webkit [239710] by achristensen@apple.com
  • 8 edits in trunk/Source/WebKit

Remove use of NetworkProcess::singleton from CacheStorage::Engine::from
https://bugs.webkit.org/show_bug.cgi?id=193220

Reviewed by Andy Estes.

This required passing the NetworkProcess& in from all its callers.
While I was at it, I made them use CompletionHandlers where appropriate.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::destroySession):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::findCacheEngine):
(WebKit::NetworkProcess::ensureCacheEngine):
(WebKit::NetworkProcess::removeCacheEngine):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::from):
(WebKit::CacheStorage::Engine::destroyEngine):
(WebKit::CacheStorage::Engine::fetchEntries):
(WebKit::CacheStorage::Engine::open):
(WebKit::CacheStorage::Engine::remove):
(WebKit::CacheStorage::Engine::retrieveCaches):
(WebKit::CacheStorage::Engine::retrieveRecords):
(WebKit::CacheStorage::Engine::putRecords):
(WebKit::CacheStorage::Engine::deleteMatchingRecords):
(WebKit::CacheStorage::Engine::lock):
(WebKit::CacheStorage::Engine::unlock):
(WebKit::CacheStorage::Engine::clearMemoryRepresentation):
(WebKit::CacheStorage::Engine::representation):
(WebKit::CacheStorage::Engine::clearAllCaches):
(WebKit::CacheStorage::Engine::clearCachesForOrigin):
(WebKit::CacheStorage::globalEngineMap): Deleted.

  • NetworkProcess/cache/CacheStorageEngine.h:
  • NetworkProcess/cache/CacheStorageEngineConnection.cpp:

(WebKit::CacheStorageEngineConnection::~CacheStorageEngineConnection):
(WebKit::CacheStorageEngineConnection::open):
(WebKit::CacheStorageEngineConnection::remove):
(WebKit::CacheStorageEngineConnection::caches):
(WebKit::CacheStorageEngineConnection::retrieveRecords):
(WebKit::CacheStorageEngineConnection::deleteMatchingRecords):
(WebKit::CacheStorageEngineConnection::putRecords):
(WebKit::CacheStorageEngineConnection::reference):
(WebKit::CacheStorageEngineConnection::dereference):
(WebKit::CacheStorageEngineConnection::clearMemoryRepresentation):
(WebKit::CacheStorageEngineConnection::engineRepresentation):

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::store):
(WebKit::NetworkCache::Cache::remove):
(WebKit::NetworkCache::Cache::traverse):
(WebKit::NetworkCache::Cache::clear):
(WebKit::NetworkCache::Cache::retrieveData):

  • NetworkProcess/cache/NetworkCache.h:
4:03 PM Changeset in webkit [239709] by ddkilzer@apple.com
  • 42 edits in trunk

Prefer RetainPtr<NSObject> to RetainPtr<NSObject *>
<https://webkit.org/b/193056>

Reviewed by Alex Christensen.

Source/WebCore:

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

(-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]):
(-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]):

  • platform/network/cf/AuthenticationChallenge.h:
  • Remove '*' from RetainPtr<> type.
  • platform/network/cocoa/NetworkStorageSessionCocoa.mm:

(WebCore::cookiesForURL):

  • Once retainPtr() was changed to return RetainPtr<NSArray> instead of RetainPtr<NSArray *> here, that forced the type of cookiesPtr to change as well since Optional<RetainPtr<NSArray>> is not assignable to Optional<RetainPtr<NSArray *>> without further template specialization, which didn't seem useful since Optional<RetainPtr<>> variable types are rarely used.

Source/WebKit:

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

(WebKit::XPCServiceMain):

  • UIProcess/API/Cocoa/_WKThumbnailView.mm:
  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
  • UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
  • UIProcess/Plugins/PluginProcessProxy.h:
  • UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:

(WebKit::RemoteLayerTreeHost::createEmbeddedView):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm:

(WebKit::PlatformCALayerRemoteCustom::clone const):

  • Remove '*' from RetainPtr<> type.

Source/WebKitLegacy/mac:

  • Plugins/Hosted/NetscapePluginHostProxy.h:
  • Plugins/Hosted/NetscapePluginInstanceProxy.h:
  • Plugins/Hosted/NetscapePluginInstanceProxy.mm:

(WebKit::NetscapePluginInstanceProxy::enumerate):
(WebKit::NetscapePluginInstanceProxy::marshalValue):
(WebKit::NetscapePluginInstanceProxy::marshalValues):
(WebKit::NetscapePluginInstanceProxy::demarshalValue):
(WebKit::NetscapePluginInstanceProxy::demarshalValues):

  • Plugins/Hosted/ProxyInstance.mm:

(WebKit::ProxyInstance::invoke):

  • WebCoreSupport/WebGeolocationClient.mm:
  • WebView/WebDataSource.mm:

(-[WebDataSource _receivedData:]):

  • WebView/WebView.mm:

(-[WebView _cachedResponseForURL:]):

  • Remove '*' from RetainPtr<> type.

Source/WTF:

  • wtf/RetainPtr.h:

(WTF::RetainPtr<T>::HelperPtrType):

  • Use C++ template metaprogramming to define a shared return type for adoptNS() and retainPtr() that uses RetainPtr<NSObject> instead of RetainPtr<NSObject *>. The non-Objective-C typedef is used with retainPtr() for CFTypeRef objects.

(WTF::adoptNS):

  • Only make declarations available when compilng with Objective-C. The inline implementation is only available for Objective-C, so this makes the declarations consistent.
  • Change return type to remove '*' from NS types using RetainPtr<T>::HelperPtrType.

(WTF::retainPtr):

  • Change return type to remove '*' from NS types using RetainPtr<T>::HelperPtrType.
  • wtf/SchedulePair.h:
  • Remove '*' from RetainPtr<> type.

Tools:

  • Scripts/webkitpy/style/checker.py:
  • Ignore use of new runtime/retainptr check in Tools/TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm since it contains tests to ensure RetainPtr<NSObject *> is compatible with RetainPtr<NSObject>.
  • Scripts/webkitpy/style/checkers/cpp.py:

(check_language):
(CppChecker):

  • Add checker for use of '*' in RetainPtr<> type. A for loop was used instead of a single regex so that angle brackets could be matched up when checking the type contained within the RetainPtr<> type.
  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(CppStyleTest):

  • Add unit test for new runtime/retainptr check.
  • TestRunnerShared/EventSerialization/mac/EventSerializerMac.h:
  • TestWebKitAPI/EditingTestHarness.h:
  • Remove '*' from RetainPtr<> type.
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • Add cf/RetainPtr.cpp back to TestWTFLibrary target! This regressed in r201938.
  • TestWebKitAPI/Tests/WTF/cf/RetainPtr.cpp:

(TestWebKitAPI::TEST):

  • Update tests to match RetainPtr.mm tests (except for the *SimilarNSType tests since there is no CF equivalent of RetainPtr<NSString> and RetainPtr<NSString *>).
  • TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm:

(TestWebKitAPI::TEST):

  • Update tests to:
    • Not conflict by name with equivalent CF tests in RetainPtr.cpp.
    • Add test cases for RetainPtr<NSObject>, RetainPtr<NSObject *> and RetainPtr<id> were appropriate.
    • Add *SimilarNSType tests for converting between RetainPtr<NSObject> and RetainPtr<NSObject *>.
    • Change 0 to nil as appropriate.
    • Re-alphabetize the tests by name.
    • Add Optional<RetainPtr<>> tests.
    • Add retainPtr() tests.
  • TestWebKitAPI/Tests/WebKitCocoa/DownloadProgress.mm:

(-[DownloadProgressTestRunner _download:decideDestinationWithSuggestedFilename:completionHandler:]):

  • TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm:

(TEST):

  • Remove '*' from RetainPtr<> type.
  • TestWebKitAPI/Tests/WebKitCocoa/JITEnabled.mm:

(TEST(WebKit, JITEnabled)):

  • Add missing WTFMove(). Apparently a temporary was being created before in the argument list due to mismatched RetainPtr<> types.
  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm:

(TestWebKitAPI::setUpWebViewForTestingVideoControlsManager):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
  • TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
  • WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:

(WTR::resourcesDirectoryURL):

  • WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:

(WTR::InjectedBundle::platformInitialize):

  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
  • Remove '*' from RetainPtr<> type.
3:49 PM Changeset in webkit [239708] by Alan Coon
  • 7 edits in tags/Safari-607.1.18.3/Source

Versioning.

3:42 PM Changeset in webkit [239707] by youenn@apple.com
  • 3 edits in trunk/LayoutTests

LayoutTests/http/wpt/fetch/csp-reports-bypass-csp-checks.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=193178

Reviewed by Chris Dumez.

Test was flaky as the ping load CSP report request might be sent after the
fetch that grabs the report.
To overcome that issue, fetch the report several times until receiving a report.

  • http/wpt/fetch/csp-reports-bypass-csp-checks.html:
  • http/wpt/fetch/resources/store-csp-report.py:

(main):

3:34 PM Changeset in webkit [239706] by Alan Coon
  • 1 copy in tags/Safari-607.1.18.3

New tag.

3:22 PM Changeset in webkit [239705] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Audit: run arrow shouldn't be visible when running tests
https://bugs.webkit.org/show_bug.cgi?id=192209
<rdar://problem/46423615>

Reviewed by Brian Burg.

  • UserInterface/Views/AuditTreeElement.js:

(WI.AuditTreeElement.prototype.onattach):
(WI.AuditTreeElement.prototype.ondetach):
(WI.AuditTreeElement.prototype._updateLevel):
(WI.AuditTreeElement.prototype._handleAuditManagerTestScheduled): Added.
(WI.AuditTreeElement.prototype._handleAuditManagerTestCompleted): Added.

  • UserInterface/Views/AuditTreeElement.css: Added.

(.tree-outline .item.audit:matches(.test-case, .test-group):not(.manager-active) > .status:hover > img): Added.
(.tree-outline .item.audit.manager-active > .status > img.show-on-hover, .tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Added.
(.tree-outline .item.audit:matches(.test-case, .test-group) > .status:hover > img): Deleted.
(.tree-outline .item.audit.test-group.expanded > .status:hover > :not(img), .tree-outline .item.audit.test-group-result.expanded > .status): Deleted.

3:15 PM Changeset in webkit [239704] by dino@apple.com
  • 12 edits in trunk

Turn on Pointer Events by default for iOS
https://bugs.webkit.org/show_bug.cgi?id=193214
<rdar://problem/46974878>

Reviewed by Wenson Hsieh.

LayoutTests/imported/w3c:

Update expected results.

  • web-platform-tests/pointerevents/extension/pointerevent_touch-action-verification-expected.txt:
  • web-platform-tests/pointerevents/pointerevent_touch-action-illegal-expected.txt:
  • web-platform-tests/pointerevents/pointerevent_touch-action-verification-expected.txt:

Source/WebKit:

Turn on Pointer Events.

  • Shared/WebPreferences.yaml:
  • Shared/WebPreferencesDefaultValues.h: Make a new #define for iOS.

LayoutTests:

Skip the pointer events tests everywhere but iOS.

  • TestExpectations:
  • platform/ios-wk1/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk1/TestExpectations:
2:41 PM Changeset in webkit [239703] by Devin Rousso
  • 19 edits
    5 moves
    3 adds
    2 deletes in trunk

Web Inspector: extend XHR breakpoints to work with fetch
https://bugs.webkit.org/show_bug.cgi?id=185843
<rdar://problem/40431027>

Reviewed by Matt Baker.

Source/JavaScriptCore:

  • inspector/protocol/DOMDebugger.json:

Rename XHR to URL.

  • inspector/protocol/Debugger.json:

Add Fetch to reason enum for the Debugger.paused event.

Source/WebCore:

Test: inspector/dom-debugger/url-breakpoints.html

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::fetch):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::willFetch): Added.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::willFetchImpl): Added.

  • inspector/agents/InspectorDOMDebuggerAgent.h:
  • inspector/agents/InspectorDOMDebuggerAgent.cpp:

(WebCore::InspectorDOMDebuggerAgent::disable):
(WebCore::InspectorDOMDebuggerAgent::discardBindings):
(WebCore::InspectorDOMDebuggerAgent::setURLBreakpoint): Added.
(WebCore::InspectorDOMDebuggerAgent::removeURLBreakpoint): Added.
(WebCore::InspectorDOMDebuggerAgent::breakOnURLIfNeeded): Added.
(WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
(WebCore::InspectorDOMDebuggerAgent::willFetch): Added.
(WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint): Deleted.
(WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint): Deleted.

Source/WebInspectorUI:

  • UserInterface/Controllers/DOMDebuggerManager.js:

(WI.DOMDebuggerManager):
(WI.DOMDebuggerManager.supportsURLBreakpoints): Added.
(WI.DOMDebuggerManager.prototype.get urlBreakpoints): Added.
(WI.DOMDebuggerManager.prototype.urlBreakpointForURL): Added.
(WI.DOMDebuggerManager.prototype.addURLBreakpoint): Added.
(WI.DOMDebuggerManager.prototype.removeURLBreakpoint): Added.
(WI.DOMDebuggerManager.prototype._speculativelyResolveBreakpoints):
(WI.DOMDebuggerManager.prototype._updateURLBreakpoint): Added.
(WI.DOMDebuggerManager.prototype._resolveURLBreakpoint): Added.
(WI.DOMDebuggerManager.prototype._saveURLBreakpoints): Added.
(WI.DOMDebuggerManager.prototype._urlBreakpointDisabledStateDidChange): Added.
(WI.DOMDebuggerManager.prototype.get xhrBreakpoints): Deleted.
(WI.DOMDebuggerManager.prototype.xhrBreakpointForURL): Deleted.
(WI.DOMDebuggerManager.prototype.addXHRBreakpoint): Deleted.
(WI.DOMDebuggerManager.prototype.removeXHRBreakpoint): Deleted.
(WI.DOMDebuggerManager.prototype._updateXHRBreakpoint.breakpointUpdated): Deleted.
(WI.DOMDebuggerManager.prototype._updateXHRBreakpoint): Deleted.
(WI.DOMDebuggerManager.prototype._resolveXHRBreakpoint): Deleted.
(WI.DOMDebuggerManager.prototype._saveXHRBreakpoints): Deleted.
(WI.DOMDebuggerManager.prototype._xhrBreakpointDisabledStateDidChange): Deleted.

  • UserInterface/Controllers/DebuggerManager.js:

(WI.DebuggerManager.prototype._pauseReasonFromPayload):

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WI.DebuggerSidebarPanel):
(WI.DebuggerSidebarPanel.prototype.willDismissPopover):
(WI.DebuggerSidebarPanel.prototype._addBreakpoint):
(WI.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
(WI.DebuggerSidebarPanel.prototype._addTreeElement):
(WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
(WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointClicked):

  • UserInterface/Views/NavigationSidebarPanel.js:

(WI.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):

  • UserInterface/Models/URLBreakpoint.js: Renamed from Source/WebInspectorUI/UserInterface/Models/XHRBreakpoint.js.
  • UserInterface/Views/URLBreakpointPopover.css: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointPopover.css.
  • UserInterface/Views/URLBreakpointPopover.js: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointPopover.js.
  • UserInterface/Views/URLBreakpointTreeElement.css: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointTreeElement.css.
  • UserInterface/Views/URLBreakpointTreeElement.js: Renamed from Source/WebInspectorUI/UserInterface/Views/XHRBreakpointTreeElement.js.
  • UserInterface/Base/Setting.js:

(WI.Setting.migrateValue): Added.

  • UserInterface/Main.html:
  • UserInterface/Test.html:
  • Localizations/en.lproj/localizedStrings.js:

LayoutTests:

  • inspector/dom-debugger/url-breakpoints.html: Copied from LayoutTests/inspector/dom-debugger/xhr-breakpoints.html.
  • inspector/dom-debugger/url-breakpoints-expected.txt: Copied from LayoutTests/inspector/dom-debugger/xhr-breakpoints-expected.txt.
  • inspector/dom-debugger/xhr-breakpoints.html: Deleted.
  • inspector/dom-debugger/xhr-breakpoints-expected.txt: Deleted.
  • inspector/dom-debugger/resources/dataFetch.json: Added.
2:39 PM Changeset in webkit [239702] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

Cleanup AudioTrackPrivateMediaStreamCocoa
https://bugs.webkit.org/show_bug.cgi?id=193208
<rdar://problem/42225870>

Reviewed by Youenn Fablet.

  • platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:

(WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable): Clear input and
output format descriptions after stopping the audio unit.

2:31 PM Changeset in webkit [239701] by achristensen@apple.com
  • 4 edits in trunk/Source/WebKit

Remove use of NetworkProcess::singleton in ServiceWorker code
https://bugs.webkit.org/show_bug.cgi?id=193209

Reviewed by Megan Gardner.

Use a member Ref<NetworkProcess> instead to avoid global singleton use.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::establishSWServerConnection):

  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::WebSWServerConnection):
(WebKit::WebSWServerConnection::~WebSWServerConnection):
(WebKit::WebSWServerConnection::startFetch):
(WebKit::WebSWServerConnection::postMessageToServiceWorker):
(WebKit::WebSWServerConnection::scheduleJobInServer):

  • NetworkProcess/ServiceWorker/WebSWServerConnection.h:
2:30 PM Changeset in webkit [239700] by achristensen@apple.com
  • 5 edits in trunk/Source/WebKit

Remove use of NetworkProcess::singleton in NetworkLoad/NetworkDataTask code
https://bugs.webkit.org/show_bug.cgi?id=193212

Reviewed by Andy Estes.

  • NetworkProcess/NetworkDataTaskBlob.cpp:

(WebKit::NetworkDataTaskBlob::NetworkDataTaskBlob):
(WebKit::NetworkDataTaskBlob::download):
(WebKit::NetworkDataTaskBlob::writeDownload):
(WebKit::NetworkDataTaskBlob::didFailDownload):
(WebKit::NetworkDataTaskBlob::didFinishDownload):

  • NetworkProcess/NetworkDataTaskBlob.h:
  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::NetworkLoad):
(WebKit::NetworkLoad::convertTaskToDownload):
(WebKit::NetworkLoad::didReceiveChallenge):
(WebKit::NetworkLoad::didReceiveResponse):

  • NetworkProcess/NetworkLoad.h:
2:29 PM Changeset in webkit [239699] by achristensen@apple.com
  • 10 edits in trunk/Source/WebKit

Remove use of NetworkProcess::singleton for downloads
https://bugs.webkit.org/show_bug.cgi?id=193207

Reviewed by Brady Eidson.

No change in behavior. The DownloadManager is now a member of the NetworkProcess instead of a static singleton.

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::Download):
(WebKit::Download::didReceiveChallenge):

  • NetworkProcess/Downloads/Download.h:
  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::startDownload):
(WebKit::DownloadManager::convertNetworkLoadToDownload):

  • NetworkProcess/Downloads/DownloadManager.h:

(WebKit::DownloadManager::client):

  • NetworkProcess/Downloads/PendingDownload.cpp:

(WebKit::PendingDownload::PendingDownload):
(WebKit::PendingDownload::messageSenderConnection):

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

(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::downloadManager):

  • NetworkProcess/NetworkProcess.h:
2:18 PM Changeset in webkit [239698] by Devin Rousso
  • 20 edits
    2 moves
    2 adds in trunk

Web Inspector: Network: show secure connection details per-request
https://bugs.webkit.org/show_bug.cgi?id=191539
<rdar://problem/45979891>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/Security.json:

Add Connection type.

  • inspector/protocol/Network.json:

Send Security.Connection information when request metrics become available.

Source/WebCore:

Test: http/tests/inspector/network/resource-security-connection.html

  • platform/network/NetworkLoadMetrics.h:

(WebCore::NetworkLoadMetrics:isolatedCopy):
(WebCore::NetworkLoadMetrics:clearNonTimingData):
(WebCore::NetworkLoadMetrics:operator==):
(WebCore::NetworkLoadMetrics:encode):
(WebCore::NetworkLoadMetrics:decode):

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::buildObjectForMetrics):

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebInspectorUI:

  • UserInterface/Models/Resource.js:

(WI.Resource):
(WI.Resource.prototype.get security): Added.
(WI.Resource.prototype.updateForResponse):
(WI.Resource.prototype.updateWithMetrics):
(WI.Resource.prototype.get responseSecurity): Deleted.

  • UserInterface/Views/ResourceSecurityContentView.js:

(WI.ResourceSecurityContentView):
(WI.ResourceSecurityContentView.prototype.initialLayout):
(WI.ResourceSecurityContentView.prototype.layout):
(WI.ResourceSecurityContentView.prototype._refreshConnectionSection): Added.
(WI.ResourceSecurityContentView.prototype._refreshCetificateSection):
(WI.ResourceSecurityContentView.prototype._handleResourceMetricsDidChange): Added.

  • UserInterface/Views/ResourceSecurityContentView.css:

(body[dir] .resource-security > section:matches(.connection, .certificate) > .details): Added.
(@media (prefers-dark-interface) body[dir] .resource-security > section:matches(.connection, .certificate) > .details): Added.
(body[dir] .resource-security > section.certificate > .details): Deleted.
(@media (prefers-dark-interface) body[dir] .resource-security > section.certificate > .details): Deleted.

  • Localizations/en.lproj/localizedStrings.js:

Source/WebKit:

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(stringForSSLProtocol): Added.
(stringForSSLCipher): Added.
(-[WKNetworkSessionDelegate URLSession:task:didFinishCollectingMetrics:]):

LayoutTests:

  • http/tests/inspector/network/resource-security-connection-expected.txt: Added.
  • http/tests/inspector/network/resource-security-connection.html: Added.
  • http/tests/inspector/network/resource-security-certificate-expected.txt: Added.
  • http/tests/inspector/network/resource-security-certificate.html: Added.
  • http/tests/inspector/network/resource-response-security-expected.txt: Deleted.
  • http/tests/inspector/network/resource-response-security.html: Deleted.
  • platform/gtk/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/wincairo/TestExpectations:
  • platform/wpe/TestExpectations:
2:13 PM Changeset in webkit [239697] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit

Web Inspector: Remote inspector can crash if attempting to navigate inspector page
https://bugs.webkit.org/show_bug.cgi?id=193204
<rdar://problem/45550428>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-07
Reviewed by Devin Rousso.

  • UIProcess/mac/RemoteWebInspectorProxyMac.mm:

(WebKit::RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow):

  • UIProcess/mac/WKInspectorViewController.mm:

(-[WKInspectorViewController webView:decidePolicyForNavigationAction:decisionHandler:]):

2:05 PM Changeset in webkit [239696] by Alan Coon
  • 1 copy in branches/safari-606.4.5.2-branch

New branch.

1:51 PM Changeset in webkit [239695] by Truitt Savell
  • 3 edits in trunk/LayoutTests

Update test expectations for platform/mac/media/audio-session-category-video-paused.html
https://bugs.webkit.org/show_bug.cgi?id=189680

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
  • platform/mac/TestExpectations:
1:47 PM Changeset in webkit [239694] by eric.carlson@apple.com
  • 16 edits
    2 adds in trunk

Deactivate audio session whenever possible
https://bugs.webkit.org/show_bug.cgi?id=193188
<rdar://problem/42678977>

Reviewed by Jer Noble.

Source/WebCore:

Test: media/deactivate-audio-session.html

  • platform/audio/AudioSession.cpp:

(WebCore::AudioSession::tryToSetActive):
(WebCore::AudioSession::tryToSetActiveInternal):

  • platform/audio/AudioSession.h:

(WebCore::AudioSession::isActive const):

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::removeSession):
(WebCore::deactivateAudioSession):
(WebCore::PlatformMediaSessionManager::shouldDeactivateAudioSession):
(WebCore::PlatformMediaSessionManager::setShouldDeactivateAudioSession):

  • platform/audio/PlatformMediaSessionManager.h:
  • platform/audio/ios/AudioSessionIOS.mm:

(WebCore::AudioSession::tryToSetActiveInternal):
(WebCore::AudioSession::tryToSetActive): Deleted.

  • platform/audio/mac/AudioSessionMac.cpp:

(WebCore::AudioSession::tryToSetActiveInternal):
(WebCore::AudioSession::tryToSetActive): Deleted.

  • testing/Internals.cpp:

(WebCore::Internals::audioSessionActive const):

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

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage):

LayoutTests:

  • TestExpectations: Skip the new test.
  • media/deactivate-audio-session-expected.txt: Added.
  • media/deactivate-audio-session.html: Added.
  • platform/ios/TestExpectations: Run the new test.
  • platform/mac-wk2/TestExpectations: Ditto.
12:31 PM Changeset in webkit [239693] by youenn@apple.com
  • 117 edits
    85 copies
    22 moves
    243 adds
    46 deletes in trunk/LayoutTests

Resync WPT fetch tests to 834eac4
https://bugs.webkit.org/show_bug.cgi?id=193125

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch: Resynced.
  • web-platform-tests/html/webappapis/atob/base64-expected.txt:

LayoutTests:

  • TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/ios-simulator/imported/w3c/web-platform-tests/fetch/content-type/response.window-expected.txt: Added.
  • platform/ios-wk1/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/abort/serviceworker-intercepted.https-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-init-stream.any-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-reset-attributes.https-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/content-type/script.window-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/304-update-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/cc-request-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/heuristic-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/invalidate-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/http-cache/status-expected.txt:
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/sec-metadata/embed.tentative.https.sub-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/sec-metadata/object.tentative.https.sub-expected.txt: Added.
  • platform/mac-wk1/imported/w3c/web-platform-tests/fetch/sec-metadata/serviceworker.tentative.https.sub-expected.txt: Added.
  • platform/mac/TestExpectations:
  • tests-options.json:
12:30 PM Changeset in webkit [239692] by ddkilzer@apple.com
  • 5 edits in trunk/Source/WebCore

PlatformECKey should use a std::unique_ptr
<https://webkit.org/b/193170>

Reviewed by Brent Fulgham.

Broadly:

  • Switch from using raw pointers to using std::unique_ptr<> to hold PlatformECKey.
  • Introduce PlatformECKeyContainer type to handle different std::unique_ptr<> types on each platform.
  • Get rid of custom CryptoKeyEC destructors since the std::unique_ptr<> handles that with a Deleter.
  • Initialize stack variables to nullptr.
  • crypto/gcrypt/CryptoKeyECGCrypt.cpp:

(WebCore::CryptoKeyEC::keySizeInBits const):
(WebCore::CryptoKeyEC::platformGeneratePair):
(WebCore::CryptoKeyEC::platformImportRaw):
(WebCore::CryptoKeyEC::platformImportJWKPublic):
(WebCore::CryptoKeyEC::platformImportJWKPrivate):
(WebCore::CryptoKeyEC::platformImportSpki):
(WebCore::CryptoKeyEC::platformImportPkcs8):
(WebCore::CryptoKeyEC::platformExportRaw const):
(WebCore::CryptoKeyEC::platformAddFieldElements const):
(WebCore::CryptoKeyEC::platformExportSpki const):
(WebCore::CryptoKeyEC::platformExportPkcs8 const):
(WebCore::CryptoKeyEC::~CryptoKeyEC): Deleted.

  • crypto/keys/CryptoKeyEC.cpp:

(WebCore::CryptoKeyEC::CryptoKeyEC):

  • crypto/keys/CryptoKeyEC.h:

(WebCore::CCECCryptorRefDeleter::operator() const):

  • crypto/mac/CryptoKeyECMac.cpp:

(WebCore::CryptoKeyEC::keySizeInBits const):
(WebCore::CryptoKeyEC::platformGeneratePair):
(WebCore::CryptoKeyEC::platformImportRaw):
(WebCore::CryptoKeyEC::platformExportRaw const):
(WebCore::CryptoKeyEC::platformImportJWKPublic):
(WebCore::CryptoKeyEC::platformImportJWKPrivate):
(WebCore::CryptoKeyEC::platformAddFieldElements const):
(WebCore::CryptoKeyEC::platformImportSpki):
(WebCore::CryptoKeyEC::platformExportSpki const):
(WebCore::CryptoKeyEC::platformImportPkcs8):
(WebCore::CryptoKeyEC::platformExportPkcs8 const):
(WebCore::CryptoKeyEC::~CryptoKeyEC): Deleted.

12:20 PM Changeset in webkit [239691] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebKit

[Cocoa] Add SPI to check if a WKWebView has an inspector frontend
https://bugs.webkit.org/show_bug.cgi?id=193162
<rdar://problem/24267143>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-07
Reviewed by Alex Christensen.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _hasInspectorFrontend]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::hasInspectorFrontend const):

12:20 PM Changeset in webkit [239690] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: "white" isn't recognized as a color keyword
https://bugs.webkit.org/show_bug.cgi?id=193173
<rdar://problem/47068595>

Reviewed by Joseph Pecoraro.

Attempt to parse "atom" token types as colors.

Display color picker only for color-aware properties. For instance,
display it for "color: white" but not for "-apple-pay-button-style: white".

  • UserInterface/Models/CSSKeywordCompletions.js:

(addKeywordsForName):
(WI.CSSKeywordCompletions.forProperty):
(WI.CSSKeywordCompletions.isColorAwareProperty):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype._renderValue):
(WI.SpreadsheetStyleProperty.prototype._addColorTokens):

12:10 PM Changeset in webkit [239689] by Antti Koivisto
  • 29 edits
    2 copies
    5 adds in trunk/Source

UI process side scrollbars for UI side compositing on Mac
https://bugs.webkit.org/show_bug.cgi?id=193106

Reviewed by Tim Horton.

Source/WebCore:

  • page/FrameView.cpp:

(WebCore::FrameView::paintScrollCorner):

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):

Pass scrollbar host layers and the dark appearance bit to the scrolling tree.

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::verticalScrollbarLayerForFrameView):
(WebCore::ScrollingCoordinator::horizontalScrollbarLayerForFrameView):

  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollableAreaParameters::ScrollableAreaParameters):
(WebCore::ScrollableAreaParameters::operator== const):

  • page/scrolling/ScrollingStateFrameScrollingNode.cpp:

(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
(WebCore::ScrollingStateFrameScrollingNode::setScrollbarLayers):

  • page/scrolling/ScrollingStateFrameScrollingNode.h:
  • page/scrolling/ScrollingTreeFrameScrollingNode.h:
  • page/scrolling/ScrollingTreeScrollingNode.h:

(WebCore::ScrollingTreeScrollingNode::scrollableAreaSize const):
(WebCore::ScrollingTreeScrollingNode::totalContentsSize const):
(WebCore::ScrollingTreeScrollingNode::useDarkAppearanceForScrollbars const):
(WebCore::ScrollingTreeScrollingNode::lastCommittedScrollPosition const):

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
  • platform/ScrollableArea.cpp:

(WebCore::ScrollableArea::useDarkAppearanceForScrollbars const):

Factor into a function as this is used in several places.

  • platform/ScrollableArea.h:
  • platform/mac/NSScrollerImpDetails.h:
  • platform/mac/ScrollAnimatorMac.mm:

(-[WebScrollerImpDelegate effectiveAppearanceForScrollerImp:]):

  • platform/mac/ScrollbarThemeMac.h:

Source/WebKit:

This patch implements Mac scrollbars on UI process side using the low level NSScrollerImp/NSScrollerPairImp
SPIs. With this patch scrollbars mostly work for the main frame and also render (but can't be interacted with)
for the subframes.

This is based on the similar code for web process side scrollbars in ScrollAnimatorMac. There is quite a bit of
copy code as there is no way to share nicely. One of these will eventually go away anyway.

  • Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:

(ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
(ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<ScrollableAreaParameters>::encode):
(IPC::ArgumentCoder<ScrollableAreaParameters>::decode):

  • UIProcess/RemoteLayerTree/RemoteLayerTreeNode.h:
  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:

(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
(WebKit::RemoteScrollingCoordinatorProxy::handleMouseEvent):

  • UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
  • UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:

(WebKit::RemoteScrollingTree::createScrollingTreeNode):
(WebKit::RemoteScrollingTree::handleMouseEvent):

  • UIProcess/RemoteLayerTree/RemoteScrollingTree.h:
  • UIProcess/RemoteLayerTree/mac: Added.
  • UIProcess/RemoteLayerTree/mac/ScrollerMac.h: Added.

Wraps NSScrollerImp for vertical or horizontal scrollbar.

(WebKit::ScrollerMac::pair):
(WebKit::ScrollerMac::orientation const):
(WebKit::ScrollerMac::hostLayer const):
(WebKit::ScrollerMac::scrollerImp):

  • UIProcess/RemoteLayerTree/mac/ScrollerMac.mm: Added.

(-[WKScrollbarPartAnimation initWithScroller:featureToAnimate:animateFrom:animateTo:duration:]):
(-[WKScrollbarPartAnimation startAnimation]):
(-[WKScrollbarPartAnimation setStartValue:]):
(-[WKScrollbarPartAnimation setEndValue:]):
(-[WKScrollbarPartAnimation setCurrentProgress:]):
(-[WKScrollbarPartAnimation invalidate]):
(-[WKScrollerImpDelegate initWithScroller:]):
(-[WKScrollerImpDelegate cancelAnimations]):
(-[WKScrollerImpDelegate scrollerPair]):
(-[WKScrollerImpDelegate convertRectToBacking:]):
(-[WKScrollerImpDelegate convertRectFromBacking:]):
(-[WKScrollerImpDelegate layer]):
(-[WKScrollerImpDelegate mouseLocationInScrollerForScrollerImp:]):
(-[WKScrollerImpDelegate convertRectToLayer:]):
(-[WKScrollerImpDelegate shouldUseLayerPerPartForScrollerImp:]):
(-[WKScrollerImpDelegate effectiveAppearanceForScrollerImp:]):
(-[WKScrollerImpDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
(-[WKScrollerImpDelegate scrollerImp:animateKnobAlphaTo:duration:]):
(-[WKScrollerImpDelegate scrollerImp:animateTrackAlphaTo:duration:]):
(-[WKScrollerImpDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
(-[WKScrollerImpDelegate scrollerImp:animateExpansionTransitionWithDuration:]):
(-[WKScrollerImpDelegate scrollerImp:overlayScrollerStateChangedTo:]):
(-[WKScrollerImpDelegate invalidate]):
(WebKit::ScrollerMac::ScrollerMac):
(WebKit::ScrollerMac::~ScrollerMac):
(WebKit::ScrollerMac::attach):
(WebKit::ScrollerMac::setHostLayer):
(WebKit::ScrollerMac::updatePosition):
(WebKit::ScrollerMac::convertFromContent const):

  • UIProcess/RemoteLayerTree/mac/ScrollerPairMac.h: Added.

(WebKit::ScrollerPairMac::verticalScroller):
(WebKit::ScrollerPairMac::horizontalScroller):
(WebKit::ScrollerPairMac::scrollerImpPair):
(WebKit::ScrollerPairMac::lastKnownMousePosition const):

  • UIProcess/RemoteLayerTree/mac/ScrollerPairMac.mm: Added.

Wraps NSScrollerPairImp and owns the vertical and horizontal scrollers.

(-[WKScrollerImpPairDelegate initWithScrollerPair:]):
(-[WKScrollerImpPairDelegate invalidate]):
(-[WKScrollerImpPairDelegate contentAreaRectForScrollerImpPair:]):
(-[WKScrollerImpPairDelegate inLiveResizeForScrollerImpPair:]):
(-[WKScrollerImpPairDelegate mouseLocationInContentAreaForScrollerImpPair:]):
(-[WKScrollerImpPairDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
(-[WKScrollerImpPairDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
(-[WKScrollerImpPairDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
(WebKit::ScrollerPairMac::ScrollerPairMac):
(WebKit::ScrollerPairMac::~ScrollerPairMac):
(WebKit::ScrollerPairMac::handleWheelEvent):
(WebKit::ScrollerPairMac::handleMouseEvent):
(WebKit::ScrollerPairMac::updatePositions):
(WebKit::ScrollerPairMac::contentsSize const):
(WebKit::ScrollerPairMac::visibleContentsRect const):
(WebKit::ScrollerPairMac::useDarkAppearance const):

  • UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp: Added.

Special node for UI side Mac scrolling. Owns ScrollerPairMac instance.

(WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::ScrollingTreeFrameScrollingNodeRemoteMac):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::~ScrollingTreeFrameScrollingNodeRemoteMac):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::create):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::commitStateBeforeChildren):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::setScrollLayerPosition):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::handleWheelEvent):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::handleMouseEvent):
(WebKit::ScrollingTreeFrameScrollingNodeRemoteMac::scrollingTree const):

  • UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h: Added.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handleMouseEvent):

  • WebKit.xcodeproj/project.pbxproj:
11:59 AM Changeset in webkit [239688] by eric.carlson@apple.com
  • 4 edits in trunk

A MediaTime timescale must never be zero
https://bugs.webkit.org/show_bug.cgi?id=193156
<rdar://problem/32504501>

Reviewed by Jer Noble.

Source/WTF:

  • wtf/MediaTime.cpp:

(WTF::greatestCommonDivisor): ASSERT if either parameter or return value is zero.
(WTF::MediaTime::MediaTime): Create +/- infinity if passed zero timescale.
(WTF::MediaTime::createWithFloat): Ditto.
(WTF::MediaTime::createWithDouble): Ditto.
(WTF::MediaTime::setTimeScale): Ditto.

Tools:

  • TestWebKitAPI/Tests/WTF/MediaTime.cpp:

(TestWebKitAPI::TEST): Add tests for zero timescale.

11:47 AM Changeset in webkit [239687] by Alan Coon
  • 1 copy in branches/safari-607-branch

New branch.

11:25 AM Changeset in webkit [239686] by BJ Burg
  • 2 edits in trunk/Source/WebKit

Unwanted page navigation after showing & dismissing contextual menu with control-click
https://bugs.webkit.org/show_bug.cgi?id=192912
<rdar://problem/46318508>

Reviewed by Timothy Hatcher.

After the conversion to use a mouse event queue, this behavior was observed rarely, especially
when CPU is under load and lots of things are going on in the page. In other words, it's racy.

Based on NSEvent logging, it seems that when the system is under load, we simply take too long
to enter the nested runloop that AppKit uses to handle events when the context menu is present.
AppKit doesn't care whether or not the MouseDown triggered a nested runloop; on my machine it delivers
the MouseUp event about 130ms after the MouseDown event. If we haven't show the context menu in
that time, then the MouseUp is enqueued as a normal mouse event. If the Ctrl-click is on a link,
then the MouseUp will be interpreted by EventHandler as a click event, which in the simplest case
will initiate a main frame navigation. When the context menu is dismissed and the nested runloop
is torn down, the navigation IPC message is handled in UIProcess and the page navigates away.

We can't do much to change AppKit's inherently racy behavior, but we can avoid processing
mouse events that are delivered whilst we are processing the context menu-initiating event.
From the WebProcess point of view, there is no race anymore because it does not receive the
MouseUp event.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::showContextMenu):
If new events come in, drop them on the floor. Based on testing, the nested runloop will discard
the unpaired MouseUp event anyway, so this does not cause a change in behavior.

10:50 AM Changeset in webkit [239685] by Wenson Hsieh
  • 12 edits
    4 adds in trunk

Native caret shows up alongside the page's caret when requesting desktop site on jsfiddle.net
https://bugs.webkit.org/show_bug.cgi?id=193180
<rdar://problem/45971041>

Reviewed by Tim Horton.

Source/WebCore:

Adjust a method on RenderObject to additionally detect when the RenderObject is inside of an overflow: hidden
container that is also empty. See WebKit ChangeLog for more details.

Test: editing/selection/ios/hide-selection-in-empty-overflow-hidden-container.html

editing/selection/ios/show-selection-in-empty-overflow-hidden-document.html

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::isTransparentOrFullyClippedRespectingParentFrames const):
(WebCore::RenderObject::isTransparentRespectingParentFrames const): Deleted.

  • rendering/RenderObject.h:

Source/WebKit:

JSFiddle uses CodeMirror; CodeMirror's editor works by capturing keystrokes and input in a hidden textarea
element, and then drawing its own selection caret using web content. This textarea is hidden by being placed
underneath an empty div with overflow: hidden;.

When requesting desktop site on iOS, both CodeMirror's caret and the native iOS caret are shown because iOS
selection UI consists of native views overlaid on the page, whereas on macOS, the entire textarea (along with
the caret) are occluded by the hidden overflow container. Additionally, various iOS behaviors related to
selection and editing, such as zooming to reveal the focused element and showing the platform callout bar, are
active when focusing this hidden editable area; these don't work as intended, and just interfere with the page's
custom editing UI.

To fix this, we augment the text interaction suppression mechanism added in r238146 to detect when the focused
element is in an empty overflow: hidden container, and bail out of native text editing behaviors.

  • Shared/EditorState.cpp:

(WebKit::EditorState::PostLayoutData::encode const):
(WebKit::EditorState::PostLayoutData::decode):

  • Shared/EditorState.h:

Rename elementIsTransparent to elementIsTransparentOrFullyClipped.

  • Shared/FocusedElementInformation.cpp:

(WebKit::FocusedElementInformation::encode const):
(WebKit::FocusedElementInformation::decode):

  • Shared/FocusedElementInformation.h:
  • UIProcess/ios/WKContentViewInteraction.h:

Rename FocusedElementIsTransparent to FocusedElementIsTransparentOrFullyClipped.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _zoomToRevealFocusedElement]):
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _elementDidBlur]):

Make an additional tweak here to only stop suppressing text interaction assistant in -_elementDidBlur if we're
not also in the middle of changing the focused element. Without this, focusing a hidden editable element while
another hidden editable element is currently focused causes us to zoom to reveal the newly focused hidden
editable element, when we should be avoiding this behavior.

(-[WKContentView _updateChangedSelection:]):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::platformEditorState const):
(WebKit::WebPage::getFocusedElementInformation):

LayoutTests:

  • editing/selection/ios/hide-selection-in-empty-overflow-hidden-container-expected.txt: Added.
  • editing/selection/ios/hide-selection-in-empty-overflow-hidden-container.html: Added.

Add a layout test to verify that focusing a hidden editable element underneath an empty container with
overflow: hidden doesn't cause platform selection UI to appear.

  • editing/selection/ios/show-selection-in-empty-overflow-hidden-document-expected.txt: Added.
  • editing/selection/ios/show-selection-in-empty-overflow-hidden-document.html: Added.

Add a layout test to verify that native selection UI shows up when the document element is made empty with
overflow: hidden, but the focused elements are still visible.

10:46 AM Changeset in webkit [239684] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Mark compositing/masks/compositing-clip-path-change-no-repaint.html flakey for Mojave WK1
https://bugs.webkit.org/show_bug.cgi?id=189753

Unreviewed Test Gardening

  • platform/mac-wk1/TestExpectations:
10:36 AM Changeset in webkit [239683] by achristensen@apple.com
  • 9 edits in trunk/Source/WebKit

Move identifierBase from SessionTracker to NetworkProcess/WebProcess
https://bugs.webkit.org/show_bug.cgi?id=193201

Reviewed by Tim Horton.

No change in behavior. This just reduces process-global state.

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::uiProcessBundleIdentifier const):

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):

  • NetworkProcess/mac/RemoteNetworkingContext.mm:

(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

  • Shared/SessionTracker.cpp:

(WebKit::identifierBase): Deleted.
(WebKit::SessionTracker::getIdentifierBase): Deleted.
(WebKit::SessionTracker::setIdentifierBase): Deleted.

  • Shared/SessionTracker.h:
  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:

(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
(WebKit::WebFrameNetworkingContext::sourceApplicationIdentifier const):

  • WebProcess/WebProcess.h:

(WebKit::WebProcess::uiProcessBundleIdentifier const):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

10:04 AM Changeset in webkit [239682] by Alan Coon
  • 7 edits in tags/Safari-607.1.18.2/Source

Versioning.

10:03 AM Changeset in webkit [239681] by Alan Coon
  • 4 edits
    2 adds in tags/Safari-607.1.18.2

Cherry-pick r239591. rdar://problem/47014944

REGRESSION (r239306): Don't disable font smoothing in transparent layers on macOS Mojave and later
https://bugs.webkit.org/show_bug.cgi?id=193095
<rdar://problem/47014944>

Reviewed by Zalan Bujtas.

Source/WebCore:

In r239306 we stopped making CALayers for font-smoothed text when not necessary on macOS Mojave
and later. However, we still turned off smoothing for non-opaque layers (setShouldSmoothFonts(false)),
which continues to affect the appearance of text.

Fix by only calling setShouldSmoothFonts(false) when the OS supports font smoothing.

Test: compositing/contents-format/subpixel-antialiased-text.html

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: (WebCore::PlatformCALayer::drawLayerContents):

LayoutTests:

A ref test that compares the rendering of layer and non-layer text with smoothing and antialiasing.

  • compositing/contents-format/subpixel-antialiased-text-expected.html: Added.
  • compositing/contents-format/subpixel-antialiased-text.html: Added.
  • platform/mac/TestExpectations:

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

10:03 AM Changeset in webkit [239680] by achristensen@apple.com
  • 23 edits in trunk/Source/WebKit

Reduce use of NetworkProcess::singleton
https://bugs.webkit.org/show_bug.cgi?id=193197

Reviewed by Brady Eidson.

Pass it around as a Ref<NetworkProcess> as a step towards reducing global state.
Soup's WebFrameNetworkingContext no longer makes a NetworkSession like all other ports
because networking is no longer done in the WebProcess.

  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.cpp:

(WebKit::WebIDBConnectionToClient::create):
(WebKit::WebIDBConnectionToClient::WebIDBConnectionToClient):
(WebKit::WebIDBConnectionToClient::disconnectedFromWebProcess):
(WebKit::WebIDBConnectionToClient::deleteDatabase):
(WebKit::WebIDBConnectionToClient::openDatabase):
(WebKit::WebIDBConnectionToClient::abortTransaction):
(WebKit::WebIDBConnectionToClient::commitTransaction):
(WebKit::WebIDBConnectionToClient::didFinishHandlingVersionChangeTransaction):
(WebKit::WebIDBConnectionToClient::createObjectStore):
(WebKit::WebIDBConnectionToClient::deleteObjectStore):
(WebKit::WebIDBConnectionToClient::renameObjectStore):
(WebKit::WebIDBConnectionToClient::clearObjectStore):
(WebKit::WebIDBConnectionToClient::createIndex):
(WebKit::WebIDBConnectionToClient::deleteIndex):
(WebKit::WebIDBConnectionToClient::renameIndex):
(WebKit::WebIDBConnectionToClient::putOrAdd):
(WebKit::WebIDBConnectionToClient::getRecord):
(WebKit::WebIDBConnectionToClient::getAllRecords):
(WebKit::WebIDBConnectionToClient::getCount):
(WebKit::WebIDBConnectionToClient::deleteRecord):
(WebKit::WebIDBConnectionToClient::openCursor):
(WebKit::WebIDBConnectionToClient::iterateCursor):
(WebKit::WebIDBConnectionToClient::establishTransaction):
(WebKit::WebIDBConnectionToClient::databaseConnectionPendingClose):
(WebKit::WebIDBConnectionToClient::databaseConnectionClosed):
(WebKit::WebIDBConnectionToClient::abortOpenAndUpgradeNeeded):
(WebKit::WebIDBConnectionToClient::didFireVersionChangeEvent):
(WebKit::WebIDBConnectionToClient::openDBRequestCancelled):
(WebKit::WebIDBConnectionToClient::confirmDidCloseFromServer):
(WebKit::WebIDBConnectionToClient::getAllDatabaseNames):

  • NetworkProcess/IndexedDB/WebIDBConnectionToClient.h:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::create):
(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::createSocketStream):
(WebKit::NetworkConnectionToWebProcess::prefetchDNS):
(WebKit::NetworkConnectionToWebProcess::startDownload):
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
(WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):
(WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer):
(WebKit::NetworkConnectionToWebProcess::establishSWServerConnection):

  • NetworkProcess/NetworkConnectionToWebProcess.h:

(WebKit::NetworkConnectionToWebProcess::networkProcess):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::singleton):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::fetchDiskCacheEntries):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::clearDiskCacheEntries):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::getNetworkProcessStatistics):
(WebKit::NetworkProcess::idbServer):

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

(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::convertToDownload):
(WebKit::NetworkResourceLoader::isAlwaysOnLoggingAllowed const):

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::create):
(WebKit::NetworkSession::NetworkSession):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::networkProcess):

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

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::isAlwaysOnLoggingAllowed const):

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::clearDiskCache):

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(-[WKNetworkSessionDelegate URLSession:task:didCompleteWithError:]):
(-[WKNetworkSessionDelegate URLSession:downloadTask:didFinishDownloadingToURL:]):
(-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):
(-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]):
(WebKit::NetworkSessionCocoa::create):
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • NetworkProcess/curl/NetworkSessionCurl.cpp:

(WebKit::NetworkSessionCurl::NetworkSessionCurl):

  • NetworkProcess/curl/NetworkSessionCurl.h:
  • NetworkProcess/mac/RemoteNetworkingContext.mm:

(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

  • NetworkProcess/soup/NetworkSessionSoup.cpp:

(WebKit::NetworkSessionSoup::NetworkSessionSoup):

  • NetworkProcess/soup/NetworkSessionSoup.h:
9:59 AM Changeset in webkit [239679] by Alan Coon
  • 1 copy in tags/Safari-607.1.18.2

New tag.

9:57 AM Changeset in webkit [239678] by Alan Coon
  • 4 edits
    2 deletes in tags/Safari-607.1.18.1

Revert r239677. rdar://problem/47014944

9:50 AM Changeset in webkit [239677] by Alan Coon
  • 4 edits
    2 adds in tags/Safari-607.1.18.1

Cherry-pick r239591. rdar://problem/47014944

REGRESSION (r239306): Don't disable font smoothing in transparent layers on macOS Mojave and later
https://bugs.webkit.org/show_bug.cgi?id=193095
<rdar://problem/47014944>

Reviewed by Zalan Bujtas.

Source/WebCore:

In r239306 we stopped making CALayers for font-smoothed text when not necessary on macOS Mojave
and later. However, we still turned off smoothing for non-opaque layers (setShouldSmoothFonts(false)),
which continues to affect the appearance of text.

Fix by only calling setShouldSmoothFonts(false) when the OS supports font smoothing.

Test: compositing/contents-format/subpixel-antialiased-text.html

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: (WebCore::PlatformCALayer::drawLayerContents):

LayoutTests:

A ref test that compares the rendering of layer and non-layer text with smoothing and antialiasing.

  • compositing/contents-format/subpixel-antialiased-text-expected.html: Added.
  • compositing/contents-format/subpixel-antialiased-text.html: Added.
  • platform/mac/TestExpectations:

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

9:06 AM Changeset in webkit [239676] by youenn@apple.com
  • 3 edits
    1 move in trunk/Tools

API test broken: TestWebKitAPI.WebKit.CustomDataStorePathsVersusCompletionHandlers
https://bugs.webkit.org/show_bug.cgi?id=193175

Reviewed by Chris Dumez.

Updated API test as we bumped the SW schema to version 4.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-4.sqlite3: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-3.sqlite3.
  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):

8:18 AM Changeset in webkit [239675] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

[LFC][BFC] Margin collapsing should not be limited to in-flow non-replaced boxes.
https://bugs.webkit.org/show_bug.cgi?id=193183

Reviewed by Antti Koivisto.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::complicatedCases):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):

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

(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):

  • layout/blockformatting/BlockFormattingContextQuirks.cpp:

(WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):

8:16 AM Changeset in webkit [239674] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][BFC] Move MarginCollapse from BlockFormattingContext::Geometry to BlockFormattingContext
https://bugs.webkit.org/show_bug.cgi?id=193181

Reviewed by Antti Koivisto.

This is in preparation to share margin collapsing across all boxes in block formatting context.

  • layout/blockformatting/BlockFormattingContext.h:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::computedNonCollapsedMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::computedNonCollapsedMarginAfter):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::nonCollapsedMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::nonCollapsedMarginAfter):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedMarginBeforeFromFirstChild):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedMarginAfterFromLastChild):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSibling):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithNextSibling):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfter):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBefore): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginAfter): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginBefore): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginAfter): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginBeforeFromFirstChild): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginAfterFromLastChild): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginBefore): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithPreviousSibling): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithNextSibling): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginsCollapseThrough): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBefore): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter): Deleted.

8:04 AM Changeset in webkit [239673] by Claudio Saavedra
  • 3 edits in trunk/LayoutTests

[WPE][GTK] Skip css-painting-api tests

Unreviewed gardening. CSS_PAINTING_API is disabled by default.
Also remove a few tests that were individually marked as failing
for css-typedom since we already skipped the whole directory.

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
7:39 AM Changeset in webkit [239672] by Claudio Saavedra
  • 3 edits in trunk/LayoutTests

[WPE][GTK] Skip css-typedom tests

Unreviewed gardening. CSS_TYPED_OM is disabled by default.

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
5:56 AM Changeset in webkit [239671] by achristensen@apple.com
  • 22 edits in trunk/Source/WebKit

Modernize CacheModel and disk cache fetching and clearing
https://bugs.webkit.org/show_bug.cgi?id=193164

Reviewed by Joseph Pecoraro.

fetchDiskCacheEntries and clearDiskCacheEntries now use an early-return model.
CacheModel is now an enum class.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::fetchDiskCacheEntries):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::clearDiskCacheEntries):
(WebKit::NetworkProcess::setCacheModel):

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

(WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord const):

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::clearDiskCache):

  • Shared/CacheModel.cpp:

(WebKit::calculateMemoryCacheSizes):
(WebKit::calculateURLCacheSizes):

  • Shared/CacheModel.h:

(): Deleted.

  • UIProcess/API/APIProcessPoolConfiguration.cpp:

(API::ProcessPoolConfiguration::createWithLegacyOptions):

  • UIProcess/API/APIProcessPoolConfiguration.h:
  • UIProcess/API/C/WKAPICast.h:

(WebKit::toCacheModel):
(WebKit::toAPI):

  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:

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

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::setCacheModel):
(WebKit::WebProcess::clearResourceCaches):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
2:42 AM Changeset in webkit [239670] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

[WPE] Use Widget bounds for PlatformScreen rectangle information
https://bugs.webkit.org/show_bug.cgi?id=193190

Reviewed by Philippe Normand.

Provide a better screen area estimate in screenRect() and
screenAvailableRect() return values than the current 1240x640 value by
using the Widget's bounds rectangle.

This approach is only factually correct when the Widget-associated view
is displayed in fullscreen, but it provides a better estimate even when
displayed in any other case as well. WPE doesn't provide specific API
that could enable the embedding environment to provide this information.

  • platform/wpe/PlatformScreenWPE.cpp:

(WebCore::screenRect): Return bounds of the Widget object.
(WebCore::screenAvailableRect): Relay the call to screenRect().

2:41 AM Changeset in webkit [239669] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebCore

Make Gradient::gradientSpaceTransform(), Pattern::patternSpaceTransform() methods const
https://bugs.webkit.org/show_bug.cgi?id=193189

Reviewed by Philippe Normand.

The transform getter methods on the Gradient and Pattern classes both
return const references to the transform objects, and don't modify any
internal state. They should be marked const accordingly, allowing
invocations of these two methods through const references to Gradient
and Pattern objects.

  • platform/graphics/Gradient.h:

(WebCore::Gradient::gradientSpaceTransform): Now const.

  • platform/graphics/Pattern.h:

(WebCore::Pattern::patternSpaceTransform): Now const.

2:40 AM Changeset in webkit [239668] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(r239636): ImageDecoder::setEncodedDataStatusChangeCallback() can be called on a null decoder
https://bugs.webkit.org/show_bug.cgi?id=193187

Reviewed by Philippe Normand.

  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::ensureDecoderAvailable): Bail before calling the
setEncodedDataStatusChangeCallback() method when the returned
ImageDecoder object is null.

Jan 6, 2019:

10:42 PM Changeset in webkit [239667] by zandobersek@gmail.com
  • 5 edits
    12 adds
    1 delete in trunk/Source/WebCore

[Nicosia] Take over CoordinatedGraphics-named implementation of async scrolling classes
https://bugs.webkit.org/show_bug.cgi?id=193133

Reviewed by Michael Catanzaro.

Move the CoordinatedGraphics-specific files under
page/scrolling/coordinatedgraphics/ to page/scrolling/nicosia/, along
with renaming the files and classes accordingly. Implementation will
only depend on the Nicosia-specific layer structure and is not specific
to the CoordinatedGraphics system.

  • PlatformPlayStation.cmake:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp.
  • page/scrolling/nicosia/ScrollingCoordinatorNicosia.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h.
  • page/scrolling/nicosia/ScrollingStateNodeNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingStateNodeCoordinatedGraphics.cpp.
  • page/scrolling/nicosia/ScrollingTreeFixedNode.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.cpp.
  • page/scrolling/nicosia/ScrollingTreeFixedNode.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.h.
  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFrameScrollingNodeCoordinatedGraphics.cpp.
  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeFrameScrollingNodeCoordinatedGraphics.h.
  • page/scrolling/nicosia/ScrollingTreeNicosia.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeCoordinatedGraphics.cpp.
  • page/scrolling/nicosia/ScrollingTreeNicosia.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeCoordinatedGraphics.h.
  • page/scrolling/nicosia/ScrollingTreeStickyNode.cpp: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.cpp.
  • page/scrolling/nicosia/ScrollingTreeStickyNode.h: Renamed from Source/WebCore/page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.h.
  • platform/TextureMapper.cmake:
7:27 PM Changeset in webkit [239666] by Fujii Hironori
  • 7 edits in trunk/Tools

[Win][Clang] Fix compilation warnings of MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=193029

Reviewed by Ross Kirsling.

  • MiniBrowser/win/MiniBrowserWebHost.h: Removed unused m_oldFont

and m_URLBarFont. Reorder member variables to fix -Wreorder
warning.

  • MiniBrowser/win/PageLoadTestClient.cpp:

(PageLoadTestClient::PageLoadTestClient): Reorder the member initializer list.

  • MiniBrowser/win/PageLoadTestClient.h: Removed 'virtual' of

pageLoadStartedAtTime and pageLoadEndedAtTime. Removed unused
m_currentURLIndex.

  • MiniBrowser/win/WebKitBrowserWindow.cpp:

(WebKitBrowserWindow::WebKitBrowserWindow): Initialize
navigationClient with '{ }' to fix the missing field warning.

  • MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:

(initDocStruct): Changed the argument type docname to const.

6:08 PM Changeset in webkit [239665] by jiewen_tan@apple.com
  • 18 edits
    1 copy
    1 move
    6 adds in trunk

[WebAuthN] Import U2F command/response converters from Chromium
https://bugs.webkit.org/show_bug.cgi?id=193150
<rdar://problem/47054028>

Reviewed by Brent Fulgham.

Source/WebCore:

This patch imports Chromium's U2F command/response converters:
https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-client-to-authenticator-protocol-v2.0-id-20180227.html#u2f-interoperability

  1. It directly imports the following files and suit them to WebKit's coding style:

https://cs.chromium.org/chromium/src/device/fido/u2f_command_constructor.cc?l=1&rcl=db624110317d01efa78cd32e7be1524190e1beb0
https://cs.chromium.org/chromium/src/device/fido/u2f_command_constructor.h?rcl=db624110317d01efa78cd32e7be1524190e1beb0
https://cs.chromium.org/chromium/src/device/fido/u2f_command_constructor_unittest.cc?rcl=db624110317d01efa78cd32e7be1524190e1beb0

  1. It gathers the following methods into U2fResponseConverter:

AuthenticatorMakeCredentialResponse::CreateFromU2fRegisterResponse()
AuthenticatorGetAssertionResponse::CreateFromU2fSignResponse()

  1. It also updates FidoConstants.h, FidoTestData.h and CtapResponseTest.cpp accordingly.

Besides importing stuff from Chroimum, it also gathers a bunch of constants and helper functions into WebAuthenticationConstants.h
and WebAuthenticationUtils.h. It also fixes Bug 183534: 2) and 7).

Covered by API tests.

  • Modules/webauthn/AuthenticatorCoordinator.cpp:

(WebCore::AuthenticatorCoordinatorInternal::produceClientDataJsonHash):

  • Modules/webauthn/WebAuthenticationConstants.h: Copied from Source/WebCore/Modules/webauthn/COSEConstants.h.
  • Modules/webauthn/WebAuthenticationUtils.cpp: Added.

(WebCore::convertBytesToVector):
(WebCore::produceRpIdHash):
(WebCore::encodeES256PublicKeyAsCBOR):
(WebCore::buildAttestedCredentialData):
(WebCore::buildAuthData):
(WebCore::buildAttestationObject):

  • Modules/webauthn/WebAuthenticationUtils.h: Renamed from Source/WebCore/Modules/webauthn/COSEConstants.h.
  • Modules/webauthn/fido/DeviceResponseConverter.cpp:

(fido::getCredentialId):
(fido::readCTAPGetInfoResponse):

  • Modules/webauthn/fido/FidoConstants.h:
  • Modules/webauthn/fido/U2fCommandConstructor.cpp: Added.

(fido::WebCore::constructU2fRegisterCommand):
(fido::WebCore::constructU2fSignCommand):
(fido::isConvertibleToU2fRegisterCommand):
(fido::isConvertibleToU2fSignCommand):
(fido::convertToU2fRegisterCommand):
(fido::convertToU2fCheckOnlySignCommand):
(fido::convertToU2fSignCommand):
(fido::constructBogusU2fRegistrationCommand):

  • Modules/webauthn/fido/U2fCommandConstructor.h: Added.
  • Modules/webauthn/fido/U2fResponseConverter.cpp: Added.

(fido::WebCore::extractECPublicKeyFromU2fRegistrationResponse):
(fido::WebCore::extractCredentialIdFromU2fRegistrationResponse):
(fido::WebCore::createAttestedCredentialDataFromU2fRegisterResponse):
(fido::WebCore::parseX509Length):
(fido::WebCore::createFidoAttestationStatementFromU2fRegisterResponse):
(fido::readU2fRegisterResponse):
(fido::readFromU2fSignResponse):

  • Modules/webauthn/fido/U2fResponseConverter.h: Added.
  • Modules/webgpu/WebGPUCommandBuffer.cpp:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

Moves helper functions to WebAuthenticationUtils.

  • UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:

(WebKit::LocalAuthenticatorInternal::produceHashSet):
(WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested):
(): Deleted.
(WebKit::LocalAuthenticatorInternal::buildAuthData): Deleted.

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:

(WebKit::MockHidConnection::feedReports):

Tools:

Adds API tests.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp:

(TestWebKitAPI::getTestAttestedCredentialDataBytes):
(TestWebKitAPI::getTestAuthenticatorDataBytes):
(TestWebKitAPI::getTestAttestationObjectBytes):
(TestWebKitAPI::getTestSignResponse):
(TestWebKitAPI::getTestU2fRegisterResponse):
(TestWebKitAPI::TEST):
(TestWebKitAPI::convertToVector): Deleted.

  • TestWebKitAPI/Tests/WebCore/FidoTestData.h:
  • TestWebKitAPI/Tests/WebCore/U2fCommandConstructorTest.cpp: Added.

(TestWebKitAPI::constructMakeCredentialRequest):
(TestWebKitAPI::constructGetAssertionRequest):
(TestWebKitAPI::TEST):

LayoutTests:

Fixes Bug 183534:
7) Change little endian bytes (ARM and x86 default) to big endian as requested by the spec.

  • http/wpt/webauthn/public-key-credential-create-success-hid.https.html:
  • http/wpt/webauthn/public-key-credential-get-success-hid.https.html:
  • http/wpt/webauthn/resources/util.js:
6:05 PM Changeset in webkit [239664] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Leak of WTF::Function objects in WebCore::CryptoKeyRSA::generatePair() (64-80 bytes each) in com.apple.WebKit.WebContent running WebKit layout tests
<https://webkit.org/b/193177>
<rdar://problem/47072196>

Reviewed by Saam Barati.

  • crypto/mac/CryptoKeyRSAMac.cpp:

(WebCore::CryptoKeyRSA::generatePair): Fix the leak by changing
raw pointers to heap-allocated block variables to hold the
WTF::Function objects until they are consumed within the block
passed to dispatch_async(). The
block variables act like
captured variables in a C++ lambda and have the same lifetime as
the block that they are captured in. Note that we would have to
convert the source file from C++ to Objective-C++ to use a C++
lambda functor with dispatch_async(), which creates its own
issue because the comipiler requires a copy constructor to
convert the C++ lambda to a block functor, but the copy
constructor for the C++ lambda is implicitly deleted because the
WTF::Function copy constructor is explicitly deleted. Whew!

9:15 AM Changeset in webkit [239663] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[WPE][GTK] Building with ENABLE_VIDEO=OFF fails trying to use Document MediaPlayback functions.
https://bugs.webkit.org/show_bug.cgi?id=193174

Patch by Pablo Saavedra <Pablo Saavedra> on 2019-01-06
Reviewed by Michael Catanzaro.

  • page/Page.cpp:

(WebCore::Page::stopAllMediaPlayback):
(WebCore::Page::suspendAllMediaPlayback):
(WebCore::Page::resumeAllMediaPlayback):

Jan 5, 2019:

9:05 PM Changeset in webkit [239662] by ddkilzer@apple.com
  • 4 edits in trunk/Source/WebCore

Leak of two CCRSACryptorRef (4.0 Kbytes/1 page each) in com.apple.WebKit.WebContent running WebKit layout tests
<https://webkit.org/b/193154>
<rdar://problem/47052993>

Reviewed by Brent Fulgham.

Broadly:

  • Fix leaks by switching from using raw pointers to using std::unique_ptr<>.
  • Introduce PlatformRSAKeyContainer type to handle different std::unique_ptr<> on each platform.
  • Get rid of custom CryptoKeyRSA destructors since the std::unique_ptr<> handles that with a Deleter.
  • Initialize stack variables to nullptr.
  • crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:

(WebCore::CryptoKeyRSA::create):
(WebCore::CryptoKeyRSA::CryptoKeyRSA):
(WebCore::CryptoKeyRSA::keySizeInBits const):
(WebCore::CryptoKeyRSA::generatePair):
(WebCore::CryptoKeyRSA::importSpki):
(WebCore::CryptoKeyRSA::importPkcs8):
(WebCore::CryptoKeyRSA::exportSpki const):
(WebCore::CryptoKeyRSA::exportPkcs8 const):
(WebCore::CryptoKeyRSA::algorithm const):
(WebCore::CryptoKeyRSA::exportData const):
(WebCore::CryptoKeyRSA::~CryptoKeyRSA): Deleted.

  • crypto/keys/CryptoKeyRSA.h:

(WebCore::CCRSACryptorRefDeleter::operator() const):

  • crypto/mac/CryptoKeyRSAMac.cpp:

(WebCore::getPublicKeyComponents):
(WebCore::getPrivateKeyComponents):
(WebCore::CryptoKeyRSA::CryptoKeyRSA):
(WebCore::CryptoKeyRSA::create):
(WebCore::CryptoKeyRSA::exportData const):
(WebCore::CryptoKeyRSA::generatePair):
(WebCore::CryptoKeyRSA::importSpki):
(WebCore::CryptoKeyRSA::importPkcs8):
(WebCore::CryptoKeyRSA::~CryptoKeyRSA): Deleted.

7:54 PM Changeset in webkit [239661] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Incorrect clipping across compositing boundary.
https://bugs.webkit.org/show_bug.cgi?id=193172
<rdar://problem/44693008>

Reviewed by Simon Fraser.

Source/WebCore:

Use temporary cliprect type when crossing compositing boundary to prevent cliprect caching.

The issue here is that RenderLayer::backgroundClipRect() could cross compositing boundary by calling parentClipRects() which triggers
clip rect update using the wrong painting root. This happens when the layer hierarchy and the compositing context do not match.
For clip rect computation, we need to climb up on the layer hierarchy (calling parent layer's cliprect functions)
but we also need to make sure that the computed cliprects on any given layer are cached only when the painting root is correct.
It ensures that when we paint a layer (with the painting root as entry point), the cached cliprects are always based on its onw painting root.

Test: compositing/clipping/cached-cliprect-with-compositing-boundary.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):

LayoutTests:

  • compositing/clipping/cached-cliprect-with-compositing-boundary-expected.html: Added.
  • compositing/clipping/cached-cliprect-with-compositing-boundary.html: Added.
5:19 PM Changeset in webkit [239660] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[GTK] Add python3-setuptools, libunistring-dev, bison and flex dependencies
https://bugs.webkit.org/show_bug.cgi?id=193136

Patch by Oriol Brufau <Oriol Brufau> on 2019-01-05
Reviewed by Michael Catanzaro.

  • gtk/install-dependencies:

Add python3-setuptools, libunistring-dev, bison and flex to install-dependencies,
they are needed by update-webkitgtk-libs.

12:51 PM Changeset in webkit [239659] by youenn@apple.com
  • 21 edits in trunk

Service Worker fetch should obey its referrer policy
https://bugs.webkit.org/show_bug.cgi?id=193152

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt:
  • web-platform-tests/service-workers/service-worker/referrer-policy-header.https-expected.txt:

Source/WebCore:

Pass referrer policy retrieved when fetching the service worker script to the SWServer.
The SWServer then stores it persistently and sends it to the manager creating service workers.
This manager will then set the referrer policy on the dummy Document of the corresponding service worker.

Covered by rebased test.

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::didReceiveResponse):

  • workers/WorkerScriptLoader.h:

(WebCore::WorkerScriptLoader::referrerPolicy const):

  • workers/service/SWClientConnection.cpp:

(WebCore::SWClientConnection::failedFetchingScript):

  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):

  • workers/service/ServiceWorkerContainer.h:
  • workers/service/ServiceWorkerContextData.cpp:

(WebCore::ServiceWorkerContextData::isolatedCopy const):

  • workers/service/ServiceWorkerContextData.h:

(WebCore::ServiceWorkerContextData::encode const):
(WebCore::ServiceWorkerContextData::decode):

  • workers/service/ServiceWorkerFetchResult.h:

(WebCore::ServiceWorkerFetchResult::encode const):
(WebCore::ServiceWorkerFetchResult::decode):

  • workers/service/ServiceWorkerJob.cpp:

(WebCore::ServiceWorkerJob::notifyFinished):

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

(WebCore::createPageForServiceWorker):

  • workers/service/server/RegistrationDatabase.cpp:

(WebCore::recordsTableSchema):
(WebCore::RegistrationDatabase::doPushChanges):
(WebCore::RegistrationDatabase::importRecords):

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::addRegistrationFromStore):
(WebCore::SWServer::updateWorker):
(WebCore::SWServer::installContextData):

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

(WebCore::SWServerJobQueue::scriptFetchFinished):

  • workers/service/server/SWServerWorker.cpp:

(WebCore::SWServerWorker::SWServerWorker):
(WebCore::SWServerWorker::contextData const):

  • workers/service/server/SWServerWorker.h:
10:40 AM Changeset in webkit [239658] by Simon Fraser
  • 9 edits in trunk/Source

Factor legacy WK1 code for fixed and scrolling layers into their own helper class
https://bugs.webkit.org/show_bug.cgi?id=193165

Reviewed by Frédéric Wang.

Source/WebCore:

RenderLayerCompositor has some code to handle registration of viewport-constrained
and scrolling layers which is specific to iOS WK1. To reduce pollution, move this
into its own helper class called LegacyWebKitScrollingLayerCoordinator, which is only
allocated for iOS WK1.

iOS WK1 never has a ScrollingCoordinator, so rather than the check for scrollingCoordinator(),
we know that we only made a LegacyWebKitScrollingLayerCoordinator when there's a platform widget
(i.e. WK1).

  • page/ChromeClient.h:
  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::RenderLayerCompositor):
(WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
(WebCore::RenderLayerCompositor::didFlushChangesForLayer):
(WebCore::RenderLayerCompositor::setIsInWindow):
(WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking): No longer check the page cache state; now we
destroy the render tree of pages in the page cache, so we should never hit this code path.
(WebCore::RenderLayerCompositor::didAddScrollingLayer):
(WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllViewportConstrainedLayers):
(WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllViewportConstrainedLayers):
(WebCore::scrollbarHasDisplayNone):
(WebCore::LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer):
(WebCore::LegacyWebKitScrollingLayerCoordinator::registerAllScrollingLayers):
(WebCore::LegacyWebKitScrollingLayerCoordinator::registerScrollingLayersNeedingUpdate):
(WebCore::LegacyWebKitScrollingLayerCoordinator::unregisterAllScrollingLayers):
(WebCore::LegacyWebKitScrollingLayerCoordinator::addScrollingLayer):
(WebCore::LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer):
(WebCore::LegacyWebKitScrollingLayerCoordinator::didFlushChangesForLayer):
(WebCore::updateScrollingLayerWithClient): Deleted.
(WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers): Deleted.
(WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers): Deleted.
(WebCore::RenderLayerCompositor::registerAllScrollingLayers): Deleted.
(WebCore::RenderLayerCompositor::unregisterAllScrollingLayers): Deleted.

  • rendering/RenderLayerCompositor.h:

(WebCore::LegacyWebKitScrollingLayerCoordinator::LegacyWebKitScrollingLayerCoordinator):

  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):

Source/WebKitLegacy/ios:

Make the stickyContainerMap argument const. We WTFMove() values out of the first
argument, so it can't be const.

  • WebCoreSupport/WebChromeClientIOS.h:
  • WebCoreSupport/WebChromeClientIOS.mm:

(WebChromeClientIOS::updateViewportConstrainedLayers):

  • WebCoreSupport/WebFixedPositionContent.mm:

(-[WebFixedPositionContent setViewportConstrainedLayers:stickyContainerMap:]):

  • WebCoreSupport/WebFixedPositionContentInternal.h:
4:01 AM Changeset in webkit [239657] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Unreviewed follow-up fix to r239650
https://bugs.webkit.org/show_bug.cgi?id=193140
<rdar://problem/47063037>

Typecast patch_id to string.

  • BuildSlaveSupport/ews-build/steps.py:

(ValidatePatch._is_patch_obsolete):

3:30 AM Changeset in webkit [239656] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Unreviewed, rolling out r239607.
https://bugs.webkit.org/show_bug.cgi?id=193169

This change makes the test even more flaky (Requested by fredw
on #webkit).

Reverted changeset:

"Flaky Test: http/wpt/css/css-animations/start-
animation-001.html"
https://bugs.webkit.org/show_bug.cgi?id=190903
https://trac.webkit.org/changeset/239607

12:38 AM Changeset in webkit [239655] by Alan Bujtas
  • 14 edits in trunk/Source/WebCore

[LFC] VerticalMargin should only have the used values.
https://bugs.webkit.org/show_bug.cgi?id=193168

Reviewed by Antti Koivisto.

Split VerticalMargin into ComputedVerticalMargin and UsedVerticalMargin.
ComputedVerticalMargin holds the computed (optional) values while UsedVerticalMargin holds both the
collapsed (optional) and the non-collapsed values.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):

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

(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::complicatedCases):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin):
(WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue): Deleted.

  • layout/FormattingContextQuirks.cpp:

(WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):

  • layout/LayoutUnits.h:
  • layout/MarginTypes.h:

(WebCore::Layout::UsedVerticalMargin::before const):
(WebCore::Layout::UsedVerticalMargin::after const):
(WebCore::Layout::UsedVerticalMargin::nonCollapsedValues const):
(WebCore::Layout::UsedVerticalMargin::collapsedValues const):
(WebCore::Layout::UsedVerticalMargin::hasCollapsedValues const):
(WebCore::Layout::UsedVerticalMargin::setCollapsedValues):
(WebCore::Layout::UsedVerticalMargin::UsedVerticalMargin):
(WebCore::Layout::VerticalMargin::nonCollapsedValues const): Deleted.
(WebCore::Layout::VerticalMargin::collapsedValues const): Deleted.
(WebCore::Layout::VerticalMargin::setCollapsedValues): Deleted.
(WebCore::Layout::VerticalMargin::VerticalMargin): Deleted.
(WebCore::Layout::VerticalMargin::usedValues const): Deleted.

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):

  • layout/blockformatting/BlockFormattingContextQuirks.cpp:

(WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBefore):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginAfter):

  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::setVerticalMargin):
(WebCore::Display::Box::verticalMargin const):
(WebCore::Display::Box::marginBefore const):
(WebCore::Display::Box::marginAfter const):

  • layout/floats/FloatingContext.cpp:

(WebCore::Layout::FloatingContext::verticalPositionWithClearance const):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):

Jan 4, 2019:

11:17 PM Changeset in webkit [239654] by bshafiei@apple.com
  • 7 edits in tags/Safari-607.1.18.1/Source

Versioning.

11:06 PM Changeset in webkit [239653] by bshafiei@apple.com
  • 1 copy in tags/Safari-607.1.18.1

New tag.

9:06 PM Changeset in webkit [239652] by dbates@webkit.org
  • 3 edits
    2 adds in trunk

REGRESSION (r238522): Erratic scrolling on Google flights search result page and vrbo.com
https://bugs.webkit.org/show_bug.cgi?id=192996
<rdar://problem/46573552>

Reviewed by Simon Fraser.

Source/WebCore:

Only scroll a text field if its inner text size changes and it is the currently active and
focused element on the page.

Test: fast/scrolling/page-should-not-scroll-on-unfocused-text-field-layout.html

  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::RenderTextControlSingleLine::layout):

LayoutTests:

Add a test to ensure that we do not scroll the page when we lay out an unfocused text field.

  • fast/scrolling/page-should-not-scroll-on-unfocused-text-field-layout-expected.txt: Added.
  • fast/scrolling/page-should-not-scroll-on-unfocused-text-field-layout.html: Added.
9:03 PM Changeset in webkit [239651] by dbates@webkit.org
  • 2 edits in trunk/Tools

[lldb-webkit]: Add support for pretty-printing raw bitmask types
https://bugs.webkit.org/show_bug.cgi?id=193024

Reviewed by Jer Noble.

Add support infrastructure to pretty-print a raw bitmask type. Included is a pretty-printer
for the bitmask type WebEventFlags as an example.

Exposed a new function lldb_webkit.addSummaryAndSyntheticFormattersForRawBitmaskType()
that can be used to register summary and synthetic child formatters for a bitmask type.
For example, consider the following enum and bitmask typedefs:

typedef enum {

A = 1 << 0,
B = 1 << 1,
C = 1 << 2,

} SpecialFlagValues;
typedef unsigned SpecialFlags;

To teach lldb-webkit how to pretty print SpecialFlags types, add the following code inside
lldb_init_module():

addSummaryAndSyntheticFormattersForRawBitmaskType(debugger, "SpecialFlags", {

1 << 0: "A",
1 << 1: "B",
1 << 2: "C",

})

  • lldb/lldb_webkit.py:

(addSummaryAndSyntheticFormattersForRawBitmaskType):
(addSummaryAndSyntheticFormattersForRawBitmaskType.GeneratedRawBitmaskProvider):
(addSummaryAndSyntheticFormattersForRawBitmaskType.raw_bitmask_summary_provider):
(addSummaryAndSyntheticFormattersForRawBitmaskType.lldb_webkit):
A convenience function to dynamically creaste a synthetic formatter class and summary
string function for the specified bitmask type and enumerator value to name map. This
function register the dynamically created class and function with LLDB.

(lldb_init_module):
(FlagEnumerationProvider):
(FlagEnumerationProvider._enumerator_value_to_name_map):
(FlagEnumerationProvider._bitmask):
(FlagEnumerationProvider._update):
(FlagEnumerationProvider.has_children):
(FlagEnumerationProvider.num_children):
(FlagEnumerationProvider.get_child_index):
(FlagEnumerationProvider.get_child_at_index):
(FlagEnumerationProvider.update):
Extract out provider logic from WTFOptionSetProvider into a base class that can be shared.

(WTFOptionSetProvider):
(WTFOptionSetProvider._enumerator_value_to_name_map):
(WTFOptionSetProvider._bitmask):
(WTFOptionSetProvider._update):
Write in terms of the base class.

(RawBitmaskProviderBase):
(RawBitmaskProviderBase._enumerator_value_to_name_map):
(RawBitmaskProviderBase._bitmask):
Added. Base synthetic formatter class for a raw bitmask type. Derived classes are expected to
override the class variable ENUMERATOR_VALUE_TO_NAME_MAP with a dictionary of the form:
{

1 << 0: "A",
1 << 1: "B",
1 << 2: "C",

}
It is not necessary to instantiate such a derived class directory. Instead use the convenience
function addSummaryAndSyntheticFormattersForRawBitmaskType.

(WTFOptionSetProvider.has_children): Deleted.
(WTFOptionSetProvider.num_children): Deleted.
(WTFOptionSetProvider.get_child_index): Deleted.
(WTFOptionSetProvider.get_child_at_index): Deleted.
(WTFOptionSetProvider.update): Deleted.

6:30 PM Changeset in webkit [239650] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews-build] Add build step to validate the patch before processing it
https://bugs.webkit.org/show_bug.cgi?id=193140

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/factories.py:

(Factory.init): Added ValidatePatch step.

  • BuildSlaveSupport/ews-build/steps.py:

(ValidatePatch):
(ValidatePatch.fetch_data_from_url): Fetch data from a url.
(ValidatePatch.get_patch_json): Get patch json data.
(ValidatePatch.get_bug_json): Get bug json data.
(ValidatePatch.get_bug_id_from_patch): Get bug id from a patch id.
(ValidatePatch._is_patch_obsolete): Check if the patch is obsolete.
(ValidatePatch._is_patch_review_denied): Check if the patch is marked r-.
(ValidatePatch._is_bug_closed): Check if the bug is already closed.
(ValidatePatch.skip_build): Skip the build.
(ValidatePatch.start):

5:23 PM Changeset in webkit [239649] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: subclasses of WI.ClusterContentView don't save/restore content views after the initial view
https://bugs.webkit.org/show_bug.cgi?id=192451
<rdar://problem/46800958>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-04
Reviewed by Devin Rousso.

  • UserInterface/Models/BackForwardEntry.js:

(WI.BackForwardEntry.prototype.prepareToHide):

  • UserInterface/Views/ClusterContentView.js:

(WI.ClusterContentView.prototype.get shouldSaveStateOnHide):

  • UserInterface/Views/ContentView.js:

(WI.ContentView.prototype.get shouldSaveStateOnHide):
Allow ClusterContentViews to save its state whenever its hidden,
this means it can be properly restored to the last state it had
instead of the initial state it was shown with.

5:12 PM Changeset in webkit [239648] by achristensen@apple.com
  • 10 edits in trunk

Progress towards fixing Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=193105

Reviewed by Don Olmstead.

Source/WebCore:

  • PlatformMac.cmake:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/gpu/GPURenderPassEncoder.h:

Source/WebKitLegacy/mac:

  • WebKitPrefix.h:

Tools:

  • TestWebKitAPI/PlatformMac.cmake:
4:33 PM Changeset in webkit [239647] by commit-queue@webkit.org
  • 5 edits in trunk/Source

Web Inspector: Use save sheet instead of dialog where possible
https://bugs.webkit.org/show_bug.cgi?id=193160
<rdar://problem/37399759>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-04
Reviewed by Devin Rousso.

Source/WebKit:

  • UIProcess/mac/RemoteWebInspectorProxyMac.mm:

(WebKit::RemoteWebInspectorProxy::platformSave):

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::platformSave):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebInspectorClient.mm:

(WebInspectorFrontendClient::save):

4:28 PM Changeset in webkit [239646] by Devin Rousso
  • 11 edits in trunk

Web Inspector: Audit: disable breakpoints when running Audit
https://bugs.webkit.org/show_bug.cgi?id=193158
<rdar://problem/47057083>

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • UserInterface/Controllers/DebuggerManager.js:

(WI.DebuggerManager):
(WI.DebuggerManager.prototype._startDisablingBreakpointsTemporarily):
(WI.DebuggerManager.prototype._stopDisablingBreakpointsTemporarily):
(WI.DebuggerManager.prototype._handleAuditManagerTestScheduled): Added.
(WI.DebuggerManager.prototype._handleAuditManagerTestCompleted): Added.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WI.DebuggerSidebarPanel.prototype._timelineCapturingWillStart):
(WI.DebuggerSidebarPanel.prototype._timelineCapturingStopped):
(WI.DebuggerSidebarPanel.prototype._handleAuditManagerTestScheduled): Added.
(WI.DebuggerSidebarPanel.prototype._handleAuditManagerTestCompleted): Added.
(WI.DebuggerSidebarPanel.prototype._updateBreakpointsDisabledBanner):

  • UserInterface/Views/DebuggerSidebarPanel.css:

(.sidebar > .panel.navigation.debugger .warning-banner + .warning-banner): Added.

  • UserInterface/Base/Main.js:

(WI.loaded):

  • UserInterface/Test/Test.js:

(WI.loaded):
Move WI.auditManager higher in the managers list so that it can be used in
WI.DebuggerManager's constructor.

  • Localizations/en.lproj/localizedStrings.js:

LayoutTests:

  • inspector/audit/basic.html:
  • inspector/audit/basic-expected.txt:
  • inspector/audit/resources/audit-utilities.js:

(TestPage.registerInitializer.InspectorTest.Audit.addTest):

4:08 PM Changeset in webkit [239645] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[iOS] ERROR: post-layout: dirty renderer(s) in WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker()
https://bugs.webkit.org/show_bug.cgi?id=189608
<rdar://problem/44473299>

Reviewed by Simon Fraser.

When a frameset/iframe is hidden and we skip layout, clear the dirty flag on its subtree as well.

Covered by fast/frames/invalid-frameset.html.

  • rendering/RenderFrameSet.cpp:

(WebCore::clearSiblingSubtrees):
(WebCore::RenderFrameSet::positionFrames):
(WebCore::RenderFrameSet::positionFramesWithFlattening):

4:01 PM Changeset in webkit [239644] by youenn@apple.com
  • 32 edits in trunk

[Fetch API] Implement abortable fetch
https://bugs.webkit.org/show_bug.cgi?id=174980
<rdar://problem/46861402>

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Fixed tests to run in WebKit CI.
Also fixed a bug in a test where the fetch response body is not actually empty.

  • web-platform-tests/fetch/api/abort/cache.https-expected.txt:
  • web-platform-tests/fetch/api/abort/general-serviceworker.https-expected.txt:
  • web-platform-tests/fetch/api/abort/general.any-expected.txt:
  • web-platform-tests/fetch/api/abort/general.any.js:
  • web-platform-tests/fetch/api/abort/general.any.worker-expected.txt:
  • web-platform-tests/fetch/api/abort/serviceworker-intercepted.https-expected.txt:
  • web-platform-tests/fetch/api/response/response-consume-stream-expected.txt:

Source/WebCore:

Add an AbortSignal to FetchRequest.

Add support for AbortSignal algorithm.
The fetch request signal is added an algorithm to abort the fetch.
Update clone algorithm to let signal of the cloned request be following the origin request.

Update ReadableStream error handling to return an exception instead of a string.
This allows passing an AbortError instead of a TypeError as previously done.

Update FetchBodyOwner to store a loading error either as an exception or as a resource error.
The latter is used for passing the error from service worker back to the page.
The former is used to pass it to ReadableStream or body accessors.

Covered by enabled tests.

  • Modules/cache/DOMCache.cpp:

(WebCore::DOMCache::put):

  • Modules/fetch/FetchBody.cpp:

(WebCore::FetchBody::consumeAsStream):
(WebCore::FetchBody::loadingFailed):

  • Modules/fetch/FetchBody.h:
  • Modules/fetch/FetchBodyConsumer.cpp:

(WebCore::FetchBodyConsumer::loadingFailed):

  • Modules/fetch/FetchBodyConsumer.h:
  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::arrayBuffer):
(WebCore::FetchBodyOwner::blob):
(WebCore::FetchBodyOwner::cloneBody):
(WebCore::FetchBodyOwner::formData):
(WebCore::FetchBodyOwner::json):
(WebCore::FetchBodyOwner::text):
(WebCore::FetchBodyOwner::loadBlob):
(WebCore::FetchBodyOwner::blobLoadingFailed):
(WebCore::FetchBodyOwner::consumeBodyAsStream):
(WebCore::FetchBodyOwner::setLoadingError):

  • Modules/fetch/FetchBodyOwner.h:

(WebCore::FetchBodyOwner::loadingError const):
(WebCore::FetchBodyOwner::loadingException const):

  • Modules/fetch/FetchBodySource.cpp:

(WebCore::FetchBodySource::error):

  • Modules/fetch/FetchBodySource.h:
  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::initializeWith):
(WebCore::FetchRequest::clone):

  • Modules/fetch/FetchRequest.h:

(WebCore::FetchRequest::FetchRequest):

  • Modules/fetch/FetchRequest.idl:
  • Modules/fetch/FetchRequestInit.h:

(WebCore::FetchRequestInit::hasMembers const):

  • Modules/fetch/FetchRequestInit.idl:
  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::clone):
(WebCore::FetchResponse::fetch):
(WebCore::FetchResponse::BodyLoader::didFail):

  • Modules/fetch/FetchResponse.h:
  • bindings/js/ReadableStreamDefaultController.h:

(WebCore::ReadableStreamDefaultController::error):

  • dom/AbortSignal.cpp:

(WebCore::AbortSignal::abort):
(WebCore::AbortSignal::follow):

  • dom/AbortSignal.h:

LayoutTests:

3:53 PM Changeset in webkit [239643] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix API test after r239631
https://bugs.webkit.org/show_bug.cgi?id=193118

  • TestWebKitAPI/Tests/WebKit/UserMedia.cpp:

(TestWebKitAPI::TEST):
This test relied on m_maximumProcessCount being set to 1 in ProcessPoolConfiguration::createWithLegacyOptions.
Do the same thing via the API to fix the test.

3:42 PM Changeset in webkit [239642] by Brent Fulgham
  • 3 edits
    2 adds in trunk

Parsed protocol of javascript URLs with embedded newlines and carriage returns do not match parsed protocol in Chrome and Firefox
https://bugs.webkit.org/show_bug.cgi?id=193155
<rdar://problem/40230982>

Reviewed by Chris Dumez.

Source/WebCore:

Test: fast/loader/comment-only-javascript-url.html

Make a special case for URLs beginning with 'javascript:'. We should always
treat these as JS URLs, even if the content contained within the URL
string might match other parts of the URL parsing spec.

  • html/URLUtils.h:

(WebCore::URLUtils<T>::protocol const):

LayoutTests:

  • fast/loader/comment-only-javascript-url-expected.txt: Added.
  • fast/loader/comment-only-javascript-url.html: Added.
2:59 PM Changeset in webkit [239641] by Alan Coon
  • 7 edits in trunk/Source

Versioning.

2:23 PM Changeset in webkit [239640] by jer.noble@apple.com
  • 22 edits
    2 adds in trunk

[WebKitLegacy] Media playback pauses on scroll
https://bugs.webkit.org/show_bug.cgi?id=192829

Reviewed by Eric Carlson.

Source/WebCore:

New API tests:

WebKitLegacy.ScrollingDoesNotPauseMedia
WKWebView.StopAllMediaPlayback
WKWebView.SuspendResumeAllMediaPlayback

Do not use suspendActiveDOMObjects(ReasonForSuspension::PageWillBeSuspended) to pause
video. Roll back the changes to HTMLMediaElement, and introduce a new set of Page calls
suspendAllMediaPlayback() & resumeAllMediaPlayback() which replaces the removed bahavior.

  • dom/Document.cpp:

(WebCore::Document::~Document):
(WebCore::Document::stopAllMediaPlayback):
(WebCore::Document::suspendAllMediaPlayback):
(WebCore::Document::resumeAllMediaPlayback):

  • dom/Document.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::parseAttribute):
(WebCore::HTMLMediaElement::didFinishInsertingNode):
(WebCore::HTMLMediaElement::setSrcObject):
(WebCore::HTMLMediaElement::updateActiveTextTrackCues):
(WebCore::HTMLMediaElement::suspend):
(WebCore::HTMLMediaElement::resume):
(WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless const):

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless const): Deleted.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::playbackPermitted const):

  • page/Page.cpp:

(WebCore::Page::stopAllMediaPlayback):
(WebCore::Page::suspendAllMediaPlayback):
(WebCore::Page::resumeAllMediaPlayback):

  • page/Page.h:

(WebCore::Page::mediaPlaybackIsSuspended):

  • platform/audio/PlatformMediaSession.h:
  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::suspendAllMediaPlaybackForDocument):
(WebCore::PlatformMediaSessionManager::resumeAllMediaPlaybackForDocument):

  • platform/audio/PlatformMediaSessionManager.h:

Source/WebKit:

Add a new WebPage, WebPageProxy, & WKWebView SPI to stop, suspend, and resume all
existing media playback in the page.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _stopAllMediaPlayback]):
(-[WKWebView _suspendAllMediaPlayback]):
(-[WKWebView _resumeAllMediaPlayback]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::stopAllMediaPlayback):
(WebKit::WebPageProxy::suspendAllMediaPlayback):
(WebKit::WebPageProxy::resumeAllMediaPlayback):

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/fullscreen/WKFullScreenViewController.mm:

(-[WKFullScreenViewController _showPhishingAlert]):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::stopAllMediaPlayback):
(WebKit::WebPage::suspendAllMediaPlayback):
(WebKit::WebPage::resumeAllMediaPlayback):

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

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/StopSuspendResumeAllMedia.mm: Added.

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitLegacy/ios/ScrollingDoesNotPauseMedia.mm: Added.

(-[ScrollingDoesNotPauseMediaDelegate webViewDidFinishLoad:]):
(-[ScrollingDoesNotPauseMediaDelegate uiWebView:didCommitLoadForFrame:]):
(-[ScrollingDoesNotPauseMediaDelegate handleEvent:]):
(TestWebKitAPI::TEST):

2:11 PM Changeset in webkit [239639] by Chris Dumez
  • 21 edits in trunk

Add support for toggling device orientation API support per site
https://bugs.webkit.org/show_bug.cgi?id=193143
<rdar://problem/46605724>

Reviewed by Alex Christensen.

Source/WebCore:

Add support for toggling device orientation API support per site via _WKWebsitePolicies.

  • dom/Document.cpp:

(WebCore::Document::simulateDeviceOrientationChange):

  • dom/Document.h:
  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::deviceOrientationEventEnabled const):
(WebCore::DocumentLoader::setDeviceOrientationEventEnabled):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::addEventListener):

Source/WebKit:

Add support for toggling device orientation API support per site via _WKWebsitePolicies.

  • Shared/WebsitePoliciesData.cpp:

(WebKit::WebsitePoliciesData::encode const):
(WebKit::WebsitePoliciesData::decode):
(WebKit::WebsitePoliciesData::applyToDocumentLoader):

  • Shared/WebsitePoliciesData.h:
  • UIProcess/API/APIWebsitePolicies.cpp:

(API::WebsitePolicies::data):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _simulateDeviceOrientationChangeWithAlpha:beta:gamma:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.mm:

(-[_WKWebsitePolicies setDeviceOrientationEventEnabled:]):
(-[_WKWebsitePolicies deviceOrientationEventEnabled]):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::simulateDeviceOrientationChange):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::simulateDeviceOrientationChange):

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

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(-[DataMappingSchemeHandler setTaskHandler:]):
(-[DataMappingSchemeHandler webView:startURLSchemeTask:]):
(-[WebsitePoliciesDeviceOrientationDelegate initWithDeviceOrientationEventEnabled:]):
(-[WebsitePoliciesDeviceOrientationDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[WebsitePoliciesDeviceOrientationDelegate webView:didFinishNavigation:]):

2:10 PM Changeset in webkit [239638] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

Crash under WebPageProxy::continueNavigationInNewProcess()
https://bugs.webkit.org/show_bug.cgi?id=193113
<rdar://problem/46938686>

Reviewed by Brady Eidson.

The crash was happening in continueNavigationInNewProcess() when dereferencing
the Optional<> value returned by API::Navigation::backForwardFrameLoadType(), after verifying
that API::Navigation::targetItem() is not null.

When constructing an API::Navigation object with a targetItem, you HAVE to pass
in a backForwardFrameLoadType as well so this normally is not possible. However,
it can happen because API::Navigation::setTargetItem() can get called later on and
set a target item on a Navigation object which potentially does not have a
backForwardFrameLoadType. This setter was only called in one place in
decidePolicyForNavigationAction() to update an existing Navigation object using
the targetItem provided by a NavigationAction. This logic was added with PSON
support.

Because I was unable to write a test case reproducing this and because I do not know
how it can happen in practice that we'd have a NavigationAction with a targetItem
even though the Navigation object itself is not for a back/forward navigation, I have
chosen to drop the unsafe API::Navigation::setTargetItem() setter and the call site.
When the call site was added, with ProcessSwap.NavigateToDataURLThenBack API test,
the intention was to create a back/forward navigation object instead of a standard load
navigation one if there is currently no existing Navigation object in the UIProcess.
This can happen when the back/forward navigation is triggered by the WebProcess via
JS (e.g. history.back()) and this is what the API test covers. The part of the logic
that updates an existing Navigation object with a targetItem coming from the
NavigationAction is untested and I have no evidence it does anything useful. However,
we DO have evidence that it can cause crashes.

  • UIProcess/API/APINavigation.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):

1:40 PM Changeset in webkit [239637] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Remove some nonexistent files from the WebKit Xcode project

  • WebKit.xcodeproj/project.pbxproj:

r238468 and r237205 forgot to remove some files from the project.

1:32 PM Changeset in webkit [239636] by jer.noble@apple.com
  • 13 edits
    4 adds in trunk

Web Content process main thread blocked beneath ImageDecoderAVFObjC::readSamples for many seconds on imgur.com
https://bugs.webkit.org/show_bug.cgi?id=191806
<rdar://problem/46151477>

Reviewed by Dean Jackson.

Source/WebCore:

Test: http/tests/images/mp4-partial-load.html

Rather than use an AVAssetReaderTrackOutput, which will load both sample metadata and sample data
synchronously when a sample is requested, use AVAssetReaderSampleReferenceOutput, which only loads
sample metadata, including the byte offset and byte length of the sample data. By waiting until the
AVAsset signals that it's own metadata is loaded, we can safely parse all the sample metadata without
blocking on network loads. Once enough data is loaded, we can replace the byte reference and offset
attachements in the sample with actual data, and mark the sample as "complete".

Because the existing ImageSource assumes that image data parsing will occur synchronously, and that
synchronous parsing could cause a hang if the metadata is not loaded, add a new callback method which
allows the ImageSource to be notified when the encodedDataStatus changes. The ImageSource notifies the
CacheImage, which notifies the RenderImage, and thus the asynchronous parsing will kick off the
renderer's animation loop.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::CachedImageObserver::encodedDataStatusChanged):
(WebCore::CachedImage::encodedDataStatusChanged):

  • loader/cache/CachedImage.h:
  • platform/graphics/ImageDecoder.h:

(WebCore::ImageDecoder::setEncodedDataStatusChangeCallback):

  • platform/graphics/ImageObserver.h:

(WebCore::ImageObserver::encodedDataStatusChanged):

  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::ensureDecoderAvailable):
(WebCore::ImageSource::encodedDataStatusChanged):
(WebCore::ImageSource::frameDecodingStatusAtIndex):

  • platform/graphics/ImageSource.h:
  • platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
  • platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:

(-[WebCoreSharedBufferResourceLoaderDelegate data]):
(WebCore::ImageDecoderAVFObjCSample::byteRange const):
(WebCore::ImageDecoderAVFObjC::readSamples):
(WebCore::ImageDecoderAVFObjC::setEncodedDataStatusChangeCallback):
(WebCore::ImageDecoderAVFObjC::encodedDataStatus const):
(WebCore::ImageDecoderAVFObjC::frameIsCompleteAtIndex const):
(WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):
(WebCore::ImageDecoderAVFObjC::sampleIsComplete const):

Source/WebCore/PAL:

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

LayoutTests:

  • http/tests/images/mp4-partial-load-expected.txt: Added.
  • http/tests/images/mp4-partial-load.html: Added.
  • platform/win/http/tests/mp4-partial-load-expected.txt: Added.
1:27 PM Changeset in webkit [239635] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Add a Setting Toggle for Source Maps
https://bugs.webkit.org/show_bug.cgi?id=193148

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-04
Reviewed by Devin Rousso.

  • UserInterface/Controllers/NetworkManager.js:

(WI.NetworkManager.prototype.downloadSourceMap):
Don't download source maps if the setting is disabled.

  • UserInterface/Base/Setting.js:
  • UserInterface/Views/SettingsTabContentView.js:

(WI.SettingsTabContentView.prototype._createGeneralSettingsView):
Settings toggle for source maps. Enabled by default.

  • Localizations/en.lproj/localizedStrings.js:
1:22 PM Changeset in webkit [239634] by youenn@apple.com
  • 12 edits
    4 adds in trunk

CSP violation reports should bypass CSP checks
https://bugs.webkit.org/show_bug.cgi?id=192857
<rdar://problem/46887236>

Reviewed by Chris Dumez.

Source/WebCore:

For ping loads, pass the option to do CSP checks from PingLoader to LoaderStrategy.
This new option is unused by WebKit Legacy.
It is used by WebKit loader strategy to only send any CSP response header to network process
in case CSP checks should be done.

This option is used to disable CSP checks for Ping Loads that report CSP violations.

Test: http/wpt/fetch/csp-reports-bypass-csp-checks.html

  • loader/LoaderStrategy.h:
  • loader/PingLoader.cpp:

(WebCore::PingLoader::loadImage):
(WebCore::PingLoader::sendPing):
(WebCore::PingLoader::sendViolationReport):
(WebCore::PingLoader::startPingLoad):

  • loader/PingLoader.h:
  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::load):

Source/WebKit:

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::startPingLoad):

  • WebProcess/Network/WebLoaderStrategy.h:

Source/WebKitLegacy:

  • WebCoreSupport/WebResourceLoadScheduler.cpp:

(WebResourceLoadScheduler::startPingLoad):

  • WebCoreSupport/WebResourceLoadScheduler.h:

LayoutTests:

  • http/wpt/fetch/csp-reports-bypass-csp-checks-expected.txt: Added.
  • http/wpt/fetch/csp-reports-bypass-csp-checks.html: Added.
  • http/wpt/fetch/csp-reports-bypass-csp-checks.html.headers: Added.
  • http/wpt/fetch/resources/store-csp-report.py: Added.

(main):

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

[ews-build] use svn-apply script to apply the patches
https://bugs.webkit.org/show_bug.cgi?id=193138

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/factories.py:

(Factory.init): Add the ApplyPatch step.

  • BuildSlaveSupport/ews-build/steps.py:

(CheckOutSource): Added step name.
(CheckOutSource.init): Used alwaysUseLatest so that it doesn't apply patch.
(ApplyPatch): Build step to apply patch using svn-apply script.
(UnApplyPatchIfRequired):
(UnApplyPatchIfRequired.init): Deleted, since the alwaysUseLatest parameter is now in base class.

1:13 PM Changeset in webkit [239632] by achristensen@apple.com
  • 8 edits in trunk/Source/WebKit

Use WebsiteDataStoreParameters instead of NetworkProcessCreationParameters for IndexedDB directories
https://bugs.webkit.org/show_bug.cgi?id=193114

Reviewed by Brady Eidson.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):

  • NetworkProcess/NetworkProcessCreationParameters.cpp:

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

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

1:12 PM Changeset in webkit [239631] by achristensen@apple.com
  • 57 edits in trunk

Deprecate WKContextCreate
https://bugs.webkit.org/show_bug.cgi?id=193118

Reviewed by Brady Eidson.

Source/WebKit:

It has only one use that is being removed in rdar://problem/47030792
This is a step towards removing ProcessPoolConfiguration::createWithLegacyOptions.
Also make WKContextCreateWithConfiguration accept a null configuration to make it easier to use.

  • UIProcess/API/C/WKContext.cpp:

(WKContextCreateWithConfiguration):

  • UIProcess/API/C/WKContext.h:

Tools:

  • MiniBrowser/win/WebKitBrowserWindow.cpp:

(WebKitBrowserWindow::WebKitBrowserWindow):

  • TestWebKitAPI/Tests/WebKit/AboutBlankLoad.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/CloseFromWithinCreatePage.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/CloseThenTerminate.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/CookieManager.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/DownloadDecideDestinationCrash.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/EnumerateMediaDevices.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/EphemeralSessionPushStateNoHistoryCallback.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/EvaluateJavaScript.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/EventModifiers.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/FailedLoad.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/Find.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/FindMatches.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/ForceRepaint.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/FrameHandle.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/FrameMIMETypeHTML.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/FrameMIMETypePNG.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/Geolocation.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp:

(TestWebKitAPI::loadAlternateHTMLString):

  • TestWebKitAPI/Tests/WebKit/LoadPageOnCrash.cpp:

(TestWebKitAPI::WebKit2CrashLoader::WebKit2CrashLoader):

  • TestWebKitAPI/Tests/WebKit/MenuTypesForMouseEvents.cpp:

(TestWebKitAPI::buildAndPerformTest):

  • TestWebKitAPI/Tests/WebKit/ModalAlertsSPI.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/NavigationClientDefaultCrypto.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/PageGroup.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/PendingAPIRequestURL.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/PreventEmptyUserAgent.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/ProcessDidTerminate.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/ResizeWindowAfterCrash.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/RestoreSessionStateContainingFormData.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/ScrollPinningBehaviors.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/TerminateTwice.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/UserMedia.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/WKPageConfiguration.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/WKPageGetScaleFactorNotZero.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/WebCoreStatisticsWithNoWebProcess.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/mac/GetPIDAfterAbortedProcessLaunch.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/mac/RestoreStateAfterTermination.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm:

(WebKit2_CommandBackForwardTestWKView::SetUp):

  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/SchemeRegistry.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/mac/WebKitAgnosticTest.mm:

(TestWebKitAPI::WebKitAgnosticTest::runWebKit2Test):

12:29 PM Changeset in webkit [239630] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Include globalThis in default JavaScript completions
https://bugs.webkit.org/show_bug.cgi?id=193147

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-04
Reviewed by Devin Rousso.

  • UserInterface/Controllers/CodeMirrorCompletionController.js:

Add globalThis which is a new global value.

12:29 PM Changeset in webkit [239629] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Fix the build

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView cleanupInteraction]):

12:24 PM Changeset in webkit [239628] by timothy_horton@apple.com
  • 13 edits
    1 copy
    1 add in trunk/Source/WebKit

Share ink choice and ruler between all editable images
https://bugs.webkit.org/show_bug.cgi?id=193130
<rdar://problem/46826491>

Reviewed by Wenson Hsieh.

  • SourcesCocoa.txt:

Add WKDrawingCoordinator, which maintains WKWebView-wide drawing state,
and manages a single shared ink picker.

  • UIProcess/PageClient.h:

(WebKit::PageClient::createDrawingView):

  • UIProcess/ios/EditableImageController.mm:

(WebKit::EditableImageController::ensureEditableImage):

  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::createDrawingView):
Plumb WKDrawingView creation through PageClient, so that it can be instantiated
with knowledge of its owning WKContentView.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView _elementDidBlur]):
(-[WKContentView _drawingCoordinator]):
(-[WKContentView _installInkPickerForDrawingViewWithID:]): Deleted.
(-[WKContentView _uninstallInkPicker]): Deleted.
Move ink picker management into WKDrawingCoordinator.

  • UIProcess/ios/WKDrawingView.h:
  • UIProcess/ios/WKDrawingView.mm:

(-[WKDrawingView initWithEmbeddedViewID:contentView:]):
(-[WKDrawingView _canvasViewWillBeginDrawing:]):
(-[WKDrawingView invalidateAttachment]):
(-[WKDrawingView didChangeRulerState:]):
(-[WKDrawingView initWithEmbeddedViewID:webPageProxy:]): Deleted.
(-[WKDrawingView canvasView]): Deleted.
Use a shared ruler, owned by WKDrawingCoordinator.
Update the editable image's ink when drawing begins. This way, we don't have
to push ink changes to all drawings as they happen.

  • UIProcess/ios/WKInkPickerView.h:
  • UIProcess/ios/WKInkPickerView.mm:

(-[WKInkPickerView initWithContentView:]):
(-[WKInkPickerView inlineInkPickerDidToggleRuler:]):
(-[WKInkPickerView viewControllerForPopoverPresentationFromInlineInkPicker:]):
(-[WKInkPickerView setInk:]):
(-[WKInkPickerView ink]):
(-[WKInkPickerView initWithDrawingView:]): Deleted.
(-[WKInkPickerView didPickInk]): Deleted.
(-[WKInkPickerView inlineInkPicker:didSelectTool:]): Deleted.
(-[WKInkPickerView inlineInkPicker:didSelectColor:]): Deleted.

  • WebKit.xcodeproj/project.pbxproj:
11:56 AM Changeset in webkit [239627] by Wenson Hsieh
  • 14 edits
    1 copy in trunk/Source

[Cocoa] Merge WebEditCommandProxy::nameForEditAction and undoNameForEditAction into a single function
https://bugs.webkit.org/show_bug.cgi?id=193129

Reviewed by Tim Horton.

Source/WebCore:

Adds a new helper function that returns the undo/redo name for a given EditAction. No change in behavior.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/EditAction.cpp: Copied from Source/WebKit/UIProcess/WebEditCommandProxy.cpp.

(WebCore::nameForUndoRedo):

  • editing/EditAction.h:
  • editing/Editor.cpp:

Source/WebKit:

Remove WebEditCommandProxy::nameForEditAction and use WebCore::nameForUndoRedo instead.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::registerEditCommand):

  • UIProcess/WebEditCommandProxy.cpp:

(WebKit::WebEditCommandProxy::WebEditCommandProxy):
(WebKit::WebEditCommandProxy::~WebEditCommandProxy):
(WebKit::WebEditCommandProxy::nameForEditAction): Deleted.

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

(WebKit::WebPageProxy::addEditCommand):
(WebKit::WebPageProxy::removeEditCommand):
(WebKit::WebPageProxy::isValidEditCommand): Deleted.

Bit of drive-by refactoring: remove an unused function, and make addEditCommand and removeEditCommand take
references instead of pointers, since these are assumed to be nonnull.

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::registerEditCommand):

Source/WebKitLegacy/mac:

Remove undoNameForEditAction and use WebCore::nameForUndoRedo instead.

  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::registerUndoOrRedoStep):
(undoNameForEditAction): Deleted.

11:52 AM Changeset in webkit [239626] by Tadeu Zagallo
  • 11 edits
    1 add in trunk

Baseline version of get_by_id may corrupt metadata
https://bugs.webkit.org/show_bug.cgi?id=193085
<rdar://problem/23453006>

Reviewed by Saam Barati.

JSTests:

  • stress/get-by-id-change-mode.js: Added.

(forEach):

Source/JavaScriptCore:

The Baseline version of get_by_id unconditionally calls emitArrayProfilingSiteForBytecodeIndexWithCell
if the property is length. However, since the bytecode rewrite, get_by_id only has an ArrayProfile entry
in the metadata if its mode is GetByIdMode::ArrayLength. That might result in one of two bad things:
1) get_by_id's mode is not ArrayLength, and a duplicate, out-of-line ArrayProfile entry will be created by
CodeBlock::getOrAddArrayProfile.
2) get_by_id's mode *is* ArrayLength and we generate the array profiling code pointing to the ArrayProfile
that lives in the metadata table. This works fine as long as get_by_id does not change modes. If that happens,
the JIT code will write into the metadata table, overwriting the 'GetByIdModeMetadata` for another mode.

Add a check to the Baseline version of get_by_id so that we only do the ArrayProfiling if the get_by_id's
mode is ArrayLength

  • bytecode/BytecodeList.rb:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::getArrayProfile):
(JSC::CodeBlock::addArrayProfile): Deleted.
(JSC::CodeBlock::getOrAddArrayProfile): Deleted.

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::numberOfArrayProfiles const): Deleted.
(JSC::CodeBlock::arrayProfiles): Deleted.

  • bytecode/CodeBlockInlines.h:

(JSC::CodeBlock::forEachArrayProfile):

  • jit/JIT.h:
  • jit/JITInlines.h:

(JSC::JIT::emitArrayProfilingSiteForBytecodeIndexWithCell): Deleted.

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_id):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_get_by_id):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

11:45 AM Changeset in webkit [239625] by mrajca@apple.com
  • 15 edits
    3 adds in trunk

Make DidPlayMediaPreventedFromPlaying autoplay event more generic.
https://bugs.webkit.org/show_bug.cgi?id=193128
rdar://34554231

Reviewed by Jer Noble.

Today, the "DidPlayMediaPreventedFromPlaying" autoplay event is only sent for
media prevented from autoplaying. It could be generalized to a "DidPlayMediaWithUserGesture"
event along with a flag that indicates whether or not autoplay was actually prevented.
Source/WebCore:

Moreover, we can include a flag that indicates whether the media element in question
is main content. Clients will then know in more cases when media was played with a user
gesture, whether or not it has audio, as well as its main content status. While the main
content heuristics may not be perfect, they covered the top 20 video-centric websites that
this was tested with and are meant to be used by clients for data evaluation purposes.

As part of this, the PlaybackWithoutUserGesture enum was renamed to AutoplayEventPlaybackState
since it now also applies to cases where there is a user gesture. The
m_playbackWithoutUserGestureStartedTime member variable was also removed in favor of
playbackStartedTime which also covers all the cases we care about.

Tests: existing API tests were updated to reflect the new names. New API tests
were added for the new case in which the "DidPlayMediaWithUserGesture" event is sent.

  • html/HTMLMediaElement.cpp:

(WebCore::convertEnumerationToString): Update to new enum cases.
(WebCore::HTMLMediaElement::setReadyState): Ditto.
(WebCore::HTMLMediaElement::play): Ditto.
(WebCore::HTMLMediaElement::playInternal): Also cover the case where

playback was not prevented but there was a user gesture.

(WebCore::HTMLMediaElement::pauseInternal): Use new name.
(WebCore::HTMLMediaElement::setVolume): Use new name.
(WebCore::HTMLMediaElement::playbackProgressTimerFired): Dispatch the

DidPlayMediaWithUserGesture event when playback was started with a user
gesture as well.

(WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Use new name.
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Ditto.
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer): Ditto.
(WebCore::HTMLMediaElement::handleAutoplayEvent): Pass along new media state.
(WebCore::HTMLMediaElement::userDidInterfereWithAutoplay): Use new name.
(WebCore::HTMLMediaElement::setAutoplayEventPlaybackState): Stop setting

m_playbackWithoutUserGestureStartedTime in favor of using playbackStartedTime.

(WebCore::HTMLMediaElement::updateShouldPlay): Use new name.
(WebCore::HTMLMediaElement::setPlaybackWithoutUserGesture): Renamed.

  • html/HTMLMediaElement.h:

(WTF::LogArgument<WebCore::HTMLMediaElement::AutoplayEventPlaybackState>::toString): Renamed from...
(WTF::LogArgument<WebCore::HTMLMediaElement::PlaybackWithoutUserGesture>::toString):

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::isMainContentForPurposesOfAutoplayEvents const): Don't

do the hit testing check for the purposes of autoplay events. It seems to fail on the
basic Vimeo player due to overlapping divs.

(WebCore::isElementMainContentForPurposesOfAutoplay):
(WebCore::MediaElementSession::updateIsMainContent const): Keep the existing behavior

here of hit testing.

(WebCore::isMainContentForPurposesOfAutoplay): Renamed.

  • html/MediaElementSession.h:
  • page/AutoplayEvent.h:

Source/WebKit:

Tests: existing API tests were updated to reflect the new names. New API tests
were added for the new case in which the "DidPlayMediaWithUserGesture" event is sent.

  • Shared/WebCoreArgumentCoders.h: Take into account new flags.
  • UIProcess/API/C/WKPage.cpp: Ditto.

(WKPageSetPageUIClient):

  • UIProcess/API/C/WKPageUIClient.h: Ditto.
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Ditto.
  • UIProcess/Cocoa/UIDelegate.mm: Ditto.

(WebKit::toWKAutoplayEventFlags):
(WebKit::toWKAutoplayEvent):

Tools:

Tests: existing API tests were updated to reflect the new names. New API tests
were added for the new case in which the "DidPlayMediaWithUserGesture" event is sent.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/long-test.mp4: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/audio-with-play-button.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/video-with-play-button.html: Added.
11:07 AM Changeset in webkit [239624] by Fujii Hironori
  • 9 edits in trunk/Source/WebKit

[curl] Move cookiePersistentStorageFile from NetworkProcessCreationParameters to NetworkSessionCreationParameters
https://bugs.webkit.org/show_bug.cgi?id=192970

Reviewed by Alex Christensen.

  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode const): Removed code for cookiePersistentStorageFile.
(WebKit::NetworkProcessCreationParameters::decode): Ditto.

  • NetworkProcess/NetworkProcessCreationParameters.h: Ditto.
  • NetworkProcess/curl/NetworkProcessCurl.cpp:

(WebKit::NetworkProcess::platformInitializeNetworkProcess): Ditto.

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::privateSessionParameters): Added code for cookiePersistentStorageFile.
(WebKit::NetworkSessionCreationParameters::encode const): Ditto.
(WebKit::NetworkSessionCreationParameters::decode): Ditto.

  • NetworkProcess/NetworkSessionCreationParameters.h: Ditto.
  • NetworkProcess/curl/NetworkSessionCurl.cpp:

(WebKit::NetworkSessionCurl::NetworkSessionCurl): Ditto.

  • NetworkProcess/Cookies/WebCookieManager.h: Removed setCookiePersistentStorage method of curl port extension.
  • NetworkProcess/Cookies/curl/WebCookieManagerCurl.cpp:

(WebKit::WebCookieManager::setCookiePersistentStorage): Deleted.

11:02 AM Changeset in webkit [239623] by Chris Dumez
  • 4 edits in trunk

[PSON] Calling history.back() from inside the load event handler prevents process-swapping
https://bugs.webkit.org/show_bug.cgi?id=193120

Reviewed by Alex Christensen.

Source/WebKit:

A HistoryItem is created only *after* we've fired the load event. As a result, if you call
history.back() in JS from inside the load event handler, the current HistoryItem and and
the target HistoryItem will be the same. This is normally not an issue. However, there was
logic inside of WebProcessPool::processForNavigationInternal() which would compare the
processID of the source and destination BackForwardListItems and which would force a process
reuse if both BackForwardListItems came from the same WebContent process. So even though
we swapped when doing a standard load from site A to site B, we would fail to swap if site
B called history.back() from inside its load event handler.

To address the issue, stop relying on the source backforward item's processID. Instead, just
use the WebContent process matching the destination backforward item's processID if it still
exists.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::processForNavigationInternal):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
11:02 AM Changeset in webkit [239622] by Keith Rollin
  • 5 edits in trunk/Source/WebKit

Bring back parent processID for logging
https://bugs.webkit.org/show_bug.cgi?id=193121
<rdar://problem/47031634>

Reviewed by Alex Christensen.

Bug 192961 removes presentingApplicationPID from
NetworkProcessCreationParameters because it was (a) stored in some
global state, the use of which is being minimized, and (b) it was
largely unused. However, it was actually still being used in some
useful logging in order to tie together child processes with their
parent process. Re-introduce this value in NetworkLoadParameters so
that we can log it.

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

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

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::start):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
(WebKit::WebLoaderStrategy::startPingLoad):
(WebKit::WebLoaderStrategy::preconnectTo):

11:00 AM Changeset in webkit [239621] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Make RestrictedHTTPResponseAccess an internal flag
https://bugs.webkit.org/show_bug.cgi?id=193145

Reviewed by Chris Dumez.

  • Shared/WebPreferences.yaml: This will ease debugging.
10:47 AM Changeset in webkit [239620] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

Crash in WebCore::ServiceWorkerGlobalScope
https://bugs.webkit.org/show_bug.cgi?id=192513
<rdar://problem/46563880>

Reviewed by Alex Christensen.

Store the identifier in its own variable to make sure we do not use workerThread after being moved.

  • workers/service/ServiceWorkerGlobalScope.cpp:

(WebCore::ServiceWorkerGlobalScope::skipWaiting):

10:44 AM Changeset in webkit [239619] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Enable logging for services in sandbox
https://bugs.webkit.org/show_bug.cgi?id=192705

Reviewed by Brent Fulgham.

When running layout tests, we didn’t see 107 services being looked up through launchd. We should
add logging to these services to determine which services we actually need in the sandbox.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
10:29 AM Changeset in webkit [239618] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Unreviewed, rolling out r239603.
https://bugs.webkit.org/show_bug.cgi?id=193146

Breaks shipping tests (Requested by bfulgha on #webkit).

Reverted changeset:

"[iOS] Update sandbox profile to use iconservices instead of
lsdiconservice"
https://bugs.webkit.org/show_bug.cgi?id=193115
https://trac.webkit.org/changeset/239603

10:01 AM Changeset in webkit [239617] by Chris Dumez
  • 4 edits in trunk

Crash under WebProcessPool::addSuspendedPage()
https://bugs.webkit.org/show_bug.cgi?id=193110

Reviewed by Youenn Fablet.

Source/WebKit:

When PageCache is disabled, WebProcessPool::m_maxSuspendedPageCount is 0 and WebProcessPool::addSuspendedPage()
would call m_suspendedPages.removeFirst() even though m_suspendedPages is empty, causing a crash.
Do an early return when m_maxSuspendedPageCount is 0 since we do not want to add any suspended page in this
case.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::addSuspendedPage):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
10:00 AM Changeset in webkit [239616] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Check patch relevance before applying the patch
https://bugs.webkit.org/show_bug.cgi?id=193102

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/factories.py:

(Factory.init): Moved CheckPatchRelevance step to base class.

9:58 AM Changeset in webkit [239615] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Check patch relevance step should print patch id
https://bugs.webkit.org/show_bug.cgi?id=193137

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(CheckPatchRelevance.start): Update the status to include patch id.

9:58 AM Changeset in webkit [239614] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Increase simulator teardown timeout
https://bugs.webkit.org/show_bug.cgi?id=193141
<rdar://problem/46174217>

Rubber-stamped by Aakash Jain.

  • Scripts/webkitpy/xcode/simulated_device.py:

(SimulatedDeviceManager.tear_down): Use SIMULATOR_BOOT_TIMEOUT.

9:18 AM Changeset in webkit [239613] by Chris Fleizach
  • 7 edits in trunk

AX: String check: "Rule" does not reflect the meaning of the <hr> html tag
https://bugs.webkit.org/show_bug.cgi?id=193041
<rdar://problem/46954090>

Reviewed by Zalan Bujtas.

Source/WebCore:

  • en.lproj/Localizable.strings:
  • platform/cocoa/LocalizedStringsCocoa.mm:

(WebCore::AXHorizontalRuleDescriptionText):

LayoutTests:

  • accessibility/mac/hr-element-expected.txt:
  • platform/mac/accessibility/roles-exposed-expected.txt:
  • platform/mac-wk2/accessibility/roles-exposed-expected.txt:
9:04 AM Changeset in webkit [239612] by yusukesuzuki@slowstart.org
  • 25 edits
    6 adds in trunk

[JSC] Optimize Object.prototype.toString
https://bugs.webkit.org/show_bug.cgi?id=193031

Reviewed by Saam Barati.

JSTests:

  • stress/object-tostring-changed-proto.js: Added.

(shouldBe):
(test):

  • stress/object-tostring-changed.js: Added.

(shouldBe):
(test):

  • stress/object-tostring-misc.js: Added.

(shouldBe):
(test):
(i.switch):

  • stress/object-tostring-other.js: Added.

(shouldBe):
(test):

  • stress/object-tostring-untyped.js: Added.

(shouldBe):
(test):
(i.switch):

Source/JavaScriptCore:

Object.prototype.toString is frequently used for type checking.
It is called many times in wtb-lebab.js. This patch optimizes
Object.prototype.toString by the following two optimizations.

  1. We should emit code looking up cached to string in DFG and FTL.

toString's result is cached in the Structure. We emit a fast path code
in DFG and FTL to lookup this cache.

  1. We should not create objects for primitive values in major cases.

When Object.prototype.toString(primitive) is called, this primitive is converted
to an object by calling ToObject. But if the result is appropriately cached in
the Structure, we should get it in the fast path without creating this object.
When converting primitives to objects, Structures used in these newly created objects
are known (Structure for StringObject etc.). So we can first query the cached string
before actually converting primitives to objects.

This patch improves wtb-lebab.js by roughly 2%.

before: lebab: 8.90 runs/s
after : lebab: 9.09 runs/s

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileObjectToString):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileObjectToString):

  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

  • runtime/Intrinsic.h:
  • runtime/ObjectPrototype.cpp:

(JSC::ObjectPrototype::finishCreation):
(JSC::objectProtoFuncToString):

  • runtime/ObjectPrototype.h:
  • runtime/ObjectPrototypeInlines.h: Added.

(JSC::structureForPrimitiveValue):
(JSC::objectToString):

  • runtime/StructureRareData.h:
8:44 AM Changeset in webkit [239611] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[iOS] Silently deny access to mail settings triggered by MessageUI framework
https://bugs.webkit.org/show_bug.cgi?id=193123
<rdar://problem/42485581>

Reviewed by Alexey Proskuryakov.

Remove unhelpful logging generated when we block access to non-WebKit preferences. These
invalid checks are done by an system framework that we cannot modify.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
8:27 AM Changeset in webkit [239610] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebDriver

WebDriver: element click command should handle user prompts
https://bugs.webkit.org/show_bug.cgi?id=193139

Reviewed by Michael Catanzaro.

  • Session.cpp:

(WebDriver::Session::elementClick): Handle user prompts.

7:32 AM Changeset in webkit [239609] by Alan Bujtas
  • 11 edits in trunk/Source/WebCore

[LFC] ComputedHorizontalMargin should have optional members
https://bugs.webkit.org/show_bug.cgi?id=193131

Reviewed by Antti Koivisto.

Split HorizontalMargin into UsedHorizontalMargin and ComputedHorizontalMargin. ComputedHorizontalMargin's members are optional.
(see computed vs used values)

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

(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin):
(WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue): Deleted.

  • layout/LayoutUnits.h:
  • layout/MarginTypes.h:
  • layout/Verification.cpp:

(WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

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

  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::setHorizontalMargin):
(WebCore::Display::Box::setHorizontalComputedMargin):
(WebCore::Display::Box::computedMarginStart const):
(WebCore::Display::Box::computedMarginEnd const):

  • layout/floats/FloatAvoider.h:

(WebCore::Layout::FloatAvoider::marginStart const):
(WebCore::Layout::FloatAvoider::marginEnd const):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):

  • layout/inlineformatting/InlineFormattingContextGeometry.cpp:

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

7:21 AM Changeset in webkit [239608] by Alan Bujtas
  • 12 edits in trunk/Source/WebCore

[LFC][BFC] Use computedValue and usedValue consistently
https://bugs.webkit.org/show_bug.cgi?id=193059

Reviewed by Antti Koivisto.

https://www.w3.org/TR/CSS22/cascade.html#value-stages

6.1.2 Computed values
Specified values are resolved to computed values during the cascade; for example URIs are made absolute and 'em' and 'ex' units
are computed to pixel or absolute lengths. Computing a value never requires the user agent to render the document...

6.1.3 Used values
Computed values are processed as far as possible without formatting the document. Some values, however, can only be determined when the document
is being laid out. For example, if the width of an element is set to be a certain percentage of its containing block, the width cannot be determined
until the width of the containing block has been determined. The used value is the result of taking the computed value and resolving any remaining
dependencies into an absolute value.

  • layout/FormattingContext.cpp:

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

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::complicatedCases):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):

  • layout/LayoutState.cpp:

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

  • layout/LayoutUnits.h:
  • layout/Verification.cpp:

(WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):

  • layout/blockformatting/BlockFormattingContext.cpp:

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

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

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

  • layout/displaytree/DisplayBox.cpp:

(WebCore::Display::Box::Box):

  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::setHasValidHorizontalComputedMargin):
(WebCore::Display::Box::setHorizontalComputedMargin):
(WebCore::Display::Box::computedMarginStart const):
(WebCore::Display::Box::computedMarginEnd const):
(WebCore::Display::Box::setHasValidHorizontalNonComputedMargin): Deleted.
(WebCore::Display::Box::setHorizontalNonComputedMargin): Deleted.
(WebCore::Display::Box::nonComputedMarginStart const): Deleted.
(WebCore::Display::Box::nonComputedMarginEnd const): Deleted.

  • layout/floats/FloatAvoider.h:

(WebCore::Layout::FloatAvoider::marginStart const):
(WebCore::Layout::FloatAvoider::marginEnd const):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const):

6:34 AM Changeset in webkit [239607] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Flaky Test: http/wpt/css/css-animations/start-animation-001.html
https://bugs.webkit.org/show_bug.cgi?id=190903

This patch modifies start-animation-001.html to rely on the square positions returned by the
Web Process in order to know when they are supposed to be rendered behind the covering rect.
This should make it more robust while still testing the original bug 186129.

Patch by Frederic Wang <fwang@igalia.com> on 2019-01-04
Reviewed by Antonio Gomes.

  • http/wpt/css/css-animations/start-animation-001.html:
3:34 AM Changeset in webkit [239606] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebDriver

[GLIB] WebDriver: browser close not correctly detected on session close in some cases
https://bugs.webkit.org/show_bug.cgi?id=193104

Reviewed by Michael Catanzaro.

This happens when the dbus connection is closed right before the response to SendMessageToBackend message is
going to be sent. In that case, g_dbus_connection_call async ready handler generates an error before the close
signal is emitted. Then, the close commands try to handle the error checking if SessionHost::isConnected(), but
it still returns true, because the browser is still alive, but the dbus connection has been closed.

  • glib/SessionHostGlib.cpp:

(WebDriver::SessionHost::isConnected const): Session is connected when launching or when dbus connection hasn't
been closed.

Jan 3, 2019:

6:54 PM Changeset in webkit [239605] by Ross Kirsling
  • 4 edits in trunk

test262-runner misbehaves when test file YAML has a trailing space
https://bugs.webkit.org/show_bug.cgi?id=193053

Reviewed by Yusuke Suzuki.

JSTests:

  • test262/expectations.yaml:

Mark two dozen tests as passing (and correct the output of another).

Tools:

  • Scripts/test262/Runner.pm:

(parseData):
Accept trailing space when parsing a test file's YAML block.

6:34 PM Changeset in webkit [239604] by Alan Bujtas
  • 3 edits
    2 adds in trunk

REGRESSION: -webkit-appearance test case crashes
https://bugs.webkit.org/show_bug.cgi?id=189302
<rdar://problem/44143049>

Reviewed by Wenson Hsieh.

Source/WebCore:

The painting and the layout positions of the cancel button need to match in order to be able to interact with it.
This patch removes the previous position inlining attempts.

Test: fast/forms/webkit-appearance-searchfield-cancel-button-crash.html

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::paintSearchFieldCancelButton):

LayoutTests:

  • fast/forms/webkit-appearance-searchfield-cancel-button-crash-expected.txt: Added.
  • fast/forms/webkit-appearance-searchfield-cancel-button-crash.html: Added.
5:08 PM Changeset in webkit [239603] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[iOS] Update sandbox profile to use iconservices instead of lsdiconservice
https://bugs.webkit.org/show_bug.cgi?id=193115
<rdar://problem/44867379>

Reviewed by Eric Carlson.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
4:22 PM Changeset in webkit [239602] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WebCore

Leak of WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback (48 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
<https://webkit.org/b/193122>
<rdar://problem/47022987>

Reviewed by Youenn Fablet.

  • Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:

(WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::AddRef const):
(WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::Release const):

  • Remove final keyword so that new rtc::RefCountedObject<RTCCertificateGeneratorCallback>() can be called.

(WebCore::LibWebRTCCertificateGenerator::generateCertificate):

  • To fix the leak call new rtc::RefCountedObject<RTCCertificateGeneratorCallback>() to create the object.
3:47 PM Changeset in webkit [239601] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

REGRESSION (r238090): After showing the Find banner or tab bar, hit tests are vertically offset (or painting is not offset)
https://bugs.webkit.org/show_bug.cgi?id=193124
rdar://problem/46755409

Reviewed by Tim Horton.

Top content inset feeds into scrolling tree geometry, so when it changes we need to trigger
an update of the root scrolling node, which happens via RenderLayerBacking::updateGeometry().
So set a dirty bit on the root layer in frameViewDidChangeSize(), which is called from the code
path that runs when top content inset changes.

Find banner behavior is not easily testable. platform/mac/fast/events/content-inset-hit-testing.html did not detect the regression.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::frameViewDidChangeSize):

3:25 PM Changeset in webkit [239600] by Chris Dumez
  • 3 edits
    7 adds in trunk

Potential infinite recursion in isFrameFamiliarWith(Frame&, Frame&)
https://bugs.webkit.org/show_bug.cgi?id=192997
<rdar://problem/46217271>

Reviewed by Antti Koivisto.

Source/WebCore:

isFrameFamiliarWith(Frame&, Frame&) was called recursively using the passed frames' openers.
The issue is that a Frame can be its opener. There could also be a cycle in the opener chain.

To address the issue, simplify isFrameFamiliarWith() so that it is no longer recursive. We now
only check if the frames belong to the same pages or if their openers do. We no longer check
openers' opener and up.

Note that this function is used to check if a frame is allowed to target another. In practice,
it is unlikely to be useful to navigate an opener's opener and an openee's openee.

Tests: fast/dom/Window/window-open-opener-cycle.html

fast/dom/Window/window-open-self-as-opener.html

  • page/FrameTree.cpp:

(WebCore::isFrameFamiliarWith):

LayoutTests:

Add layout test coverage.

  • fast/dom/Window/resources/window-open-opener-cycle2.html: Added.
  • fast/dom/Window/resources/window-open-opener-cycle3.html: Added.
  • fast/dom/Window/resources/window-opens-self.html: Added.
  • fast/dom/Window/window-open-opener-cycle-expected.txt: Added.
  • fast/dom/Window/window-open-opener-cycle.html: Added.
  • fast/dom/Window/window-open-self-as-opener-expected.txt: Added.
  • fast/dom/Window/window-open-self-as-opener.html: Added.
1:58 PM Changeset in webkit [239599] by Alan Coon
  • 2 edits in branches/safari-606-branch/Source/WebKit

Revert r239479. rdar://problem/46902869

1:58 PM Changeset in webkit [239598] by Alan Coon
  • 2 edits in branches/safari-606.4.5.0-branch/Source/WebKit

Revert r239479. rdar://problem/46902869

1:58 PM Changeset in webkit [239597] by Devin Rousso
  • 9 edits
    1 delete in trunk

Web Inspector: conic-gradient color picker doesn't accurately show color when saturation value is not 100%
https://bugs.webkit.org/show_bug.cgi?id=192729
<rdar://problem/46746815>

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

Rework WI.ColorWheel to use similar canvas drawing logic as WI.LegacyColorWheel so that
it's able to adjust the saturation value as the pixels gets closer to the center.

  • UserInterface/Models/Color.js:

(WI.Color.rgb2hsl): Added.
(WI.Color.hsl2rgb): Added.
(WI.Color.cmyk2rgb):
(WI.Color.prototype.isKeyword):
(WI.Color.prototype._toRGBString):
(WI.Color.prototype._toRGBAString):
(WI.Color.prototype._toHSLString):
(WI.Color.prototype._toHSLAString):
(WI.Color.prototype._rgbaToHSLA):
(WI.Color.prototype._hslaToRGBA):
(WI.Color.rgb2hsv): Deleted.
(WI.Color.hsv2rgb): Deleted.
(WI.Color.prototype._rgbToHSL): Deleted.
(WI.Color.prototype._hslToRGB): Deleted.
Adjust the conversion functions of WI.Color to be more accurate.

  • UserInterface/Views/ColorWheel.js:

(WI.ColorWheel):
(WI.ColorWheel.prototype.set dimension):
(WI.ColorWheel.prototype.set brightness):
(WI.ColorWheel.prototype.get tintedColor):
(WI.ColorWheel.prototype.set tintedColor):
(WI.ColorWheel.prototype._updateColorForMouseEvent):
(WI.ColorWheel.prototype._updateCanvas): Added.
(WI.ColorWheel.prototype._updateGradient): Deleted.

  • UserInterface/Views/ColorWheel.css:

(.color-wheel > canvas): Added.
(.color-wheel > .gradient): Deleted.

  • UserInterface/Views/ColorPicker.js:

(WI.ColorPicker):
(WI.ColorPicker.prototype.set color):
(WI.ColorPicker.prototype.sliderValueDidChange):
(WI.ColorPicker.prototype._updateSliders):
(WI.ColorPicker.prototype._showColorComponentInputs):
(WI.ColorPicker.supportsConicGradient): Deleted.

  • UserInterface/Main.html:
  • UserInterface/Views/LegacyColorWheel.js: Removed.

LayoutTests:

  • inspector/model/color.html:
  • inspector/model/color-expected.txt:
10:20 AM Changeset in webkit [239596] by Michael Catanzaro
  • 2 edits in trunk/Tools

UserMedia test should use WKPageNavigationClient
https://bugs.webkit.org/show_bug.cgi?id=192913

Reviewed by Youenn Fablet.

The test currently uses the deprecated WKPageLoaderClient. It should use
WKPageNavigationClient instead, which provides the same callback under a similar name.

  • TestWebKitAPI/Tests/WebKit/UserMedia.cpp:

(TestWebKitAPI::TEST):

9:58 AM Changeset in webkit [239595] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

DFG IntegerRangeOptimization phase exceeding loop limit shouldn't ASSERT
https://bugs.webkit.org/show_bug.cgi?id=193094

Reviewed by Saam Barati.

Removed this debug only ASSERT as one can construct test cases that will exceed the giveUpThreshold
amount. This can be done with a large switch statement with at least one const or variable case
clause. Such code bytecompiles to compare / jtrue sequences. Increasing the giveUpThreshold count
doesn't help with the eventual code generated as B3 has optimizations to coalesce compare / branch
code sequences even when we don't run the IntegerRangeOptimization phase.

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
9:44 AM Changeset in webkit [239594] by Brent Fulgham
  • 8 edits in trunk

Remove logic handling DNT header during redirects
https://bugs.webkit.org/show_bug.cgi?id=193082
<rdar://problem/45555965>

Reviewed by Chris Dumez.

Source/WebKit:

Test: http/wpt/fetch/dnt-header-after-redirection.html.

Don't bother looking for (or passing along) DNT headers during redirects.

  • NetworkProcess/NetworkLoadChecker.cpp:

(WebKit::NetworkLoadChecker::check):
(WebKit::NetworkLoadChecker::prepareRedirectedRequest): Deleted.

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

(WebKit::NetworkResourceLoader::restartNetworkLoad):
(WebKit::NetworkResourceLoader::continueWillSendRequest):

  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::willPerformHTTPRedirection):

LayoutTests:

Revise test case to reflect fact that we no longer include the DNT
header in redirects.

  • http/wpt/fetch/dnt-header-after-redirection-expected.txt:
  • http/wpt/fetch/dnt-header-after-redirection.html:
9:03 AM Changeset in webkit [239593] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Add release logging to help debug HTTPS upgrade issues
https://bugs.webkit.org/show_bug.cgi?id=193075

Reviewed by Alex Christensen.

Add release logging to help debug HTTPS upgrade issues like Bug 193026.

  • NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:

(WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker):
(WebKit::NetworkHTTPSUpgradeChecker::query):

8:51 AM Changeset in webkit [239592] by achristensen@apple.com
  • 6 edits in trunk/Source/WebKit

NetworkProcess should initialize its default NetworkSession with parameters from the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=192967

Reviewed by Brent Fulgham.

I moved 3 of the NetworkProcessCreationParameters to use corresponding values of a WebsiteDataStoreParameters.
More will be moved in the near future, like indexedDatabaseDirectory.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):

  • NetworkProcess/NetworkProcessCreationParameters.cpp:

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

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeNetworkProcess):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

8:03 AM Changeset in webkit [239591] by Simon Fraser
  • 4 edits
    2 adds in trunk

REGRESSION (r239306): Don't disable font smoothing in transparent layers on macOS Mojave and later
https://bugs.webkit.org/show_bug.cgi?id=193095
<rdar://problem/47014944>

Reviewed by Zalan Bujtas.

Source/WebCore:

In r239306 we stopped making CALayers for font-smoothed text when not necessary on macOS Mojave
and later. However, we still turned off smoothing for non-opaque layers (setShouldSmoothFonts(false)),
which continues to affect the appearance of text.

Fix by only calling setShouldSmoothFonts(false) when the OS supports font smoothing.

Test: compositing/contents-format/subpixel-antialiased-text.html

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayer::drawLayerContents):

LayoutTests:

A ref test that compares the rendering of layer and non-layer text with smoothing and antialiasing.

  • compositing/contents-format/subpixel-antialiased-text-expected.html: Added.
  • compositing/contents-format/subpixel-antialiased-text.html: Added.
  • platform/mac/TestExpectations:
7:38 AM Changeset in webkit [239590] by Wenson Hsieh
  • 6 edits
    2 adds in trunk

[iOS] REGRESSION (r239441): Tab cycling to offscreen <select> may not scroll it into view
https://bugs.webkit.org/show_bug.cgi?id=193084
<rdar://problem/47006882>

Reviewed by Simon Fraser.

Source/WebKit:

In WKWebView.mm, -_zoomToFocusRect: will ignore the given selection rect if it is of size { 0, 0 } and at
the origin. Prior to r239441, when using the tab key to move focus between non-editable form controls (or any
other method that doesn't involve tapping on the focused select element, with the exception of the next and
previous buttons in the input accessory view), we would compute a selection rect of {{ 0, 0 }, { 0, 0 }}, and
subsequently try to scroll the focused element to the center of the visible area, without taking the selection
rect into account.

However, after r239441, the web process sends the element interaction location to the UI process, which then
computes the selection rect by taking this location and adding a size of { 1, 1 } (before r239441, this was
done in WebPage::getAssistedNodeInformation). However, our new implementation doesn't take into account the
case where the element interaction rect is null, which happens when the last interaction location is outside of
the bounding rect of the element. In this case, we set the element interaction location to { 0, 0 } and end up
computing a selection rect of {{ 0, 0 }, { 1, 1 }} instead of {{ 0, 0 }, { 0, 0 }} as we would have
previously done. This causes us to scroll up to the origin, instead of revealing the focused element.

To fix this, we restore the pre-r239441 behavior. See additional comments below for details.

Test: fast/forms/ios/scroll-to-reveal-focused-select.html

  • Shared/FocusedElementInformation.cpp:

(WebKit::FocusedElementInformation::encode const):
(WebKit::FocusedElementInformation::decode):

  • Shared/FocusedElementInformation.h:

Rename elementInteractionLocation to lastInteractionLocation. This was previously
elementInteractionLocation due to existing logic that tries to move the interaction location into the bounding
rect of the element in the case where visual viewports are disabled; however, since this feature has long been
enabled by default for all modern WebKit clients (internal and external), it's simpler to just use always send
the last interaction location over to the UI process, and have the UI process use {{ 0, 0 }, { 0, 0 }} if
the interaction location is outside of the element rect.

In the very unlikely event that any modern WebKit client disables visual viewports, this will still behave
reasonably, since we'll just use {{ 0, 0 }, { 0, 0 }} as the target rect and scroll to reveal the entire
element rather than the top left corner of the element.

  • UIProcess/ios/WKContentViewInteraction.mm:

(rectToRevealWhenZoomingToFocusedElement):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

Move the check for whether the interaction location is inside the element's bounding rect from the web process
to the UI process. This relocates the logic to determine whether the selection rect should be a 1 by 1 fallback
interaction rect or the zero rect ({{ 0, 0 }, { 0, 0 }}) closer to the code that actually uses this rect.

(WebKit::WebPage::getFocusedElementInformation):

LayoutTests:

Add a layout test to verify that focusing a select element by tapping outside of it scrolls to reveal the
focused select element.

  • fast/forms/ios/scroll-to-reveal-focused-select-expected.txt: Added.
  • fast/forms/ios/scroll-to-reveal-focused-select.html: Added.
7:34 AM Changeset in webkit [239589] by Wenson Hsieh
  • 11 edits
    1 copy in trunk/Source/WebKit

WebUndoStep's monotonically increasing identifier should be a WebUndoStepID instead of uint64_t
https://bugs.webkit.org/show_bug.cgi?id=193100

Reviewed by Simon Fraser.

Add a type alias, WebUndoStepID, to represent the monotonically increasing undo step ID for each undoable
editing command, and use this type alias in lieu of uint64_t. No change in behavior.

  • UIProcess/WebEditCommandProxy.cpp:

(WebKit::WebEditCommandProxy::WebEditCommandProxy):

  • UIProcess/WebEditCommandProxy.h:

(WebKit::WebEditCommandProxy::create):
(WebKit::WebEditCommandProxy::commandID const):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::registerEditCommandForUndo):

  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::registerUndoStep):

Store the step ID in a temporary variable, since webUndoStep is now moved when calling addWebUndoStep.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::webUndoStep):
(WebKit::WebPage::addWebUndoStep):

Make this take a Ref<WebUndoStep>&& instead of a WebUndoStep*, and use move semantics to transfer the
given Ref to the table.

(WebKit::WebPage::removeWebEditCommand):
(WebKit::WebPage::unapplyEditCommand):
(WebKit::WebPage::reapplyEditCommand):

Use auto* in a couple of places.

(WebKit::WebPage::didRemoveEditCommand):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebUndoStep.cpp:

(WebKit::generateUndoStep):

  • WebProcess/WebPage/WebUndoStep.h:

(WebKit::WebUndoStep::stepID const):
(WebKit::WebUndoStep::WebUndoStep):

  • WebProcess/WebPage/WebUndoStepID.h: Copied from Source/WebKit/WebProcess/WebPage/WebUndoStep.cpp.
Note: See TracTimeline for information about the timeline view.