Timeline



Jan 9, 2019:

9:23 PM Changeset in webkit [239818] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari Technology Preview 73

Added a tag for Safari Technology Preview release 73.

8:15 PM Changeset in webkit [239817] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

Unreviewed build fix after r239816.

Although EWS had no problem with the patch, I'm seeing build errors on the actual bots.
This patch corrects the problem.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::logFrameNavigation):
(WebKit::NetworkProcess::logUserInteraction):

7:28 PM Changeset in webkit [239816] by Brent Fulgham
  • 19 edits in trunk/Source/WebKit

Create a WebResourceLoadStatisticsStore attached to the NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=193261
<rdar://problem/47158616>

Reviewed by Alex Christensen.

This patch modifies NetworkSession so that it owns a WebResourceLoadStatisticsStore
object. This object is only created if the ResourceLoadStatistics feature is turned on.

The patch also modifies WebResourceLoadStatisticsStore so that it can be constructed
with an owning NetworkSession as an alternative to the current practice of using a
WebsiteDataStore object.

Two initial messages from the WebContent process are added (logFrameNavigation and
logUserNavigation) that notify the network process of these actions. Currently they
are called in addition the calls to the WebsiteDataStore object. These redundant calls
will be removed in a future patch.

This patch forces the ResourceLoadStatistics code in the NetworkSession to be off by
default, so there should be no change in behavior with this patch.

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::updateClientSideCookiesAgeCap):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
(WebKit::WebResourceLoadStatisticsStore::hasStorageAccessForFrame):
(WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
(WebKit::WebResourceLoadStatisticsStore::grantStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::callGrantStorageAccessHandler):
(WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::logFrameNavigation):
(WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCapForPrevalentResources):
(WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
(WebKit::WebResourceLoadStatisticsStore::updatePrevalentDomainsToBlockCookiesFor):
(WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
(WebKit::WebResourceLoadStatisticsStore::removePrevalentDomains):
(WebKit::WebResourceLoadStatisticsStore::callRemoveDomainsHandler):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::logFrameNavigation):
(WebKit::NetworkProcess::logUserInteraction):

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

(WebKit::NetworkSession::enableResourceLoadStatistics):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::resourceLoadStatistics const):

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

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

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

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeNetworkProcess):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didLogUserInteraction):

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

(WebsiteDataStore::parameters):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::logFrameNavigation):

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

(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::initializeNewWebProcess):

7:08 PM Changeset in webkit [239815] by achristensen@apple.com
  • 37 edits
    2 deletes in trunk/Source/WebKit

Replace SessionTracker with HashMap member of NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=193266

Reviewed by Joseph Pecoraro.

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::startDownload):

  • NetworkProcess/Downloads/DownloadManager.h:
  • NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:

(WebKit::Download::resume):

  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::startPreflight):

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::preconnectTo):
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
(WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
(WebKit::NetworkConnectionToWebProcess::destroyLegacyPrivateBrowsingSession):

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

(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::clearCachedCredentials):
(WebKit::NetworkProcess::networkSession):
(WebKit::NetworkProcess::setSession):
(WebKit::NetworkProcess::destroySession):
(WebKit::NetworkProcess::preconnectTo):

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

(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::sendResultForCacheEntry):
(WebKit::NetworkResourceLoader::shouldLogCookieInformation):
(WebKit::NetworkResourceLoader::logCookieInformation const):
(WebKit::logBlockedCookieInformation):
(WebKit::logCookieInformationInternal):
(WebKit::NetworkResourceLoader::logCookieInformation):

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

(WebKit::PingLoad::loadRequest):

  • NetworkProcess/PingLoad.h:
  • NetworkProcess/PreconnectTask.cpp:

(WebKit::PreconnectTask::PreconnectTask):

  • NetworkProcess/PreconnectTask.h:
  • NetworkProcess/RemoteNetworkingContext.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:
  • NetworkProcess/mac/RemoteNetworkingContext.mm:

(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):

  • Shared/SessionTracker.cpp: Removed.
  • Shared/SessionTracker.h: Removed.
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::setPrivateBrowsingEnabled):

  • WebProcess/Network/WebLoaderStrategy.cpp:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
  • WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::destroyLegacyPrivateBrowsingSessionInNetworkProcess):

  • WebProcess/WebProcess.h:
  • WebProcess/cocoa/WebProcessCocoa.mm:
6:27 PM Changeset in webkit [239814] by rniwa@webkit.org
  • 6 edits in trunk/Source/WebCore

ThreadTimers should not store a raw pointer in its heap
https://bugs.webkit.org/show_bug.cgi?id=192975
<rdar://problem/46893946>

Reviewed by Geoffrey Garen.

Right now, ThreadTimers's heap data structure stores a raw pointer to TimerBase. In order to harden the timer code,
this patch replaces it with ThreadTimerHeapItem, a newly introduced struct, which effectively acks like
WeakReference<TimerBase*> as the timer heap and TimerBase both store RefPtr to it, and TimerBase's destructor clears
the raw pointer back to TimerBase*.

This approach was taken instead of an out-right adoptation of WeakPtr since the heap data structure requires each node
in the heap to have a fixed "priority" yet WeakPtr with no valid pointer back to TimerBase would effectively lose its
"priority" thereby corrupting the heap data structure. That is, each item in the heap must remember its fire time and
insertion order even when the underlying TimerBase had gone away (this should never happen but the whole point of this
hardening is to make it work even in the precense of such a bug).

This patch also moves the heap index in TimerBase to ThreadTimerHeapItem, and replaces the pointer to the heap vector
in TimerBase by a reference to ThreadTimers in ThreadTimerHeapItem. Note that ThreadTimers is a per-thread singleton.

The correctness of this hardening was tested by commenting out the call to stop() and !isInHeap() assertion in
TimerBase::~TimerBase() as well as the !isInHeap() assertion in ThreadTimerHeapItem::clearTimer() and observing that
layout tests run successfully without hitting any debug assertions.

No new tests since there should be no observable behavior difference.

  • WebCore.xcodeproj/project.pbxproj: Export ThreadTimers.h as a private header since it's now included in Timer.h
  • platform/ThreadTimers.cpp:

(WebCore::ThreadTimers::updateSharedTimer): Delete ThreadTimerHeapItem's with nullptr TimerBase* (TimerBase had
already been deleted). This should only happen when TimerBase's destructor failed to remove itself from the timer heap,
which should never happen.
(WebCore::ThreadTimers::sharedTimerFiredInternal): Ditto. Also removed the redundant code which had removed the timer
from the heap since setNextFireTime does the removal already.

  • platform/ThreadTimers.h: Outdented the whole file.

(WebCore::ThreadTimers::timerHeap): We use Vector<RefPtr<ThreadTimerHeapItem>> instead of Vector<Ref<~>> since Ref<~>
doesn't have a copy constructor which is used by std::push_heap.
(WebCore::ThreadTimerHeapItem): Added.
(WebCore::ThreadTimerHeapItem::hasTimer const): Added.
(WebCore::ThreadTimerHeapItem::setNotInHeap): Added. ThreadTimerHeapItem uses unsigned -1 as the single value which
signifies the item not being in the heap instead of all negative values as in the old code in TimerBase.
(WebCore::ThreadTimerHeapItem::isInHeap const): Added.
(WebCore::ThreadTimerHeapItem::isFirstInHeap const): Added.
(WebCore::ThreadTimerHeapItem::timer): Added.
(WebCore::ThreadTimerHeapItem::clearTimer): Added.
(WebCore::ThreadTimerHeapItem::heapIndex const): Added.
(WebCore::ThreadTimerHeapItem::setHeapIndex): Added.
(WebCore::ThreadTimerHeapItem::timerHeap const): Added.

  • platform/Timer.cpp:

(WebCore::threadGlobalTimerHeap): This function is now only used in assertions.
(WebCore::ThreadTimerHeapItem::ThreadTimerHeapItem): Added.
(WebCore::ThreadTimerHeapItem::create): Added.
(WebCore::TimerHeapPointer::TimerHeapPointer):
(WebCore::TimerHeapPointer::operator-> const):
(WebCore::TimerHeapReference::TimerHeapReference): Added a copy constructor.
(WebCore::TimerHeapReference::copyRef const): Added.
(WebCore::TimerHeapReference::operator RefPtr<ThreadTimerHeapItem>& const):
(WebCore::TimerHeapPointer::operator* const):
(WebCore::TimerHeapReference::operator=): Use move assignment operator.
(WebCore::TimerHeapReference::swapWith):
(WebCore::TimerHeapReference::updateHeapIndex): Extracted to share code between two verions of operator=.
(WebCore::swap):
(WebCore::TimerHeapIterator::TimerHeapIterator):
(WebCore::TimerHeapIterator::operator-> const):
(WebCore::TimerHeapLessThanFunction::compare): Added variants which take RefPtr<ThreadTimerHeapItem>.
(WebCore::TimerHeapLessThanFunction::operator() const):
(WebCore::TimerBase::TimerBase):
(WebCore::TimerBase::~TimerBase):Clear the raw pointer in ThreadTimerHeapItem.
(WebCore::TimerBase::stop):
(WebCore::TimerBase::nextFireInterval const):
(WebCore::TimerBase::checkHeapIndex const): Added the consistency check for other items in the heap.
(WebCore::TimerBase::checkConsistency const):
(WebCore::TimerBase::heapDecreaseKey):
(WebCore::TimerBase::heapDelete):
(WebCore::TimerBase::heapDeleteMin):
(WebCore::TimerBase::heapIncreaseKey):
(WebCore::TimerBase::heapInsert):
(WebCore::TimerBase::heapPop):
(WebCore::TimerBase::heapPopMin):
(WebCore::TimerBase::heapDeleteNullMin): Added. Used to delete ThreadTimerHeapItem which no longer has a valid TimerBase.
(WebCore::parentHeapPropertyHolds):
(WebCore::childHeapPropertyHolds):
(WebCore::TimerBase::hasValidHeapPosition const):
(WebCore::TimerBase::updateHeapIfNeeded): Tweaked the heap index assertion as heapIndex() itself would assert when called
on an item with an invalid (-1) heap index.
(WebCore::TimerBase::setNextFireTime): Create ThreadTimerHeapItem. Note m_heapItem is never cleared until this TimerBase
is deleted.
(WebCore::TimerHeapReference::operator TimerBase* const): Deleted.

  • platform/Timer.h:

(WebCore::TimerBase): Replaced m_nextFireTime, m_heapIndex, m_heapInsertionOrder, and m_cachedThreadGlobalTimerHeap
by m_heapItem, RefPtr to an ThreadTimerHeapItem.
(WebCore::TimerBase::augmentFireInterval):
(WebCore::TimerBase::inHeap const):
(WebCore::TimerBase::nextFireTime const):
(WebCore::TimerBase::isActive const):
(WebCore::TimerBase:: const): Deleted.

6:20 PM Changeset in webkit [239813] by Fujii Hironori
  • 2 edits in trunk/Source/WTF

Use directory local sequential numbers for Unified Sources filenames instead of global sequential numbers for CMake
https://bugs.webkit.org/show_bug.cgi?id=192391

Reviewed by Don Olmstead.

Unified Source Builds are using global sequential numbers for
bundle filenames UnifiedSource{sequential-number}.cpp. As the
result, every new source file added would shift the next ones and
prevent compiler caches from speeding up consecutive builds e.g.
in git-bisect sessions.

Changed it to directory local sequential numbers,
UnifiedSource-{hash-of-dir-name}-{sequential-number-within-the-dir}.cpp.

This is affecting only CMake builds which is where no
'--max-cpp-bundle-count' nor '--max-obj-c-bundle-count' options
are set. Xcode builds still use the old convention.

  • Scripts/generate-unified-source-bundles.rb: Add new instance

variables @currentDirectory and @extraFiles to BundleManager.
Still use global sequential numbers if --max-cpp-bundle-count or
--max-obj-c-bundle-count is given.

6:04 PM Changeset in webkit [239812] by Fujii Hironori
  • 3 edits in trunk/Tools

[Win][MiniBrowser] wchar_t strings shouldn't be treated as BSTR
https://bugs.webkit.org/show_bug.cgi?id=193271

Reviewed by Brent Fulgham.

BSTR is a special data structure created by SysAllocString, not a
wchar_t null-terminated string.

  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::setDatabaseQuota): Use L"" instead of "" for _bstr_t.

  • MiniBrowser/win/MiniBrowserWebHost.cpp:

(MiniBrowserWebHost::didFinishLoadForFrame): Use _bstr_t to create
BSTR from wide string literals.

6:03 PM Changeset in webkit [239811] by Alan Coon
  • 7 edits in branches/safari-607-branch/Source

Versioning.

5:38 PM Changeset in webkit [239810] by sbarati@apple.com
  • 1 edit
    1 copy in trunk/Websites/browserbench.org

Merge the latest version of JetStream2.0 to browserbench.org.

Rubber-stamped by Ryosuke Niwa.

  • JetStream2.0: Copied from PerformanceTests/JetStream2.
5:38 PM Changeset in webkit [239809] by Alan Coon
  • 8 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r239777. rdar://problem/47158629

[PSON] Flash of blank content while transitioning from page A to page B.
https://bugs.webkit.org/show_bug.cgi?id=193283

Reviewed by Chris Dumez.

Layer tree is not frozen during WebPage construction. If the flush timer (started for the initial
empty document) manages to run before the actual page load starts, we'll get a flash.

  • Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode const): (WebKit::WebPageCreationParameters::decode):
  • Shared/WebPageCreationParameters.h:

Rename shouldDelayAttachingDrawingArea bit to isSwapFromSuspended and make it available on all platforms.

  • UIProcess/RemoteLayerTree/mac/ScrollerMac.h: Removed.
  • UIProcess/RemoteLayerTree/mac/ScrollerMac.mm: Removed.
  • UIProcess/RemoteLayerTree/mac/ScrollerPairMac.h: Removed.
  • UIProcess/RemoteLayerTree/mac/ScrollerPairMac.mm: Removed.
  • UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp: Removed.
  • UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h: Removed.
  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::swapToWebProcess): (WebKit::WebPageProxy::finishAttachingToWebProcess): (WebKit::WebPageProxy::initializeWebPage): (WebKit::WebPageProxy::continueNavigationInNewProcess):
  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp: (WebKit::m_shouldAttachDrawingAreaOnPageTransition):

Freeze the layer tree in WebPage constructor if this is a swap from a suspended process.

(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::didCompletePageTransition):

Unfreeze on first non-initial empty document page transition.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):

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

5:38 PM Changeset in webkit [239808] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebInspectorUI

Cherry-pick r239766. rdar://problem/47158780

Web Inspector: Styles: clicking on property that soon to be discarded shouldn't start selection
https://bugs.webkit.org/show_bug.cgi?id=193218
<rdar://problem/47098303>

Reviewed by Devin Rousso.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown): A style property may get removed on blur event, so propertyElement may get removed from the DOM right when mousedown event happens.

(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowClick):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):

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

5:38 PM Changeset in webkit [239807] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebInspectorUI

Cherry-pick r239762. rdar://problem/47158734

Web Inspector: Styles: Undo reverts all changes at once
https://bugs.webkit.org/show_bug.cgi?id=177676
<rdar://problem/34745031>

Reviewed by Devin Rousso.

Command-Z used to revert all changes at once because Web Inspector never
set any history checkpoints in the style editor.

  • UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
  • UserInterface/Views/SpreadsheetTextField.js: (WI.SpreadsheetTextField.prototype._handleBlur):

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

5:38 PM Changeset in webkit [239806] by Alan Coon
  • 7 edits
    1 add in branches/safari-607-branch

Cherry-pick r239758. rdar://problem/47158613

Blob references for System Previews don't get a correct file extension
https://bugs.webkit.org/show_bug.cgi?id=193268
<rdar://problem/47133037>

Reviewed by Tim Horton.

Source/WebCore:

Apple platforms don't yet have a mapping from the USD MIME type to
file extensions (and we support some non-standard MIME types), which
means that downloads from Blob references don't get correctly named.

Fix this by adding an explicit mapping between System Preview types
and ".usdz".

WebKit API test: _WKDownload.SystemPreviewUSDZBlobNaming

  • platform/MIMETypeRegistry.cpp: (WebCore::MIMETypeRegistry::isSystemPreviewMIMEType): Remove USE(SYSTEM_PREVIEW) since this applies to macOS and iOS now.
  • platform/MIMETypeRegistry.h:
  • platform/cocoa/MIMETypeRegistryCocoa.mm: (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): Add a mapping for USDZ.

Tools:

New test that a Blob download of a USDZ file gets named correctly.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/Download.mm: (-[BlobWithUSDZExtensionDownloadDelegate _download:decideDestinationWithSuggestedFilename:completionHandler:]): (-[BlobWithUSDZExtensionDownloadDelegate _downloadDidFinish:]): (TEST):
  • TestWebKitAPI/Tests/WebKitCocoa/SystemPreviewBlobNaming.html: Added.

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

5:38 PM Changeset in webkit [239805] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/JavaScriptCore

Cherry-pick r239755. rdar://problem/47158650

Leak of VectorBufferBase.m_buffer (16-64 bytes) under JSC::CompactVariableEnvironment in com.apple.WebKit.WebContent running layout tests
<https://webkit.org/b/193264>
<rdar://problem/46651026>

Reviewed by Yusuke Suzuki.

  • parser/VariableEnvironment.cpp: (JSC::CompactVariableMap::Handle::~Handle): Call delete on m_environment instead of fastFree() to make sure the destructors for the Vector instance variables are run. This fixes the leaks because calling fastFree() would only free the CompactVariableEnvironment object, but not the heap-based buffers allocated for the Vector instance variables.

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

5:38 PM Changeset in webkit [239804] by Alan Coon
  • 9 edits in branches/safari-607-branch

Cherry-pick r239746. rdar://problem/47158728

IDB storage of Crypto keys does not work in private browsing mode
https://bugs.webkit.org/show_bug.cgi?id=193219

Reviewed by Brady Eidson.

Source/WebCore:

https://trac.webkit.org/changeset/238677 moved from using a JSGlobalObject to a JSDOMGlobalObject for serialization/deserialization.
This does not work for crypto keys as they require not only a JSDOMGlobalObject but either a window or worker global object.

To fix the issue, revert 238677, and fix it by checking whether the dumping of an ArrayBuffer happens for a JSDOMGlobalObject or a JSGlobalObject.
If it is the latter, use JSC routines instead of toJS() which requires a JSDOMGlobalObject.

Covered by updated test.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp: (WebCore::IDBServer::UniqueIDBDatabase::databaseThreadVM): (WebCore::IDBServer::UniqueIDBDatabase::databaseThreadExecState):
  • bindings/js/JSDOMGlobalObject.cpp:
  • bindings/js/JSDOMGlobalObject.h:
  • bindings/js/JSDOMWrapper.cpp: (WebCore::JSDOMObject::JSDOMObject):
  • bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpArrayBufferView): (WebCore::CloneSerializer::toJSArrayBuffer):

LayoutTests:

Activate private browsing mode for these two tests.

  • crypto/subtle/rsa-indexeddb-non-exportable-private.html:
  • crypto/subtle/rsa-indexeddb-private.html:

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

5:38 PM Changeset in webkit [239803] by Alan Coon
  • 3 edits
    1 add in branches/safari-607-branch

Cherry-pick r239731. rdar://problem/47158715

LLInt put_by_id uses the wrong load instruction for loading flags from the metadata
https://bugs.webkit.org/show_bug.cgi?id=193221

Reviewed by Mark Lam.

JSTests:

  • stress/put-by-id-flags.js: Added. (f): (g): (numberOfDFGCompiles):

Source/JavaScriptCore:

The flags are only 4 bytes, but were loaded with loadp. It used to work,
since the flags were followed by a 4-byte padding, but it broke after the
struct was compacted in r239626.

  • llint/LowLevelInterpreter64.asm:

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

5:38 PM Changeset in webkit [239802] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r239715. rdar://problem/47158638

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):

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

5:38 PM Changeset in webkit [239801] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r239711. rdar://problem/47158701

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):

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

5:38 PM Changeset in webkit [239800] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebCore

Cherry-pick r239702. rdar://problem/47158664

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.

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

5:38 PM Changeset in webkit [239799] by Alan Coon
  • 16 edits
    2 adds in branches/safari-607-branch

Cherry-pick r239694. rdar://problem/47158722

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.

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

5:38 PM Changeset in webkit [239798] by Alan Coon
  • 4 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r239691. rdar://problem/47158674

[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):

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

5:37 PM Changeset in webkit [239797] by Alan Coon
  • 4 edits in branches/safari-607-branch

Cherry-pick r239688. rdar://problem/47158770

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.

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

5:37 PM Changeset in webkit [239796] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r239686. rdar://problem/47158659

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.

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

5:37 PM Changeset in webkit [239795] by Alan Coon
  • 3 edits
    1 move in branches/safari-607-branch/Tools

Cherry-pick r239676. rdar://problem/47158606

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):

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

4:40 PM Changeset in webkit [239794] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/JavaScriptCore

Apply patch. rdar://problem/47158817

4:34 PM Changeset in webkit [239793] by Alan Coon
  • 3 edits in branches/safari-607-branch/Source/WebInspectorUI

Cherry-pick r239690. rdar://problem/47158814

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):

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

4:31 PM Changeset in webkit [239792] by achristensen@apple.com
  • 10 edits
    1 copy in trunk/Source

Expand use of sourceApplicationAuditData
https://bugs.webkit.org/show_bug.cgi?id=192995
<rdar://problem/46627875>

Reviewed by Brady Eidson.

Source/WebKit:

sourceApplicationAuditData has been used for a long time on iOS, but it's needed on more platforms.
I also made it return an Optional instead of a bool and returning by reference. Ahhh. So much nicer.
The NetworkProcess needed an additional entitlement on Mac to continue to load anything, which is desirable.

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::sourceApplicationAuditData const):

  • Platform/IPC/Connection.h:
  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::getAuditToken):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::sourceApplicationAuditData const):

Source/WTF:

  • wtf/Platform.h:
4:19 PM Changeset in webkit [239791] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(239737) iOS quicklook tests should not dereference null
https://bugs.webkit.org/show_bug.cgi?id=193307

Reviewed by Brent Fulgham.

The quicklook tests rely on ResourceHandle on iOS for some reason.
This is a problem we'll fix later, but for now keep them working by not crashing.

  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::createNSURLConnection):
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
(WebCore::ResourceHandle::receivedCredential):

4:04 PM Changeset in webkit [239790] by Alan Coon
  • 1 copy in tags/Safari-607.1.20

Tag Safari-607.1.20.

3:30 PM Changeset in webkit [239789] by ap@apple.com
  • 3 edits in trunk/Tools

Tweak wording for build/version_check style checker error
https://bugs.webkit.org/show_bug.cgi?id=193256

Reviewed by Tim Horton.

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_os_version_checks):

  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(WebKitStyleTest.test_os_version_checks):

3:03 PM Changeset in webkit [239788] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Restore bytecode dumper's ability to dump jump target as offset#(->targetBytecodeIndex#).
https://bugs.webkit.org/show_bug.cgi?id=193300

Reviewed by Saam Barati.

For example, instead of:

[ 95] jtrue loc11, 9

We can now again (as before the bytecode format rewrite) have:

[ 95] jtrue loc11, 9(->104)

  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumper<Block>::printLocationAndOp):

  • bytecode/BytecodeDumper.h:

(JSC::BytecodeDumper::dumpValue):

2:45 PM Changeset in webkit [239787] by mark.lam@apple.com
  • 9 edits in trunk/Source

Gigacage disabling checks should handle the GIGACAGE_ALLOCATION_CAN_FAIL case properly.
https://bugs.webkit.org/show_bug.cgi?id=193292
<rdar://problem/46485450>

Reviewed by Yusuke Suzuki.

Source/bmalloc:

Previously, when GIGACAGE_ALLOCATION_CAN_FAIL is true, we allow the Gigacage to
be disabled if we fail to allocate memory for it. However, Gigacage::primitiveGigacageDisabled()
still always assumes that the Gigacage is always enabled after ensureGigacage() is
called.

This patch updates Gigacage::primitiveGigacageDisabled() to allow the Gigacage to
already be disabled if GIGACAGE_ALLOCATION_CAN_FAIL is true and wasEnabled() is
false.

In this patch, we also put the wasEnabled flag in the 0th slot of the
g_gigacageBasePtrs buffer to ensure that it is also protected against writes just
like the Gigacage base pointers.

To achieve this, we do the following:

  1. Added a reservedForFlags field in struct BasePtrs.
  2. Added a ReservedForFlagsAndNotABasePtr Gigacage::Kind.
  3. Added assertions to ensure that the BasePtrs::primitive is at the offset matching the offset computed from Gigacage::Primitive. Ditto for BasePtrs::jsValue and Gigacage::JSValue.
  4. Added assertions to ensure that Gigacage::ReservedForFlagsAndNotABasePtr is not used for fetching a Gigacage base pointer.
  5. Added RELEASE_BASSERT_NOT_REACHED() to implement such assertions in bmalloc.

No test added because this issue requires Gigacage allocation to fail in order to
manifest. I've tested it manually by modifying the code locally to force an
allocation failure.

  • bmalloc/BAssert.h:
  • bmalloc/Gigacage.cpp:

(Gigacage::ensureGigacage):
(Gigacage::primitiveGigacageDisabled):

  • bmalloc/Gigacage.h:

(Gigacage::wasEnabled):
(Gigacage::setWasEnabled):
(Gigacage::name):
(Gigacage::basePtr):
(Gigacage::size):

  • bmalloc/HeapKind.h:

(bmalloc::heapKind):

Source/JavaScriptCore:

  • runtime/VM.h:

(JSC::VM::gigacageAuxiliarySpace):

Source/WTF:

Update the USE_SYSTEM_MALLOC version of Gigacage.h to match the bmalloc version.

  • wtf/Gigacage.h:
2:25 PM Changeset in webkit [239786] by Alan Bujtas
  • 5 edits
    2 adds in trunk

[Datalist] Crash when input with datalist is dynamically added.
https://bugs.webkit.org/show_bug.cgi?id=193012
<rdar://problem/45923457>

Reviewed by Brent Fulgham.

Source/WebCore:

In certain cases (cloning, setAttribute), it's too early to check for the list attribute in createShadowSubtree
to see whether the input needs datalist related items. The list attribute is simply not set yet.
This patch only addresses the obvious crash. m_dataListDropdownIndicator clearly lacks proper lifecycle management (see webkit.org/b/193032).

Test: fast/forms/datalist/datalist-crash-when-dynamic.html

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::createShadowSubtree):
(WebCore::TextFieldInputType::attributeChanged):
(WebCore::TextFieldInputType::createDataListDropdownIndicator):

  • html/TextFieldInputType.h:

LayoutTests:

  • fast/forms/datalist/datalist-crash-when-dynamic-expected.txt: Added.
  • fast/forms/datalist/datalist-crash-when-dynamic.html: Added.
2:24 PM Changeset in webkit [239785] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Add link to bug along with bug title
https://bugs.webkit.org/show_bug.cgi?id=193293

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(ValidatePatch._is_bug_closed): Fetch bug title from Bugzilla and add it to the build.
(ConfigureBuild.add_bug_id_url): Deleted.
(ConfigureBuild.getBugURL): Deleted.

2:08 PM Changeset in webkit [239784] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Use https for ews-build server
https://bugs.webkit.org/show_bug.cgi?id=193193

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:
1:59 PM Changeset in webkit [239783] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews-build] Parse and display number of style failures
https://bugs.webkit.org/show_bug.cgi?id=193280

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(CheckStyle): Use TestWithFailureCount as base class.
(CheckStyle.countFailures): Count the number of style failures.

1:56 PM Changeset in webkit [239782] by aakash_jain@apple.com
  • 4 edits in trunk/Tools

[ews-build] use patch_id instead of ewspatchid
https://bugs.webkit.org/show_bug.cgi?id=193235

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/factories.py: Replaced ewspatchid with patch_id.
  • BuildSlaveSupport/ews-build/steps.py: Ditto.
  • BuildSlaveSupport/ews-build/steps_unittest.py: Ditto.
12:47 PM Changeset in webkit [239781] by Alan Coon
  • 2 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r239776. rdar://problem/47147610

WebKit Networking process crashes if the HTTPSUpgradeList is not found in the bundle
https://bugs.webkit.org/show_bug.cgi?id=193285
<rdar://problem/47147610>

Reviewed by Geoffrey Garen.

  • NetworkProcess/NetworkHTTPSUpgradeChecker.cpp: (WebKit::networkHTTPSUpgradeCheckerDatabasePath): (WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker):

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

12:05 PM Changeset in webkit [239780] by Justin Fan
  • 6 edits in trunk

[WebGPU] Fix vertex-buffer-triangle-strip test and small update to GPURenderPipeline
https://bugs.webkit.org/show_bug.cgi?id=193289

Reviewed by Dean Jackson.

Source/WebCore:

Fix broken test after pipeline layouts were added, and a small refactoring to GPURenderPipeline to avoid
retaining its descriptor after creation.

  • platform/graphics/gpu/GPURenderPipeline.h:

(WebCore::GPURenderPipeline::primitiveTopology const):

  • platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:

(WebCore::GPURenderPipeline::GPURenderPipeline):

LayoutTests:

Fix broken test after pipeline layouts were added.

  • webgpu/js/webgpu-functions.js:

(createBasicPipeline): Ensure pipeline layout is actually optional.

  • webgpu/vertex-buffer-triangle-strip.html:
11:38 AM Changeset in webkit [239779] by Devin Rousso
  • 6 edits in trunk/Source

Web Inspector: Protocol Logging: log messages as objects if inspector2 is open
https://bugs.webkit.org/show_bug.cgi?id=193284

Reviewed by Joseph Pecoraro.

Source/WebCore:

No newe tests, as this is simply exposes a value.

  • inspector/InspectorFrontendHost.idl:
  • inspector/InspectorFrontendHost.h:
  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::isBeingInspected): Added.

Source/WebInspectorUI:

If inspector2 is closed, stringify all messages.
If inspector
2 is open, log each message JSON object without modifying it.

  • UserInterface/Protocol/LoggingProtocolTracer.js:

(WI.LoggingProtocolTracer.prototype._processEntry):

11:05 AM Changeset in webkit [239778] 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.

Add access to the 'com.apple.iconservices' endpoint. We will remove access to
the older name ('com.apple.lsdiconservices') once existing clients have completed
the switch.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
10:23 AM Changeset in webkit [239777] by Antti Koivisto
  • 8 edits in trunk/Source/WebKit

[PSON] Flash of blank content while transitioning from page A to page B.
https://bugs.webkit.org/show_bug.cgi?id=193283

Reviewed by Chris Dumez.

Layer tree is not frozen during WebPage construction. If the flush timer (started for the initial
empty document) manages to run before the actual page load starts, we'll get a flash.

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):

  • Shared/WebPageCreationParameters.h:

Rename shouldDelayAttachingDrawingArea bit to isSwapFromSuspended and make it available on all platforms.

  • UIProcess/RemoteLayerTree/mac/ScrollerMac.h: Removed.
  • UIProcess/RemoteLayerTree/mac/ScrollerMac.mm: Removed.
  • UIProcess/RemoteLayerTree/mac/ScrollerPairMac.h: Removed.
  • UIProcess/RemoteLayerTree/mac/ScrollerPairMac.mm: Removed.
  • UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp: Removed.
  • UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h: Removed.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::swapToWebProcess):
(WebKit::WebPageProxy::finishAttachingToWebProcess):
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::continueNavigationInNewProcess):

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

(WebKit::m_shouldAttachDrawingAreaOnPageTransition):

Freeze the layer tree in WebPage constructor if this is a swap from a suspended process.

(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::didCompletePageTransition):

Unfreeze on first non-initial empty document page transition.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):

10:09 AM Changeset in webkit [239776] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

WebKit Networking process crashes if the HTTPSUpgradeList is not found in the bundle
https://bugs.webkit.org/show_bug.cgi?id=193285
<rdar://problem/47147610>

Reviewed by Geoffrey Garen.

  • NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:

(WebKit::networkHTTPSUpgradeCheckerDatabasePath):
(WebKit::NetworkHTTPSUpgradeChecker::NetworkHTTPSUpgradeChecker):

10:03 AM Changeset in webkit [239775] by Alan Coon
  • 7 edits in branches/safari-607-branch/Source

Versioning.

9:40 AM Changeset in webkit [239774] by keith_miller@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

builtins should be able to use async/await
https://bugs.webkit.org/show_bug.cgi?id=193263

Reviewed by Saam Barati.

This patch makes it possible to use async functions when writing builtin JS code.

  • Scripts/wkbuiltins/builtins_generator.py:

(BuiltinsGenerator.generate_embedded_code_string_section_for_function):

  • Scripts/wkbuiltins/builtins_model.py:

(BuiltinFunction.init):
(BuiltinFunction.fromString):
(BuiltinFunction.str):

  • builtins/BuiltinExecutables.cpp:

(JSC::BuiltinExecutables::createExecutable):

  • builtins/ModuleLoader.js:

(requestInstantiate):
(async.loadModule):
(async.loadAndEvaluateModule):
(async.requestImportModule):
(loadModule): Deleted.
(): Deleted.
(loadAndEvaluateModule): Deleted.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseInner):

8:08 AM Changeset in webkit [239773] by Alan Bujtas
  • 15 edits in trunk

[LFC][BFC][MarginCollapsing] Add support for peculiar cases.
https://bugs.webkit.org/show_bug.cgi?id=192625

Reviewed by Antti Koivisto.

Source/WebCore:

Implement some of the more peculiar cases like margin collpasing through multiple boxes etc.
Add ~100 new passing cases.

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):

  • layout/LayoutState.h:

(WebCore::Layout::LayoutState::hasFormattingState const):

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

(WebCore::Layout::BlockFormattingContext::computeEstimatedMarginBefore const):
(WebCore::Layout::BlockFormattingContext::computeEstimatedMarginBeforeForAncestors const):
(WebCore::Layout::hasPrecomputedMarginBefore):
(WebCore::Layout::BlockFormattingContext::computeFloatingPosition const):
(WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats const):
(WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear const):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
(WebCore::Layout::BlockFormattingContext::adjustedVerticalPositionAfterMarginCollapsing const):

  • layout/blockformatting/BlockFormattingContext.h:

(WebCore::Layout::BlockFormattingContext::blockFormattingState const):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::estimatedMarginBefore): Deleted.
(WebCore::Layout::BlockFormattingContext::Geometry::estimatedMarginAfter): Deleted.

  • layout/blockformatting/BlockFormattingContextQuirks.cpp:

(WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
(WebCore::Layout::BlockFormattingContext::Quirks::shouldIgnoreMarginAfter):
(WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight): Deleted.

  • layout/blockformatting/BlockFormattingState.h:

(WebCore::Layout::BlockFormattingState::setPositiveAndNegativeVerticalMargin):
(WebCore::Layout::BlockFormattingState::hasPositiveAndNegativeVerticalMargin const):
(WebCore::Layout::BlockFormattingState::positiveAndNegativeVerticalMargin const):
(WebCore::Layout::BlockFormattingState::setHasEstimatedMarginBefore):
(WebCore::Layout::BlockFormattingState::clearHasEstimatedMarginBefore):
(WebCore::Layout::BlockFormattingState::hasEstimatedMarginBefore const):

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::hasClearance):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSiblingMarginAfter):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithParentMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithLastInFlowChildMarginAfter):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithNextSiblingMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough):
(WebCore::Layout::computedPositiveAndNegativeMargin):
(WebCore::Layout::marginValue):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::updateCollapsedMarginAfter):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeValues):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::positiveNegativeMarginAfter):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::estimatedMarginBefore):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedVerticalValues):
(WebCore::Layout::BlockFormattingContext::MarginCollapse::computedNonCollapsedMarginBefore): Deleted.
(WebCore::Layout::BlockFormattingContext::MarginCollapse::computedNonCollapsedMarginAfter): Deleted.
(WebCore::Layout::BlockFormattingContext::MarginCollapse::nonCollapsedMarginBefore): Deleted.
(WebCore::Layout::BlockFormattingContext::MarginCollapse::nonCollapsedMarginAfter): Deleted.
(WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedMarginBeforeFromFirstChild): Deleted.
(WebCore::Layout::BlockFormattingContext::MarginCollapse::collapsedMarginAfterFromLastChild): Deleted.
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithPreviousSibling): Deleted.
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfterCollapsesWithNextSibling): Deleted.
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBefore): Deleted.
(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginAfter): Deleted.

  • layout/displaytree/DisplayBox.cpp:

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

  • layout/displaytree/DisplayBox.h:

(WebCore::Display::Box::hasClearance const):
(WebCore::Display::Box::setEstimatedMarginBefore):
(WebCore::Display::Box::estimatedMarginBefore const):
(WebCore::Display::Box::setHasClearance):
(WebCore::Display::Box::invalidateEstimatedMarginBefore):
(WebCore::Display::Box::setVerticalMargin):
(WebCore::Display::Box::rectWithMargin const):

  • layout/floats/FloatingContext.cpp:

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

  • layout/inlineformatting/InlineFormattingContext.cpp:

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

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:
7:30 AM Changeset in webkit [239772] by Michael Catanzaro
  • 57 edits in trunk/Tools

[WPE][GTK] Purge use of g_assert() under TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=192841

Reviewed by Carlos Garcia Campos.

There are separate g_assert_*() macros for use in tests, which we use inconsistently
currently. Use them always. We'll get nicer error messages now when tests fail, and the
assertions will now run during tests even if G_DISABLE_ASSERT is used when building.

Note that the documentation of g_assert() says that it is not to be used when writing tests.

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
  • TestWebKitAPI/Tests/WebKitGLib/EditorTest.cpp:

(WebKitWebEditorTest::testSelectionChanged):

  • TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:

(WebKitFrameTest::testMainFrame):
(WebKitFrameTest::testURI):
(WebKitFrameTest::testJavaScriptContext):
(WebKitFrameTest::testJavaScriptValues):

  • TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp:

(testWebViewAuthenticationRequest):
(testWebViewAuthenticationLoadCancelled):
(testWebViewAuthenticationFailure):
(testWebViewAuthenticationStorage):
(ProxyAuthenticationTest::ProxyAuthenticationTest):
(testWebViewAuthenticationProxy):
(testWebViewAuthenticationProxyHTTPS):

  • TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:

(testAutomationSessionRequestSession):

  • TestWebKitAPI/Tests/WebKitGLib/TestBackForwardList.cpp:

(testBackForwardListNavigation):
(testWebKitWebViewSessionState):
(testWebKitWebViewSessionStateWithFormData):

  • TestWebKitAPI/Tests/WebKitGLib/TestConsoleMessage.cpp:

(ConsoleMessageTest::consoleMessageReceivedCallback):
(testWebKitConsoleMessageConsoleAPI):
(testWebKitConsoleMessageJavaScriptException):
(testWebKitConsoleMessageNetworkError):
(testWebKitConsoleMessageSecurityError):

  • TestWebKitAPI/Tests/WebKitGLib/TestCookieManager.cpp:

(testCookieManagerAcceptPolicy):
(testCookieManagerCookiesChanged):
(testCookieManagerPersistentStorage):
(testCookieManagerPersistentStorageDeleteAll):
(testCookieManagerEphemeral):

  • TestWebKitAPI/Tests/WebKitGLib/TestDOMElement.cpp:

(testWebKitDOMElementAutoFill):

  • TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp:

(downloadLocalFileSuccessfully):
(createFileAtDestination):
(testDownloadOverwriteDestinationDisallowed):
(testDownloadLocalFileError):
(testDownloadRemoteFile):
(testDownloadRemoteFileError):
(testWebViewDownloadURI):
(testPolicyResponseDownload):
(testPolicyResponseDownloadCancel):
(testDownloadMIMEType):
(contextMenuCallback):
(testContextMenuDownloadActions):
(testBlobDownload):

  • TestWebKitAPI/Tests/WebKitGLib/TestEditor.cpp:

(testWebKitWebEditorSelectionChanged):

  • TestWebKitAPI/Tests/WebKitGLib/TestFrame.cpp:

(testWebKitFrameMainFrame):
(testWebKitFrameURI):
(testWebKitFrameJavaScriptContext):
(testWebKitFrameJavaScriptValues):

  • TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp:

(LoadStopTrackingTest::loadFailed):
(testWebViewTitle):
(testURIRequestHTTPHeaders):
(testURIRequestHTTPMethod):
(testURIResponseHTTPHeaders):
(testRedirectToDataURI):

  • TestWebKitAPI/Tests/WebKitGLib/TestMultiprocess.cpp:

(testProcessPerWebView):
(testWebProcessLimit):

  • TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp:

(testWebViewResources):
(testWebResourceLoading):
(testWebResourceSuggestedFilename):
(testWebResourceGetData):
(testWebResourceGetDataError):
(testWebViewResourcesHistoryCache):
(testWebResourceSendRequest):

  • TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp:

(testSSL):
(testInsecureContent):
(testTLSErrorsPolicy):
(testTLSErrorsRedirect):
(testTLSErrorsHTTPAuth):
(testLoadFailedWithTLSErrors):
(testSubresourceLoadFailedWithTLSErrors):
(httpsServerCallback):

  • TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:

(testWebViewCreateNavigationData):
(testWebViewJavaScriptDialogs):
(testWebViewWindowProperties):
(testWebViewMouseTarget):
(testWebViewFileChooserRequest):
(testWebViewColorChooserRequest):

  • TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:

(testWebExtensionGetTitle):
(testDocumentLoadedSignal):
(testWebKitWebViewProcessCrashed):
(testWebExtensionWindowObjectCleared):
(testWebExtensionIsolatedWorld):
(permissionRequestCallback):
(didAssociateFormControlsCallback):
(testWebExtensionFormControlsAssociated):
(FormSubmissionTest::FormSubmissionTest):
(FormSubmissionTest::testFormSubmissionResult):
(testWebExtensionFormSubmissionSteps):

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitFaviconDatabase.cpp:

(testNotInitialized):
(testClearDatabase):
(testPrivateBrowsing):
(testGetFavicon):
(testWebViewFavicon):

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitFindController.cpp:

(testFindControllerTextFound):
(testFindControllerTextNotFound):
(testFindControllerMatchCount):
(testFindControllerMaxMatchCount):
(testFindControllerNext):
(testFindControllerPrevious):
(testFindControllerCountedMatches):
(testFindControllerOptions):
(testFindControllerHide):
(testFindControllerInstance):
(testFindControllerGetters):

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitPolicyClient.cpp:

(testNavigationPolicy):
(testResponsePolicy):
(testNewWindowPolicy):

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitSecurityOrigin.cpp:

(testSecurityOriginBasicConstructor):
(testSecurityOriginURIConstructor):
(testSecurityOriginDefaultPort):
(testSecurityOriginFileURI):
(testOpaqueSecurityOrigin):

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:

(testWebKitSettings):
(testWebKitSettingsNewWithSettings):
(testWebKitSettingsUserAgent):

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp:

(testWebViewNewWithUserContentManager):
(isStyleSheetInjectedForURLAtPath):
(isScriptInjectedForURLAtPath):
(testUserContentManagerInjectedStyleSheet):
(testUserContentManagerInjectedScript):
(UserScriptMessageTest::scriptMessageReceived):
(UserScriptMessageTest::waitUntilMessageReceived):
(UserScriptMessageTest::runJavaScriptFinished):
(testUserContentManagerScriptMessageReceived):
(testUserContentManagerScriptMessageInWorldReceived):
(testUserContentManagerScriptMessageFromDOMBindings):

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:

(testWebContextDefault):
(testWebContextEphemeral):
(testWebContextGetPlugins):
(testWebContextURIScheme):
(testWebContextSpellChecker):
(testWebContextLanguages):
(consoleMessageReceivedCallback):
(testWebContextSecurityFileXHR):
(ProxyTest::ProxyTest):
(testWebContextProxySettings):

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:

(testWebViewWebContext):
(testWebViewWebBackend):
(testWebViewEphemeral):
(testWebViewCustomCharset):
(testWebViewSettings):
(testWebViewRunJavaScript):
(testWebViewCanShowMIMEType):
(testWebViewSubmitForm):
(testWebViewSave):
(testWebViewPageVisibility):
(testWebViewSnapshot):
(testWebViewNotification):
(testWebViewNotificationInitialPermissionAllowed):
(testWebViewNotificationInitialPermissionDisallowed):
(testWebViewIsPlayingAudio):

  • TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:

(WebsiteDataTest::WebsiteDataTest):
(WebsiteDataTest::remove):
(WebsiteDataTest::clear):
(testWebsiteDataConfiguration):
(testWebsiteDataEphemeral):
(testWebsiteDataCache):
(testWebsiteDataStorage):
(testWebsiteDataDatabases):
(testWebsiteDataAppcache):
(testWebsiteDataCookies):
(testWebsiteDataDeviceIdHashSalt):

  • TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:

(emitDocumentLoaded):
(emitURIChanged):
(sendRequestCallback):
(contextMenuCallback):
(consoleMessageSentCallback):
(emitFormControlsAssociated):
(formControlsAssociatedCallback):
(emitFormSubmissionEvent):
(willSubmitFormCallback):
(windowObjectCleared):
(methodCallCallback):
(registerGResource):
(webkit_web_extension_initialize_with_user_data):

  • TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:

(checkLeaks):
(WebProcessTest::create):
(runTest):

  • TestWebKitAPI/Tests/WebKitGtk/AutocleanupsTest.cpp:

(AutocleanupsTest::testWebProcessAutocleanups):

  • TestWebKitAPI/Tests/WebKitGtk/DOMClientRectTest.cpp:

(WebKitDOMClientRectTest::testDivBoundingClientRectPosition):
(WebKitDOMClientRectTest::testDivClientRectsPositionAndLength):

  • TestWebKitAPI/Tests/WebKitGtk/DOMDOMWindowTest.cpp:

(WebKitDOMDOMWindowTest::testSignals):
(WebKitDOMDOMWindowTest::testDispatchEvent):
(WebKitDOMDOMWindowTest::testGetComputedStyle):

  • TestWebKitAPI/Tests/WebKitGtk/DOMNodeFilterTest.cpp:

(WebKitDOMNodeFilterTest::testTreeWalker):
(WebKitDOMNodeFilterTest::testNodeIterator):

  • TestWebKitAPI/Tests/WebKitGtk/DOMNodeTest.cpp:

(WebKitDOMNodeTest::testHierarchyNavigation):
(WebKitDOMNodeTest::testInsertion):
(WebKitDOMNodeTest::testTagNamesNodeList):
(WebKitDOMNodeTest::testTagNamesHTMLCollection):
(WebKitDOMNodeTest::testDOMCache):

  • TestWebKitAPI/Tests/WebKitGtk/DOMXPathNSResolverTest.cpp:

(WebKitDOMXPathNSResolverTest::evaluateFooChildTextAndCheckResult):
(WebKitDOMXPathNSResolverTest::testXPathNSResolverNative):
(WebKitDOMXPathNSResolverTest::testXPathNSResolverCustom):

  • TestWebKitAPI/Tests/WebKitGtk/TestAutocleanups.cpp:

(testUIProcessAutocleanups):
(testWebProcessAutocleanups):

  • TestWebKitAPI/Tests/WebKitGtk/TestContextMenu.cpp:

(testContextMenuPopulateMenu):
(testContextMenuDismissed):

  • TestWebKitAPI/Tests/WebKitGtk/TestDOMClientRect.cpp:

(testWebKitDOMClientRectDivBoundingClientRectPosition):
(testWebKitDOMClientRectDivClientRectsPositionAndLength):

  • TestWebKitAPI/Tests/WebKitGtk/TestDOMDOMWindow.cpp:

(testWebKitDOMDOMWindowSignals):
(testWebKitDOMDOMWindowDispatchEvent):
(testWebKitDOMDOMWindowGetComputedStyle):

  • TestWebKitAPI/Tests/WebKitGtk/TestDOMNode.cpp:

(testWebKitDOMNodeHierarchyNavigation):
(testWebKitDOMNodeInsertion):
(testWebKitDOMNodeTagNamesNodeList):
(testWebKitDOMNodeTagNamesHTMLCollection):
(testWebKitDOMObjectCache):

  • TestWebKitAPI/Tests/WebKitGtk/TestDOMNodeFilter.cpp:

(testWebKitDOMNodeFilterTreeWalker):
(testWebKitDOMNodeFilterNodeIterator):

  • TestWebKitAPI/Tests/WebKitGtk/TestDOMXPathNSResolver.cpp:

(testWebKitDOMXPathNSResolverNative):
(testWebKitDOMXPathNSResolverCustom):

  • TestWebKitAPI/Tests/WebKitGtk/TestInspector.cpp:

(testInspectorDefault):
(testInspectorManualAttachDetach):
(testInspectorCustomContainerDestroyed):

  • TestWebKitAPI/Tests/WebKitGtk/TestInspectorServer.cpp:

(startTestServer):
(testInspectorServerPageList):

  • TestWebKitAPI/Tests/WebKitGtk/TestOptionMenu.cpp:

(OptionMenuTest::showOptionMenuCallback):
(OptionMenuTest::menuCloseCallback):
(OptionMenuTest::close):
(OptionMenuTest::activateItem):
(OptionMenuTest::selectItem):
(testOptionMenuSimple):
(testOptionMenuGroups):
(testOptionMenuActivate):
(testOptionMenuSelect):

  • TestWebKitAPI/Tests/WebKitGtk/TestPrinting.cpp:

(testPrintOperationPrintSettings):
(webViewPrintCallback):
(testPrintOperationPrint):
(testPrintCustomWidget):

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(checkAtspiAccessible):
(testAtspiBasicHierarchy):

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitVersion.cpp:

(testWebKitCheckVersion):

  • TestWebKitAPI/Tests/WebKitGtk/TestWebViewEditor.cpp:

(testWebViewEditorCutCopyPasteNonEditable):
(testWebViewEditorCutCopyPasteEditable):
(testWebViewEditorSelectAllNonEditable):
(testWebViewEditorSelectAllEditable):
(loadContentsAndTryToCutSelection):
(testWebViewEditorNonEditable):
(testWebViewEditorEditable):
(testWebViewEditorEditorStateTypingAttributes):
(testWebViewEditorInsertImage):
(testWebViewEditorCreateLink):

  • TestWebKitAPI/glib/WebKitGLib/LoadTrackingTest.cpp:

(loadChangedCallback):
(loadFailedCallback):
(loadFailedWithTLSErrorsCallback):
(LoadTrackingTest::LoadTrackingTest):

  • TestWebKitAPI/glib/WebKitGLib/TestMain.cpp:

(registerGResource):
(removeNonEmptyDirectory):

  • TestWebKitAPI/glib/WebKitGLib/TestMain.h:

(Test::adoptView):
(Test::~Test):

  • TestWebKitAPI/glib/WebKitGLib/WebKitTestBus.cpp:

(WebKitTestBus::getOrCreateConnection):
(WebKitTestBus::createProxy):

  • TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp:

(WebKitTestServer::getWebSocketURIForPath const):

  • TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:

(WebViewTest::initializeWebView):
(WebViewTest::loadURI):
(WebViewTest::loadHtml):
(WebViewTest::loadPlainText):
(WebViewTest::loadBytes):
(WebViewTest::loadRequest):
(WebViewTest::loadAlternateHTML):
(WebViewTest::goBack):
(WebViewTest::goForward):
(WebViewTest::goToBackForwardListItem):
(resourceGetDataCallback):
(WebViewTest::mainResourceData):
(WebViewTest::javascriptResultToCString):
(WebViewTest::javascriptResultToNumber):
(WebViewTest::javascriptResultToBoolean):
(WebViewTest::javascriptResultIsNull):
(WebViewTest::javascriptResultIsUndefined):
(onSnapshotReady):
(WebViewTest::runWebProcessTest):

  • TestWebKitAPI/glib/WebKitGLib/gtk/WebViewTestGtk.cpp:

(WebViewTest::platformInitializeWebView):
(WebViewTest::showInWindow):
(WebViewTest::showInWindowAndWaitUntilMapped):
(WebViewTest::mouseMoveTo):
(WebViewTest::emitPopupMenuSignal):
(WebViewTest::keyStroke):
(WebViewTest::doMouseButtonEvent):

7:24 AM Changeset in webkit [239771] by Wenson Hsieh
  • 2 edits in trunk/LayoutTests

[iOS] editing/selection/ios/show-selection-in-empty-overflow-hidden-document.html often times out in internal automation
https://bugs.webkit.org/show_bug.cgi?id=193238

Reviewed by Megan Gardner.

Fix a flaky layout test that currently attempts to run the main logic of the test twice (once after the child
frame finishes loading, and another time after the main document finishes loading). This leads to a race
condition in the test where the incorrect text field is focused, causing the caret rect to deviate from the
expected value.

  • editing/selection/ios/show-selection-in-empty-overflow-hidden-document.html:
7:08 AM Changeset in webkit [239770] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

[GTK] Add missing autocleanups
https://bugs.webkit.org/show_bug.cgi?id=193068

Reviewed by Carlos Garcia Campos.

  • UIProcess/API/gtk/WebKitAutocleanups.h:
4:42 AM Changeset in webkit [239769] by Carlos Garcia Campos
  • 15 edits in trunk/LayoutTests

Unreviewed, rolling out r239565.

Rebaseline was not correct, changes were due to
webkit.org/b/193276

Reverted changeset:

"Unreviewed GTK+ gardening. Rebaseline several tests after
r239156."
https://trac.webkit.org/changeset/239565

4:39 AM Changeset in webkit [239768] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

REGRESSION(r239156): [FreeType] fixed width, and synthetic bold/italic not correctly applied since r239156
https://bugs.webkit.org/show_bug.cgi?id=193276

Reviewed by Žan Doberšek.

FontCache::createFontPlatformData() is calling getFontPropertiesFromPattern() with the configure pattern instead
of the result one after the match.

  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::FontCache::createFontPlatformData):

2:59 AM Changeset in webkit [239767] by Philippe Normand
  • 3 edits in trunk/Tools

[WPE] API tests can't run in flatpak environment
https://bugs.webkit.org/show_bug.cgi?id=193242

Reviewed by Michael Catanzaro.

  • Scripts/run-wpe-tests: Add --wpe to arguments passed to

flatpakutils so that it knows which port it's dealing with.

  • glib/common.py: Remove build_dir globals so that subsequent

calls actually take args into account.
(library_build_path):
(binary_build_path):

12:34 AM Changeset in webkit [239766] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles: clicking on property that soon to be discarded shouldn't start selection
https://bugs.webkit.org/show_bug.cgi?id=193218
<rdar://problem/47098303>

Reviewed by Devin Rousso.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
A style property may get removed on blur event, so propertyElement may get removed from the DOM right when mousedown event happens.

(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleWindowClick):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):

Jan 8, 2019:

10:35 PM Changeset in webkit [239765] by bshafiei@apple.com
  • 1 copy in tags/Safari-606.4.5.2.2

Tag Safari-606.4.5.2.2.

10:31 PM Changeset in webkit [239764] by bshafiei@apple.com
  • 2 edits in branches/safari-606.4.5.2-branch/Source/WebCore

Apply patch. rdar://problem/47109691

10:26 PM Changeset in webkit [239763] by bshafiei@apple.com
  • 7 edits in branches/safari-606.4.5.2-branch/Source

Versioning.

7:29 PM Changeset in webkit [239762] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles: Undo reverts all changes at once
https://bugs.webkit.org/show_bug.cgi?id=177676
<rdar://problem/34745031>

Reviewed by Devin Rousso.

Command-Z used to revert all changes at once because Web Inspector never
set any history checkpoints in the style editor.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):

  • UserInterface/Views/SpreadsheetTextField.js:

(WI.SpreadsheetTextField.prototype._handleBlur):

6:56 PM Changeset in webkit [239761] by yusukesuzuki@slowstart.org
  • 35 edits
    2 adds in trunk

Array.prototype.flat/flatMap have a minor bug in ArraySpeciesCreate
https://bugs.webkit.org/show_bug.cgi?id=193127

Reviewed by Saam Barati.

JSTests:

  • stress/array-species-create-should-handle-masquerader.js: Added.

(shouldThrow):

  • stress/is-undefined-or-null-builtin.js: Added.

(shouldBe):
(isUndefinedOrNull.vm.createBuiltin):

Source/JavaScriptCore:

== null is frequently used idiom to check null or undefined in JS.
However, it has a problem in terms of the builtin JS implementation: it
returns true if masquerade-as-undefined objects (e.g. document.all) come.

In this patch, we introduce a convenient builtin intrinsic @isUndefinedOrNull,
which is equivalent to C++ JSValue::isUndefinedOrNull. It does not consider
about masquerade-as-undefined objects, so that we can use it instead of
value === null || value === @undefined. We introduce is_undefined_or_null
bytecode, IsUndefinedOrNull DFG node and its DFG and FTL backends. Since
Null and Undefined have some bit patterns, we can implement this query
very efficiently.

  • builtins/ArrayIteratorPrototype.js:

(next):

  • builtins/ArrayPrototype.js:

(globalPrivate.arraySpeciesCreate):

  • builtins/GlobalOperations.js:

(globalPrivate.speciesConstructor):
(globalPrivate.copyDataProperties):
(globalPrivate.copyDataPropertiesNoExclusions):

  • builtins/MapIteratorPrototype.js:

(next):

  • builtins/SetIteratorPrototype.js:

(next):

  • builtins/StringIteratorPrototype.js:

(next):

  • builtins/StringPrototype.js:

(match):
(repeat):
(padStart):
(padEnd):
(intrinsic.StringPrototypeReplaceIntrinsic.replace):
(search):
(split):
(concat):
(globalPrivate.createHTML):

  • builtins/TypedArrayPrototype.js:

(globalPrivate.typedArraySpeciesConstructor):
(map):
(filter):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitIsUndefinedOrNull):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::BytecodeIntrinsicNode::emit_intrinsic_isUndefinedOrNull):

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

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

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

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

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):

  • jit/JIT.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_is_undefined_or_null):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_is_undefined_or_null):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
6:03 PM Changeset in webkit [239760] by Nikita Vasilyev
  • 75 edits in trunk/Source/WebInspectorUI

Web Inspector: Use prefers-color-scheme instead of prefers-dark-interface
https://bugs.webkit.org/show_bug.cgi?id=193265

Reviewed by Timothy Hatcher.

  • UserInterface/Views/AuditTestContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/AuditTestGroupContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/BezierEditor.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/BoxModelDetailsSectionRow.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/BreakpointActionView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/BreakpointPopoverController.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ButtonNavigationItem.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ButtonToolbarItem.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/CallFrameView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/CanvasContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/CanvasOverviewContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/CanvasSidebarPanel.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/CanvasTabContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/CodeMirrorOverrides.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/CompletionSuggestionsView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ComputedStyleDetailsPanel.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ComputedStyleSection.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ConsoleMessageView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ConsolePrompt.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/DOMNodeDetailsSidebarPanel.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/DOMTreeOutline.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/DataGrid.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/DebuggerDashboardView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/DebuggerSidebarPanel.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/DefaultDashboardView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/DetailsSection.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/DividerNavigationItem.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/Editing.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/FindBanner.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/FontResourceContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/FormattedValue.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/GeneralStyleDetailsSidebarPanel.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/HoverMenu.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ImageResourceContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/LogContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/Main.css:

(:root):

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/NetworkDetailView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/NetworkTableContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/NewTabContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ObjectPreviewView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ObjectTreePropertyTreeElement.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/OpenResourceDialog.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ProgressView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/QuickConsole.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/RecordingActionTreeElement.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/RecordingContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/RecordingStateDetailsSidebarPanel.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ResourceSecurityContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ResourceSizesContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ResourceTimingBreakdownView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ScopeBar.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ScopeChainDetailsSidebarPanel.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/SearchBar.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/SearchSidebarPanel.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/SettingsTabContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ShaderProgramContentView.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/ShaderProgramTreeElement.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/SourceCodeTextEditor.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/SyntaxHighlightingDefaultTheme.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/TabBar.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/Table.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/TextEditor.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/TimelineDataGrid.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/TimelineIcons.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/TimelineOverview.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/Toolbar.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/TreeOutline.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/URLBreakpointPopover.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/Variables.css:

(@media (prefers-color-scheme: dark)):

  • UserInterface/Views/WebSocketContentView.css:

(@media (prefers-color-scheme: dark)):

5:28 PM Changeset in webkit [239759] by achristensen@apple.com
  • 9 edits in trunk/Source/WebKit

Fix CompletionHandler assertions introduced today.
https://bugs.webkit.org/show_bug.cgi?id=193237

This reverts part of r239710 and all of r239725, r239738, and r239748 which unsuccessfully tried to fix all the assertions.
This code is a mess that will have to be cleaned up later.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::from):

  • NetworkProcess/cache/CacheStorageEngine.h:
  • 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:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::Storage::store):
(WebKit::NetworkCache::Storage::WriteOperation::~WriteOperation): Deleted.

  • NetworkProcess/cache/NetworkCacheStorage.h:

(WebKit::NetworkCache::Storage::store):

5:17 PM Changeset in webkit [239758] by dino@apple.com
  • 7 edits
    1 add in trunk

Blob references for System Previews don't get a correct file extension
https://bugs.webkit.org/show_bug.cgi?id=193268
<rdar://problem/47133037>

Reviewed by Tim Horton.

Source/WebCore:

Apple platforms don't yet have a mapping from the USD MIME type to
file extensions (and we support some non-standard MIME types), which
means that downloads from Blob references don't get correctly named.

Fix this by adding an explicit mapping between System Preview types
and ".usdz".

WebKit API test: _WKDownload.SystemPreviewUSDZBlobNaming

  • platform/MIMETypeRegistry.cpp:

(WebCore::MIMETypeRegistry::isSystemPreviewMIMEType): Remove USE(SYSTEM_PREVIEW) since
this applies to macOS and iOS now.

  • platform/MIMETypeRegistry.h:
  • platform/cocoa/MIMETypeRegistryCocoa.mm:

(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): Add a mapping
for USDZ.

Tools:

New test that a Blob download of a USDZ file gets named correctly.

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

(-[BlobWithUSDZExtensionDownloadDelegate _download:decideDestinationWithSuggestedFilename:completionHandler:]):
(-[BlobWithUSDZExtensionDownloadDelegate _downloadDidFinish:]):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/SystemPreviewBlobNaming.html: Added.
5:11 PM Changeset in webkit [239757] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebKit

[Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky
https://bugs.webkit.org/show_bug.cgi?id=192061

Reviewed by Dewei Zhu.

Part 6.

Add some additional temporary logging info to determine if data is actually sent.
Once the bug is determined and fixed, we should remove all logging added in this patch.

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:

(WebKit::MockHidConnection::send):

5:09 PM Changeset in webkit [239756] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebCore

Editable images sometimes don't become focused when tapped
https://bugs.webkit.org/show_bug.cgi?id=193259
<rdar://problem/47038424>

Reviewed by Wenson Hsieh.

Often when tapping an editable image inside an editable text area, the
text area's selection will change instead of focusing the editable image.

No new tests; I have had no luck writing a test that reliably failed
beforehand (the "sometimes" is a problem).

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::defaultEventHandler):

  • html/HTMLImageElement.h:

Override mousedown on editable images, focus the image, and prevent
the default behavior.

4:56 PM Changeset in webkit [239755] by ddkilzer@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Leak of VectorBufferBase.m_buffer (16-64 bytes) under JSC::CompactVariableEnvironment in com.apple.WebKit.WebContent running layout tests
<https://webkit.org/b/193264>
<rdar://problem/46651026>

Reviewed by Yusuke Suzuki.

  • parser/VariableEnvironment.cpp:

(JSC::CompactVariableMap::Handle::~Handle): Call delete on
m_environment instead of fastFree() to make sure the destructors
for the Vector instance variables are run. This fixes the leaks
because calling fastFree() would only free the
CompactVariableEnvironment object, but not the heap-based
buffers allocated for the Vector instance variables.

4:45 PM Changeset in webkit [239754] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore/platform/gtk/po

[GTK] Updated Swedish translation
https://bugs.webkit.org/show_bug.cgi?id=193257

Patch by Josef Andersson <josef.andersson@fripost.org> on 2019-01-08
Rubber-stamped by Michael Catanzaro.

  • sv.po:
4:39 PM Changeset in webkit [239753] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

ASSERT when paused in debugger and console evaluation causes exception
https://bugs.webkit.org/show_bug.cgi?id=193246

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2019-01-08
Reviewed by Mark Lam.

Source/JavaScriptCore:

  • runtime/VM.cpp:

(JSC::VM::throwException):
Improve assertion to allow for the debugger's evaluate on call frame condition.

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::callFrameAtDebuggerEntry const):
(JSC::JSGlobalObject::setCallFrameAtDebuggerEntry):
Debugger call frame only used by assertions.

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::evaluateWithScopeExtension):

  • debugger/DebuggerEvalEnabler.h:

(JSC::DebuggerEvalEnabler::DebuggerEvalEnabler):
(JSC::DebuggerEvalEnabler::~DebuggerEvalEnabler):
When evaluating on a call frame, set a debug GlobalObject state.

LayoutTests:

  • inspector/debugger/evaluateOnCallFrame-CommandLineAPI.html:

Correct a typo.

  • inspector/debugger/evaluateOnCallFrame-exception-expected.txt: Added.
  • inspector/debugger/evaluateOnCallFrame-exception.html: Added.

New test that would have asserted before.

4:35 PM Changeset in webkit [239752] by jiewen_tan@apple.com
  • 29 edits
    1 copy
    13 adds in trunk

[WebAuthN] Support U2F HID Authenticators on macOS
https://bugs.webkit.org/show_bug.cgi?id=191535
<rdar://problem/47102027>

Reviewed by Brent Fulgham.

Source/WebCore:

This patch changes U2fCommandConstructor to produce register commands with
enforcing test of user presence. Otherwise, authenticators would silently
generate credentials. It also renames readFromU2fSignResponse to
readU2fSignResponse.

Tests: http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html

http/wpt/webauthn/public-key-credential-create-failure-u2f.https.html
http/wpt/webauthn/public-key-credential-create-success-u2f.https.html
http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https.html
http/wpt/webauthn/public-key-credential-get-failure-u2f.https.html
http/wpt/webauthn/public-key-credential-get-success-u2f.https.html

  • Modules/webauthn/fido/U2fCommandConstructor.cpp:

(fido::WebCore::constructU2fRegisterCommand):

  • Modules/webauthn/fido/U2fResponseConverter.cpp:

(fido::readU2fSignResponse):
(fido::readFromU2fSignResponse): Deleted.

  • Modules/webauthn/fido/U2fResponseConverter.h:

Source/WebKit:

This patch implements the support for U2F authenticators, and enables it for hid devices.
It follows the CTAP spec to map WebAuthN requests to U2F commands and return the responses:
https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-client-to-authenticator-protocol-v2.0-id-20180227.html#u2f-interoperability
Most of the parts are done before this patch, this patch focues on: 7.2.2 and 7.3.2.

Besides implementing the U2fHidAuthenticator, this patch also adds support in the mocking
environment for U2F authenticators. It is done by extending the stages in MockHidConnection
from 4 to indefinite as multi-round communications are expected to map WebAuthN requests
to U2F requests.

  • Sources.txt:
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetWebAuthenticationMockConfiguration):

  • UIProcess/WebAuthentication/Cocoa/HidService.mm:

(WebKit::HidService::continueAddDeviceAfterGetInfo):

  • UIProcess/WebAuthentication/fido/CtapHidDriver.cpp:

(WebKit::CtapHidDriver::continueAfterChannelAllocated):

  • UIProcess/WebAuthentication/fido/CtapHidDriver.h:

(WebKit::CtapHidDriver::setProtocol):

  • UIProcess/WebAuthentication/fido/U2fHidAuthenticator.cpp: Added.

(WebKit::U2fHidAuthenticator::U2fHidAuthenticator):
(WebKit::U2fHidAuthenticator::makeCredential):
(WebKit::U2fHidAuthenticator::checkExcludeList):
(WebKit::U2fHidAuthenticator::issueRegisterCommand):
(WebKit::U2fHidAuthenticator::getAssertion):
(WebKit::U2fHidAuthenticator::issueSignCommand):
(WebKit::U2fHidAuthenticator::issueNewCommand):
(WebKit::U2fHidAuthenticator::issueCommand):
(WebKit::U2fHidAuthenticator::responseReceived):
(WebKit::U2fHidAuthenticator::continueRegisterCommandAfterResponseReceived):
(WebKit::U2fHidAuthenticator::continueCheckOnlyCommandAfterResponseReceived):
(WebKit::U2fHidAuthenticator::continueBogusCommandAfterResponseReceived):
(WebKit::U2fHidAuthenticator::continueSignCommandAfterResponseReceived):

  • UIProcess/WebAuthentication/fido/U2fHidAuthenticator.h: Added.
  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:

(WebKit::MockHidConnection::parseRequest):
(WebKit::MockHidConnection::feedReports):

  • UIProcess/WebAuthentication/Mock/MockHidConnection.h:
  • UIProcess/WebAuthentication/Mock/MockWebAuthenticationConfiguration.h:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

This patch:
1) adds support for U2F mocking mechanism;
2) updates tests to reflect U2fCommandConstructor changes.

  • TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/FidoTestData.h:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setWebAuthenticationMockConfiguration):

LayoutTests:

Besiding adding tests for U2F authenticators, it also changes payloadBase64 from
a string to a vector of strings. New tests are skipped for iOS.

  • http/wpt/webauthn/ctap-hid-failure.https.html:
  • http/wpt/webauthn/ctap-hid-success.https.html:
  • http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html:
  • http/wpt/webauthn/public-key-credential-create-failure-hid.https.html:
  • http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html: Added.
  • http/wpt/webauthn/public-key-credential-create-failure-u2f.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-create-failure-u2f.https.html: Added.
  • http/wpt/webauthn/public-key-credential-create-success-hid.https.html:
  • http/wpt/webauthn/public-key-credential-create-success-u2f.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-create-success-u2f.https.html: Copied from LayoutTests/http/wpt/webauthn/public-key-credential-create-success-hid.https.html.
  • http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html:
  • http/wpt/webauthn/public-key-credential-get-failure-hid.https.html:
  • http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https.html: Added.
  • http/wpt/webauthn/public-key-credential-get-failure-u2f.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-get-failure-u2f.https.html: Added.
  • http/wpt/webauthn/public-key-credential-get-success-hid.https.html:
  • http/wpt/webauthn/public-key-credential-get-success-u2f.https-expected.txt: Added.
  • http/wpt/webauthn/public-key-credential-get-success-u2f.https.html: Added.
  • http/wpt/webauthn/resources/util.js:
  • platform/ios-wk2/TestExpectations:
4:16 PM Changeset in webkit [239751] by Alan Coon
  • 1 copy in tags/Safari-607.1.19

Tag Safari-607.1.19.

4:10 PM Changeset in webkit [239750] by Wenson Hsieh
  • 6 edits in trunk

[iOS] Dispatch a synthetic mousedown event prior to starting drags
https://bugs.webkit.org/show_bug.cgi?id=193229
<rdar://problem/46717097>

Reviewed by Tim Horton.

Source/WebCore:

Tweaks some drag initiation logic on iOS to actually send a "mousedown" event to the page prior to drag start.
This improves drag and drop compatibility with web pages that expect a mousedown to always precede dragging.
Additionally, ensure that preventing the "mousedown" event also prevents "dragstart", which matches macOS
behavior.

Test: DragAndDropTests.PreventingMouseDownShouldPreventDragStart

  • page/EventHandler.cpp:

Make the text drag delay 0 on iOS. This was introduced on iOS when originally bringing up drag and drop, and was
made to simply match macOS. However, it doesn't make sense to respect the delay here, since the purpose of this
delay is to disambiguate between making a text selection and starting a drag when pressing on text that is
already selected; on iOS (including iOSMac), this gesture conflict is already resolved by platform gesture
recognizers in the client layer, so there is always no delay between mouse down and drag here.

  • page/ios/EventHandlerIOS.mm:

Dispatch a mousedown and inspect the value of m_mouseDownMayStartDrag when starting a drag on iOS. This brings
our behavior closer in line with macOS.

(WebCore::EventHandler::tryToBeginDataInteractionAtPoint):

Tools:

Add a cross-platform drag and drop test to verify that calling preventDefault() on the mousedown event
prevents a drag from starting.

  • TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/link-and-target-div.html:

Tweak this test to make it robust when dragging the link to the target element multiple times in a single test.

3:06 PM Changeset in webkit [239749] by youenn@apple.com
  • 11 edits
    1 copy
    2 adds in trunk

service worker fetch handler results in bad referrer
https://bugs.webkit.org/show_bug.cgi?id=188248
<rdar://problem/47050478>

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

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

Source/WebCore:

Response sanitization was removing the ReferrerPolicy header from opaque redirect responses.
Reduce sanitization of opaque redirect responses to opaque responses and allow Location header.
Make sure referrer policy is updated for all load redirections, not only CORS loads.

Test: http/tests/security/referrer-policy-redirect-link-downgrade.html

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):

  • platform/network/ResourceResponseBase.cpp:

(WebCore::isSafeCrossOriginResponseHeader):
(WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):

Source/WebKit:

NetworkDataTaskCocoa is sometimes updating the referrer on its own.
Instead of updating the referrer when sending the request to WebProcess for evaluation,
Update the referrer once the web process decides to follow the redirection.
This ensures that any referrer that the WebProcess will set will be updated by NetworkDataTaskCocoa.

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

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::restrictRequestReferrerToOriginIfNeeded):
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

LayoutTests:

  • http/tests/security/referrer-policy-redirect-link-downgrade-expected.txt: Added.
  • http/tests/security/referrer-policy-redirect-link-downgrade.html: Added.
  • http/tests/security/resources/referrer-policy-redirect-link-downgrade.html: Added.
  • http/tests/security/resources/referrer-policy-redirect-link.html:
  • platform/ios-wk2/TestExpectations: Skip referrer-policy-redirect-link-downgrade.html

as it is very similar to already skipped referrer-policy-redirect-link.html.

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

Fix more assertions after r239710
https://bugs.webkit.org/show_bug.cgi?id=193237

  • NetworkProcess/cache/NetworkCacheStorage.h:

(WebKit::NetworkCache::Storage::store):
Make default parameter an empty lambda instead of a null CompletionHandler.
This way it can be called once instead of thinking it has already been called.

2:02 PM Changeset in webkit [239747] by Brent Fulgham
  • 16 edits
    10 moves
    1 add in trunk/Source/WebKit

Move ResourceLoadStatistics files from UIProcess to NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=193252
<rdar://problem/47125401>

Reviewed by Alex Christensen.

This patch is the first part of a refactoring to move the ResourceLoadStatistics logic from the UIProcess to the NetworkProcess.

This patch moves code into different folders and adjusts necessary build files, but does not change where the code executes. These
changes have no impact on behavior or test results.

I also modified a few files to add missing include files uncovered by the unified build system.

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp.
  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.h.
  • NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.cpp: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.cpp.
  • NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.h: Renamed from Source/WebKit/UIProcess/ResourceLoadStatisticsPersistentStorage.h.
  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp.
  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h.
  • NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp.
  • NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.h: Renamed from Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.h.
  • NetworkProcess/Downloads/PendingDownload.cpp:
  • NetworkProcess/Downloads/PendingDownload.h:
  • CMakeLists.txt:
  • PlatformMac.cmake:
  • PlatformWin.cmake:
  • Shared/PersistencyUtils.cpp: Renamed from Source/WebKit/UIProcess/PersistencyUtils.cpp.
  • Shared/PersistencyUtils.h: Renamed from Source/WebKit/UIProcess/PersistencyUtils.h.
  • Sources.txt:
  • SourcesCocoa.txt:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetWebAuthenticationMockConfiguration): Add missing WebKit:: scope.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp: Add missing include.
  • UIProcess/WebDataListSuggestionsDropdown.cpp: Ditto.
  • UIProcess/mac/DisplayLink.cpp:
  • UnifiedSources-input.xcfilelist:
  • WebKit.xcodeproj/project.pbxproj:
1:47 PM Changeset in webkit [239746] by youenn@apple.com
  • 9 edits in trunk

IDB storage of Crypto keys does not work in private browsing mode
https://bugs.webkit.org/show_bug.cgi?id=193219

Reviewed by Brady Eidson.

Source/WebCore:

https://trac.webkit.org/changeset/238677 moved from using a JSGlobalObject to a JSDOMGlobalObject for serialization/deserialization.
This does not work for crypto keys as they require not only a JSDOMGlobalObject but either a window or worker global object.

To fix the issue, revert 238677, and fix it by checking whether the dumping of an ArrayBuffer happens for a JSDOMGlobalObject or a JSGlobalObject.
If it is the latter, use JSC routines instead of toJS() which requires a JSDOMGlobalObject.

Covered by updated test.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::databaseThreadVM):
(WebCore::IDBServer::UniqueIDBDatabase::databaseThreadExecState):

  • bindings/js/JSDOMGlobalObject.cpp:
  • bindings/js/JSDOMGlobalObject.h:
  • bindings/js/JSDOMWrapper.cpp:

(WebCore::JSDOMObject::JSDOMObject):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::dumpArrayBufferView):
(WebCore::CloneSerializer::toJSArrayBuffer):

LayoutTests:

Activate private browsing mode for these two tests.

  • crypto/subtle/rsa-indexeddb-non-exportable-private.html:
  • crypto/subtle/rsa-indexeddb-private.html:
1:40 PM Changeset in webkit [239745] by keith_miller@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Move JSValueMakeSymbol to private header
https://bugs.webkit.org/show_bug.cgi?id=193254

Reviewed by Saam Barati.

When moving other functions in JSValueRef I guess I forgot to move this one.

  • API/JSObjectRefPrivate.h:
  • API/JSValueRef.h:
1:36 PM Changeset in webkit [239744] by Justin Fan
  • 13 edits in trunk

[WebGPU] Update createRenderPipeline for WebGPUPipelineLayout
https://bugs.webkit.org/show_bug.cgi?id=193247

Reviewed by Dean Jackson.

Source/WebCore:

Add WebGPUPipelineLayout to WebGPURenderPipeline via WebGPUPipelineDescriptorBase.

Test: Updated render-pipelines.html to test new functionality.

  • Modules/webgpu/WebGPUDevice.cpp:

(WebCore::WebGPUDevice::createRenderPipeline const): Convert WebGPUPipelineLayout to GPUPipelineLayout.

  • Modules/webgpu/WebGPUPipelineDescriptorBase.h:
  • Modules/webgpu/WebGPUPipelineDescriptorBase.idl: Add layout field.
  • Modules/webgpu/WebGPUPipelineLayout.h:

(WebCore::WebGPUPipelineLayout::pipelineLayout): Added. Getter.

  • platform/graphics/gpu/GPUPipelineDescriptorBase.h: Updated from out-of-date version.
  • platform/graphics/gpu/GPUPipelineLayout.cpp:

(WebCore::GPUPipelineLayout::GPUPipelineLayout): Now retains bindGroupLayouts from descriptor.

  • platform/graphics/gpu/GPUPipelineLayout.h:
  • platform/graphics/gpu/GPURenderPipelineDescriptor.h: Now inherits from GPUPipelineDescriptorBase.

(WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor): Custom constructor for non-aggregate struct.

LayoutTests:

Update render-pipelines.html to WPT form and to accomodate WebGPUPipelineLayouts.

  • webgpu/js/webgpu-functions.js:

(createBasicPipeline): Added option to include a WebGPUPipelineLayout.

  • webgpu/render-pipelines-expected.txt:
  • webgpu/render-pipelines.html:
1:33 PM Changeset in webkit [239743] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Mark SuspendedPageProxy as fast allocated
https://bugs.webkit.org/show_bug.cgi?id=193248

Reviewed by Alex Christensen.

  • UIProcess/SuspendedPageProxy.h:
1:28 PM Changeset in webkit [239742] by Chris Dumez
  • 17 edits
    14 adds in trunk

Prevent cross-site top-level navigations from third-party iframes
https://bugs.webkit.org/show_bug.cgi?id=193076
<rdar://problem/36074736>

Reviewed by Alex Christensen.

Source/WebCore:

Prevent cross-site top-level navigations from third-party iframes if the following conditions are met:

  1. Its tries to navigate the top-level page cross-site (different eTDL+1)
  2. The user has never interacted with the third-party iframe or any of its subframes

This experiment's intent is to block suspicious main-frame navigations by third-party content. The feature
is behind a runtime experimental feature flag, on by default.

Tests: http/tests/security/allow-top-level-navigations-by-third-party-iframes-to-same-origin.html

http/tests/security/allow-top-level-navigations-by-third-party-iframes-with-previous-user-activation.html
http/tests/security/allow-top-level-navigations-by-third-party-iframes-with-user-activation.html
http/tests/security/block-top-level-navigations-by-third-party-iframes.html

  • dom/Document.cpp:

(WebCore::printNavigationErrorMessage):
(WebCore::Document::canNavigate):
(WebCore::Document::canNavigateInternal):
(WebCore::Document::isNavigationBlockedByThirdPartyIFrameRedirectBlocking):

  • dom/Document.h:
  • dom/UserGestureIndicator.cpp:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::setLocation):

  • page/DOMWindow.h:
  • page/Frame.h:
  • page/Location.cpp:

(WebCore::Location::replace):
(WebCore::Location::setLocation):

  • page/Settings.yaml:

Source/WebKit:

Add experimental feature flag, on by default.

  • Shared/WebPreferences.yaml:

LayoutTests:

Add layout test coverage.

  • http/tests/security/allow-top-level-navigations-by-third-party-iframes-to-same-origin-expected.txt: Added.
  • http/tests/security/allow-top-level-navigations-by-third-party-iframes-to-same-origin.html: Added.
  • http/tests/security/allow-top-level-navigations-by-third-party-iframes-with-previous-user-activation-expected.txt: Added.
  • http/tests/security/allow-top-level-navigations-by-third-party-iframes-with-previous-user-activation.html: Added.
  • http/tests/security/allow-top-level-navigations-by-third-party-iframes-with-user-activation-expected.txt: Added.
  • http/tests/security/allow-top-level-navigations-by-third-party-iframes-with-user-activation.html: Added.
  • http/tests/security/block-top-level-navigations-by-third-party-iframes-expected.txt: Added.
  • http/tests/security/block-top-level-navigations-by-third-party-iframes.html: Added.
  • http/tests/security/resources/navigate-top-level-frame-to-failure-page.html: Added.
  • http/tests/security/resources/navigate-top-level-frame-to-success-page-same-origin.html: Added.
  • http/tests/security/resources/navigate-top-level-frame-to-success-page-with-previous-user-gesture.html: Added.
  • http/tests/security/resources/navigate-top-level-frame-to-success-page-with-user-gesture.html: Added.
  • http/tests/security/resources/should-have-loaded.html: Added.
  • http/tests/security/resources/should-not-have-loaded.html: Added.
1:24 PM Changeset in webkit [239741] by achristensen@apple.com
  • 15 edits in trunk/Source/WebKit

Remove more use of NetworkProcess::singleton
https://bugs.webkit.org/show_bug.cgi?id=193244

Reviewed by Brent Fulgham.

  • NetworkProcess/NetworkCORSPreflightChecker.cpp:

(WebKit::NetworkCORSPreflightChecker::NetworkCORSPreflightChecker):
(WebKit::NetworkCORSPreflightChecker::didReceiveChallenge):

  • NetworkProcess/NetworkCORSPreflightChecker.h:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::loadPing):

  • NetworkProcess/NetworkContentRuleListManager.cpp:

(WebKit::NetworkContentRuleListManager::NetworkContentRuleListManager):
(WebKit::NetworkContentRuleListManager::contentExtensionsBackend):

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

(WebKit::NetworkLoadChecker::NetworkLoadChecker):
(WebKit::NetworkLoadChecker::applyHTTPSUpgradeIfNeeded const):
(WebKit::NetworkLoadChecker::checkCORSRequestWithPreflight):
(WebKit::NetworkLoadChecker::processContentExtensionRulesForLoad):

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

(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::didReceiveMessage):
(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::networkContentRuleListManager):

  • NetworkProcess/NetworkResourceLoader.cpp:
  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::PingLoad):

  • NetworkProcess/PingLoad.h:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:

(WebKit::WebSWServerToContextConnection::WebSWServerToContextConnection):
(WebKit::WebSWServerToContextConnection::connectionMayNoLongerBeNeeded):

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
1:23 PM Changeset in webkit [239740] by achristensen@apple.com
  • 9 edits in trunk/Source/WebKit

Stop using NetworkProcess::singleton in NetworkCache code
https://bugs.webkit.org/show_bug.cgi?id=193243

Reviewed by Brent Fulgham.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::open):
(WebKit::NetworkCache::Cache::Cache):

  • NetworkProcess/cache/NetworkCache.h:

(WebKit::NetworkCache::Cache::networkProcess):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::logSpeculativeLoadingDiagnosticMessage):
(WebKit::NetworkCache::SpeculativeLoadManager::canRetrieve const):
(WebKit::NetworkCache::SpeculativeLoadManager::addPreloadedEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::revalidateSubresource):
(WebKit::NetworkCache::SpeculativeLoadManager::preloadEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::startSpeculativeRevalidation):

  • NetworkProcess/cache/NetworkCacheStatistics.cpp:

(WebKit::NetworkCache::Statistics::recordRetrievalRequest):
(WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
(WebKit::NetworkCache::Statistics::recordRetrievalFailure):
(WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
(WebKit::NetworkCache::Statistics::recordRevalidationSuccess):

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::retrieveFromMemory):

  • NetworkProcess/cache/NetworkCacheStorage.h:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):

1:15 PM Changeset in webkit [239739] by commit-queue@webkit.org
  • 5 edits in trunk/Tools

Layout test will generate a perf metric file to results dir.
https://bugs.webkit.org/show_bug.cgi?id=192030
<rdar://problem/32779516>

Patch by Zhifei Fang <zhifei_fang@apple.com> on 2019-01-08
Reviewed by Aakash Jain.

Layout test running time will be collected to a perf metric file.
For now, instead of outputing running time of all tests (which is huge),
we aggregate them by test directories which are at most two level deep.

  • Scripts/webkitpy/layout_tests/controllers/manager.py:

(Manager._end_test_run):
(Manager._output_perf_metrics):
(Manager._print_expectation_line_for_test):

  • Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:

(add_test_perf_metric):
(test_perf_metrics):

  • Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py:

(JSONGeneratorTest.test_test_timings_trie):
(JSONGeneratorTest):
(JSONGeneratorTest.test_test_perf_metrics):

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RebaselineTest.test_reset_results):
(RebaselineTest.test_missing_results):
(RebaselineTest.test_new_baseline):

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

Call CompletionHandler when destroying a NetworkCache::Storage::WriteOperation
https://bugs.webkit.org/show_bug.cgi?id=193251

Reviewed by Chris Dumez.

This fixes another assertion introduced in r239710.

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::Storage::WriteOperation::~WriteOperation):

12:49 PM Changeset in webkit [239737] by achristensen@apple.com
  • 37 edits in trunk/Source

Stop using NetworkStorageSession in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=193236

Reviewed by Don Olmstead.

Source/WebCore:

No change in behavior. Some code was only used for ResourceHandle, which isn't used in modern WebKit,
and for cookies, which are handled in the NetworkProcess in modern WebKit.

  • loader/CookieJar.cpp:

(WebCore::storageSession):

  • loader/EmptyClients.cpp:
  • platform/network/NetworkingContext.h:
  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::createNSURLConnection):
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::platformLoadResourceSynchronously):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
(WebCore::ResourceHandle::receivedCredential):

Source/WebKit:

  • Shared/WebProcessCreationParameters.cpp:

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

  • Shared/WebProcessCreationParameters.h:
  • Shared/WebsitePoliciesData.cpp:

(WebKit::WebsitePoliciesData::applyToDocumentLoader):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
(WebKit::WebProcessPool::tryTakePrewarmedProcess):
(WebKit::WebProcessPool::initializeNewWebProcess):
(WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
(WebKit::WebProcessPool::pageEndUsingWebsiteDataStore):
(WebKit::WebProcessPool::processForNavigationInternal):

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::setPrivateBrowsingEnabled):

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

(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession): Deleted.
(WebKit::WebFrameNetworkingContext::storageSession const): Deleted.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setSessionID):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::fetchWebsiteData):
(WebKit::WebProcess::addWebsiteDataStore): Deleted.
(WebKit::WebProcess::destroySession): Deleted.

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

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameNetworkingContext.h:
  • WebCoreSupport/WebFrameNetworkingContext.mm:

(WebFrameNetworkingContext::storageSession const):

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::cookiesForDOM):
(WebPlatformStrategies::setCookiesFromDOM):
(WebPlatformStrategies::cookiesEnabled):
(WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebPlatformStrategies::getRawCookies):
(WebPlatformStrategies::deleteCookie):

  • WebView/WebView.mm:

(-[WebView _cachedResponseForURL:]):
(-[WebView _clearCredentials]):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebFrameNetworkingContext.cpp:

(WebFrameNetworkingContext::storageSession const):

  • WebCoreSupport/WebFrameNetworkingContext.h:
  • WebCoreSupport/WebPlatformStrategies.cpp:

(WebPlatformStrategies::cookiesForDOM):
(WebPlatformStrategies::setCookiesFromDOM):
(WebPlatformStrategies::cookiesEnabled):
(WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebPlatformStrategies::getRawCookies):
(WebPlatformStrategies::deleteCookie):

  • WebCoreSupport/WebPlatformStrategies.h:
12:21 PM Changeset in webkit [239736] by Michael Catanzaro
  • 2 edits in trunk/Source/WebKit

Unreviewed, silence -Wformat warnings

  • NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:

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

12:12 PM Changeset in webkit [239735] by achristensen@apple.com
  • 29 edits in trunk/Source

Unreviewed, rolling out r239727.

Broke API tests

Reverted changeset:

"Stop using NetworkStorageSession in WebProcess"
https://bugs.webkit.org/show_bug.cgi?id=193236
https://trac.webkit.org/changeset/239727

12:09 PM Changeset in webkit [239734] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix some typos in comments.

Not reviewed.

  • dfg/DFGIntegerRangeOptimizationPhase.cpp:
11:41 AM Changeset in webkit [239733] by BJ Burg
  • 4 edits in trunk/Source/WebKit

Remove WKPageRef-based SPI in _WKAutomationSessionDelegate
https://bugs.webkit.org/show_bug.cgi?id=193202
<rdar://problem/37408718>

Reviewed by Alex Christensen.

This code is no longer used, it should be deleted.

  • UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:
  • UIProcess/Cocoa/AutomationSessionClient.h:
  • UIProcess/Cocoa/AutomationSessionClient.mm:

(WebKit::AutomationSessionClient::AutomationSessionClient):
(WebKit::AutomationSessionClient::requestNewPageWithOptions):
(WebKit::AutomationSessionClient::requestSwitchToPage):
(WebKit::AutomationSessionClient::requestHideWindowOfPage):
(WebKit::AutomationSessionClient::requestRestoreWindowOfPage):
(WebKit::AutomationSessionClient::requestMaximizeWindowOfPage):
(WebKit::AutomationSessionClient::isShowingJavaScriptDialogOnPage):
(WebKit::AutomationSessionClient::dismissCurrentJavaScriptDialogOnPage):
(WebKit::AutomationSessionClient::acceptCurrentJavaScriptDialogOnPage):
(WebKit::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage):
(WebKit::AutomationSessionClient::setUserInputForCurrentJavaScriptPromptOnPage):
(WebKit::AutomationSessionClient::typeOfCurrentJavaScriptDialogOnPage):
Clean up the delegate bridging methods now that only one delegate implementation is possible.

11:40 AM Changeset in webkit [239732] by Truitt Savell
  • 3 edits in trunk/LayoutTests

Revert expectation changes to pointerevents in iOS after https://trac.webkit.org/changeset/239704/webkit
https://bugs.webkit.org/show_bug.cgi?id=193214

Unreviewed Test Gardening

  • platform/ios-wk1/TestExpectations:
  • platform/ios-wk2/TestExpectations:
10:29 AM Changeset in webkit [239731] by Tadeu Zagallo
  • 3 edits
    1 add in trunk

LLInt put_by_id uses the wrong load instruction for loading flags from the metadata
https://bugs.webkit.org/show_bug.cgi?id=193221

Reviewed by Mark Lam.

JSTests:

  • stress/put-by-id-flags.js: Added.

(f):
(g):
(numberOfDFGCompiles):

Source/JavaScriptCore:

The flags are only 4 bytes, but were loaded with loadp. It used to work,
since the flags were followed by a 4-byte padding, but it broke after the
struct was compacted in r239626.

  • llint/LowLevelInterpreter64.asm:
10:20 AM Changeset in webkit [239730] by Alan Coon
  • 4 edits in branches/safari-607-branch

Cherry-pick r239726. rdar://problem/47097726

Regression(PSON-r239182): Blank view when navigating back and forth between google.com and stack overflow
https://bugs.webkit.org/show_bug.cgi?id=193224
<rdar://problem/47097726>

Reviewed by Alex Christensen.

Source/WebCore:

Since r239182, pages get suspended in-place when we suspend the old process after a process-swap on navigation.
When we return to a suspended page, we load the current history item again and it normally properly restores
the page from PageCache, even though we load the same history item and the current one and even though the
page is suspended in-place (i.e. we did not navigate away, which is the usual case for page cache).

The issue is that if the page URL contains a fragment, FrameLoader::shouldPerformFragmentNavigation() would
return true because both the source and destination URLs (which are the same) contains a fragment. To address
the issue, update FrameLoader::shouldPerformFragmentNavigation() to return false if the current page is
suspended.

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::shouldPerformFragmentNavigation):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

10:14 AM Changeset in webkit [239729] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[WPE][GTK] Add php-json to install-dependencies
https://bugs.webkit.org/show_bug.cgi?id=193233

Patch by Patrick Griffis <Patrick Griffis> on 2019-01-08
Reviewed by Michael Catanzaro.

  • gtk/install-dependencies:
  • wpe/install-dependencies:
10:13 AM Changeset in webkit [239728] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] Remove DConf permissions from sandbox
https://bugs.webkit.org/show_bug.cgi?id=193021

Patch by Patrick Griffis <Patrick Griffis> on 2019-01-08
Reviewed by Michael Catanzaro.

The latest development releases of xdg-desktop-portal and gtk3 use a
new portal for settings on Wayland org.freedesktop.portal.Settings.

  • UIProcess/Launcher/glib/BubblewrapLauncher.cpp:

(WebKit::bubblewrapSpawn):

10:08 AM Changeset in webkit [239727] by achristensen@apple.com
  • 28 edits in trunk/Source

Stop using NetworkStorageSession in WebProcess
https://bugs.webkit.org/show_bug.cgi?id=193236

Reviewed by Don Olmstead.

Source/WebCore:

No change in behavior. Some code was only used for ResourceHandle, which isn't used in modern WebKit,
and for cookies, which are handled in the NetworkProcess in modern WebKit.

  • loader/CookieJar.cpp:

(WebCore::storageSession):

  • loader/EmptyClients.cpp:
  • platform/network/NetworkingContext.h:
  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::createNSURLConnection):
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::platformLoadResourceSynchronously):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
(WebCore::ResourceHandle::receivedCredential):

Source/WebKit:

  • Shared/WebProcessCreationParameters.cpp:

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

  • Shared/WebProcessCreationParameters.h:
  • Shared/WebsitePoliciesData.cpp:

(WebKit::WebsitePoliciesData::applyToDocumentLoader):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled):
(WebKit::WebProcessPool::tryTakePrewarmedProcess):
(WebKit::WebProcessPool::initializeNewWebProcess):
(WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
(WebKit::WebProcessPool::pageEndUsingWebsiteDataStore):
(WebKit::WebProcessPool::processForNavigationInternal):

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::setPrivateBrowsingEnabled):

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

(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession): Deleted.
(WebKit::WebFrameNetworkingContext::storageSession const): Deleted.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setSessionID):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::fetchWebsiteData):
(WebKit::WebProcess::addWebsiteDataStore): Deleted.
(WebKit::WebProcess::destroySession): Deleted.

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

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameNetworkingContext.h:
  • WebCoreSupport/WebFrameNetworkingContext.mm:

(WebFrameNetworkingContext::storageSession const):

  • WebView/WebView.mm:

(-[WebView _cachedResponseForURL:]):
(-[WebView _clearCredentials]):

9:59 AM Changeset in webkit [239726] by Chris Dumez
  • 4 edits in trunk

Regression(PSON-r239182): Blank view when navigating back and forth between google.com and stack overflow
https://bugs.webkit.org/show_bug.cgi?id=193224
<rdar://problem/47097726>

Reviewed by Alex Christensen.

Source/WebCore:

Since r239182, pages get suspended in-place when we suspend the old process after a process-swap on navigation.
When we return to a suspended page, we load the current history item again and it normally properly restores
the page from PageCache, even though we load the same history item and the current one and even though the
page is suspended in-place (i.e. we did not navigate away, which is the usual case for page cache).

The issue is that if the page URL contains a fragment, FrameLoader::shouldPerformFragmentNavigation() would
return true because both the source and destination URLs (which are the same) contains a fragment. To address
the issue, update FrameLoader::shouldPerformFragmentNavigation() to return false if the current page is
suspended.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::shouldPerformFragmentNavigation):

Tools:

Add API test coverage.

  • TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
8:43 AM Changeset in webkit [239725] by achristensen@apple.com
  • 6 edits in trunk/Source/WebKit

Always call CompletionHandler in Cache::store
https://bugs.webkit.org/show_bug.cgi?id=193237

Reviewed by Chris Dumez.

No change in behavior. This just fixes an assertion introduced in r239710 when the speculative loader finishes.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::store):

  • NetworkProcess/cache/NetworkCache.h:
  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:

(WebKit::NetworkCache::SpeculativeLoad::didFinishLoading):

7:18 AM Changeset in webkit [239724] by achristensen@apple.com
  • 4 edits
    1 add in trunk/Source/WebCore

Move Windows-specific code from NetworkStorageSessionCFNet.cpp to its own file
https://bugs.webkit.org/show_bug.cgi?id=192958

Reviewed by Yusuke Suzuki.

This makes it easier to reason about what code is used where.

  • PlatformAppleWin.cmake:
  • platform/network/cf/NetworkStorageSessionCFNet.cpp:

(WebCore::createPrivateStorageSession): Deleted.
(WebCore::cookieDomain): Deleted.
(WebCore::canonicalCookieTime): Deleted.
(WebCore::cookieCreatedTime): Deleted.
(WebCore::cookieExpirationTime): Deleted.
(WebCore::cookieName): Deleted.
(WebCore::cookiePath): Deleted.
(WebCore::cookieValue): Deleted.
(WebCore::filterCookies): Deleted.
(WebCore::copyCookiesForURLWithFirstPartyURL): Deleted.
(WebCore::createCookies): Deleted.
(WebCore::NetworkStorageSession::setCookiesFromDOM const): Deleted.
(WebCore::containsSecureCookies): Deleted.
(WebCore::NetworkStorageSession::cookiesForDOM const): Deleted.
(WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): Deleted.
(WebCore::NetworkStorageSession::cookiesEnabled const): Deleted.
(WebCore::NetworkStorageSession::getRawCookies const): Deleted.
(WebCore::NetworkStorageSession::deleteCookie const): Deleted.
(WebCore::NetworkStorageSession::getHostnamesWithCookies): Deleted.
(WebCore::NetworkStorageSession::deleteAllCookies): Deleted.
(WebCore::NetworkStorageSession::deleteCookiesForHostnames): Deleted.
(WebCore::NetworkStorageSession::deleteAllCookiesModifiedSince): Deleted.

  • platform/network/cf/NetworkStorageSessionCFNetWin.cpp: Added.

(WebCore::createPrivateStorageSession):
(WebCore::NetworkStorageSession::setCookies):
(WebCore::cookieDomain):
(WebCore::canonicalCookieTime):
(WebCore::cookieCreatedTime):
(WebCore::cookieExpirationTime):
(WebCore::cookieName):
(WebCore::cookiePath):
(WebCore::cookieValue):
(WebCore::filterCookies):
(WebCore::copyCookiesForURLWithFirstPartyURL):
(WebCore::createCookies):
(WebCore::NetworkStorageSession::setCookiesFromDOM const):
(WebCore::containsSecureCookies):
(WebCore::NetworkStorageSession::cookiesForDOM const):
(WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const):
(WebCore::NetworkStorageSession::cookiesEnabled const):
(WebCore::NetworkStorageSession::getRawCookies const):
(WebCore::NetworkStorageSession::deleteCookie const):
(WebCore::NetworkStorageSession::getHostnamesWithCookies):
(WebCore::NetworkStorageSession::deleteAllCookies):
(WebCore::NetworkStorageSession::deleteCookiesForHostnames):
(WebCore::NetworkStorageSession::deleteAllCookiesModifiedSince):

3:31 AM Changeset in webkit [239723] by graouts@webkit.org
  • 11 edits
    2 copies in trunk/Source/WebCore

[Web Animations] Compute animation effect timing properties in batch
https://bugs.webkit.org/show_bug.cgi?id=192850

Reviewed by Dean Jackson.

We remove a host of functions from AnimationEffect that would allow the computation of various timing properties
defined by the Web Animations specification: phase, progress, current iteration, etc. Indeed, a lot of these functions
would call each other in a chain, and we would re-compute a lot of the earlier properties in those chains several times
when doing something like querying the animation progress. Additionally, some functions, such as WebAnimation::computeRelevance()
and WebAnimation::timeToNextTick() would yield the computation of several such properties numerous times. All of those
functions are called during each animation frame and are ripe for optimizations.

We now compute all timing properties across two functions:

  1. the new AnimationEffect::getBasicTiming() which computes the local time, end time, active duration, active time and phase,
  2. the existing AnimationEffect::getComputedTiming() which now also exposes the phase and simple iteration progress.

To support this we introduce a new BasicEffectTiming struct to contain the values computed in AnimationEffect::getBasicTiming()
and spun the AnimationEffect::Phase struct as AnimationEffectPhase so that it may be used across BasicEffectTiming and
ComputedEffectTiming.

No new test since there is no user-observable change.

  • WebCore.xcodeproj/project.pbxproj:
  • animation/AnimationEffect.cpp:

(WebCore::AnimationEffect::getTiming const):
(WebCore::AnimationEffect::getBasicTiming const):
(WebCore::AnimationEffect::getComputedTiming const):
(WebCore::AnimationEffect::localTime const): Deleted.
(WebCore::AnimationEffect::phase const): Deleted.
(WebCore::AnimationEffect::activeTime const): Deleted.
(WebCore::AnimationEffect::overallProgress const): Deleted.
(WebCore::AnimationEffect::simpleIterationProgress const): Deleted.
(WebCore::AnimationEffect::currentIteration const): Deleted.
(WebCore::AnimationEffect::currentDirection const): Deleted.
(WebCore::AnimationEffect::directedProgress const): Deleted.
(WebCore::AnimationEffect::transformedProgress const): Deleted.
(WebCore::AnimationEffect::iterationProgress const): Deleted.
(WebCore::AnimationEffect::getTiming): Deleted.
(WebCore::AnimationEffect::getComputedTiming): Deleted.
(WebCore::AnimationEffect::endTime const): Deleted.
(WebCore::AnimationEffect::activeDuration const): Deleted.

  • animation/AnimationEffect.h:
  • animation/AnimationEffectPhase.h: Copied from Source/WebCore/animation/ComputedEffectTiming.h.
  • animation/AnimationTimeline.cpp:

(WebCore::AnimationTimeline::updateCSSTransitionsForElement):

  • animation/AnimationTimeline.h:
  • animation/BasicEffectTiming.h: Copied from Source/WebCore/animation/ComputedEffectTiming.h.
  • animation/ComputedEffectTiming.h:
  • animation/DeclarativeAnimation.cpp:

(WebCore::DeclarativeAnimation::cancel):
(WebCore::DeclarativeAnimation::phaseWithoutEffect const):
(WebCore::DeclarativeAnimation::invalidateDOMEvents):

  • animation/DeclarativeAnimation.h:
  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::apply):
(WebCore::KeyframeEffect::getAnimatedStyle):

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::effectEndTime const):
(WebCore::WebAnimation::computeRelevance):
(WebCore::WebAnimation::timeToNextTick const):

1:00 AM Changeset in webkit [239722] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.23.2

WebKitGTK+ 2.23.2

12:58 AM Changeset in webkit [239721] by Carlos Garcia Campos
  • 4 edits in trunk

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.23.2 release

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.23.2.

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):

Note: See TracTimeline for information about the timeline view.